tests: dlopen does not imply availability of dlsym..

Check for both.

Change-Id: I1a1e82882ad28dd53e634f10f9cebb4bc74cac1e
diff --git a/configure.ac b/configure.ac
index 880a756..557f2c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,9 @@
 AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
 AC_SUBST(LIBRARY_DL)
 
+AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""])
+AC_SUBST(LIBRARY_DLSYM)
+
 
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.1.0)
 PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.1.0)
diff --git a/tests/mgcp/Makefile.am b/tests/mgcp/Makefile.am
index df2b7c8..95444b5 100644
--- a/tests/mgcp/Makefile.am
+++ b/tests/mgcp/Makefile.am
@@ -36,6 +36,7 @@
 	$(LIBOSMOVTY_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBRARY_DL) \
+	$(LIBRARY_DLSYM) \
 	$(LIBOSMONETIF_LIBS) \
 	-lm  \
 	$(NULL)
diff --git a/tests/mgcp_client/Makefile.am b/tests/mgcp_client/Makefile.am
index 5ce9538..3e4c082 100644
--- a/tests/mgcp_client/Makefile.am
+++ b/tests/mgcp_client/Makefile.am
@@ -35,6 +35,7 @@
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
 	$(LIBRARY_DL) \
+	$(LIBRARY_DLSYM) \
 	$(LIBOSMONETIF_LIBS) \
 	$(NULL)