diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-09-19 23:12:49 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:41 +0200 |
commit | a5e38f45c6362c1a38c7b6149a2ba5754fff4928 (patch) | |
tree | 5c1c0892d64c25af17def41a556cebcef4642cf0 | |
parent | a1ea340702c03ccf212fc1c9c0f938e75c0e727b (diff) |
2006-09-20 Thomas Schwinge <tschwinge@gnu.org>
* Drivers.macros (AC_DRIVER_ALIAS): Remove definition.
(AC_DRIVER): Extend to take a `description' parameter and consider
`$enable_default_device_drivers'.
(AC_DRIVER_nodef): New definition.
* configure.in (options kdb, kmsg): Remove redundancy.
* i386/configure.in (option default-device-drivers): New option.
(option lpr): Consider `$enable_default_device_drivers'.
* i386/linux/configure.ac: Rework substantially. Remove all aliases.
Rename some of the device driver options.
(option default-device-drivers): New option.
(linux_DRIVER): Take care about a `description' parameter and don't
invoke AC_DRIVER_ALIAS.
(linux_DRIVER_nodef): New definition.
Adopt all usages of AC_DRIVER and linux_DRIVER to provide a
`description' parameter.
(g_NCR5380, NCR53c406a, eata_dma, wavelan, atp): Change from AC_DRIVER
to AC_DRIVER_nodef to have these device drivers disabled by default.
* doc/mach.texi: Add a note about the outdatedness to the configuration
option table.
* i386/README-Drivers: Update.
-rw-r--r-- | Drivers.macros | 56 | ||||
-rw-r--r-- | configure.in | 13 |
2 files changed, 40 insertions, 29 deletions
diff --git a/Drivers.macros b/Drivers.macros index 5fa1db4..d7168fa 100644 --- a/Drivers.macros +++ b/Drivers.macros @@ -1,7 +1,7 @@ dnl dnl Some autoconf macros useful for device driver configuration dnl -dnl Copyright 1997 Free Software Foundation, Inc. +dnl Copyright 1997, 2006 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 dnl notice and this permission notice appear in all copies of the @@ -15,16 +15,6 @@ dnl USE OF THIS SOFTWARE. AC_SUBST([device_drivers]) -dnl AC_DRIVER_ALIAS(alias, canonical) makes --enable-alias have the -dnl same effect as --enable-canonical. - -AC_DEFUN([AC_DRIVER_ALIAS], [ -[#] Checking for alias [$1] -AC_ARG_ENABLE([$1], - AS_HELP_STRING([--enable-$1], [enable driver alias $1 for $2]), - [enable_$2="$enable_$1"] -)]) - dnl AC_DRIVER_CLASS(name,option,files) defines a class of drivers. If dnl any driver declared by AC_DRIVER to be in that class is selected dnl by the user, then set the specified option with AC_DEFINE and add @@ -37,22 +27,40 @@ driver_class_$1_option=$2 driver_class_$1_files="$3" ]) -dnl AC_DRIVER(name,option,files [,class]) detects option --enable-name. If +dnl AC_DRIVER(name,description,option,files[,class]). Process configuration +dnl option --enable-`name' (with description dnl `description'). If dnl it's set, then `option' is defined with AC_DEFINE, and files is dnl added to the output variable `device_drivers'. The driver is of class dnl `class'; see the comments on AC_DRIVER_CLASS for more information. +dnl By default, the value from $enable_default_device_drivers is considered +dnl when deciding whether to activate the device driver or not. AC_DEFUN([AC_DRIVER], [ -[#] Checking for device driver option [$1] AC_ARG_ENABLE([$1], -AS_HELP_STRING([--enable-$1], [enable driver $1]), [ -if test "x$enableval" != xno; then -AC_DEFINE([$2], [1], [$1]) -device_drivers="$device_drivers [$3]" -if test "${driver_class_[$4]_selected+set}" != set; then - driver_class_[$4]_selected=yes - AC_DEFINE_UNQUOTED([$driver_class_$4_option], [1]) - device_drivers="$device_drivers $driver_class_[$4]_files" -fi -fi -])]) + AS_HELP_STRING([--disable-$1], [disable driver $2])) +[enable_$1=${enable_$1-$enable_default_device_drivers} +if test x"$enable_$1" = xyes; then] + AC_DEFINE([$3], [1], [$1]) + [device_drivers="$device_drivers $4" + if test "${driver_class_$5_selected+set}" != set; then + driver_class_$5_selected=yes] + AC_DEFINE_UNQUOTED([$driver_class_$5_option], [1]) + [device_drivers="$device_drivers $driver_class_$5_files" + fi +fi]]) + +dnl AC_DEFUN_nodef() is like AC_DRIVER(), but doesn't consider +dnl $enable_default_device_drivers. + +AC_DEFUN([AC_DRIVER_nodef], [ +AC_ARG_ENABLE([$1], + AS_HELP_STRING([--enable-$1], [enable driver $2]), [ +if test x"$enableval" = xyes; then + AC_DEFINE([$3], [1], [$1]) + device_drivers="$device_drivers $4" + if test "${driver_class_$5_selected+set}" != set; then + driver_class_$5_selected=yes + AC_DEFINE_UNQUOTED([$driver_class_$5_option], [1]) + device_drivers="$device_drivers $driver_class_$5_files" + fi +fi])]) diff --git a/configure.in b/configure.in index 0a0baeb..539c54d 100644 --- a/configure.in +++ b/configure.in @@ -37,13 +37,16 @@ AC_PREFIX_DEFAULT([]) # Options # AC_ARG_ENABLE([kdb], -AS_HELP_STRING([--enable-kdb], [enable use of in-kernel debugger]), -[test "x$enableval" = xno || AC_DEFINE([MACH_KDB], [1], [enable use of in-kernel debugger])]) +AS_HELP_STRING([--enable-kdb], [enable use of in-kernel debugger])) +[if test x"$enable_kdb" = xyes; then] + AC_DEFINE([MACH_KDB], [1], [enable use of in-kernel debugger]) +[fi] AC_ARG_ENABLE([kmsg], -AS_HELP_STRING([--enable-kmsg], [enable use of kmsg device [[default=yes]]]), -[test "x$enableval" = xno || AC_DEFINE([MACH_KMSG], [], [enable use of kmsg device])], - [AC_DEFINE([MACH_KMSG], [], [enable use of kmsg device])]) +AS_HELP_STRING([--disable-kmsg], [disable use of kmsg device])) +[if test x"$enable_kmsg" != xno; then] + AC_DEFINE([MACH_KMSG], [], [enable use of kmsg device]) +[fi] # # Programs |