aboutsummaryrefslogtreecommitdiff
path: root/src/aclocal.m4
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-07-09 23:50:35 +0000
committerKen Raeburn <raeburn@mit.edu>2004-07-09 23:50:35 +0000
commit27c59910fe8ad7b41c1ed497038cdd5be6ab0e6a (patch)
treecb5f43901f743358911ba53dc6717dc4b8d69747 /src/aclocal.m4
parent868e0fb61f4035d4611255d7c8c28a66d8d04107 (diff)
downloadkrb5-27c59910fe8ad7b41c1ed497038cdd5be6ab0e6a.zip
krb5-27c59910fe8ad7b41c1ed497038cdd5be6ab0e6a.tar.gz
krb5-27c59910fe8ad7b41c1ed497038cdd5be6ab0e6a.tar.bz2
* 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
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r--src/aclocal.m435
1 files changed, 31 insertions, 4 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 3793d4a..22610ad 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 <sys/types.h>
+#endif
+#ifdef HAVE_MACSOCK_H
+#include <macsock.h>
+#else
+#include <sys/socket.h>
+#endif
+#include <netinet/in.h>
+#include <netdb.h>
+],[
+ 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