summaryrefslogtreecommitdiffstats
path: root/openbsc/configure.ac
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-20 23:49:24 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-21 00:04:57 +0100
commit25b70cea9d9521b081ea0cc524f5d157a1b89baf (patch)
tree42d59385d5d64329feecbe89375e4aec20275696 /openbsc/configure.ac
parent0e0a09c610885b0e4255eff9dfccc7b6b52854c2 (diff)
autoconf: Fix the --disable-* case for the AC_ARG_ENABLE macros
--disable-smpp would actually not disable SMPP but enable it. Correct it for all usages of AC_ARG_ENABLE. Move the unconditional invocation of PKG_CHECK_MODULES before the conditional one to make it work as the pkg-config m4 macro appears to expand the first usage differently and searches for the pkg-config exuable. Use "$enableval" to see if the feature should be enabled or disabled and then search for the module afterwards.
Diffstat (limited to 'openbsc/configure.ac')
-rw-r--r--openbsc/configure.ac47
1 files changed, 20 insertions, 27 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 91ae08aeb..7004f96bd 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -19,46 +19,39 @@ dnl checks for libraries
AC_SEARCH_LIBS(crypt, crypt,
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.5.3.60)
+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)
+# Enabke/disable the NAT?
AC_ARG_ENABLE([nat], [AS_HELP_STRING([--enable-nat], [Build the BSC NAT. Requires SCCP])],
- [
+ [osmo_ac_build_nat="$enableval"],[osmo_ac_build_nat="no"])
+if test "$osmo_ac_build_nat" = "yes" ; then
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2)
- osmo_ac_build_nat="yes"
- ],
- [
- osmo_ac_build_nat="no"
- ])
+fi
AM_CONDITIONAL(BUILD_NAT, test "x$osmo_ac_build_nat" = "xyes")
AC_SUBST(osmo_ac_build_nat)
+# Enable/disable the BSC?
AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build the Osmo BSC])],
- [
- PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.6)
- osmo_ac_build_bsc="yes"
- ],
- [
- osmo_ac_build_bsc="no"
- ])
+ [osmo_ac_build_bsc="$enableval"])
+if test "$osmo_ac_build_bsc" = "yes" ; then
+ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.6)
+fi
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
+# Enable/disable smpp support in the nitb?
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"
- ])
+ [osmo_ac_build_smpp="$enableval"])
+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")
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.5.3.60)
-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)
-
found_libgtp=yes
PKG_CHECK_MODULES(LIBGTP, libgtp, , found_libgtp=no)
AM_CONDITIONAL(HAVE_LIBGTP, test "$found_libgtp" = yes)