aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/configure.ac
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-28 02:46:12 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-20 17:54:29 +0200
commitdff3b42aad712ad0ea1cf2b8f9df7c3d0d45e1d6 (patch)
tree7164d52de2e7166795084efabdc91a061226e796 /openbsc/configure.ac
parent775eea233133157e7b0dc77fb6257052e7f147a3 (diff)
configure: Find correct libgsm's gsm.h header
Some distributions (archlinux) or versions of libgsm install gsm.h in /usr/include/gsm/gsm.h Since libgsm doesn't come with a pkfconfig, let's first check if gsm.h and take the correct path in the build setup. Backport from osmo-mgw.git Change-Id: I07d3c03903e0d4bb80e843c7ed917a27b791ea53
Diffstat (limited to 'openbsc/configure.ac')
-rw-r--r--openbsc/configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index ae9e69e7f..c3615d6a5 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -81,6 +81,13 @@ 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_CHECK_HEADERS([gsm.h gsm/gsm.h], [osmo_ac_found_gsm_headers=yes])
+ if test "$osmo_ac_found_gsm_headers" != "yes" ; then
+ AC_MSG_ERROR([Unable to find the libgsm headers])
+ fi
+ AC_SUBST(HAVE_GSM_H)
+ AC_SUBST(HAVE_GSM_GSM_H)
+
AC_SEARCH_LIBS([gsm_create], [gsm], [LIBRARY_GSM="$LIBS";LIBS=""], [AC_MSG_ERROR([--enable-mgcp-transcoding: cannot find usable libgsm])])
AC_SUBST(LIBRARY_GSM)
if test "$osmo_ac_with_g729" = "yes" ; then