[network-manager-vpnc/th/master-to-1-2-3-bgo771013: 67/67] build: fix linking against libdl.so for dlopen()



commit 599f50c45353eb51a1a6edd4f118f7d06a8e92f8
Author: Thomas Haller <thaller redhat com>
Date:   Wed Sep 7 17:59:22 2016 +0200

    build: fix linking against libdl.so for dlopen()

 configure.ac           |    3 +++
 properties/Makefile.am |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c458348..9826186 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,9 @@ AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
 AC_CHECK_FUNCS(select socket uname)
 
+AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
+AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
+
 dnl ensure that when the Automake generated makefile calls aclocal,
 dnl it honours the $ACLOCAL_FLAGS environment variable
 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 56d5e56..a43ff45 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -50,7 +50,9 @@ libnm_vpn_plugin_vpnc_la_CFLAGS = \
     $(LIBNM_CFLAGS)
 
 libnm_vpn_plugin_vpnc_la_LIBADD = \
-    $(LIBNM_LIBS)
+    $(LIBNM_LIBS) \
+    $(LD_LIBS) \
+    $(NULL)
 
 libnm_vpn_plugin_vpnc_la_LDFLAGS = \
     -avoid-version \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]