1. Solaris does not have a function prototype for inet_aton declared.
2. AC_PROG_LIBTOOL rather than AM_PROG_LIBTOOL.
3. Need alloca magic for lib/fnmatch.c (Solaris and AIX at least).

I have tested this on Solaris 2.5.1, 2.6, 7, 8, HP-UX 10.20, 11.00,
Tru64 UNIX 4.0D, 5.0A, IRIX 6.2, 6.5, and AIX 4.3.2.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- src/ResMgr.cc.orig  Tue Aug 14 13:38:14 2001
+++ src/ResMgr.cc       Tue Aug 14 13:38:44 2001
@@ -38,6 +38,10 @@
 #include "xmalloc.h"
 #include "xalloca.h"
 
+#ifndef HAVE_INET_ATON_DECL
+CDECL int inet_aton(const char *, struct in_addr *);
+#endif
+
 ResMgr::Resource  *ResMgr::chain=0;
 ResDecl                  *ResMgr::type_chain=0;
 
--- src/ftpclass.cc.orig        Tue Aug 14 13:38:18 2001
+++ src/ftpclass.cc     Tue Aug 14 13:38:48 2001
@@ -44,6 +44,10 @@
 #include "ascii_ctype.h"
 #include "misc.h"
 
+#ifndef HAVE_INET_ATON_DECL
+CDECL int inet_aton(const char *, struct in_addr *);
+#endif
+
 enum {FTP_TYPE_A,FTP_TYPE_I};
 
 #define TELNET_IAC     255             /* interpret as command: */
--- lib/fnmatch.c.orig  Tue Aug 14 13:42:12 2001
+++ lib/fnmatch.c       Tue Aug 14 13:44:20 2001
@@ -25,6 +25,24 @@
 # define _GNU_SOURCE   1
 #endif
 
+/* AIX requires this to be the first thing in the file. */
+#if defined _AIX && !defined REGEX_MALLOC
+  #pragma alloca
+#endif
+
+/* Make alloca work the best possible way.  */
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not __GNUC__ */
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#else /* not __GNUC__ or HAVE_ALLOCA_H */
+#ifndef _AIX /* Already did AIX, up at the top.  */
+char *alloca ();
+#endif /* not _AIX */
+#endif /* not HAVE_ALLOCA_H */
+#endif /* not __GNUC__ */
+
 #include <assert.h>
 #include <errno.h>
 #include <fnmatch.h>
--- acconfig.h.orig     Tue Aug 14 08:40:09 2001
+++ acconfig.h  Tue Aug 14 13:39:06 2001
@@ -85,6 +85,8 @@
 /* Define as 1 if you have the stpcpy function.  */
 #undef HAVE_STPCPY
 
+#undef HAVE_INET_ATON_DECL
+
 #undef HAVE_SYS_ERRLIST_DECL
 
 #undef HAVE_HSTRERROR_DECL
--- configure.in.orig   Tue Aug 14 08:43:06 2001
+++ configure.in        Tue Aug 14 14:17:21 2001
@@ -116,7 +116,7 @@
 fi
 
 test -z "$enable_static" && enable_static=no
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
 LIBTOOL="$LIBTOOL --silent"
 
 AC_ARG_WITH(socks,
@@ -181,6 +181,10 @@
      #include <arpa/nameser.h>
      #include <resolv.h>
 ])
+IU_CHECK_DECL(inet_aton, [#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>])
 
 AC_ARG_WITH(libresolv, [  --without-libresolv     don't use libresolv],
       [with_libresolv=$withval], [with_libresolv=yes])

Reply via email to