aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-18 00:20:21 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-18 00:20:21 +0200
commit03800ba868f732eb1d8d8722568e9f06e51270ef (patch)
treef5c71b4be07c8ee98735e552f176c59dea1a18ee /openbsc
parentd9a55f67acdcc9a0f63ac48c34926b15b72180da (diff)
[GPRS] Build osmo-sgsn only if libgtp is available
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/configure.in4
-rw-r--r--openbsc/src/gprs/Makefile.am5
2 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/configure.in b/openbsc/configure.in
index 66d4ee1f3..0f4836379 100644
--- a/openbsc/configure.in
+++ b/openbsc/configure.in
@@ -17,6 +17,10 @@ AC_PROG_RANLIB
dnl checks for libraries
AC_SEARCH_LIBS(crypt, crypt,
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
+AC_SEARCH_LIBS(gtp_new, gtp,
+ [LIBCRYPT="-lgtp"; AC_SUBST([GPRS_LIBGTP], [1])])
+
+AM_CONDITIONAL(HAVE_LIBGTP, test "x$GPRS_LIBGTP" != "x")
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.6)
diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am
index 098961ba7..cebcfebc3 100644
--- a/openbsc/src/gprs/Makefile.am
+++ b/openbsc/src/gprs/Makefile.am
@@ -2,7 +2,12 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
AM_LDFLAGS = $(LIBOSMOCORE_LIBS)
+if HAVE_LIBGTP
sbin_PROGRAMS = osmo-gbproxy osmo-sgsn
+else
+sbin_PROGRAMS = osmo-gbproxy
+endif
+
noinst_LIBRARIES = libsgsn.a
libsgsn_a_SOURCES = gprs_ns.c gprs_bssgp.c gprs_llc.c gprs_gmm.c \