|
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
- AC_PREREQ([2.69])
- AC_INIT(septime, 1.0, dev@e2li.org)
- AM_INIT_AUTOMAKE
-
- AC_CONFIG_SRCDIR([config.h.in])
- AC_CONFIG_HEADERS([config.h])
-
- # Checks for programs.
- PROGMISS="NO"
- AC_PROG_CC
- AC_PROG_MAKE_SET
- AC_PROG_AWK
- AC_PROG_SED
- AC_PROG_GREP
- AC_PROG_EGREP
- #AC_PROG_SORT
- #AC_PROG_UNIQ
-
- AC_CHECK_PROG([COM1], [cut], [/bin/cut])
- if test x$COM1 = "x" ; then
- AC_MSG_WARN([cut is missing.])
- PROGMISS="YES"
- fi
- AC_CHECK_PROG([COM2], [sort], [/bin/sort])
- if test x$COM2 = "x" ; then
- AC_MSG_WARN([sort is missing.])
- PROGMISS="YES"
- fi
- AC_CHECK_PROG([COM3], [uniq], [/bin/uniq])
- if test x$COM3 = "x" ; then
- AC_MSG_WARN([uniq is missing.])
- PROGMISS="YES"
- fi
-
- AC_CHECK_PROG([ADMCOM], [tcpdump], [/sbin/tcpdump], "",
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
- if test x$ADMCOM = "x" ; then
- AC_MSG_WARN([tcpdump is missing.])
- PROGMISS="YES"
- fi
-
- AC_CHECK_PROG(ADMCOM2, whois, [/sbin/whois], "",
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
- if test x$ADMCOM2 = "x" ; then
- AC_MSG_WARN([whois is missing.])
- PROGMISS="YES"
- fi
-
- AC_CHECK_PROG(ADMCOM3, iptables, [/sbin/iptables], "",
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
- if test x$ADMCOM3 = "x" ; then
- AC_MSG_WARN([iptables is missing.])
- PROGMISS="YES"
- fi
-
- AC_CHECK_PROG(ADMCOM4, ip6tables, [/sbin/ip6tables], "",
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
- if test x$ADMCOM4 = "x" ; then
- AC_MSG_WARN([ip6tables is missing.])
- PROGMISS="YES"
- fi
-
- if test $PROGMISS = "YES" ; then
- AC_MSG_ERROR([All the programs listed above are required to run septime.])
- fi
-
-
-
- # Checks for libraries.
- AC_CHECK_LIB(pthread,pthread_create)
- AC_CHECK_LIB(readline,readline)
- AC_CHECK_LIB(z,inflate)
-
- # Checks for header files.
- AC_CHECK_HEADERS([arpa/inet.h fcntl.h stdint.h stdlib.h string.h strings.h syslog.h unistd.h])
- AC_CHECK_HEADERS([pthread.h])
- AC_CHECK_HEADERS([zlib.h])
- AC_CHECK_HEADERS([readline/readline.h])
- AC_CHECK_HEADERS([readline/history.h])
-
- # Checks for typedefs, structures, and compiler characteristics.
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
- AC_TYPE_SSIZE_T
- AC_TYPE_UINT64_T
-
- # Checks for library functions.
- AC_FUNC_FORK
- AC_FUNC_MALLOC
- AC_CHECK_FUNCS([dup2 memmove strchr strdup strrchr strstr])
-
- AC_CONFIG_FILES([Makefile
- src/Makefile])
- AC_OUTPUT
|