From 6ba87b0697f26b60c9d7bc6520c1fe5cfb4a3c96 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sun, 7 May 2006 14:43:41 +0000 Subject: [PATCH] Need to do tests for compiler version (to determine C++ libs needed to successfully link C++ core) in C mode on OS/2. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 14 +++++++++++++- configure.in | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 75a8f7c5c4..ea9d951b23 100755 --- a/configure +++ b/configure @@ -15139,7 +15139,13 @@ esac case "${host}" in *-pc-os2_emx | *-pc-os2-emx ) - if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then echo "$as_me:$LINENO: checking for drand48 in -lcExt" >&5 echo $ECHO_N "checking for drand48 in -lcExt... $ECHO_C" >&6 if test "${ac_cv_lib_cExt_drand48+set}" = set; then @@ -15274,6 +15280,12 @@ fi fi echo "$as_me:$LINENO: result: $wx_cv_gccversion" >&5 echo "${ECHO_T}$wx_cv_gccversion" >&6 + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "$wx_cv_gccversion" = "EMX2"; then LIBS="$LIBS -lstdcpp" LDFLAGS="$LDFLAGS -Zsysv-signals" diff --git a/configure.in b/configure.in index a5e49b32e2..e8e2b4a4a6 100644 --- a/configure.in +++ b/configure.in @@ -1613,6 +1613,7 @@ case "${host}" in dnl not "g++/c++". dnl --------------------------------------------------------------------- dnl (OS/2-only piece) + AC_LANG_PUSH(C) if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then dnl More complete Unix emulation for unix-like ports dnl by linking in POSIX/2's cExt (if available). @@ -1656,6 +1657,7 @@ case "${host}" in wx_cv_gccversion="EMX2" ) ]) + AC_LANG_POP if test "$wx_cv_gccversion" = "EMX2"; then LIBS="$LIBS -lstdcpp" LDFLAGS="$LDFLAGS -Zsysv-signals" -- 2.45.2