summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-07-23 14:56:43 -0600
committerKevin Harwell <kharwell@digium.com>2016-09-27 09:52:24 -0500
commit44c0c51cf1c2c89326e5047b2b90ada0e36ec68f (patch)
tree7bffa3112528411bd7b3111dc216c3269b727545 /configure
parent9b0e6f9c8616fa81ec8e11c6fe45a6f6c07c387d (diff)
format_ogg_opus: New format
Add Ogg/Opus playback support. This uses libopusfile in order to be able to read .opus files and play them back. Writing/recording support is not present at this time. ASTERISK-26409 Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure148
1 files changed, 148 insertions, 0 deletions
diff --git a/configure b/configure
index 6f40dcc38..d37b7b434 100755
--- a/configure
+++ b/configure
@@ -974,6 +974,10 @@ PBX_OSPTK
OSPTK_DIR
OSPTK_INCLUDE
OSPTK_LIB
+PBX_OPUSFILE
+OPUSFILE_DIR
+OPUSFILE_INCLUDE
+OPUSFILE_LIB
PBX_OPUS
OPUS_DIR
OPUS_INCLUDE
@@ -1373,6 +1377,7 @@ with_newt
with_ogg
with_openr2
with_opus
+with_opusfile
with_osptk
with_oss
with_postgres
@@ -2129,6 +2134,7 @@ Optional Packages:
--with-ogg=PATH use OGG files in PATH
--with-openr2=PATH use MFR2 files in PATH
--with-opus=PATH use Opus files in PATH
+ --with-opusfile=PATH use Opusfile files in PATH
--with-osptk=PATH use OSP Toolkit files in PATH
--with-oss=PATH use Open Sound System files in PATH
--with-postgres=PATH use PostgreSQL files in PATH
@@ -10779,6 +10785,38 @@ fi
+ OPUSFILE_DESCRIP="Opusfile"
+ OPUSFILE_OPTION="opusfile"
+ PBX_OPUSFILE=0
+
+# Check whether --with-opusfile was given.
+if test "${with_opusfile+set}" = set; then :
+ withval=$with_opusfile;
+ case ${withval} in
+ n|no)
+ USE_OPUSFILE=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_OPUSFILE=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"
+ ;;
+ *)
+ OPUSFILE_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"
+ ;;
+ esac
+
+fi
+
+
+
+
+
+
+
+
OSPTK_DESCRIP="OSP Toolkit"
OSPTK_OPTION="osptk"
PBX_OSPTK=0
@@ -29106,6 +29144,116 @@ _ACEOF
fi
+# opusfile.h includes <opus_multistream.h> so we need to make sure that
+# either $OPUS_INCLUDE or /usr/include/opus is added to the search path.
+__opus_include=${OPUS_INCLUDE}
+if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then
+ __opus_include=-I/usr/include/opus
+fi
+
+if test "x${PBX_OPUSFILE}" != "x1" -a "${USE_OPUSFILE}" != "no"; then
+ pbxlibdir=""
+ # if --with-OPUSFILE=DIR has been specified, use it.
+ if test "x${OPUSFILE_DIR}" != "x"; then
+ if test -d ${OPUSFILE_DIR}/lib; then
+ pbxlibdir="-L${OPUSFILE_DIR}/lib"
+ else
+ pbxlibdir="-L${OPUSFILE_DIR}"
+ fi
+ fi
+ pbxfuncname="op_open_callbacks"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_OPUSFILE_FOUND=yes
+ else
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} $__opus_include"
+ as_ac_Lib=`$as_echo "ac_cv_lib_opusfile_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopusfile" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lopusfile... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopusfile ${pbxlibdir} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ AST_OPUSFILE_FOUND=yes
+else
+ AST_OPUSFILE_FOUND=no
+fi
+
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+ fi
+
+ # now check for the header.
+ if test "${AST_OPUSFILE_FOUND}" = "yes"; then
+ OPUSFILE_LIB="${pbxlibdir} -lopusfile "
+ # if --with-OPUSFILE=DIR has been specified, use it.
+ if test "x${OPUSFILE_DIR}" != "x"; then
+ OPUSFILE_INCLUDE="-I${OPUSFILE_DIR}/include"
+ fi
+ OPUSFILE_INCLUDE="${OPUSFILE_INCLUDE} $__opus_include"
+ if test "xopus/opusfile.h" = "x" ; then # no header, assume found
+ OPUSFILE_HEADER_FOUND="1"
+ else # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${OPUSFILE_INCLUDE}"
+ ac_fn_c_check_header_mongrel "$LINENO" "opus/opusfile.h" "ac_cv_header_opus_opusfile_h" "$ac_includes_default"
+if test "x$ac_cv_header_opus_opusfile_h" = xyes; then :
+ OPUSFILE_HEADER_FOUND=1
+else
+ OPUSFILE_HEADER_FOUND=0
+fi
+
+
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
+ fi
+ if test "x${OPUSFILE_HEADER_FOUND}" = "x0" ; then
+ OPUSFILE_LIB=""
+ OPUSFILE_INCLUDE=""
+ else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ OPUSFILE_LIB=""
+ fi
+ PBX_OPUSFILE=1
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPUSFILE 1
+_ACEOF
+
+ fi
+ fi
+fi
+
+
if test "${USE_PWLIB}" != "no"; then
if test -n "${PWLIB_DIR}"; then