summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-02 11:56:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-02 11:56:15 +0000
commita31ddd363bb125e852b57a715200b8f276c731fb (patch)
treec5b8ca3697ac35c65acf7d32272600c696b6f216 /acinclude.m4
parented9e10f2d8882cb8b9452aea96900d9dc4e78c97 (diff)
downloadcurl-a31ddd363bb125e852b57a715200b8f276c731fb.tar.gz
Now configure checks for struct sockaddr_storage and the ftp code tries
to survive without it if not found. AIX 4.3 targetted adjustment.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 73e8348e2..f086a37ee 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -122,6 +122,30 @@ dnl end of non-blocking try-compile test
fi
])
+dnl Check for struct sockaddr_storage. Most IPv6-enabled hosts have it, but
+dnl AIX 4.3 is one known exception.
+AC_DEFUN([TYPE_SOCKADDR_STORAGE],
+[
+ AC_CHECK_TYPE([struct sockaddr_storage],
+ AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
+ [if struct sockaddr_storage is defined]), ,
+ [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+ ])
+
+])
+
dnl Check for socklen_t: historically on BSD it is an int, and in
dnl POSIX 1g it is a type of its own, but some platforms use different
dnl types for the argument to getsockopt, getpeername, etc. So we