* sysdeps/mach/hurd/xstat64.c: Conditionalize entire contents of the
[platform/upstream/glibc.git] / sysdeps / mach / hurd / configure.in
1 sinclude(./aclocal.m4)dnl Autoconf lossage.
2 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
3
4 # GNU libc on the Hurd is always reentrant.
5 DEFINES="$DEFINES -D_LIBC_REENTRANT"
6
7 # Don't bother trying to generate any glue code to be compatible with the
8 # existing system library, because we are the only system library.
9 inhibit_glue=yes
10
11 if test "x$prefix" != x; then
12   AC_MSG_WARN([--prefix= (empty) is required for GNU/Hurd to work normally])
13 fi
14
15 case "$machine" in
16   i386*)
17     # The default oldest ABI is 2.2.6.
18     # We only need a "yes" here if the oldest ABI supported will be < 2.2.6.
19     if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then
20       libc_cv_gcc_unwind_find_fde=yes
21     fi
22     ;;
23 esac
24
25 AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl
26 AC_TRY_COMPILE(dnl
27 [#include <hurd/version.h>], [
28 #define NEED_VERSION 20020609
29 #if HURD_INTERFACE_VERSION < NEED_VERSION
30 # error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
31 #endif],
32                libc_cv_hurd_version=ok,
33                libc_cv_hurd_version=bad)])
34 if test "x$libc_cv_hurd_version" != xok; then
35   AC_MSG_ERROR(Hurd headers not installed or too old)
36 fi
37
38 dnl Swiped from hurd/aclocal.m4
39 AC_DEFUN([hurd_MIG_RETCODE], [dnl
40 # See if mig groks `retcode'.
41 AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode,
42 [cat > conftest.defs <<\EOF
43 #include <mach/std_types.defs>
44 #include <mach/mach_types.defs>
45 subsystem foobar 1000;
46 type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE
47         ctype: mach_port_t;
48 simpleroutine foobar_reply (
49         reply_port: reply_port_t;
50         err: kern_return_t, RetCode);
51 EOF
52 if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AC_FD_CC]); then
53   hurd_cv_mig_retcode=yes
54 else
55   hurd_cv_mig_retcode=no
56 fi
57 rm -f conftest*])
58 if test $hurd_cv_mig_retcode = yes; then
59   AC_DEFINE(HAVE_MIG_RETCODE)
60 fi])
61
62 hurd_MIG_RETCODE