From 0aa53c3a3dea16ccf21b68ed93c6d91356a2843f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 16 Dec 2006 03:52:27 +0000 Subject: [PATCH] On Solaris, set CFLAGS and LDFLAGS that work both with Sun cc and gcc. 2006-12-15 Matthias Clasen * configure.in: On Solaris, set CFLAGS and LDFLAGS that work both with Sun cc and gcc. (#315061, Lazlo Peter) --- ChangeLog | 3 +++ configure.in | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index f26f678..982ad06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-12-15 Matthias Clasen + * configure.in: On Solaris, set CFLAGS and LDFLAGS that + work both with Sun cc and gcc. (#315061, Lazlo Peter) + * glib/gspawn.c: Undefine READ_OK to fix the build on old versions of Darwin. (#327800) diff --git a/configure.in b/configure.in index 4a50909..2de6288 100644 --- a/configure.in +++ b/configure.in @@ -1604,6 +1604,13 @@ if test x"$have_threads" != xno; then *-*-cygwin*|*-*-darwin*) # skip cygwin and darwin -pthread or -pthreads test ;; + *-solaris*) + # These compiler/linker flags work with both Sun Studio and gcc + # Sun Studio expands -mt to -D_REENTRANT and -lthread + # gcc expands -pthreads to -D_REENTRANT -D_PTHREADS -lpthread + G_THREAD_CFLAGS="-D_REENTRANT -D_PTHREADS" + G_THREAD_LIBS="-lpthread -lthread" + ;; *) for flag in pthread pthreads mt; do glib_save_CFLAGS="$CFLAGS" -- 2.7.4