gnats-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to gnats/libiberty/configure


From: Milan Zamazal
Subject: Changes to gnats/libiberty/configure
Date: Mon, 10 Dec 2001 18:04:19 -0500

Index: gnats/libiberty/configure
diff -c gnats/libiberty/configure:1.1 gnats/libiberty/configure:1.2
*** gnats/libiberty/configure:1.1       Tue Oct 26 03:10:16 1999
--- gnats/libiberty/configure   Mon Dec 10 18:03:27 2001
***************
*** 733,751 ****
  fi
  
  
- # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
- # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
- # are probably using a cross compiler, which will not be able to fully
- # link an executable.  This should really be fixed in autoconf
- # itself.
- 
- 
- 
  
  # 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:749: 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
--- 733,743 ----
  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:741: 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
***************
*** 775,781 ****
    # 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:779: 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
--- 767,773 ----
    # 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:771: 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
***************
*** 824,830 ****
  fi
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:828: 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
--- 816,822 ----
  fi
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:820: 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
***************
*** 833,839 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:837: 
\"$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
--- 825,831 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:829: 
\"$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
***************
*** 844,854 ****
  
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
    ac_test_CFLAGS="${CFLAGS+set}"
    ac_save_CFLAGS="$CFLAGS"
    CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:852: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 836,847 ----
  
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
+   ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
    ac_test_CFLAGS="${CFLAGS+set}"
    ac_save_CFLAGS="$CFLAGS"
    CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:845: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 872,883 ****
    fi
  else
    GCC=
    test "${CFLAGS+set}" = set || CFLAGS="-g"
  fi
  
  
  echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:881: checking for POSIXized ISC" >&5
  if test -d /etc/conf/kconfig.d &&
    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  then
--- 865,878 ----
    fi
  else
    GCC=
+   ac_libiberty_warn_cflags=
    test "${CFLAGS+set}" = set || CFLAGS="-g"
  fi
  
  
+ 
  echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:876: checking for POSIXized ISC" >&5
  if test -d /etc/conf/kconfig.d &&
    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  then
***************
*** 897,902 ****
--- 892,1012 ----
    ISC=
  fi
  
+ echo $ac_n "checking for working const""... $ac_c" 1>&6
+ echo "configure:897: checking for working const" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 902 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ /* Ultrix mips cc rejects this.  */
+ typedef int charset[2]; const charset x;
+ /* SunOS 4.1.1 cc rejects this.  */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this.  */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+    It does not let you subtract one const X* pointer from another in an arm
+    of an if-expression whose if-part is not a constant expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this.  */
+   char *t;
+   char const *s = 0 ? (char *) 0 : (char const *) 0;
+ 
+   *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+   int x[] = {25, 17};
+   const int *foo = &x[0];
+   ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+   typedef const int *iptr;
+   iptr p = 0;
+   ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+   struct s { int j; const int *ap[3]; };
+   struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+   const int foo = 10;
+ }
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:951: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+   rm -rf conftest*
+   ac_cv_c_const=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_c_const=no
+ fi
+ rm -f conftest*
+ fi
+ 
+ echo "$ac_t""$ac_cv_c_const" 1>&6
+ if test $ac_cv_c_const = no; then
+   cat >> confdefs.h <<\EOF
+ #define const 
+ EOF
+ 
+ fi
+ 
+ echo $ac_n "checking for inline""... $ac_c" 1>&6
+ echo "configure:972: checking for inline" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_cv_c_inline=no
+ for ac_kw in inline __inline__ __inline; do
+   cat > conftest.$ac_ext <<EOF
+ #line 979 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ } $ac_kw foo() {
+ ; return 0; }
+ EOF
+ if { (eval echo configure:986: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+   rm -rf conftest*
+   ac_cv_c_inline=$ac_kw; break
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
+ done
+ 
+ fi
+ 
+ echo "$ac_t""$ac_cv_c_inline" 1>&6
+ case "$ac_cv_c_inline" in
+   inline | yes) ;;
+   no) cat >> confdefs.h <<\EOF
+ #define inline 
+ EOF
+  ;;
+   *)  cat >> confdefs.h <<EOF
+ #define inline $ac_cv_c_inline
+ EOF
+  ;;
+ esac
+ 
  
  
  
***************
*** 915,921 ****
  # 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:919: 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
--- 1025,1031 ----
  # 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:1029: 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
***************
*** 976,982 ****
  # able to link anything, it had better be able to at least compile
  # something.
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:980: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
--- 1086,1092 ----
  # able to link anything, it had better be able to at least compile
  # something.
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1090: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 991,1003 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 995 "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:1001: \"$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
    :
--- 1101,1113 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1105 "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:1111: \"$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
    :
***************
*** 1008,1020 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1012 "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:1018: \"$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
    :
--- 1118,1130 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1122 "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:1128: \"$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
    :
***************
*** 1025,1037 ****
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1029 "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:1035: \"$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
    :
--- 1135,1147 ----
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1139 "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:1145: \"$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
    :
***************
*** 1055,1075 ****
  fi
  echo "$ac_t""$CPP" 1>&6
  
! for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h 
sys/time.h sys/resource.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1063: checking for $ac_hdr" >&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 1068 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1073: \"$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*
--- 1165,1185 ----
  fi
  echo "$ac_t""$CPP" 1>&6
  
! for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h 
strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1173: checking for $ac_hdr" >&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 1178 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1183: \"$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*
***************
*** 1096,1107 ****
  done
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 
1>&6
! echo "configure:1100: checking for sys/wait.h that is POSIX.1 compatible" >&5
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1105 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
--- 1206,1217 ----
  done
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 
1>&6
! echo "configure:1210: checking for sys/wait.h that is POSIX.1 compatible" >&5
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1215 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
***************
*** 1117,1123 ****
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
--- 1227,1233 ----
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1231: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
***************
*** 1137,1142 ****
--- 1247,1321 ----
  
  fi
  
+ echo $ac_n "checking whether time.h and sys/time.h may both be included""... 
$ac_c" 1>&6
+ echo "configure:1252: checking whether time.h and sys/time.h may both be 
included" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1257 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <time.h>
+ int main() {
+ struct tm *tp;
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+   rm -rf conftest*
+   ac_cv_header_time=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_header_time=no
+ fi
+ rm -f conftest*
+ fi
+ 
+ echo "$ac_t""$ac_cv_header_time" 1>&6
+ if test $ac_cv_header_time = yes; then
+   cat >> confdefs.h <<\EOF
+ #define TIME_WITH_SYS_TIME 1
+ EOF
+ 
+ fi
+ 
+ 
+ echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
+ echo "configure:1288: checking whether errno must be declared" >&5
+ if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1293 "configure"
+ #include "confdefs.h"
+ #include <errno.h>
+ int main() {
+ int x = errno;
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+   rm -rf conftest*
+   libiberty_cv_declare_errno=no
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   libiberty_cv_declare_errno=yes
+ fi
+ rm -f conftest*
+ fi
+ 
+ echo "$ac_t""$libiberty_cv_declare_errno" 1>&6
+ if test $libiberty_cv_declare_errno = yes
+ then cat >> confdefs.h <<\EOF
+ #define NEED_DECLARATION_ERRNO 1
+ EOF
+ 
+ fi
+ 
  
  # This is the list of functions which libiberty will provide if they
  # are not available on the host.
***************
*** 1146,1151 ****
--- 1325,1331 ----
  funcs="$funcs basename"
  funcs="$funcs bcmp"
  funcs="$funcs bcopy"
+ funcs="$funcs bsearch"
  funcs="$funcs bzero"
  funcs="$funcs calloc"
  funcs="$funcs clock"
***************
*** 1190,1204 ****
  # These are neither executed nor required, but they help keep
  # autoheader happy without adding a bunch of text to acconfig.h.
  if test "x" = "y"; then
!   for ac_func in asprintf atexit basename bcmp bcopy bzero calloc clock getcwd
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1197: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1202 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1370,1384 ----
  # These are neither executed nor required, but they help keep
  # autoheader happy without adding a bunch of text to acconfig.h.
  if test "x" = "y"; then
!   for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc 
clock
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1377: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1382 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1221,1227 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1401,1407 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1245,1259 ****
  fi
  done
  
!   for ac_func in getpagesize index insque mkstemps memchr memcmp memcpy 
memmove
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1252: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1257 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1425,1439 ----
  fi
  done
  
!   for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1432: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1437 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1276,1282 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1456,1462 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1300,1314 ****
  fi
  done
  
!   for ac_func in memset putenv random rename rindex sigsetmask strcasecmp
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1307: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1312 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1480,1494 ----
  fi
  done
  
!   for ac_func in memmove memset putenv random rename rindex sigsetmask
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1487: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1492 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1331,1337 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1511,1517 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1355,1369 ****
  fi
  done
  
!   for ac_func in setenv strchr strdup strncasecmp strrchr strstr strtod strtol
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1362: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1367 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1535,1549 ----
  fi
  done
  
!   for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1542: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1547 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1386,1392 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1566,1572 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1410,1424 ****
  fi
  done
  
!   for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1417: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1422 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1590,1604 ----
  fi
  done
  
!   for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1597: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1602 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1441,1447 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1621,1627 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1465,1491 ****
  fi
  done
  
!   cat >> confdefs.h <<\EOF
! #define HAVE_SYS_ERRLIST 1
! EOF
! 
!   cat >> confdefs.h <<\EOF
! #define HAVE_SYS_NERR 1
! EOF
! 
!   cat >> confdefs.h <<\EOF
! #define HAVE_SYS_SIGLIST 1
! EOF
! 
!   for ac_func in getrusage on_exit psignal strerror strsignal sysconf times
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1484: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1489 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1645,1659 ----
  fi
  done
  
!   for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1652: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1657 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1508,1514 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1676,1682 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1532,1546 ****
  fi
  done
  
!   for ac_func in sbrk gettimeofday
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1539: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1544 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1700,1714 ----
  fi
  done
  
!   for ac_func in sysconf times sbrk gettimeofday
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1707: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1712 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1563,1569 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1731,1737 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1587,1592 ****
--- 1755,1772 ----
  fi
  done
  
+   cat >> confdefs.h <<\EOF
+ #define HAVE_SYS_ERRLIST 1
+ EOF
+ 
+   cat >> confdefs.h <<\EOF
+ #define HAVE_SYS_NERR 1
+ EOF
+ 
+   cat >> confdefs.h <<\EOF
+ #define HAVE_SYS_SIGLIST 1
+ EOF
+ 
  fi
  
  # For each of these functions, if the host does not provide the
***************
*** 1646,1651 ****
--- 1826,1844 ----
  
  
  
+ case "${host}" in
+   *-*-cygwin*) 
+     cat >> confdefs.h <<\EOF
+ #define HAVE_SYS_ERRLIST 1
+ EOF
+ 
+     cat >> confdefs.h <<\EOF
+ #define HAVE_SYS_NERR 1
+ EOF
+ 
+     ;;
+ esac
+ 
  if test -z "${setobjs}"; then
    case "${host}" in
  
***************
*** 1702,1725 ****
      # provides from our shell variables, so that they appear to be
      # missing.
  
!     funcs="`echo $funcs | sed -e 's/random//'`"
!     LIBOBJS="$LIBOBJS random.o"
!     vars="`echo $vars | sed -e 's/sys_siglist//'`"
!     checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
      ;;
  
    *-*-mingw32*)
      # Under mingw32, sys_nerr and sys_errlist exist, but they are
      # macros, so the test below won't find them.
!     vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
!     cat >> confdefs.h <<\EOF
! #define HAVE_SYS_NERR 1
! EOF
! 
!     cat >> confdefs.h <<\EOF
! #define HAVE_SYS_ERRLIST 1
! EOF
! 
      ;;
  
    *-*-uwin*)
--- 1895,1916 ----
      # provides from our shell variables, so that they appear to be
      # missing.
  
!     # DJ - only if we're *building* cygwin, not just building *with* cygwin
!   
!     if test -n "${with_target_subdir}"
!     then
!       funcs="`echo $funcs | sed -e 's/random//'`"
!       LIBOBJS="$LIBOBJS random.o"
!       vars="`echo $vars | sed -e 's/sys_siglist//'`"
!       checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 
's/psignal//'`"
!     fi
      ;;
  
    *-*-mingw32*)
      # Under mingw32, sys_nerr and sys_errlist exist, but they are
      # macros, so the test below won't find them.
!     libiberty_cv_var_sys_nerr=yes
!     libiberty_cv_var_sys_errlist=yes
      ;;
  
    *-*-uwin*)
***************
*** 1730,1743 ****
      # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
      # macros (actually, these are imported from a DLL, but the end effect 
      # is the same), so the test below won't find them.
!     cat >> confdefs.h <<\EOF
! #define HAVE_SYS_NERR 1
! EOF
! 
!     cat >> confdefs.h <<\EOF
! #define HAVE_SYS_ERRLIST 1
! EOF
! 
      ;;
  
    esac
--- 1921,1928 ----
      # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
      # macros (actually, these are imported from a DLL, but the end effect 
      # is the same), so the test below won't find them.
!     libiberty_cv_var_sys_nerr=yes
!     libiberty_cv_var_sys_errlist=yes
      ;;
  
    esac
***************
*** 1745,1751 ****
    # We haven't set the list of objects yet.  Use the standard autoconf
    # tests.  This will only work if the compiler works.
    echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
works""... $ac_c" 1>&6
! echo "configure:1749: 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.
--- 1930,1936 ----
    # We haven't set the list of objects yet.  Use the standard autoconf
    # tests.  This will only work if the compiler works.
    echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
works""... $ac_c" 1>&6
! echo "configure:1934: 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.
***************
*** 1756,1767 ****
  
  cat > conftest.$ac_ext << EOF
  
! #line 1760 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; 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
--- 1941,1952 ----
  
  cat > conftest.$ac_ext << EOF
  
! #line 1945 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; 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
***************
*** 1787,1805 ****
    { echo "configure: error: installation or configuration problem: C compiler 
cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a 
cross-compiler""... $ac_c" 1>&6
! echo "configure:1791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
    for ac_func in $funcs
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1798: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1803 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1972,1990 ----
    { echo "configure: error: installation or configuration problem: C compiler 
cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a 
cross-compiler""... $ac_c" 1>&6
! echo "configure:1976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
    for ac_func in $funcs
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1983: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1988 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1822,1828 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 2007,2013 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1869,1887 ****
      # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:1873: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1878 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
--- 2054,2072 ----
      # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:2058: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2063 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
***************
*** 1902,1913 ****
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:1906: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1911 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
--- 2087,2098 ----
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:2091: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2096 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
***************
*** 1935,1941 ****
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
--- 2120,2126 ----
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
***************
*** 1967,1978 ****
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:1971: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1976 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
--- 2152,2163 ----
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:2156: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2161 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
***************
*** 1997,2008 ****
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2001: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2006 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2182,2193 ----
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2186: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2191 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2025,2031 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 2210,2216 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 2052,2058 ****
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:2056: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2237,2243 ----
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:2241: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2060,2066 ****
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 2064 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
--- 2245,2251 ----
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 2249 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
***************
*** 2079,2085 ****
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
--- 2264,2270 ----
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
***************
*** 2104,2115 ****
    esac
  
    echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2108: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2113 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 2289,2300 ----
    esac
  
    echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2293: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2298 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 2117,2123 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2121: \"$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*
--- 2302,2308 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2306: \"$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*
***************
*** 2134,2140 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2138 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 2319,2325 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2323 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 2152,2158 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2156 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 2337,2343 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2341 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 2173,2179 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 2177 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 2358,2364 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 2362 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 2184,2190 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 2369,2375 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 2208,2219 ****
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2212: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2217 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 2393,2404 ----
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2397: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2402 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 2242,2258 ****
  
  ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
! echo "configure:2246: checking for vfork.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 2251 "configure"
  #include "confdefs.h"
  #include <vfork.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2256: \"$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*
--- 2427,2443 ----
  
  ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
! echo "configure:2431: checking for vfork.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 2436 "configure"
  #include "confdefs.h"
  #include <vfork.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2441: \"$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*
***************
*** 2277,2294 ****
  fi
  
  echo $ac_n "checking for working vfork""... $ac_c" 1>&6
! echo "configure:2281: checking for working vfork" >&5
  if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
    echo $ac_n "checking for vfork""... $ac_c" 1>&6
! echo "configure:2287: checking for vfork" >&5
  if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2292 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char vfork(); below.  */
--- 2462,2479 ----
  fi
  
  echo $ac_n "checking for working vfork""... $ac_c" 1>&6
! echo "configure:2466: checking for working vfork" >&5
  if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
    echo $ac_n "checking for vfork""... $ac_c" 1>&6
! echo "configure:2472: checking for vfork" >&5
  if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2477 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char vfork(); below.  */
***************
*** 2311,2317 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_vfork=yes"
  else
--- 2496,2502 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_vfork=yes"
  else
***************
*** 2333,2339 ****
  ac_cv_func_vfork_works=$ac_cv_func_vfork
  else
    cat > conftest.$ac_ext <<EOF
! #line 2337 "configure"
  #include "confdefs.h"
  /* Thanks to Paul Eggert for this test.  */
  #include <stdio.h>
--- 2518,2524 ----
  ac_cv_func_vfork_works=$ac_cv_func_vfork
  else
    cat > conftest.$ac_ext <<EOF
! #line 2522 "configure"
  #include "confdefs.h"
  /* Thanks to Paul Eggert for this test.  */
  #include <stdio.h>
***************
*** 2428,2434 ****
    }
  }
  EOF
! if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_func_vfork_works=yes
  else
--- 2613,2619 ----
    }
  }
  EOF
! if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_func_vfork_works=yes
  else
***************
*** 2455,2473 ****
    fi
    for v in $vars; do
      echo $ac_n "checking for $v""... $ac_c" 1>&6
! echo "configure:2459: checking for $v" >&5
      if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2464 "configure"
  #include "confdefs.h"
  int *p;
  int main() {
  extern int $v; p = &$v;
  ; return 0; }
  EOF
! if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "libiberty_cv_var_$v=yes"
  else
--- 2640,2658 ----
    fi
    for v in $vars; do
      echo $ac_n "checking for $v""... $ac_c" 1>&6
! echo "configure:2644: checking for $v" >&5
      if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2649 "configure"
  #include "confdefs.h"
  int *p;
  int main() {
  extern int $v; p = &$v;
  ; return 0; }
  EOF
! if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "libiberty_cv_var_$v=yes"
  else
***************
*** 2493,2504 ****
    for ac_func in $checkfuncs
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2497: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2502 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2678,2786 ----
    for ac_func in $checkfuncs
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2682: checking for $ac_func" >&5
! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
!   echo $ac_n "(cached) $ac_c" 1>&6
! else
!   cat > conftest.$ac_ext <<EOF
! #line 2687 "configure"
! #include "confdefs.h"
! /* System header to define __stub macros and hopefully few prototypes,
!     which can conflict with char $ac_func(); below.  */
! #include <assert.h>
! /* Override any gcc2 internal prototype to avoid an error.  */
! /* We use char because int might match the return type of a gcc2
!     builtin and then its argument prototype would still apply.  */
! char $ac_func();
! 
! int main() {
! 
! /* The GNU C library defines this for functions which it implements
!     to always fail with ENOSYS.  Some functions are actually named
!     something starting with __ and the normal name is an alias.  */
! #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
! choke me
! #else
! $ac_func();
! #endif
! 
! ; return 0; }
! EOF
! if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
!   rm -rf conftest*
!   eval "ac_cv_func_$ac_func=yes"
! else
!   echo "configure: failed program was:" >&5
!   cat conftest.$ac_ext >&5
!   rm -rf conftest*
!   eval "ac_cv_func_$ac_func=no"
! fi
! rm -f conftest*
! fi
! 
! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
!   echo "$ac_t""yes" 1>&6
!     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
!   cat >> confdefs.h <<EOF
! #define $ac_tr_func 1
! EOF
!  
! else
!   echo "$ac_t""no" 1>&6
! fi
! done
! 
! fi
! 
! for ac_hdr in unistd.h
! do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2740: checking for $ac_hdr" >&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 2745 "configure"
! #include "confdefs.h"
! #include <$ac_hdr>
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2750: \"$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
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 
'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
!   cat >> confdefs.h <<EOF
! #define $ac_tr_hdr 1
! EOF
!  
! else
!   echo "$ac_t""no" 1>&6
! fi
! done
! 
! for ac_func in getpagesize
! do
! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2779: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2784 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2521,2527 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 2803,2809 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 2545,2552 ****
--- 2827,3095 ----
  fi
  done
  
+ echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+ echo "configure:2832: checking for working mmap" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; 
then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test "$cross_compiling" = yes; then
+   ac_cv_func_mmap_fixed_mapped=no
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 2840 "configure"
+ #include "confdefs.h"
+ 
+ /* Thanks to Mike Haertel and Jim Avera for this test.
+    Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+    For private mappings, we should verify that changes cannot be read()
+    back from the file, nor mmap's back from the file at a different
+    address.  (There have been systems where private was not correctly
+    implemented like the infamous i386 svr4.0, and systems where the
+    VM page cache was not coherent with the filesystem buffer cache
+    like early versions of FreeBSD and possibly contemporary NetBSD.)
+    For shared mappings, we should conversely verify that changes get
+    propogated back to all the places they're supposed to be.
+ 
+    Grep wants private fixed already mapped.
+    The main things grep needs to know about mmap are:
+    * does it exist and is it safe to write into the mmap'd area
+    * how to use it (BSD variants)  */
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ 
+ /* This mess was copied from the GNU getpagesize.h.  */
+ #ifndef HAVE_GETPAGESIZE
+ # ifdef HAVE_UNISTD_H
+ #  include <unistd.h>
+ # endif
+ 
+ /* Assume that all systems that can run configure have sys/param.h.  */
+ # ifndef HAVE_SYS_PARAM_H
+ #  define HAVE_SYS_PARAM_H 1
+ # endif
+ 
+ # ifdef _SC_PAGESIZE
+ #  define getpagesize() sysconf(_SC_PAGESIZE)
+ # else /* no _SC_PAGESIZE */
+ #  ifdef HAVE_SYS_PARAM_H
+ #   include <sys/param.h>
+ #   ifdef EXEC_PAGESIZE
+ #    define getpagesize() EXEC_PAGESIZE
+ #   else /* no EXEC_PAGESIZE */
+ #    ifdef NBPG
+ #     define getpagesize() NBPG * CLSIZE
+ #     ifndef CLSIZE
+ #      define CLSIZE 1
+ #     endif /* no CLSIZE */
+ #    else /* no NBPG */
+ #     ifdef NBPC
+ #      define getpagesize() NBPC
+ #     else /* no NBPC */
+ #      ifdef PAGESIZE
+ #       define getpagesize() PAGESIZE
+ #      endif /* PAGESIZE */
+ #     endif /* no NBPC */
+ #    endif /* no NBPG */
+ #   endif /* no EXEC_PAGESIZE */
+ #  else /* no HAVE_SYS_PARAM_H */
+ #   define getpagesize() 8192 /* punt totally */
+ #  endif /* no HAVE_SYS_PARAM_H */
+ # endif /* no _SC_PAGESIZE */
+ 
+ #endif /* no HAVE_GETPAGESIZE */
+ 
+ #ifdef __cplusplus
+ extern "C" { void *malloc(unsigned); }
+ #else
+ char *malloc();
+ #endif
+ 
+ int
+ main()
+ {
+       char *data, *data2, *data3;
+       int i, pagesize;
+       int fd;
+ 
+       pagesize = getpagesize();
+ 
+       /*
+        * First, make a file with some known garbage in it.
+        */
+       data = malloc(pagesize);
+       if (!data)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               *(data + i) = rand();
+       umask(0);
+       fd = creat("conftestmmap", 0600);
+       if (fd < 0)
+               exit(1);
+       if (write(fd, data, pagesize) != pagesize)
+               exit(1);
+       close(fd);
+ 
+       /*
+        * Next, try to mmap the file at a fixed address which
+        * already has something else allocated at it.  If we can,
+        * also make sure that we see the same garbage.
+        */
+       fd = open("conftestmmap", O_RDWR);
+       if (fd < 0)
+               exit(1);
+       data2 = malloc(2 * pagesize);
+       if (!data2)
+               exit(1);
+       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+           MAP_PRIVATE | MAP_FIXED, fd, 0L))
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data2 + i))
+                       exit(1);
+ 
+       /*
+        * Finally, make sure that changes to the mapped area
+        * do not percolate back to the file as seen by read().
+        * (This is a bug on some variants of i386 svr4.0.)
+        */
+       for (i = 0; i < pagesize; ++i)
+               *(data2 + i) = *(data2 + i) + 1;
+       data3 = malloc(pagesize);
+       if (!data3)
+               exit(1);
+       if (read(fd, data3, pagesize) != pagesize)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data3 + i))
+                       exit(1);
+       close(fd);
+       unlink("conftestmmap");
+       exit(0);
+ }
+ 
+ EOF
+ if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_func_mmap_fixed_mapped=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
+   ac_cv_func_mmap_fixed_mapped=no
+ fi
+ rm -fr conftest*
+ fi
+ 
+ fi
+ 
+ echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+ if test $ac_cv_func_mmap_fixed_mapped = yes; then
+   cat >> confdefs.h <<\EOF
+ #define HAVE_MMAP 1
+ EOF
+ 
+ fi
+ 
+ 
+ echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
+ echo "configure:3004: checking for working strncmp" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test "$cross_compiling" = yes; then
+   ac_cv_func_strncmp_works=no
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 3012 "configure"
+ #include "confdefs.h"
+ 
+ /* Test by Jim Wilson and Kaveh Ghazi.
+    Check whether strncmp reads past the end of its string parameters. */
+ #include <sys/types.h>
+ 
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+ #endif
+ 
+ #ifdef HAVE_SYS_MMAN_H
+ #include <sys/mman.h>
+ #endif
+ 
+ #ifndef MAP_ANON
+ #ifdef MAP_ANONYMOUS
+ #define MAP_ANON MAP_ANONYMOUS
+ #else
+ #define MAP_ANON MAP_FILE
+ #endif
+ #endif
+ 
+ #ifndef MAP_FILE
+ #define MAP_FILE 0
+ #endif
+ #ifndef O_RDONLY
+ #define O_RDONLY 0
+ #endif
+ 
+ #define MAP_LEN 0x10000
+ 
+ main ()
+ {
+ #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
+   char *p;
+   int dev_zero;
+ 
+   dev_zero = open ("/dev/zero", O_RDONLY);
+   if (dev_zero < 0)
+     exit (1);
+   
+   p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
+                    MAP_ANON|MAP_PRIVATE, dev_zero, 0);
+   if (p == (char *)-1)
+     exit (2);
+   else
+     {
+       char *string = "__si_type_info";
+       char *q = (char *) p + MAP_LEN - strlen (string) - 2;
+       char *r = (char *) p + 0xe;
+ 
+       strcpy (q, string);
+       strcpy (r, string);
+       strncmp (r, q, 14);
+     }
+ #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
+   exit (0);
+ }
+ 
+ EOF
+ if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_func_strncmp_works=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
+   ac_cv_func_strncmp_works=no
+ fi
+ rm -fr conftest*
  fi
  
+ rm -f core core.* *.core
+ fi
+ 
+ echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6
+ if test $ac_cv_func_strncmp_works = no ; then
+   LIBOBJS="$LIBOBJS strncmp.o"
+ fi
+ 
+ 
  # Install a library built with a cross compiler in $(tooldir) rather
  # than $(libdir).
  if test -z "${with_cross_host}"; then
***************
*** 2703,2708 ****
--- 3246,3252 ----
  address@hidden@%$AR%g
  address@hidden@%$RANLIB%g
  address@hidden@%$CC%g
+ address@hidden@%$ac_libiberty_warn_cflags%g
  address@hidden@%$INSTALL_PROGRAM%g
  address@hidden@%$INSTALL_SCRIPT%g
  address@hidden@%$INSTALL_DATA%g



reply via email to

[Prev in Thread] Current Thread [Next in Thread]