--- configure.in	2006-01-07 03:48:10.000000000 +0100
+++ /home/mbanck/src/cvs/hurd-automake/automake/configure.ac	2006-01-07 03:05:02.000000000 +0100
@@ -1,8 +1,10 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_REVISION([$Id: configure.in,v 1.34 2002/08/30 00:27:32 roland Exp $])
-AC_PREREQ(2.12)			dnl Minimum Autoconf version required.
-AC_INIT(hurd/hurd_types.h)	dnl A distinctive file to look for in srcdir.
+AC_PREREQ(2.54)			dnl Minimum Autoconf version required.
+AC_INIT
+AC_CONFIG_SRCDIR([hurd/hurd_types.h]) dnl A distinctive file to look for in srcdir.
 
+AM_INIT_AUTOMAKE(hurd, 0.3)
 AC_PREFIX_DEFAULT()		dnl Default to empty prefix, not /usr/local.
 
 AC_CANONICAL_HOST
@@ -75,10 +77,7 @@
 AC_PROG_INSTALL
 AC_PROG_AWK
 
-AC_CHECK_TOOL(CC, gcc)
-# That check handles cross-compilation well, but AC_PROG_CC tests for GCC
-# and sets default CFLAGS nicely for us, so do that too.
-hurd_PROG_CC
+AC_PROG_CC
 # Require GCC.
 if test x$GCC != xyes; then
   AC_MSG_ERROR([this code uses GNU C extensions, you must compile with GCC])
@@ -90,6 +89,8 @@
 AC_CHECK_TOOL(RANLIB, ranlib)
 AC_CHECK_TOOL(MIG, mig)
 
+AM_PROG_AS
+
 dnl Let these propagate from the environment.
 AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS)
 
@@ -114,11 +115,11 @@
 } VERS_1;
 EOF
 
-if AC_TRY_COMMAND([eval $ac_compile 1>&AC_FD_CC]) &&
+if AC_TRY_COMMAND([eval $ac_compile 1>&AS_MESSAGE_LOG_FD()]) &&
    AC_TRY_COMMAND([${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
 				    -nostartfiles -nostdlib
 				    -Wl,--version-script,conftest.map
-		   1>&AC_FD_CC]); then
+		   1>&AS_MESSAGE_LOG_FD()]); then
   hurd_cv_ld_version_script_option=yes
 else
   hurd_cv_ld_version_script_option=no
@@ -181,20 +182,79 @@
 # Check for ncursesw, which is needed for the console-curses client.
 hurd_LIB_NCURSESW
 
-if test -f ./$ac_unique_file; then
-  # Configuring in source directory; don't create any Makefiles.
-  makefiles=
-else
-  # We are configuring in a separate build tree.
-  # Create a Makefile in the top-level build directory and
-  # one for each subdirectory Makefile in the source.
-  makefiles="Makeconf:build.mkcf.in \
-	     `cd $srcdir; for file in Makefile */Makefile; do \
-			    echo ${file}:build.mk.in; done`"
-fi
+AM_PROG_LIBTOOL
+
+hurddir="\${prefix}/hurd"
+AC_SUBST(hurddir)
 
-AC_OUTPUT(config.make ${makefiles})
+bootdir="\${prefix}/boot"
+AC_SUBST(bootdir)
 
+# The following directories exist in the tree, but don't get distributed.
+# libdirmgt/Makefile
+# libtreefs/Makefile
+# bsdfsck/Makefile
+
+#        	 boot/Makefile
+#        	 console/Makefile
+#		 console-client/Makefile
+#        	 pfinet/Makefile
+
+AC_CONFIG_FILES([config.make 
+                 Makefile
+          	 debian/Makefile 
+              	 libcons/Makefile 
+              	 libdiskfs/Makefile
+              	 libfshelp/Makefile
+              	 libftpconn/Makefile
+              	 libhurdbugaddr/Makefile
+              	 libihash/Makefile 
+              	 libiohelp/Makefile
+        	 libnetfs/Makefile
+        	 libpager/Makefile
+        	 libpipe/Makefile
+        	 libports/Makefile 
+        	 libps/Makefile
+		 libpthread/Makefile
+        	 libshouldbeinlibc/Makefile
+        	 libstore/Makefile
+        	 libthreads/Makefile
+        	 libtrivfs/Makefile
+        	 auth/Makefile
+        	 benchmarks/Makefile
+        	 config/Makefile
+        	 daemons/Makefile
+        	 defpager/Makefile
+        	 doc/Makefile
+        	 exec/Makefile
+        	 ext2fs/Makefile
+        	 fstests/Makefile
+        	 ftpfs/Makefile
+        	 hostmux/Makefile
+        	 hurd/Makefile
+        	 include/Makefile
+        	 init/Makefile
+        	 isofs/Makefile
+        	 login/Makefile
+        	 nfs/Makefile
+        	 nfsd/Makefile
+        	 mach-defpager/Makefile
+        	 pflocal/Makefile
+        	 proc/Makefile
+        	 release/Makefile
+        	 serverboot/Makefile
+        	 storeio/Makefile
+        	 sutils/Makefile
+        	 term/Makefile
+        	 tmpfs/Makefile
+        	 trans/Makefile
+        	 ufs/Makefile
+        	 ufs-fsck/Makefile
+        	 ufs-utils/Makefile
+        	 usermux/Makefile
+        	 utils/Makefile])
+AC_OUTPUT
+        
 dnl Local Variables:
 dnl comment-start: "dnl "
 dnl comment-end: ""
