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

This commit is contained in:
Harald Welte 2012-11-16 22:15:22 +01:00
parent 1a2993adb7
commit 6c7680d726
4 changed files with 19 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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);
}

View File

@ -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) {