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