]> sjero.net Git - wget/blobdiff - aclocal.m4
[svn] Move fnmatch() to cmpt.c and don't use it under GNU libc.
[wget] / aclocal.m4
index f5c979c18e33cea3a43fc8e2cc23f7b6c5385b5b..f55b502fb511f8c1f851c98454d2aa9f66e9b49a 100644 (file)
@@ -38,7 +38,7 @@ AC_SUBST(ANSI2KNR)dnl
 
 AC_DEFUN(AM_PROG_CC_STDC,
 [AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
 AC_CACHE_VAL(am_cv_prog_cc_stdc,
 [am_cv_prog_cc_stdc=no
 ac_save_CC="$CC"
@@ -47,12 +47,11 @@ ac_save_CC="$CC"
 # AIX                  -qlanglvl=ansi
 # Ultrix and OSF/1     -std1
 # HP-UX                        -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
 do
   CC="$ac_save_CC $ac_arg"
   AC_TRY_COMPILE(
-[#if !defined(__STDC__) || __STDC__ != 1
+[#if !defined(__STDC__)
 choke me
 #endif
 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
@@ -76,7 +75,7 @@ esac
 ])
 
 AC_DEFUN(WGET_STRUCT_UTIMBUF,
-[AC_MSG_CHECKING(for struct utimbuf)
+[AC_MSG_CHECKING([for struct utimbuf])
 if test x"$ac_cv_header_utime_h" = xyes; then
   AC_EGREP_CPP([struct[        ]+utimbuf],
     [#include <utime.h>],
@@ -87,6 +86,156 @@ else
   AC_MSG_RESULT(no)
 fi])
 
+
+dnl ************************************************************
+dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
+dnl ************************************************************
+
+AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[
+  ds6_have_sockaddr_in6=
+  AC_CHECK_TYPES([struct sockaddr_in6],[
+    ds6_have_sockaddr_in6=yes
+  ],[
+    ds6_have_sockaddr_in6=no
+  ],[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+  ])
+
+  if test "X$ds6_have_sockaddr_in6" = "Xyes"; then :
+    $1
+  else :
+    $2
+  fi
+])
+
+
+AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
+  AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
+  
+  ds6_member_sin6_scope_id=
+  if test "X$ds6_have_sockaddr_in6" = "Xyes"; then
+    AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[
+      ds6_member_sin6_scope_id=yes
+    ],[
+      ds6_member_sin6_scope_id=no
+    ],[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+    ])
+  fi
+
+  if test "X$ds6_member_sin6_scope_id" = "Xyes"; then
+    AC_DEFINE([HAVE_SOCKADDR_IN6_SCOPE_ID], 1,
+      [Define if struct sockaddr_in6 has the sin6_scope_id member])
+    $1
+  else :
+    $2
+  fi
+])
+
+
+AC_DEFUN([PROTO_INET6],[
+  AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[
+    AC_TRY_CPP([
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#ifndef PF_INET6
+#error Missing PF_INET6
+#endif
+#ifndef AF_INET6
+#error Mlssing AF_INET6
+#endif
+    ],[
+      ds6_cv_proto_inet6=yes
+    ],[
+      ds6_cv_proto_inet6=no
+    ])
+  ])
+
+  if test "X$ds6_cv_proto_inet6" = "Xyes"; then :
+    $1
+  else :
+    $2
+  fi
+])
+
+
+AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
+  AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
+    [ds6_cv_gai_ai_addrconfig],[
+    AC_TRY_CPP([
+#include <netdb.h>
+
+#ifndef AI_ADDRCONFIG
+#error Missing AI_ADDRCONFIG
+#endif
+    ],[
+      ds6_cv_gai_ai_addrconfig=yes
+    ],[
+      ds6_cv_gai_ai_addrconfig=no
+    ])
+  ])
+
+  if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then :
+    $1
+  else :
+    $2
+  fi
+])
+
+
+AC_DEFUN([GETADDRINFO_AI_ALL],[
+  AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[
+    AC_TRY_CPP([
+#include <netdb.h>
+
+#ifndef AI_ALL
+#error Missing AI_ALL
+#endif
+    ],[
+      ds6_cv_gai_ai_all=yes
+    ],[
+      ds6_cv_gai_ai_all=no
+    ])
+  ])
+
+  if test "X$ds6_cv_gai_ai_all" = "Xyes"; then :
+    $1
+  else :
+    $2
+  fi
+])
+
+
+AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[
+  AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[
+    AC_TRY_CPP([
+#include <netdb.h>
+
+#ifndef AI_V4MAPPED
+#error Missing AI_V4MAPPED
+#endif
+    ],[
+      ds6_cv_gai_ai_v4mapped=yes
+    ],[
+      ds6_cv_gai_ai_v4mapped=no
+    ])
+  ])
+
+  if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then :
+    $1
+  else :
+    $2
+  fi
+])
+
+dnl ************************************************************
+dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
+dnl ************************************************************
 \f
 # This code originates from Ulrich Drepper's AM_WITH_NLS.
 
@@ -103,7 +252,7 @@ AC_DEFUN(WGET_WITH_NLS,
     dnl last moment.
 
     if test x"$HAVE_NLS" = xyes; then
-      AC_MSG_RESULT("language catalogs: $ALL_LINGUAS")
+      AC_MSG_RESULT([language catalogs: $ALL_LINGUAS])
       AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
       AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
@@ -179,7 +328,7 @@ dnl This is not strictly an Autoconf macro, because it is run from
 dnl within `config.status' rather than from within configure.  This
 dnl is why special rules must be applied for it.
 AC_DEFUN(WGET_PROCESS_PO,
-  [srcdir=$ac_given_srcdir # Advanced autoconf hackery
+  [
    dnl I wonder what the following several lines do...
    if test "x$srcdir" != "x."; then
      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
@@ -249,3 +398,7 @@ else
 fi
 AC_SUBST($1)dnl
 ])
+
+# Include libtool code.
+
+builtin(include, libtool.m4)dnl