summaryrefslogtreecommitdiff
path: root/configure.ac
blob: e51e497b182bf71082b80783c95f25d67ba5cba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
dnl Configure script for GNU Mach.
dnl Copyright 1997, 1998, 1999, 2004, 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
dnl software, derivative works or modified versions, and any portions
dnl thereof, and that both notices appear in supporting documentation.
dnl
dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
dnl "AS IS" CONDITION.  THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
dnl USE OF THIS SOFTWARE.

AC_PREREQ([2.57])

m4_include([version.m4])
AC_INIT([AC_PACKAGE_NAME], [AC_PACKAGE_VERSION], [AC_PACKAGE_BUGREPORT], [AC_PACKAGE_TARNAME])
AC_CONFIG_SRCDIR([kern/ipc_kobject.c])

#
# Deduce output var `systype' from configuration parms.
#
AC_CANONICAL_HOST

case "$host_cpu" in
i[[3456]]86) systype=i386 ;;
*) AC_MSG_ERROR([unsupported CPU type]) ;;
esac

AC_SUBST([systype])

# Default prefix is / for the kernel.
AC_PREFIX_DEFAULT([])

#
# Options
#
AC_ARG_ENABLE([kdb],
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([--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
#

AC_PROG_INSTALL
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB

AC_CHECK_TOOL([AR], [ar])
AC_CHECK_TOOL([LD], [ld])
AC_CHECK_TOOL([NM], [nm])
AC_CHECK_TOOL([STRIP], [strip])

AC_CHECK_TOOL([MIG], [mig], [mig])

AC_CHECK_PROG([GZIP], [gzip], [gzip], false)
AC_CHECK_PROG([MBCHK], [mbchk], [mbchk], :)

# Set up `machine' and `mach/machine' links in the build directory for easier
# header file location.
AC_CONFIG_LINKS([machine:${systype}/${systype}
		 mach/machine:${systype}/include/mach/${systype}])


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_FILES([Makefile Makerules version.c doc/Makefile])
AC_OUTPUT