From dc4118b88363ec947c86158f09ec75f5d6a6cf1c Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sat, 28 Feb 2004 17:28:05 +0000 Subject: [PATCH] Configuration fixes for OS/2 specific "Innotek gcc" port. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure.in | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 10ab9c740e..4e99f4cb35 100644 --- a/configure.in +++ b/configure.in @@ -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) ;; -- 2.45.2