From 5001df0dd594c4128de79e3dc31d40b4587ba331 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Sun, 25 Sep 2005 07:12:02 +0000 Subject: [PATCH] Fixups for solaris; remove '-mt' from pkg-config output and add '-lX11' for a static build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 21 ++++++++++++++++++++- configure.in | 26 +++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4bbb1e9b93..73c7a089b9 100755 --- a/configure +++ b/configure @@ -25037,7 +25037,15 @@ echo "${ECHO_T}" >&6 fi wx_cv_lib_gtk= - if test "x$wxGTK_VERSION" != "x1"; then + if test "x$wxGTK_VERSION" != "x1" + then + case "${host}" in + *-*-solaris2* ) + if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then + enable_gtktest=no + fi + esac + # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" @@ -25340,6 +25348,17 @@ rm -f conftest.err conftest.$ac_objext \ rm -f conf.gtktest + + case "${host}" in + *-*-solaris2* ) + if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then + GTK_CFLAGS=`echo $GTK_CFLAGS | sed 's/-mt//'` + GTK_LIBS=`echo $GTK_LIBS | sed 's/-mt//'` + fi + if test "$wxUSE_SHARED" != "yes"; then + GTK_LIBS="$GTK_LIBS -lX11" + fi + esac fi if test -z "$wx_cv_lib_gtk"; then diff --git a/configure.in b/configure.in index b0160a125c..2832f1d180 100644 --- a/configure.in +++ b/configure.in @@ -2743,8 +2743,32 @@ if test "$wxUSE_GUI" = "yes"; then dnl detect GTK2 wx_cv_lib_gtk= - if test "x$wxGTK_VERSION" != "x1"; then + if test "x$wxGTK_VERSION" != "x1" + then + dnl The gthread.pc that ships with solaris returns '-mt', + dnl it's correct for Sun CC, but gcc requires '-pthreads'. + dnl So disable the compile check and remove the -mt below. + case "${host}" in + *-*-solaris2* ) + if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then + enable_gtktest=no + fi + esac + AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES) + + dnl Remove the '-mt' for gcc on solaris + case "${host}" in + *-*-solaris2* ) + if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then + GTK_CFLAGS=`echo $GTK_CFLAGS | sed 's/-mt//'` + GTK_LIBS=`echo $GTK_LIBS | sed 's/-mt//'` + fi + dnl solaris also requires -lX11 for static lib + if test "$wxUSE_SHARED" != "yes"; then + GTK_LIBS="$GTK_LIBS -lX11" + fi + esac fi dnl detect GTK1.x -- 2.47.2