summaryrefslogtreecommitdiff
path: root/i386
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 /i386
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 'i386')
-rw-r--r--i386/Makefrag.am6
-rw-r--r--i386/configfrag.ac63
-rw-r--r--i386/linux/Makefrag.am26
3 files changed, 65 insertions, 30 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 50b7afd..f70e63c 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -1,6 +1,6 @@
-# Makefile fragment for i386
+# Makefile fragment for i386.
-# Copyright 1997, 1999, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
@@ -195,7 +195,7 @@ nodist_libkernel_a_SOURCES += \
EXTRA_DIST += \
i386/ldscript
LINKFLAGS_gnumach = \
- -T '$(srcdir)/$(systype)'/ldscript
+ -T '$(srcdir)'/i386/ldscript
#
# Installation.
diff --git a/i386/configfrag.ac b/i386/configfrag.ac
index a82ce5c..3603721 100644
--- a/i386/configfrag.ac
+++ b/i386/configfrag.ac
@@ -1,6 +1,6 @@
dnl Configure fragment for i386.
-dnl Copyright 1999, 2004, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 1999, 2004, 2006, 2007 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
@@ -17,25 +17,49 @@ dnl USE OF THIS SOFTWARE.
# Definitions.
#
-# Some of the i386-specific code checks for these.
-AC_DEFINE([__ELF__], [1], [__ELF__])
-AC_DEFINE([i386], [1], [i386])
+[case $host_cpu in
+ i?86)]
+ AM_CONDITIONAL([HOST_ix86], [true])
+
+ # Some of the i386-specific code checks for these.
+ AC_DEFINE([__ELF__], [1], [__ELF__])
+ AC_DEFINE([i386], [1], [i386])
+
+ [# Does the architecture provide machine-specific interfaces?
+ mach_machine_routines=1;;
+ *)]
+ AM_CONDITIONAL([HOST_ix86], [false])[;;
+esac
+
+case $host_platform in
+ at)]
+ AM_CONDITIONAL([PLATFORM_at], [true])[;;
+ *)]
+ AM_CONDITIONAL([PLATFORM_at], [false])[;;
+esac
#
# Formerly in `i386/bogus/'.
#
-# i386/bogus/com.h
-AC_DEFINE([NCOM], [4], [NCOM])
+ncom=0
+nlpr=0
+case $host_platform:$host_cpu in
+ at:i?86)
+ ncom=4
+ nlpr=1
-# i386/bogus/lpr.h
-AC_DEFINE([NLPR], [1], [NLPR])
+ # i386/bogus/platforms.h]
+ AC_DEFINE([AT386], [1], [AT386])[;;
+ *)
+ :;;
+esac]
-# i386/bogus/mach_machine_routines.h
-AC_DEFINE([MACH_MACHINE_ROUTINES], [1], [MACH_MACHINE_ROUTINES])
+# i386/bogus/com.h
+AC_DEFINE_UNQUOTED([NCOM], [$ncom], [NCOM])
-# i386/bogus/platforms.h
-AC_DEFINE([AT386], [1], [AT386])
+# i386/bogus/lpr.h
+AC_DEFINE_UNQUOTED([NLPR], [$nlpr], [NLPR])
# i386/bogus/rc.h
#
@@ -58,11 +82,22 @@ AC_DEFINE([RCADDR], [0x3f8], [where is the com port for the remote console])
#
AC_ARG_ENABLE([lpr],
- AS_HELP_STRING([--disable-lpr], [disable use of lpr device]))
-[enable_lpr=${enable_lpr-$enable_default_device_drivers}
+ AS_HELP_STRING([--enable-lpr], [lpr device; enabled by default for ix86-at]))
+[case $host_platform:$host_cpu in
+ at:i?86)
+ enable_lpr=${enable_lpr-$enable_default_device_drivers};;
+ *)
+ if [ x"$enable_lpr" = xyes ]; then]
+ AC_MSG_ERROR([cannot enable `lpr' in this configuration.])
+ [fi;;
+esac
if [ x"$enable_lpr" = xyes ]; then]
AC_DEFINE([MACH_LPR], [], [lpr device])
AM_CONDITIONAL([enable_lpr], [true])
[else]
AM_CONDITIONAL([enable_lpr], [false])
[fi]
+
+dnl Local Variables:
+dnl mode: autoconf
+dnl End:
diff --git a/i386/linux/Makefrag.am b/i386/linux/Makefrag.am
index 41606c9..c280309 100644
--- a/i386/linux/Makefrag.am
+++ b/i386/linux/Makefrag.am
@@ -1,20 +1,20 @@
# Makefile fragment for i386-specific Linux code.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2, or (at
-# your option) any later version.
-#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any later
+# version.
+#
# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Files for device driver support.