SDL_mixer: regenerated configure script. (e8846)

From e8846c32103f89dc571addf0dabbd09f8809a09f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 12 Jan 2022 02:37:56 +0300
Subject: [PATCH] regenerated configure script.

---
 configure | 755 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 715 insertions(+), 40 deletions(-)

diff --git a/configure b/configure
index 421ab33c..28c43ba8 100755
--- a/configure
+++ b/configure
@@ -770,6 +770,8 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+PC_LIBS
+PC_REQUIRES
 SDL_VERSION
 EXE
 EXTRA_LDFLAGS
@@ -781,6 +783,16 @@ PLAYWAVE_OBJECTS
 VERSION_OBJECTS
 OBJECTS
 ac_aux_dir
+MPG123_LIBS
+MPG123_CFLAGS
+FLAC_LIBS
+FLAC_CFLAGS
+VORBIS_LIBS
+VORBIS_CFLAGS
+TREMOR_LIBS
+TREMOR_CFLAGS
+FLUIDSYNTH_LIBS
+FLUIDSYNTH_CFLAGS
 MODPLUG_LIBS
 MODPLUG_CFLAGS
 LIBMIKMOD_CONFIG
@@ -928,7 +940,17 @@ PKG_CONFIG_LIBDIR
 SDL_CFLAGS
 SDL_LIBS
 MODPLUG_CFLAGS
-MODPLUG_LIBS'
+MODPLUG_LIBS
+FLUIDSYNTH_CFLAGS
+FLUIDSYNTH_LIBS
+TREMOR_CFLAGS
+TREMOR_LIBS
+VORBIS_CFLAGS
+VORBIS_LIBS
+FLAC_CFLAGS
+FLAC_LIBS
+MPG123_CFLAGS
+MPG123_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1607,6 +1629,21 @@ Some influential environment variables:
               C compiler flags for MODPLUG, overriding pkg-config
   MODPLUG_LIBS
               linker flags for MODPLUG, overriding pkg-config
+  FLUIDSYNTH_CFLAGS
+              C compiler flags for FLUIDSYNTH, overriding pkg-config
+  FLUIDSYNTH_LIBS
+              linker flags for FLUIDSYNTH, overriding pkg-config
+  TREMOR_CFLAGS
+              C compiler flags for TREMOR, overriding pkg-config
+  TREMOR_LIBS linker flags for TREMOR, overriding pkg-config
+  VORBIS_CFLAGS
+              C compiler flags for VORBIS, overriding pkg-config
+  VORBIS_LIBS linker flags for VORBIS, overriding pkg-config
+  FLAC_CFLAGS C compiler flags for FLAC, overriding pkg-config
+  FLAC_LIBS   linker flags for FLAC, overriding pkg-config
+  MPG123_CFLAGS
+              C compiler flags for MPG123, overriding pkg-config
+  MPG123_LIBS linker flags for MPG123, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -3911,13 +3948,13 @@ if ${lt_cv_nm_interface+:} false; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:3914: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:3951: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3917: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:3954: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3920: output\"" >&5)
+  (eval echo "\"\$as_me:3957: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5128,7 +5165,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5131 "configure"' > conftest.$ac_ext
+  echo '#line 5168 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6958,11 +6995,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6961: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6998: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6965: \$? = $ac_status" >&5
+   echo "$as_me:7002: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7297,11 +7334,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7300: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7337: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7304: \$? = $ac_status" >&5
+   echo "$as_me:7341: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7402,11 +7439,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7405: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7442: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7409: \$? = $ac_status" >&5
+   echo "$as_me:7446: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7457,11 +7494,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7460: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7497: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7464: \$? = $ac_status" >&5
+   echo "$as_me:7501: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9827,7 +9864,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9830 "configure"
+#line 9867 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9923,7 +9960,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9926 "configure"
+#line 9963 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11777,6 +11814,7 @@ fi
             EXTRA_CFLAGS="$EXTRA_CFLAGS -DMOD_DYNAMIC=\\\"$mikmod_lib\\\""
         else
             EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$LIBMIKMOD_CONFIG --libs`"
+            PC_LIBS="$PC_LIBS `$LIBMIKMOD_CONFIG --libs`"
         fi
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find MikMod library (http://mikmod.raphnet.net/)" >&5
@@ -11957,6 +11995,7 @@ else
 $as_echo "yes" >&6; }
 	            have_libmodplug_hdr=yes
             have_libmodplug_lib=yes
+            have_libmodplug_pc=yes
 
 fi
 
@@ -11965,6 +12004,11 @@ fi
         SOURCES="$SOURCES $srcdir/music_modplug.c"
         EXTRA_CFLAGS="$EXTRA_CFLAGS -DMODPLUG_MUSIC $MODPLUG_CFLAGS"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MODPLUG_LIBS"
+        if test x$have_libmodplug_pc = xyes; then
+            PC_REQUIRES="$PC_REQUIRES libmodplug"
+        else
+            PC_LIBS="$PC_LIBS $MODPLUG_LIBS"
+        fi
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find ModPlug library (http://modplug-xmms.sourceforge.net/)" >&5
 $as_echo "$as_me: WARNING: *** Unable to find ModPlug library (http://modplug-xmms.sourceforge.net/)" >&2;}
@@ -12012,14 +12056,17 @@ fi
             *-*-cygwin* | *-*-mingw*)
                 use_music_native_midi=yes
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm"
+                PC_LIBS="$PC_LIBS -lwinmm"
                 ;;
             *-*-darwin*)
                 use_music_native_midi=yes
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
+                PC_LIBS="$PC_LIBS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
                 ;;
             *-*-haiku*)
                 use_music_native_midi=yes_cpp
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmidi"
+                PC_LIBS="$PC_LIBS -lmidi"
                 ;;
         esac
         if test x$use_music_native_midi = xyes; then
@@ -12046,13 +12093,122 @@ else
 fi
 
     if test x$enable_music_fluidsynth_midi = xyes; then
-        ac_fn_c_check_header_mongrel "$LINENO" "fluidsynth.h" "ac_cv_header_fluidsynth_h" "$ac_includes_default"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fluidsynth" >&5
+$as_echo_n "checking for fluidsynth... " >&6; }
+
+if test -n "$FLUIDSYNTH_CFLAGS"; then
+    pkg_cv_FLUIDSYNTH_CFLAGS="$FLUIDSYNTH_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fluidsynth\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "fluidsynth") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FLUIDSYNTH_CFLAGS=`$PKG_CONFIG --cflags "fluidsynth" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$FLUIDSYNTH_LIBS"; then
+    pkg_cv_FLUIDSYNTH_LIBS="$FLUIDSYNTH_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fluidsynth\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "fluidsynth") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FLUIDSYNTH_LIBS=`$PKG_CONFIG --libs "fluidsynth" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        FLUIDSYNTH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fluidsynth" 2>&1`
+        else
+	        FLUIDSYNTH_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fluidsynth" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$FLUIDSYNTH_PKG_ERRORS" >&5
+
+	                ac_fn_c_check_header_mongrel "$LINENO" "fluidsynth.h" "ac_cv_header_fluidsynth_h" "$ac_includes_default"
+if test "x$ac_cv_header_fluidsynth_h" = xyes; then :
+  have_fluidsynth_hdr=yes
+fi
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fluid_player_add_mem in -lfluidsynth" >&5
+$as_echo_n "checking for fluid_player_add_mem in -lfluidsynth... " >&6; }
+if ${ac_cv_lib_fluidsynth_fluid_player_add_mem+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfluidsynth  $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 fluid_player_add_mem ();
+int
+main ()
+{
+return fluid_player_add_mem ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_fluidsynth_fluid_player_add_mem=yes
+else
+  ac_cv_lib_fluidsynth_fluid_player_add_mem=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fluidsynth_fluid_player_add_mem" >&5
+$as_echo "$ac_cv_lib_fluidsynth_fluid_player_add_mem" >&6; }
+if test "x$ac_cv_lib_fluidsynth_fluid_player_add_mem" = xyes; then :
+  have_fluidsynth_lib=yes;FLUIDSYNTH_LIBS="-lfluidsynth"
+fi
+
+
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	                ac_fn_c_check_header_mongrel "$LINENO" "fluidsynth.h" "ac_cv_header_fluidsynth_h" "$ac_includes_default"
 if test "x$ac_cv_header_fluidsynth_h" = xyes; then :
   have_fluidsynth_hdr=yes
 fi
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fluid_player_add_mem in -lfluidsynth" >&5
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fluid_player_add_mem in -lfluidsynth" >&5
 $as_echo_n "checking for fluid_player_add_mem in -lfluidsynth... " >&6; }
 if ${ac_cv_lib_fluidsynth_fluid_player_add_mem+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -12089,9 +12245,20 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fluidsynth_fluid_player_add_mem" >&5
 $as_echo "$ac_cv_lib_fluidsynth_fluid_player_add_mem" >&6; }
 if test "x$ac_cv_lib_fluidsynth_fluid_player_add_mem" = xyes; then :
-  have_fluidsynth_lib=yes
+  have_fluidsynth_lib=yes;FLUIDSYNTH_LIBS="-lfluidsynth"
 fi
 
+
+else
+	FLUIDSYNTH_CFLAGS=$pkg_cv_FLUIDSYNTH_CFLAGS
+	FLUIDSYNTH_LIBS=$pkg_cv_FLUIDSYNTH_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	                have_fluidsynth_hdr=yes
+                have_fluidsynth_lib=yes
+                have_fluidsynth_pc=yes
+
+fi
         if test x$have_fluidsynth_hdr = xyes -a x$have_fluidsynth_lib = xyes; then
             case "$host" in
                 *-*-darwin*)
@@ -12111,12 +12278,17 @@ fi
                     ;;
             esac
             SOURCES="$SOURCES $srcdir/dynamic_fluidsynth.c $srcdir/music_fluidsynth.c"
-            EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_FLUIDSYNTH_MIDI"
+            EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_FLUIDSYNTH_MIDI $FLUIDSYNTH_CFLAGS"
             if test x$enable_music_fluidsynth_shared = xyes && test x$fluidsynth_lib != x; then
                 echo "-- dynamic libfluidsyth -> $fluidsynth_lib"
                 EXTRA_CFLAGS="$EXTRA_CFLAGS -DFLUIDSYNTH_DYNAMIC=\\\"$fluidsynth_lib\\\""
             else
-                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lfluidsynth"
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FLUIDSYNTH_LIBS"
+                if test x$have_fluidsynth_pc = xyes; then
+                    PC_REQUIRES="$PC_REQUIRES fluidsynth"
+                else
+                    PC_LIBS="$PC_LIBS $FLUIDSYNTH_LIBS"
+                fi
             fi
         else
             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find FluidSynth library (http://www.fluidsynth.org/)" >&5
@@ -12151,13 +12323,122 @@ fi
 if test x$enable_music_ogg = xyes; then
     LIBS_SAVED="$LIBS"
     if test x$enable_music_ogg_tremor = xyes; then
-        ac_fn_c_check_header_mongrel "$LINENO" "tremor/ivorbisfile.h" "ac_cv_header_tremor_ivorbisfile_h" "$ac_includes_default"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbisidec" >&5
+$as_echo_n "checking for vorbisidec... " >&6; }
+
+if test -n "$TREMOR_CFLAGS"; then
+    pkg_cv_TREMOR_CFLAGS="$TREMOR_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisidec\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vorbisidec") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_TREMOR_CFLAGS=`$PKG_CONFIG --cflags "vorbisidec" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$TREMOR_LIBS"; then
+    pkg_cv_TREMOR_LIBS="$TREMOR_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisidec\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vorbisidec") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_TREMOR_LIBS=`$PKG_CONFIG --libs "vorbisidec" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        TREMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "vorbisidec" 2>&1`
+        else
+	        TREMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "vorbisidec" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TREMOR_PKG_ERRORS" >&5
+
+	                ac_fn_c_check_header_mongrel "$LINENO" "tremor/ivorbisfile.h" "ac_cv_header_tremor_ivorbisfile_h" "$ac_includes_default"
+if test "x$ac_cv_header_tremor_ivorbisfile_h" = xyes; then :
+  have_tremor_hdr=yes
+fi
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisidec" >&5
+$as_echo_n "checking for ov_open_callbacks in -lvorbisidec... " >&6; }
+if ${ac_cv_lib_vorbisidec_ov_open_callbacks+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lvorbisidec -logg $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 ov_open_callbacks ();
+int
+main ()
+{
+return ov_open_callbacks ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_vorbisidec_ov_open_callbacks=yes
+else
+  ac_cv_lib_vorbisidec_ov_open_callbacks=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisidec_ov_open_callbacks" >&5
+$as_echo "$ac_cv_lib_vorbisidec_ov_open_callbacks" >&6; }
+if test "x$ac_cv_lib_vorbisidec_ov_open_callbacks" = xyes; then :
+  have_tremor_lib=yes;TREMOR_LIBS="-lvorbisidec -logg"
+fi
+
+
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	                ac_fn_c_check_header_mongrel "$LINENO" "tremor/ivorbisfile.h" "ac_cv_header_tremor_ivorbisfile_h" "$ac_includes_default"
 if test "x$ac_cv_header_tremor_ivorbisfile_h" = xyes; then :
   have_tremor_hdr=yes
 fi
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisidec" >&5
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisidec" >&5
 $as_echo_n "checking for ov_open_callbacks in -lvorbisidec... " >&6; }
 if ${ac_cv_lib_vorbisidec_ov_open_callbacks+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -12194,9 +12475,20 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisidec_ov_open_callbacks" >&5
 $as_echo "$ac_cv_lib_vorbisidec_ov_open_callbacks" >&6; }
 if test "x$ac_cv_lib_vorbisidec_ov_open_callbacks" = xyes; then :
-  have_tremor_lib=yes
+  have_tremor_lib=yes;TREMOR_LIBS="-lvorbisidec -logg"
 fi
 
+
+else
+	TREMOR_CFLAGS=$pkg_cv_TREMOR_CFLAGS
+	TREMOR_LIBS=$pkg_cv_TREMOR_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	                have_tremor_hdr=yes
+                have_tremor_lib=yes
+                have_tremor_pc=yes
+
+fi
         if test x$have_tremor_hdr = xyes -a x$have_tremor_lib = xyes; then
             case "$host" in
                 *-*-darwin*)
@@ -12216,12 +12508,17 @@ fi
                     ;;
             esac
             SOURCES="$SOURCES $srcdir/*_ogg.c"
-            EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR"
+            EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR $TREMOR_CFLAGS"
             if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
                 echo "-- dynamic libvorbisidec -> $ogg_lib"
                 EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
             else
-                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $TREMOR_LIBS"
+                if test x$have_tremor_pc = xyes; then
+                    PC_REQUIRES="$PC_REQUIRES vorbisidec"
+                else
+                    PC_LIBS="$PC_LIBS $TREMOR_LIBS"
+                fi
             fi
         else
             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&5
@@ -12230,13 +12527,122 @@ $as_echo "$as_me: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://
 $as_echo "$as_me: WARNING: Ogg Vorbis support disabled" >&2;}
         fi
     else
-        ac_fn_c_check_header_mongrel "$LINENO" "vorbis/vorbisfile.h" "ac_cv_header_vorbis_vorbisfile_h" "$ac_includes_default"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbisfile" >&5
+$as_echo_n "checking for vorbisfile... " >&6; }
+
+if test -n "$VORBIS_CFLAGS"; then
+    pkg_cv_VORBIS_CFLAGS="$VORBIS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisfile\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vorbisfile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_VORBIS_CFLAGS=`$PKG_CONFIG --cflags "vorbisfile" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$VORBIS_LIBS"; then
+    pkg_cv_VORBIS_LIBS="$VORBIS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisfile\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vorbisfile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_VORBIS_LIBS=`$PKG_CONFIG --libs "vorbisfile" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        VORBIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "vorbisfile" 2>&1`
+        else
+	        VORBIS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "vorbisfile" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$VORBIS_PKG_ERRORS" >&5
+
+	                ac_fn_c_check_header_mongrel "$LINENO" "vorbis/vorbisfile.h" "ac_cv_header_vorbis_vorbisfile_h" "$ac_includes_default"
+if test "x$ac_cv_header_vorbis_vorbisfile_h" = xyes; then :
+  have_ogg_hdr=yes
+fi
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisfile" >&5
+$as_echo_n "checking for ov_open_callbacks in -lvorbisfile... " >&6; }
+if ${ac_cv_lib_vorbisfile_ov_open_callbacks+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lvorbisfile -lvorbis -logg -lm $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 ov_open_callbacks ();
+int
+main ()
+{
+return ov_open_callbacks ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_vorbisfile_ov_open_callbacks=yes
+else
+  ac_cv_lib_vorbisfile_ov_open_callbacks=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisfile_ov_open_callbacks" >&5
+$as_echo "$ac_cv_lib_vorbisfile_ov_open_callbacks" >&6; }
+if test "x$ac_cv_lib_vorbisfile_ov_open_callbacks" = xyes; then :
+  have_ogg_lib=yes;VORBIS_LIBS="-lvorbisfile -lvorbis -logg -lm"
+fi
+
+
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	                ac_fn_c_check_header_mongrel "$LINENO" "vorbis/vorbisfile.h" "ac_cv_header_vorbis_vorbisfile_h" "$ac_includes_default"
 if test "x$ac_cv_header_vorbis_vorbisfile_h" = xyes; then :
   have_ogg_hdr=yes
 fi
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisfile" >&5
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_open_callbacks in -lvorbisfile" >&5
 $as_echo_n "checking for ov_open_callbacks in -lvorbisfile... " >&6; }
 if ${ac_cv_lib_vorbisfile_ov_open_callbacks+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -12273,9 +12679,20 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisfile_ov_open_callbacks" >&5
 $as_echo "$ac_cv_lib_vorbisfile_ov_open_callbacks" >&6; }
 if test "x$ac_cv_lib_vorbisfile_ov_open_callbacks" = xyes; then :
-  have_ogg_lib=yes
+  have_ogg_lib=yes;VORBIS_LIBS="-lvorbisfile -lvorbis -logg -lm"
 fi
 
+
+else
+	VORBIS_CFLAGS=$pkg_cv_VORBIS_CFLAGS
+	VORBIS_LIBS=$pkg_cv_VORBIS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	                have_ogg_hdr=yes
+                have_ogg_lib=yes
+                have_ogg_pc=yes
+
+fi
         if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
             case "$host" in
                 *-*-darwin*)
@@ -12292,12 +12709,17 @@ fi
                     ;;
             esac
             SOURCES="$SOURCES $srcdir/*_ogg.c"
-            EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC"
+            EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC $VORBIS_CFLAGS"
             if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
                 echo "-- dynamic libvorbisfile -> $ogg_lib"
                 EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
             else
-                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg -lm"
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $VORBIS_LIBS"
+                if test x$have_ogg_pc = xyes; then
+                    PC_REQUIRES="$PC_REQUIRES vorbisfile"
+                else
+                    PC_LIBS="$PC_LIBS $VORBIS_LIBS"
+                fi
             fi
         else
             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find Ogg Vorbis library (http://www.xiph.org/)" >&5
@@ -12367,13 +12789,122 @@ $as_echo "$have_flac_ver" >&6; }
     fi
 
     if test x$have_flac_ver = xyes; then
-        ac_fn_c_check_header_mongrel "$LINENO" "FLAC/stream_decoder.h" "ac_cv_header_FLAC_stream_decoder_h" "$ac_includes_default"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flac" >&5
+$as_echo_n "checking for flac... " >&6; }
+
+if test -n "$FLAC_CFLAGS"; then
+    pkg_cv_FLAC_CFLAGS="$FLAC_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "flac") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FLAC_CFLAGS=`$PKG_CONFIG --cflags "flac" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$FLAC_LIBS"; then
+    pkg_cv_FLAC_LIBS="$FLAC_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "flac") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FLAC_LIBS=`$PKG_CONFIG --libs "flac" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flac" 2>&1`
+        else
+	        FLAC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flac" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$FLAC_PKG_ERRORS" >&5
+
+	                ac_fn_c_check_header_mongrel "$LINENO" "FLAC/stream_decoder.h" "ac_cv_header_FLAC_stream_decoder_h" "$ac_includes_default"
+if test "x$ac_cv_header_FLAC_stream_decoder_h" = xyes; then :
+  have_flac_hdr=yes
+fi
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLAC__stream_decoder_new in -lFLAC" >&5
+$as_echo_n "checking for FLAC__stream_decoder_new in -lFLAC... " >&6; }
+if ${ac_cv_lib_FLAC_FLAC__stream_decoder_new+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lFLAC  $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 FLAC__stream_decoder_new ();
+int
+main ()
+{
+return FLAC__stream_decoder_new ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_FLAC_FLAC__stream_decoder_new=yes
+else
+  ac_cv_lib_FLAC_FLAC__stream_decoder_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_FLAC_FLAC__stream_decoder_new" >&5
+$as_echo "$ac_cv_lib_FLAC_FLAC__stream_decoder_new" >&6; }
+if test "x$ac_cv_lib_FLAC_FLAC__stream_decoder_new" = xyes; then :
+  have_flac_lib=yes;FLAC_LIBS="-lFLAC"
+fi
+
+
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	                ac_fn_c_check_header_mongrel "$LINENO" "FLAC/stream_decoder.h" "ac_cv_header_FLAC_stream_decoder_h" "$ac_includes_default"
 if test "x$ac_cv_header_FLAC_stream_decoder_h" = xyes; then :
   have_flac_hdr=yes
 fi
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLAC__stream_decoder_new in -lFLAC" >&5
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLAC__stream_decoder_new in -lFLAC" >&5
 $as_echo_n "checking for FLAC__stream_decoder_new in -lFLAC... " >&6; }
 if ${ac_cv_lib_FLAC_FLAC__stream_decoder_new+:} false; then :
   $as

(Patch may be truncated, please check the link at the top of this post.)