aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2018-04-10 15:54:02 +0200
committerJiri Pirko <jiri@mellanox.com>2018-04-19 16:33:43 +0200
commit87662455fc6eae38de70fd7b6f758c22ec7a443a (patch)
tree0f12b86500a775df54e57a0a507a0525f68332a6
parent789591c7318a0423984037b6a8ba3f3925f4eaa7 (diff)
downloadlibteam-87662455fc6eae38de70fd7b6f758c22ec7a443a.tar.gz
configure.ac: Empty LDFLAGS before checking for libnl3
Currently since CFLAGS are dropped if you have LDFLAGS=-pie (default on RHEL) the rtnl_link_get_phys_port_id, rtnl_link_set_carrier and rtnl_link_get_carrier tests always fails: /usr/bin/ld: /tmp/ccv5GdFD.o: relocation R_X86_64_PC32 against undefined symbol `rtnl_link_get_carrier@@libnl_3' can not be used when making a shared object; recompile with -fPIC This commits empty LDFLAGS before launching the 3 tests and restores it after the tests. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 60657bb..f27c15c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,8 +39,10 @@ LT_INIT
PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-cli-3.0])
TMP_CFLAGS="$CFLAGS"
+ TMP_LDFLAGS="$LDFLAGS"
TMP_LIBS="$LIBS"
CFLAGS="$CPPFLAGS $LIBNL_CFLAGS"
+ LDFLAGS=""
LIBS="$LIBS $LIBNL_LIBS"
AC_CHECK_LIB([nl-route-3], [rtnl_link_get_phys_port_id],
AC_DEFINE(HAVE_RTNL_LINK_GET_PHYS_ID, [1], [Define to 1 if you have rtnl_link_get_phys_port_id function.]))
@@ -49,6 +51,7 @@ PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-cli-3
AC_CHECK_LIB([nl-route-3], [rtnl_link_get_carrier],
AC_DEFINE(HAVE_RTNL_LINK_GET_CARRIER, [1], [Define to 1 if you have rtnl_link_get_carrier.]))
CFLAGS="$TMP_CFLAGS"
+ LDFLAGS="$TMP_LDFLAGS"
LIBS="$TMP_LIBS"
PKG_CHECK_MODULES([LIBDAEMON], [libdaemon])