]> git.sesse.net Git - x264/blobdiff - configure
configure: Simplify cygwin/mingw/msys code
[x264] / configure
index 84bbf9d2f9ab768b78dd9631da42c7780c5d4452..50d4f534ee085078ebb12e21539d21dfadbad833 100755 (executable)
--- a/configure
+++ b/configure
@@ -601,29 +601,18 @@ case $host_os in
         define HAVE_MALLOC_H
         libm="-lm"
         ;;
-    cygwin*)
+    cygwin*|mingw*|msys*)
         EXE=".exe"
-        if [ $compiler_style = GNU ] && cc_check "" -mno-cygwin; then
-            CFLAGS="$CFLAGS -mno-cygwin"
-            LDFLAGS="$LDFLAGS -mno-cygwin"
-        fi
-        if cpp_check "" "" "defined(__CYGWIN__)" ; then
-            define HAVE_MALLOC_H
+        if [[ $host_os = cygwin* ]] && cpp_check "" "" "defined(__CYGWIN__)" ; then
             SYS="CYGWIN"
+            define HAVE_MALLOC_H
         else
             SYS="WINDOWS"
             DEVNULL="NUL"
             LDFLAGSCLI="$LDFLAGSCLI -lshell32"
-            RC="${RC-${cross_prefix}windres}"
+            [ $compiler = GNU ] && RC="${RC-${cross_prefix}windres}" || RC="${RC-rc}"
         fi
         ;;
-    mingw*)
-        SYS="WINDOWS"
-        EXE=".exe"
-        DEVNULL="NUL"
-        LDFLAGSCLI="$LDFLAGSCLI -lshell32"
-        [ $compiler = GNU ] && RC="${RC-${cross_prefix}windres}" || RC="${RC-rc}"
-        ;;
     sunos*|solaris*)
         SYS="SunOS"
         define HAVE_MALLOC_H