2 # GNU libc on the Hurd is always reentrant.
3 DEFINES="$DEFINES -D_LIBC_REENTRANT"
5 cat >> confdefs.h <<\EOF
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.
14 if test "x$prefix" != x; then
15 echo "configure: warning: --prefix= (empty) is required for GNU/Hurd to work normally" 1>&2
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
28 echo $ac_n "checking Hurd header version""... $ac_c" 1>&6
29 echo "configure:30: checking Hurd header version" >&5
30 if eval "test \"`echo '$''{'libc_cv_hurd_version'+set}'`\" = set"; then
31 echo $ac_n "(cached) $ac_c" 1>&6
33 cat > conftest.$ac_ext <<EOF
36 #include <hurd/version.h>
39 #define NEED_VERSION 20020609
40 #if HURD_INTERFACE_VERSION < NEED_VERSION
41 # error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
45 if { (eval echo configure:46: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
47 libc_cv_hurd_version=ok
49 echo "configure: failed program was:" >&5
50 cat conftest.$ac_ext >&5
52 libc_cv_hurd_version=bad
57 echo "$ac_t""$libc_cv_hurd_version" 1>&6
58 if test "x$libc_cv_hurd_version" != xok; then
59 { echo "configure: error: Hurd headers not installed or too old" 1>&2; exit 1; }
64 # See if mig groks `retcode'.
65 echo $ac_n "checking whether $MIG supports the retcode keyword""... $ac_c" 1>&6
66 echo "configure:67: checking whether $MIG supports the retcode keyword" >&5
67 if eval "test \"`echo '$''{'hurd_cv_mig_retcode'+set}'`\" = set"; then
68 echo $ac_n "(cached) $ac_c" 1>&6
70 cat > conftest.defs <<\EOF
71 #include <mach/std_types.defs>
72 #include <mach/mach_types.defs>
73 subsystem foobar 1000;
74 type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE
76 simpleroutine foobar_reply (
77 reply_port: reply_port_t;
78 err: kern_return_t, RetCode);
80 if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'; { (eval echo configure:81: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
81 hurd_cv_mig_retcode=yes
83 hurd_cv_mig_retcode=no
88 echo "$ac_t""$hurd_cv_mig_retcode" 1>&6
89 if test $hurd_cv_mig_retcode = yes; then
90 cat >> confdefs.h <<\EOF
91 #define HAVE_MIG_RETCODE 1