Ignore:
Timestamp:
Jan 23, 2013 6:18:18 AM (11 years ago)
Author:
ming
Message:

Re #1608: Add support for OpenCORE AMR-WB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r4271 r4331  
    13211321              ]) 
    13221322 
    1323 dnl # opencore-amrnb alt prefix 
     1323dnl # Obsolete option --with-opencore-amrnb 
    13241324AC_ARG_WITH(opencore-amrnb, 
    13251325    AC_HELP_STRING([--with-opencore-amrnb=DIR], 
    1326                    [Specify alternate libopencore-amrnb prefix]), 
     1326                   [This option is obsolete and replaced by --with-opencore-amr=DIR]), 
     1327    [AC_MSG_ERROR(This option is obsolete and replaced by --with-opencore-amr=DIR)], 
     1328    [] 
     1329    ) 
     1330 
     1331dnl # opencore-amr alt prefix 
     1332AC_ARG_WITH(opencore-amr, 
     1333    AC_HELP_STRING([--with-opencore-amr=DIR], 
     1334                   [Specify alternate libopencore-amr prefix]), 
    13271335    [], 
    1328     [with_opencore_amrnb=no] 
     1336    [with_opencore_amr=no] 
    13291337    ) 
    13301338 
    1331 dnl # Do not use default opencore-amrnb installation if we are cross-compiling 
    1332 if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrnb" = "xno"; then 
    1333     enable_opencore_amrnb=no 
     1339dnl # Do not use default opencore-amr installation if we are cross-compiling 
     1340if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amr" = "xno"; then 
     1341    enable_opencore_amr=no 
    13341342fi 
    13351343 
    1336 dnl # Include opencore-amrnb support 
     1344dnl # vo-amrwbenc alt prefix 
     1345AC_ARG_WITH(opencore-amrwbenc, 
     1346    AC_HELP_STRING([--with-opencore-amrwbenc=DIR], 
     1347                   [Specify alternate libvo-amrwbenc prefix]), 
     1348    [], 
     1349    [with_opencore_amrwbenc=no] 
     1350    ) 
     1351 
     1352dnl # Do not use default vo-amrwbenc installation if we are cross-compiling 
     1353if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrwbenc" = "xno"; then 
     1354    enable_opencore_amrwbenc=no 
     1355fi 
     1356 
     1357 
     1358dnl # Include opencore-amr support 
    13371359AC_SUBST(ac_no_opencore_amrnb) 
    1338 AC_ARG_ENABLE(opencore_amrnb, 
    1339               AC_HELP_STRING([--disable-opencore-amrnb], 
    1340                              [Exclude OpenCORE AMR-NB support from the build (default: autodetect)]) 
     1360AC_SUBST(ac_no_opencore_amrwb) 
     1361AC_ARG_ENABLE(opencore_amr, 
     1362              AC_HELP_STRING([--disable-opencore-amr], 
     1363                             [Exclude OpenCORE AMR support from the build (default: autodetect)]) 
    13411364              , 
    13421365              [ 
    1343                 if test "$enable_opencore_amrnb" = "no"; then 
     1366                if test "$enable_opencore_amr" = "no"; then 
    13441367                 [ac_no_opencore_amrnb=1] 
     1368                 [ac_no_opencore_amrwb=1] 
    13451369                 AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) 
    1346                  AC_MSG_RESULT([Checking if OpenCORE AMR-NB support is disabled... yes]) 
     1370                 AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) 
     1371                 AC_MSG_RESULT([Checking if OpenCORE AMR support is disabled... yes]) 
    13471372                fi 
    13481373              ], 
    13491374              [ 
    1350                 AC_MSG_RESULT([checking for OpenCORE AMR-NB installations..]) 
    1351                 if test "x$with_opencore_amrnb" != "xno" -a "x$with_opencore_amrnb" != "x"; then 
    1352                     CFLAGS="$CFLAGS -I$with_opencore_amrnb/include" 
    1353                     LDFLAGS="$LDFLAGS -L$with_opencore_amrnb/lib" 
    1354                     AC_MSG_RESULT([Using OpenCORE AMR-NB prefix... $with_opencore_amrnb]) 
    1355                 fi                 
     1375                AC_MSG_RESULT([checking for OpenCORE AMR installations..]) 
     1376                if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then 
     1377                    CFLAGS="$CFLAGS -I$with_opencore_amr/include" 
     1378                    LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib" 
     1379                    AC_MSG_RESULT([Using OpenCORE AMR prefix... $with_opencore_amr]) 
     1380                fi 
     1381                if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then 
     1382                    CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include" 
     1383                    LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib" 
     1384                    AC_MSG_RESULT([Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc]) 
     1385                fi 
    13561386                AC_SUBST(opencore_amrnb_h_present) 
    13571387                AC_SUBST(opencore_amrnb_present) 
     
    13651395                        AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) 
    13661396                fi 
     1397                AC_SUBST(opencore_amrwb_enc_h_present) 
     1398                AC_SUBST(opencore_amrwb_enc_present) 
     1399                AC_SUBST(opencore_amrwb_dec_h_present) 
     1400                AC_SUBST(opencore_amrwb_dec_present) 
     1401                AC_CHECK_HEADER(vo-amrwbenc/enc_if.h,[opencore_amrwb_enc_h_present=1]) 
     1402                AC_CHECK_HEADER(opencore-amrwb/dec_if.h,[opencore_amrwb_dec_h_present=1]) 
     1403                AC_CHECK_LIB(opencore-amrwb,D_IF_init,[opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb"]) 
     1404                AC_CHECK_LIB(vo-amrwbenc,E_IF_init,[opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc"]) 
     1405                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 
     1406                        AC_MSG_RESULT([OpenCORE AMR-WB library found, AMR-WB support enabled]) 
     1407                        AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,1) 
     1408                else 
     1409                        [ac_no_opencore_amrwb=1] 
     1410                        AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) 
     1411                fi 
     1412 
    13671413              ]) 
    13681414 
Note: See TracChangeset for help on using the changeset viewer.