Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
[deliverable/binutils-gdb.git] / bfd / configure
index 43b20d1ba23729eb49e271b5402303edcb0a4e10..0dd26bf76d77d6f7885abc1592e0a61a3dcead8f 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.4 
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Generated automatically using autoconf version 2.10 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
@@ -15,6 +15,12 @@ ac_help="$ac_help
   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)"
 ac_help="$ac_help
   --enable-targets        alternative target configurations"
+ac_help="$ac_help
+  --enable-shared         build shared BFD library"
+ac_help="$ac_help
+  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
+ac_help="$ac_help
+  --with-mmap             try using mmap for BFD input files if available"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -37,9 +43,22 @@ target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
 
 # Initialize some other variables.
 subdirs=
+MFLAGS= MAKEFLAGS=
 
 ac_prev=
 for ac_option
@@ -61,9 +80,14 @@ do
 
   case "$ac_option" in
 
-  -build | --build | --buil | --bui | --bu | --b)
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
     ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
     build="$ac_optarg" ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
@@ -73,6 +97,12 @@ do
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
     cache_file="$ac_optarg" ;;
 
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
   -disable-* | --disable-*)
     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
     # Reject names that are not valid shell variable names.
@@ -123,12 +153,29 @@ Configuration:
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
-  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                           [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
   --srcdir=DIR            find the sources in DIR [configure dir or ..]
   --program-prefix=PREFIX prepend PREFIX to installed program names
   --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
 Host type:
   --build=BUILD           configure for building on BUILD [BUILD=HOST]
   --host=HOST             configure for HOST [guessed]
@@ -140,8 +187,10 @@ Features and packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
---enable and --with options recognized:$ac_help
 EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
     exit 0 ;;
 
   -host | --host | --hos | --ho)
@@ -149,6 +198,44 @@ EOF
   -host=* | --host=* | --hos=* | --ho=*)
     host="$ac_optarg" ;;
 
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
@@ -161,6 +248,15 @@ EOF
   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
     no_recursion=yes ;;
 
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
@@ -201,6 +297,23 @@ EOF
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
@@ -211,6 +324,13 @@ EOF
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
     srcdir="$ac_optarg" ;;
 
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
   -target | --target | --targe | --targ | --tar | --ta | --t)
     ac_prev=target ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
@@ -220,7 +340,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.4"
+    echo "configure generated by autoconf version 2.10"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -266,7 +386,7 @@ EOF
   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
     ;;
 
-  *) 
+  *)
     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
       echo "configure: warning: $ac_option: invalid host type" 1>&2
     fi
@@ -386,8 +506,8 @@ fi
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -404,9 +524,9 @@ fi
 
 
 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-enableval="$enable_64_bit_bfd"
-if test -n "$enableval"; then
-  case "{$enableval}" in
+if test "${enable_64_bit_bfd+set}" = set; then
+  enableval="$enable_64_bit_bfd"
+  case "${enableval}" in
   yes)  want64=true  ;;
   no)   want64=false ;;
   *)    { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
@@ -415,8 +535,8 @@ else
   want64=false
 fi
 # Check whether --enable-targets or --disable-targets was given.
-enableval="$enable_targets"
-if test -n "$enableval"; then
+if test "${enable_targets+set}" = set; then
+  enableval="$enable_targets"
   case "${enableval}" in
   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
             ;;
@@ -424,6 +544,38 @@ if test -n "$enableval"; then
   *)        enable_targets=$enableval ;;
 esac
 fi
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *bfd*) shared=true ;;
+  *) shared=false ;;
+esac
+fi
+# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+  enableval="$enable_commonbfdlib"
+  case "${enableval}" in
+  yes) commonbfdlib=true ;;
+  no)  commonbfdlib=false ;;
+  *)   { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+esac
+fi
+# Check whether --with-mmap or --without-mmap was given.
+if test "${with_mmap+set}" = set; then
+  withval="$with_mmap"
+  case "${withval}" in
+  yes)  want_mmap=true ;;
+  no)   want_mmap=false ;;
+  *)    { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
+esac
+else
+  want_mmap=false
+fi
+
+
 
 ac_aux_dir=
 for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
@@ -451,7 +603,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 #
 # The rules are:
 # 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time. 
+#    same time.
 # 2. Host defaults to nonopt.
 # 3. If nonopt is not specified, then host defaults to the current host,
 #    as determined by config.guess.
@@ -536,8 +688,10 @@ fi
 if test "$program_transform_name" = s,x,x,; then
   program_transform_name=
 else
-  # Double any \ or $.
-  echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
   rm -f conftestsed
 fi
@@ -556,9 +710,237 @@ target64=false
 
 # host stuff:
 
+ALLLIBS='$(TARGETLIB)'
+PICFLAG=
+SHLIB=unused-shlib
+SHLINK=unused-shlink
+if test "${shared}" = "true"; then
+  PICFLAG=-fpic
+  if test "${commonbfdlib}" = "true"; then
+    ALLLIBS='$(TARGETLIB)'
+  else
+    ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
+    SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
+    SHLINK=libbfd.so
+  fi
+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
+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="${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
+  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
+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="${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
+      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
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$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
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  if test "${CFLAGS+set}" != set; then
+    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_gcc_g=yes
+else
+  ac_cv_prog_gcc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
+    if test $ac_cv_prog_gcc_g = yes; then
+      CFLAGS="-g -O"
+    else
+      CFLAGS="-O"
+    fi
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+if test -d /etc/conf/kconfig.d &&
+  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+  echo "$ac_t""yes" 1>&6
+  ISC=yes # If later tests want to check for ISC.
+  cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+  if test "$GCC" = yes; then
+    CC="$CC -posix"
+  else
+    CC="$CC -Xp"
+  fi
+else
+  echo "$ac_t""no" 1>&6
+  ISC=
+fi
+
+
+# Permit host specific settings.
 . ${srcdir}/configure.host
 
-# Extract the first word of "ranlib", so it can be a program name with args.
+
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
+# 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
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+  echo "$ac_t""$AR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+# 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
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+  # 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
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
@@ -586,31 +968,750 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+else
+  RANLIB=":"
+fi
+fi
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# 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
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      for ac_prog in ginstall installbsd scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           # OSF/1 installbsd also uses dspmsg, but is usable.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_ifs"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+if test "${shared}" = "true"; then
+  if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
+    echo "configure: warning: BFD --enable-shared only supported when using gcc" 1>&2
+    shared=false
+    ALLLIBS='$(TARGETLIB)'
+    PICFLAG=
+    SHLIB=unused-shlib
+  fi
+fi
+
+
+
+
+
+
+if test "${commonbfdlib}" = "true"; then
+  COMMON_SHLIB=yes
+  PICLIST=piclist
+else
+  COMMON_SHLIB=
+  PICLIST=
+fi
+
+
+
 
-# Set up to make a link between the host's include file and "sysdep.h".
-files=hosts/${my_host}.h
 
-if test ! -f ${srcdir}/${files} ; then
-       files=../bfd/hosts/std-host.h
-       echo "configure: warning: BFD has no specific support for host ${host} -- using std-host" 1>&2
+VERSION=`cat ${srcdir}/VERSION`
+
+
+BFD_HOST_64BIT_LONG=0
+BFD_HOST_64_BIT_DEFINED=0
+BFD_HOST_64_BIT=
+BFD_HOST_U_64_BIT=
+if test "x${HOST_64BIT_TYPE}" = "xlong"; then
+  BFD_HOST_64BIT_LONG=1
+elif test "x${HOST_64BIT_TYPE}" != "x"; then
+  BFD_HOST_64_BIT_DEFINED=1
+  BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
+  BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
 fi
 
 
 
-if test -f ${srcdir}/config/${my_host}.mh ; then
-       host_makefile_frag=$srcdir/config/${my_host}.mh
+
+
+# If we cannot run a trivial program, we must be cross compiling.
+echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_cross=yes
 else
-       host_makefile_frag=/dev/null
+cat > conftest.$ac_ext <<EOF
+#line 1092 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+{ (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  ac_cv_c_cross=no
+else
+  ac_cv_c_cross=yes
+fi
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_cross" 1>&6
+cross_compiling=$ac_cv_c_cross
+
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+  if test "x$cross_compiling" = "xno"; then
+    CC_FOR_BUILD='$(CC)'
+  else
+    CC_FOR_BUILD=gcc
+  fi
 fi
 
 
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1134 "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:1140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1149 "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:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+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 1183 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in fcntl.h sys/file.h sys/time.h
+do
+ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+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 1220 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+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 1254 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() { return 0; }
+int t() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  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
+
+for ac_func in fcntl getpagesize setitimer sysconf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+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 1290 "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() { return 0; }
+int t() {
+
+/* 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:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  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
+
+
+
+case "${host}" in
+i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
+  cat >> confdefs.h <<\EOF
+#define USE_BINARY_FOPEN 1
+EOF
+ ;;
+esac
+
+echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1351 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() { return 0; }
+int t() {
+char *(*pfn) = (char *(*)) malloc
+; return 0; }
+EOF
+if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_decl_needed_malloc=no
+else
+  rm -rf conftest*
+  bfd_cv_decl_needed_malloc=yes
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
+if test $bfd_cv_decl_needed_malloc = yes; then
+  bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $bfd_tr_decl 1
+EOF
+
+fi
+
+echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1391 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() { return 0; }
+int t() {
+char *(*pfn) = (char *(*)) free
+; return 0; }
+EOF
+if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_decl_needed_free=no
+else
+  rm -rf conftest*
+  bfd_cv_decl_needed_free=yes
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
+if test $bfd_cv_decl_needed_free = yes; then
+  bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $bfd_tr_decl 1
+EOF
+
+fi
+
+
+# If we are configured native, pick a core file support file.
+COREFILE=
+COREFLAG=
+if test "${target}" = "${host}"; then
+  case "${host}" in
+  alpha*-*-linux*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/alphalinux.h"
+EOF
+
+       ;;
+  alpha*-*-*)          COREFILE=osf-core.o ;;
+  arm-*-riscix)                COREFILE=trad-core.o ;;
+  hppa*-*-hpux*)       COREFILE=hpux-core.o ;;
+  hppa*-*-hiux*)       COREFILE=hpux-core.o ;;
+  hppa*-*-bsd*)                COREFILE="hpux-core.o hppabsd-core.o"
+                       COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+  i[345]86-sequent-bsd*)
+       COREFILE=trad-core.o;
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/symmetry.h"
+EOF
+
+       ;;
+  i[345]86-sequent-sysv4*) ;;
+  i[345]86-sequent-sysv*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/symmetry.h"
+EOF
+
+       ;;
+  i[345]86-*-bsd* | i[345]86-*-freebsd*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/i386bsd.h"
+EOF
+
+       ;;
+  i[345]86-*-netbsd*)
+       COREFILE=netbsd-core.o
+       ;;
+  i[345]86-esix-sysv3*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/esix.h"
+EOF
+
+       ;;
+  i[345]86-*-sco* | i[345]86-*-isc*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/i386sco.h"
+EOF
+
+       ;;
+  i[345]86-*-mach3*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/i386mach3.h"
+EOF
+
+       ;;
+  i[345]86-*-linux*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/i386linux.h"
+EOF
+
+       ;;
+  i[345]86-*-isc*)     COREFILE=trad-core.o ;;
+  i[345]86-*-aix*)     COREFILE=aix386-core.o ;;
+  i860-*-mach3* | i860-*-osf1*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/i860mach3.h"
+EOF
+
+       ;;
+  mips-dec-bsd*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/mipsbsd.h"
+EOF
+
+       ;;
+  mips-dec-mach3*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/mipsmach3.h"
+EOF
+
+       ;;
+  mips-*-netbsd*)
+       COREFILE=netbsd-core.o
+       ;;
+  mips-dec-*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/decstation.h"
+EOF
+
+       ;;
+  mips-sgi-irix4*)     COREFILE=irix-core.o ;;
+  mips-sgi-irix5*)     COREFILE=irix-core.o ;;
+  mips-*-mach3*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/mipsmach3.h"
+EOF
+
+       ;;
+  mips-*-sysv4*)       ;;
+  mips-*-sysv* | mips-*-riscos*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/riscos.h"
+EOF
+
+       ;;
+  mips-sony-bsd*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/news-mips.h"
+EOF
+
+       ;;
+  m68*-bull*-sysv*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/dpx2.h"
+EOF
+
+       ;;
+  m68*-hp-hpux*)       COREFILE=hpux-core.o ;;
+  m68*-hp-bsd*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/hp300bsd.h"
+EOF
+
+       ;;
+  m68*-*-linux*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/m68klinux.h"
+EOF
+
+       ;;
+  m68*-motorola-sysv*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/delta68.h"
+EOF
+
+       ;;
+  m68*-sony-*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/news.h"
+EOF
+
+       ;;
+  m68*-*-netbsd*)
+       COREFILE=netbsd-core.o
+       ;;
+  m68*-apple-aux*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/m68kaux.h"
+EOF
+
+       ;;
+  m88*-*-sysv4*)       ;;
+  m88*-motorola-sysv*) COREFILE=ptrace-core.o ;;
+  m88*-*-mach3*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/m88kmach3.h"
+EOF
+
+       ;;
+  ns32k-pc532-mach)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/pc532mach.h"
+EOF
+
+       ;;
+  ns32k-*-netbsd*)
+       COREFILE=netbsd-core.o
+       ;;
+  rs6000-*-lynx*)      COREFILE=lynx-core.o ;;
+  rs6000-*-aix4*)      COREFILE=rs6000-core.o ;;
+  rs6000-*-*)          COREFILE=rs6000-core.o ;;
+  powerpc-*-aix4*)     COREFILE=rs6000-core.o ;;
+  powerpc-*-aix*)      COREFILE=rs6000-core.o ;;
+  sparc-*-netbsd*)
+       COREFILE=netbsd-core.o
+       ;;
+  tahoe-*-*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/tahoe.h"
+EOF
+
+       ;;
+  vax-*-ultrix2*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/vaxult2.h"
+EOF
+
+       ;;
+  vax-*-ultrix*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/vaxult2.h"
+EOF
+
+       ;;
+  vax-*-*)
+       COREFILE=trad-core.o
+       cat >> confdefs.h <<\EOF
+#define TRAD_HEADER "hosts/vaxbsd.h"
+EOF
+
+       ;;
+  esac
+
+  case "$COREFILE" in
+  aix386-core.o)       COREFLAG=-DAIX386_CORE ;;
+  hppabsd-core.o)      COREFLAG=-DHPPABSD_CORE ;;
+  hpux-core.o)         COREFLAG=-DHPUX_CORE ;;
+  irix-core.o)         COREFLAG=-DIRIX_CORE ;;
+  lynx-core.o)         COREFLAG=-DLYNX_CORE ;;
+  osf-core.o)          COREFLAG=-DOSF_CORE ;;
+  ptrace-core.o)       COREFLAG=-DPTRACE_CORE ;;
+  rs6000-core.o)       COREFLAG="$COREFLAG -DAIX_CORE" ;;
+  trad-core.o)         COREFLAG="$COREFLAG -DTRAD_CORE" ;;
+  esac
+
+  # The ELF code uses the native <sys/procfs.h> to handle core files.
+  # Define HAVE_SYS_PROCFS_H if the file exists and defines
+  # prstatus_t.
+  echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
+  if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1678 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() { return 0; }
+int t() {
+prstatus_t t;
+; return 0; }
+EOF
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_header_sys_procfs_h=yes
+else
+  rm -rf conftest*
+  bfd_cv_header_sys_procfs_h=no
+fi
+rm -f conftest*
+
+fi
+
+  echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
+  if test $bfd_cv_header_sys_procfs_h = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_SYS_PROCFS_H 1
+EOF
+
+  fi
+
+fi
+
+
+
 # target stuff:
 
 # Canonicalize the secondary target names.
 if test -n "$enable_targets" ; then
     for targ in `echo $enable_targets | sed 's/,/ /g'`
     do
-       result=`$configsub $targ 2>/dev/null`
+       result=`$ac_config_sub $targ 2>/dev/null`
        if test -n "$result" ; then
            canon_targets="$canon_targets $result"
        else
@@ -621,35 +1722,25 @@ if test -n "$enable_targets" ; then
 fi
 
 all_targets=false
-
+defvec=
+selvecs=
+selarchs=
+TDEFINES=
 for targ in $target $canon_targets
 do
-    bfd_target=`${config_shell} $srcdir/config.bfd $targ`
-
-    if test "x$bfd_target" = "xall" ; then
+    if test "x$targ" = "xall"; then
         all_targets=true
     else
-       if test ! -f ${srcdir}/config/${bfd_target}.mt ; then
-           { echo "configure: error: *** No file ${srcdir}/config/${bfd_target}.mt.
-*** BFD does not support target ${bfd_target}.
-*** Look in bfd/config.bfd for supported targets." 1>&2; exit 1; }
-           exit 1
-       fi
-
-       if test "x$targ" = "x$target" ; then
-           target_makefile_frag=${srcdir}/config/${bfd_target}.mt
-       else
-           target_extra_frags="$target_extra_frags ${srcdir}/config/${bfd_target}.mt"
+       . $srcdir/config.bfd
+       if test "x$targ" = "x$target"; then
+           defvec=$targ_defvec
        fi
+       selvecs="$selvecs $targ_defvec $targ_selvecs"
+       selarchs="$selarchs $targ_archs"
+       TDEFINES="$TDEFINES $targ_cflags"
     fi
 done
 
-frags=$target_makefile_frag
-if test $host_makefile_frag != /dev/null ; then
-    frags="$frags $host_makefile_frag"
-fi
-
-
 
 # This processing still needs to be done if we're to decide properly whether
 # 64-bit support needs to be compiled in.  Currently, it will be included if
 # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
 # used.
 
-# The default vector in the primary target.
-DEFAULT_VECTOR=`sed -n '
-s/DEFAULT_VECTOR[      ]*=[    ]*\([^  ]*\)/\1/p
-' $target_makefile_frag`
-
-allfrags="$target_makefile_frag $target_extra_frags"
-
-# The default and selected vectors in all the configured targets.
-SELECT_VECS=`sed -n '
-s/DEFAULT_VECTOR[      ]*=[    ]*\([^  ]*\)/\1/p
-s/SELECT_VECS[         ]*=[    ]*\([^  ]*\)/\1/p
-' $allfrags`
-# uniq the list.
+# uniq the default and selected vectors in all the configured targets.
 f=""
-for i in $SELECT_VECS ; do
+for i in $selvecs ; do
     case " $f " in
     *" $i "*) ;;
     *) f="$f $i" ;;
     esac
 done
-SELECT_VECS="$f"
+selvecs="$f"
 
-# The architectures in all the configured targets.
-SELECT_ARCHITECTURES=`sed -n '
-s/SELECT_ARCHITECTURES[        ]*=[    ]*//p
-' $allfrags`
-# uniq the list.
+# uniq the architectures in all the configured targets.
 f=""
-for i in $SELECT_ARCHITECTURES ; do
+for i in $selarchs ; do
     case " $f " in
     *" $i "*) ;;
     *) f="$f $i" ;;
     esac
 done
-SELECT_ARCHITECTURES="$f"
+selarchs="$f"
 
 # Target backend .o files.
 tb=
 
-for vec in $SELECT_VECS
+elf="elf.o elflink.o"
+
+for vec in $selvecs
 do
     case "$vec" in
     # This list is alphabetized to make it easy to compare
     # with the two vector lists in targets.c.
     a29kcoff_big_vec)          tb="$tb coff-a29k.o cofflink.o" ;;
-    a_out_adobe_vec)           tb="$tb aout-adobe.o aout32.o stab-syms.o" ;;
-    armpe_vec)                 tb="$tb pe-arm.o cofflink.o " ;;
-    armpei_vec)                        tb="$tb pei-arm.o cofflink.o " ;;
-    aout0_big_vec)             tb="$tb aout0.o aout32.o stab-syms.o" ;;
-    aout_arm_big_vec)          tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
-    aout_arm_little_vec)       tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
-    aout_mips_big_vec)         tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
-    aout_mips_little_vec)      tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
+    a_out_adobe_vec)           tb="$tb aout-adobe.o aout32.o" ;;
+    armcoff_little_vec)                tb="$tb coff-arm.o cofflink.o " ;;
+    armcoff_big_vec)           tb="$tb coff-arm.o cofflink.o " ;;
+    armpe_little_vec)          tb="$tb pe-arm.o cofflink.o " ;;
+    armpe_big_vec)             tb="$tb pe-arm.o cofflink.o " ;;
+    armpei_little_vec)         tb="$tb pei-arm.o cofflink.o " ;;
+    armpei_big_vec)            tb="$tb pei-arm.o cofflink.o " ;;
+    aout0_big_vec)             tb="$tb aout0.o aout32.o" ;;
+    aout_arm_big_vec)          tb="$tb aout-arm.o aout32.o" ;;
+    aout_arm_little_vec)       tb="$tb aout-arm.o aout32.o" ;;
+    aout_mips_big_vec)         tb="$tb mipsbsd.o aout32.o" ;;
+    aout_mips_little_vec)      tb="$tb mipsbsd.o aout32.o" ;;
     apollocoff_vec)            tb="$tb coff-apollo.o" ;;
-    b_out_vec_big_host)                tb="$tb bout.o aout32.o stab-syms.o" ;;
-    b_out_vec_little_host)     tb="$tb bout.o aout32.o stab-syms.o" ;;
+    b_out_vec_big_host)                tb="$tb bout.o aout32.o" ;;
+    b_out_vec_little_host)     tb="$tb bout.o aout32.o" ;;
+    bfd_elf64_alpha_vec)       tb="$tb elf64-alpha.o elf64.o $elf"
+                               target64=true ;;
 # start-sanitize-arc
-    bfd_elf32_littlearc_vec)   tb="$tb elf32-arc.o elf32.o elf.o" ;;
-    bfd_elf32_bigarc_vec)      tb="$tb elf32-arc.o elf32.o elf.o" ;;
+    bfd_elf32_littlearc_vec)   tb="$tb elf32-arc.o elf32.o $elf" ;;
+    bfd_elf32_bigarc_vec)      tb="$tb elf32-arc.o elf32.o $elf" ;;
 # end-sanitize-arc
-    bfd_elf32_big_generic_vec)         tb="$tb elf32-gen.o elf32.o elf.o" ;;
-    bfd_elf32_bigmips_vec)     tb="$tb elf32-mips.o elf32.o elf.o ecofflink.o" ;;
-    bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.o elf32.o elf.o" ;;
-    bfd_elf32_i386_vec)                tb="$tb elf32-i386.o elf32.o elf.o" ;;
-    bfd_elf32_i860_vec)                tb="$tb elf32-i860.o elf32.o elf.o" ;;
-    bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o elf.o" ;;
-    bfd_elf32_littlemips_vec)  tb="$tb elf32-mips.o elf32.o elf.o ecofflink.o" ;;
-    bfd_elf32_m68k_vec)                tb="$tb elf32-m68k.o elf32.o elf.o" ;;
-    bfd_elf32_m88k_vec)                tb="$tb elf32-m88k.o elf32.o elf.o" ;;
-    bfd_elf32_powerpc_vec)     tb="$tb elf32-ppc.o elf32.o elf.o" ;;
-    bfd_elf32_powerpcle_vec)   tb="$tb elf32-ppc.o elf32.o elf.o" ;;
-    bfd_elf32_sparc_vec)       tb="$tb elf32-sparc.o elf32.o elf.o" ;;
-    bfd_elf64_big_generic_vec)         tb="$tb elf64-gen.o elf64.o elf.o"
+    bfd_elf32_big_generic_vec)         tb="$tb elf32-gen.o elf32.o $elf" ;;
+    bfd_elf32_bigmips_vec)     tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
+    bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
+                               target64=true ;;
+# start-sanitize-d10v
+    bfd_elf32_d10v_vec)                tb="$tb elf32-d10v.o elf32.o $elf" ;;
+# end-sanitize-d10v
+    bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.o elf32.o $elf" ;;
+    bfd_elf32_i386_vec)                tb="$tb elf32-i386.o elf32.o $elf" ;;
+    bfd_elf32_i860_vec)                tb="$tb elf32-i860.o elf32.o $elf" ;;
+    bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
+    bfd_elf32_littlemips_vec)  tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
+    bfd_elf64_littlemips_vec)  tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
                                target64=true ;;
-    bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o elf.o"
+    bfd_elf32_m68k_vec)                tb="$tb elf32-m68k.o elf32.o $elf" ;;
+    bfd_elf32_m88k_vec)                tb="$tb elf32-m88k.o elf32.o $elf" ;;
+    bfd_elf32_powerpc_vec)     tb="$tb elf32-ppc.o elf32.o $elf" ;;
+    bfd_elf32_powerpcle_vec)   tb="$tb elf32-ppc.o elf32.o $elf" ;;
+    bfd_elf32_sparc_vec)       tb="$tb elf32-sparc.o elf32.o $elf" ;;
+    bfd_elf64_big_generic_vec)         tb="$tb elf64-gen.o elf64.o $elf"
                                target64=true ;;
-    bfd_elf64_sparc_vec)       tb="$tb elf64-sparc.o elf64.o elf.o"
+    bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
+                               target64=true ;;
+    bfd_elf64_sparc_vec)       tb="$tb elf64-sparc.o elf64.o $elf"
                                target64=true ;;
     cisco_core_vec)            tb="$tb cisco-core.o" ;;
-    demo_64_vec)               tb="$tb demo64.o aout64.o stab-syms.o"
+    demo_64_vec)               tb="$tb demo64.o aout64.o"
                                target64=true ;;
     ecoff_big_vec)             tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
     ecoff_little_vec)          tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
     ecoffalpha_little_vec)     tb="$tb coff-alpha.o ecoff.o ecofflink.o"
                                target64=true ;;
+    evax_alpha_vec)            tb="$tb evax-alpha.o evax-emh.o evax-egsd.o evax-etir.o evax-misc.o"
+                               target64=true ;;
     h8300coff_vec)             tb="$tb coff-h8300.o reloc16.o" ;;
     h8500coff_vec)             tb="$tb coff-h8500.o reloc16.o" ;;
-    host_aout_vec)             tb="$tb host-aout.o aout32.o stab-syms.o" ;;
-    hp300bsd_vec)              tb="$tb hp300bsd.o aout32.o stab-syms.o" ;;
-    hp300hpux_vec)             tb="$tb hp300hpux.o aout32.o stab-syms.o" ;;
-    i386aout_vec)              tb="$tb i386aout.o aout32.o stab-syms.o" ;;
-    i386bsd_vec)               tb="$tb i386bsd.o aout32.o stab-syms.o" ;;
-    i386dynix_vec)             tb="$tb i386dynix.o aout32.o stab-syms.o" ;;
+    host_aout_vec)             tb="$tb host-aout.o aout32.o" ;;
+    hp300bsd_vec)              tb="$tb hp300bsd.o aout32.o" ;;
+    hp300hpux_vec)             tb="$tb hp300hpux.o aout32.o" ;;
+    i386aout_vec)              tb="$tb i386aout.o aout32.o" ;;
+    i386bsd_vec)               tb="$tb i386bsd.o aout32.o" ;;
     i386coff_vec)              tb="$tb coff-i386.o cofflink.o" ;;
+    i386dynix_vec)             tb="$tb i386dynix.o aout32.o" ;;
+    i386freebsd_vec)           tb="$tb i386freebsd.o aout32.o" ;;
     i386msdos_vec)             tb="$tb i386msdos.o" ;;
     i386pe_vec)                        tb="$tb pe-i386.o cofflink.o " ;;
     i386pei_vec)               tb="$tb pei-i386.o cofflink.o" ;;
-    i386linux_vec)             tb="$tb i386linux.o aout32.o stab-syms.o" ;;
-    i386lynx_aout_vec)         tb="$tb i386lynx.o lynx-core.o aout32.o stab-syms.o" ;;
-    i386lynx_coff_vec)         tb="$tb cf-i386lynx.o cofflink.o lynx-core.o stab-syms.o" ;;
-    i386mach3_vec)             tb="$tb i386mach3.o aout32.o stab-syms.o" ;;
-    i386netbsd_vec)            tb="$tb i386netbsd.o aout32.o stab-syms.o" ;;
-    i386os9k_vec)              tb="$tb i386os9k.o aout32.o stab-syms.o" ;;
-    icoff_big_vec)             tb="$tb coff-i960.o" ;;
-    icoff_little_vec)          tb="$tb coff-i960.o" ;;
+    i386linux_vec)             tb="$tb i386linux.o aout32.o" ;;
+    i386lynx_aout_vec)         tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
+    i386lynx_coff_vec)         tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
+    i386mach3_vec)             tb="$tb i386mach3.o aout32.o" ;;
+    i386netbsd_vec)            tb="$tb i386netbsd.o aout32.o" ;;
+    i386os9k_vec)              tb="$tb i386os9k.o aout32.o" ;;
+    i860coff_vec)              tb="$tb coff-i860.o cofflink.o" ;;
+    icoff_big_vec)             tb="$tb coff-i960.o cofflink.o" ;;
+    icoff_little_vec)          tb="$tb coff-i960.o cofflink.o" ;;
     ieee_vec)                  tb="$tb ieee.o" ;;
     m68kcoff_vec)              tb="$tb coff-m68k.o cofflink.o" ;;
     m68kcoffun_vec)            tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
-    m68klynx_aout_vec)         tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;;
-    m68klynx_coff_vec)         tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;;
-    m68knetbsd_vec)            tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;;
+    m68klinux_vec)             tb="$tb m68klinux.o aout32.o" ;;
+    m68klynx_aout_vec)         tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
+    m68klynx_coff_vec)         tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
+    m68knetbsd_vec)            tb="$tb m68knetbsd.o aout32.o" ;;
+    m68k4knetbsd_vec)          tb="$tb m68k4knetbsd.o aout32.o" ;;
+    m68kaux_coff_vec)          tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
     m88kbcs_vec)               tb="$tb coff-m88k.o" ;;
-    newsos3_vec)               tb="$tb newsos3.o aout32.o stab-syms.o" ;;
+    newsos3_vec)               tb="$tb newsos3.o aout32.o" ;;
     nlm32_i386_vec)            tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
     nlm32_sparc_vec)           tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
     nlm32_alpha_vec)           tb="$tb nlm32-alpha.o nlm32.o nlm.o"
                                target64=true ;;
-    riscix_vec)                        tb="$tb aout32.o riscix.o stab-syms.o" ;;
+    riscix_vec)                        tb="$tb aout32.o riscix.o" ;;
     nlm32_powerpc_vec)         tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
-    pc532netbsd_vec)           tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;;
-    pc532machaout_vec)         tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;;
-    rs6000coff_vec)            tb="$tb coff-rs6000.o" ;;
+    pc532netbsd_vec)           tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
+    pc532machaout_vec)         tb="$tb pc532-mach.o aout-ns32k.o" ;;
+    pmac_xcoff_vec)            tb="$tb coff-pmac.o xcofflink.o" ;;
+    rs6000coff_vec)            tb="$tb coff-rs6000.o xcofflink.o" ;;
+    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.o cofflink.o" ;;  
+    bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.o cofflink.o" ;;  
+    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.o cofflink.o" ;;
+    bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.o cofflink.o" ;;
+    ppcboot_vec)               tb="$tb ppcboot.o" ;;
     shcoff_vec)                        tb="$tb coff-sh.o cofflink.o" ;;
-# start-sanitize-rce
-    rce_aout_vec)              tb="$tb aout-rce.o aout32.o stab-syms.o" ;;
-# end-sanitize-rce
     shlcoff_vec)               tb="$tb coff-sh.o cofflink.o" ;;
     som_vec)                   tb="$tb som.o" ;;
-    sparclynx_aout_vec)                tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;;
-    sparclynx_coff_vec)                tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;;
-    sparcnetbsd_vec)           tb="$tb sparcnetbsd.o aout32.o stab-syms.o" ;;
+    sparclynx_aout_vec)                tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
+    sparclynx_coff_vec)                tb="$tb cf-sparclynx.o lynx-core.o" ;;
+    sparcnetbsd_vec)           tb="$tb sparcnetbsd.o aout32.o" ;;
     sparccoff_vec)             tb="$tb coff-sparc.o" ;;
     srec_vec)                  tb="$tb srec.o" ;;
-    sunos_big_vec)             tb="$tb sunos.o aout32.o stab-syms.o" ;;
+    sunos_big_vec)             tb="$tb sunos.o aout32.o" ;;
     symbolsrec_vec)            tb="$tb srec.o" ;;
     tekhex_vec)                        tb="$tb tekhex.o" ;;
     we32kcoff_vec)             tb="$tb coff-we32k.o" ;;
@@ -805,7 +1905,7 @@ do
 done
 
 # Target architecture .o files.
-ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
+ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
 
 # Weed out duplicate .o files.
 f=""
@@ -832,18 +1932,24 @@ bfd_machines="$ta"
 if test x${all_targets} = xtrue ; then
   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
+  selvecs=
+  selarchs=
 else   # all_targets is true
   # Only set these if they will be nonempty, for the clever echo.
-  test -n "$SELECT_VECS" &&
-    selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
-  test -n "SELECT_ARCHITECTURES" &&
-    selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'`
+  test -n "$selvecs" &&
+    selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+  test -n "$selarchs" &&
+    selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
 fi     # all_targets is true
 
 case ${host64}-${target64}-${want64} in
   *true*)
     wordsize=64
     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
+    if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
+      echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
+      echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
+    fi
     ;;
   false-false-false)
     wordsize=32
@@ -856,14 +1962,220 @@ esac
 
 
 
-test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
-
 tdefaults=""
 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
 
 
+for ac_func in valloc getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+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 1979 "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() { return 0; }
+int t() {
+
+/* 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:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  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
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap=no
+else
+cat > conftest.$ac_ext <<EOF
+#line 2033 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test. */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#ifndef HAVE_GETPAGESIZE
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+#  define getpagesize() EXEC_PAGESIZE
+# else
+#  ifdef NBPG
+#   define getpagesize() NBPG * CLSIZE
+#   ifndef CLSIZE
+#    define CLSIZE 1
+#   endif
+#  else
+#   ifdef NBPC
+#    define getpagesize() NBPC
+#   else
+#    define getpagesize() PAGESIZE /* SVR4 */
+#   endif
+#  endif
+# endif
+#endif
+
+#ifndef HAVE_VALLOC
+# define valloc malloc
+#endif
+
+#ifdef __cplusplus
+extern "C" { void *valloc(unsigned), *malloc(unsigned); }
+#else
+char *valloc(), *malloc();
+#endif
+
+int
+main()
+{
+  char *buf1, *buf2, *buf3;
+  int i = getpagesize(), j;
+  int i2 = i * 2;
+  int fd;
+
+  buf1 = (char *)valloc(i2);
+  buf2 = (char *)valloc(i);
+  buf3 = (char *)malloc(i2);
+  for (j = 0; j < i2; ++j)
+    *(buf1 + j) = rand();
+  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
+  write(fd, buf1, i2);
+  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
+  for (j = 0; j < i; ++j)
+    if (*(buf1 + j) != *(buf2 + j))
+      exit(1);
+  lseek(fd, (long)i, 0);
+  read(fd, buf2, i); /* read into mapped memory -- file should not change */
+  /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
+  lseek(fd, (long)0, 0);
+  read(fd, buf3, i2);
+  for (j = 0; j < i2; ++j)
+    if (*(buf1 + j) != *(buf3 + j))
+      exit(1);
+  exit(0);
+}
+
+EOF
+{ (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  ac_cv_func_mmap=yes
+else
+  ac_cv_func_mmap=no
+fi
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_mmap" 1>&6
+if test $ac_cv_func_mmap = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+for ac_func in madvise mprotect
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+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 2127 "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() { return 0; }
+int t() {
+
+/* 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:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  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
+
+case ${want_mmap}+${ac_cv_func_mmap} in
+  true+yes )  cat >> confdefs.h <<\EOF
+#define USE_MMAP 1
+EOF
+ ;;
+esac
+
 rm -f doc/config.status
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -914,19 +2226,7 @@ fi
 
 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
-s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
+DEFS=-DHAVE_CONFIG_H
 
 # Without the "./", some shells look in PATH for config.status.
 : ${CONFIG_STATUS=./config.status}
@@ -953,7 +2253,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.4"
+    echo "$CONFIG_STATUS generated by autoconf version 2.10"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -962,12 +2262,15 @@ do
 done
 
 ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
 
-# Protect against being on the right side of a sed subst in config.status. 
-sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 $ac_vpsub
 $extrasub
 s%@CFLAGS@%$CFLAGS%g
@@ -979,6 +2282,18 @@ s%@LIBS@%$LIBS%g
 s%@exec_prefix@%$exec_prefix%g
 s%@prefix@%$prefix%g
 s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
 s%@host_cpu@%$host_cpu%g
@@ -994,12 +2309,31 @@ s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
+s%@CC@%$CC%g
+s%@HDEFINES@%$HDEFINES%g
+s%@AR@%$AR%g
 s%@RANLIB@%$RANLIB%g
-/@host_makefile_frag@/r $host_makefile_frag
-s%@host_makefile_frag@%%g
-/@target_makefile_frag@/r $target_makefile_frag
-s%@target_makefile_frag@%%g
-s%@frags@%$frags%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@ALLLIBS@%$ALLLIBS%g
+s%@PICFLAG@%$PICFLAG%g
+s%@SHLIB@%$SHLIB%g
+s%@SHLIB_CC@%$SHLIB_CC%g
+s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
+s%@COMMON_SHLIB@%$COMMON_SHLIB%g
+s%@PICLIST@%$PICLIST%g
+s%@SHLINK@%$SHLINK%g
+s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
+s%@VERSION@%$VERSION%g
+s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
+s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
+s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
+s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
+s%@CPP@%$CPP%g
+s%@COREFILE@%$COREFILE%g
+s%@COREFLAG@%$COREFLAG%g
+s%@TDEFINES@%$TDEFINES%g
 s%@wordsize@%$wordsize%g
 s%@all_backends@%$all_backends%g
 s%@bfd_backends@%$bfd_backends%g
@@ -1010,7 +2344,7 @@ CEOF
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1045,6 +2379,10 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
     top_srcdir="$ac_dots$ac_given_srcdir" ;;
   esac
 
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
   echo creating "$ac_file"
   rm -f "$ac_file"
   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
@@ -1057,57 +2395,115 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 s%@configure_input@%$configure_input%g
 s%@srcdir@%$srcdir%g
 s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
 fi; done
 rm -f conftest.subs
 
-EOF
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='\([     ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
 
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$files"
-ac_dests="sysdep.h"
-EOF
+  echo creating $ac_file
 
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
-  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-  set $ac_sources; ac_source=$1; shift; ac_sources=$*
+  rm -f conftest.frag conftest.in conftest.out
+  cp $ac_given_srcdir/$ac_file_in conftest.in
 
-  echo "linking $srcdir/$ac_source to $ac_dest"
+EOF
 
-  if test ! -r $srcdir/$ac_source; then
-    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
-  fi
-  rm -f $ac_dest
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
 
-  # Make relative symlinks.
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    # The dest file is in a subdirectory.
-    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
-    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dest_dir_suffix.
-    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dest_dir_suffix= ac_dots=
-  fi
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+# Maximum number of lines to put in a single here document.
+ac_max_here_lines=12
 
-  case "$srcdir" in
-  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
-  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
-  esac
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
 
-  # Make a symlink if possible; otherwise try a hard link.
-  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest; then :
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
   else
-    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
   fi
-done
+fi; done
 
 
+case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
This page took 0.045202 seconds and 4 git commands to generate.