summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/libflac/m4/ogg.m4
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-12-06 17:05:32 +1100
committer Vas Crabb <vas@vastheman.com>2023-12-06 17:12:45 +1100
commitfaf991a563a9bf8adc7aeee80001606d58857b99 (patch)
tree5eb75ca6182e9816f4ac501c124712cd8e5ee353 /3rdparty/libflac/m4/ogg.m4
parent2cf244ef3b53129d711aa5b663fb38e9133726c0 (diff)
3rdparty/libflac: Updated to version 1.4.3.
Also removed FLAC documentation - it's a lot of bloat.
Diffstat (limited to '3rdparty/libflac/m4/ogg.m4')
-rw-r--r--3rdparty/libflac/m4/ogg.m444
1 files changed, 28 insertions, 16 deletions
diff --git a/3rdparty/libflac/m4/ogg.m4 b/3rdparty/libflac/m4/ogg.m4
index 0e1f1abf591..3b1a28a6e5c 100644
--- a/3rdparty/libflac/m4/ogg.m4
+++ b/3rdparty/libflac/m4/ogg.m4
@@ -9,23 +9,29 @@ AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
-AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
-AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
-AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
-AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
+AC_ARG_WITH(ogg,AS_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
+AC_ARG_WITH(ogg-libraries,AS_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
+AC_ARG_WITH(ogg-includes,AS_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
+AC_ARG_ENABLE(oggtest,AS_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
if test "x$ogg_libraries" != "x" ; then
OGG_LIBS="-L$ogg_libraries"
+ elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
+ OGG_LIBS=""
elif test "x$ogg_prefix" != "x" ; then
OGG_LIBS="-L$ogg_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
OGG_LIBS="-L$prefix/lib"
fi
- OGG_LIBS="$OGG_LIBS -logg"
+ if test "x$ogg_prefix" != "xno" ; then
+ OGG_LIBS="$OGG_LIBS -logg"
+ fi
if test "x$ogg_includes" != "x" ; then
OGG_CFLAGS="-I$ogg_includes"
+ elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
+ OGG_CFLAGS=""
elif test "x$ogg_prefix" != "x" ; then
OGG_CFLAGS="-I$ogg_prefix/include"
elif test "x$prefix" != "xNONE"; then
@@ -33,7 +39,12 @@ AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run
fi
AC_MSG_CHECKING(for Ogg)
- no_ogg=""
+ if test "x$ogg_prefix" = "xno" ; then
+ no_ogg="disabled"
+ enable_oggtest="no"
+ else
+ no_ogg=""
+ fi
if test "x$enable_oggtest" = "xyes" ; then
@@ -45,7 +56,7 @@ dnl
dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -57,14 +68,17 @@ int main ()
return 0;
}
-],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])],[],[no_ogg=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
- if test "x$no_ogg" = "x" ; then
+ if test "x$no_ogg" = "xdisabled" ; then
+ AC_MSG_RESULT(no)
+ ifelse([$2], , :, [$2])
+ elif test "x$no_ogg" = "x" ; then
AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
+ ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.oggtest ; then
@@ -73,11 +87,10 @@ int main ()
echo "*** Could not run Ogg test program, checking why..."
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <ogg/ogg.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
+]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
@@ -85,9 +98,8 @@ int main ()
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occurred. This usually means Ogg was incorrectly installed"
echo "*** or that you have moved Ogg since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"