[vlc-commits] configure: actually test needed libraries for gme (fixes #18902)
Rémi Denis-Courmont
git at videolan.org
Sun Oct 8 21:36:39 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 8 22:30:19 2017 +0300| [7c04db8c27362e31d348bd2efb099ea274c5dae3] | 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=7c04db8c27362e31d348bd2efb099ea274c5dae3
---
configure.ac | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5bb82741a6..4a1f846bb8 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_PLUGIN([gme])
+ VLC_ADD_LIBS([gme], [-lgme])
+
+ AC_CHECK_LIB([gme], [gme_identify_header], [
+ VLC_ADD_PLUGIN([gme])
+ ], [
+ AC_CHECK_LIB([gme], [gme_identify_extension], [
+ VLC_ADD_LIBS([gme], [-lstdc++ $LIBM])
+ VLC_ADD_PLUGIN([gme])
+ ],, [-lstdc++ $LIBM])
+ ])
], [
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