2002-02-07 03:52:18 +00:00
|
|
|
|
2002-02-17 07:57:32 +00:00
|
|
|
### Sanity checks for Mach header installation
|
|
|
|
ac_safe=`echo "mach/mach_types.h" | sed 'y%./+-%__p_%'`
|
|
|
|
echo $ac_n "checking for mach/mach_types.h""... $ac_c" 1>&6
|
|
|
|
echo "configure:6: checking for mach/mach_types.h" >&5
|
|
|
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
#line 11 "configure"
|
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/mach_types.h>
|
|
|
|
EOF
|
|
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
{ (eval echo configure:16: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=yes"
|
|
|
|
else
|
|
|
|
echo "$ac_err" >&5
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=no"
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|
|
|
echo "$ac_t""yes" 1>&6
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "$ac_t""no" 1>&6
|
|
|
|
{ echo "configure: error: cannot find Mach headers" 1>&2; exit 1; }
|
|
|
|
fi
|
|
|
|
|
|
|
|
ac_safe=`echo "mach/mach_types.defs" | sed 'y%./+-%__p_%'`
|
|
|
|
echo $ac_n "checking for mach/mach_types.defs""... $ac_c" 1>&6
|
|
|
|
echo "configure:40: checking for mach/mach_types.defs" >&5
|
|
|
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
#line 45 "configure"
|
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/mach_types.defs>
|
|
|
|
EOF
|
|
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
{ (eval echo configure:50: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=yes"
|
|
|
|
else
|
|
|
|
echo "$ac_err" >&5
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=no"
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|
|
|
echo "$ac_t""yes" 1>&6
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "$ac_t""no" 1>&6
|
|
|
|
{ echo "configure: error: cannot find Mach .defs files" 1>&2; exit 1; }
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2002-02-07 03:52:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo $ac_n "checking for task_t in mach/mach_types.h""... $ac_c" 1>&6
|
2002-02-17 07:57:32 +00:00
|
|
|
echo "configure:76: checking for task_t in mach/mach_types.h" >&5
|
2002-02-07 03:52:18 +00:00
|
|
|
if eval "test \"`echo '$''{'libc_cv_mach_task_t'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
#line 81 "configure"
|
2002-02-07 03:52:18 +00:00
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/mach_types.h>
|
|
|
|
int main() {
|
|
|
|
extern task_t foo;
|
|
|
|
; return 0; }
|
|
|
|
EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
if { (eval echo configure:88: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
2002-02-07 03:52:18 +00:00
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_task_t=task_t
|
|
|
|
else
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_task_t=task_port_t
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$ac_t""$libc_cv_mach_task_t" 1>&6
|
|
|
|
if test $libc_cv_mach_task_t != task_t; then
|
|
|
|
DEFINES="$DEFINES -Dtask_t=task_port_t"
|
|
|
|
fi
|
|
|
|
echo $ac_n "checking for thread_t in mach/mach_types.h""... $ac_c" 1>&6
|
2002-02-17 07:57:32 +00:00
|
|
|
echo "configure:105: checking for thread_t in mach/mach_types.h" >&5
|
2002-02-07 03:52:18 +00:00
|
|
|
if eval "test \"`echo '$''{'libc_cv_mach_thread_t'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
#line 110 "configure"
|
2002-02-07 03:52:18 +00:00
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/mach_types.h>
|
|
|
|
int main() {
|
|
|
|
extern thread_t foo;
|
|
|
|
; return 0; }
|
|
|
|
EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
if { (eval echo configure:117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
2002-02-07 03:52:18 +00:00
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_thread_t=thread_t
|
|
|
|
else
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_thread_t=thread_port_t
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$ac_t""$libc_cv_mach_thread_t" 1>&6
|
|
|
|
if test $libc_cv_mach_thread_t != thread_t; then
|
|
|
|
DEFINES="$DEFINES -Dthread_t=thread_port_t"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $ac_n "checking for creation_time in task_basic_info""... $ac_c" 1>&6
|
2002-02-17 07:57:32 +00:00
|
|
|
echo "configure:135: checking for creation_time in task_basic_info" >&5
|
2002-02-07 03:52:18 +00:00
|
|
|
if eval "test \"`echo '$''{'libc_cv_mach_task_creation_time'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
#line 140 "configure"
|
2002-02-07 03:52:18 +00:00
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/task_info.h>
|
|
|
|
int main() {
|
|
|
|
|
|
|
|
extern struct task_basic_info *i;
|
|
|
|
long s = i->creation_time.seconds;
|
|
|
|
|
|
|
|
; return 0; }
|
|
|
|
EOF
|
2002-02-17 07:57:32 +00:00
|
|
|
if { (eval echo configure:150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
2002-02-07 03:52:18 +00:00
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_task_creation_time=yes
|
|
|
|
else
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_task_creation_time=no
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$ac_t""$libc_cv_mach_task_creation_time" 1>&6
|
|
|
|
if test $libc_cv_mach_task_creation_time = no; then
|
|
|
|
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
|
|
|
fi
|
2002-02-17 07:57:32 +00:00
|
|
|
|
|
|
|
mach_interface_list=
|
|
|
|
for ifc in mach mach4 \
|
|
|
|
clock_priv host_priv host_security ledger lock_set \
|
|
|
|
processor processor_set task thread_act vm_map \
|
|
|
|
memory_object memory_object_default default_pager \
|
|
|
|
; do
|
|
|
|
ac_safe=`echo "mach/${ifc}.defs" | sed 'y%./+-%__p_%'`
|
|
|
|
echo $ac_n "checking for mach/${ifc}.defs""... $ac_c" 1>&6
|
|
|
|
echo "configure:175: checking for mach/${ifc}.defs" >&5
|
|
|
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
#line 180 "configure"
|
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/${ifc}.defs>
|
|
|
|
EOF
|
|
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
{ (eval echo configure:185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=yes"
|
|
|
|
else
|
|
|
|
echo "$ac_err" >&5
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
rm -rf conftest*
|
|
|
|
eval "ac_cv_header_$ac_safe=no"
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
fi
|
|
|
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|
|
|
echo "$ac_t""yes" 1>&6
|
|
|
|
mach_interface_list="$mach_interface_list $ifc"
|
|
|
|
else
|
|
|
|
echo "$ac_t""no" 1>&6
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
if test "x$mach_interface_list" = x; then
|
|
|
|
{ echo "configure: error: what manner of Mach is this?" 1>&2; exit 1; }
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $ac_n "checking for host_page_size in mach_host.defs""... $ac_c" 1>&6
|
|
|
|
echo "configure:212: checking for host_page_size in mach_host.defs" >&5
|
|
|
|
if eval "test \"`echo '$''{'libc_cv_mach_host_page_size'+set}'`\" = set"; then
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
else
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
#line 217 "configure"
|
|
|
|
#include "confdefs.h"
|
|
|
|
#include <mach/mach_host.defs>
|
|
|
|
EOF
|
|
|
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
|
|
egrep "host_page_size" >/dev/null 2>&1; then
|
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_host_page_size=yes
|
|
|
|
else
|
|
|
|
rm -rf conftest*
|
|
|
|
libc_cv_mach_host_page_size=no
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$ac_t""$libc_cv_mach_host_page_size" 1>&6
|
|
|
|
if test $libc_cv_mach_host_page_size = yes; then
|
|
|
|
cat >> confdefs.h <<\EOF
|
|
|
|
#define HAVE_HOST_PAGE_SIZE 1
|
|
|
|
EOF
|
|
|
|
|
|
|
|
fi
|