From 883776f0353e0cf3bf60f854bb1795e921748dcd Mon Sep 17 00:00:00 2001 From: "Timur I. Bakeyev" Date: Sat, 16 Jan 1999 22:45:18 +0000 Subject: [PATCH] Add support for pthreads under FreeBSD 2.2.[7|8] Add support for pthreads under FreeBSD 2.2.[7|8] --- ChangeLog | 4 ++++ ChangeLog.pre-2-0 | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-12 | 4 ++++ ChangeLog.pre-2-2 | 4 ++++ ChangeLog.pre-2-4 | 4 ++++ ChangeLog.pre-2-6 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ configure.in | 48 ++++++++++++++++++++++++++-------------------- 9 files changed, 59 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ac3f57fc1..df7dc128f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Sun Jan 17 01:06:38 1999 Timur Bakeyev + + * configure.in: Add support for FreeBSD 2.2.x macro _THREAD_SAFE. + Wed Jan 13 11:27:24 PST 1999 Manish Singh * glib.h: don't use inline for !__GNUC__ case with g_warning, diff --git a/configure.in b/configure.in index 4381e03ce..f678b23bd 100644 --- a/configure.in +++ b/configure.in @@ -673,31 +673,37 @@ dnl determination of G_THREAD_CFLAGS dnl ******************************** if test x"$have_threads" != xnone; then - G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_REENTRANT" # good default - - case $host in - *-aix*) - G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" - if test x"$GCC" = xyes; then - G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads" - fi - ;; - esac +G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_REENTRANT" # good default guess + + case $host in + *-aix*) + G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" + if test x"$GCC" = xyes; then + G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads" + fi + ;; + *-freebsd2.2*) + G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" + + # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support + # -mthreads flag. + ;; + esac - # if we are not finding the ctime_r function, then we probably are - # not using the proper multithread flag - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" - AC_EGREP_HEADER([[^a-zA-Z_]ctime_r[^a-zA-Z_]], time.h, , - G_THREAD_CFLAGS= - AC_MSG_WARN($FLAG_DOES_NOT_WORK)) - CPPFLAGS=$old_CPPFLAGS + # if we are not finding the ctime_r function, then we probably are + # not using the proper multithread flag + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" + AC_EGREP_HEADER([[^a-zA-Z_]ctime_r[^a-zA-Z_]], time.h, , + G_THREAD_CFLAGS= + AC_MSG_WARN($FLAG_DOES_NOT_WORK)) + CPPFLAGS=$old_CPPFLAGS - AC_MSG_CHECKING(necessary compiler options) + AC_MSG_CHECKING(necessary compiler options) - AC_MSG_RESULT($G_THREAD_CFLAGS) + AC_MSG_RESULT($G_THREAD_CFLAGS) else - G_THREAD_CFLAGS= + G_THREAD_CFLAGS= fi AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c") -- 2.34.1