1 |
dnl |
dnl -*-Autoconf-*- |
2 |
dnl $Id$ |
dnl $Id$ |
3 |
|
|
4 |
dnl |
dnl |
7 |
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
8 |
dnl |
dnl |
9 |
|
|
10 |
|
AC_PREREQ(2.50) |
11 |
AC_INIT |
dnl Can't use $PACKAGE/$VERSION here |
12 |
|
AC_INIT(foo, 0.1) |
13 |
AC_CONFIG_SRCDIR([foo.cpp])dnl |
AC_CONFIG_SRCDIR([foo.cpp])dnl |
14 |
|
|
15 |
dnl Check what platform we are running on. |
dnl Check what platform we are running on. |
19 |
dnl some sanity checks |
dnl some sanity checks |
20 |
PACKAGE=foo |
PACKAGE=foo |
21 |
VERSION=0.1 |
VERSION=0.1 |
22 |
|
AM_INIT_AUTOMAKE($PACKAGE, $VERSION) |
|
AM_INIT_AUTOMAKE("$PACKAGE", "$VERSION", DUMMY)dnl |
|
23 |
|
|
24 |
dnl Check the C compiler and preprocessor. |
dnl Check the C compiler and preprocessor. |
25 |
AC_PROG_CC |
AC_PROG_CC |
30 |
AC_PROG_CXX |
AC_PROG_CXX |
31 |
AC_PROG_CXXCPP |
AC_PROG_CXXCPP |
32 |
|
|
|
dnl Set the test language to C++. |
|
|
AC_LANG([C++]) |
|
|
|
|
33 |
# As of the writing of this demo, GNU Autoconf's AC_OBJEXT and |
# As of the writing of this demo, GNU Autoconf's AC_OBJEXT and |
34 |
# AC_EXEEXT macros only works for C compilers! |
# AC_EXEEXT macros only works for C compilers! |
35 |
# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting |
# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting |
37 |
# called so that the proper values are cached beforehand. We also do |
# called so that the proper values are cached beforehand. We also do |
38 |
# it before any linker flags (LDFLAGS) are set so that C++ specific |
# it before any linker flags (LDFLAGS) are set so that C++ specific |
39 |
# ones don't break the tests. |
# ones don't break the tests. |
|
AC_DIAGNOSE([obsolete],[instead of using `AC_LANG', `AC_LANG_SAVE', |
|
|
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.]) |
|
|
|
|
40 |
AC_LANG_PUSH([C]) |
AC_LANG_PUSH([C]) |
41 |
AC_OBJEXT |
AC_OBJEXT |
42 |
AC_EXEEXT |
AC_EXEEXT |
44 |
|
|
45 |
dnl Setup Libtool |
dnl Setup Libtool |
46 |
|
|
47 |
|
dnl Set the test language to C++. |
48 |
|
AC_LANG([C++]) |
49 |
|
|
50 |
dnl Check for libtool and turn on Automake processing for Libtool |
dnl Check for libtool and turn on Automake processing for Libtool |
51 |
AM_PROG_LIBTOOL |
AM_PROG_LIBTOOL |
52 |
|
|
55 |
AC_CHECK_LIBM |
AC_CHECK_LIBM |
56 |
AC_SUBST(LIBM) |
AC_SUBST(LIBM) |
57 |
|
|
58 |
AC_CONFIG_FILES([ |
AC_CONFIG_FILES(Makefile) |
59 |
Makefile |
AC_CONFIG_COMMANDS([default], [[echo "Done configuring package $PACKAGE"]]) |
|
]) |
|
|
AC_CONFIG_COMMANDS([default],[[ |
|
|
echo "Done configuring package $PACKAGE" |
|
|
]],[[]]) |
|
60 |
AC_OUTPUT |
AC_OUTPUT |