Make configure.in work with latest autoconf/automake / Fix inter-lib linking [patch]

Richard Atterer <[email protected]> Sat, 27 Sep 2003 19:34:35 +0200
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
Hi,

here are patches which make the following changes:

  - They make all the automake stuff work with automake 1.7 and autoconf 
    2.5x

  - They add -l switches in various Makefile.am's - for example, if some 
    object file in wwwapp.so contains a reference to some function in
    wwwcore.so, then "-lwwwcore" is added to libwwwapp_la_LDFLAGS in
    Makefile.am.  Apparently, this is the correct thing to do (a bug was
    filed about it against my Debian libwww package), and the resulting
    "prelinking" done by libtool can also reduce the startup time of libwww
    applications.

These patches are against the 5.4.0 release sources. I think parts of them
won't apply to the current CVS version, because expat was replaced with a
newer version in CVS.

The reason why I'm not applying this to CVS directly is that
--with-expat=/some/path was broken by the expat update, and I need to use
that switch. Hopefully I can fix this another sunny weekend, and then start
applying the backlog... :)

To apply everything:

  - Apply "0-configure-ac-in.diff" to configure.in
  - Rename configure.in to configure.ac
  - Apply "1-acinclude-m4.diff" to (guess what) acinclude.m4
  - Delete acconfig.h
  - Apply "2-Makefile-am.diff". This contains both further fixes to make 
    everything work with automake 1.7, and the -l switches mentioned above.

Then re-bootstrap the code. The commands assume a Debian system - on other 
Linux flavours, the utilities might be called differently:

  - perl config/winConfigure.pl
  - libtoolize -c -f
  - aclocal-1.7
  - autoheader2.50
  - automake-1.7 -a -c
  - autoconf2.50

Phew!

Another problem which I'm encountering with Debian's libtool 1.5-2: During
build, libtool suddenly wants to access "Library/src/.libs/.libs", which
isn't present. I guess this is a bug in libtool - my workaround, a simple
"mkdir -p Library/src/.libs; ln -s . Library/src/.libs/.libs" seems to work
fine.

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯
0-configure-ac-in.diff (text/plain, 20.3 KB)
--- configure.in	2002-06-06 17:05:33.000000000 +0200
+++ new/configure.ac	2003-09-27 17:51:29.000000000 +0200
@@ -4,22 +4,24 @@
 dnl @(#) $Id: configure.in,v 1.95 2002/06/06 15:05:33 kahan Exp $
 
 AC_REVISION([$Id: configure.in,v 1.95 2002/06/06 15:05:33 kahan Exp $])
-AC_PREREQ(2.13)
-AC_INIT(Library)
+AC_PREREQ(2.57)
+
+AC_INIT
+AC_CONFIG_SRCDIR([Library])
 
 AC_CONFIG_AUX_DIR(config)
 
-AC_CANONICAL_SYSTEM
+#AC_CANONICAL_TARGET([])
 AC_ARG_PROGRAM
 
 dnl Initialize Automake.
 PACKAGE=w3c-libwww
 AC_SUBST(PACKAGE)
-AC_DEFINE_UNQUOTED(W3C_PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(W3C_PACKAGE, "$PACKAGE", [W3C_PACKAGE])
  
 VERSION=5.4.0
 AC_SUBST(VERSION)
-AC_DEFINE_UNQUOTED(W3C_VERSION, "$VERSION")
+AC_DEFINE_UNQUOTED(W3C_VERSION, "$VERSION", [W3C_VERSION])
 
 #dnl for CVS to be able to make a release diff
 PREVIOUS_VERSION=5.3.2
@@ -35,8 +37,15 @@
 AC_ISC_POSIX
 dnl AC_PROG_CXX		Caused problems and is not needed...
 dnl You should probably use all three of these for maximum portability
-AC_CYGWIN
-AC_MINGW32
+AC_CANONICAL_HOST
+case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+         * ) CYGWIN=no;;
+esac
+case $host_os in
+  *mingw* ) MINGW32=yes;;
+         * ) MINGW32=no;;
+esac
 AC_EXEEXT
 if test "$MINGW32" = "yes"; then
     # With MinGW, need to explicitly link against winsock2
@@ -48,7 +57,7 @@
 fi
 
 AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
 
@@ -92,15 +101,15 @@
 dnl Checks for programs.
 AC_CHECK_PROGS(have_telnet, telnet)
 if test -n "$have_telnet" ; then
-  AC_DEFINE_UNQUOTED(TELNET_PROGRAM, "$have_telnet")
+  AC_DEFINE_UNQUOTED(TELNET_PROGRAM, "$have_telnet", [telnet program name])
 fi
 AC_CHECK_PROGS(have_rlogin, rlogin)
 if test -n "$have_rlogin" ; then
-  AC_DEFINE_UNQUOTED(RLOGIN_PROGRAM, "$have_rlogin")
+  AC_DEFINE_UNQUOTED(RLOGIN_PROGRAM, "$have_rlogin", [rlogin program name])
 fi
 AC_CHECK_PROGS(have_tn3270, tn3270 x3270)
 if test -n "$have_tn3270" ; then
-  AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270")
+  AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270", [tn3270 program name])
 fi
 AC_CHECK_PROGS(have_perl, perl)
 if test ! -n "$have_perl" ; then
@@ -125,11 +134,12 @@
 dnl Resolv.conf
 AC_PATH_PROG(have_resolv_conf, resolv.conf, , /etc, /usr/etc)
 if test -n "$have_resolv_conf" ; then
-  AC_DEFINE_UNQUOTED(RESOLV_CONF, "$have_resolv_conf")
+  AC_DEFINE_UNQUOTED(RESOLV_CONF, "$have_resolv_conf",
+                     [Location of the resolver configuration file])
 fi
 
 dnl This is the standard UNIX value
-AC_DEFINE(CACHE_FILE_PREFIX, "/usr/wsrc/")
+AC_DEFINE(CACHE_FILE_PREFIX, "/usr/wsrc/", [Prefix for cache files])
 
 dnl Checks for libraries:
 dnl AC_CHECK_LIB(ICE, IceConnectionNumber)
@@ -233,7 +243,7 @@
   if test "$ac_cv_func_unlink" != yes ; then
      AC_CHECK_FUNC(remove)
      if test "$ac_cv_func_remove" == yes ; then
-        AC_DEFINE(unlink, remove)
+        AC_DEFINE(unlink, remove, [Function to remove a file])
      fi
 fi
 
@@ -255,11 +265,10 @@
       withval="/usr/local/lib/wais/wais.a /usr/local/lib/wais/client.a"
     fi
     LIBS="$withval -lm $LIBS"
-    AC_DEFINE(HT_DIRECT_WAIS)
-    AC_TRY_LINK([],
-                [ makeDocID(); ],
-		[],
-		[ AC_MSG_ERROR(Could not find one or more of the $withval libraries.  You must first install WAIS.) ])
+    AC_DEFINE(HT_DIRECT_WAIS,, [Define to enable direct WAIS access])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ makeDocID(); ])],
+                   [],
+                   [ AC_MSG_ERROR(Could not find one or more of the $withval libraries.  You must first install WAIS.) ])
     HTWAIS="HTWAIS.lo"
     WWWWAIS="libwwwwais.la"
     LWWWWAIS="-lwwwwais.la"
@@ -296,11 +305,10 @@
     else
       AC_ADDLIB($withval)
     fi
-    AC_DEFINE(HT_ZLIB)
-    AC_TRY_LINK([],
-                [ zlibVersion(); ],
-		[],
-		[ AC_MSG_ERROR(Could not find the $withval library.  You must first install zlib.) ])
+    AC_DEFINE(HT_ZLIB,, [Define to enable compression support])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ zlibVersion(); ])],
+                   [],
+                   [ AC_MSG_ERROR(Could not find the $withval library.  You must first install zlib.) ])
     HTZLIB="HTZip.lo"
     WWWZIP="libwwwzip.la"
     LWWWZIP="-lwwwzip"
@@ -327,15 +335,14 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_POSIX_REGEX)
+    AC_DEFINE(HT_POSIX_REGEX,, [Define to enable POSIX RegEx support])
     if test "x$withval" = "xyes"; then
       AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] )
     else
       AC_ADDLIB($withval)
-      AC_TRY_LINK([],
-	          [ regexec(); ],
-		  [],
-		  [ AC_MSG_ERROR(Could not find the $withval library.  You must first install regex.) ] )
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ regexec(); ])],
+                     [],
+                     [ AC_MSG_ERROR(Could not find the $withval library.  You must first install regex.)  ])
     fi
     ;;
   esac ],
@@ -381,10 +388,9 @@
 	    else
       	      AC_ADDLIB($withval)
 	    fi
-	    AC_TRY_LINK([],
-	                [ SOCKSconnect(); ],
-			[],
-			[ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks5.) ])
+	    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ SOCKSconnect(); ])],
+                           [],
+                           [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks5.) ])
 	    ;;
 	  esac ],
 	  AC_MSG_RESULT(no)
@@ -408,10 +414,9 @@
             else
       	      AC_ADDLIB($withval)
 	    fi
-	    AC_TRY_LINK([],
-	                [ Rconnect(); ],
-			[],
-			[ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks.) ])
+	    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ Rconnect(); ])],
+                           [],
+                           [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks.) ])
 	    ;;
 	  esac ],
 	  AC_MSG_RESULT(no)
@@ -419,13 +424,13 @@
 fi
 
 if test "x$socks" = "x4"; then
-    AC_DEFINE(SOCKS)
-    AC_DEFINE(SOCKS4)
+    AC_DEFINE(SOCKS,, [Define to enable SOCKS firewall-breaching code])
+    AC_DEFINE(SOCKS4,, [x])
 fi
 
 if test "x$socks" = "x5"; then
-    AC_DEFINE(SOCKS)
-    AC_DEFINE(SOCKS5)
+    AC_DEFINE(SOCKS,, [Define to enable SOCKS firewall-breaching code])
+    AC_DEFINE(SOCKS5,, [x])
 fi
 
 AC_MSG_CHECKING(whether to support mysql access.)
@@ -454,7 +459,7 @@
     else
       AC_ADDLIB($withval)
     fi
-    AC_DEFINE(HT_MYSQL)
+    AC_DEFINE(HT_MYSQL,, [Define to enable mysql access])
     HTSQL="HTSQL.lo"
     HTSQLLOG="HTSQLLog.lo"
     WWWSQL="libwwwsql.la"
@@ -495,7 +500,7 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_EXPAT)
+    AC_DEFINE(HT_EXPAT,, [Define to enable expat XML parser])
     HTXML="HTXML.lo"
     HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
     XMLTOK="libxmltok.la"
@@ -507,7 +512,7 @@
     ;;
   esac ],
   AC_MSG_RESULT(yes)
-  AC_DEFINE(HT_EXPAT)
+  AC_DEFINE(HT_EXPAT,, [Define to enable expat XML parser])
   HTXML="HTXML.lo"
   HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
   XMLTOK="libxmltok.la"
@@ -538,14 +543,14 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_MD5)
+    AC_DEFINE(HT_MD5,, [Define to enable MD5 for HTTP access authentication])
     WWWMD5="libmd5.la"
     LWWWMD5="-lmd5"
     LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
     ;;
   esac ],
   AC_MSG_RESULT(yes)
-  AC_DEFINE(HT_MD5)
+  AC_DEFINE(HT_MD5,, [Define to enable MD5 for HTTP access authentication])
   WWWMD5="libmd5.la"
   LWWWMD5="-lmd5"
   LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
@@ -568,7 +573,7 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_DAV)
+    AC_DEFINE(HT_DAV,, [Define to enable WebDAV protocol])
     HTDAV="HTDAV.lo"
     WWWDAV="libwwwdav.la"
     LWWWDAV="-lwwwdav"
@@ -598,7 +603,7 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_EXT)
+    AC_DEFINE(HT_EXT,, [Define to enable extension methods])
     MYEXT="myext myext2"
     ;;
   esac ],
@@ -649,10 +654,9 @@
       SSLINC=$sslinc
     fi
     LIBS="$LIBS $withval"
-    AC_TRY_LINK([],
-		[ SSL_library_init(); ],
-		[],
-		[ AC_MSG_ERROR(Could not find the $withval libraries.  You must first install openSSL.) ])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ SSL_library_init(); ])],
+                   [],
+                   [ AC_MSG_ERROR(Could not find the $withval libraries.  You must first install openSSL.) ])
     AC_MSG_RESULT(yes)
     WWWSSL="libwwwssl.la"
     LWWWSSL="-lwwwssl" 
@@ -675,7 +679,7 @@
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WWWLIB_SIG)
+    AC_DEFINE(WWWLIB_SIG,, [Define to use internal signal handler])
     ;;
   esac ],
   AC_MSG_RESULT(no)
@@ -687,14 +691,14 @@
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_NO_NAGLE)
+    AC_DEFINE(HT_NO_NAGLE,, [Define to disable Nagle's algorithm])
     ;;
   *) 
     AC_MSG_RESULT(no)
     ;;
   esac ],
   AC_MSG_RESULT(yes)
-  AC_DEFINE(HT_NO_NAGLE)
+  AC_DEFINE(HT_NO_NAGLE,, [Define to disable Nagle's algorithm])
 )
 
 AC_MSG_CHECKING(whether to accept new rule files without asking an end user.)
@@ -703,7 +707,7 @@
 [ case "${enableval}" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_AUTOMATIC_RULES)
+    AC_DEFINE(HT_AUTOMATIC_RULES,, [Define to enable support for enabling a rules file w/o user interaction])
     ;;
   *) 
     AC_MSG_RESULT(no)
@@ -718,7 +722,7 @@
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_NO_PIPELINING)
+    AC_DEFINE(HT_NO_PIPELINING,, [Define to disable HTTP/1.1 pipelining])
     ;;
   *) 
     AC_MSG_RESULT(no)
@@ -734,7 +738,7 @@
 [ case "${enableval}" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_MUX)
+    AC_DEFINE(HT_MUX,, [Define to enable MUX as HTTP transport])
     ;;
   *) 
     AC_MSG_RESULT(no)
@@ -752,7 +756,8 @@
     ;;
   *) 
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
+    AC_DEFINE(HT_REENTRANT,, [Define to build using reentrant system calls])
+    CFLAGS="$CFLAGS -D_REENTRANT" # Correct?
     ac_cv_reentrant=yes
     ;;
   esac ],
@@ -763,39 +768,34 @@
 
     AC_MSG_CHECKING(for ctime_r)
     if test -z "$ac_cv_ctime_args"; then
-        AC_TRY_COMPILE(
-        [#include <time.h>],
-        [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [
             time_t clock;
             char buf[26];
             ctime_r(&clock, buf);
-        ], ac_cv_ctime_args=2)
+        ])],[ac_cv_ctime_args=2],[])
     fi
     if test -z "$ac_cv_ctime_args" ; then
-        AC_TRY_COMPILE(
-        [#include <time.h>],
-        [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [
             time_t clock;
             char buf[26];
             ctime_r(&clock, buf, 26);
-        ], ac_cv_ctime_args=3)
+        ])],[ac_cv_ctime_args=3],[])
     fi
     if test -z "$ac_cv_ctime_args"; then
         AC_MSG_RESULT(no)
         have_missing_r_funcs="$have_missing_r_funcs ctime_r"
     else
         if test "$ac_cv_ctime_args" = 2; then
-            AC_DEFINE(HAVE_CTIME_R_2)
+            AC_DEFINE(HAVE_CTIME_R_2,, [Define to use the two-argument variant of ctime_r])
         elif test "$ac_cv_ctime_args" = 3; then
-            AC_DEFINE(HAVE_CTIME_R_3)
+            AC_DEFINE(HAVE_CTIME_R_3,, [Define to use the three-argument variant of ctime_r])
         fi
         AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
     fi
 
     AC_MSG_CHECKING(for readdir_r)
     if test -z "$ac_cv_readdir_args"; then
-        AC_TRY_COMPILE(
-	[
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
 
 #if defined(HAVE_DIRENT_H)
@@ -813,17 +813,15 @@
 #   if defined(HAVE_NDIR_H)
 #       include <ndir.h>
 #   endif
-#endif  ],
-        [
+#endif  ], [
         struct dirent dir, *dirp;
         DIR *mydir;
         dirp = readdir_r(mydir, &dir);
-	], ac_cv_readdir_args=2)
+	])],[ac_cv_readdir_args=2],[])
     fi
     if test -z "$ac_cv_readdir_args"; then
 	
-        AC_TRY_COMPILE(
-        [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
 #if defined(HAVE_DIRENT_H)
 #   include <dirent.h>
@@ -840,13 +838,12 @@
 #   if defined(HAVE_NDIR_H)
 #       include <ndir.h>
 #   endif
-#endif  ],
-        [
+#endif  ], [
         struct dirent dir, *dirp;
         DIR *mydir;
         int rc;
         rc = readdir_r(mydir, &dir, &dirp);
-        ], ac_cv_readdir_args=3)
+        ])],[ac_cv_readdir_args=3],[])
     fi
 
     if test -z "$ac_cv_readdir_args"; then
@@ -854,47 +851,41 @@
         have_missing_r_funcs="$have_missing_r_funcs readdir_r"
     else
         if test "$ac_cv_readdir_args" = 2; then
-            AC_DEFINE(HAVE_READDIR_R_2)
+            AC_DEFINE(HAVE_READDIR_R_2,,
+              [Define to use the two-argument variant of readdir_r])
         elif test "$ac_cv_readdir_args" = 3; then
-            AC_DEFINE(HAVE_READDIR_R_3)
+            AC_DEFINE(HAVE_READDIR_R_3,,
+              [Define to use the three-argument variant of readdir_r])
         fi
         AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
     fi
 
     AC_MSG_CHECKING(for gethostbyname_r)
     if test -z "$ac_cv_gethostbyname_args"; then
-        AC_TRY_COMPILE(
-	    [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
 struct hostent *hp;
 struct hostent h;
 char *name;
 char buffer[10];
 int  h_errno;
-hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);],
-            ac_cv_gethostbyname_args=5)
+hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);])],[ac_cv_gethostbyname_args=5],[])
     fi
     if test -z "$ac_cv_gethostbyname_args"; then
-        AC_TRY_COMPILE(
-	    [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
 struct hostent h;
 struct hostent_data hdata;
 char *name;
 int  rc;
-rc = gethostbyname_r(name, &h, &hdata);],
-            ac_cv_gethostbyname_args=3)
+rc = gethostbyname_r(name, &h, &hdata);])],[ac_cv_gethostbyname_args=3],[])
     fi
     if test -z "$ac_cv_gethostbyname_args"; then
-        AC_TRY_COMPILE(
-	    [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
 struct hostent h;
 struct hostent *hp;
 char *name;
@@ -903,30 +894,30 @@
 int h_errno;
 
 rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
-	    ],
-	    ac_cv_gethostbyname_args=6)
+	    ])],[ac_cv_gethostbyname_args=6],[])
     fi
     if test -z "$ac_cv_gethostbyname_args"; then
         AC_MSG_RESULT(no)
         have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"
     else
         if test "$ac_cv_gethostbyname_args" = 3; then
-            AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
+            AC_DEFINE(HAVE_GETHOSTBYNAME_R_3,,
+              [Define to use the three-argument variant of gethostbyname_r])
         elif test "$ac_cv_gethostbyname_args" = 5; then
-            AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
+            AC_DEFINE(HAVE_GETHOSTBYNAME_R_5,,
+              [Define to use the five-argument variant of gethostbyname_r])
         elif test "$ac_cv_gethostbyname_args" = 6; then
-            AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
+            AC_DEFINE(HAVE_GETHOSTBYNAME_R_6,,
+              [Define to use the six-argument variant of gethostbyname_r])
         fi
         AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
     fi
 
     AC_MSG_CHECKING(for gethostbyaddr_r)
     if test -z "$ac_cv_gethostbyaddr_args"; then
-	AC_TRY_COMPILE(
-	    [
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
                 char * address;
                 int length;
                 int type;
@@ -934,16 +925,13 @@
                 struct hostent_data hdata;
                 int rc;
                 rc = gethostbyaddr_r(address, length, type, &h, &hdata);
-	    ],
-	    ac_cv_gethostbyaddr_args=5)
+	    ])],[ac_cv_gethostbyaddr_args=5],[])
 	
     fi
     if test -z "$ac_cv_gethostbyaddr_args"; then
-	AC_TRY_COMPILE(
-	    [
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
                 char * address;
                 int length;
                 int type;
@@ -955,16 +943,13 @@
 
 		hp = gethostbyaddr_r(address, length, type, &h,
 				     buffer, buflen, &h_errnop);
-	    ],
-	    ac_cv_gethostbyaddr_args=7)
+	    ])],[ac_cv_gethostbyaddr_args=7],[])
     fi
 
     if test -z "$ac_cv_gethostbyaddr_args"; then
-	AC_TRY_COMPILE(
-	    [
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
-#include <netdb.h>],
-	    [
+#include <netdb.h>], [
                 char * address;
                 int length;
                 int type;
@@ -977,27 +962,28 @@
 
 		rc = gethostbyaddr_r(address, length, type, &h,
 				     buffer, buflen, &hp, &h_errnop);
-	    ],
-	    ac_cv_gethostbyaddr_args=8)
+	    ])],[ac_cv_gethostbyaddr_args=8],[])
     fi
     if test -z "$ac_cv_gethostbyaddr_args"; then
         AC_MSG_RESULT(no)
         have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"
     else
         if test "$ac_cv_gethostbyaddr_args" = 5; then
-            AC_DEFINE(HAVE_GETHOSTBYADDR_R_5)
+            AC_DEFINE(HAVE_GETHOSTBYADDR_R_5,,
+              [Define to use the five-argument variant of gethostbyaddr_r])
         elif test "$ac_cv_gethostbyaddr_args" = 7; then
-            AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
+            AC_DEFINE(HAVE_GETHOSTBYADDR_R_7,,
+              [Define to use the seven-argument variant of gethostbyaddr_r])
         elif test "$ac_cv_gethostbyaddr_args" = 8; then
-            AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
+            AC_DEFINE(HAVE_GETHOSTBYADDR_R_8,,
+              [Define to use the eight-argument variant of gethostbyaddr_r])
         fi
         AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyaddr_args arguments])
     fi
 
     AC_MSG_CHECKING(for getlogin_r)
     if test -z "$ac_cv_getlogin_r_style"; then
-	AC_TRY_RUN(
-	    [
+	AC_RUN_IFELSE([AC_LANG_SOURCE([
 #include <unistd.h>
 
 int main()
@@ -1027,14 +1013,11 @@
 	return 1; /* returns pointer on success */
     }
 }
-	    ],
-	    [
+	    ])],[
 		ac_cv_getlogin_r_style=1
-	    ],
-	    [
+	    ],[
 		ac_cv_getlogin_r_style=2
-	    ],
-	    [
+	    ],[
 		ac_cv_getlogin_r_style=
 	    ])
     fi
@@ -1043,10 +1026,12 @@
         have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
     else
 	if test $ac_cv_getlogin_r_style = 1; then
-	    AC_DEFINE(GETLOGIN_R_RETURNS_INT)
+	    AC_DEFINE(GETLOGIN_R_RETURNS_INT,,
+              [Define if getlogin_r returns an integer])
 	    AC_MSG_RESULT([yes, and it returns an int])
 	elif test $ac_cv_getlogin_r_style = 2; then
-	    AC_DEFINE(GETLOGIN_R_RETURNS_POINTER)
+	    AC_DEFINE(GETLOGIN_R_RETURNS_POINTER,,
+              [Define if getlogin_r returns a pointer])
 	    AC_MSG_RESULT([yes, and it returns a pointer])
 	else
 	    AC_MSG_RESULT(no: result is $ac_cv_getlogin_r_style)
@@ -1066,19 +1051,19 @@
     ;;
   *) 
     AC_MSG_RESULT(yes)
-    AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
+    AC_DEFINE(_POSIX_SOURCE,,[x]) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
     ;;
   esac ],
   AC_MSG_RESULT(no)
 )
 
 AC_ARG_ENABLE(cyrillic, [  --enable-cyrillic       include support for Cyrillic in line mode browser],
-  AC_DEFINE(CYRILLIC)
+  AC_DEFINE(CYRILLIC,, [Define to build Cyrillic version])
   A_STDIO="a_stdio.o", A_STDIO="")
 AC_SUBST(A_STDIO)
 
 dnl Create output files
-AC_OUTPUT([Makefile libwww-config w3c-libwww.spec
+AC_CONFIG_FILES([Makefile libwww-config w3c-libwww.spec
 config/Makefile
 modules/Makefile
 modules/expat/Makefile modules/expat/xmltok/Makefile modules/expat/xmlparse/Makefile
@@ -1086,7 +1071,6 @@
 Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
 Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
 Library/User/Style/Makefile Library/User/Platform/Makefile
-Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
 Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile 
 Library/src/SSL/Makefile Library/src/SSL/windows/Makefile
 Library/Examples/Makefile
@@ -1099,4 +1083,6 @@
 ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile ComLine/src/windows/Makefile
 WinCom/Makefile WinCom/hlp/Makefile WinCom/res/Makefile
 Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
-], date>stamp-h)
+])
+AC_CONFIG_COMMANDS([default],[date>stamp-h],[])
+AC_OUTPUT
1-acinclude-m4.diff (text/plain, 3.8 KB)
--- acinclude.m4	1998-06-03 17:58:09.000000000 +0200
+++ new/acinclude.m4	2003-09-27 17:51:29.000000000 +0200
@@ -21,7 +21,7 @@
 dnl substitution.                                             ##
 dnl --------------------------------------------------------- ##
 
-dnl AC_DEFUN(fp_PROG_INSTALL,
+dnl AC_DE FUN(fp_PROG_INSTALL,
 dnl [AC_PROG_INSTALL
 dnl test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL} -m 755'
 dnl AC_SUBST(INSTALL_SCRIPT)dnl
@@ -251,19 +251,6 @@
 done
 ])
 
-dnl AC_C_VOLATILE
-AC_DEFUN(AC_C_VOLATILE,
-[ AC_MSG_CHECKING([for working volatile])
-  AC_CACHE_VAL(ac_cv_c_volatile,
-  [ AC_TRY_COMPILE(,[
-extern volatile int errno;
-], ac_cv_c_volatile=yes, ac_cv_c_volatile=no)])dnl
-  AC_MSG_RESULT($ac_cv_c_volatile)
-if test $ac_cv_c_volatile = no; then
-  AC_DEFINE(volatile, )
-fi
-])
-
 dnl AC_C_NOSHARE
 AC_DEFUN(AC_C_NOSHARE,
 [ AC_MSG_CHECKING([for working noshare])
@@ -403,23 +390,6 @@
   fi
 ])
 
-dnl AC_HEADER_TIOCGWINSZ
-AC_DEFUN(AC_HEADER_TIOCGWINSZ,
-[ AC_MSG_CHECKING([for TIOCGWINSZ get-window-size capability])
-  AC_CACHE_VAL(ac_cv_header_tiocgwinsz,
-  [ AC_HEADER_INCLUDE(tmp_inc_termios, sys/termios.h termios.h)
-    AC_EGREP_HEADER(yes, [
-$tmp_inc_termios
-#ifdef TIOCGWINSZ
- yes
-#endif
-], ac_cv_header_tiocgwinsz=yes, ac_cv_header_tiocgwinsz=no)])dnl
-  AC_MSG_RESULT($ac_cv_header_tiocgwinsz)
-if test $ac_cv_header_tiocgwinsz = yes; then
-  AC_DEFINE(GET_SCREEN_SIZE)
-fi
-])
-
 dnl AC_SYS_NEED_SIGNAL_RESET
 dnl If signal handlers need to be reset, define NEED_SIGNAL_RESET
 AC_DEFUN(AC_SYS_NEED_SIGNAL_RESET, 
@@ -465,7 +435,8 @@
   ac_cv_struct_gmtoff=yes, ac_cv_struct_gmtoff=no)])
   AC_MSG_RESULT($ac_cv_struct_gmtoff)
 if test $ac_cv_struct_gmtoff = yes; then
-  AC_DEFINE(HAVE_TM_GMTOFF)
+  AC_DEFINE(HAVE_TM_GMTOFF,,
+    [Define this if tm structure includes a tm_gmtoff entry])
 fi
 
 AC_MSG_CHECKING(for time.h that defines timezone)
@@ -475,7 +446,8 @@
   ac_cv_extern_timezone=no)])
 AC_MSG_RESULT($ac_cv_extern_timezone)
 if test $ac_cv_extern_timezone = yes; then
-  AC_DEFINE(HAVE_TIMEZONE)
+  AC_DEFINE(HAVE_TIMEZONE,,
+     [Define this if you have the external variable 'timezone'])
 fi
 
 dnl Borrowed from the Python distribution...
@@ -486,7 +458,8 @@
   ac_cv_extern_altzone=no)])
 AC_MSG_RESULT($ac_cv_extern_altzone)
 if test $ac_cv_extern_altzone = yes; then
-  AC_DEFINE(HAVE_ALTZONE)
+  AC_DEFINE(HAVE_ALTZONE,,
+     [Define this if you have the external variable 'altzone'])
 fi
 
 AC_MSG_CHECKING(for time.h that defines daylight)
@@ -496,7 +469,8 @@
   ac_cv_extern_daylight=no)])
 AC_MSG_RESULT($ac_cv_extern_daylight)
 if test $ac_cv_extern_daylight = yes; then
-  AC_DEFINE(HAVE_DAYLIGHT)
+  AC_DEFINE(HAVE_DAYLIGHT,,
+    [Define this if you have the external variable 'daylight'])
 fi
 
 if test $ac_cv_extern_timezone = yes; then
@@ -528,7 +502,8 @@
   ac_cv_backwards_timezone=cross-compiling)])
   AC_MSG_RESULT($ac_cv_backwards_timezone)
 if test $ac_cv_backwards_timezone = yes; then
-  AC_DEFINE(NEGATIVE_TIMEZONE)
+  AC_DEFINE(NEGATIVE_TIMEZONE,,
+    [Define this if the extern timezone is negative])
 fi
 fi
 ])dnl
@@ -656,7 +631,8 @@
 ], [struct winsize foo;], 
     ac_cv_struct_winsize=yes, ac_cv_struct_winsize=no)])
   if test $ac_cv_struct_winsize = yes ; then
-    AC_DEFINE(HAVE_WINSIZE)
+    AC_DEFINE(HAVE_WINSIZE,,
+      [Define this if your ioctl understands the winsize structure])
   fi
 ])
 
@@ -669,7 +645,8 @@
 ac_cv_c_long_time_t=no, ac_cv_c_long_time_t=yes)
 ])
 if test $ac_cv_c_long_time_t = yes; then
-  AC_DEFINE(HAVE_LONG_TIME_T)
+  AC_DEFINE(HAVE_LONG_TIME_T,,
+    [Define if time_t is of type long])
 fi
 ])
 
@@ -682,7 +659,8 @@
 ac_cv_c_long_size_t=yes, ac_cv_c_long_size_t=no)
 ])
 if test $ac_cv_c_long_size_t = yes; then
-  AC_DEFINE(HAVE_LONG_SIZE_T)
+  AC_DEFINE(HAVE_LONG_SIZE_T,,
+    [Define if size_t is of type long])
 fi
 ])
2-Makefile-am.diff (text/plain, 6.3 KB)
--- PICS-client/src/Makefile.am	2000-08-04 11:48:37.000000000 +0200
+++ PICS-client/src/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -30,6 +30,8 @@
 	CSMacRed.c	CSMem.c		CSApp.c \
 	CSParse.c	CSUsrLst.c	CSUser.c
 
+libpics_la_LDFLAGS = -lwwwapp -lwwwcore -lwwwfile -lwwwmime -lwwwutils
+
 BUILT_SOURCES = \
 	CSLApp.h	CSLUtils.h \
 	CSLL.h		CSLLSt.h \
--- modules/expat/xmltok/Makefile.am	2000-08-28 10:52:01.000000000 +0200
+++ modules/expat/xmltok/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -1,8 +1,8 @@
 ## Process this file with Automake to create Makefile.in.
 
-LDFLAGS = -version-info "1:0:1"
+AM_LDFLAGS = -version-info "1:0:1"
 
-CFLAGS = @CFLAGS@ -DXML_NS
+AM_CFLAGS = -DXML_NS
 
 lib_LTLIBRARIES = \
 	@XMLTOK@
--- modules/expat/xmlparse/Makefile.am	2000-06-14 10:53:42.000000000 +0200
+++ modules/expat/xmlparse/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -1,8 +1,8 @@
 ## Process this file with Automake to create Makefile.in.
 
-LDFLAGS = -version-info "1:0:1"
+AM_LDFLAGS = -version-info "1:0:1"
 
-CFLAGS = @CFLAGS@ -DXML_NS
+AM_CFLAGS = -DXML_NS
 
 lib_LTLIBRARIES = \
 	@XMLPARSE@
@@ -17,7 +17,7 @@
 	hashtable.c \
 	xmlparse.c
 
-libxmlparse_la_LDFLAGS = -rpath $(libdir)
+libxmlparse_la_LDFLAGS = -rpath $(libdir) -lxmltok
 
 pkginclude_HEADERS = \
 	xmlparse.h
--- Makefile.am	2002-06-07 12:27:02.000000000 +0200
+++ Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -42,7 +42,7 @@
 	chmod -R a+r $(distdir)
 	zip -rq $(distdir).zip $(distdir)
 	$(TAR) chofz $(distdir).tgz $(distdir)
-	# gzip -f $(distdir).tar
+#	gzip -f $(distdir).tar
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.
--- Library/src/SSL/Makefile.am	2000-06-20 13:01:34.000000000 +0200
+++ Library/src/SSL/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -1,6 +1,6 @@
 ## Process this file with Automake to create Makefile.in.
 
-LDFLAGS = -version-info "1:0:1"
+AM_LDFLAGS = -version-info "1:0:1"
 
 lib_LTLIBRARIES = @WWWSSL@
 
@@ -39,7 +39,8 @@
 	HTSSLhttps.h \
 	HTSSLhttps.c
 
-libwwwssl_la_LDFLAGS = -rpath $(libdir)
+libwwwssl_la_LDFLAGS = -rpath $(libdir) -lwwwapp -lwwwcore -lwwwhttp \
+	-lwwwtrans -lwwwutils
 
 LDADD = \
 	libwwwssl.la
--- Library/src/Makefile.am	2002-05-29 18:09:13.000000000 +0200
+++ Library/src/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -1,6 +1,6 @@
 ## Process this file with Automake to create Makefile.in.
 
-LDFLAGS = -version-info "1:0:1"
+AM_LDFLAGS = -version-info "1:0:1"
 
 lib_LTLIBRARIES = \
 	libwwwutils.la \
@@ -17,11 +17,11 @@
 	libwwwnews.la \
 	libwwwtelnet.la \
 	libwwwhtml.la \
+	@WWWXML@ \
 	libwwwapp.la \
 	libwwwinit.la \
 	libwwwmux.la \
         @WWWDAV@ \
-	@WWWXML@ \
 	@WWWZIP@ \
 	@WWWWAIS@ \
 	@WWWSQL@
@@ -50,7 +50,7 @@
     endif
 
 icondir = @icondir@
-CPPFLAGS := $(CPPFLAGS) -DW3C_ICONS=\"$(icondir)\"
+AM_CPPFLAGS = -DW3C_ICONS=\"$(icondir)\"
 
 inc: $(BUILT_SOURCES)
 	@echo Generated built sources
@@ -144,6 +144,8 @@
 	HTWWWStr.h \
 	HTWWWStr.c
 
+libwwwcore_la_LDFLAGS = -lwwwutils
+
 libwwwtrans_la_SOURCES = \
 	WWWTrans.h \
 	HTANSI.h \
@@ -159,6 +161,8 @@
 	HTWriter.h \
 	HTWriter.c
 
+libwwwtrans_la_LDFLAGS = -lwwwcore -lwwwutils
+
 libwwwstream_la_SOURCES = \
 	WWWStream.h \
 	HTConLen.h \
@@ -182,11 +186,15 @@
 	HTXParse.h \
 	HTXParse.c
 
+libwwwstream_la_LDFLAGS = -lwwwcore -lwwwfile -lwwwutils
+
 libwwwcache_la_SOURCES = \
 	WWWCache.h \
 	HTCache.h \
 	HTCache.c
 
+libwwwcache_la_LDFLAGS = -lwwwcore -lwwwtrans -lwwwutils
+
 libwwwfile_la_SOURCES = \
 	WWWFile.h \
 	HTBInit.h \
@@ -198,6 +206,8 @@
 	HTMulti.h \
 	HTMulti.c
 
+libwwwfile_la_LDFLAGS = -lwwwcore -lwwwdir -lwwwtrans -lwwwutils
+
 libwwwftp_la_SOURCES = \
 	WWWFTP.h \
 	HTFTP.h \
@@ -205,11 +215,15 @@
 	HTFTPDir.h \
 	HTFTPDir.c
 
+libwwwftp_la_LDFLAGS = -lwwwcore -lwwwdir -lwwwfile -lwwwutils
+
 libwwwgopher_la_SOURCES = \
 	WWWGophe.h \
 	HTGopher.h \
 	HTGopher.c
 
+libwwwgopher_la_LDFLAGS = -lwwwcore -lwwwdir -lwwwhtml -lwwwutils
+
 libwwwmime_la_SOURCES = \
 	WWWMIME.h \
 	HTBound.h \
@@ -226,6 +240,8 @@
 	HTMIMImp.c \
 	HTMulpar.h
 
+libwwwmime_la_LDFLAGS = -lwwwcache -lwwwcore -lwwwstream -lwwwutils
+
 libwwwhttp_la_SOURCES = \
 	WWWHTTP.h \
 	HTTPUtil.h \
@@ -252,6 +268,8 @@
 	HTPEP.h \
 	HTPEP.c
 
+libwwwhttp_la_LDFLAGS = -lmd5 -lwwwcore -lwwwmime -lwwwstream -lwwwutils
+
 libwwwhttp_la_DEPENDENCIES = \
 	../../modules/md5/libmd5.la
 
@@ -266,11 +284,15 @@
 	HTNewsRq.h \
 	HTNewsRq.c
 
+libwwwnews_la_LDFLAGS = -lwwwcore -lwwwhtml -lwwwmime -lwwwstream -lwwwutils
+
 libwwwtelnet_la_SOURCES = \
 	WWWTelnt.h \
 	HTTelnet.h \
 	HTTelnet.c
 
+libwwwtelnet_la_LDFLAGS = -lwwwcore -lwwwutils
+
 libwwwwais_la_SOURCES = \
 	WWWWAIS.h \
 	HTWAIS.h \
@@ -302,6 +324,8 @@
 	HTStyle.h \
 	HTStyle.c
 
+libwwwhtml_la_LDFLAGS = -lwwwcore -lwwwutils
+
 libwwwdir_la_SOURCES = \
 	WWWDir.h \
 	HTIcons.h \
@@ -311,6 +335,8 @@
 	HTDir.h \
 	HTDir.c
 
+libwwwdir_la_LDFLAGS = -lwwwcore -lwwwfile -lwwwhtml -lwwwutils
+
 libwwwapp_la_SOURCES = \
 	WWWApp.h \
 	HTAccess.h \
@@ -334,11 +360,18 @@
 	HTRules.h \
 	HTRules.c
 
+libwwwapp_la_LDFLAGS = -lwwwcache -lwwwcore -lwwwdir -lwwwfile -lwwwftp \
+	-lwwwgopher -lwwwhtml -lwwwhttp -lwwwmime -lwwwnews -lwwwstream \
+	-lwwwtelnet -lwwwtrans -lwwwutils -lwwwzip -lxmlparse -lwwwxml
+
 libwwwinit_la_SOURCES = \
 	WWWInit.h \
 	HTProfil.h \
 	HTProfil.c
 
+libwwwinit_la_LDFLAGS = -lwwwapp -lwwwcache -lwwwcore -lwwwfile -lwwwhtml \
+	-lwwwutils
+
 libwwwmux_la_SOURCES = \
 	WWWMux.h \
 	HTDemux.h \
@@ -349,6 +382,8 @@
 	HTMuxTx.h \
 	HTMuxTx.c
 
+libwwwmux_la_LDFLAGS = -lwwwcore -lwwwstream -lwwwtrans -lwwwutils
+
 libwwwdav_la_SOURCES = \
         HTDAV.h \
         HTDAV.c
@@ -366,7 +401,7 @@
 	../../modules/expat/xmltok/libxmltok.la \
 	../../modules/expat/xmlparse/libxmlparse.la
 
-libwwwxml_la_LDFLAGS = -rpath $(libdir)
+libwwwxml_la_LDFLAGS = -rpath $(libdir) -lwwwcore -lwwwutils -lxmlparse
 
 libwwwzip_la_SOURCES = \
 	WWWZip.h \
@@ -374,7 +409,7 @@
 	HTZip.h \
 	HTZip.c
 
-libwwwzip_la_LDFLAGS = -rpath $(libdir)
+libwwwzip_la_LDFLAGS = -rpath $(libdir) -lwwwcore -lwwwutils
 
 libwwwsql_la_SOURCES = \
 	WWWSQL.h \
--- Library/User/Makefile.am	2002-06-06 16:59:37.000000000 +0200
+++ Library/User/Makefile.am	2003-09-27 17:51:29.000000000 +0200
@@ -11,8 +11,8 @@
 
 SUBDIRS = Patch Architecture Using Guide Style Platform
 
-BUILT_SOURCES = \
-	Extrnals.html
+#BUILT_SOURCES = \
+#	Extrnals.html
 
 SUFFIXES = .html
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/dcoreeb23IiDVPcRAmy2AJ9vz3V8tRxKqrQekbTtCjyJDfwLyQCfYjxJ
BO1WyHH1t55ZsRAQHtZ4iFI=
=uhSY
-----END PGP SIGNATURE-----