summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-02-19 20:09:16 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:04 +0200
commit45268d3812e359e15cb1b4dacbe86e985e5ba305 (patch)
treea03b6b89b51d6560dd02a23f43a14c757ea542aa /configure.ac
parent61721bfa3309f017155c3cfaab6f246afa3d6b18 (diff)
2007-02-19 Thomas Schwinge <tschwinge@gnu.org>
Add a `--enable-platform' option for future use. Allow building without any Linux code. * Makefile.am: Don't include `linux/Makefrag.am' in there... * Makefrag.am: ... but rather in here. * configfrag.ac (MACH_MACHINE_ROUTINES): AC_DEFINE_UNQUOTED based on then shell variable `mach_machine_routines'. (--disable-default-device-drivers): Don't define in there... * configure.ac: ... but rather in here. (--enable-platform): New option. (host_platform): New variable. (HOST_i386): Don't define there... * i386/configfrag.ac (HOST_ix86): ... but rather here, rename it and adapt all users. (PLATFORM_at): New conditional. (MACH_MACHINE_ROUTINES): Don't AC_DEFINE, but rather set a shell variable `mach_machine_routines'. * linux/Makefrag.am (noinst_LIBRARIES, gnumach_o_LDADD): Only enhance ``if CODE_linux'' or ``if device_driver_group_pcmcia''. * linux/configfrag.ac (AC_OPTION): Rename to `AC_OPTION_Linux_ix86_at' and rework a bit. Adapt all users. (AC_OPTION_nodef): Rename to `AC_OPTION_Linux_ix86_at_nodef' and rework a bit. Adapt all users. (CODE_linux): New conditional. * i386/Makefrag.am (LINKFLAGS_gnumach): Don't evaluate $(systype). * Makefile.am: Update the FSF's postal address. * doc/Makefrag.am: Likewise. * i386/linux/Makefrag.am: Likewise. * linux/Makefrag.am: Likewise. * tests/Makefrag.am: Likewise. * tests/configfrag.ac: Move to GPL.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac78
1 files changed, 44 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 86357b18..9aa6ba66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
dnl Configure script for GNU Mach.
-dnl Copyright 1997, 1998, 1999, 2004, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 1997, 1998, 1999, 2004, 2006, 2007
+dnl 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
@@ -35,27 +36,35 @@ dnl We require GNU make.
)
#
-# Deduce the output variable `systype' from the configuration parameters.
+# Deduce the architecture we're building for.
#
AC_CANONICAL_HOST
-m4_define([set_HOST], [[
- case $host_cpu in
- $2)] AM_CONDITIONAL([HOST_$1], [true]) [
- systype=$1;;
- *)] AM_CONDITIONAL([HOST_$1], [false]) [;;
- esac
-]])
-
-[systype=unsupported]
-# Our supported architectures.
-set_HOST([i386],[i?86])
-
-[if test -f "$srcdir"/"$systype"/Makefrag.am; then :; else]
- AC_MSG_ERROR([unsupported CPU type $host_cpu])
-[fi]
+AC_ARG_ENABLE([platform],
+ AS_HELP_STRING([--enable-platform=PLATFORM], [specify the platform to build a
+ kernel for. Defaults to `at' for `i?86'. No other possibilities.]),
+ [host_platform=$enable_platform],
+ [host_platform=default])
+[# Supported configurations.
+case $host_platform:$host_cpu in
+ default:i?86)
+ host_platform=at;;
+ at:i?86)
+ :;;
+ *)]
+ AC_MSG_ERROR([unsupported combination of cpu type `$host_cpu' and platform
+ `$host_platform'.])[;;
+esac]
+AC_SUBST([host_platform])
+[# This is used in a few places.
+case $host_cpu in
+ i?86)
+ systype=i386;;
+ *)
+ systype=$host_cpu;;
+esac]
AC_SUBST([systype])
#
@@ -91,29 +100,30 @@ AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found])
# The test suite.
m4_include([tests/configfrag.ac])
-# General options.
-m4_include([configfrag.ac])
+# Default set of device drivers.
+AC_ARG_ENABLE([default-device-drivers],
+ AS_HELP_STRING([--disable-default-device-drivers], [have the options marked
+ with ``enabled by default'' disabled by default; then use the `--enable-*'
+ options to enable only those you actually want to have enabled]))
+[if [ x"$enable_default_device_drivers" != xno ]
+then enable_default_device_drivers=yes
+fi]
+
+# Platform-specific configuration.
+
+# PC AT.
+# TODO. Currently handled in `i386/configfrag.ac'.
# Machine-specific configuration.
-# i386.
-[if [ "$systype" = i386 ]; then]
- m4_include([i386/configfrag.ac])
-[fi]
+# ix86.
+m4_include([i386/configfrag.ac])
+
+# General options.
+m4_include([configfrag.ac])
# Linux code snarfed into GNU Mach.
-dnl Strictly speaking, we could have a `linux' option too, but it's currently
-dnl not possible to built a useful kernel without at least one Linux driver, so
-dnl that's not really necessary.
-dnl
-dnl The following doesn't work because of ``configure: error: conditional
-dnl "device_driver_floppy" was never defined.''.
-dnl AC_ARG_ENABLE([linux-device-drivers],
-dnl AS_HELP_STRING([--disable-linux-device-drivers],
-dnl [disable any use of Linux's device drivers]))
-dnl [if [ x"$enable_linux_device_drivers" != xno ]; then]
m4_include([linux/configfrag.ac])
-dnl [fi]
#
# Compiler features.