From 17344bb1e40239ddfa12e3fec9b9a10b25959f6d Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Tue, 26 Nov 2002 12:57:16 +0000 Subject: [PATCH] Make CPPFLAGS, not CFLAGS, include G_THREAD_CFLAGS. CFLAGS is used while 2002-11-26 Sebastian Wilhelmi * configure.in: Make CPPFLAGS, not CFLAGS, include G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib programs would link to the threads library on some platforms. Also fixed a bug manifesting through this change. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ configure.in | 6 +++--- 8 files changed, 52 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0139650ce..b517599f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0139650ce..b517599f5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2002-11-26 Sebastian Wilhelmi + + * configure.in: Make CPPFLAGS, not CFLAGS, include + G_THREAD_CFLAGS. CFLAGS is used while linking too and thus GLib + programs would link to the threads library on some platforms. Also + fixed a bug manifesting through this change. + 2002-11-26 Matthias Clasen * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY diff --git a/configure.in b/configure.in index b2dfc5c9d..c003de688 100644 --- a/configure.in +++ b/configure.in @@ -1389,7 +1389,7 @@ if test x"$have_threads" != xno; then AC_MSG_CHECKING(thread related cflags) AC_MSG_RESULT($G_THREAD_CFLAGS) - CFLAGS="$CFLAGS $G_THREAD_CFLAGS" + CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" fi dnl determination of G_THREAD_LIBS @@ -1398,6 +1398,8 @@ dnl ****************************** mutex_has_default=no case $have_threads in posix|dce) + glib_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES" if test x"$G_THREAD_LIBS" = x; then case $host in *-aix*) @@ -1406,8 +1408,6 @@ case $have_threads in AC_MSG_WARN($AIX_COMPILE_INFO) ;; *) - glib_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES" G_THREAD_LIBS=error glib_save_LIBS="$LIBS" for thread_lib in "" pthread pthread32 pthreads thread dce; do