From 87d3468f200c90d059b41e869eac27f3c1ef4a17 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Mon, 1 Feb 1999 08:44:24 +0000 Subject: [PATCH] Moved the check for MT save function variants after the determination of 1999-01-30 Sebastian Wilhelmi * configure.in: Moved the check for MT save function variants after the determination of the MT cflags and use them there. --- ChangeLog | 5 ++++ ChangeLog.pre-2-0 | 5 ++++ ChangeLog.pre-2-10 | 5 ++++ ChangeLog.pre-2-12 | 5 ++++ ChangeLog.pre-2-2 | 5 ++++ ChangeLog.pre-2-4 | 5 ++++ ChangeLog.pre-2-6 | 5 ++++ ChangeLog.pre-2-8 | 5 ++++ configure.in | 77 ++++++++++++++++++++++++++++-------------------------- 9 files changed, 80 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4698407..0b6fe92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4698407..0b6fe92 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +1999-01-30 Sebastian Wilhelmi + + * configure.in: Moved the check for MT save function variants + after the determination of the MT cflags and use them there. + 1999-01-29 Sebastian Wilhelmi * configure.in: Fixed typo. Now HPUX 11 thread system detection diff --git a/configure.in b/configure.in index 03d9142..f477df8 100644 --- a/configure.in +++ b/configure.in @@ -572,7 +572,7 @@ LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation " LIBS_NOT_FOUND_2=". Please choose another thread implementation or - provide informationon your thread implementation." + provide information on your thread implementation." FUNC_NO_GETPWUID_R="the 'g_get_(user_name|real_name|home_dir|tmp_dir)' functions will not be MT-safe during their first call because @@ -683,42 +683,6 @@ fi AC_MSG_CHECKING(necessary linker options) AC_MSG_RESULT($G_THREAD_LIBS) -dnl check for mt safe function variants -dnl *********************************** - -if test x"$have_threads" != xnone; then - glib_save_LIBS="$LIBS" - # we are not doing the following for now, as this might require glib - # to always be linked with the thread libs on some platforms. - # LIBS="$LIBS $G_THREAD_LIBS" - AC_CHECK_FUNCS(localtime_r rand_r) - if test "$ac_cv_header_pwd_h" = "yes"; then - AC_CHECK_FUNCS(getpwuid_r) - if test "$ac_cv_func_getpwuid_r" = "yes"; then - AC_MSG_CHECKING(whether getpwuid_r is posix like) - # getpwuid_r(0, NULL, NULL, 0) is the signature on - # solaris, if that is not found, the prog below won't - # compile, then the posix signature is assumed as - # the default. - AC_TRY_COMPILE([#include ], - [getpwuid_r(0, NULL, NULL, 0);], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPWUID_R_POSIX)]) - fi - fi - LIBS="$glib_save_LIBS" -fi - -if test "x$enable_threads" = "xyes"; then - if test "$ac_cv_func_getpwuid_r" != "yes"; then - AC_MSG_WARN($FUNC_NO_GETPWUID_R) - fi - if test "$ac_cv_func_localtime_r" != "yes"; then - AC_MSG_WARN($FUNC_NO_LOCALTIME_R) - fi -fi - dnl determination of G_THREAD_CFLAGS dnl ******************************** @@ -756,6 +720,45 @@ else G_THREAD_CFLAGS= fi +dnl check for mt safe function variants +dnl *********************************** + +if test x"$have_threads" != xnone; then + glib_save_LIBS="$LIBS" + glib_save_CFLAGS="$CFLAGS" + # we are not doing the following for now, as this might require glib + # to always be linked with the thread libs on some platforms. + # LIBS="$LIBS $G_THREAD_LIBS" + CFLAGS="$CFLAGS $G_THREAD_CFLAGS" + AC_CHECK_FUNCS(localtime_r rand_r) + if test "$ac_cv_header_pwd_h" = "yes"; then + AC_CHECK_FUNCS(getpwuid_r) + if test "$ac_cv_func_getpwuid_r" = "yes"; then + AC_MSG_CHECKING(whether getpwuid_r is posix like) + # getpwuid_r(0, NULL, NULL, 0) is the signature on + # solaris, if that is not found, the prog below won't + # compile, then the posix signature is assumed as + # the default. + AC_TRY_COMPILE([#include ], + [getpwuid_r(0, NULL, NULL, 0);], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETPWUID_R_POSIX)]) + fi + fi + LIBS="$glib_save_LIBS" + CFLAGS="$glib_save_CFLAGS" +fi + +if test "x$enable_threads" = "xyes"; then + if test "$ac_cv_func_getpwuid_r" != "yes"; then + AC_MSG_WARN($FUNC_NO_GETPWUID_R) + fi + if test "$ac_cv_func_localtime_r" != "yes"; then + AC_MSG_WARN($FUNC_NO_LOCALTIME_R) + fi +fi + AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c") AC_SUBST(G_THREAD_CFLAGS) AC_SUBST(G_THREAD_LIBS) -- 2.7.4