* sysdeps/mach/hurd/xstat64.c: Conditionalize entire contents of the
[platform/upstream/glibc.git] / sysdeps / mach / hurd / configure
1  
2 # GNU libc on the Hurd is always reentrant.
3 DEFINES="$DEFINES -D_LIBC_REENTRANT"
4
5 # Don't bother trying to generate any glue code to be compatible with the
6 # existing system library, because we are the only system library.
7 inhibit_glue=yes
8
9 if test "x$prefix" != x; then
10   echo "configure: warning: --prefix= (empty) is required for GNU/Hurd to work normally" 1>&2
11 fi
12
13 case "$machine" in
14   i386*)
15     # The default oldest ABI is 2.2.6.
16     # We only need a "yes" here if the oldest ABI supported will be < 2.2.6.
17     if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then
18       libc_cv_gcc_unwind_find_fde=yes
19     fi
20     ;;
21 esac
22
23 echo $ac_n "checking Hurd header version""... $ac_c" 1>&6
24 echo "configure:25: checking Hurd header version" >&5
25 if eval "test \"`echo '$''{'libc_cv_hurd_version'+set}'`\" = set"; then
26   echo $ac_n "(cached) $ac_c" 1>&6
27 else
28   cat > conftest.$ac_ext <<EOF
29 #line 30 "configure"
30 #include "confdefs.h"
31 #include <hurd/version.h>
32 int main() {
33
34 #define NEED_VERSION 20020609
35 #if HURD_INTERFACE_VERSION < NEED_VERSION
36 # error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
37 #endif
38 ; return 0; }
39 EOF
40 if { (eval echo configure:41: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41   rm -rf conftest*
42   libc_cv_hurd_version=ok
43 else
44   echo "configure: failed program was:" >&5
45   cat conftest.$ac_ext >&5
46   rm -rf conftest*
47   libc_cv_hurd_version=bad
48 fi
49 rm -f conftest*
50 fi
51
52 echo "$ac_t""$libc_cv_hurd_version" 1>&6
53 if test "x$libc_cv_hurd_version" != xok; then
54   { echo "configure: error: Hurd headers not installed or too old" 1>&2; exit 1; }
55 fi
56
57
58
59 # See if mig groks `retcode'.
60 echo $ac_n "checking whether $MIG supports the retcode keyword""... $ac_c" 1>&6
61 echo "configure:62: checking whether $MIG supports the retcode keyword" >&5
62 if eval "test \"`echo '$''{'hurd_cv_mig_retcode'+set}'`\" = set"; then
63   echo $ac_n "(cached) $ac_c" 1>&6
64 else
65   cat > conftest.defs <<\EOF
66 #include <mach/std_types.defs>
67 #include <mach/mach_types.defs>
68 subsystem foobar 1000;
69 type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE
70         ctype: mach_port_t;
71 simpleroutine foobar_reply (
72         reply_port: reply_port_t;
73         err: kern_return_t, RetCode);
74 EOF
75 if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'; { (eval echo configure:76: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
76   hurd_cv_mig_retcode=yes
77 else
78   hurd_cv_mig_retcode=no
79 fi
80 rm -f conftest*
81 fi
82
83 echo "$ac_t""$hurd_cv_mig_retcode" 1>&6
84 if test $hurd_cv_mig_retcode = yes; then
85   cat >> confdefs.h <<\EOF
86 #define HAVE_MIG_RETCODE 1
87 EOF
88
89 fi