From: Ken Raeburn Date: Sat, 19 Jun 2004 00:21:48 +0000 (+0000) Subject: * aclocal.m4 (WITH_CC): Use -Wl,-search_paths_first for linking on Darwin. X-Git-Tag: krb5-1.4-beta1~296 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=acd27af0e845f8b93de2e226cc2ec9ac8af52077;p=krb5.git * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16493 dc483132-0cff-0310-8789-dd5450dbe970 --- 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 + * 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