+# check for gsm-bs
+AC_ARG_WITH([gsm-bs],
+ [AS_HELP_STRING([--with-gsm-bs],
+ [compile with OpenBSC support @<:@default=check@:>@])
+ ],
+ [],
+ [with_gsm_bs="check"])
+
+AS_IF([test "x$with_gsm_bs" != xno],
+ [AC_CHECK_FILE([openbsc/include/openbsc/gsm_data.h],
+ [with_gsm_bs="yes"],
+ [if test "x$with_gsm_bs" != xcheck ; then
+ AC_MSG_FAILURE(
+ [--with-gsm-bs was given, but openbsc/include/openbsc/gsm_data.h was not found! Pleas link OpenBSC and libosmocore source directory to LCR source directory: ln -s path_to_openbsc/openbsc/ openbsc ; ln -s patch_to_libosmocore libosmocore])
+ fi
+ ])
+ ])
+
+AM_CONDITIONAL(ENABLE_GSM_BS, test "x$with_gsm_bs" == "xyes" )