From 01a98daf756011f4ab9cf7264833ae40b0a214e1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 5 Mar 2005 00:12:44 +0000 Subject: [PATCH] I think the hpux change here should prevent it from overriding the 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 | 6 ++++++ src/aclocal.m4 | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0e684ca6d..6113b7b82 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-03-04 Ken Raeburn + + * 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 * Makefile.in (config.status): Depend on shlib.conf. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 0e8f4bd56..afa8ed068 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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. -- 2.26.2