SMPP: build the smpp interface only in case of ./configure --enable-smpp

changes/88/3188/1
Harald Welte 10 years ago
parent 1a2993adb7
commit 6c7680d726
  1. 13
      openbsc/configure.ac
  2. 4
      openbsc/src/libmsc/Makefile.am
  3. 2
      openbsc/src/libmsc/gsm_04_11.c
  4. 4
      openbsc/src/osmo-nitb/bsc_hack.c

@ -41,12 +41,23 @@ AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build the Osmo B
])
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])],
[
PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.10)
osmo_ac_build_smpp="yes"
AC_DEFINE(BUILD_SMPP, 1, [Define if we want to build SMPP])
],
[
osmo_ac_build_smpp="no"
])
AM_CONDITIONAL(BUILD_SMPP, test "x$osmo_ac_build_smpp" = "xyes")
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.2)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.1.0)
PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.2)
PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.10)
found_libgtp=yes
PKG_CHECK_MODULES(LIBGTP, libgtp, , found_libgtp=no)

@ -16,6 +16,8 @@ libmsc_a_SOURCES = auth.c \
ussd.c \
vty_interface_layer3.c \
transaction.c \
smpp_smsc.c smpp_openbsc.c \
osmo_msc.c
if BUILD_SMPP
libmsc_a_SOURCES += smpp_smsc.c smpp_openbsc.c
endif

@ -117,8 +117,10 @@ void sms_free(struct gsm_sms *sms)
subscr_put(sms->sender);
if (sms->receiver)
subscr_put(sms->receiver);
#ifdef BUILD_SMPP
if (sms->smpp.esme)
smpp_esme_put(sms->smpp.esme);
#endif
talloc_free(sms);
}

@ -312,10 +312,10 @@ int main(int argc, char **argv)
/* start the SMS queue */
if (sms_queue_start(bsc_gsmnet, 20) != 0)
return -1;
#ifdef BUILD_SMPP
if (smpp_openbsc_init(bsc_gsmnet, 6040) < 0)
return -1;
#endif
if (daemonize) {
rc = osmo_daemonize();
if (rc < 0) {

Loading…
Cancel
Save