2001-06-30 06:56:50 +08:00
|
|
|
dnl -*-Autoconf-*-
|
2001-06-06 22:53:29 +08:00
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl An autoconf script to automatically configure the sample C++ "foo"
|
|
|
|
dnl application.
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
|
2001-06-30 06:56:50 +08:00
|
|
|
AC_PREREQ(2.50)
|
|
|
|
dnl Can't use $PACKAGE/$VERSION here
|
|
|
|
AC_INIT(foo, 0.1)
|
2001-06-29 06:46:43 +08:00
|
|
|
AC_CONFIG_SRCDIR([foo.cpp])dnl
|
2001-06-06 22:53:29 +08:00
|
|
|
|
|
|
|
dnl Check what platform we are running on.
|
2001-06-29 06:46:43 +08:00
|
|
|
AC_CANONICAL_TARGET([])
|
2001-06-06 22:53:29 +08:00
|
|
|
|
|
|
|
dnl Cause GNU Automake to initialize the state of things and run
|
|
|
|
dnl some sanity checks
|
|
|
|
PACKAGE=foo
|
|
|
|
VERSION=0.1
|
2001-06-30 06:56:50 +08:00
|
|
|
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
2001-06-06 22:53:29 +08:00
|
|
|
|
|
|
|
dnl Check the C compiler and preprocessor.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CC_C_O
|
|
|
|
|
|
|
|
dnl Check the C++ compiler and preprocessor.
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXXCPP
|
|
|
|
|
|
|
|
# As of the writing of this demo, GNU Autoconf's AC_OBJEXT and
|
|
|
|
# AC_EXEEXT macros only works for C compilers!
|
|
|
|
# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting
|
|
|
|
# the test language to C. We do it before any libtool setup macros are
|
|
|
|
# called so that the proper values are cached beforehand. We also do
|
|
|
|
# it before any linker flags (LDFLAGS) are set so that C++ specific
|
|
|
|
# ones don't break the tests.
|
2001-06-29 06:46:43 +08:00
|
|
|
AC_LANG_PUSH([C])
|
2001-06-06 22:53:29 +08:00
|
|
|
AC_OBJEXT
|
|
|
|
AC_EXEEXT
|
2001-06-29 06:46:43 +08:00
|
|
|
AC_LANG_POP
|
2001-06-06 22:53:29 +08:00
|
|
|
|
|
|
|
dnl Setup Libtool
|
|
|
|
|
2001-06-30 06:56:50 +08:00
|
|
|
dnl Set the test language to C++.
|
|
|
|
AC_LANG([C++])
|
|
|
|
|
2001-06-06 22:53:29 +08:00
|
|
|
dnl Check for libtool and turn on Automake processing for Libtool
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(math.h)
|
|
|
|
|
|
|
|
AC_CHECK_LIBM
|
|
|
|
AC_SUBST(LIBM)
|
|
|
|
|
2001-06-30 06:56:50 +08:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
|
|
|
AC_CONFIG_COMMANDS([default], [[echo "Done configuring package $PACKAGE"]])
|
2001-06-29 06:46:43 +08:00
|
|
|
AC_OUTPUT
|