From: Ken Raeburn Date: Fri, 9 Jul 2004 23:50:35 +0000 (+0000) Subject: * aclocal.m4 (KRB5_AC_ENABLE_THREADS): Always include the thread library on X-Git-Tag: krb5-1.4-beta1~231 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27c59910fe8ad7b41c1ed497038cdd5be6ab0e6a;p=krb5.git * aclocal.m4 (KRB5_AC_ENABLE_THREADS): Always include the thread library on Tru64 UNIX. (KRB5_AC_CHECK_INET6): If the first test fails, try adding -DINET6 and test again; if it works, define INET6 for the build. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16576 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index f66ce52ad..45b63c4e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,9 @@ 2004-07-09 Ken Raeburn * aclocal.m4 (KRB5_AC_ENABLE_THREADS): Don't test for pthread.h - specifically. + specifically. Always include the thread library on Tru64 UNIX. + (KRB5_AC_CHECK_INET6): If the first test fails, try adding -DINET6 + and test again; if it works, define INET6 for the build. 2004-07-08 Ken Raeburn diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 3793d4a05..22610ad0e 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -148,8 +148,10 @@ 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. dnl AC_CHECK_HEADERS(pthread.h) +# AIX and Tru64 don't support weak references, and don't have +# stub versions of the pthread code in libc. case "${host_os}" in - aix*) LIBS="$LIBS $PTHREAD_LIBS" ;; + aix* | osf*) LIBS="$LIBS $PTHREAD_LIBS" ;; esac fi dnl We want to know where these routines live, so on systems with weak @@ -375,8 +377,6 @@ AC_DEFUN(KRB5_AC_CHECK_INET6,[ AC_REQUIRE([KRB5_AC_CHECK_SOCKADDR_STORAGE])dnl AC_MSG_CHECKING(for IPv6 compile-time support) AC_CACHE_VAL(krb5_cv_inet6,[ -dnl NetBSD and Linux both seem to have gotten get*info but not getipnodeby* -dnl as of the time I'm writing this, so we'll use get*info only. if test "$ac_cv_func_inet_ntop" != "yes" ; then krb5_cv_inet6=no else @@ -398,7 +398,34 @@ AC_TRY_COMPILE([ ],krb5_cv_inet6=yes,krb5_cv_inet6=no)]) fi AC_MSG_RESULT($krb5_cv_inet6) -if test $krb5_cv_inet6 = yes ; then +if test "$krb5_cv_inet6" = no && test "$ac_cv_func_inet_ntop" = yes; then +AC_MSG_CHECKING(for IPv6 compile-time support with -DINET6) +AC_CACHE_VAL(krb5_cv_inet6_with_dinet6,[ +old_CC="$CC" +CC="$CC -DINET6" +AC_TRY_COMPILE([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_MACSOCK_H +#include +#else +#include +#endif +#include +#include +],[ + struct sockaddr_in6 in; + AF_INET6; + IN6_IS_ADDR_LINKLOCAL (&in.sin6_addr); +],krb5_cv_inet6_with_dinet6=yes,krb5_cv_inet6_with_dinet6=no) +CC="$old_CC"]) +AC_MSG_RESULT($krb5_cv_inet6_with_dinet6) +fi +if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes; then + if test "$krb5_cv_inet6_with_dinet6" = yes; then + AC_DEFINE(INET6,1,[May need to be defined to enable IPv6 support, for example on IRIX]) + fi AC_DEFINE(KRB5_USE_INET6,1,[Define if we should compile in IPv6 support (even if we can't use it at run time)]) fi ])dnl