Update.
[glibc.git] / sysdeps / mach / hurd / configure
blob73149f5fe1b520d4fecab5f15890da2cf460470d
1  
2 # GNU libc on the Hurd is always reentrant.
3 DEFINES="$DEFINES -D_LIBC_REENTRANT"
5 cat >> confdefs.h <<\EOF
6 #define NO_HIDDEN 1
7 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.
12 inhibit_glue=yes
14 if test "x$prefix" != x; then
15   echo "configure: warning: --prefix= (empty) is required for GNU/Hurd to work normally" 1>&2
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 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
32 else
33   cat > conftest.$ac_ext <<EOF
34 #line 35 "configure"
35 #include "confdefs.h"
36 #include <hurd/version.h>
37 int main() {
39 #define NEED_VERSION 20020609
40 #if HURD_INTERFACE_VERSION < NEED_VERSION
41 # error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
42 #endif
43 ; return 0; }
44 EOF
45 if { (eval echo configure:46: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
46   rm -rf conftest*
47   libc_cv_hurd_version=ok
48 else
49   echo "configure: failed program was:" >&5
50   cat conftest.$ac_ext >&5
51   rm -rf conftest*
52   libc_cv_hurd_version=bad
54 rm -f conftest*
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
69 else
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
75         ctype: mach_port_t;
76 simpleroutine foobar_reply (
77         reply_port: reply_port_t;
78         err: kern_return_t, RetCode);
79 EOF
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
82 else
83   hurd_cv_mig_retcode=no
85 rm -f conftest*
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
92 EOF