]> git.saurik.com Git - wxWidgets.git/commitdiff
Configuration fixes for OS/2 specific "Innotek gcc" port.
authorStefan Neis <Stefan.Neis@t-online.de>
Sat, 28 Feb 2004 17:28:05 +0000 (17:28 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sat, 28 Feb 2004 17:28:05 +0000 (17:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in

index 10ab9c740ea1986a8e7da6f99b677aabf567f0a2..4e99f4cb35b17fa55951b4f9a3018145a9c243df 100644 (file)
@@ -295,7 +295,7 @@ case "${host}" in
     DEFAULT_DEFAULT_wxUSE_PM=1
     dnl "c++" wrapper is not always available, so always use plain gcc.
     CXX=gcc
-    LDFLAGS="$LDFLAGS -Zcrtdll -Zsysv-signals"
+    LDFLAGS="$LDFLAGS -Zcrtdll"
     dnl
     dnl Some special code that's automatically added by autoconf-2.57 for OS/2
     dnl and hopefully also by autoconf-2.58 and newer on all other platforms.
@@ -1499,7 +1499,7 @@ case "${host}" in
           dnl Include resources for the "native" port (wxPM).
           RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
       fi
-      AC_CACHE_CHECK([for gcc 3 or later], wx_cv_gcc3,[
+      AC_CACHE_CHECK([for gcc version], wx_cv_gccversion,[
           AC_TRY_COMPILE([],
               [
                   #if (__GNUC__ < 3)
@@ -1507,17 +1507,35 @@ case "${host}" in
                   #endif
               ],
               [
-                  wx_cv_gcc3=yes
+                  AC_TRY_COMPILE([],
+                      [
+                          #if (__GNUC__==3) && ((__GNUC_MINOR__ < 2) || ((__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<2)))
+                              #error intermediate gcc
+                          #endif
+                      ],
+                      [
+                         wx_cv_gccversion=Innotek
+                      ],
+                      [
+                         wx_cv_gccversion=3
+                      ]
+                  )
               ],
               [
-                  wx_cv_gcc3=no
+                  wx_cv_gccversion=2
               ]
           )
       ])
-      if test "$wx_cv_gcc3" = "no"; then
+      if test "$wx_cv_gccversion" = "2"; then
           LIBS="$LIBS -lstdcpp"
+          LDFLAGS="$LDFLAGS -Zsysv-signals"
       else
-          LIBS="$LIBS -lstdcxx"
+          if test "$wx_cv_gccversion" = "3"; then
+              LIBS="$LIBS -lstdcxx"
+              LDFLAGS="$LDFLAGS -Zsysv-signals"
+          else
+              LIBS="$LIBS -lstdc++"
+          fi
       fi
       dnl (end of OS/2-only piece)
   ;;