-AS_IF([test "x$with_gsm_bs" == xyes -o "x$with_gsm_ms" == xyes],
- [AC_MSG_CHECKING(/usr/include/gsm/gsm.h)
- if test -e /usr/include/gsm/gsm.h; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_FAILURE([You have enabled GSM, but /usr/include/gsm/gsm.h not found! Please install the lossy GSM codec. Be sure to install it in /usr/ and not in /usr/local/. You will also find a copy on http://www.linux-call-router.de.])
- fi
- ])
+# 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