dnl Process this file with autoconf to produce a configure script. AC_INIT(rrdbot, 0.5, nielsen@memberwebs.com) AM_INIT_AUTOMAKE(rrdbot, 0.5) LDFLAGS="$LDFLAGS -L/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include" AC_CONFIG_SRCDIR([daemon/rrdbotd.c]) AM_CONFIG_HEADER([config.h]) CFLAGS="$CFLAGS -Wall" # Debug mode AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Compile binaries in debug mode])) if test "$enable_debug" = "yes"; then CFLAGS="$CFLAGS -g -O0" AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode]) echo "enabling debug compile mode" fi dnl Check for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB # TODO: Figure out why we need this wierd hack ACX_PTHREAD( , [echo "ERROR: Pthread support not found."; exit 1] ) LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS -D_POSIX_PTHREAD_SEMANTICS" dnl Checks for libraries AC_CHECK_LIB(rrd, rrd_update, , [echo "ERROR: librrd not found."; exit 1]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE dnl Check for header files. AC_HEADER_STDC AC_CHECK_HEADERS([rrd.h], , [echo "ERROR: rrd headers not found"]) AC_CHECK_HEADERS([unistd.h stdio.h stddef.h stdlib.h assert.h errno.h stdarg.h string.h netdb.h], , [echo "ERROR: Required C header missing"; exit 1]) AC_CHECK_FUNCS([strlcat strlcpy strtob]) AC_CHECK_FUNCS([strerror getopt getaddrinfo], , [echo "ERROR: Required function missing"; exit 1]) AC_MSG_RESULT() AC_CONFIG_FILES([Makefile mibs/Makefile daemon/Makefile bsnmp/Makefile tools/Makefile doc/Makefile]) AC_OUTPUT