From e0409e631b5a96e4d7700d9e911fc3eee0db27cb Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 6 May 2013 12:15:28 -0500 Subject: [PATCH] build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630) If the Intel WiMAX stack is built with libnl1, but NM is built with a newer libnl, then symbol conflicts between libnl versions will occur when the WiMAX plugin is loaded into NM, and NM will crash. Distros should be building their WiMAX stack with libnl3, using the following git repos, rather than the long-defunct Intel git repos: git://people.freedesktop.org/~dcbw/wimax git://people.freedesktop.org/~dcbw/wimax-tools These repos contain fixes to allow the WiMAX stack to build against libnl3. --- configure.ac | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 32b3b8f29c..235eccf476 100644 --- a/configure.ac +++ b/configure.ac @@ -348,6 +348,15 @@ if (test "${enable_wimax}" = "yes"); then if test x"$have_wimax" = x"no"; then AC_MSG_ERROR(Intel WiMAX SDK is required) fi + + # Ensure the WiMAX stack is built with libnl3; otherwise crashes happen + # due to symbol conflicts + WMX_LIB_PATH=`$PKG_CONFIG --variable=libdir libiWmxSdk-0` + FOO=`ldd $WMX_LIB_PATH/libiWmxSdk.so.0.0.0 | grep libnl-3 2>&1` + if test "$?" != "0"; then + AC_MSG_ERROR([Intel WiMAX stack built with incompatible libnl version!]) + fi + AC_SUBST(IWMX_SDK_CFLAGS) AC_SUBST(IWMX_SDK_LIBS) AC_DEFINE(WITH_WIMAX, 1, [Define if you have WiMAX support]) @@ -391,14 +400,9 @@ if test x"$ac_crypto" = xnss; then PKG_CHECK_MODULES(NSS, [nss >= 3.11]) # Work around a pkg-config bug (fdo #29801) where exists != usable - AC_PATH_PROG(PKGCONFIG_PATH, pkg-config, no) - if test x"$PKGCONFIG_PATH" = xno; then - AC_MSG_ERROR([pkgconfig required but not found]) - else - FOO=`$PKGCONFIG_PATH --cflags --libs nss` - if test x"$?" != "x0"; then - AC_MSG_ERROR([No usable NSS found]) - fi + FOO=`$PKG_CONFIG --cflags --libs nss` + if test x"$?" != "x0"; then + AC_MSG_ERROR([No usable NSS found]) fi AC_SUBST(NSS_CFLAGS)