summary refs log tree commit diff
path: root/sysdeps/mach/hurd/configure
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/configure')
-rwxr-xr-xsysdeps/mach/hurd/configure38
1 files changed, 36 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 7017ea4adc..56355b18bb 100755
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -20,11 +20,45 @@ case "$machine" in
     ;;
 esac
 
+echo $ac_n "checking Hurd header version""... $ac_c" 1>&6
+echo "configure:25: checking Hurd header version" >&5
+if eval "test \"`echo '$''{'libc_cv_hurd_version'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 30 "configure"
+#include "confdefs.h"
+#include <hurd/version.h>
+int main() {
+
+#define NEED_VERSION 20020609
+#if HURD_INTERFACE_VERSION < NEED_VERSION
+# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:41: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  libc_cv_hurd_version=ok
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  libc_cv_hurd_version=bad
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_hurd_version" 1>&6
+if test "x$libc_cv_hurd_version" != xok; then
+  { echo "configure: error: Hurd headers not installed or too old" 1>&2; exit 1; }
+fi
+
 
 
 # See if mig groks `retcode'.
 echo $ac_n "checking whether $MIG supports the retcode keyword""... $ac_c" 1>&6
-echo "configure:28: checking whether $MIG supports the retcode keyword" >&5
+echo "configure:62: checking whether $MIG supports the retcode keyword" >&5
 if eval "test \"`echo '$''{'hurd_cv_mig_retcode'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -38,7 +72,7 @@ simpleroutine foobar_reply (
 	reply_port: reply_port_t;
 	err: kern_return_t, RetCode);
 EOF
-if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'; { (eval echo configure:42: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+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
   hurd_cv_mig_retcode=yes
 else
   hurd_cv_mig_retcode=no