1
AC_INIT(conntrack-tools, 0.9.6, pablo@netfilter.org)
5
AM_INIT_AUTOMAKE(conntrack, 1.00beta2)
6
#AM_CONFIG_HEADER(config.h)
15
16
*) AC_MSG_ERROR([Linux only, dude!]);;
20
LIBNFNETLINK_REQUIRED=0.0.32
21
LIBNETFILTER_CONNTRACK_REQUIRED=0.0.89
23
PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,,
24
AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED))
26
PKG_CHECK_MODULES(LIBNETFILTER_CONNTRACK, libnetfilter_conntrack >= $LIBNETFILTER_CONNTRACK_REQUIRED,,
27
AC_MSG_ERROR(Cannot find libnetfilter_conntrack >= $LIBNETFILTER_CONNTRACK_REQUIRED))
29
AC_CHECK_PROGS(XYACC,$YACC bison yacc,none)
30
if test "$XYACC" = "none"
32
echo "*** Error: No suitable bison/yacc found. ***"
33
echo " Please install the 'bison' package."
36
AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
37
if test "$XLEX" = "none"
39
echo "*** Error: No suitable flex/lex found. ***"
40
echo " Please install the 'flex' package."
44
AC_CHECK_HEADERS([linux/capability.h],, [AC_MSG_ERROR([Cannot find linux/capabibility.h])])
18
46
# Checks for libraries.
19
47
# FIXME: Replace `main' with a function in `-lc':
20
48
dnl AC_CHECK_LIB([c], [main])
21
49
# FIXME: Replace `main' with a function in `-ldl':
23
AC_CHECK_LIB([dl], [dlopen])
24
AC_CHECK_LIB([netfilter_conntrack], [nfct_dump_conntrack_table] ,,,[-lnetfilter_conntrack])
51
AC_CHECK_LIB([nfnetlink], [nfnl_query] ,,,[-lnfnetlink])
52
AC_CHECK_LIB([netfilter_conntrack], [nfct_query] ,,,[-lnetfilter_conntrack])
26
54
AC_CHECK_HEADERS(arpa/inet.h)
27
55
dnl check for inet_pton
69
97
dnl AC_FUNC_VPRINTF
70
98
dnl AC_CHECK_FUNCS([memset])
72
dnl--------------------------------
74
if test ! -z "$libdir"; then
75
MODULE_DIR="\\\"$libdir/conntrack/\\\""
76
CFLAGS="$CFLAGS -DCONNTRACK_LIB_DIR=$MODULE_DIR"
79
dnl--------------------------------
81
100
dnl AC_CONFIG_FILES([Makefile
82
101
dnl debug/Makefile
83
102
dnl debug/src/Makefile
84
103
dnl extensions/Makefile
85
104
dnl src/Makefile])
87
AC_OUTPUT(Makefile src/Makefile extensions/Makefile include/Makefile)
106
CFLAGS="$CFLAGS $LIBNETFILTER_CONNTRACK_CFLAGS"
108
AC_SUBST(LIBNETFILTER_CONNTRACK_LIBS)
110
AC_OUTPUT(Makefile src/Makefile include/Makefile extensions/Makefile)