From 62f71e22a1db90eee62ea9688f0c77cb6cf5ccae Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Thu, 22 Apr 2010 17:14:21 +0200 Subject: Tenth stage to ipset-5 Add new test files and toplevel files. --- configure.ac | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..cfffa99 --- /dev/null +++ b/configure.ac @@ -0,0 +1,76 @@ +dnl Boilerplate +AC_INIT([ipset], [5.0], [kadlec@blackhole.kfki.hu]) +AC_CANONICAL_SYSTEM +AC_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) + +dnl Shortcut: Linux supported alone +case $target in +*-*-linux*) ;; +*) AC_MSG_ERROR([Linux systems supported exclusively!]);; +esac + +dnl Additional arguments +dnl Kernel build directory or source tree +AC_ARG_WITH([kernel], + AS_HELP_STRING([--with-kernel=PATH], + [Path to kernel source/build directory]), + [KBUILDDOR="$withval";]) +AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "") +AC_SUBST(KBUILDDIR) + +dnl Maximal number of sets supported by the kernel, default 256 +AC_ARG_WITH([maxsets], + AS_HELP_STRING([--with-maxsets=256], + [Maximal numer of sets supported by the kernel]), + [MAXSETS="$withval";]) +AM_CONDITIONAL(WITH_MAXSETS, test "$MAXSETS" != "") +AC_SUBST(MAXSETS) + +dnl Verbose compiling +AC_ARG_ENABLE([verbose], + AS_HELP_STRING([--enable-verbose], + [Enable verbose mode at compiling/linking.]), + [case "${enableval}" in + yes) enable_verbose=yes ;; + no) enable_verbose=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-verbose]) ;; + esac], [enable_verbose=no]) + +AM_CONDITIONAL([ENABLE_VERBOSE], [test "x$enable_verbose" = xyes]) + +dnl Disable extra warn flags +AC_ARG_ENABLE([extra-flags], + AS_HELP_STRING([--disable-extra-flags], + [Disable extra compiler warning flags.]), + [case "${enableval}" in + yes) extra_flags=yes ;; + no) extra_flags=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --disable-extra-flags]) ;; + esac], [extra_flags=yes]) + +AM_CONDITIONAL([DISABLE_EXTRA_FLAGS], [test "x$extra_flags" = xno]) + +dnl Checks for programs +AC_PROG_CC +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_PROG_LN_S + +dnl Checks for libraries +AC_CHECK_LIB([mnl], [mnl_socket_open]) +if test x"${ac_cv_lib_mnl_mnl_socket_open}" = xno; then + AC_MSG_ERROR(libmnl not found) +fi + +dnl Checks for header files + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_TYPES([union nf_inet_addr],,,[#include +#include +#include ]) +dnl Checks for library functions. + +dnl Generate output +AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile]) +AC_OUTPUT -- cgit v1.2.3