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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
dnl Configure script for GNU Mach.
dnl Copyright 1997 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_INIT(kern/ipc_kobject.c)
AC_PREREQ(2.12)
#
# 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
case "$host_os" in
gnu*) ;;
*) AC_MSG_ERROR([sorry, this is the gnu os, not $host_os]) ;;
esac
AC_SUBST(systype)
AC_SUBST(cross_compiling)
# Default prefix is / for the kernel.
AC_PREFIX_DEFAULT()
#
# Options
#
AC_ARG_ENABLE(kdb, Enable use of in-kernel debugger, AC_DEFINE(MACH_KDB))
#
# Programs
#
AC_PROG_CC_LOCAL
AC_PROG_AWK
AC_PROG_INSTALL
AC_CHECK_TOOL(MIG, mig, mig)
if test $cross_compiling = yes; then
AC_CHECK_PROGS(BUILD_CC, gcc cc)
CC=$BUILD_CC
fi
AC_PROG_LEX
AC_PROG_YACC
if test $cross_compiling = yes ; then
CC=$ac_cv_prog_CC
fi
usable_libc='yes'
needed_funcs='memcpy memset bcopy bzero htonl ntohl ntohs'
AC_CHECK_FUNCS($needed_funcs, , usable_libc=no)
if test $usable_libc = no ; then
echo "Support functions not found using $CC, trying $BUILD_CC."
CC="$BUILD_CC"
for i in $needed_funcs ; do
unset ac_cv_func_$i
done
usable_libc=yes
AC_CHECK_FUNCS($needed_funcs, , usable_libc=no)
if test $usable_libc = no ; then
echo "Configuration problem:" 1>&2
echo "Please set installed-clib in the toplevel Makefile so the functions:"
echo "$needed_funcs are available."
exit 1
else
changequote(,)
set -- `$BUILD_CC -v 2>&1 | sed -n 's/.*from \(.*\)\/lib\/gcc-lib\/\([^/][^/]*\).*/\1 \2/p'`
changequote([,])
if test -f "$1/$2/lib/libc.a" ; then
installed_clib=$1/$2/lib/libc.a
else
installed_clib=$1/lib/libc.a
fi
fi
CC=$ac_cv_prog_CC
else
installed_clib=$prefix/lib/libcrt.a
fi
AC_SUBST(installed_clib)
# Set up `machine' link in build directory for easier header file location.
AC_LINK_FILES(${systype}/${systype},machine)
# Do machine-specific configuration last so that it can override anything
# set above if necessary.
AC_CONFIG_SUBDIRS($systype)
AC_OUTPUT(Makefile)
|