AC_PREREQ(2.59) AC_INIT(libuninum, 2.6, 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