]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix for OSF/1 with cc.
authorBruno Haible <bruno@clisp.org>
Tue, 26 Jul 2005 12:28:40 +0000 (12:28 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:41 +0000 (12:12 +0200)
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/lock.m4

index 449ebcd34b8251b094af37d56dc8f9c55a8c3b30..6f8bd368cff5b6776295173c20e177d5970a5f03 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-26  Bruno Haible  <bruno@clisp.org>
+
+       * lock.m4 (gl_LOCK): On OSF/1 with cc, use -D_REENTRANT, not -pthread.
+
 2005-07-26  Bruno Haible  <bruno@clisp.org>
 
        * lock.m4 (gl_LOCK): Add some ordering constraints.
index 9013504e5a22097a2aab61667de395833af1ba19..a9415ddbc314a4f98009c2fceb86af830de3065d 100644 (file)
@@ -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
-            # <pthread.h>. 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 <pthread.h>. 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=