smpp: Move the coding/mode detection into a utils file
Make sure to not ever have issues with this code again, move the
utility code to a new file and create a basic testcase. The method
currently has 100% line and branch coverage. My initial patched
missed the smpp_utils.c file and I re-did the copying (and verifying
the branch coverage)
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 3dd2212..0227d26 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -44,12 +44,13 @@
# Enable/disable smpp support in the nitb?
AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])],
- [osmo_ac_build_smpp="$enableval"])
+ [osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"])
if test "$osmo_ac_build_smpp" = "yes" ; then
PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.10)
AC_DEFINE(BUILD_SMPP, 1, [Define if we want to build SMPP])
fi
AM_CONDITIONAL(BUILD_SMPP, test "x$osmo_ac_build_smpp" = "xyes")
+AC_SUBST(osmo_ac_build_smpp)
found_libgtp=yes
@@ -160,6 +161,7 @@
tests/gprs/Makefile
tests/si/Makefile
tests/abis/Makefile
+ tests/smpp/Makefile
doc/Makefile
doc/examples/Makefile
Makefile)