[vlc-commits] configure: actually test needed libraries for gme (fixes #18902)

Rémi Denis-Courmont git at videolan.org
Sun Oct 8 21:35:38 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct  8 22:30:19 2017 +0300| [f985d718f082e5ecaf55187c5d203dfcd37783c5] | committer: Rémi Denis-Courmont

configure: actually test needed libraries for gme (fixes #18902)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f985d718f082e5ecaf55187c5d203dfcd37783c5
---

 configure.ac | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5bb82741a6..1e663aa7c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2046,12 +2046,16 @@ AC_ARG_ENABLE(gme,
     [use Game Music Emu (default auto)])])
 AS_IF([test "${enable_gme}" != "no"], [
   AC_CHECK_HEADER([gme/gme.h], [
-    if test "${SYS}" = "mingw32"; then
-        VLC_ADD_LIBS([gme], [-lgme -lstdc++])
-    else
-        VLC_ADD_LIBS([gme], [-lgme])
-    fi
+    VLC_ADD_LIBS([gme], [-lgme])
     VLC_ADD_PLUGIN([gme])
+
+    AC_CHECK_LIB([gme], [gme_identify_header], [
+      VLC_ADD_LIBS([gme], [-lstdc++])
+    ], [
+      AC_CHECK_LIB([gme], [gme_identify_extension], [
+        VLC_ADD_LIBS([gme], [-lstdc++ -lm])
+      ],, [-lstdc++ -lm])
+    ], [-stdc++])
   ], [
     AS_IF([test "x${enable_gme}" != "x"], [
       AC_MSG_ERROR([GME cannot be found. Please install the development files.])



More information about the vlc-commits mailing list