aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-02 09:51:31 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-02 09:51:31 +0200
commitb69518f3834b60901ab5750b6ce3b623d9479c1e (patch)
treea6954e4ec04db4c001ab930e15344779fa2208ac
parent58ec15c4edd14914479f2c4a6a885a6435dc81fe (diff)
configure: Do not link all applications against libgsm
Use the same trick as done by the dlopen check to not have everyone link against the library.
-rw-r--r--openbsc/configure.ac3
-rw-r--r--openbsc/src/osmo-bsc_mgcp/Makefile.am3
-rw-r--r--openbsc/tests/mgcp/Makefile.am2
3 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 0932f4226..0ebb041fa 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -63,7 +63,8 @@ AC_ARG_ENABLE([mgcp-transcoding], [AS_HELP_STRING([--enable-mgcp-transcoding], [
AC_ARG_WITH([g729], [AS_HELP_STRING([--with-g729], [Enable G.729 encoding/decoding.])], [osmo_ac_with_g729="$withval"],[osmo_ac_with_g729="no"])
if test "$osmo_ac_mgcp_transcoding" = "yes" ; then
- AC_SEARCH_LIBS(gsm_create, gsm)
+ AC_SEARCH_LIBS([gsm_create], [gsm], [LIBRARY_GSM="$LIBS";LIBS=""])
+ AC_SUBST(LIBRARY_GSM)
if test "$osmo_ac_with_g729" = "yes" ; then
PKG_CHECK_MODULES(LIBBCG729, libbcg729 >= 0.1, [AC_DEFINE([HAVE_BCG729], [1], [Use bgc729 decoder/encoder])])
fi
diff --git a/openbsc/src/osmo-bsc_mgcp/Makefile.am b/openbsc/src/osmo-bsc_mgcp/Makefile.am
index c62131b53..949cb6401 100644
--- a/openbsc/src/osmo-bsc_mgcp/Makefile.am
+++ b/openbsc/src/osmo-bsc_mgcp/Makefile.am
@@ -10,4 +10,5 @@ osmo_bsc_mgcp_SOURCES = mgcp_main.c
osmo_bsc_mgcp_LDADD = $(top_builddir)/src/libcommon/libcommon.a \
$(top_builddir)/src/libmgcp/libmgcp.a -lrt \
$(LIBOSMOVTY_LIBS) $(LIBOSMOCORE_LIBS) \
- $(LIBOSMONETIF_LIBS) $(LIBBCG729_LIBS)
+ $(LIBOSMONETIF_LIBS) $(LIBBCG729_LIBS) \
+ $(LIBRARY_GSM)
diff --git a/openbsc/tests/mgcp/Makefile.am b/openbsc/tests/mgcp/Makefile.am
index 08fde85c2..ec7cc99d8 100644
--- a/openbsc/tests/mgcp/Makefile.am
+++ b/openbsc/tests/mgcp/Makefile.am
@@ -25,4 +25,4 @@ mgcp_transcoding_test_LDADD = \
$(top_builddir)/src/libmgcp/libmgcp.a \
$(top_builddir)/src/libcommon/libcommon.a \
$(LIBOSMOCORE_LIBS) $(LIBBCG729_LIBS) -lrt -lm $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \
- $(LIBRARY_DL) $(LIBOSMONETIF_LIBS)
+ $(LIBRARY_DL) $(LIBOSMONETIF_LIBS) $(LIBRARY_GSM)