summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org>2005-05-01 23:19:42 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org>2005-05-01 23:19:42 +0000
commitd894e26211f38db37015850afab6b7331edeecdb (patch)
tree27f9eb6baebd2fc2c5b54c97b4775797b69e43ba /configure.in
parent21ed4ac1f957f1e4d7be195a98fb235de13ede21 (diff)
o Created changelog file
o Deleted libctnetlink.h and libnfnetlink.h from the include/ dir. o Added support for version (-V) and help (-h) o Added event mask based support o Added GPLv2 headers o Use fprintf instead of printf o Defined print_tuple and print_proto output interfaces o ctnl_[get|del]_conntrack handles return value from kernel via msgerr o Added support for conntrack table flushing o Added test case file (test.sh) o Improve dump output o Autoconf stuff for conntrack + some pablo's modifications. o Fixed packet counters formatting (use %llu instead of %lu)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in88
1 files changed, 88 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..2cdeec7
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,88 @@
+AC_INIT
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE(conntrack, 0.50)
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+case $target in
+*-*-linux*) ;;
+*) AC_MSG_ERROR([Linux only, dude!]);;
+esac
+
+# Checks for libraries.
+# FIXME: Replace `main' with a function in `-lc':
+dnl AC_CHECK_LIB([c], [main])
+# FIXME: Replace `main' with a function in `-ldl':
+
+AC_CHECK_LIB([dl], [dlopen])
+AC_CHECK_LIB([nfnetlink], [nfnl_listen])
+AC_CHECK_LIB([ctnetlink], [ctnl_register_handler] ,,,[-lnfnetlink])
+
+# Checks for header files.
+dnl AC_HEADER_STDC
+dnl AC_CHECK_HEADERS([netinet/in.h stdlib.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+dnl AC_C_CONST
+dnl AC_C_INLINE
+
+# Checks for library functions.
+dnl AC_FUNC_MALLOC
+dnl AC_FUNC_VPRINTF
+dnl AC_CHECK_FUNCS([memset])
+
+dnl--------------------------------
+
+AC_DEFUN([NF_KERNEL_SOURCE],[
+
+ if test "$with_kernel" = ""; then
+ KERNEL="`uname -r`"
+ else
+ KERNEL="$with_kernel"
+ fi
+
+ THIS_PREFIX=""
+ for i in "/lib/modules/$KERNEL/build/include" "$KERNEL" "$KERNEL/include" "/usr/src/linux-$KERNEL" "/usr/src/kernel-$KERNEL" "/usr/src/linux-headers-$KERNEL" "/usr/src/kernel-headers-$KERNEL"
+ do
+ AC_MSG_CHECKING([Looking for kernel source or headers in $i])
+ if test -r "$i/linux/config.h"
+ then
+ THIS_PREFIX="$i"
+ AC_MSG_RESULT([found])
+ break
+ fi
+ AC_MSG_RESULT([ ])
+ done
+ if test -r "$THIS_PREFIX/linux/config.h" ; then
+ AC_SUBST(KERNELDIR,[$THIS_PREFIX])
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_ERROR([not found $THIS_PREFIX])
+ fi
+
+ # somehow add this as an include path
+])
+
+AC_ARG_WITH(kernel,
+ AC_HELP_STRING([--with-kernel=DIR],
+ [ Show location of kernel source. Default is to use uname -r and look in /lib/modules/KERNEL/build/include. ]),
+ NF_KERNEL_SOURCE($with_kernel),NF_KERNEL_SOURCE())
+
+CONNTRACK_LIB_DIR=$PREFIX/lib
+AC_SUBST(CONNTRACK_LIB_DIR)
+
+dnl--------------------------------
+
+dnl AC_CONFIG_FILES([Makefile
+dnl debug/Makefile
+dnl debug/src/Makefile
+dnl extensions/Makefile
+dnl src/Makefile])
+
+AC_OUTPUT(Makefile src/Makefile extensions/Makefile include/Makefile)