summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-12-30 02:14:00 +0100
committerJan Engelhardt <jengelh@medozas.de>2011-12-31 21:54:14 +0100
commit79cefabaac7a0ecf864db7da2a665845c0789f10 (patch)
tree0cf85b04ac2230d6de980d87bb97437466da6a64 /configure.ac
parent32d8532a37004e11e5994d93df5e249c43197930 (diff)
extensions: link on libxtables and check symbols
Have each extension link against libxtables.so; with this, all home symbols are known at link time and we can use ld's --no-undefined to run the check, dropping the homebrew solution. By having libxtables.so required by extensions, package managers' automatic dependency discovery will become effective so that manual dependencies for distros with split extension packages (e.g. OpenWRT) will not be necessary anymore. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5679098c..0f85b831 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,15 @@ AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
[libiptc_LDFLAGS2="-Wl,--no-as-needed"])
AC_SUBST([libiptc_LDFLAGS2])
+AC_MSG_CHECKING([whether $LD knows -Wl,--no-undefined])
+saved_LDFLAGS="$LDFLAGS";
+LDFLAGS="-Wl,--no-undefined";
+AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) {}])],
+ [noundef_LDFLAGS="$LDFLAGS"; AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
+)
+LDFLAGS="$saved_LDFLAGS";
+
blacklist_modules="";
AC_CHECK_HEADERS([linux/dccp.h linux/ip_vs.h linux/magic.h linux/proc_fs.h])
@@ -99,6 +108,7 @@ pkgdatadir='${datadir}/xtables';
AC_SUBST([regular_CFLAGS])
AC_SUBST([regular_CPPFLAGS])
+AC_SUBST([noundef_LDFLAGS])
AC_SUBST([kinclude_CPPFLAGS])
AC_SUBST([kbuilddir])
AC_SUBST([ksourcedir])