summaryrefslogtreecommitdiffstats
path: root/src/sdl_mixer-2-fix-static-ogg-detection.patch
blob: c262c2767cb2dfa4d56bea6b9723b3ed30186c72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
This file is part of MXE. See LICENSE.md for licensing information.

This patch has been taken from: https://hg.libsdl.org/SDL_mixer/rev/0aadc9b6daac

Gabriel Jacobo 2012-09-20 16:01:32 PDT

When --disable-music-ogg-shared the OGG tests fail when they should pass.
Attached is a crude patch that gets them working (though the changes done to
configure.in, inside AC_CHECK_LIB, will produce ugly status string such as
"checking for ov_open_callbacks in -lvorbisidec -logg", which is mostly a
aesthetic concern)

Upstream bug: https://bugzilla.libsdl.org/show_bug.cgi?id=1604

--- a/configure
+++ b/configure
@@ -13339,7 +13339,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lvorbisidec  $LIBS"
+LIBS="-lvorbisidec -logg $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13570,7 +13570,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lvorbisfile  $LIBS"
+LIBS="-lvorbisfile -lvorbis -logg -lm $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF

--- a/configure.in
+++ b/configure.in
@@ -429,7 +429,7 @@
 if test x$enable_music_ogg = xyes; then
     if test x$enable_music_ogg_tremor = xyes; then
         AC_CHECK_HEADER([tremor/ivorbisfile.h], [have_tremor_hdr=yes])
-        AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes])
+        AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes], [-logg])
         if test x$have_tremor_hdr = xyes -a x$have_tremor_lib = xyes; then
             case "$host" in
                 *-*-darwin*)
@@ -465,7 +465,7 @@
         fi
     else
         AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes])
-        AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes])
+        AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes], [-lvorbis -logg -lm])
         if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
             case "$host" in
                 *-*-darwin*)