]> git.sesse.net Git - vlc/blobdiff - configure.ac
mingw: link with static libgcc / libstdc++
[vlc] / configure.ac
index 8a60170264818c01c7229ac2b7fda70ca6108b26..e42127eb702f24a95aaf133a214433ece1d26b21 100644 (file)
@@ -214,6 +214,8 @@ case "${host_os}" in
     case "${host_os}" in
       *mingw32*)
         SYS=mingw32
+        CC="$CC -static-libgcc"
+        CXX="$CXX -static-libgcc -static-libstdc++"
         ;;
       *cygwin*)
         dnl Check if we are using the mno-cygwin mode in which case we are
@@ -589,6 +591,9 @@ AC_SEARCH_LIBS([getaddrinfo], [nsl], [
 LIBS="${LIBS} ${SOCKET_LIBS}"
 AC_LINK_IFELSE([
     AC_LANG_PROGRAM([#ifdef WIN32
+        # if _WIN32_WINNT < 0x600
+        #  error Needs vista+
+        # endif
         #include <ws2tcpip.h>
         #else
         #include <sys/socket.h>
@@ -3601,6 +3606,22 @@ AS_IF([test "$enable_kai" != "no"], [
 AC_SUBST(KAI_LIBS)
 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
 
+dnl
+dnl  chromaprint audio track fingerprinter
+dnl
+m4_pushdef([libchromaprint_version], 0.6.0)
+PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
+    VLC_ADD_PLUGIN([stream_out_chromaprint fingerprinter])
+    VLC_ADD_CFLAGS([stream_out_chromaprint],[${CHROMAPRINT_CFLAGS}] [-I./webservices -I../stream_out])
+    VLC_ADD_LIBS([stream_out_chromaprint],[${CHROMAPRINT_LIBS}])
+    VLC_ADD_LIBS([fingerprinter],[-lm]),
+    AS_IF([test "${enable_chromaprint}" = "yes"],
+        [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
+        [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
+         ),
+    [(Chromaprint based audio fingerprinter)],[auto])
+m4_popdef([libchromaprint_version])
+
 dnl
 dnl  Interface plugins
 dnl
@@ -3831,11 +3852,6 @@ dnl  goom visualization plugin
 dnl
 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
 
-dnl
-dnl  chromaprint audio track fingerprinter
-dnl
-PKG_ENABLE_MODULES_VLC([CHROMAPRINT], [stream_out_chromaprint], [libchromaprint >= 0.6.0], (Chromaprint based audio fingerprinter), [auto], [-I./webservices -I../stream_out])
-
 dnl
 dnl libprojectM visualization plugin
 dnl