+# check for gsm-bs
+AC_ARG_WITH([gsm-bs],
+ [AS_HELP_STRING([--with-gsm-bs],
+ [compile with OpenBSC support @<:@default=no@:>@])
+ ],
+ [],
+ [with_gsm_bs="check"])
+
+AM_CONDITIONAL(ENABLE_GSM_BS, test "x$with_gsm_bs" == "xyes" )
+
+# check for gsm-ms
+AC_ARG_WITH([gsm-ms],
+ [AS_HELP_STRING([--with-gsm-ms],
+ [compile with Osmocom-bb support @<:@default=no@:>@])
+ ],
+ [],
+ [with_gsm_ms="check"])
+
+AM_CONDITIONAL(ENABLE_GSM_MS, test "x$with_gsm_ms" == "xyes" )
+
+AM_CONDITIONAL(ENABLE_GSM, test "x$with_gsm_bs" == "xyes" -o "x$with_gsm_ms" == "xyes")
+
+# check for opencore-amrnb for AMR and EFR decoding
+found_opencore_amrnb=yes
+PKG_CHECK_MODULES(OPENCORE_AMRNB, opencore-amrnb >= 0.1.0, , found_opencore_amrnb=no)
+AM_CONDITIONAL(ENABLE_GSMAMR, test "$found_opencore_amrnb" = "yes")
+if test "$found_opencore_amrnb" = yes; then
+ AC_DEFINE(HAVE_OPENCORE_AMRNB, 1, [Define to 1 if OpenCore AMR-NB library is available])
+fi
+
+# check for HR codec
+AC_ARG_ENABLE(gsmhr,
+ [AS_HELP_STRING(
+ [--enable-gsmhr],
+ [Enable support for GSM HR codec using reference code]
+ )],
+ [enable_gsmhr=1], [enable_gsmhr=0])
+AM_CONDITIONAL(ENABLE_GSMHR, test "x$enable_gsmhr" = "x1")
+if test "x$enable_gsmhr" = "x1"; then
+ AM_PATH_PYTHON([2.4])
+ AC_DEFINE(HAVE_LIBGSMHR, 1, [Define to 1 if libgsmhr is available])
+fi
+
+# check for ss5
+AC_ARG_WITH([ss5],
+ [AS_HELP_STRING([--with-ss5],
+ [compile with CCITT No. 5 support @<:@default=no@:>@])
+ ],
+ [],
+ [with_ss5="check"])
+
+AM_CONDITIONAL(ENABLE_SS5, test "x$with_ss5" == "xyes" )
+
+# check for SIP
+AC_ARG_WITH([sip],
+ [AS_HELP_STRING([--with-sip],
+ [compile with SIP support (sofia-sip is required) @<:@default=no@:>@])
+ ],
+ [],
+ [with_sip="check"])
+
+AM_CONDITIONAL(ENABLE_SIP, test "x$with_sip" == "xyes" )
+
+AS_IF([test "x$with_sip" == xyes -o "x$with_sip" == xyes], [
+ PKG_CHECK_MODULES(SOFIA, sofia-sip-ua >= 1.12)
+ ])
+
+# check for VoOTP
+AC_ARG_WITH([vootp],
+ [AS_HELP_STRING([--with-vootp],
+ [compile with VoOTP support (libvootp is required) @<:@default=no@:>@])
+ ],
+ [],
+ [with_vootp="check"])
+
+AM_CONDITIONAL(ENABLE_VOOTP, test "x$with_vootp" == "xyes" )
+
+AS_IF([test "x$with_vootp" == xyes -o "x$with_vootp" == xyes], [
+ PKG_CHECK_MODULES(VOOTP, libvootp >= 0.0)
+ ])
+