# -*- mode:Shell-script -*- AC_PREREQ(2.57) AC_INIT AC_CONFIG_SRCDIR([configure.in]) AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(src/config.h) LOG4C_MAJOR_VERSION=1 LOG4C_MINOR_VERSION=1 LOG4C_MICRO_VERSION=0 VERSION=$LOG4C_MAJOR_VERSION.$LOG4C_MINOR_VERSION.$LOG4C_MICRO_VERSION${SNAPSHOT:+.$SNAPSHOT} # +1 : ? : +1 == new interface that does not break old one # +1 : ? : 0 == new interface that breaks old one # ? : ? : 0 == no new interfaces, but breaks apps # ? :+1 : ? == just some internal changes, nothing breaks but might work # better # CURRENT : REVISION : AGE LT_VERSION=2:0:0 AC_SUBST(LOG4C_MAJOR_VERSION) AC_SUBST(LOG4C_MINOR_VERSION) AC_SUBST(LOG4C_MICRO_VERSION) AC_SUBST(LT_VERSION) AM_INIT_AUTOMAKE("log4c", $VERSION) AC_CANONICAL_HOST # Need this to get pthread etc. AC_DEFINE(_GNU_SOURCE,1,"POSIXandGNU extensions") # Checks for programs. AC_PROG_YACC AC_PROG_CC AC_PROG_CPP AM_PROG_LEX AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_LIBTOOL # plateforms idioms case "$host" in *-hp-hpux*) CFLAGS="-g" ;; *) ;; esac if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi # declare --enable-* args AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging [default=no]]) AC_ARG_ENABLE(test, [ --enable-test compile test programs]) AC_ARG_ENABLE(doc, [ --enable-doc create documentation]) if test x$enable_debug = xyes; then CFLAGS="$CFLAGS -D__SD_DEBUG__ -D__LOG4C_DEBUG__" fi AM_CONDITIONAL(TEST, test x$enable_test = xyes) # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h inttypes.h langinfo.h limits.h stddef.h stdint.h stdlib.h string.h sys/time.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM # Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_REALLOC AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_CHECK_FUNCS([gettimeofday memset munmap nl_langinfo strdup strerror strncasecmp strrchr strstr utime sbrk]) AM_CONDITIONAL(DOC, test x$enable_doc = xyes) # Checks for doxygen AC_PATH_PROG(DOXYGEN, doxygen, ) if test x$DOXYGEN = x; then enable_doc=no fi AC_CONFIG_FILES([ Makefile log4c-config log4crc.sample log4c.spec config/Makefile doc/Makefile doc/Doxyfile doc/main.doc src/Makefile src/log4c/Makefile src/log4c/version.h src/sd/Makefile tests/Makefile tests/log4c/Makefile examples/Makefile ]) AC_CONFIG_COMMANDS([default],[[ chmod +x log4c-config ]],[[]]) AC_OUTPUT