mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-20 13:03:50 +00:00
configure.ac: use pkg-config to find netfilter_conntrack
Use pkg-config to retrieve the dependencies of netfilter_conntrack and avoid the following build failure when building statically: configure:13096: /data/buildroot-test/instance-1/output-1/host/bin/x86_64-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -I/data/buildroot-test/instance-1/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include -DPCRE_STATIC -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -L/data/buildroot-test/instance-1/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/lib conftest.c -lnetfilter_conntrack -lnfnetlink -lev -lcares -lsodium -lmbedcrypto -lpcre >&5 /data/buildroot-test/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/8.3.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: /data/buildroot-test/instance-1/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/libnetfilter_conntrack.a(api.o): in function `nfct_fill_hdr.constprop.4': api.c:(.text+0x3f): undefined reference to `mnl_nlmsg_put_header' Fixes: - http://autobuild.buildroot.org/results/6cad497a7ab941a0ee3fd7007defc81e30cdcbe0 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
+3
-2
@@ -252,7 +252,8 @@ AC_ARG_ENABLE(connmarktos,
|
||||
if test x"$enable_connmarktos" = "xyes" ; then
|
||||
AC_MSG_NOTICE([Linux Netfilter Conntrack support requested by --enable-connmarktos: ${enable_connmarktos}])
|
||||
if test "x$enable_connmarktos" != "xno"; then
|
||||
AC_SEARCH_LIBS([nfct_query], [netfilter_conntrack],,[
|
||||
PKG_CHECK_MODULES([NETFILTER_CONNTRACK], [libnetfilter_conntrack],,
|
||||
[AC_SEARCH_LIBS([nfct_query], [netfilter_conntrack],,[
|
||||
if test x"$enable_connmarktos" = "xyes"; then
|
||||
AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack library not found])
|
||||
fi
|
||||
@@ -262,7 +263,7 @@ if test x"$enable_connmarktos" = "xyes" ; then
|
||||
if test x"$enable_connmarktos" = "xyes"; then
|
||||
AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack headers not found])
|
||||
fi
|
||||
with_netfilter_conntrack=no])
|
||||
with_netfilter_conntrack=no])])
|
||||
# If nothing is broken; enable the libraries usage.
|
||||
if test "x$with_netfilter_conntrack" != "xno"; then
|
||||
with_netfilter_conntrack=yes
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ AM_CFLAGS += -I$(top_srcdir)/libcork/include
|
||||
endif
|
||||
AM_CFLAGS += $(LIBPCRE_CFLAGS)
|
||||
|
||||
SS_COMMON_LIBS = $(INET_NTOP_LIB) $(LIBPCRE_LIBS)
|
||||
SS_COMMON_LIBS = $(INET_NTOP_LIB) $(LIBPCRE_LIBS) $(NETFILTER_CONNTRACK_LIBS)
|
||||
if !USE_SYSTEM_SHARED_LIB
|
||||
SS_COMMON_LIBS += $(top_builddir)/libbloom/libbloom.la \
|
||||
$(top_builddir)/libipset/libipset.la \
|
||||
|
||||
Reference in New Issue
Block a user