Blame sysdeps/mach/configure

Packit 6c4009
Packit 6c4009
Packit 6c4009
# ac_fn_c_try_cpp LINENO
Packit 6c4009
# ----------------------
Packit 6c4009
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
Packit 6c4009
ac_fn_c_try_cpp ()
Packit 6c4009
{
Packit 6c4009
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Packit 6c4009
  if { { ac_try="$ac_cpp conftest.$ac_ext"
Packit 6c4009
case "(($ac_try" in
Packit 6c4009
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
Packit 6c4009
  *) ac_try_echo=$ac_try;;
Packit 6c4009
esac
Packit 6c4009
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Packit 6c4009
$as_echo "$ac_try_echo"; } >&5
Packit 6c4009
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
Packit 6c4009
  ac_status=$?
Packit 6c4009
  if test -s conftest.err; then
Packit 6c4009
    grep -v '^ *+' conftest.err >conftest.er1
Packit 6c4009
    cat conftest.er1 >&5
Packit 6c4009
    mv -f conftest.er1 conftest.err
Packit 6c4009
  fi
Packit 6c4009
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Packit 6c4009
  test $ac_status = 0; } > conftest.i && {
Packit 6c4009
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
Packit 6c4009
	 test ! -s conftest.err
Packit 6c4009
       }; then :
Packit 6c4009
  ac_retval=0
Packit 6c4009
else
Packit 6c4009
  $as_echo "$as_me: failed program was:" >&5
Packit 6c4009
sed 's/^/| /' conftest.$ac_ext >&5
Packit 6c4009
Packit 6c4009
    ac_retval=1
Packit 6c4009
fi
Packit 6c4009
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Packit 6c4009
  as_fn_set_status $ac_retval
Packit 6c4009
Packit 6c4009
} # ac_fn_c_try_cpp
Packit 6c4009
Packit 6c4009
# ac_fn_c_check_header_preproc LINENO HEADER VAR
Packit 6c4009
# ----------------------------------------------
Packit 6c4009
# Tests whether HEADER is present, setting the cache variable VAR accordingly.
Packit 6c4009
ac_fn_c_check_header_preproc ()
Packit 6c4009
{
Packit 6c4009
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
Packit 6c4009
$as_echo_n "checking for $2... " >&6; }
Packit 6c4009
if eval \${$3+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <$2>
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_cpp "$LINENO"; then :
Packit 6c4009
  eval "$3=yes"
Packit 6c4009
else
Packit 6c4009
  eval "$3=no"
Packit 6c4009
fi
Packit 6c4009
rm -f conftest.err conftest.i conftest.$ac_ext
Packit 6c4009
fi
Packit 6c4009
eval ac_res=\$$3
Packit 6c4009
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
Packit 6c4009
$as_echo "$ac_res" >&6; }
Packit 6c4009
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Packit 6c4009
Packit 6c4009
} # ac_fn_c_check_header_preproc
Packit 6c4009
# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
Packit 6c4009
Packit 6c4009
if test -n "$ac_tool_prefix"; then
Packit 6c4009
  # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
Packit 6c4009
set dummy ${ac_tool_prefix}mig; ac_word=$2
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Packit 6c4009
$as_echo_n "checking for $ac_word... " >&6; }
Packit 6c4009
if ${ac_cv_prog_MIG+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  if test -n "$MIG"; then
Packit 6c4009
  ac_cv_prog_MIG="$MIG" # Let the user override the test.
Packit 6c4009
else
Packit 6c4009
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Packit 6c4009
for as_dir in $PATH
Packit 6c4009
do
Packit 6c4009
  IFS=$as_save_IFS
Packit 6c4009
  test -z "$as_dir" && as_dir=.
Packit 6c4009
    for ac_exec_ext in '' $ac_executable_extensions; do
Packit 6c4009
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Packit 6c4009
    ac_cv_prog_MIG="${ac_tool_prefix}mig"
Packit 6c4009
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Packit 6c4009
    break 2
Packit 6c4009
  fi
Packit 6c4009
done
Packit 6c4009
  done
Packit 6c4009
IFS=$as_save_IFS
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
fi
Packit 6c4009
MIG=$ac_cv_prog_MIG
Packit 6c4009
if test -n "$MIG"; then
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
Packit 6c4009
$as_echo "$MIG" >&6; }
Packit 6c4009
else
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Packit 6c4009
$as_echo "no" >&6; }
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
if test -z "$ac_cv_prog_MIG"; then
Packit 6c4009
  ac_ct_MIG=$MIG
Packit 6c4009
  # Extract the first word of "mig", so it can be a program name with args.
Packit 6c4009
set dummy mig; ac_word=$2
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Packit 6c4009
$as_echo_n "checking for $ac_word... " >&6; }
Packit 6c4009
if ${ac_cv_prog_ac_ct_MIG+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  if test -n "$ac_ct_MIG"; then
Packit 6c4009
  ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
Packit 6c4009
else
Packit 6c4009
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Packit 6c4009
for as_dir in $PATH
Packit 6c4009
do
Packit 6c4009
  IFS=$as_save_IFS
Packit 6c4009
  test -z "$as_dir" && as_dir=.
Packit 6c4009
    for ac_exec_ext in '' $ac_executable_extensions; do
Packit 6c4009
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Packit 6c4009
    ac_cv_prog_ac_ct_MIG="mig"
Packit 6c4009
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Packit 6c4009
    break 2
Packit 6c4009
  fi
Packit 6c4009
done
Packit 6c4009
  done
Packit 6c4009
IFS=$as_save_IFS
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
fi
Packit 6c4009
ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
Packit 6c4009
if test -n "$ac_ct_MIG"; then
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
Packit 6c4009
$as_echo "$ac_ct_MIG" >&6; }
Packit 6c4009
else
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Packit 6c4009
$as_echo "no" >&6; }
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
  if test "x$ac_ct_MIG" = x; then
Packit 6c4009
    MIG="MISSING"
Packit 6c4009
  else
Packit 6c4009
    case $cross_compiling:$ac_tool_warned in
Packit 6c4009
yes:)
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
Packit 6c4009
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Packit 6c4009
ac_tool_warned=yes ;;
Packit 6c4009
esac
Packit 6c4009
    MIG=$ac_ct_MIG
Packit 6c4009
  fi
Packit 6c4009
else
Packit 6c4009
  MIG="$ac_cv_prog_MIG"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
if test "x$MIG" = xMISSING; then
Packit 6c4009
  as_fn_error $? "cannot find required build tool mig" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
config_vars="$config_vars
Packit 6c4009
MIG = $MIG"
Packit 6c4009
Packit 6c4009
if test -n "$sysheaders"; then
Packit 6c4009
  OLD_CPPFLAGS=$CPPFLAGS
Packit 6c4009
  CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
### Sanity checks for Mach header installation
Packit 6c4009
Packit 6c4009
Packit 6c4009
ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
Packit 6c4009
if test "x$ac_cv_header_mach_mach_types_h" = xyes; then :
Packit 6c4009
Packit 6c4009
else
Packit 6c4009
  as_fn_error $? "cannot find Mach headers" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.defs" "ac_cv_header_mach_mach_types_defs"
Packit 6c4009
if test "x$ac_cv_header_mach_mach_types_defs" = xyes; then :
Packit 6c4009
Packit 6c4009
else
Packit 6c4009
  as_fn_error $? "cannot find Mach .defs files" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
Packit 6c4009
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for task_t in mach/mach_types.h" >&5
Packit 6c4009
$as_echo_n "checking for task_t in mach/mach_types.h... " >&6; }
Packit 6c4009
if ${libc_cv_mach_task_t+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/mach_types.h>
Packit 6c4009
int
Packit 6c4009
main ()
Packit 6c4009
{
Packit 6c4009
extern task_t foo;
Packit 6c4009
  ;
Packit 6c4009
  return 0;
Packit 6c4009
}
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_compile "$LINENO"; then :
Packit 6c4009
  libc_cv_mach_task_t=task_t
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_task_t=task_port_t
Packit 6c4009
fi
Packit 6c4009
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_task_t" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_task_t" >&6; }
Packit 6c4009
if test $libc_cv_mach_task_t != task_t; then
Packit 6c4009
  DEFINES="$DEFINES -Dtask_t=task_port_t"
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread_t in mach/mach_types.h" >&5
Packit 6c4009
$as_echo_n "checking for thread_t in mach/mach_types.h... " >&6; }
Packit 6c4009
if ${libc_cv_mach_thread_t+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/mach_types.h>
Packit 6c4009
int
Packit 6c4009
main ()
Packit 6c4009
{
Packit 6c4009
extern thread_t foo;
Packit 6c4009
  ;
Packit 6c4009
  return 0;
Packit 6c4009
}
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_compile "$LINENO"; then :
Packit 6c4009
  libc_cv_mach_thread_t=thread_t
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_thread_t=thread_port_t
Packit 6c4009
fi
Packit 6c4009
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_thread_t" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_thread_t" >&6; }
Packit 6c4009
if test $libc_cv_mach_thread_t != thread_t; then
Packit 6c4009
  DEFINES="$DEFINES -Dthread_t=thread_port_t"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for creation_time in task_basic_info" >&5
Packit 6c4009
$as_echo_n "checking for creation_time in task_basic_info... " >&6; }
Packit 6c4009
if ${libc_cv_mach_task_creation_time+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/task_info.h>
Packit 6c4009
int
Packit 6c4009
main ()
Packit 6c4009
{
Packit 6c4009
Packit 6c4009
extern struct task_basic_info *i;
Packit 6c4009
long s = i->creation_time.seconds;
Packit 6c4009
Packit 6c4009
  ;
Packit 6c4009
  return 0;
Packit 6c4009
}
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_compile "$LINENO"; then :
Packit 6c4009
  libc_cv_mach_task_creation_time=yes
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_task_creation_time=no
Packit 6c4009
fi
Packit 6c4009
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_task_creation_time" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_task_creation_time" >&6; }
Packit 6c4009
if test $libc_cv_mach_task_creation_time = no; then
Packit 6c4009
  as_fn_error $? "you need Mach headers supporting task_info.creation_time" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
mach_interface_list=
Packit 6c4009
for ifc in mach mach4 gnumach \
Packit 6c4009
	   clock clock_priv host_priv host_security ledger lock_set \
Packit 6c4009
	   processor processor_set task task_notify thread_act vm_map \
Packit 6c4009
	   memory_object memory_object_default default_pager \
Packit 6c4009
	   i386/mach_i386 \
Packit 6c4009
	   ; do
Packit 6c4009
  as_ac_Header=`$as_echo "ac_cv_header_mach/${ifc}.defs" | $as_tr_sh`
Packit 6c4009
ac_fn_c_check_header_preproc "$LINENO" "mach/${ifc}.defs" "$as_ac_Header"
Packit 6c4009
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Packit 6c4009
    mach_interface_list="$mach_interface_list $ifc"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
done
Packit 6c4009
if test "x$mach_interface_list" = x; then
Packit 6c4009
  as_fn_error $? "what manner of Mach is this?" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
Packit 6c4009
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Packit 6c4009
if ${ac_cv_path_GREP+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  if test -z "$GREP"; then
Packit 6c4009
  ac_path_GREP_found=false
Packit 6c4009
  # Loop through the user's path and test for each of PROGNAME-LIST
Packit 6c4009
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Packit 6c4009
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Packit 6c4009
do
Packit 6c4009
  IFS=$as_save_IFS
Packit 6c4009
  test -z "$as_dir" && as_dir=.
Packit 6c4009
    for ac_prog in grep ggrep; do
Packit 6c4009
    for ac_exec_ext in '' $ac_executable_extensions; do
Packit 6c4009
      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Packit 6c4009
      as_fn_executable_p "$ac_path_GREP" || continue
Packit 6c4009
# Check for GNU ac_path_GREP and select it if it is found.
Packit 6c4009
  # Check for GNU $ac_path_GREP
Packit 6c4009
case `"$ac_path_GREP" --version 2>&1` in
Packit 6c4009
*GNU*)
Packit 6c4009
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
Packit 6c4009
*)
Packit 6c4009
  ac_count=0
Packit 6c4009
  $as_echo_n 0123456789 >"conftest.in"
Packit 6c4009
  while :
Packit 6c4009
  do
Packit 6c4009
    cat "conftest.in" "conftest.in" >"conftest.tmp"
Packit 6c4009
    mv "conftest.tmp" "conftest.in"
Packit 6c4009
    cp "conftest.in" "conftest.nl"
Packit 6c4009
    $as_echo 'GREP' >> "conftest.nl"
Packit 6c4009
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
Packit 6c4009
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Packit 6c4009
    as_fn_arith $ac_count + 1 && ac_count=$as_val
Packit 6c4009
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
Packit 6c4009
      # Best one so far, save it but keep looking for a better one
Packit 6c4009
      ac_cv_path_GREP="$ac_path_GREP"
Packit 6c4009
      ac_path_GREP_max=$ac_count
Packit 6c4009
    fi
Packit 6c4009
    # 10*(2^10) chars as input seems more than enough
Packit 6c4009
    test $ac_count -gt 10 && break
Packit 6c4009
  done
Packit 6c4009
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Packit 6c4009
esac
Packit 6c4009
Packit 6c4009
      $ac_path_GREP_found && break 3
Packit 6c4009
    done
Packit 6c4009
  done
Packit 6c4009
  done
Packit 6c4009
IFS=$as_save_IFS
Packit 6c4009
  if test -z "$ac_cv_path_GREP"; then
Packit 6c4009
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Packit 6c4009
  fi
Packit 6c4009
else
Packit 6c4009
  ac_cv_path_GREP=$GREP
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
Packit 6c4009
$as_echo "$ac_cv_path_GREP" >&6; }
Packit 6c4009
 GREP="$ac_cv_path_GREP"
Packit 6c4009
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
Packit 6c4009
$as_echo_n "checking for egrep... " >&6; }
Packit 6c4009
if ${ac_cv_path_EGREP+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
Packit 6c4009
   then ac_cv_path_EGREP="$GREP -E"
Packit 6c4009
   else
Packit 6c4009
     if test -z "$EGREP"; then
Packit 6c4009
  ac_path_EGREP_found=false
Packit 6c4009
  # Loop through the user's path and test for each of PROGNAME-LIST
Packit 6c4009
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Packit 6c4009
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Packit 6c4009
do
Packit 6c4009
  IFS=$as_save_IFS
Packit 6c4009
  test -z "$as_dir" && as_dir=.
Packit 6c4009
    for ac_prog in egrep; do
Packit 6c4009
    for ac_exec_ext in '' $ac_executable_extensions; do
Packit 6c4009
      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Packit 6c4009
      as_fn_executable_p "$ac_path_EGREP" || continue
Packit 6c4009
# Check for GNU ac_path_EGREP and select it if it is found.
Packit 6c4009
  # Check for GNU $ac_path_EGREP
Packit 6c4009
case `"$ac_path_EGREP" --version 2>&1` in
Packit 6c4009
*GNU*)
Packit 6c4009
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
Packit 6c4009
*)
Packit 6c4009
  ac_count=0
Packit 6c4009
  $as_echo_n 0123456789 >"conftest.in"
Packit 6c4009
  while :
Packit 6c4009
  do
Packit 6c4009
    cat "conftest.in" "conftest.in" >"conftest.tmp"
Packit 6c4009
    mv "conftest.tmp" "conftest.in"
Packit 6c4009
    cp "conftest.in" "conftest.nl"
Packit 6c4009
    $as_echo 'EGREP' >> "conftest.nl"
Packit 6c4009
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
Packit 6c4009
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Packit 6c4009
    as_fn_arith $ac_count + 1 && ac_count=$as_val
Packit 6c4009
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
Packit 6c4009
      # Best one so far, save it but keep looking for a better one
Packit 6c4009
      ac_cv_path_EGREP="$ac_path_EGREP"
Packit 6c4009
      ac_path_EGREP_max=$ac_count
Packit 6c4009
    fi
Packit 6c4009
    # 10*(2^10) chars as input seems more than enough
Packit 6c4009
    test $ac_count -gt 10 && break
Packit 6c4009
  done
Packit 6c4009
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Packit 6c4009
esac
Packit 6c4009
Packit 6c4009
      $ac_path_EGREP_found && break 3
Packit 6c4009
    done
Packit 6c4009
  done
Packit 6c4009
  done
Packit 6c4009
IFS=$as_save_IFS
Packit 6c4009
  if test -z "$ac_cv_path_EGREP"; then
Packit 6c4009
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Packit 6c4009
  fi
Packit 6c4009
else
Packit 6c4009
  ac_cv_path_EGREP=$EGREP
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
   fi
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
Packit 6c4009
$as_echo "$ac_cv_path_EGREP" >&6; }
Packit 6c4009
 EGREP="$ac_cv_path_EGREP"
Packit 6c4009
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host_page_size in mach_host.defs" >&5
Packit 6c4009
$as_echo_n "checking for host_page_size in mach_host.defs... " >&6; }
Packit 6c4009
if ${libc_cv_mach_host_page_size+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/mach_host.defs>
Packit 6c4009
Packit 6c4009
_ACEOF
Packit 6c4009
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Packit 6c4009
  $EGREP "host_page_size" >/dev/null 2>&1; then :
Packit 6c4009
  libc_cv_mach_host_page_size=yes
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_host_page_size=no
Packit 6c4009
fi
Packit 6c4009
rm -f conftest*
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_host_page_size" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_host_page_size" >&6; }
Packit 6c4009
if test $libc_cv_mach_host_page_size = yes; then
Packit 6c4009
  $as_echo "#define HAVE_HOST_PAGE_SIZE 1" >>confdefs.h
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
ac_fn_c_check_header_preproc "$LINENO" "mach/machine/ndr_def.h" "ac_cv_header_mach_machine_ndr_def_h"
Packit 6c4009
if test "x$ac_cv_header_mach_machine_ndr_def_h" = xyes; then :
Packit 6c4009
    DEFINES="$DEFINES -DNDR_DEF_HEADER='<mach/machine/ndr_def.h>'"
Packit 6c4009
else
Packit 6c4009
  ac_fn_c_check_header_preproc "$LINENO" "machine/ndr_def.h" "ac_cv_header_machine_ndr_def_h"
Packit 6c4009
if test "x$ac_cv_header_machine_ndr_def_h" = xyes; then :
Packit 6c4009
    DEFINES="$DEFINES -DNDR_DEF_HEADER='<machine/ndr_def.h>'"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for i386_io_perm_modify in mach_i386.defs" >&5
Packit 6c4009
$as_echo_n "checking for i386_io_perm_modify in mach_i386.defs... " >&6; }
Packit 6c4009
if ${libc_cv_mach_i386_ioports+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/i386/mach_i386.defs>
Packit 6c4009
Packit 6c4009
_ACEOF
Packit 6c4009
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Packit 6c4009
  $EGREP "i386_io_perm_modify" >/dev/null 2>&1; then :
Packit 6c4009
  libc_cv_mach_i386_ioports=yes
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_i386_ioports=no
Packit 6c4009
fi
Packit 6c4009
rm -f conftest*
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_i386_ioports" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_i386_ioports" >&6; }
Packit 6c4009
if test $libc_cv_mach_i386_ioports = yes; then
Packit 6c4009
  $as_echo "#define HAVE_I386_IO_PERM_MODIFY 1" >>confdefs.h
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for i386_set_gdt in mach_i386.defs" >&5
Packit 6c4009
$as_echo_n "checking for i386_set_gdt in mach_i386.defs... " >&6; }
Packit 6c4009
if ${libc_cv_mach_i386_gdt+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <mach/i386/mach_i386.defs>
Packit 6c4009
Packit 6c4009
_ACEOF
Packit 6c4009
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Packit 6c4009
  $EGREP "i386_set_gdt" >/dev/null 2>&1; then :
Packit 6c4009
  libc_cv_mach_i386_gdt=yes
Packit 6c4009
else
Packit 6c4009
  libc_cv_mach_i386_gdt=no
Packit 6c4009
fi
Packit 6c4009
rm -f conftest*
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mach_i386_gdt" >&5
Packit 6c4009
$as_echo "$libc_cv_mach_i386_gdt" >&6; }
Packit 6c4009
if test $libc_cv_mach_i386_gdt = yes; then
Packit 6c4009
  $as_echo "#define HAVE_I386_SET_GDT 1" >>confdefs.h
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
Packit 6c4009
# See if mig groks `retcode'.
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MIG supports the retcode keyword" >&5
Packit 6c4009
$as_echo_n "checking whether $MIG supports the retcode keyword... " >&6; }
Packit 6c4009
if ${hurd_cv_mig_retcode+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat > conftest.defs <<\EOF
Packit 6c4009
#include <mach/std_types.defs>
Packit 6c4009
#include <mach/mach_types.defs>
Packit 6c4009
subsystem foobar 1000;
Packit 6c4009
type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE
Packit 6c4009
	ctype: mach_port_t;
Packit 6c4009
simpleroutine foobar_reply (
Packit 6c4009
	reply_port: reply_port_t;
Packit 6c4009
	err: kern_return_t, RetCode);
Packit 6c4009
EOF
Packit 6c4009
if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'
Packit 6c4009
  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
Packit 6c4009
  (eval $ac_try) 2>&5
Packit 6c4009
  ac_status=$?
Packit 6c4009
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Packit 6c4009
  test $ac_status = 0; }; }; then
Packit 6c4009
  hurd_cv_mig_retcode=yes
Packit 6c4009
else
Packit 6c4009
  hurd_cv_mig_retcode=no
Packit 6c4009
fi
Packit 6c4009
rm -f conftest*
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_mig_retcode" >&5
Packit 6c4009
$as_echo "$hurd_cv_mig_retcode" >&6; }
Packit 6c4009
if test $hurd_cv_mig_retcode = yes; then
Packit 6c4009
  $as_echo "#define HAVE_MIG_RETCODE 1" >>confdefs.h
Packit 6c4009
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
if test -n "$sysheaders"; then
Packit 6c4009
  CPPFLAGS=$OLD_CPPFLAGS
Packit 6c4009
fi