diff --git a/configure.ac b/configure.ac index 2c7b37c..b7236b4 100644 --- a/configure.ac +++ b/configure.ac @@ -21,15 +21,17 @@ if [[ "$kbuilddir" == no ]]; then kbuilddir=""; fi -AC_ARG_WITH([xtlibdir], - AS_HELP_STRING([--with-xtlibdir=PATH], - [Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]), - [xtlibdir="$withval"], - [xtlibdir='${libexecdir}/xtables']) - -PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.3]) AC_CHECK_HEADERS([linux/netfilter/x_tables.h], [], [AC_MSG_ERROR([You need to have linux/netfilter/x_tables.h, see INSTALL file for details])]) +PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.3]) +xtlibdir="$(pkg-config --variable=xtlibdir xtables)" + +AC_ARG_WITH([xtlibdir], + AS_HELP_STRING([--with-xtlibdir=PATH], + [Path where to install Xtables extensions [[autodetect]]]]), + [xtlibdir="$withval"]) +AC_MSG_CHECKING([Xtables module directory]) +AC_MSG_RESULT([$xtlibdir]) regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \ -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \ diff --git a/doc/changelog.txt b/doc/changelog.txt index 0982252..78cd36d 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,6 +3,10 @@ HEAD ==== - LOGMARK: print remaining lifetime of cts - build: improve detection of kernel version and error handling +- build: automatically derive Xtables module directory, thus + --with-xtlibdir is no longer needed for ./configure in most cases + (If I still see a distro using it, I will scold you for not + reading this changelog.) v1.30 (October 02 2010)