[xml] 2.4.19 fails to build on Solaris 2.5.1, 2.6, AIX 4.3.2



In nanohttp.c, <resolv.h> is included. However, on Solaris 2.5.1, 2.6,
and AIX 4.3.2, we must first include <arpa/nameser.h> to get the
definition of MAXDNAME.

I've modified configure.in to test including both <resolv.h> and
<arpa/namser.h>/<resolv.h> and define HAVE_RESOLV_H if either are
successful.

-- 
albert chin (china thewrittenword com)

-- snip snip
--- configure.in.orig   Tue Mar 26 23:01:22 2002
+++ configure.in        Tue Mar 26 23:45:50 2002
@@ -86,8 +81,31 @@
 AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h ansidecl.h)
 AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
 AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h)
-AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h sys/mman.h)
-AC_CHECK_HEADERS(sys/timeb.h signal.h resolv.h)
+AC_CHECK_HEADERS(arpa/nameser.h netdb.h sys/time.h sys/select.h)
+AC_CHECK_HEADERS(sys/mman.h sys/timeb.h signal.h)
+
+dnl Check for <resolv.h>
+AC_MSG_CHECKING([for resolv.h])
+AC_TRY_COMPILE([#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#include <resolv.h>], [], [
+  AC_MSG_RESULT(yes)
+  AC_DEFINE_UNQUOTED(HAVE_RESOLV_H, 1,
+    [Define if you have the <resolv.h> header file.])], [
+  AC_MSG_RESULT(no)
+  AC_MSG_CHECKING([for resolv.h with arpa/namser.h])
+  AC_TRY_COMPILE([#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#include <resolv.h>], [], [
+    AC_MSG_RESULT(yes)
+    AC_DEFINE_UNQUOTED(HAVE_RESOLV_H, 1,
+      [Define if you have the <resolv.h> header file.])], [
+    AC_MSG_RESULT(no)])])
 
 dnl Specific dir for HTML output ?
 if test "x$with_html_dir" = "x" ; then
--- nanohttp.c.orig     Tue Mar 26 23:42:35 2002
+++ nanohttp.c  Tue Mar 26 23:42:51 2002
@@ -39,6 +39,9 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
 #ifdef HAVE_RESOLV_H
 #include <resolv.h>
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]