|
|
1.1 ! root 1: dnl Configure script for GNU Mach. ! 2: ! 3: dnl Copyright (C) 1997, 1998, 1999, 2004, 2006, 2007, 2008, 2010, 2013 Free ! 4: dnl Software Foundation, Inc. ! 5: ! 6: dnl Permission to use, copy, modify and distribute this software and its ! 7: dnl documentation is hereby granted, provided that both the copyright ! 8: dnl notice and this permission notice appear in all copies of the ! 9: dnl software, derivative works or modified versions, and any portions ! 10: dnl thereof, and that both notices appear in supporting documentation. ! 11: dnl ! 12: dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS ! 13: dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY ! 14: dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE ! 15: dnl USE OF THIS SOFTWARE. ! 16: ! 17: AC_PREREQ([2.57]) ! 18: ! 19: m4_include([version.m4]) ! 20: AC_INIT([AC_PACKAGE_NAME], [AC_PACKAGE_VERSION], [AC_PACKAGE_BUGREPORT], ! 21: [AC_PACKAGE_TARNAME]) ! 22: AC_CONFIG_SRCDIR([kern/ipc_kobject.c]) ! 23: ! 24: AC_CONFIG_AUX_DIR([build-aux]) ! 25: ! 26: AM_INIT_AUTOMAKE( ! 27: [1.10.2] ! 28: [dist-bzip2] ! 29: dnl Don't define `PACKAGE' and `VERSION'. ! 30: [no-define] ! 31: dnl Do not clutter the main build directory. ! 32: [subdir-objects] ! 33: dnl We require GNU make. ! 34: [-Wall -Wno-portability] ! 35: ) ! 36: ! 37: m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])], ! 38: [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) ! 39: ! 40: # ! 41: # Deduce the architecture we're building for. ! 42: # ! 43: # TODO: Should we also support constructs like `i686_xen-pc-gnu' or ! 44: # `i686-pc_xen-gnu'? ! 45: ! 46: AC_CANONICAL_HOST ! 47: ! 48: AC_ARG_ENABLE([platform], ! 49: AS_HELP_STRING([--enable-platform=PLATFORM], [specify the platform to build a ! 50: kernel for. Defaults to `at' for `i?86'. The other possibility is ! 51: `xen'.]), ! 52: [host_platform=$enable_platform], ! 53: [host_platform=default]) ! 54: [# Supported configurations. ! 55: case $host_platform:$host_cpu in ! 56: default:i?86) ! 57: host_platform=at;; ! 58: at:i?86 | xen:i?86) ! 59: :;; ! 60: *)] ! 61: AC_MSG_ERROR([unsupported combination of cpu type `$host_cpu' and platform ! 62: `$host_platform'.])[;; ! 63: esac] ! 64: AC_SUBST([host_platform]) ! 65: ! 66: [# This is used in a few places. ! 67: case $host_cpu in ! 68: i?86) ! 69: systype=i386;; ! 70: *) ! 71: systype=$host_cpu;; ! 72: esac] ! 73: AC_SUBST([systype]) ! 74: ! 75: # ! 76: # Programs. ! 77: # ! 78: ! 79: AC_PROG_AWK ! 80: AM_PROG_AS ! 81: AC_PROG_CC ! 82: AC_PROG_CPP ! 83: AC_PROG_INSTALL ! 84: AC_PROG_RANLIB ! 85: AC_CHECK_TOOL([AR], [ar]) ! 86: AC_CHECK_TOOL([LD], [ld]) ! 87: AC_CHECK_TOOL([NM], [nm]) ! 88: ! 89: AC_CHECK_TOOL([MIG], [mig], [mig]) ! 90: ! 91: dnl Needed for the Automake option `subdir-objects'. ! 92: AM_PROG_CC_C_O ! 93: ! 94: dnl Makerules can make use of these. ! 95: AC_CHECK_PROG([GZIP], [gzip], [gzip], [gzip-not-found]) ! 96: AC_CHECK_TOOL([STRIP], [strip]) ! 97: ! 98: dnl See below why we need to patch stuff during build... ! 99: AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found]) ! 100: ! 101: # ! 102: # configure fragments. ! 103: # ! 104: ! 105: # The test suite. ! 106: m4_include([tests/configfrag.ac]) ! 107: ! 108: # Default set of device drivers. ! 109: AC_ARG_ENABLE([device-drivers], ! 110: AS_HELP_STRING([--enable-device-drivers=WHICH], [specify WHICH (on `ix86-at' ! 111: one of `default', `qemu', `none') to preset a certain subset of all ! 112: available device drivers, as indicated by the below-metioned ``enabled ! 113: ...'' comments; you can then still use further `--enable-*' or ! 114: `--disable-*' options to refine the selection of drivers to include in ! 115: order to choose only those you actually want to have enabled])) ! 116: [case $enable_device_drivers in ! 117: '') ! 118: enable_device_drivers=default;; ! 119: no) ! 120: enable_device_drivers=none;; ! 121: default | none | qemu) ! 122: :;; ! 123: *)] ! 124: AC_MSG_ERROR([invalid choice of] ! 125: [`--enable-device-drivers=$enable_device_drivers'.]) ! 126: [;; ! 127: esac] ! 128: ! 129: # Platform-specific configuration. ! 130: ! 131: # PC AT. ! 132: # TODO. Currently handled in `i386/configfrag.ac'. ! 133: ! 134: # Xen. ! 135: m4_include([xen/configfrag.ac]) ! 136: ! 137: # Machine-specific configuration. ! 138: ! 139: # ix86. ! 140: m4_include([i386/configfrag.ac]) ! 141: ! 142: # General options. ! 143: m4_include([configfrag.ac]) ! 144: ! 145: # Linux code snarfed into GNU Mach. ! 146: m4_include([linux/configfrag.ac]) ! 147: ! 148: # ! 149: # Compiler features. ! 150: # ! 151: ! 152: # Smashing stack protector. ! 153: [ssp_possible=yes] ! 154: AC_MSG_CHECKING([whether the compiler accepts `-fstack-protector']) ! 155: # Is this a reliable test case? ! 156: AC_LANG_CONFTEST( ! 157: [AC_LANG_SOURCE([[void foo (void) { volatile char a[8]; a[3]; }]])]) ! 158: [# `$CC -c -o ...' might not be portable. But, oh, well... Is calling ! 159: # `ac_compile' like this correct, after all? ! 160: if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then] ! 161: AC_MSG_RESULT([yes]) ! 162: [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? ! 163: rm -f conftest.s ! 164: else ! 165: ssp_possible=no] ! 166: AC_MSG_RESULT([no]) ! 167: [fi ! 168: # Need that, because some distributions ship compilers that include ! 169: # `-fstack-protector' in the default specs.] ! 170: AM_CONDITIONAL([disable_smashing_stack_protector], ! 171: [[[ x"$ssp_possible" = xyes ]]]) ! 172: ! 173: # ! 174: # Output. ! 175: # ! 176: ! 177: AC_CONFIG_HEADER([config.h]) ! 178: AC_CONFIG_FILES([Makefile version.c]) ! 179: ! 180: # ! 181: # The remaining ugly, dark corners... ! 182: # ! 183: # Attention, parents: don't show this to your children... ! 184: # ! 185: ! 186: # ! 187: # config.status.dep.patch ! 188: # ! 189: # This is a (ugly --- I admit) bootstrap hack to get to-be-generated files ! 190: # created before any other source files are compiled. ! 191: # ! 192: # See <http://lists.gnu.org/archive/html/automake/2006-05/msg00038.html>. ! 193: # ! 194: # We don't use `BUILT_SOURCES' (as it was suggested in the follow-up message), ! 195: # as we also want things like `make SPECIFIC_TARGET' to work. ! 196: # ! 197: # This affair is especially ugly because internals are used (the `# dummy' ! 198: # tag): internals that may be subject to changes. That's the reason why a ! 199: # real patch is being used here and not some `sed' magic: to make it fail ! 200: # loudly in case. ! 201: # ! 202: # For all shipped source files a dependency file is tried to be created where ! 203: # it is simply stated that the respective source file depends on _all_ ! 204: # to-be-generated files. Depending on all of them doesn't do any harm, as they ! 205: # will nevertheless have to be created, sooner or later. The problem is, that ! 206: # `config.status' doesn't know about the source file of the file it is ! 207: # currently creating the dependency file for. So we have it do an educated ! 208: # guess... Later, when compiling the source files, these dependency files will ! 209: # be rewritten to contain the files's actual dependencies. From then on this ! 210: # bootstrap hack will be forgotten. ! 211: # ! 212: ! 213: dnl AC_CONFIG_COMMANDS_POST([ ! 214: dnl sed -i -e \ ! 215: dnl 's%#\ dummy%Makefile: $(filter-out $(DIST_SOURCES),$(SOURCES))%' \ ! 216: dnl config.status ! 217: dnl ]) ! 218: AC_CONFIG_COMMANDS_POST([ ! 219: if "$PATCH" -f < "$srcdir"/config.status.dep.patch ! 220: then] AC_MSG_NOTICE([Applied a patch to work around a deficiency in] ! 221: [Automake. See `configure.ac' for details.]) ! 222: [else] AC_MSG_ERROR([failed to patch using `config.status.dep.patch'.] ! 223: [You have a serious problem. Please contact <$PACKAGE_BUGREPORT>.]) ! 224: [fi ! 225: ]) ! 226: ! 227: # ! 228: # Fire. ! 229: # ! 230: ! 231: AC_OUTPUT
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.