[vlc-devel] [PATCH] configure: don't force mingw hacks if that's not the compiler used

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:28 CET 2016


From: Steve Lhomme <robUx4 at gmail.com>

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

diff --git a/configure.ac b/configure.ac
index 1e56be5..34b0080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,6 +483,12 @@ dnl Check for broken versions of mingw-runtime compatability library
         AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher, or mingw-w64 version 3.0 or higher!])
     ])
 
+    AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+#if !defined(__MINGW32__)
+# error Not compiling with mingw
+#endif
+    ])], [
+        AC_MSG_RESULT([ok])
     dnl force use of mingw provided c99 *printf over msvcrt
     CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
 
@@ -513,6 +519,9 @@ dnl Check for broken versions of mingw-runtime compatability library
             [AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
         "${ac_cv_c_fnative_struct}" = "no" && VLC_RESTORE_FLAGS
     fi
+    ], [
+        AC_MSG_RESULT([Not compiling with mingw])
+    ])
 ])
 
 AC_ARG_ENABLE(winstore_app,
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list