2004-09-06  Neal H. Walfield  <neal@cs.uml.edu>

	* configure.in: Update to use autoconf 2.57.
	Update version to 1.4.
	Do not error out if host_os is not GNU.
	Update AC_DEFINEs to the required three argument form.
	Don't call AC_CHECK_TOOL(CC, gcc) and AC_PROG_CC_LOCAL, just usee
	AC_PROG_CC.
	AC_SUBST(LDFLAGS).
	Refactor AC_CONFIG_SUBDIRS to not do variable substitution.
	Call AC_CONFIG_FILES and use the new form of AC_OUTPUT.
	* i386/configure.in: Require autoconf 2.57.
	* linux/configure.in: Likewise.
	* i386/linux/Drivers.in: Move from here...
	* i386/linux/configure.ac: ... to here to conform to the
	environment autoreconf expects.
	(hurd_host_CPU): New macro.
	Call AC_PROG_CC, not AC_PROG_CC_LOCAL.
	AC_SUBST(LD_FLAGS).
	(flashpoint): Update AC_DEFINE to the new three argument form.
	Comment out the u1434f and viarhine drivers which break autoconf.
	* Drivers.macros (AC_DRIVER_ALIAS): Update AC_DEFINE to the new
	three argument form.
	(AC_DRIVER): Likewise.


--- i386/linux/configure.ac	2001-05-27 13:44:22.000000000 +0100
+++ i386/linux/configure.ac	2004-09-06 17:41:08.000000000 +0100
@@ -13,7 +13,7 @@ dnl LIABILITY OF ANY KIND FOR ANY DAMAGE
 dnl USE OF THIS SOFTWARE.
 
 AC_INIT(dev/include/linux/autoconf.h)
-AC_PREREQ(2.12)
+AC_PREREQ(2.57)
 
 sinclude([../../Drivers.macros])
 sinclude([../../aclocal.m4])
@@ -24,25 +24,28 @@ dnl Check the cpu type.
 
 AC_CANONICAL_HOST
 
+dnl Which host CPU
+AC_DEFUN(hurd_host_CPU, [
+AC_DEFINE([CONFIG_M$1],,[$1])
+AC_DEFINE(CPU,$1,[CPU])
+])
+
+
 case "$host_cpu" in
-i386) AC_DEFINE(CONFIG_M386)
-      AC_DEFINE(CPU, 386)    ;;
-i486) AC_DEFINE(CONFIG_M486)
-      AC_DEFINE(CPU, 486)    ;;
-i586) AC_DEFINE(CONFIG_M586)
-      AC_DEFINE(CPU, 586)    ;;
-i686) AC_DEFINE(CONFIG_M686)
-      AC_DEFINE(CPU, 686)    ;;
-*)    AC_DEFINE(CONFIG_M486)
-      AC_DEFINE(CPU, 486)    ;;
+i386) hurd_host_CPU(386) ;;
+i486) hurd_host_CPU(486) ;;
+i586) hurd_host_CPU(586) ;;
+i686) hurd_host_CPU(686) ;;
+*)    hurd_host_CPU(486) ;;
 esac
 
 hurd_SYSTYPE
 
 AC_CHECK_TOOL(CC, gcc)
-AC_PROG_CC_LOCAL
+AC_PROG_CC
 
 AC_CHECK_TOOL(LD, ld)
+AC_SUBST(LDFLAGS)
 
 
 dnl Aliases have to come first.
@@ -122,7 +125,7 @@ dnl SCSI Disk controllers
 
 linux_DRIVER(advansys, SCSI_ADVANSYS, advansys, scsi)
 linux_DRIVER(buslogic, SCSI_BUSLOGIC, BusLogic, scsi)
-linux_DRIVER(u1434f, SCSI_U14_34F, u14-34f, scsi)
+# linux_DRIVER(u1434f, SCSI_U14_34F, u14-34f, scsi)
 linux_DRIVER(ultrastor, SCSI_ULTRASTOR, ultrastor, scsi)
 linux_DRIVER(aha152x, SCSI_AHA152X, aha152x, scsi)
 linux_DRIVER(aha1542, SCSI_AHA1542, aha1542, scsi)
@@ -150,11 +153,10 @@ linux_DRIVER(qlogicisp, SCSI_QLOGIC_ISP,
 linux_DRIVER(gdth, SCSI_GDTH, gdth, scsi)
 dnl Dirty implementation...
 
-AC_ARG_ENABLE(flashpoint,,[
-if test ${enableval} = no; then
-  AC_DEFINE(CONFIG_SCSI_OMIT_FLASHPOINT)
+AC_ARG_ENABLE(flashpoint,,[flashpoint=$enableval], [flashpoint=no])
+if test x"$flashpoint" = xno; then
+  AC_DEFINE(CONFIG_SCSI_OMIT_FLASHPOINT, [], [scsi omit flashpoint])
 fi
-])
 
 
 dnl Ethernet controllers
@@ -202,5 +204,5 @@ linux_DRIVER(yellowfin, YELLOWFIN, yello
 linux_DRIVER(rtl8139, RTL8139, rtl8139, net)
 linux_DRIVER(epic, EPIC, epic100, net)
 linux_DRIVER(tlan, TLAN, tlan, net)
-linux_DRIVER(viarhine, VIA_RHINE, via-rhine, net)
+# linux_DRIVER(viarhine, VIA_RHINE, via-rhine, net)
 AC_OUTPUT(Makefile)

Index: configure.in
===================================================================
RCS file: /cvsroot/hurd/gnumach/configure.in,v
retrieving revision 1.12
diff -u -p -r1.12 configure.in
--- configure.in	23 May 2002 00:06:36 -0000	1.12
+++ configure.in	7 Sep 2004 08:53:45 -0000
@@ -1,5 +1,5 @@
 dnl Configure script for GNU Mach.
-dnl Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+dnl Copyright 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
 
 dnl Permission to use, copy, modify and distribute this software and its
 dnl documentation is hereby granted, provided that both the copyright
@@ -12,11 +12,9 @@ dnl "AS IS" CONDITION.  THE FREE SOFTWAR
 dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
 dnl USE OF THIS SOFTWARE.
 
-AC_INIT(kern/ipc_kobject.c)
-AC_PREREQ(2.12)
-
-VERSION=1.3
-AC_SUBST(VERSION)
+AC_INIT([GNU Mach], [1.4], [bug-hurd@gnu.org], [gnumach])
+AC_CONFIG_SRCDIR([kern/ipc_kobject.c])
+AC_PREREQ(2.57)
 
 #
 # Deduce output var `systype' from configuration parms.
@@ -28,11 +26,6 @@ i[[3456]]86) systype=i386 ;;
 *) AC_MSG_ERROR([unsupported CPU type]) ;;
 esac
 
-case "$host_os" in
-gnu*) ;;
-*) AC_MSG_ERROR([sorry, this is the gnu os, not $host_os]) ;;
-esac
-
 AC_SUBST(systype)
 AC_SUBST(cross_compiling)
 
@@ -44,11 +37,12 @@ AC_PREFIX_DEFAULT()
 #
 AC_ARG_ENABLE(kdb,
 [  --enable-kdb             enable use of in-kernel debugger],
-[test "x$enableval" = xno || AC_DEFINE(MACH_KDB)])
+[test "x$enableval" = xno || AC_DEFINE(MACH_KDB, 1, [enable use of in-kernel debugger])])
 
 AC_ARG_ENABLE(kmsg,
 [  --enable-kmsg            enable use of kmsg device [default=yes]],
-[test "x$enableval" = xno || AC_DEFINE(MACH_KMSG)], [AC_DEFINE(MACH_KMSG)])
+[test "x$enableval" = xno || AC_DEFINE(MACH_KMSG, [], [enable use of kmsg device])],
+			    [AC_DEFINE(MACH_KMSG, [], [enable use of kmsg device])])
 
 #
 # Programs
@@ -56,13 +50,10 @@ AC_ARG_ENABLE(kmsg,
 
 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.
-AC_PROG_CC_LOCAL
+AC_PROG_CC
 
 AC_CHECK_TOOL(LD, ld)
+AC_SUBST(LDFLAGS)
 AC_CHECK_TOOL(NM, nm)
 
 AC_CHECK_TOOL(MIG, mig, mig)
@@ -70,9 +61,13 @@ AC_CHECK_TOOL(MIG, mig, mig)
 # Set up `machine' link in build directory for easier header file location.
 AC_LINK_FILES(${systype}/${systype},machine)
 
+AC_CONFIG_SUBDIRS([linux])
+
 # Do machine-specific configuration last so that it can override anything
 # set above if necessary.
+if test "$systype" = i386; then
+  AC_CONFIG_SUBDIRS([i386])
+fi
 
-AC_CONFIG_SUBDIRS(linux ${systype})
-
-AC_OUTPUT(Makefile version.c doc/Makefile)
+AC_CONFIG_FILES([Makefile version.c doc/Makefile])
+AC_OUTPUT
Index: Drivers.macros
===================================================================
RCS file: /cvsroot/hurd/gnumach/Attic/Drivers.macros,v
retrieving revision 1.5
diff -u -p -r1.5 Drivers.macros
--- Drivers.macros	23 Jul 1999 06:48:59 -0000	1.5
+++ Drivers.macros	7 Sep 2004 08:53:46 -0000
@@ -20,6 +20,7 @@ dnl same effect as --enable-canonical.
 
 AC_DEFUN(AC_DRIVER_ALIAS, [
 [#] Checking for alias [$1]
+AC_DEFINE([CONFIG_$1], [], [$1])
 AC_ARG_ENABLE([$1],,
 enable_[$2]="$enable_[$1]"
 )])
@@ -44,7 +45,7 @@ AC_DEFUN(AC_DRIVER, [
 [#] Checking for device driver option [$1]
 AC_ARG_ENABLE([$1],,
 if test "x$enableval" != xno; then
-AC_DEFINE([$2])
+AC_DEFINE([$2], [], [$1])
 device_drivers="$device_drivers [$3]"
 if test "${driver_class_[$4]_selected+set}" != set; then
   driver_class_[$4]_selected=yes
Index: i386/configure.in
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/Attic/configure.in,v
retrieving revision 1.2
diff -u -p -r1.2 configure.in
--- i386/configure.in	1 May 1999 00:34:11 -0000	1.2
+++ i386/configure.in	7 Sep 2004 08:53:46 -0000
@@ -14,7 +14,7 @@ dnl USE OF THIS SOFTWARE.
 
 
 AC_INIT(i386/i386asm.sym)
-AC_PREREQ(2.12)
+AC_PREREQ(2.57)
 
 #
 # Options
Index: linux/configure.in
===================================================================
RCS file: /cvsroot/hurd/gnumach/linux/Attic/configure.in,v
retrieving revision 1.2
diff -u -p -r1.2 configure.in
--- linux/configure.in	21 May 1999 23:22:33 -0000	1.2
+++ linux/configure.in	7 Sep 2004 08:53:46 -0000
@@ -13,7 +13,7 @@ dnl LIABILITY OF ANY KIND FOR ANY DAMAGE
 dnl USE OF THIS SOFTWARE.
 
 AC_INIT(src/include/linux/version.h)
-AC_PREREQ(2.12)
+AC_PREREQ(2.57)
 sinclude([../aclocal.m4])
 
 hurd_SYSTYPE
