summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac47
1 files changed, 47 insertions, 0 deletions
diff --git a/aconfigure.ac b/aconfigure.ac
index be2f2ae0..73204863 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -1366,6 +1366,53 @@ AC_ARG_ENABLE(opencore_amrnb,
fi
])
+dnl # SILK prefix
+AC_ARG_WITH(silk,
+ AC_HELP_STRING([--with-silk=DIR],
+ [Specify alternate SILK prefix]),
+ [],
+ [with_silk=no]
+ )
+
+dnl # Do not use default SILK installation if we are cross-compiling
+if test "x$ac_cross_compile" != "x" -a "x$with_silk" = "xno"; then
+ enable_silk=no
+fi
+
+dnl # Include SILK support
+AC_SUBST(ac_no_silk)
+AC_ARG_ENABLE(silk,
+ AC_HELP_STRING([--disable-silk],
+ [Exclude SILK support from the build (default: autodetect)])
+ ,
+ [
+ if test "$enable_silk" = "no"; then
+ [ac_no_silk=1]
+ AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0)
+ AC_MSG_RESULT([Checking if SILK support is disabled... yes])
+ fi
+ ],
+ [
+ AC_MSG_RESULT([checking for SILK installations..])
+ if test "x$with_silk" != "xno" -a "x$with_silk" != "x"; then
+ CFLAGS="$CFLAGS -I$with_silk/interface"
+ LDFLAGS="$LDFLAGS -L$with_silk"
+ AC_MSG_RESULT([Using SILK prefix... $with_silk])
+ fi
+ AC_SUBST(silk_h_present)
+ AC_SUBST(silk_present)
+ AC_CHECK_HEADER(SKP_Silk_SDK_API.h,[silk_h_present=1])
+ AC_CHECK_LIB(SKP_SILK_SDK,SKP_Silk_SDK_get_version,[silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK"])
+ if test "x$silk_h_present" = "x1" -a "x$silk_present" = "x1"; then
+ AC_MSG_RESULT([SILK library found, SILK support enabled])
+ AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,1)
+ else
+ [ac_no_silk=1]
+ AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0)
+ fi
+ ])
+
+
dnl ##########################################
dnl #
dnl # MANUAL CONFIG