summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog7
-rw-r--r--src/aclocal.m414
2 files changed, 18 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 80b492bb3..519292220 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2004-06-18 Ken Raeburn <raeburn@mit.edu>
+ * aclocal.m4 (WITH_CC): Use -Wl,-search_paths_first for linking on
+ Darwin.
+ (KRB5_AC_ENABLE_THREADS): On AIX, add PTHREAD_LIBS to LIBS; don't
+ do it on other platforms. Override CC with PTHREAD_CC only if CC
+ is not gcc. Don't add PTHREAD_CFLAGS to CFLAGS; substitute
+ PTHREAD_CFLAGS separately.
+
* Makefile.in (all-windows): Make autoconf.h in include\krb5
before building anything else.
(WINMAKEFILES): Add util\support\Makefile.
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 85a1e0297..97ddb190b 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -149,6 +149,9 @@ AC_MSG_NOTICE(PTHREAD_CFLAGS = $PTHREAD_CFLAGS)
AC_MSG_NOTICE(PTHREAD_LIBS = $PTHREAD_LIBS)
dnl Not really needed -- if pthread.h isn't found, ACX_PTHREAD will fail.
AC_CHECK_HEADERS(pthread.h)
+case "${host_os}" in
+ aix*) LIBS="$LIBS $PTHREAD_LIBS" ;;
+esac
fi
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
@@ -156,11 +159,12 @@ dnl has been linked in.
dnl If we don't add any libraries for thread support, don't bother.
AC_CHECK_FUNCS(pthread_once pthread_mutexattr_setrobust_np)
old_CC="$CC"
-test "$PTHREAD_CC" != "" && CC=$PTHREAD_CC
+test "$PTHREAD_CC" != "" && test "$ac_cv_c_compiler_gnu" = no && CC=$PTHREAD_CC
old_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+AC_SUBST(PTHREAD_CFLAGS)
old_LIBS="$LIBS"
-LIBS="$PTHREAD_LIBS $LIBS"
+#LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_NOTICE(rechecking with PTHREAD_... options)
AC_CHECK_LIB(c, pthread_mutexattr_setrobust_np,
[AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB,1,[Define if pthread_mutexattr_setrobust_np is provided in the thread library.])])
@@ -545,6 +549,10 @@ if test "$GCC" = yes ; then
CFLAGS="$CFLAGS -fno-common"
;;
esac
+ case "$LD $LDFLAGS" in
+ *-Wl,-search_paths_first*) ;;
+ *) LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" ;;
+ esac
fi
fi
])dnl