From 483805f79570115ab95c69698792d238c1719b1b Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Mon, 11 Mar 2013 15:09:56 -0500 Subject: Import pjproject-2.1 --- aconfigure.ac | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 112 insertions(+), 18 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index be2f2ae..9afce8d 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,8 +1394,72 @@ 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 +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" + CPPFLAGS="$CPPFLAGS -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 -- cgit v1.2.3