if [ -x "$vertest" ] ; then libc=`$vertest 2>/dev/null` ; fi
rm -f "$vertest" "$vertest.c"
if [ "$libc" = "" ] ; then
libc_sysroot=`"${CC-gcc}" -v 2>&1 | sed -n '/with-libc_sysroot/{s/^.*--with-libc_sysroot=//;s/ .*//;p;q;}'` # Only results in non-empty with a GCC cross-compiler
libc_file=`/bin/ls -1 -t "${libc_sysroot}"/lib/libc.so.* 2>/dev/null | sed -n 1,1p`
if [ "$libc_file" != "" ] ; then
libc_file=`echo "$libc_file" | sed 's|^.*/||'`
libc_file="$libc_sysroot/lib/$libc_file"
elif [ -f "$libc_sysroot/usr/lib/libc.a" ] ; then
libc_file="$libc_sysroot/usr/lib/libc.a"
else
libc_file="/error"
fi
libc=`strings -n 40 "$libc_file" 2>/dev/null | fgrep 'GNU C Library' | sed 's/^.*version //;s/[^0-9\.].*$//;' | sed -n 1,1p`
if [ "x$wi_cv_OS" != "x" ] && [ "$wi_cv_OS" != "$OS" ] ; then
{ echo "configure: error: Your config.cache file is invalid. It was created on $wi_cv_OS, but this machine is running $OS. Remove the config.cache file if you wish to continue." 1>&2; exit 1; }
fi
wi_cv_OS="$OS"
echo $ac_n "checking platform""... $ac_c" 1>&6
echo "configure:1099: checking platform" >&5
echo "$ac_t"""$OS"" 1>&6
case "$os" in
linux)
OS="linux-$arch-$libc"
;;
esac
if test -f sh/install-sh ; then chmod 755 sh/*.sh sh/config.* sh/install-sh ; fi
ac_aux_dir=
for ac_dir in sh $srcdir/sh; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in sh $srcdir/sh" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# 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:1132: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+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.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 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:1162: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+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.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; 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
fi
ac_cv_prog_CC="cc"
break
fi
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
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1213: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+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.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
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:1245: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
echo $ac_n "checking if shell can test for symlinks""... $ac_c" 1>&6
echo "configure:9472: checking if shell can test for symlinks" >&5
if eval "test \"`echo '$''{'wi_cv_shell_test_symlinks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
wi_cv_shell_test_symlinks="no"
wi_cv_test_L="false"
wi_cv_test_not_L=":"
rm -f config.lnk
if test ! -f "config.lnk" ; then
ln -s /bin/sh${ac_exeext} config.lnk
if test -f "config.lnk" ; then
( if test -L config.lnk ; then rm -f config.lnk ; fi ) 2>/dev/null
if test ! -f "config.lnk" ; then
wi_cv_shell_test_symlinks="yes"
wi_cv_test_L='test -L'
wi_cv_test_not_L='test ! -L'
else
( if test -h config.lnk ; then rm -f config.lnk ; fi ) 2>/dev/null
if test ! -f "config.lnk" ; then
wi_cv_shell_test_symlinks="yes"
wi_cv_test_L='test -h'
wi_cv_test_not_L='test ! -h'
fi
fi
fi
rm -f config.lnk
fi
fi
echo "$ac_t""$wi_cv_shell_test_symlinks" 1>&6
test_L="$wi_cv_test_L"
test_not_L="$wi_cv_test_not_L"
h_file="libncftp/ncftp.h"
if test -f "$h_file" && $test_not_L "$h_file" ; then
h_tmp=`echo "$h_file" | sed 's/\.h/.tmp/;'`
longest_int_subst="${LONGEST_INT-long}"
if sed 's!\ */\*\ set\ by\ configure\ at\ .*\*/!!' "$h_file" > "$h_tmp" ; then
touch -r "$h_file" "$h_tmp"
if cmp -s "$h_file" "$h_tmp" ; then
:
else
/bin/mv "$h_tmp" "$h_file"
chmod a+r "$h_file"
fi
fi
if sed 's/^#define longest_int.*/#define longest_int '"$longest_int_subst"'/;s/^#define longest_uint.*/#define longest_uint unsigned '"$longest_int_subst"'/;' "$h_file" > "$h_tmp" ; then
if cmp -s "$h_file" "$h_tmp" ; then
datestr=`date '+%Y-%m-%d %H:%M:%S'`
sed '/^#define longest_u?int/{s!$! /* set by configure at '"${datestr}"' */!;}' "$h_tmp" > "$h_file"
unset datestr
/bin/rm -f "$h_tmp"
chmod a+r "$h_file"
fi
fi
/bin/rm -f "$h_tmp"
unset h_tmp longest_int_subst
fi
unset h_file
h_file="libncftp/ncftp.h"
if test -f "$h_file" && $test_not_L "$h_file" ; then
h_tmp=`echo "$h_file" | sed 's/\.h/.tmp/;'`
if sed 's!\ */\*\ set\ by\ configure\ at\ .*\*/!!' "$h_file" > "$h_tmp" ; then
touch -r "$h_file" "$h_tmp"
if cmp -s "$h_file" "$h_tmp" ; then
:
else
/bin/mv "$h_tmp" "$h_file"
chmod a+r "$h_file"
fi
fi
if test "x$wi_cv_struct_stat64" = xyes ; then
if sed 's/^#define Stat .*/#define Stat stat64/;s/^#define Lstat .*/#define Lstat lstat64/;s/^#define Fstat .*/#define Fstat fstat64/;' "$h_file" > "$h_tmp" ; then
if cmp -s "$h_file" "$h_tmp" ; then
:
else
datestr=`date '+%Y-%m-%d %H:%M:%S'`
sed '/^#define [SLFs]*tat /{s!$! /* set by configure at '"${datestr}"' */!;}' "$h_tmp" > "$h_file"
unset datestr
/bin/rm -f "$h_tmp"
chmod a+r "$h_file"
fi
fi
else
if sed 's/^#define Stat .*/#define Stat stat/;s/^#define Lstat .*/#define Lstat lstat/;s/^#define Fstat .*/#define Fstat fstat/;' "$h_file" > "$h_tmp" ; then
if cmp -s "$h_file" "$h_tmp" ; then
:
else
datestr=`date '+%Y-%m-%d %H:%M:%S'`
sed '/^#define [SLFs]*tat /{s!$! /* set by configure at '"${datestr}"' */!;}' "$h_tmp" > "$h_file"
unset datestr
/bin/rm -f "$h_tmp"
chmod a+r "$h_file"
fi
fi
fi
/bin/rm -f "$h_tmp"
unset h_tmp longest_int_subst
fi
unset h_file
h_file="libncftp/ncftp.h"
if test -f "$h_file" && $test_not_L "$h_file" ; then
h_tmp=`echo "$h_file" | sed 's/\.h/.tmp/;'`
remove_cpp_warning=yes
if [ "$SYS" = linux ] ; then
#
# We need to retain #warning on Linux
#
remove_cpp_warning=no
fi
if [ "$GCC" = yes ] ; then
#
# GCC accepts #warning
#
remove_cpp_warning=no
fi
if [ "$remove_cpp_warning" = yes ] ; then
#
# Remove "#warning", since compiler will complain about it