OSDN Git Service

mms-bitfield detection fix. bcc and vc not need this option
authorKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sun, 16 May 2004 22:10:05 +0000 (22:10 +0000)
committerKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sun, 16 May 2004 22:10:05 +0000 (22:10 +0000)
Modified Files:
   configure configure.in

configure
configure.in

index 9767520..62b24bb 100755 (executable)
--- a/configure
+++ b/configure
@@ -9092,40 +9092,79 @@ _ACEOF
 
 fi
 
-if test "x$CYGNUS" = xyes ||test "x$MINGW" = xyes; then
-       msnative_struct=''
+
+case "x${CC} ${CFLAGS}" in
+*-mno-cygwin*)
+               msnative_struct=''
            echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5
 echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6
-    if test -z "$ac_cv_prog_CC"; then
-      our_gcc="$CC"
-    else
-      our_gcc="$ac_cv_prog_CC"
-    fi
-    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
-      2.)
-       if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
-         msnative_struct='-fnative-struct'
-       fi
-       ;;
-      *)
-       if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
-         msnative_struct='-mms-bitfields'
-       fi
+           if test -z "$ac_cv_prog_CC"; then
+                       our_gcc="$CC"
+               else
+                       our_gcc="$ac_cv_prog_CC"
+               fi
+               case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+                       2.)
+               if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+                       msnative_struct='-fnative-struct'
+               fi
+               ;;
+                       *)
+               if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+                       msnative_struct='-mms-bitfields'
+               fi
+               ;;
+               esac
+               if test x"$msnative_struct" = x ; then
+                       echo "$as_me:$LINENO: result: no way" >&5
+echo "${ECHO_T}no way" >&6
+                       { echo "$as_me:$LINENO: WARNING: produced binary will be incompatible with windows' GUI " >&5
+echo "$as_me: WARNING: produced binary will be incompatible with windows' GUI " >&2;}
+               else
+                       CFLAGS="$CFLAGS $msnative_struct"
+                       CPPFLAGS="$CPPFLAGS $msnative_struct"
+                       echo "$as_me:$LINENO: result: ${msnative_struct}" >&5
+echo "${ECHO_T}${msnative_struct}" >&6
+               fi
        ;;
-    esac
-    if test x"$msnative_struct" = x ; then
-      echo "$as_me:$LINENO: result: no way" >&5
+"xgcc "*)
+       if test "x$MINGW" = xyes; then
+               msnative_struct=''
+           echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5
+echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6
+           if test -z "$ac_cv_prog_CC"; then
+                       our_gcc="$CC"
+               else
+                       our_gcc="$ac_cv_prog_CC"
+               fi
+               case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+                       2.)
+               if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+                       msnative_struct='-fnative-struct'
+               fi
+               ;;
+                       *)
+               if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+                       msnative_struct='-mms-bitfields'
+               fi
+               ;;
+               esac
+               if test x"$msnative_struct" = x ; then
+                       echo "$as_me:$LINENO: result: no way" >&5
 echo "${ECHO_T}no way" >&6
-      { echo "$as_me:$LINENO: WARNING: produced binary will be incompatible with windows' GUI " >&5
+                       { echo "$as_me:$LINENO: WARNING: produced binary will be incompatible with windows' GUI " >&5
 echo "$as_me: WARNING: produced binary will be incompatible with windows' GUI " >&2;}
-    else
-      CFLAGS="$CFLAGS $msnative_struct"
-      CPPFLAGS="$CPPFLAGS $msnative_struct"
-      echo "$as_me:$LINENO: result: ${msnative_struct}" >&5
+               else
+                       CFLAGS="$CFLAGS $msnative_struct"
+                       CPPFLAGS="$CPPFLAGS $msnative_struct"
+                       echo "$as_me:$LINENO: result: ${msnative_struct}" >&5
 echo "${ECHO_T}${msnative_struct}" >&6
-    fi
-fi
-
+               fi
+       fi
+       ;;
+*)
+       ;;
+esac
 
 if test "x$CYGNUS" = xyes || test "x$MINGW" = xyes; then
   echo "$as_me:$LINENO: checking Cygwin new mmsystem" >&5
index 9170dd8..4cf99fc 100644 (file)
@@ -429,36 +429,71 @@ if test $timidity_cv_type_union_semun = yes; then
 fi
 
 dnl Cygnus and Mingw memory struct optiontest
-if test "x$CYGNUS" = xyes ||test "x$MINGW" = xyes; then
-       msnative_struct=''
+
+case "x${CC} ${CFLAGS}" in
+*-mno-cygwin*) 
+               msnative_struct=''
            AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
-    if test -z "$ac_cv_prog_CC"; then
-      our_gcc="$CC"
-    else
-      our_gcc="$ac_cv_prog_CC"
-    fi
-    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
-      2.)
-       if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
-         msnative_struct='-fnative-struct'
-       fi
+           if test -z "$ac_cv_prog_CC"; then
+                       our_gcc="$CC"
+               else
+                       our_gcc="$ac_cv_prog_CC"
+               fi
+               case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+                       2.)
+               if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+                       msnative_struct='-fnative-struct'
+               fi
+               ;;
+                       *)
+               if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+                       msnative_struct='-mms-bitfields'
+               fi
+               ;;
+               esac
+               if test x"$msnative_struct" = x ; then
+                       AC_MSG_RESULT([no way])
+                       AC_MSG_WARN([produced binary will be incompatible with windows' GUI ])
+               else
+                       CFLAGS="$CFLAGS $msnative_struct"
+                       CPPFLAGS="$CPPFLAGS $msnative_struct"
+                       AC_MSG_RESULT([${msnative_struct}])
+               fi
        ;;
-      *)
-       if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
-         msnative_struct='-mms-bitfields'
+"xgcc "*) 
+       if test "x$MINGW" = xyes; then
+               msnative_struct=''
+           AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
+           if test -z "$ac_cv_prog_CC"; then
+                       our_gcc="$CC"
+               else
+                       our_gcc="$ac_cv_prog_CC"
+               fi
+               case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+                       2.)
+               if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+                       msnative_struct='-fnative-struct'
+               fi
+               ;;
+                       *)
+               if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+                       msnative_struct='-mms-bitfields'
+               fi
+               ;;
+               esac
+               if test x"$msnative_struct" = x ; then
+                       AC_MSG_RESULT([no way])
+                       AC_MSG_WARN([produced binary will be incompatible with windows' GUI ])
+               else
+                       CFLAGS="$CFLAGS $msnative_struct"
+                       CPPFLAGS="$CPPFLAGS $msnative_struct"
+                       AC_MSG_RESULT([${msnative_struct}])
+               fi
        fi
        ;;
-    esac
-    if test x"$msnative_struct" = x ; then
-      AC_MSG_RESULT([no way])
-      AC_MSG_WARN([produced binary will be incompatible with windows' GUI ])
-    else
-      CFLAGS="$CFLAGS $msnative_struct"
-      CPPFLAGS="$CPPFLAGS $msnative_struct"
-      AC_MSG_RESULT([${msnative_struct}])
-    fi
-fi
-
+*) 
+       ;;
+esac
 
 dnl Cygnus Mingw32 mmsystem check
 if test "x$CYGNUS" = xyes || test "x$MINGW" = xyes; then