1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
AC_PREREQ(2.59)
AC_INIT(libuninum, 2.7, billposer@alum.mit.edu)
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
AC_ARG_ENABLE(allocaok,
[--disable-allocaok Do not use alloca - use heap instead.],
[case "${enableval}" in
yes) allocaok=true ;;
no) allocaok=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-allocaok) ;;
esac],[allocaok=true])
AM_CONDITIONAL(ALLOCAOK,test "$allocaok" = true)
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([alloca.h ctype.h gmp.h langinfo.h limits.h locale.h math.h stddef.h stdlib.h string.h strings.h unistd.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getopt_long localeconv setlocale strrchr wcschr])
AC_CHECK_LIB(gmp, __gmpz_init,,[AC_MSG_ERROR([GNU MP not found, see http://swox.com/gmp/])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|