From: Bruno Haible Date: Tue, 26 Jul 2005 12:28:40 +0000 (+0000) Subject: Fix for OSF/1 with cc. X-Git-Tag: v0.15~458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27275ab7d961f0973cafd92c53624056a4bef2ef;p=thirdparty%2Fgettext.git Fix for OSF/1 with cc. --- diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index 449ebcd34..6f8bd368c 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,7 @@ +2005-07-26 Bruno Haible + + * lock.m4 (gl_LOCK): On OSF/1 with cc, use -D_REENTRANT, not -pthread. + 2005-07-26 Bruno Haible * lock.m4 (gl_LOCK): Add some ordering constraints. diff --git a/gettext-runtime/m4/lock.m4 b/gettext-runtime/m4/lock.m4 index 9013504e5..a9415ddbc 100644 --- a/gettext-runtime/m4/lock.m4 +++ b/gettext-runtime/m4/lock.m4 @@ -59,14 +59,13 @@ AC_HELP_STRING([--disable-threads], [build without multithread safety]), # -lgthreads case "$host_os" in osf*) - # On OSF/1, the compiler needs the flag -pthread so that it groks - # . For the linker, it is equivalent to -lpthread. - if test -n "$GCC"; then - # gcc-2.95 doesn't understand -pthread, only -D_REENTRANT. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - else - CPPFLAGS="$CPPFLAGS -pthread" - fi + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_TRY_LINK test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac gl_have_pthread=