summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-01-23 06:18:18 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-01-23 06:18:18 +0000
commitf7506f68b514a31348fe71f29f1fea571711bc33 (patch)
tree93fceee898f55de78f4176b4d366036581005ad8 /aconfigure.ac
parent1b4137b1713944a4fcb42f52facce72f39d24578 (diff)
Re #1608: Add support for OpenCORE AMR-WB
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4331 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac82
1 files changed, 64 insertions, 18 deletions
diff --git a/aconfigure.ac b/aconfigure.ac
index 65cf48d3..9afce8d4 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -1320,39 +1320,69 @@ AC_ARG_ENABLE(ssl,
fi
])
-dnl # opencore-amrnb alt prefix
+dnl # Obsolete option --with-opencore-amrnb
AC_ARG_WITH(opencore-amrnb,
AC_HELP_STRING([--with-opencore-amrnb=DIR],
- [Specify alternate libopencore-amrnb prefix]),
+ [This option is obsolete and replaced by --with-opencore-amr=DIR]),
+ [AC_MSG_ERROR(This option is obsolete and replaced by --with-opencore-amr=DIR)],
+ []
+ )
+
+dnl # opencore-amr alt prefix
+AC_ARG_WITH(opencore-amr,
+ AC_HELP_STRING([--with-opencore-amr=DIR],
+ [Specify alternate libopencore-amr prefix]),
+ [],
+ [with_opencore_amr=no]
+ )
+
+dnl # Do not use default opencore-amr installation if we are cross-compiling
+if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amr" = "xno"; then
+ enable_opencore_amr=no
+fi
+
+dnl # vo-amrwbenc alt prefix
+AC_ARG_WITH(opencore-amrwbenc,
+ AC_HELP_STRING([--with-opencore-amrwbenc=DIR],
+ [Specify alternate libvo-amrwbenc prefix]),
[],
- [with_opencore_amrnb=no]
+ [with_opencore_amrwbenc=no]
)
-dnl # Do not use default opencore-amrnb installation if we are cross-compiling
-if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrnb" = "xno"; then
- enable_opencore_amrnb=no
+dnl # Do not use default vo-amrwbenc installation if we are cross-compiling
+if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrwbenc" = "xno"; then
+ enable_opencore_amrwbenc=no
fi
-dnl # Include opencore-amrnb support
+
+dnl # Include opencore-amr support
AC_SUBST(ac_no_opencore_amrnb)
-AC_ARG_ENABLE(opencore_amrnb,
- AC_HELP_STRING([--disable-opencore-amrnb],
- [Exclude OpenCORE AMR-NB support from the build (default: autodetect)])
+AC_SUBST(ac_no_opencore_amrwb)
+AC_ARG_ENABLE(opencore_amr,
+ AC_HELP_STRING([--disable-opencore-amr],
+ [Exclude OpenCORE AMR support from the build (default: autodetect)])
,
[
- if test "$enable_opencore_amrnb" = "no"; then
+ if test "$enable_opencore_amr" = "no"; then
[ac_no_opencore_amrnb=1]
+ [ac_no_opencore_amrwb=1]
AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0)
- AC_MSG_RESULT([Checking if OpenCORE AMR-NB support is disabled... yes])
+ AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0)
+ AC_MSG_RESULT([Checking if OpenCORE AMR support is disabled... yes])
fi
],
[
- AC_MSG_RESULT([checking for OpenCORE AMR-NB installations..])
- if test "x$with_opencore_amrnb" != "xno" -a "x$with_opencore_amrnb" != "x"; then
- CFLAGS="$CFLAGS -I$with_opencore_amrnb/include"
- LDFLAGS="$LDFLAGS -L$with_opencore_amrnb/lib"
- AC_MSG_RESULT([Using OpenCORE AMR-NB prefix... $with_opencore_amrnb])
- fi
+ AC_MSG_RESULT([checking for OpenCORE AMR installations..])
+ if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then
+ CFLAGS="$CFLAGS -I$with_opencore_amr/include"
+ LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib"
+ AC_MSG_RESULT([Using OpenCORE AMR prefix... $with_opencore_amr])
+ fi
+ if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then
+ CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include"
+ LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib"
+ AC_MSG_RESULT([Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc])
+ fi
AC_SUBST(opencore_amrnb_h_present)
AC_SUBST(opencore_amrnb_present)
AC_CHECK_HEADER(opencore-amrnb/interf_enc.h,[opencore_amrnb_h_present=1])
@@ -1364,6 +1394,22 @@ AC_ARG_ENABLE(opencore_amrnb,
[ac_no_opencore_amrnb=1]
AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0)
fi
+ AC_SUBST(opencore_amrwb_enc_h_present)
+ AC_SUBST(opencore_amrwb_enc_present)
+ AC_SUBST(opencore_amrwb_dec_h_present)
+ AC_SUBST(opencore_amrwb_dec_present)
+ AC_CHECK_HEADER(vo-amrwbenc/enc_if.h,[opencore_amrwb_enc_h_present=1])
+ AC_CHECK_HEADER(opencore-amrwb/dec_if.h,[opencore_amrwb_dec_h_present=1])
+ AC_CHECK_LIB(opencore-amrwb,D_IF_init,[opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb"])
+ AC_CHECK_LIB(vo-amrwbenc,E_IF_init,[opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc"])
+ if test "x$opencore_amrwb_enc_h_present" = "x1" -a "x$opencore_amrwb_dec_h_present" = "x1" -a "x$opencore_amrwb_enc_present" = "x1" -a "x$opencore_amrwb_dec_present" = "x1"; then
+ AC_MSG_RESULT([OpenCORE AMR-WB library found, AMR-WB support enabled])
+ AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,1)
+ else
+ [ac_no_opencore_amrwb=1]
+ AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0)
+ fi
+
])
dnl # SILK prefix