@@ -1008,6 +1008,10 @@ PBX_OSPTK
1008
1008
OSPTK_DIR
1009
1009
OSPTK_INCLUDE
1010
1010
OSPTK_LIB
1011
+ PBX_OPUSFILE
1012
+ OPUSFILE_DIR
1013
+ OPUSFILE_INCLUDE
1014
+ OPUSFILE_LIB
1011
1015
PBX_OPUS
1012
1016
OPUS_DIR
1013
1017
OPUS_INCLUDE
@@ -1435,6 +1439,7 @@ with_newt
1435
1439
with_ogg
1436
1440
with_openr2
1437
1441
with_opus
1442
+ with_opusfile
1438
1443
with_osptk
1439
1444
with_oss
1440
1445
with_postgres
@@ -2191,6 +2196,7 @@ Optional Packages:
2191
2196
--with-ogg=PATH use OGG files in PATH
2192
2197
--with-openr2=PATH use MFR2 files in PATH
2193
2198
--with-opus=PATH use Opus files in PATH
2199
+ --with-opusfile=PATH use Opusfile files in PATH
2194
2200
--with-osptk=PATH use OSP Toolkit files in PATH
2195
2201
--with-oss=PATH use Open Sound System files in PATH
2196
2202
--with-postgres=PATH use PostgreSQL files in PATH
@@ -11357,6 +11363,38 @@ fi
11357
11363
11358
11364
11359
11365
11366
+ OPUSFILE_DESCRIP="Opusfile"
11367
+ OPUSFILE_OPTION="opusfile"
11368
+ PBX_OPUSFILE=0
11369
+
11370
+ # Check whether --with-opusfile was given.
11371
+ if test "${with_opusfile+set}" = set; then :
11372
+ withval=$with_opusfile;
11373
+ case ${withval} in
11374
+ n|no)
11375
+ USE_OPUSFILE=no
11376
+ # -1 is a magic value used by menuselect to know that the package
11377
+ # was disabled, other than 'not found'
11378
+ PBX_OPUSFILE=-1
11379
+ ;;
11380
+ y|ye|yes)
11381
+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"
11382
+ ;;
11383
+ *)
11384
+ OPUSFILE_DIR="${withval}"
11385
+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"
11386
+ ;;
11387
+ esac
11388
+
11389
+ fi
11390
+
11391
+
11392
+
11393
+
11394
+
11395
+
11396
+
11397
+
11360
11398
OSPTK_DESCRIP="OSP Toolkit"
11361
11399
OSPTK_OPTION="osptk"
11362
11400
PBX_OSPTK=0
@@ -30426,6 +30464,116 @@ _ACEOF
30426
30464
fi
30427
30465
30428
30466
30467
+ # opusfile.h includes <opus_multistream.h> so we need to make sure that
30468
+ # either $OPUS_INCLUDE or /usr/include/opus is added to the search path.
30469
+ __opus_include=${OPUS_INCLUDE}
30470
+ if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then
30471
+ __opus_include=-I/usr/include/opus
30472
+ fi
30473
+
30474
+ if test "x${PBX_OPUSFILE}" != "x1" -a "${USE_OPUSFILE}" != "no"; then
30475
+ pbxlibdir=""
30476
+ # if --with-OPUSFILE=DIR has been specified, use it.
30477
+ if test "x${OPUSFILE_DIR}" != "x"; then
30478
+ if test -d ${OPUSFILE_DIR}/lib; then
30479
+ pbxlibdir="-L${OPUSFILE_DIR}/lib"
30480
+ else
30481
+ pbxlibdir="-L${OPUSFILE_DIR}"
30482
+ fi
30483
+ fi
30484
+ pbxfuncname="op_open_callbacks"
30485
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
30486
+ AST_OPUSFILE_FOUND=yes
30487
+ else
30488
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
30489
+ CFLAGS="${CFLAGS} $__opus_include"
30490
+ as_ac_Lib=`$as_echo "ac_cv_lib_opusfile_${pbxfuncname}" | $as_tr_sh`
30491
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopusfile" >&5
30492
+ $as_echo_n "checking for ${pbxfuncname} in -lopusfile... " >&6; }
30493
+ if eval \${$as_ac_Lib+:} false; then :
30494
+ $as_echo_n "(cached) " >&6
30495
+ else
30496
+ ac_check_lib_save_LIBS=$LIBS
30497
+ LIBS="-lopusfile ${pbxlibdir} $LIBS"
30498
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30499
+ /* end confdefs.h. */
30500
+
30501
+ /* Override any GCC internal prototype to avoid an error.
30502
+ Use char because int might match the return type of a GCC
30503
+ builtin and then its argument prototype would still apply. */
30504
+ #ifdef __cplusplus
30505
+ extern "C"
30506
+ #endif
30507
+ char ${pbxfuncname} ();
30508
+ int
30509
+ main ()
30510
+ {
30511
+ return ${pbxfuncname} ();
30512
+ ;
30513
+ return 0;
30514
+ }
30515
+ _ACEOF
30516
+ if ac_fn_c_try_link "$LINENO"; then :
30517
+ eval "$as_ac_Lib=yes"
30518
+ else
30519
+ eval "$as_ac_Lib=no"
30520
+ fi
30521
+ rm -f core conftest.err conftest.$ac_objext \
30522
+ conftest$ac_exeext conftest.$ac_ext
30523
+ LIBS=$ac_check_lib_save_LIBS
30524
+ fi
30525
+ eval ac_res=\$$as_ac_Lib
30526
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30527
+ $as_echo "$ac_res" >&6; }
30528
+ if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30529
+ AST_OPUSFILE_FOUND=yes
30530
+ else
30531
+ AST_OPUSFILE_FOUND=no
30532
+ fi
30533
+
30534
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
30535
+ fi
30536
+
30537
+ # now check for the header.
30538
+ if test "${AST_OPUSFILE_FOUND}" = "yes"; then
30539
+ OPUSFILE_LIB="${pbxlibdir} -lopusfile "
30540
+ # if --with-OPUSFILE=DIR has been specified, use it.
30541
+ if test "x${OPUSFILE_DIR}" != "x"; then
30542
+ OPUSFILE_INCLUDE="-I${OPUSFILE_DIR}/include"
30543
+ fi
30544
+ OPUSFILE_INCLUDE="${OPUSFILE_INCLUDE} $__opus_include"
30545
+ if test "xopus/opusfile.h" = "x" ; then # no header, assume found
30546
+ OPUSFILE_HEADER_FOUND="1"
30547
+ else # check for the header
30548
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
30549
+ CPPFLAGS="${CPPFLAGS} ${OPUSFILE_INCLUDE}"
30550
+ ac_fn_c_check_header_mongrel "$LINENO" "opus/opusfile.h" "ac_cv_header_opus_opusfile_h" "$ac_includes_default"
30551
+ if test "x$ac_cv_header_opus_opusfile_h" = xyes; then :
30552
+ OPUSFILE_HEADER_FOUND=1
30553
+ else
30554
+ OPUSFILE_HEADER_FOUND=0
30555
+ fi
30556
+
30557
+
30558
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
30559
+ fi
30560
+ if test "x${OPUSFILE_HEADER_FOUND}" = "x0" ; then
30561
+ OPUSFILE_LIB=""
30562
+ OPUSFILE_INCLUDE=""
30563
+ else
30564
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
30565
+ OPUSFILE_LIB=""
30566
+ fi
30567
+ PBX_OPUSFILE=1
30568
+ cat >>confdefs.h <<_ACEOF
30569
+ #define HAVE_OPUSFILE 1
30570
+ _ACEOF
30571
+
30572
+ fi
30573
+ fi
30574
+ fi
30575
+
30576
+
30429
30577
30430
30578
if test "${USE_PWLIB}" != "no"; then
30431
30579
if test -n "${PWLIB_DIR}"; then
0 commit comments