2006-12-15 Matthias Clasen <mclasen@redhat.com>
* configure.in: On Solaris, set CFLAGS and LDFLAGS that
work both with Sun cc and gcc. (#315061, Lazlo Peter)
2006-12-15 Matthias Clasen <mclasen@redhat.com>
+ * 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)
*-*-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"