summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-07-30 21:04:21 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-07-30 21:04:21 +0000
commita5ecdc8fd2617b25f9125a33d1b6f04e56bce4f1 (patch)
treecaf09e7a60a466780c3652c2085d13a4c18da9e2 /configure.in
parent4fda98e61265e666db5e744ed75b0d883f545503 (diff)
build fixes following restructuring
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in59
1 files changed, 56 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index f5cb3a2..5b77da2 100644
--- a/configure.in
+++ b/configure.in
@@ -1,12 +1,65 @@
dnl Process this file with autoconf to create configure.
-AC_INIT(libnfnetlink_queue.c)
+AC_INIT
+AC_CANONICAL_SYSTEM
+
AM_INIT_AUTOMAKE(libnfnetlink_queue, 0.10)
AC_PROG_CC
AC_EXEEXT
AM_PROG_LIBTOOL
+AC_PROG_INSTALL
+
AC_SUBST(LIBTOOL_DEPS)
-dnl Output the makefile
-AC_OUTPUT(Makefile)
+case $target in
+*-*-linux*) ;;
+*) AC_MSG_ERROR([Linux only, dude!]);;
+esac
+
+AC_CHECK_LIB([nfnetlink], [nfnl_listen])
+
+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())
+
+dnl--------------------------------
+
+
+
+
+dnl Output the makefiles
+AC_OUTPUT(Makefile include/Makefile include/libnfnetlink_queue/Makefile src/Makefile utils/Makefile)