build: autodetect value for --with-xtlibdir

This commit is contained in:
Jan Engelhardt
2010-10-31 01:00:37 +02:00
parent 7f33590df8
commit 3ed1a3cbf0
2 changed files with 13 additions and 7 deletions

View File

@@ -21,15 +21,17 @@ if [[ "$kbuilddir" == no ]]; then
kbuilddir=""; kbuilddir="";
fi 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_CHECK_HEADERS([linux/netfilter/x_tables.h], [],
[AC_MSG_ERROR([You need to have linux/netfilter/x_tables.h, see INSTALL file for details])]) [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 \ regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \ -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \

View File

@@ -3,6 +3,10 @@ HEAD
==== ====
- LOGMARK: print remaining lifetime of cts - LOGMARK: print remaining lifetime of cts
- build: improve detection of kernel version and error handling - 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) v1.30 (October 02 2010)