AC_INIT(fwmaker, 1.0, misho@elwix.org) AC_CONFIG_HEADERS([inc/config.h]) AC_CONFIG_SRCDIR([src/fwmaker.c]) ac_cv_func_malloc_0_nonnull="yes" ac_cv_func_realloc_0_nonnull="yes" # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep) AC_SUBST(MKDEP) CFLAGS="${CFLAGS:=-I/usr/local/include} -Wall -O2 -fPIC" LDFLAGS="${LDFLAGS:=-L/usr/local/lib}" # Checks for libraries. AC_CHECK_LIB([aitcli], [cli_addCommand]) AC_CHECK_LIB([elwix], [e_free]) # Checks for header files. AC_CHECK_HEADERS([fcntl.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_TYPE_SIZE_T DEBUG=no AC_MSG_CHECKING(Debug Build) AC_ARG_ENABLE(debug, [ --enable-debug Build library with debug information and additional messages], [ DEBUG=$enableval case "$enableval" in yes) CFLAGS="-g ${CFLAGS}" ;; *) AC_DEFINE(NDEBUG,, [Build w/o assert() support]) ;; esac ],) AC_MSG_RESULT($DEBUG) # Checks for library functions. AC_CHECK_FUNCS([ftruncate memset strpbrk strtol]) AC_CONFIG_FILES([Makefile bin/Makefile inc/Makefile src/Makefile]) AC_OUTPUT