I think the hpux change here should prevent it from overriding the
authorKen Raeburn <raeburn@mit.edu>
Sat, 5 Mar 2005 00:12:44 +0000 (00:12 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 5 Mar 2005 00:12:44 +0000 (00:12 +0000)
user-specified options, but still add in the necessary flags.

* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Expand on error message if failing.
Substitute THREAD_SUPPORT -> 0 or 1 in makefiles.  For HP-UX, set
PTHREAD_CFLAGS, not CFLAGS.

ticket: 2929
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17119 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4

index 0e684ca6dee81edffa776bcdb88b63df15b71435..6113b7b82d1deb242b5ec8bb45de2ebc0a296ef6 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4 (KRB5_AC_ENABLE_THREADS): Expand on error message if
+       failing.  Substitute THREAD_SUPPORT -> 0 or 1 in makefiles.  For
+       HP-UX, set PTHREAD_CFLAGS, not CFLAGS.
+
 2005-02-04  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (config.status): Depend on shlib.conf.
index 0e8f4bd562cc05f4d2e1842c81c7d7408856bc1d..afa8ed068b9b30d5924d5f2fecd0e2d9e5f5ff51 100644 (file)
@@ -142,7 +142,7 @@ if test "$enable_thread_support" = yes ; then
 fi
 dnl Maybe this should be inside the conditional above?  Doesn't cache....
 if test "$enable_thread_support" = yes; then
-  ACX_PTHREAD(,[AC_MSG_ERROR([cannot determine options for enabling thread support])])
+  ACX_PTHREAD(,[AC_MSG_ERROR([cannot determine options for enabling thread support; try --disable-thread-support])])
   AC_MSG_NOTICE(PTHREAD_CC = $PTHREAD_CC)
   AC_MSG_NOTICE(PTHREAD_CFLAGS = $PTHREAD_CFLAGS)
   AC_MSG_NOTICE(PTHREAD_LIBS = $PTHREAD_LIBS)
@@ -163,14 +163,17 @@ if test "$enable_thread_support" = yes; then
       # These are the flags that "gcc -pthread" adds.  But we don't
       # want "-pthread" because that has link-time effects, and we
       # don't exclude CFLAGS when linking.  *sigh*
-      CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L"
+      PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L"
       ;;
   esac
+  THREAD_SUPPORT=1
 else
   PTHREAD_CC="$CC"
   PTHREAD_CFLAGS=""
   PTHREAD_LIBS=""
+  THREAD_SUPPORT=0
 fi
+AC_SUBST(THREAD_SUPPORT)
 dnl We want to know where these routines live, so on systems with weak
 dnl reference support we can figure out whether or not the pthread library
 dnl has been linked in.