diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-09-25 02:23:06 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-09-25 02:23:06 +0000 |
commit | 191cc63e8f5dde26e586d2ef99f2eda5e288d623 (patch) | |
tree | 0a24f014595501684fa513cbdba0751813223123 /aconfigure.ac | |
parent | 31425448324e10b5fb02557a9f1d5cc86df7bed3 (diff) |
Re #1568: Add build config for SILK
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4265 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r-- | aconfigure.ac | 47 |
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 |