+
+
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
ac_n= ac_c='\c' ac_t=
fi
+ if test -r /vmunix; then
+ kernel_id=`strings /vmunix | grep UNIX`
+ elif test -r /dynix; then
+ kernel_id=`strings /dynix | grep DYNIX`
+ else
+ kernel_id=
+ fi
+
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:777: checking host system type" >&5
+echo "configure:787: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# This can take a while to compute.
sysdep_dir=$srcdir/sysdeps
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
-echo "configure:900: checking sysdep dirs" >&5
+echo "configure:910: checking sysdep dirs" >&5
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1105: checking for a BSD compatible install" >&5
+echo "configure:1115: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
INSTALL='\$(..)./install-sh -c'
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1159: checking whether ln -s works" >&5
+echo "configure:1169: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-for ac_prog in msgfmt gmsgfmt
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1184: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
+
+# These programs are version sensitive.
+# Prepare to iterate over the program-name list.
+set dummy gcc cc; shift
+echo $ac_n "checking for $1""... $ac_c" 1>&6
+echo "configure:1194: checking for $1" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$MSGFMT"; then
- ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_MSGFMT="$ac_prog"
- break
- fi
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_word; do
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="$ac_word"
+ break
+ fi
+ done
+ test -n "$ac_cv_prog_CC" && break
done
IFS="$ac_save_ifs"
fi
fi
-MSGFMT="$ac_cv_prog_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
+if test -z "$ac_cv_prog_CC"; then
echo "$ac_t""no" 1>&6
-fi
-
-test -n "$MSGFMT" && break
-done
-test -n "$MSGFMT" || MSGFMT=":"
-
-if test "$MSGFMT" != ":"; then
- if $MSGFMT --version 2>&1 | grep 'GNU gettext.*0\.[1-9][0-9]' >/dev/null 2>&1
- then : # msgfmt from gettext 0.10 or greater, works.
+ CC=:
+ ac_verc_fail=t; ac_verc_fatal=t
+else
+# Found it, now check the version.
+ac_word=$ac_cv_prog_CC
+ if test "${ac_cv_prog_CC_ver+set}" != set; then
+ ac_cv_prog_CC_ver=`$ac_word -v 2>&1 | sed -n 's/^.*version \([egcs0-9.-]*\).*$/\1/p'`
+ fi
+ if test -n "$ac_cv_prog_CC_ver"; then
+ case $ac_cv_prog_CC_ver in
+ egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|2.8.[1-9]*|2.9.[0-9]*) ac_vers_ok=", ok"; CC=$ac_cv_prog_CC;;
+ *) ac_vers_ok=", bad"; CC=:
+ ac_verc_fail=t; ac_verc_fatal=t;;
+ esac
else
- echo "configure: warning:
-*** (g)msgfmt is too old or wrong version (need gettext 0.10 or better)." 1>&2
- MSGFMT=":"
+ ac_vers_ok="v. ?.??, bad"; CC=:
+ ac_verc_fail=t; ac_verc_fatal=t
fi
+echo "$ac_t""$ac_word $ac_cv_prog_CC_ver$ac_vers_ok" 1>&6
fi
-# Extract the first word of "makeinfo", so it can be a program name with args.
-set dummy makeinfo; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1226: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
+# Prepare to iterate over the program-name list.
+set dummy make gmake; shift
+echo $ac_n "checking for $1""... $ac_c" 1>&6
+echo "configure:1241: checking for $1" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$MAKEINFO"; then
- ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+ if test -n "$MAKE"; then
+ ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_MAKEINFO="makeinfo"
- break
- fi
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_word; do
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_MAKE="$ac_word"
+ break
+ fi
+ done
+ test -n "$ac_cv_prog_MAKE" && break
done
IFS="$ac_save_ifs"
fi
fi
-MAKEINFO="$ac_cv_prog_MAKEINFO"
-if test -n "$MAKEINFO"; then
- echo "$ac_t""$MAKEINFO" 1>&6
-else
+if test -z "$ac_cv_prog_MAKE"; then
echo "$ac_t""no" 1>&6
-fi
-
-if test "$MAKEINFO"; then
- if $MAKEINFO --version | grep 'texinfo 3\.[1-9][1-9]' >/dev/null 2>&1
- then : # Makeinfo 3.11 or greater, works.
+ MAKE=:
+ ac_verc_fail=t; ac_verc_fatal=t
+else
+# Found it, now check the version.
+ac_word=$ac_cv_prog_MAKE
+ if test "${ac_cv_prog_MAKE_ver+set}" != set; then
+ ac_cv_prog_MAKE_ver=`$ac_word --version 2>&1 | sed -n 's/^.*version \([0-9][0-9.]*\), by.*$/\1/p'`
+ fi
+ if test -n "$ac_cv_prog_MAKE_ver"; then
+ case $ac_cv_prog_MAKE_ver in
+ 3.75 | 3.76.[2-9] | 3.7[789]* | 3.[89]*) ac_vers_ok=", ok"; MAKE=$ac_cv_prog_MAKE;;
+ *) ac_vers_ok=", bad"; MAKE=:
+ ac_verc_fail=t; ac_verc_fatal=t;;
+ esac
else
- echo "configure: warning:
-*** makeinfo is too old (need version 3.11 or better).
-*** You should install the needed version and re-configure since otherwise
-*** you won't get the info pages installed." 1>&2
- MAKEINFO=
+ ac_vers_ok="v. ?.??, bad"; MAKE=:
+ ac_verc_fail=t; ac_verc_fatal=t
fi
+echo "$ac_t""$ac_word $ac_cv_prog_MAKE_ver$ac_vers_ok" 1>&6
fi
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1266: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+
+# Prepare to iterate over the program-name list.
+set dummy msgfmt gmsgfmt; shift
+echo $ac_n "checking for $1""... $ac_c" 1>&6
+echo "configure:1289: checking for $1" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
+ if test -n "$MSGFMT"; then
+ ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_word; do
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_MSGFMT="$ac_word"
+ break
+ fi
+ done
+ test -n "$ac_cv_prog_MSGFMT" && break
done
IFS="$ac_save_ifs"
fi
fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
+if test -z "$ac_cv_prog_MSGFMT"; then
echo "$ac_t""no" 1>&6
+ MSGFMT=:
+ ac_verc_fail=t;
+else
+# Found it, now check the version.
+ac_word=$ac_cv_prog_MSGFMT
+ if test "${ac_cv_prog_MSGFMT_ver+set}" != set; then
+ ac_cv_prog_MSGFMT_ver=`$ac_word --version 2>&1 | sed -n 's/^.*GNU gettext.*\([0-9][0-9]*\.[0-9]*\).*$/\1/p'`
+ fi
+ if test -n "$ac_cv_prog_MSGFMT_ver"; then
+ case $ac_cv_prog_MSGFMT_ver in
+ 0.[1-9][0-9] | [1-9].*) ac_vers_ok=", ok"; MSGFMT=$ac_cv_prog_MSGFMT;;
+ *) ac_vers_ok=", bad"; MSGFMT=:
+ ac_verc_fail=t; ;;
+ esac
+ else
+ ac_vers_ok="v. ?.??, bad"; MSGFMT=:
+ ac_verc_fail=t;
+ fi
+echo "$ac_t""$ac_word $ac_cv_prog_MSGFMT_ver$ac_vers_ok" 1>&6
fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1295: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+# Prepare to iterate over the program-name list.
+set dummy makeinfo; shift
+echo $ac_n "checking for $1""... $ac_c" 1>&6
+echo "configure:1336: checking for $1" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
+ if test -n "$MAKEINFO"; then
+ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- ac_prog_rejected=no
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_word; do
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_MAKEINFO="$ac_word"
+ break
fi
- ac_cv_prog_CC="cc"
- break
- fi
+ done
+ test -n "$ac_cv_prog_MAKEINFO" && break
done
IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
fi
fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
+if test -z "$ac_cv_prog_MAKEINFO"; then
echo "$ac_t""no" 1>&6
+ MAKEINFO=:
+ ac_verc_fail=t;
+else
+# Found it, now check the version.
+ac_word=$ac_cv_prog_MAKEINFO
+ if test "${ac_cv_prog_MAKEINFO_ver+set}" != set; then
+ ac_cv_prog_MAKEINFO_ver=`$ac_word --version 2>&1 | sed -n 's/^.*GNU texinfo \([0-9][0-9.]*\).*$/\1/p'`
+ fi
+ if test -n "$ac_cv_prog_MAKEINFO_ver"; then
+ case $ac_cv_prog_MAKEINFO_ver in
+ 3.1[1-9] | 3.[2-9][0-9]) ac_vers_ok=", ok"; MAKEINFO=$ac_cv_prog_MAKEINFO;;
+ *) ac_vers_ok=", bad"; MAKEINFO=:
+ ac_verc_fail=t; ;;
+ esac
+ else
+ ac_vers_ok="v. ?.??, bad"; MAKEINFO=:
+ ac_verc_fail=t;
+ fi
+echo "$ac_t""$ac_word $ac_cv_prog_MAKEINFO_ver$ac_vers_ok" 1>&6
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1343: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+test -n "$ac_verc_fatal" && { echo "configure: error:
+*** Some critical program is missing or too old.
+*** Check the INSTALL file for required versions." 1>&2; exit 1; }
+
+test -n "$ac_verc_fail" && echo "configure: warning:
+*** An auxiliary program is missing or too old;
+*** some features will be disabled.
+*** Check the INSTALL file for required versions." 1>&2
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1392: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1353 "configure"
+#line 1405 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
fi
rm -fr conftest*
+fi
+
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
cross_linkable=no
cross_linkable=yes
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1380: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1434: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1386: checking whether we are using GNU C" >&5
+echo "configure:1446: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-
- cat > conftest.c <<EOF
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
- yes;
-#endif
-EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- if test -z "$CFLAGS"; then
- CFLAGS="-g -O2"
- fi
- else
- { echo "configure: error: We require GNU CC version 2.7 or newer" 1>&2; exit 1; }
- fi
-else
+if test $ac_cv_prog_gcc != yes; then
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1424: checking build system type" >&5
+echo "configure:1468: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1447: checking for $ac_word" >&5
+echo "configure:1491: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1478: checking how to run the C preprocessor" >&5
+echo "configure:1522: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1493 "configure"
+#line 1537 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
+#line 1554 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
if test -n "$path_binutils"; then
# Make absolute; ensure a single trailing slash.
path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
- CC="$CC -B$with_binutils"
+ CC="$CC -B$path_binutils"
fi
AS=`$CC -print-file-name=as`
LD=`$CC -print-file-name=ld`
# Determine whether we are using GNU binutils.
echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6
-echo "configure:1549: checking whether $AS is GNU as" >&5
+echo "configure:1593: checking whether $AS is GNU as" >&5
if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gnu_as=$libc_cv_prog_as_gnu
echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6
-echo "configure:1567: checking whether $LD is GNU ld" >&5
+echo "configure:1611: checking whether $LD is GNU ld" >&5
if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$libc_cv_prog_ld_gnu" 1>&6
gnu_ld=$libc_cv_prog_ld_gnu
+
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1591: checking for $ac_word" >&5
+echo "configure:1636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1622: checking for $ac_word" >&5
+echo "configure:1667: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1653: checking for $ac_word" >&5
+echo "configure:1698: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# check if ar takes S
echo $ac_n "checking for ar S""... $ac_c" 1>&6
-echo "configure:1687: checking for ar S" >&5
+echo "configure:1732: checking for ar S" >&5
if eval "test \"`echo '$''{'libc_cv_ar_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
tmplib=lib$$.a
rm -f $tmpo $tmplib
touch $tmpo
-if { ac_try='${AR-ar} rcuS $tmplib $tmpo > /dev/null 2>&1'; { (eval echo configure:1695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+if { ac_try='${AR-ar} rcuS $tmplib $tmpo > /dev/null 2>&1'; { (eval echo configure:1740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_ar_S=yes
else
libc_cv_ar_S=no
echo "$ac_t""$libc_cv_ar_S" 1>&6
-# check for recent compiler
-echo $ac_n "checking compiler version""... $ac_c" 1>&6
-echo "configure:1707: checking compiler version" >&5
-case `${CC-cc} -v 2>&1` in
- *egcs-2.91.* | *egcs-1.0.[2-9]* | *egcs-1.1* | *2.8.[1-9]* | *2.9.[0-9]*)
- cc_is_recent="ok"
- ;;
- *)
- cc_is_recent="too old"
- ;;
-esac
-echo "$ac_t""$cc_is_recent" 1>&6
-if test "$cc_is_recent" != "ok"; then
- echo "configure: warning:
-*** Your compiler is too old.
-*** You need at least egcs 1.0.2 or GNU CC 2.8.1 to compile glibc.
-" 1>&2
-fi
-
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
# LD_LIBRARY_PATH contains the current directory if one of the following
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:1732: checking LD_LIBRARY_PATH variable" >&5
+echo "configure:1758: checking LD_LIBRARY_PATH variable" >&5
case ${LD_LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
ld_library_path_setting="contains current directory"
esac
echo "$ac_t""$ld_library_path_setting" 1>&6
if test "$ld_library_path_setting" != "ok"; then
-{ echo "configure: error: *** LD_LIBRARY_PATH shouldn't contain the current path when building glibc.
-*** Please change the environment variable and run configure again." 1>&2; exit 1; }
+{ echo "configure: error:
+*** LD_LIBRARY_PATH shouldn't contain the current directory when
+*** building glibc. Please change the environment variable
+*** and run configure again." 1>&2; exit 1; }
fi
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1750: checking for $ac_word" >&5
+echo "configure:1778: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ksh", so it can be a program name with args.
set dummy ksh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1792: checking for $ac_word" >&5
+echo "configure:1820: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1838: checking for $ac_word" >&5
+echo "configure:1866: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
-echo "configure:1873: checking for signed size_t type" >&5
+echo "configure:1901: checking for signed size_t type" >&5
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
-echo "configure:1897: checking for libc-friendly stddef.h" >&5
+echo "configure:1925: checking for libc-friendly stddef.h" >&5
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1902 "configure"
+#line 1930 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
-if { (eval echo configure:1917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
-echo "configure:1936: checking whether we need to use -P to assemble .S files" >&5
+echo "configure:1964: checking whether we need to use -P to assemble .S files" >&5
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
-# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
-# be told to read stdin. This causes the compiler to hang when fed an
-# .s file.
-if test $ac_cv_prog_gcc = yes; then
- case `${CC-cc} -v 2>&1` in
- *2.7*)
- # We must check this even if -pipe is not given here, because the user
- # might do `make CFLAGS=-pipe'.
- echo $ac_n "checking for gcc 2.7.x -pipe bug""... $ac_c" 1>&6
-echo "configure:1967: checking for gcc 2.7.x -pipe bug" >&5
-if eval "test \"`echo '$''{'libc_cv_gcc_pipe_bug'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cp /dev/null conftest.s
- cat >conftest1.s <<EOF
-.nosuchdirective
-EOF
- if ${CC-cc} -pipe -c conftest.s <conftest1.s 2>/dev/null; then
- libc_cv_gcc_pipe_bug=no
- else
- libc_cv_gcc_pipe_bug=yes
- fi
- rm -f conftest*
-fi
-
-echo "$ac_t""$libc_cv_gcc_pipe_bug" 1>&6
- if test $libc_cv_gcc_pipe_bug = yes; then
- makeCC="${CC-cc} -B\$(common-objpfx)"
- makeCFLAGS=$CFLAGS
- CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
- fi;;
- *) libc_cv_gcc_pipe_bug=no;;
- esac
-else
- libc_cv_gcc_pipe_bug=no
-fi
-
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
-echo "configure:1996: checking for assembler global-symbol directive" >&5
+echo "configure:1987: checking for assembler global-symbol directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
-echo "configure:2026: checking for .set assembler directive" >&5
+echo "configure:2017: checking for .set assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
-echo "configure:2060: checking for .symver assembler directive" >&5
+echo "configure:2051: checking for .symver assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
-echo "configure:2079: checking for ld --version-script" >&5
+echo "configure:2070: checking for ld --version-script" >&5
if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
-nostartfiles -nostdlib
-Wl,--version-script,conftest.map
- 1>&5'; { (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+ 1>&5'; { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_ld_version_script_option=yes
else
fi
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
-echo "configure:2140: checking for .previous assembler directive" >&5
+echo "configure:2131: checking for .previous assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
.section foo_section
.previous
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
-echo "configure:2164: checking for .popsection assembler directive" >&5
+echo "configure:2155: checking for .popsection assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
.pushsection foo_section
.popsection
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
-echo "configure:2192: checking for .init and .fini sections" >&5
+echo "configure:2183: checking for .init and .fini sections" >&5
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 2188 "configure"
#include "confdefs.h"
int main() {
asm (".text");
; return 0; }
EOF
-if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
else
if test $ac_cv_prog_cc_works = yes; then
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2234: checking for _ prefix on C symbol names" >&5
+echo "configure:2225: checking for _ prefix on C symbol names" >&5
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2239 "configure"
+#line 2230 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
-if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2261: checking for _ prefix on C symbol names" >&5
+echo "configure:2252: checking for _ prefix on C symbol names" >&5
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2257 "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
-if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if grep _underscore_test conftest* >/dev/null; then
rm -f conftest*
libc_cv_asm_underscores=yes
fi
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
-echo "configure:2303: checking for assembler .weak directive" >&5
+echo "configure:2294: checking for assembler .weak directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
-echo "configure:2326: checking for assembler .weakext directive" >&5
+echo "configure:2317: checking for assembler .weakext directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
-echo "configure:2364: checking for ld --no-whole-archive" >&5
+echo "configure:2355: checking for ld --no-whole-archive" >&5
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
- -o conftest conftest.c 1>&5'; { (eval echo configure:2375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_ld_no_whole_archive=yes
else
libc_cv_ld_no_whole_archive=no
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
-echo "configure:2386: checking for gcc -fno-exceptions" >&5
+echo "configure:2377: checking for gcc -fno-exceptions" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
- -o conftest conftest.c 1>&5'; { (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
if test "$base_machine" = alpha ; then
echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
-echo "configure:2409: checking for function ..ng prefix" >&5
+echo "configure:2400: checking for function ..ng prefix" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
foo () { }
EOF
-if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_gcc_alpha_ng_prefix=yes
else
fi
echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
-echo "configure:2440: checking for DWARF2 unwind info support" >&5
+echo "configure:2431: checking for DWARF2 unwind info support" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
-#line 2445 "configure"
+#line 2436 "configure"
static char __EH_FRAME_BEGIN__;
_start ()
{
EOF
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
-nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_dwarf2_unwind_info=static
else
libc_cv_gcc_dwarf2_unwind_info=no
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame
-nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_dwarf2_unwind_info=yes
else
libc_cv_gcc_dwarf2_unwind_info=no
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2554: checking OS release for uname" >&5
+echo "configure:2545: checking OS release for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
uname_release="$libc_cv_uname_release"
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
-echo "configure:2576: checking OS version for uname" >&5
+echo "configure:2567: checking OS version for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2598: checking stdio selection" >&5
+echo "configure:2589: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
echo "$ac_t""$stdio" 1>&6
echo $ac_n "checking ldap selection""... $ac_c" 1>&6
-echo "configure:2610: checking ldap selection" >&5
+echo "configure:2601: checking ldap selection" >&5
case $add_ons in
*ldap*)
fi
echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
-echo "configure:2673: checking whether -fPIC is default" >&5
+echo "configure:2664: checking whether -fPIC is default" >&5
if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
-if test $libc_cv_gcc_pipe_bug = yes; then
- realCC=$CC
- CC=$makeCC
- CFLAGS=$makeCFLAGS
-fi
- if test -r /vmunix; then
- kernel_id=`strings /vmunix | grep UNIX`
- elif test -r /dynix; then
- kernel_id=`strings /dynix | grep DYNIX`
- else
- kernel_id=
- fi
-
-
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
+s%@CC@%$CC%g
+s%@MAKE@%$MAKE%g
s%@MSGFMT@%$MSGFMT%g
s%@MAKEINFO@%$MAKEINFO%g
-s%@CC@%$CC%g
s%@cross_linkable@%$cross_linkable%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
done
EOF
cat >> $CONFIG_STATUS <<EOF
-realCC=$realCC
echo '$config_vars' >> config.make; test -d bits || mkdir bits
EOF
cat >> $CONFIG_STATUS <<\EOF
-if test "$realCC"; then
- sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
- mv specsT specs
-fi
-
exit 0
EOF
chmod +x $CONFIG_STATUS
--- /dev/null
+/* strtok (str, delim) -- Return next DELIM separated token from STR.
+ For Intel 80686.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+/* This file can be used for three variants of the strtok function:
+
+ strtok:
+ INPUT PARAMETER:
+ str (sp + 4)
+ delim (sp + 8)
+
+ strtok_r:
+ INPUT PARAMETER:
+ str (sp + 4)
+ delim (sp + 8)
+ save_ptr (sp + 12)
+
+ We do a common implementation here. */
+
+#ifndef USE_AS_STRTOK_R
+ .bss
+ .local save_ptr
+ ASM_TYPE_DIRECTIVE (save_ptr, @object)
+ .size save_ptr, 4
+save_ptr:
+ .space 4
+
+#define FUNCTION strtok
+#endif
+
+ .text
+
+#if !defined USE_AS_STRTOK_R && defined PIC
+0: movl (%esp), %ebx
+ ret
+#endif
+
+ENTRY (FUNCTION)
+
+#if !defined USE_AS_STRTOK_R && defined PIC
+ pushl %ebx /* Save PIC register. */
+ call 0b
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+#endif
+
+ /* First we create a table with flags for all possible characters.
+ For the ASCII (7bit/8bit) or ISO-8859-X character sets which are
+ supported by the C string functions we have 256 characters.
+ Before inserting marks for the stop characters we clear the whole
+ table. */
+ movl %edi, %edx
+ subl $256, %esp
+ movl $64, %ecx
+ movl %esp, %edi
+ xorl %eax, %eax
+ rep
+ stosl
+
+ /* Note: %ecx = 0 !!! */
+ movl %edx, %edi
+
+#if !defined USE_AS_STRTOK_R && defined PIC
+ movl 264(%esp), %edx /* Get start of string. */
+#else
+ movl 260(%esp), %edx /* Get start of string. */
+#endif
+
+#ifdef USE_AS_STRTOK_R
+ /* The value is stored in the third argument. */
+ movl 268(%esp), %eax
+ movl (%eax), %eax
+#else
+ /* The value is in the local variable defined above. But
+ we have to take care for PIC code. */
+# ifndef PIC
+ movl save_ptr, %eax
+# else
+ movl save_ptr@GOTOFF(%ebx), %eax
+# endif
+#endif
+
+ /* If the pointer is NULL we have to use the stored value of
+ the last run. */
+ cmpl $0, %edx
+ cmove %eax, %edx
+
+#if !defined USE_AS_STRTOK_R && defined PIC
+ movl 268(%esp), %eax /* Get start of delimiter set. */
+#else
+ movl 264(%esp), %eax /* Get start of delimiter set. */
+#endif
+
+/* For understanding the following code remember that %ecx == 0 now.
+ Although all the following instruction only modify %cl we always
+ have a correct zero-extended 32-bit value in %ecx. */
+
+L(2): movb (%eax), %cl /* get byte from stopset */
+ testb %cl, %cl /* is NUL char? */
+ jz L(1) /* yes => start compare loop */
+ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */
+
+ movb 1(%eax), %cl /* get byte from stopset */
+ testb $0xff, %cl /* is NUL char? */
+ jz L(1) /* yes => start compare loop */
+ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */
+
+ movb 2(%eax), %cl /* get byte from stopset */
+ testb $0xff, %cl /* is NUL char? */
+ jz L(1) /* yes => start compare loop */
+ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */
+
+ movb 3(%eax), %cl /* get byte from stopset */
+ addl $4, %eax /* increment stopset pointer */
+ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */
+ testb $0xff, %cl /* is NUL char? */
+ jnz L(2) /* no => process next dword from stopset */
+
+L(1): leal -4(%edx), %eax /* prepare loop */
+
+ /* We use a neat trick for the following loop. Normally we would
+ have to test for two termination conditions
+ 1. a character in the stopset was found
+ and
+ 2. the end of the string was found
+ As a sign that the character is in the stopset we store its
+ value in the table. The value of NUL is NUL so the loop
+ terminates for NUL in every case. */
+
+L(3): addl $4, %eax /* adjust pointer for full loop round */
+
+ movb (%eax), %cl /* get byte from string */
+ testb %cl, (%esp,%ecx) /* is it contained in stopset? */
+ jz L(4) /* no => start of token */
+
+ movb 1(%eax), %cl /* get byte from string */
+ testb %cl, (%esp,%ecx) /* is it contained in stopset? */
+ jz L(5) /* no => start of token */
+
+ movb 2(%eax), %cl /* get byte from string */
+ testb %cl, (%esp,%ecx) /* is it contained in stopset? */
+ jz L(6) /* no => start of token */
+
+ movb 3(%eax), %cl /* get byte from string */
+ testb %cl, (%esp,%ecx) /* is it contained in stopset? */
+ jnz L(3) /* yes => start of loop */
+
+ incl %eax /* adjust pointer */
+L(6): incl %eax
+L(5): incl %eax
+
+ /* Now we have to terminate the string. */
+
+L(4): leal -4(%eax), %edx /* We use %EDX for the next run. */
+
+L(7): addl $4, %edx /* adjust pointer for full loop round */
+
+ movb (%edx), %cl /* get byte from string */
+ cmpb %cl, (%esp,%ecx) /* is it contained in skipset? */
+ je L(8) /* yes => return */
+
+ movb 1(%edx), %cl /* get byte from string */
+ cmpb %cl, (%esp,%ecx) /* is it contained in skipset? */
+ je L(9) /* yes => return */
+
+ movb 2(%edx), %cl /* get byte from string */
+ cmpb %cl, (%esp,%ecx) /* is it contained in skipset? */
+ je L(10) /* yes => return */
+
+ movb 3(%edx), %cl /* get byte from string */
+ cmpb %cl, (%esp,%ecx) /* is it contained in skipset? */
+ jne L(7) /* no => start loop again */
+
+ incl %edx /* adjust pointer */
+L(10): incl %edx
+L(9): incl %edx
+
+L(8): /* Remove the stopset table. */
+ addl $256, %esp
+
+ cmpl %eax, %edx
+ je L(returnNULL) /* There was no token anymore. */
+
+ movb $0, (%edx) /* Terminate string. */
+
+ /* Are we at end of string? */
+ cmpb $0, %cl
+ leal 1(%edx), %ecx
+ cmovne %ecx, %edx
+
+ /* Store the pointer to the next character. */
+#ifdef USE_AS_STRTOK_R
+ movl 12(%esp), %ecx
+ movl %edx, (%ecx)
+#else
+# ifndef PIC
+ movl %edx, save_ptr
+# else
+ movl %edx, save_ptr@GOTOFF(%ebx)
+ popl %ebx
+# endif
+#endif
+ ret
+
+L(returnNULL):
+ xorl %eax, %eax
+
+ /* Store current pointer for next round. */
+#ifdef USE_AS_STRTOK_R
+ movl 12(%esp), %ecx
+ movl %edx, (%ecx)
+#else
+# ifndef PIC
+ movl %edx, save_ptr
+# else
+ movl %edx, save_ptr@GOTOFF(%ebx)
+ popl %ebx
+# endif
+#endif
+ ret
+END (FUNCTION)