home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / bfd / configure < prev    next >
Text File  |  1996-10-01  |  74KB  |  2,514 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.10 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)"
  16. ac_help="$ac_help
  17.   --enable-targets        alternative target configurations"
  18. ac_help="$ac_help
  19.   --enable-shared         build shared BFD library"
  20. ac_help="$ac_help
  21.   --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
  22. ac_help="$ac_help
  23.   --with-mmap             try using mmap for BFD input files if available"
  24.  
  25. # Initialize some variables set by options.
  26. # The variables have the same names as the options, with
  27. # dashes changed to underlines.
  28. build=NONE
  29. cache_file=./config.cache
  30. exec_prefix=NONE
  31. host=NONE
  32. no_create=
  33. nonopt=NONE
  34. no_recursion=
  35. prefix=NONE
  36. program_prefix=NONE
  37. program_suffix=NONE
  38. program_transform_name=s,x,x,
  39. silent=
  40. site=
  41. srcdir=
  42. target=NONE
  43. verbose=
  44. x_includes=NONE
  45. x_libraries=NONE
  46. bindir='${exec_prefix}/bin'
  47. sbindir='${exec_prefix}/sbin'
  48. libexecdir='${exec_prefix}/libexec'
  49. datadir='${prefix}/share'
  50. sysconfdir='${prefix}/etc'
  51. sharedstatedir='${prefix}/com'
  52. localstatedir='${prefix}/var'
  53. libdir='${exec_prefix}/lib'
  54. includedir='${prefix}/include'
  55. oldincludedir='/usr/include'
  56. infodir='${prefix}/info'
  57. guidedir='${prefix}/guide'
  58. psdir='${prefix}/ps'
  59. dvidir='${prefix}/dvi'
  60. mandir='${prefix}/man'
  61.  
  62. # Initialize some other variables.
  63. subdirs=
  64. MFLAGS= MAKEFLAGS=
  65.  
  66. ac_prev=
  67. for ac_option
  68. do
  69.  
  70.   # If the previous option needs an argument, assign it.
  71.   if test -n "$ac_prev"; then
  72.     eval "$ac_prev=\$ac_option"
  73.     ac_prev=
  74.     continue
  75.   fi
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   # Accept the important Cygnus configure options, so we can diagnose typos.
  83.  
  84.   case "$ac_option" in
  85.  
  86.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  87.     ac_prev=bindir ;;
  88.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  89.     bindir="$ac_optarg" ;;
  90.  
  91.   -build | --build | --buil | --bui | --bu)
  92.     ac_prev=build ;;
  93.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  94.     build="$ac_optarg" ;;
  95.  
  96.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  97.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  98.     ac_prev=cache_file ;;
  99.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  100.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  101.     cache_file="$ac_optarg" ;;
  102.  
  103.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  104.     ac_prev=datadir ;;
  105.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  106.   | --da=*)
  107.     datadir="$ac_optarg" ;;
  108.  
  109.   -disable-* | --disable-*)
  110.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  111.     # Reject names that are not valid shell variable names.
  112.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  113.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  114.     fi
  115.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  116.     eval "enable_${ac_feature}=no" ;;
  117.  
  118.   -enable-* | --enable-*)
  119.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  120.     # Reject names that are not valid shell variable names.
  121.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  122.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  123.     fi
  124.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  125.     case "$ac_option" in
  126.       *=*) ;;
  127.       *) ac_optarg=yes ;;
  128.     esac
  129.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  130.  
  131.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  132.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  133.   | --exec | --exe | --ex)
  134.     ac_prev=exec_prefix ;;
  135.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  136.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  137.   | --exec=* | --exe=* | --ex=*)
  138.     exec_prefix="$ac_optarg" ;;
  139.  
  140.   -gas | --gas | --ga | --g)
  141.     # Obsolete; use --with-gas.
  142.     with_gas=yes ;;
  143.  
  144.   -help | --help | --hel | --he)
  145.     # Omit some internal or obsolete options to make the list less imposing.
  146.     # This message is too long to be a string in the A/UX 3.1 sh.
  147.     cat << EOF
  148. Usage: configure [options] [host]
  149. Options: [defaults in brackets after descriptions]
  150. Configuration:
  151.   --cache-file=FILE       cache test results in FILE
  152.   --help                  print this message
  153.   --no-create             do not create output files
  154.   --quiet, --silent       do not print \`checking...' messages
  155.   --version               print the version of autoconf that created configure
  156. Directory and file names:
  157.   --prefix=PREFIX         install architecture-independent files in PREFIX
  158.                           [$ac_default_prefix]
  159.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  160.                           [same as prefix]
  161.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  162.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  163.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  164.   --datadir=DIR           read-only architecture-independent data in DIR
  165.                           [PREFIX/share]
  166.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  167.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  168.                           [PREFIX/com]
  169.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  170.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  171.   --includedir=DIR        C header files in DIR [PREFIX/include]
  172.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  173.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  174.   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  175.   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  176.   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  177.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  178.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  179.   --program-prefix=PREFIX prepend PREFIX to installed program names
  180.   --program-suffix=SUFFIX append SUFFIX to installed program names
  181.   --program-transform-name=PROGRAM
  182.                           run sed PROGRAM on installed program names
  183. EOF
  184.     cat << EOF
  185. Host type:
  186.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  187.   --host=HOST             configure for HOST [guessed]
  188.   --target=TARGET         configure for TARGET [TARGET=HOST]
  189. Features and packages:
  190.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  191.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  192.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  193.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  194.   --x-includes=DIR        X include files are in DIR
  195.   --x-libraries=DIR       X library files are in DIR
  196. EOF
  197.     if test -n "$ac_help"; then
  198.       echo "--enable and --with options recognized:$ac_help"
  199.     fi
  200.     exit 0 ;;
  201.  
  202.   -host | --host | --hos | --ho)
  203.     ac_prev=host ;;
  204.   -host=* | --host=* | --hos=* | --ho=*)
  205.     host="$ac_optarg" ;;
  206.  
  207.   -includedir | --includedir | --includedi | --included | --include \
  208.   | --includ | --inclu | --incl | --inc)
  209.     ac_prev=includedir ;;
  210.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  211.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  212.     includedir="$ac_optarg" ;;
  213.  
  214.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  215.     ac_prev=infodir ;;
  216.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  217.     infodir="$ac_optarg" ;;
  218.  
  219.  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  220.    ac_prev=guidedir ;;
  221.  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  222.  
  223.  -psdir | --psdir | --psdi | --psd | --ps)
  224.    ac_prev=psdir ;;
  225.  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  226.  
  227.  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  228.    ac_prev=dvidir ;;
  229.  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  230.  
  231.   -libdir | --libdir | --libdi | --libd)
  232.     ac_prev=libdir ;;
  233.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  234.     libdir="$ac_optarg" ;;
  235.  
  236.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  237.   | --libexe | --libex | --libe)
  238.     ac_prev=libexecdir ;;
  239.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  240.   | --libexe=* | --libex=* | --libe=*)
  241.     libexecdir="$ac_optarg" ;;
  242.  
  243.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  244.   | --localstate | --localstat | --localsta | --localst \
  245.   | --locals | --local | --loca | --loc | --lo)
  246.     ac_prev=localstatedir ;;
  247.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  248.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  249.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  250.     localstatedir="$ac_optarg" ;;
  251.  
  252.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  253.     ac_prev=mandir ;;
  254.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  255.     mandir="$ac_optarg" ;;
  256.  
  257.   -nfp | --nfp | --nf)
  258.     # Obsolete; use --without-fp.
  259.     with_fp=no ;;
  260.  
  261.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  262.   | --no-cr | --no-c)
  263.     no_create=yes ;;
  264.  
  265.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  266.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  267.     no_recursion=yes ;;
  268.  
  269.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  270.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  271.   | --oldin | --oldi | --old | --ol | --o)
  272.     ac_prev=oldincludedir ;;
  273.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  274.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  275.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  276.     oldincludedir="$ac_optarg" ;;
  277.  
  278.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  279.     ac_prev=prefix ;;
  280.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  281.     prefix="$ac_optarg" ;;
  282.  
  283.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  284.   | --program-pre | --program-pr | --program-p)
  285.     ac_prev=program_prefix ;;
  286.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  287.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  288.     program_prefix="$ac_optarg" ;;
  289.  
  290.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  291.   | --program-suf | --program-su | --program-s)
  292.     ac_prev=program_suffix ;;
  293.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  294.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  295.     program_suffix="$ac_optarg" ;;
  296.  
  297.   -program-transform-name | --program-transform-name \
  298.   | --program-transform-nam | --program-transform-na \
  299.   | --program-transform-n | --program-transform- \
  300.   | --program-transform | --program-transfor \
  301.   | --program-transfo | --program-transf \
  302.   | --program-trans | --program-tran \
  303.   | --progr-tra | --program-tr | --program-t)
  304.     ac_prev=program_transform_name ;;
  305.   -program-transform-name=* | --program-transform-name=* \
  306.   | --program-transform-nam=* | --program-transform-na=* \
  307.   | --program-transform-n=* | --program-transform-=* \
  308.   | --program-transform=* | --program-transfor=* \
  309.   | --program-transfo=* | --program-transf=* \
  310.   | --program-trans=* | --program-tran=* \
  311.   | --progr-tra=* | --program-tr=* | --program-t=*)
  312.     program_transform_name="$ac_optarg" ;;
  313.  
  314.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  315.   | -silent | --silent | --silen | --sile | --sil)
  316.     silent=yes ;;
  317.  
  318.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  319.     ac_prev=sbindir ;;
  320.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  321.   | --sbi=* | --sb=*)
  322.     sbindir="$ac_optarg" ;;
  323.  
  324.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  325.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  326.   | --sharedst | --shareds | --shared | --share | --shar \
  327.   | --sha | --sh)
  328.     ac_prev=sharedstatedir ;;
  329.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  330.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  331.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  332.   | --sha=* | --sh=*)
  333.     sharedstatedir="$ac_optarg" ;;
  334.  
  335.   -site | --site | --sit)
  336.     ac_prev=site ;;
  337.   -site=* | --site=* | --sit=*)
  338.     site="$ac_optarg" ;;
  339.  
  340.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  341.     ac_prev=srcdir ;;
  342.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  343.     srcdir="$ac_optarg" ;;
  344.  
  345.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  346.   | --syscon | --sysco | --sysc | --sys | --sy)
  347.     ac_prev=sysconfdir ;;
  348.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  349.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  350.     sysconfdir="$ac_optarg" ;;
  351.  
  352.   -target | --target | --targe | --targ | --tar | --ta | --t)
  353.     ac_prev=target ;;
  354.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  355.     target="$ac_optarg" ;;
  356.  
  357.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  358.     verbose=yes ;;
  359.  
  360.   -version | --version | --versio | --versi | --vers)
  361.     echo "configure generated by autoconf version 2.10"
  362.     exit 0 ;;
  363.  
  364.   -with-* | --with-*)
  365.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  366.     # Reject names that are not valid shell variable names.
  367.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  368.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  369.     fi
  370.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  371.     case "$ac_option" in
  372.       *=*) ;;
  373.       *) ac_optarg=yes ;;
  374.     esac
  375.     eval "with_${ac_package}='$ac_optarg'" ;;
  376.  
  377.   -without-* | --without-*)
  378.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  379.     # Reject names that are not valid shell variable names.
  380.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  381.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  382.     fi
  383.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  384.     eval "with_${ac_package}=no" ;;
  385.  
  386.   --x)
  387.     # Obsolete; use --with-x.
  388.     with_x=yes ;;
  389.  
  390.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  391.   | --x-incl | --x-inc | --x-in | --x-i)
  392.     ac_prev=x_includes ;;
  393.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  394.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  395.     x_includes="$ac_optarg" ;;
  396.  
  397.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  398.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  399.     ac_prev=x_libraries ;;
  400.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  401.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  402.     x_libraries="$ac_optarg" ;;
  403.  
  404.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  405.     ;;
  406.  
  407.   *)
  408.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  409.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  410.     fi
  411.     if test "x$nonopt" != xNONE; then
  412.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  413.     fi
  414.     nonopt="$ac_option"
  415.     ;;
  416.  
  417.   esac
  418. done
  419.  
  420. if test -n "$ac_prev"; then
  421.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  422. fi
  423.  
  424. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  425.  
  426. # File descriptor usage:
  427. # 0 standard input
  428. # 1 file creation
  429. # 2 errors and warnings
  430. # 3 some systems may open it to /dev/tty
  431. # 4 used on the Kubota Titan
  432. # 6 checking for... messages and results
  433. # 5 compiler messages saved in config.log
  434. if test "$silent" = yes; then
  435.   exec 6>/dev/null
  436. else
  437.   exec 6>&1
  438. fi
  439. exec 5>./config.log
  440.  
  441. echo "\
  442. This file contains any messages produced by compilers while
  443. running configure, to aid debugging if configure makes a mistake.
  444. " 1>&5
  445.  
  446. # Strip out --no-create and --no-recursion so they do not pile up.
  447. # Also quote any args containing shell metacharacters.
  448. ac_configure_args=
  449. for ac_arg
  450. do
  451.   case "$ac_arg" in
  452.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  453.   | --no-cr | --no-c) ;;
  454.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  455.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  456.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  457.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  458.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  459.   esac
  460. done
  461.  
  462. # NLS nuisances.
  463. # Only set LANG and LC_ALL to C if already set.
  464. # These must not be set unconditionally because not all systems understand
  465. # e.g. LANG=C (notably SCO).
  466. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  467. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  468.  
  469. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  470. rm -rf conftest* confdefs.h
  471. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  472. echo > confdefs.h
  473.  
  474. # A filename unique to this package, relative to the directory that
  475. # configure is in, which we can look for to find out if srcdir is correct.
  476. ac_unique_file=libbfd.c
  477.  
  478. # Find the source files, if location was not specified.
  479. if test -z "$srcdir"; then
  480.   ac_srcdir_defaulted=yes
  481.   # Try the directory containing this script, then its parent.
  482.   ac_prog=$0
  483.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  484.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  485.   srcdir=$ac_confdir
  486.   if test ! -r $srcdir/$ac_unique_file; then
  487.     srcdir=..
  488.   fi
  489. else
  490.   ac_srcdir_defaulted=no
  491. fi
  492. if test ! -r $srcdir/$ac_unique_file; then
  493.   if test "$ac_srcdir_defaulted" = yes; then
  494.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  495.   else
  496.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  497.   fi
  498. fi
  499. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  500.  
  501. # Prefer explicitly selected file to automatically selected ones.
  502. if test -z "$CONFIG_SITE"; then
  503.   if test "x$prefix" != xNONE; then
  504.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  505.   else
  506.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  507.   fi
  508. fi
  509. for ac_site_file in $CONFIG_SITE; do
  510.   if test -r "$ac_site_file"; then
  511.     echo "loading site script $ac_site_file"
  512.     . "$ac_site_file"
  513.   fi
  514. done
  515.  
  516. if test -r "$cache_file"; then
  517.   echo "loading cache $cache_file"
  518.   . $cache_file
  519. else
  520.   echo "creating cache $cache_file"
  521.   > $cache_file
  522. fi
  523.  
  524. ac_ext=c
  525. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  526. ac_cpp='$CPP $CPPFLAGS'
  527. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  528. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  529.  
  530. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  531.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  532.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  533.     ac_n= ac_c='
  534. ' ac_t='    '
  535.   else
  536.     ac_n=-n ac_c= ac_t=
  537.   fi
  538. else
  539.   ac_n= ac_c='\c' ac_t=
  540. fi
  541.  
  542.  
  543.  
  544. # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
  545. if test "${enable_64_bit_bfd+set}" = set; then
  546.   enableval="$enable_64_bit_bfd"
  547.   case "${enableval}" in
  548.   yes)  want64=true  ;;
  549.   no)   want64=false ;;
  550.   *)    { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
  551. esac
  552. else
  553.   want64=false
  554. fi
  555. # Check whether --enable-targets or --disable-targets was given.
  556. if test "${enable_targets+set}" = set; then
  557.   enableval="$enable_targets"
  558.   case "${enableval}" in
  559.   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
  560.             ;;
  561.   no)       enable_targets= ;;
  562.   *)        enable_targets=$enableval ;;
  563. esac
  564. fi
  565. # Check whether --enable-shared or --disable-shared was given.
  566. if test "${enable_shared+set}" = set; then
  567.   enableval="$enable_shared"
  568.   case "${enableval}" in
  569.   yes) shared=true ;;
  570.   no)  shared=false ;;
  571.   *bfd*) shared=true ;;
  572.   *) shared=false ;;
  573. esac
  574. fi
  575. # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
  576. if test "${enable_commonbfdlib+set}" = set; then
  577.   enableval="$enable_commonbfdlib"
  578.   case "${enableval}" in
  579.   yes) commonbfdlib=true ;;
  580.   no)  commonbfdlib=false ;;
  581.   *)   { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
  582. esac
  583. fi
  584. # Check whether --with-mmap or --without-mmap was given.
  585. if test "${with_mmap+set}" = set; then
  586.   withval="$with_mmap"
  587.   case "${withval}" in
  588.   yes)  want_mmap=true ;;
  589.   no)   want_mmap=false ;;
  590.   *)    { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
  591. esac
  592. else
  593.   want_mmap=false
  594. fi
  595.  
  596.  
  597.  
  598. ac_aux_dir=
  599. for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
  600.   if test -f $ac_dir/install-sh; then
  601.     ac_aux_dir=$ac_dir
  602.     ac_install_sh="$ac_aux_dir/install-sh -c"
  603.     break
  604.   elif test -f $ac_dir/install.sh; then
  605.     ac_aux_dir=$ac_dir
  606.     ac_install_sh="$ac_aux_dir/install.sh -c"
  607.     break
  608.   fi
  609. done
  610. if test -z "$ac_aux_dir"; then
  611.   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
  612. fi
  613. ac_config_guess=$ac_aux_dir/config.guess
  614. ac_config_sub=$ac_aux_dir/config.sub
  615. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  616.  
  617.  
  618. # Do some error checking and defaulting for the host and target type.
  619. # The inputs are:
  620. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  621. #
  622. # The rules are:
  623. # 1. You are not allowed to specify --host, --target, and nonopt at the
  624. #    same time.
  625. # 2. Host defaults to nonopt.
  626. # 3. If nonopt is not specified, then host defaults to the current host,
  627. #    as determined by config.guess.
  628. # 4. Target and build default to nonopt.
  629. # 5. If nonopt is not specified, then target and build default to host.
  630.  
  631. # The aliases save the names the user supplied, while $host etc.
  632. # will get canonicalized.
  633. case $host---$target---$nonopt in
  634. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  635. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  636. esac
  637.  
  638.  
  639. # Make sure we can run config.sub.
  640. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  641. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  642. fi
  643.  
  644. echo $ac_n "checking host system type""... $ac_c" 1>&6
  645.  
  646. host_alias=$host
  647. case "$host_alias" in
  648. NONE)
  649.   case $nonopt in
  650.   NONE)
  651.     if host_alias=`$ac_config_guess`; then :
  652.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  653.     fi ;;
  654.   *) host_alias=$nonopt ;;
  655.   esac ;;
  656. esac
  657.  
  658. host=`$ac_config_sub $host_alias`
  659. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  660. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  661. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  662. echo "$ac_t""$host" 1>&6
  663.  
  664. echo $ac_n "checking target system type""... $ac_c" 1>&6
  665.  
  666. target_alias=$target
  667. case "$target_alias" in
  668. NONE)
  669.   case $nonopt in
  670.   NONE) target_alias=$host_alias ;;
  671.   *) target_alias=$nonopt ;;
  672.   esac ;;
  673. esac
  674.  
  675. target=`$ac_config_sub $target_alias`
  676. target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  677. target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  678. target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  679. echo "$ac_t""$target" 1>&6
  680.  
  681. echo $ac_n "checking build system type""... $ac_c" 1>&6
  682.  
  683. build_alias=$build
  684. case "$build_alias" in
  685. NONE)
  686.   case $nonopt in
  687.   NONE) build_alias=$host_alias ;;
  688.   *) build_alias=$nonopt ;;
  689.   esac ;;
  690. esac
  691.  
  692. build=`$ac_config_sub $build_alias`
  693. build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  694. build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  695. build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  696. echo "$ac_t""$build" 1>&6
  697.  
  698. test "$host_alias" != "$target_alias" &&
  699.   test "$program_prefix$program_suffix$program_transform_name" = \
  700.     NONENONEs,x,x, &&
  701.   program_prefix=${target_alias}-
  702.  
  703. if test -z "$target" ; then
  704.     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
  705. fi
  706. if test "$program_transform_name" = s,x,x,; then
  707.   program_transform_name=
  708. else
  709.   # Double any \ or $.  echo might interpret backslashes.
  710.   cat <<\EOF_SED > conftestsed
  711. s,\\,\\\\,g; s,\$,$$,g
  712. EOF_SED
  713.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  714.   rm -f conftestsed
  715. fi
  716. test "$program_prefix" != NONE &&
  717.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  718. # Use a double $ so make ignores it.
  719. test "$program_suffix" != NONE &&
  720.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  721.  
  722. # sed with no file args requires a program.
  723. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  724.  
  725.  
  726. host64=false
  727. target64=false
  728.  
  729. # host stuff:
  730.  
  731. ALLLIBS='$(TARGETLIB)'
  732. PICFLAG=
  733. SHLIB=unused-shlib
  734. SHLINK=unused-shlink
  735. if test "${shared}" = "true"; then
  736.   PICFLAG=-fpic
  737.   if test "${commonbfdlib}" = "true"; then
  738.     ALLLIBS='$(TARGETLIB)'
  739.   else
  740.     ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
  741.     SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
  742.     SHLINK=libbfd.so
  743.   fi
  744. fi
  745.  
  746. # Extract the first word of "gcc", so it can be a program name with args.
  747. set dummy gcc; ac_word=$2
  748. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  749. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  750.   echo $ac_n "(cached) $ac_c" 1>&6
  751. else
  752.   if test -n "$CC"; then
  753.   ac_cv_prog_CC="$CC" # Let the user override the test.
  754. else
  755.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  756.   for ac_dir in $PATH; do
  757.     test -z "$ac_dir" && ac_dir=.
  758.     if test -f $ac_dir/$ac_word; then
  759.       ac_cv_prog_CC="gcc"
  760.       break
  761.     fi
  762.   done
  763.   IFS="$ac_save_ifs"
  764. fi
  765. fi
  766. CC="$ac_cv_prog_CC"
  767. if test -n "$CC"; then
  768.   echo "$ac_t""$CC" 1>&6
  769. else
  770.   echo "$ac_t""no" 1>&6
  771. fi
  772.  
  773. if test -z "$CC"; then
  774.   # Extract the first word of "cc", so it can be a program name with args.
  775. set dummy cc; ac_word=$2
  776. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  777. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  778.   echo $ac_n "(cached) $ac_c" 1>&6
  779. else
  780.   if test -n "$CC"; then
  781.   ac_cv_prog_CC="$CC" # Let the user override the test.
  782. else
  783.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  784.   ac_prog_rejected=no
  785.   for ac_dir in $PATH; do
  786.     test -z "$ac_dir" && ac_dir=.
  787.     if test -f $ac_dir/$ac_word; then
  788.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  789.         ac_prog_rejected=yes
  790.     continue
  791.       fi
  792.       ac_cv_prog_CC="cc"
  793.       break
  794.     fi
  795.   done
  796.   IFS="$ac_save_ifs"
  797. if test $ac_prog_rejected = yes; then
  798.   # We found a bogon in the path, so make sure we never use it.
  799.   set dummy $ac_cv_prog_CC
  800.   shift
  801.   if test $# -gt 0; then
  802.     # We chose a different compiler from the bogus one.
  803.     # However, it has the same basename, so the bogon will be chosen
  804.     # first if we set CC to just the basename; use the full file name.
  805.     shift
  806.     set dummy "$ac_dir/$ac_word" "$@"
  807.     shift
  808.     ac_cv_prog_CC="$@"
  809.   fi
  810. fi
  811. fi
  812. fi
  813. CC="$ac_cv_prog_CC"
  814. if test -n "$CC"; then
  815.   echo "$ac_t""$CC" 1>&6
  816. else
  817.   echo "$ac_t""no" 1>&6
  818. fi
  819.  
  820.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  821. fi
  822.  
  823. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  824. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  825.   echo $ac_n "(cached) $ac_c" 1>&6
  826. else
  827.   cat > conftest.c <<EOF
  828. #ifdef __GNUC__
  829.   yes;
  830. #endif
  831. EOF
  832. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  833.   ac_cv_prog_gcc=yes
  834. else
  835.   ac_cv_prog_gcc=no
  836. fi
  837. fi
  838.  
  839. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  840. if test $ac_cv_prog_gcc = yes; then
  841.   GCC=yes
  842.   if test "${CFLAGS+set}" != set; then
  843.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  844. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  845.   echo $ac_n "(cached) $ac_c" 1>&6
  846. else
  847.   echo 'void f(){}' > conftest.c
  848. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  849.   ac_cv_prog_gcc_g=yes
  850. else
  851.   ac_cv_prog_gcc_g=no
  852. fi
  853. rm -f conftest*
  854.  
  855. fi
  856.  
  857. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  858.     if test $ac_cv_prog_gcc_g = yes; then
  859.       CFLAGS="-g -O2"
  860.     else
  861.       CFLAGS="-O2"
  862.     fi
  863.   fi
  864. else
  865.   GCC=
  866.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  867. fi
  868.  
  869.  
  870. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  871. if test -d /etc/conf/kconfig.d &&
  872.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  873. then
  874.   echo "$ac_t""yes" 1>&6
  875.   ISC=yes # If later tests want to check for ISC.
  876.   cat >> confdefs.h <<\EOF
  877. #define _POSIX_SOURCE 1
  878. EOF
  879.  
  880.   if test "$GCC" = yes; then
  881.     CC="$CC -posix"
  882.   else
  883.     CC="$CC -Xp"
  884.   fi
  885. else
  886.   echo "$ac_t""no" 1>&6
  887.   ISC=
  888. fi
  889.  
  890.  
  891. # Permit host specific settings.
  892. . ${srcdir}/configure.host
  893.  
  894.  
  895. if test $host != $build; then
  896.   ac_tool_prefix=${host_alias}-
  897. else
  898.   ac_tool_prefix=
  899. fi
  900.  
  901. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  902. set dummy ${ac_tool_prefix}ar; ac_word=$2
  903. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  904. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  905.   echo $ac_n "(cached) $ac_c" 1>&6
  906. else
  907.   if test -n "$AR"; then
  908.   ac_cv_prog_AR="$AR" # Let the user override the test.
  909. else
  910.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  911.   for ac_dir in $PATH; do
  912.     test -z "$ac_dir" && ac_dir=.
  913.     if test -f $ac_dir/$ac_word; then
  914.       ac_cv_prog_AR="${ac_tool_prefix}ar"
  915.       break
  916.     fi
  917.   done
  918.   IFS="$ac_save_ifs"
  919.   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
  920. fi
  921. fi
  922. AR="$ac_cv_prog_AR"
  923. if test -n "$AR"; then
  924.   echo "$ac_t""$AR" 1>&6
  925. else
  926.   echo "$ac_t""no" 1>&6
  927. fi
  928.  
  929.  
  930.  
  931. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  932. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  933. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  934. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  935.   echo $ac_n "(cached) $ac_c" 1>&6
  936. else
  937.   if test -n "$RANLIB"; then
  938.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  939. else
  940.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  941.   for ac_dir in $PATH; do
  942.     test -z "$ac_dir" && ac_dir=.
  943.     if test -f $ac_dir/$ac_word; then
  944.       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  945.       break
  946.     fi
  947.   done
  948.   IFS="$ac_save_ifs"
  949. fi
  950. fi
  951. RANLIB="$ac_cv_prog_RANLIB"
  952. if test -n "$RANLIB"; then
  953.   echo "$ac_t""$RANLIB" 1>&6
  954. else
  955.   echo "$ac_t""no" 1>&6
  956. fi
  957.  
  958.  
  959. if test -z "$ac_cv_prog_RANLIB"; then
  960. if test -n "$ac_tool_prefix"; then
  961.   # Extract the first word of "ranlib", so it can be a program name with args.
  962. set dummy ranlib; ac_word=$2
  963. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  964. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  965.   echo $ac_n "(cached) $ac_c" 1>&6
  966. else
  967.   if test -n "$RANLIB"; then
  968.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  969. else
  970.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  971.   for ac_dir in $PATH; do
  972.     test -z "$ac_dir" && ac_dir=.
  973.     if test -f $ac_dir/$ac_word; then
  974.       ac_cv_prog_RANLIB="ranlib"
  975.       break
  976.     fi
  977.   done
  978.   IFS="$ac_save_ifs"
  979.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  980. fi
  981. fi
  982. RANLIB="$ac_cv_prog_RANLIB"
  983. if test -n "$RANLIB"; then
  984.   echo "$ac_t""$RANLIB" 1>&6
  985. else
  986.   echo "$ac_t""no" 1>&6
  987. fi
  988.  
  989. else
  990.   RANLIB=":"
  991. fi
  992. fi
  993.  
  994. # Find a good install program.  We prefer a C program (faster),
  995. # so one script is as good as another.  But avoid the broken or
  996. # incompatible versions:
  997. # SysV /etc/install, /usr/sbin/install
  998. # SunOS /usr/etc/install
  999. # IRIX /sbin/install
  1000. # AIX /bin/install
  1001. # AmigaOS /c/install
  1002. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1003. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1004. # ./install, which can be erroneously created by make from ./install.sh.
  1005. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1006. if test -z "$INSTALL"; then
  1007. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1008.   echo $ac_n "(cached) $ac_c" 1>&6
  1009. else
  1010.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1011.   for ac_dir in $PATH; do
  1012.     # Account for people who put trailing slashes in PATH elements.
  1013.     case "$ac_dir/" in
  1014.     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1015.     *)
  1016.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1017.       for ac_prog in ginstall installbsd scoinst install; do
  1018.         if test -f $ac_dir/$ac_prog; then
  1019.       if test $ac_prog = install &&
  1020.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1021.         # AIX install.  It has an incompatible calling convention.
  1022.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1023.         :
  1024.       else
  1025.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1026.         break 2
  1027.       fi
  1028.     fi
  1029.       done
  1030.       ;;
  1031.     esac
  1032.   done
  1033.   IFS="$ac_save_ifs"
  1034.  
  1035. fi
  1036.   if test "${ac_cv_path_install+set}" = set; then
  1037.     INSTALL="$ac_cv_path_install"
  1038.   else
  1039.     # As a last resort, use the slow shell script.  We don't cache a
  1040.     # path for INSTALL within a source directory, because that will
  1041.     # break other packages using the cache if that directory is
  1042.     # removed, or if the path is relative.
  1043.     INSTALL="$ac_install_sh"
  1044.   fi
  1045. fi
  1046. echo "$ac_t""$INSTALL" 1>&6
  1047.  
  1048. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1049. # It thinks the first close brace ends the variable substitution.
  1050. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1051.  
  1052. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1053.  
  1054.  
  1055. if test "${shared}" = "true"; then
  1056.   if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
  1057.     echo "configure: warning: BFD --enable-shared only supported when using gcc" 1>&2
  1058.     shared=false
  1059.     ALLLIBS='$(TARGETLIB)'
  1060.     PICFLAG=
  1061.     SHLIB=unused-shlib
  1062.   fi
  1063. fi
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070. if test "${commonbfdlib}" = "true"; then
  1071.   COMMON_SHLIB=yes
  1072.   PICLIST=piclist
  1073. else
  1074.   COMMON_SHLIB=
  1075.   PICLIST=
  1076. fi
  1077.  
  1078.  
  1079.  
  1080.  
  1081. HOST_64BIT_LONG=0
  1082. if test "x${HOST_64BIT_TYPE}" = "xlong"; then
  1083.   HOST_64BIT_LONG=1
  1084. fi
  1085.  
  1086.  
  1087. # If we cannot run a trivial program, we must be cross compiling.
  1088. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1089. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1090.   echo $ac_n "(cached) $ac_c" 1>&6
  1091. else
  1092.   if test "$cross_compiling" = yes; then
  1093.   ac_cv_c_cross=yes
  1094. else
  1095. cat > conftest.$ac_ext <<EOF
  1096. #line 1097 "configure"
  1097. #include "confdefs.h"
  1098. main(){return(0);}
  1099. EOF
  1100. { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1101. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1102.   ac_cv_c_cross=no
  1103. else
  1104.   ac_cv_c_cross=yes
  1105. fi
  1106. fi
  1107. rm -fr conftest*
  1108. fi
  1109.  
  1110. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1111. cross_compiling=$ac_cv_c_cross
  1112.  
  1113. # Put a plausible default for CC_FOR_BUILD in Makefile.
  1114. if test -z "$CC_FOR_BUILD"; then
  1115.   if test "x$cross_compiling" = "xno"; then
  1116.     CC_FOR_BUILD='$(CC)'
  1117.   else
  1118.     CC_FOR_BUILD=gcc
  1119.   fi
  1120. fi
  1121.  
  1122.  
  1123. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1124. # On Suns, sometimes $CPP names a directory.
  1125. if test -n "$CPP" && test -d "$CPP"; then
  1126.   CPP=
  1127. fi
  1128. if test -z "$CPP"; then
  1129. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1130.   echo $ac_n "(cached) $ac_c" 1>&6
  1131. else
  1132.     # This must be in double quotes, not single quotes, because CPP may get
  1133.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1134.   CPP="${CC-cc} -E"
  1135.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1136.   # not just through cpp.
  1137.   cat > conftest.$ac_ext <<EOF
  1138. #line 1139 "configure"
  1139. #include "confdefs.h"
  1140. #include <assert.h>
  1141. Syntax Error
  1142. EOF
  1143. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1144. { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1145. ac_err=`grep -v '^ *+' conftest.out`
  1146. if test -z "$ac_err"; then
  1147.   :
  1148. else
  1149.   echo "$ac_err" >&5
  1150.   rm -rf conftest*
  1151.   CPP="${CC-cc} -E -traditional-cpp"
  1152.   cat > conftest.$ac_ext <<EOF
  1153. #line 1154 "configure"
  1154. #include "confdefs.h"
  1155. #include <assert.h>
  1156. Syntax Error
  1157. EOF
  1158. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1159. { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1160. ac_err=`grep -v '^ *+' conftest.out`
  1161. if test -z "$ac_err"; then
  1162.   :
  1163. else
  1164.   echo "$ac_err" >&5
  1165.   rm -rf conftest*
  1166.   CPP=/lib/cpp
  1167. fi
  1168. rm -f conftest*
  1169. fi
  1170. rm -f conftest*
  1171.   ac_cv_prog_CPP="$CPP"
  1172. fi
  1173.   CPP="$ac_cv_prog_CPP"
  1174. else
  1175.   ac_cv_prog_CPP="$CPP"
  1176. fi
  1177. echo "$ac_t""$CPP" 1>&6
  1178.  
  1179. for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
  1180. do
  1181. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1182. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1183. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1184.   echo $ac_n "(cached) $ac_c" 1>&6
  1185. else
  1186.   cat > conftest.$ac_ext <<EOF
  1187. #line 1188 "configure"
  1188. #include "confdefs.h"
  1189. #include <$ac_hdr>
  1190. EOF
  1191. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1192. { (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1193. ac_err=`grep -v '^ *+' conftest.out`
  1194. if test -z "$ac_err"; then
  1195.   rm -rf conftest*
  1196.   eval "ac_cv_header_$ac_safe=yes"
  1197. else
  1198.   echo "$ac_err" >&5
  1199.   rm -rf conftest*
  1200.   eval "ac_cv_header_$ac_safe=no"
  1201. fi
  1202. rm -f conftest*
  1203. fi
  1204. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1205.   echo "$ac_t""yes" 1>&6
  1206.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1207.   cat >> confdefs.h <<EOF
  1208. #define $ac_tr_hdr 1
  1209. EOF
  1210.  
  1211. else
  1212.   echo "$ac_t""no" 1>&6
  1213. fi
  1214. done
  1215.  
  1216. for ac_hdr in fcntl.h sys/file.h sys/time.h
  1217. do
  1218. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1219. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1220. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1221.   echo $ac_n "(cached) $ac_c" 1>&6
  1222. else
  1223.   cat > conftest.$ac_ext <<EOF
  1224. #line 1225 "configure"
  1225. #include "confdefs.h"
  1226. #include <$ac_hdr>
  1227. EOF
  1228. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1229. { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1230. ac_err=`grep -v '^ *+' conftest.out`
  1231. if test -z "$ac_err"; then
  1232.   rm -rf conftest*
  1233.   eval "ac_cv_header_$ac_safe=yes"
  1234. else
  1235.   echo "$ac_err" >&5
  1236.   rm -rf conftest*
  1237.   eval "ac_cv_header_$ac_safe=no"
  1238. fi
  1239. rm -f conftest*
  1240. fi
  1241. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1242.   echo "$ac_t""yes" 1>&6
  1243.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1244.   cat >> confdefs.h <<EOF
  1245. #define $ac_tr_hdr 1
  1246. EOF
  1247.  
  1248. else
  1249.   echo "$ac_t""no" 1>&6
  1250. fi
  1251. done
  1252.  
  1253. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1254. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1255.   echo $ac_n "(cached) $ac_c" 1>&6
  1256. else
  1257.   cat > conftest.$ac_ext <<EOF
  1258. #line 1259 "configure"
  1259. #include "confdefs.h"
  1260. #include <sys/types.h>
  1261. #include <sys/time.h>
  1262. #include <time.h>
  1263. int main() { return 0; }
  1264. int t() {
  1265. struct tm *tp;
  1266. ; return 0; }
  1267. EOF
  1268. if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1269.   rm -rf conftest*
  1270.   ac_cv_header_time=yes
  1271. else
  1272.   rm -rf conftest*
  1273.   ac_cv_header_time=no
  1274. fi
  1275. rm -f conftest*
  1276.  
  1277. fi
  1278.  
  1279. echo "$ac_t""$ac_cv_header_time" 1>&6
  1280. if test $ac_cv_header_time = yes; then
  1281.   cat >> confdefs.h <<\EOF
  1282. #define TIME_WITH_SYS_TIME 1
  1283. EOF
  1284.  
  1285. fi
  1286.  
  1287. for ac_func in fcntl getpagesize setitimer sysconf
  1288. do
  1289. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1290. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1291.   echo $ac_n "(cached) $ac_c" 1>&6
  1292. else
  1293.   cat > conftest.$ac_ext <<EOF
  1294. #line 1295 "configure"
  1295. #include "confdefs.h"
  1296. /* System header to define __stub macros and hopefully few prototypes,
  1297.     which can conflict with char $ac_func(); below.  */
  1298. #include <assert.h>
  1299. /* Override any gcc2 internal prototype to avoid an error.  */
  1300. /* We use char because int might match the return type of a gcc2
  1301.     builtin and then its argument prototype would still apply.  */
  1302. char $ac_func();
  1303.  
  1304. int main() { t(); return 0; }
  1305. int t() {
  1306.  
  1307. /* The GNU C library defines this for functions which it implements
  1308.     to always fail with ENOSYS.  Some functions are actually named
  1309.     something starting with __ and the normal name is an alias.  */
  1310. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1311. choke me
  1312. #else
  1313. $ac_func();
  1314. #endif
  1315.  
  1316. ; return 0; }
  1317. EOF
  1318. if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1319.   rm -rf conftest*
  1320.   eval "ac_cv_func_$ac_func=yes"
  1321. else
  1322.   rm -rf conftest*
  1323.   eval "ac_cv_func_$ac_func=no"
  1324. fi
  1325. rm -f conftest*
  1326.  
  1327. fi
  1328. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1329.   echo "$ac_t""yes" 1>&6
  1330.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1331.   cat >> confdefs.h <<EOF
  1332. #define $ac_tr_func 1
  1333. EOF
  1334.  
  1335. else
  1336.   echo "$ac_t""no" 1>&6
  1337. fi
  1338. done
  1339.  
  1340.  
  1341.  
  1342. case "${host}" in
  1343. i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
  1344.   cat >> confdefs.h <<\EOF
  1345. #define USE_BINARY_FOPEN 1
  1346. EOF
  1347.  ;;
  1348. esac
  1349.  
  1350. echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
  1351. if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
  1352.   echo $ac_n "(cached) $ac_c" 1>&6
  1353. else
  1354.   cat > conftest.$ac_ext <<EOF
  1355. #line 1356 "configure"
  1356. #include "confdefs.h"
  1357.  
  1358. #include <stdio.h>
  1359. #ifdef HAVE_STDLIB_H
  1360. #include <stdlib.h>
  1361. #endif
  1362. #ifdef HAVE_UNISTD_H
  1363. #include <unistd.h>
  1364. #endif
  1365. int main() { return 0; }
  1366. int t() {
  1367. char *(*pfn) = (char *(*)) malloc
  1368. ; return 0; }
  1369. EOF
  1370. if { (eval echo configure:1371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1371.   rm -rf conftest*
  1372.   bfd_cv_decl_needed_malloc=no
  1373. else
  1374.   rm -rf conftest*
  1375.   bfd_cv_decl_needed_malloc=yes
  1376. fi
  1377. rm -f conftest*
  1378.  
  1379. fi
  1380.  
  1381. echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
  1382. if test $bfd_cv_decl_needed_malloc = yes; then
  1383.   bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1384.   cat >> confdefs.h <<EOF
  1385. #define $bfd_tr_decl 1
  1386. EOF
  1387.  
  1388. fi
  1389.  
  1390. echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
  1391. if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
  1392.   echo $ac_n "(cached) $ac_c" 1>&6
  1393. else
  1394.   cat > conftest.$ac_ext <<EOF
  1395. #line 1396 "configure"
  1396. #include "confdefs.h"
  1397.  
  1398. #include <stdio.h>
  1399. #ifdef HAVE_STDLIB_H
  1400. #include <stdlib.h>
  1401. #endif
  1402. #ifdef HAVE_UNISTD_H
  1403. #include <unistd.h>
  1404. #endif
  1405. int main() { return 0; }
  1406. int t() {
  1407. char *(*pfn) = (char *(*)) free
  1408. ; return 0; }
  1409. EOF
  1410. if { (eval echo configure:1411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1411.   rm -rf conftest*
  1412.   bfd_cv_decl_needed_free=no
  1413. else
  1414.   rm -rf conftest*
  1415.   bfd_cv_decl_needed_free=yes
  1416. fi
  1417. rm -f conftest*
  1418.  
  1419. fi
  1420.  
  1421. echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
  1422. if test $bfd_cv_decl_needed_free = yes; then
  1423.   bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1424.   cat >> confdefs.h <<EOF
  1425. #define $bfd_tr_decl 1
  1426. EOF
  1427.  
  1428. fi
  1429.  
  1430.  
  1431. # If we are configured native, pick a core file support file.
  1432. COREFILE=
  1433. COREFLAG=
  1434. if test "${target}" = "${host}"; then
  1435.   case "${host}" in
  1436.   alpha*-*-linux*)
  1437.     COREFILE=trad-core.o
  1438.     cat >> confdefs.h <<\EOF
  1439. #define TRAD_HEADER "hosts/alphalinux.h"
  1440. EOF
  1441.  
  1442.     ;;
  1443.   alpha*-*-*)        COREFILE=osf-core.o ;;
  1444.   arm-*-riscix)        COREFILE=trad-core.o ;;
  1445.   hppa*-*-hpux*)    COREFILE=hpux-core.o ;;
  1446.   hppa*-*-hiux*)    COREFILE=hpux-core.o ;;
  1447.   hppa*-*-bsd*)        COREFILE="hpux-core.o hppabsd-core.o"
  1448.             COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
  1449.   i[345]86-sequent-bsd*)
  1450.     COREFILE=trad-core.o;
  1451.     cat >> confdefs.h <<\EOF
  1452. #define TRAD_HEADER "hosts/symmetry.h"
  1453. EOF
  1454.  
  1455.     ;;
  1456.   i[345]86-sequent-sysv4*) ;;
  1457.   i[345]86-sequent-sysv*)
  1458.     COREFILE=trad-core.o
  1459.     cat >> confdefs.h <<\EOF
  1460. #define TRAD_HEADER "hosts/symmetry.h"
  1461. EOF
  1462.  
  1463.     ;;
  1464.   i[345]86-*-bsd* | i[345]86-*-freebsd*)
  1465.     COREFILE=trad-core.o
  1466.     cat >> confdefs.h <<\EOF
  1467. #define TRAD_HEADER "hosts/i386bsd.h"
  1468. EOF
  1469.  
  1470.     ;;
  1471.   i[345]86-*-netbsd*)
  1472.     COREFILE=netbsd-core.o
  1473.     ;;
  1474.   i[345]86-esix-sysv3*)
  1475.     COREFILE=trad-core.o
  1476.     cat >> confdefs.h <<\EOF
  1477. #define TRAD_HEADER "hosts/esix.h"
  1478. EOF
  1479.  
  1480.     ;;
  1481.   i[345]86-*-sco* | i[345]86-*-isc*)
  1482.     COREFILE=trad-core.o
  1483.     cat >> confdefs.h <<\EOF
  1484. #define TRAD_HEADER "hosts/i386sco.h"
  1485. EOF
  1486.  
  1487.     ;;
  1488.   i[345]86-*-mach3*)
  1489.     COREFILE=trad-core.o
  1490.     cat >> confdefs.h <<\EOF
  1491. #define TRAD_HEADER "hosts/i386mach3.h"
  1492. EOF
  1493.  
  1494.     ;;
  1495.   i[345]86-*-linux*)
  1496.     COREFILE=trad-core.o
  1497.     cat >> confdefs.h <<\EOF
  1498. #define TRAD_HEADER "hosts/i386linux.h"
  1499. EOF
  1500.  
  1501.     ;;
  1502.   i[345]86-*-isc*)    COREFILE=trad-core.o ;;
  1503.   i[345]86-*-aix*)    COREFILE=aix386-core.o ;;
  1504.   i860-*-mach3* | i860-*-osf1*)
  1505.     COREFILE=trad-core.o
  1506.     cat >> confdefs.h <<\EOF
  1507. #define TRAD_HEADER "hosts/i860mach3.h"
  1508. EOF
  1509.  
  1510.     ;;
  1511.   mips-dec-bsd*)
  1512.     COREFILE=trad-core.o
  1513.     cat >> confdefs.h <<\EOF
  1514. #define TRAD_HEADER "hosts/mipsbsd.h"
  1515. EOF
  1516.  
  1517.     ;;
  1518.   mips-dec-mach3*)
  1519.     COREFILE=trad-core.o
  1520.     cat >> confdefs.h <<\EOF
  1521. #define TRAD_HEADER "hosts/mipsmach3.h"
  1522. EOF
  1523.  
  1524.     ;;
  1525.   mips-*-netbsd*)
  1526.     COREFILE=netbsd-core.o
  1527.     ;;
  1528.   mips-dec-*)
  1529.     COREFILE=trad-core.o
  1530.     cat >> confdefs.h <<\EOF
  1531. #define TRAD_HEADER "hosts/decstation.h"
  1532. EOF
  1533.  
  1534.     ;;
  1535.   mips-sgi-irix4*)    COREFILE=irix-core.o ;;
  1536.   mips-sgi-irix5*)    COREFILE=irix-core.o ;;
  1537.   mips-*-mach3*)
  1538.     COREFILE=trad-core.o
  1539.     cat >> confdefs.h <<\EOF
  1540. #define TRAD_HEADER "hosts/mipsmach3.h"
  1541. EOF
  1542.  
  1543.     ;;
  1544.   mips-*-sysv4*)    ;;
  1545.   mips-*-sysv* | mips-*-riscos*)
  1546.     COREFILE=trad-core.o
  1547.     cat >> confdefs.h <<\EOF
  1548. #define TRAD_HEADER "hosts/riscos.h"
  1549. EOF
  1550.  
  1551.     ;;
  1552.   mips-sony-bsd*)
  1553.     COREFILE=trad-core.o
  1554.     cat >> confdefs.h <<\EOF
  1555. #define TRAD_HEADER "hosts/news-mips.h"
  1556. EOF
  1557.  
  1558.     ;;
  1559.   m68*-bull*-sysv*)
  1560.     COREFILE=trad-core.o
  1561.     cat >> confdefs.h <<\EOF
  1562. #define TRAD_HEADER "hosts/dpx2.h"
  1563. EOF
  1564.  
  1565.     ;;
  1566.   m68*-hp-hpux*)    COREFILE=hpux-core.o ;;
  1567.   m68*-hp-bsd*)
  1568.     COREFILE=trad-core.o
  1569.     cat >> confdefs.h <<\EOF
  1570. #define TRAD_HEADER "hosts/hp300bsd.h"
  1571. EOF
  1572.  
  1573.     ;;
  1574.   m68*-*-linux*)
  1575.     COREFILE=trad-core.o
  1576.     cat >> confdefs.h <<\EOF
  1577. #define TRAD_HEADER "hosts/m68klinux.h"
  1578. EOF
  1579.  
  1580.     ;;
  1581.   m68*-motorola-sysv*)
  1582.     COREFILE=trad-core.o
  1583.     cat >> confdefs.h <<\EOF
  1584. #define TRAD_HEADER "hosts/delta68.h"
  1585. EOF
  1586.  
  1587.     ;;
  1588.   m68*-sony-*)
  1589.     COREFILE=trad-core.o
  1590.     cat >> confdefs.h <<\EOF
  1591. #define TRAD_HEADER "hosts/news.h"
  1592. EOF
  1593.  
  1594.     ;;
  1595.   m68*-*-netbsd*)
  1596.     COREFILE=netbsd-core.o
  1597.     ;;
  1598.   m68*-apple-aux*)
  1599.     COREFILE=trad-core.o
  1600.     cat >> confdefs.h <<\EOF
  1601. #define TRAD_HEADER "hosts/m68kaux.h"
  1602. EOF
  1603.  
  1604.     ;;
  1605.   m88*-*-sysv4*)    ;;
  1606.   m88*-motorola-sysv*)    COREFILE=ptrace-core.o ;;
  1607.   m88*-*-mach3*)
  1608.     COREFILE=trad-core.o
  1609.     cat >> confdefs.h <<\EOF
  1610. #define TRAD_HEADER "hosts/m88kmach3.h"
  1611. EOF
  1612.  
  1613.     ;;
  1614.   ns32k-pc532-mach)
  1615.     COREFILE=trad-core.o
  1616.     cat >> confdefs.h <<\EOF
  1617. #define TRAD_HEADER "hosts/pc532mach.h"
  1618. EOF
  1619.  
  1620.     ;;
  1621.   ns32k-*-netbsd*)
  1622.     COREFILE=netbsd-core.o
  1623.     ;;
  1624.   rs6000-*-lynx*)    COREFILE=lynx-core.o ;;
  1625.   rs6000-*-aix4*)    COREFILE=rs6000-core.o ;;
  1626.   rs6000-*-*)        COREFILE=rs6000-core.o ;;
  1627.   powerpc-*-aix4*)    COREFILE=rs6000-core.o ;;
  1628.   powerpc-*-aix*)    COREFILE=rs6000-core.o ;;
  1629.   sparc-*-netbsd*)
  1630.     COREFILE=netbsd-core.o
  1631.     ;;
  1632.   tahoe-*-*)
  1633.     COREFILE=trad-core.o
  1634.     cat >> confdefs.h <<\EOF
  1635. #define TRAD_HEADER "hosts/tahoe.h"
  1636. EOF
  1637.  
  1638.     ;;
  1639.   vax-*-ultrix2*)
  1640.     COREFILE=trad-core.o
  1641.     cat >> confdefs.h <<\EOF
  1642. #define TRAD_HEADER "hosts/vaxult2.h"
  1643. EOF
  1644.  
  1645.     ;;
  1646.   vax-*-ultrix*)
  1647.     COREFILE=trad-core.o
  1648.     cat >> confdefs.h <<\EOF
  1649. #define TRAD_HEADER "hosts/vaxult2.h"
  1650. EOF
  1651.  
  1652.     ;;
  1653.   vax-*-*)
  1654.     COREFILE=trad-core.o
  1655.     cat >> confdefs.h <<\EOF
  1656. #define TRAD_HEADER "hosts/vaxbsd.h"
  1657. EOF
  1658.  
  1659.     ;;
  1660.   esac
  1661.  
  1662.   case "$COREFILE" in
  1663.   aix386-core.o)    COREFLAG=-DAIX386_CORE ;;
  1664.   hppabsd-core.o)    COREFLAG=-DHPPABSD_CORE ;;
  1665.   hpux-core.o)        COREFLAG=-DHPUX_CORE ;;
  1666.   irix-core.o)        COREFLAG=-DIRIX_CORE ;;
  1667.   lynx-core.o)        COREFLAG=-DLYNX_CORE ;;
  1668.   osf-core.o)        COREFLAG=-DOSF_CORE ;;
  1669.   ptrace-core.o)    COREFLAG=-DPTRACE_CORE ;;
  1670.   rs6000-core.o)    COREFLAG="$COREFLAG -DAIX_CORE" ;;
  1671.   trad-core.o)        COREFLAG="$COREFLAG -DTRAD_CORE" ;;
  1672.   esac
  1673.  
  1674.   # The ELF code uses the native <sys/procfs.h> to handle core files.
  1675.   # Define HAVE_SYS_PROCFS_H if the file exists and defines
  1676.   # prstatus_t.
  1677.   echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
  1678.   if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
  1679.   echo $ac_n "(cached) $ac_c" 1>&6
  1680. else
  1681.   cat > conftest.$ac_ext <<EOF
  1682. #line 1683 "configure"
  1683. #include "confdefs.h"
  1684. #include <sys/procfs.h>
  1685. int main() { return 0; }
  1686. int t() {
  1687. prstatus_t t;
  1688. ; return 0; }
  1689. EOF
  1690. if { (eval echo configure:1691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1691.   rm -rf conftest*
  1692.   bfd_cv_header_sys_procfs_h=yes
  1693. else
  1694.   rm -rf conftest*
  1695.   bfd_cv_header_sys_procfs_h=no
  1696. fi
  1697. rm -f conftest*
  1698.  
  1699. fi
  1700.  
  1701.   echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
  1702.   if test $bfd_cv_header_sys_procfs_h = yes; then
  1703.     cat >> confdefs.h <<\EOF
  1704. #define HAVE_SYS_PROCFS_H 1
  1705. EOF
  1706.  
  1707.   fi
  1708.  
  1709. fi
  1710.  
  1711.  
  1712.  
  1713. # target stuff:
  1714.  
  1715. # Canonicalize the secondary target names.
  1716. if test -n "$enable_targets" ; then
  1717.     for targ in `echo $enable_targets | sed 's/,/ /g'`
  1718.     do
  1719.     result=`$ac_config_sub $targ 2>/dev/null`
  1720.     if test -n "$result" ; then
  1721.         canon_targets="$canon_targets $result"
  1722.     else
  1723.         # Allow targets that config.sub doesn't recognize, like "all".
  1724.         canon_targets="$canon_targets $targ"
  1725.     fi
  1726.     done
  1727. fi
  1728.  
  1729. all_targets=false
  1730. defvec=
  1731. selvecs=
  1732. selarchs=
  1733. TDEFINES=
  1734. for targ in $target $canon_targets
  1735. do
  1736.     if test "x$targ" = "xall"; then
  1737.         all_targets=true
  1738.     else
  1739.     . $srcdir/config.bfd
  1740.     if test "x$targ" = "x$target"; then
  1741.         defvec=$targ_defvec
  1742.     fi
  1743.     selvecs="$selvecs $targ_defvec $targ_selvecs"
  1744.     selarchs="$selarchs $targ_archs"
  1745.     TDEFINES="$TDEFINES $targ_cflags"
  1746.     fi
  1747. done
  1748.  
  1749.  
  1750. # This processing still needs to be done if we're to decide properly whether
  1751. # 64-bit support needs to be compiled in.  Currently, it will be included if
  1752. # the default or any other explicitly requested target requires it; it
  1753. # will not be included on a 32-bit host if no 64-bit target is requested, and
  1754. # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
  1755. # used.
  1756.  
  1757. # uniq the default and selected vectors in all the configured targets.
  1758. f=""
  1759. for i in $selvecs ; do
  1760.     case " $f " in
  1761.     *" $i "*) ;;
  1762.     *) f="$f $i" ;;
  1763.     esac
  1764. done
  1765. selvecs="$f"
  1766.  
  1767. # uniq the architectures in all the configured targets.
  1768. f=""
  1769. for i in $selarchs ; do
  1770.     case " $f " in
  1771.     *" $i "*) ;;
  1772.     *) f="$f $i" ;;
  1773.     esac
  1774. done
  1775. selarchs="$f"
  1776.  
  1777. # Target backend .o files.
  1778. tb=
  1779.  
  1780. elf="elf.o elflink.o"
  1781.  
  1782. for vec in $selvecs
  1783. do
  1784.     case "$vec" in
  1785.     # This list is alphabetized to make it easy to compare
  1786.     # with the two vector lists in targets.c.
  1787.     a29kcoff_big_vec)        tb="$tb coff-a29k.o cofflink.o" ;;
  1788.     a_out_adobe_vec)        tb="$tb aout-adobe.o aout32.o" ;;
  1789.     amiga_vec)            tb="$tb amigaos.o amigaoslink.o" ;;
  1790.     armcoff_little_vec)        tb="$tb coff-arm.o cofflink.o " ;;
  1791.     armcoff_big_vec)        tb="$tb coff-arm.o cofflink.o " ;;
  1792.     armpe_little_vec)        tb="$tb pe-arm.o cofflink.o " ;;
  1793.     armpe_big_vec)        tb="$tb pe-arm.o cofflink.o " ;;
  1794.     armpei_little_vec)        tb="$tb pei-arm.o cofflink.o " ;;
  1795.     armpei_big_vec)        tb="$tb pei-arm.o cofflink.o " ;;
  1796.     aout0_big_vec)        tb="$tb aout0.o aout32.o" ;;
  1797.     aout_amiga_vec)             tb="$tb aout-amiga.o aout32.o stab-syms.o";;
  1798.     aout_arm_big_vec)        tb="$tb aout-arm.o aout32.o" ;;
  1799.     aout_arm_little_vec)    tb="$tb aout-arm.o aout32.o" ;;
  1800.     aout_mips_big_vec)        tb="$tb mipsbsd.o aout32.o" ;;
  1801.     aout_mips_little_vec)    tb="$tb mipsbsd.o aout32.o" ;;
  1802.     apollocoff_vec)        tb="$tb coff-apollo.o" ;;
  1803.     b_out_vec_big_host)        tb="$tb bout.o aout32.o" ;;
  1804.     b_out_vec_little_host)    tb="$tb bout.o aout32.o" ;;
  1805.     bfd_elf64_alpha_vec)    tb="$tb elf64-alpha.o elf64.o $elf"
  1806.                 target64=true ;;
  1807.     bfd_elf32_big_generic_vec)     tb="$tb elf32-gen.o elf32.o $elf" ;;
  1808.     bfd_elf32_bigmips_vec)     tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
  1809.     bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
  1810.                 target64=true ;;
  1811.     bfd_elf32_hppa_vec)        tb="$tb elf32-hppa.o elf32.o $elf" ;;
  1812.     bfd_elf32_i386_vec)        tb="$tb elf32-i386.o elf32.o $elf" ;;
  1813.     bfd_elf32_i860_vec)        tb="$tb elf32-i860.o elf32.o $elf" ;;
  1814.     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
  1815.     bfd_elf32_littlemips_vec)     tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
  1816.     bfd_elf64_littlemips_vec)     tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
  1817.                 target64=true ;;
  1818.     bfd_elf32_m68k_vec)        tb="$tb elf32-m68k.o elf32.o $elf" ;;
  1819.     bfd_elf32_m88k_vec)        tb="$tb elf32-m88k.o elf32.o $elf" ;;
  1820.     bfd_elf32_powerpc_vec)    tb="$tb elf32-ppc.o elf32.o $elf" ;;
  1821.     bfd_elf32_powerpcle_vec)    tb="$tb elf32-ppc.o elf32.o $elf" ;;
  1822.     bfd_elf32_sparc_vec)    tb="$tb elf32-sparc.o elf32.o $elf" ;;
  1823.     bfd_elf64_big_generic_vec)     tb="$tb elf64-gen.o elf64.o $elf"
  1824.                 target64=true ;;
  1825.     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
  1826.                 target64=true ;;
  1827.     bfd_elf64_sparc_vec)    tb="$tb elf64-sparc.o elf64.o $elf"
  1828.                 target64=true ;;
  1829.     cisco_core_vec)        tb="$tb cisco-core.o" ;;
  1830.     demo_64_vec)        tb="$tb demo64.o aout64.o"
  1831.                 target64=true ;;
  1832.     ecoff_big_vec)        tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
  1833.     ecoff_little_vec)        tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
  1834.     ecoffalpha_little_vec)    tb="$tb coff-alpha.o ecoff.o ecofflink.o"
  1835.                 target64=true ;;
  1836.     evax_alpha_vec)        tb="$tb evax-alpha.o evax-emh.o evax-egsd.o evax-etir.o evax-misc.o"
  1837.                  target64=true ;;
  1838.     h8300coff_vec)        tb="$tb coff-h8300.o reloc16.o" ;;
  1839.     h8500coff_vec)        tb="$tb coff-h8500.o reloc16.o" ;;
  1840.     host_aout_vec)        tb="$tb host-aout.o aout32.o" ;;
  1841.     hp300bsd_vec)        tb="$tb hp300bsd.o aout32.o" ;;
  1842.     hp300hpux_vec)        tb="$tb hp300hpux.o aout32.o" ;;
  1843.     i386aout_vec)        tb="$tb i386aout.o aout32.o" ;;
  1844.     i386bsd_vec)        tb="$tb i386bsd.o aout32.o" ;;
  1845.     i386coff_vec)        tb="$tb coff-i386.o cofflink.o" ;;
  1846.     i386dynix_vec)        tb="$tb i386dynix.o aout32.o" ;;
  1847.     i386freebsd_vec)        tb="$tb i386freebsd.o aout32.o" ;;
  1848.     i386msdos_vec)        tb="$tb i386msdos.o" ;;
  1849.     i386pe_vec)            tb="$tb pe-i386.o cofflink.o " ;;
  1850.     i386pei_vec)        tb="$tb pei-i386.o cofflink.o" ;;
  1851.     i386linux_vec)        tb="$tb i386linux.o aout32.o" ;;
  1852.     i386lynx_aout_vec)        tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
  1853.     i386lynx_coff_vec)        tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
  1854.     i386mach3_vec)        tb="$tb i386mach3.o aout32.o" ;;
  1855.     i386netbsd_vec)        tb="$tb i386netbsd.o aout32.o" ;;
  1856.     i386os9k_vec)        tb="$tb i386os9k.o aout32.o" ;;
  1857.     i860coff_vec)        tb="$tb coff-i860.o cofflink.o" ;;
  1858.     icoff_big_vec)        tb="$tb coff-i960.o cofflink.o" ;;
  1859.     icoff_little_vec)        tb="$tb coff-i960.o cofflink.o" ;;
  1860.     ieee_vec)            tb="$tb ieee.o" ;;
  1861.     m68kcoff_vec)        tb="$tb coff-m68k.o cofflink.o" ;;
  1862.     m68kcoffun_vec)        tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
  1863.     m68klinux_vec)        tb="$tb m68klinux.o aout32.o" ;;
  1864.     m68klynx_aout_vec)        tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
  1865.     m68klynx_coff_vec)        tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
  1866.     m68knetbsd_vec)        tb="$tb m68knetbsd.o aout32.o" ;;
  1867.     m68k4knetbsd_vec)        tb="$tb m68k4knetbsd.o aout32.o" ;;
  1868.     m68kaux_coff_vec)        tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
  1869.     m88kbcs_vec)        tb="$tb coff-m88k.o" ;;
  1870.     newsos3_vec)        tb="$tb newsos3.o aout32.o" ;;
  1871.     nlm32_i386_vec)        tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
  1872.     nlm32_sparc_vec)        tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
  1873.     nlm32_alpha_vec)        tb="$tb nlm32-alpha.o nlm32.o nlm.o"
  1874.                 target64=true ;;
  1875.     riscix_vec)            tb="$tb aout32.o riscix.o" ;;
  1876.     nlm32_powerpc_vec)        tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
  1877.     pc532netbsd_vec)        tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
  1878.     pc532machaout_vec)        tb="$tb pc532-mach.o aout-ns32k.o" ;;
  1879.     pmac_xcoff_vec)        tb="$tb coff-pmac.o xcofflink.o" ;;
  1880.     rs6000coff_vec)        tb="$tb coff-rs6000.o xcofflink.o" ;;
  1881.     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.o cofflink.o" ;;  
  1882.     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.o cofflink.o" ;;  
  1883.     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.o cofflink.o" ;;
  1884.     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.o cofflink.o" ;;
  1885.     ppcboot_vec)        tb="$tb ppcboot.o" ;;
  1886.     shcoff_vec)            tb="$tb coff-sh.o cofflink.o" ;;
  1887.     shlcoff_vec)        tb="$tb coff-sh.o cofflink.o" ;;
  1888.     som_vec)            tb="$tb som.o" ;;
  1889.     sparclynx_aout_vec)        tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
  1890.     sparclynx_coff_vec)        tb="$tb cf-sparclynx.o lynx-core.o" ;;
  1891.     sparcnetbsd_vec)        tb="$tb sparcnetbsd.o aout32.o" ;;
  1892.     sparccoff_vec)        tb="$tb coff-sparc.o" ;;
  1893.     srec_vec)            tb="$tb srec.o" ;;
  1894.     sunos_big_vec)        tb="$tb sunos.o aout32.o" ;;
  1895.     symbolsrec_vec)        tb="$tb srec.o" ;;
  1896.     tekhex_vec)            tb="$tb tekhex.o" ;;
  1897.     we32kcoff_vec)        tb="$tb coff-we32k.o" ;;
  1898.     z8kcoff_vec)        tb="$tb coff-z8k.o reloc16.o" ;;
  1899.     w65_vec)            tb="$tb coff-w65.o reloc16.o" ;;
  1900.     versados_vec)        tb="$tb versados.o" ;;
  1901.  
  1902.     "")            ;;
  1903.     *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
  1904.     esac
  1905. done
  1906.  
  1907. # Target architecture .o files.
  1908. ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
  1909.  
  1910. # Weed out duplicate .o files.
  1911. f=""
  1912. for i in $tb ; do
  1913.     case " $f " in
  1914.     *" $i "*) ;;
  1915.     *) f="$f $i" ;;
  1916.     esac
  1917. done
  1918. tb="$f"
  1919.  
  1920. f=""
  1921. for i in $ta ; do
  1922.     case " $f " in
  1923.     *" $i "*) ;;
  1924.     *) f="$f $i" ;;
  1925.     esac
  1926. done
  1927. ta="$f"
  1928.  
  1929. bfd_backends="$tb"
  1930. bfd_machines="$ta"
  1931.  
  1932. if test x${all_targets} = xtrue ; then
  1933.   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
  1934.   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
  1935.   selvecs=
  1936.   selarchs=
  1937. else    # all_targets is true
  1938.   # Only set these if they will be nonempty, for the clever echo.
  1939.   test -n "$selvecs" &&
  1940.     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
  1941.   test -n "$selarchs" &&
  1942.     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
  1943. fi    # all_targets is true
  1944.  
  1945. case ${host64}-${target64}-${want64} in
  1946.   *true*)
  1947.     wordsize=64
  1948.     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
  1949.     if test -z "$GCC" && test "$HOST_64BIT_LONG" = "0"; then
  1950.       echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
  1951.       echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
  1952.     fi
  1953.     ;;
  1954.   false-false-false)
  1955.     wordsize=32
  1956.     all_backends='$(BFD32_BACKENDS)'
  1957.     ;;
  1958. esac
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965. tdefaults=""
  1966. test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
  1967. test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
  1968. test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
  1969.  
  1970.  
  1971. for ac_func in valloc getpagesize
  1972. do
  1973. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1974. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1975.   echo $ac_n "(cached) $ac_c" 1>&6
  1976. else
  1977.   cat > conftest.$ac_ext <<EOF
  1978. #line 1979 "configure"
  1979. #include "confdefs.h"
  1980. /* System header to define __stub macros and hopefully few prototypes,
  1981.     which can conflict with char $ac_func(); below.  */
  1982. #include <assert.h>
  1983. /* Override any gcc2 internal prototype to avoid an error.  */
  1984. /* We use char because int might match the return type of a gcc2
  1985.     builtin and then its argument prototype would still apply.  */
  1986. char $ac_func();
  1987.  
  1988. int main() { t(); return 0; }
  1989. int t() {
  1990.  
  1991. /* The GNU C library defines this for functions which it implements
  1992.     to always fail with ENOSYS.  Some functions are actually named
  1993.     something starting with __ and the normal name is an alias.  */
  1994. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1995. choke me
  1996. #else
  1997. $ac_func();
  1998. #endif
  1999.  
  2000. ; return 0; }
  2001. EOF
  2002. if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2003.   rm -rf conftest*
  2004.   eval "ac_cv_func_$ac_func=yes"
  2005. else
  2006.   rm -rf conftest*
  2007.   eval "ac_cv_func_$ac_func=no"
  2008. fi
  2009. rm -f conftest*
  2010.  
  2011. fi
  2012. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2013.   echo "$ac_t""yes" 1>&6
  2014.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2015.   cat >> confdefs.h <<EOF
  2016. #define $ac_tr_func 1
  2017. EOF
  2018.  
  2019. else
  2020.   echo "$ac_t""no" 1>&6
  2021. fi
  2022. done
  2023.  
  2024. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  2025. if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
  2026.   echo $ac_n "(cached) $ac_c" 1>&6
  2027. else
  2028.   if test "$cross_compiling" = yes; then
  2029.   ac_cv_func_mmap=no
  2030. else
  2031. cat > conftest.$ac_ext <<EOF
  2032. #line 2033 "configure"
  2033. #include "confdefs.h"
  2034.  
  2035. /* Thanks to Mike Haertel and Jim Avera for this test. */
  2036. #include <sys/types.h>
  2037. #include <fcntl.h>
  2038. #include <sys/mman.h>
  2039.  
  2040. #ifndef HAVE_GETPAGESIZE
  2041. # include <sys/param.h>
  2042. # ifdef EXEC_PAGESIZE
  2043. #  define getpagesize() EXEC_PAGESIZE
  2044. # else
  2045. #  ifdef NBPG
  2046. #   define getpagesize() NBPG * CLSIZE
  2047. #   ifndef CLSIZE
  2048. #    define CLSIZE 1
  2049. #   endif
  2050. #  else
  2051. #   ifdef NBPC
  2052. #    define getpagesize() NBPC
  2053. #   else
  2054. #    define getpagesize() PAGESIZE /* SVR4 */
  2055. #   endif
  2056. #  endif
  2057. # endif
  2058. #endif
  2059.  
  2060. #ifndef HAVE_VALLOC
  2061. # define valloc malloc
  2062. #endif
  2063.  
  2064. #ifdef __cplusplus
  2065. extern "C" { void *valloc(unsigned), *malloc(unsigned); }
  2066. #else
  2067. char *valloc(), *malloc();
  2068. #endif
  2069.  
  2070. int
  2071. main()
  2072. {
  2073.   char *buf1, *buf2, *buf3;
  2074.   int i = getpagesize(), j;
  2075.   int i2 = i * 2;
  2076.   int fd;
  2077.  
  2078.   buf1 = (char *)valloc(i2);
  2079.   buf2 = (char *)valloc(i);
  2080.   buf3 = (char *)malloc(i2);
  2081.   for (j = 0; j < i2; ++j)
  2082.     *(buf1 + j) = rand();
  2083.   fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
  2084.   write(fd, buf1, i2);
  2085.   mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
  2086.   for (j = 0; j < i; ++j)
  2087.     if (*(buf1 + j) != *(buf2 + j))
  2088.       exit(1);
  2089.   lseek(fd, (long)i, 0);
  2090.   read(fd, buf2, i); /* read into mapped memory -- file should not change */
  2091.   /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
  2092.   lseek(fd, (long)0, 0);
  2093.   read(fd, buf3, i2);
  2094.   for (j = 0; j < i2; ++j)
  2095.     if (*(buf1 + j) != *(buf3 + j))
  2096.       exit(1);
  2097.   exit(0);
  2098. }
  2099.  
  2100. EOF
  2101. { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2102. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2103.   ac_cv_func_mmap=yes
  2104. else
  2105.   ac_cv_func_mmap=no
  2106. fi
  2107. fi
  2108. rm -fr conftest*
  2109. fi
  2110.  
  2111. echo "$ac_t""$ac_cv_func_mmap" 1>&6
  2112. if test $ac_cv_func_mmap = yes; then
  2113.   cat >> confdefs.h <<\EOF
  2114. #define HAVE_MMAP 1
  2115. EOF
  2116.  
  2117. fi
  2118.  
  2119. for ac_func in madvise mprotect
  2120. do
  2121. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2122. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2123.   echo $ac_n "(cached) $ac_c" 1>&6
  2124. else
  2125.   cat > conftest.$ac_ext <<EOF
  2126. #line 2127 "configure"
  2127. #include "confdefs.h"
  2128. /* System header to define __stub macros and hopefully few prototypes,
  2129.     which can conflict with char $ac_func(); below.  */
  2130. #include <assert.h>
  2131. /* Override any gcc2 internal prototype to avoid an error.  */
  2132. /* We use char because int might match the return type of a gcc2
  2133.     builtin and then its argument prototype would still apply.  */
  2134. char $ac_func();
  2135.  
  2136. int main() { t(); return 0; }
  2137. int t() {
  2138.  
  2139. /* The GNU C library defines this for functions which it implements
  2140.     to always fail with ENOSYS.  Some functions are actually named
  2141.     something starting with __ and the normal name is an alias.  */
  2142. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2143. choke me
  2144. #else
  2145. $ac_func();
  2146. #endif
  2147.  
  2148. ; return 0; }
  2149. EOF
  2150. if { (eval echo configure:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2151.   rm -rf conftest*
  2152.   eval "ac_cv_func_$ac_func=yes"
  2153. else
  2154.   rm -rf conftest*
  2155.   eval "ac_cv_func_$ac_func=no"
  2156. fi
  2157. rm -f conftest*
  2158.  
  2159. fi
  2160. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2161.   echo "$ac_t""yes" 1>&6
  2162.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2163.   cat >> confdefs.h <<EOF
  2164. #define $ac_tr_func 1
  2165. EOF
  2166.  
  2167. else
  2168.   echo "$ac_t""no" 1>&6
  2169. fi
  2170. done
  2171.  
  2172. case ${want_mmap}+${ac_cv_func_mmap} in
  2173.   true+yes )  cat >> confdefs.h <<\EOF
  2174. #define USE_MMAP 1
  2175. EOF
  2176.  ;;
  2177. esac
  2178.  
  2179. rm -f doc/config.status
  2180. trap '' 1 2 15
  2181. cat > confcache <<\EOF
  2182. # This file is a shell script that caches the results of configure
  2183. # tests run on this system so they can be shared between configure
  2184. # scripts and configure runs.  It is not useful on other systems.
  2185. # If it contains results you don't want to keep, you may remove or edit it.
  2186. #
  2187. # By default, configure uses ./config.cache as the cache file,
  2188. # creating it if it does not exist already.  You can give configure
  2189. # the --cache-file=FILE option to use a different cache file; that is
  2190. # what configure does when it calls configure scripts in
  2191. # subdirectories, so they share the cache.
  2192. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2193. # config.status only pays attention to the cache file if you give it the
  2194. # --recheck option to rerun configure.
  2195. #
  2196. EOF
  2197. # Ultrix sh set writes to stderr and can't be redirected directly,
  2198. # and sets the high bit in the cache file unless we assign to the vars.
  2199. (set) 2>&1 |
  2200.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2201.   >> confcache
  2202. if cmp -s $cache_file confcache; then
  2203.   :
  2204. else
  2205.   if test -w $cache_file; then
  2206.     echo "updating cache $cache_file"
  2207.     cat confcache > $cache_file
  2208.   else
  2209.     echo "not updating unwritable cache $cache_file"
  2210.   fi
  2211. fi
  2212. rm -f confcache
  2213.  
  2214. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2215.  
  2216. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2217. # Let make expand exec_prefix.
  2218. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2219.  
  2220. # Any assignment to VPATH causes Sun make to only execute
  2221. # the first set of double-colon rules, so remove it if not needed.
  2222. # If there is a colon in the path, we need to keep it.
  2223. if test "x$srcdir" = x.; then
  2224.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2225. fi
  2226.  
  2227. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2228.  
  2229. DEFS=-DHAVE_CONFIG_H
  2230.  
  2231. # Without the "./", some shells look in PATH for config.status.
  2232. : ${CONFIG_STATUS=./config.status}
  2233.  
  2234. echo creating $CONFIG_STATUS
  2235. # Some systems, like AmigaOS, won't allow you to remove a script that is
  2236. # being executed, so just move it out of the way instead.
  2237. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  2238. cat > $CONFIG_STATUS <<EOF
  2239. #! /bin/sh
  2240. # Generated automatically by configure.
  2241. # Run this file to recreate the current configuration.
  2242. # This directory was configured as follows,
  2243. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2244. #
  2245. # $0 $ac_configure_args
  2246. #
  2247. # Compiler output produced by configure, useful for debugging
  2248. # configure, is in ./config.log if it exists.
  2249.  
  2250. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2251. for ac_option
  2252. do
  2253.   case "\$ac_option" in
  2254.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2255.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2256.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2257.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2258.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  2259.     exit 0 ;;
  2260.   -help | --help | --hel | --he | --h)
  2261.     echo "\$ac_cs_usage"; exit 0 ;;
  2262.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2263.   esac
  2264. done
  2265.  
  2266. ac_given_srcdir=$srcdir
  2267. ac_given_INSTALL="$INSTALL"
  2268.  
  2269. trap 'rm -fr `echo "Makefile doc/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2270. EOF
  2271. cat >> $CONFIG_STATUS <<EOF
  2272.  
  2273. # Protect against being on the right side of a sed subst in config.status.
  2274. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2275.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2276. $ac_vpsub
  2277. $extrasub
  2278. s%@CFLAGS@%$CFLAGS%g
  2279. s%@CPPFLAGS@%$CPPFLAGS%g
  2280. s%@CXXFLAGS@%$CXXFLAGS%g
  2281. s%@DEFS@%$DEFS%g
  2282. s%@LDFLAGS@%$LDFLAGS%g
  2283. s%@LIBS@%$LIBS%g
  2284. s%@exec_prefix@%$exec_prefix%g
  2285. s%@prefix@%$prefix%g
  2286. s%@program_transform_name@%$program_transform_name%g
  2287. s%@bindir@%$bindir%g
  2288. s%@sbindir@%$sbindir%g
  2289. s%@libexecdir@%$libexecdir%g
  2290. s%@datadir@%$datadir%g
  2291. s%@sysconfdir@%$sysconfdir%g
  2292. s%@sharedstatedir@%$sharedstatedir%g
  2293. s%@localstatedir@%$localstatedir%g
  2294. s%@libdir@%$libdir%g
  2295. s%@includedir@%$includedir%g
  2296. s%@oldincludedir@%$oldincludedir%g
  2297. s%@infodir@%$infodir%g
  2298. s%@guidedir@%$guidedir%g
  2299. s%@psdir@%$psdir%g
  2300. s%@dvidir@%$dvidir%g
  2301. s%@mandir@%$mandir%g
  2302. s%@host@%$host%g
  2303. s%@host_alias@%$host_alias%g
  2304. s%@host_cpu@%$host_cpu%g
  2305. s%@host_vendor@%$host_vendor%g
  2306. s%@host_os@%$host_os%g
  2307. s%@target@%$target%g
  2308. s%@target_alias@%$target_alias%g
  2309. s%@target_cpu@%$target_cpu%g
  2310. s%@target_vendor@%$target_vendor%g
  2311. s%@target_os@%$target_os%g
  2312. s%@build@%$build%g
  2313. s%@build_alias@%$build_alias%g
  2314. s%@build_cpu@%$build_cpu%g
  2315. s%@build_vendor@%$build_vendor%g
  2316. s%@build_os@%$build_os%g
  2317. s%@CC@%$CC%g
  2318. s%@HDEFINES@%$HDEFINES%g
  2319. s%@AR@%$AR%g
  2320. s%@RANLIB@%$RANLIB%g
  2321. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2322. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2323. s%@ALLLIBS@%$ALLLIBS%g
  2324. s%@PICFLAG@%$PICFLAG%g
  2325. s%@SHLIB@%$SHLIB%g
  2326. s%@SHLIB_CC@%$SHLIB_CC%g
  2327. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  2328. s%@COMMON_SHLIB@%$COMMON_SHLIB%g
  2329. s%@PICLIST@%$PICLIST%g
  2330. s%@SHLINK@%$SHLINK%g
  2331. s%@HOST_64BIT_LONG@%$HOST_64BIT_LONG%g
  2332. s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
  2333. s%@CPP@%$CPP%g
  2334. s%@COREFILE@%$COREFILE%g
  2335. s%@COREFLAG@%$COREFLAG%g
  2336. s%@TDEFINES@%$TDEFINES%g
  2337. s%@wordsize@%$wordsize%g
  2338. s%@all_backends@%$all_backends%g
  2339. s%@bfd_backends@%$bfd_backends%g
  2340. s%@bfd_machines@%$bfd_machines%g
  2341. s%@tdefaults@%$tdefaults%g
  2342.  
  2343. CEOF
  2344. EOF
  2345. cat >> $CONFIG_STATUS <<EOF
  2346.  
  2347. CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
  2348. EOF
  2349. cat >> $CONFIG_STATUS <<\EOF
  2350. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2351.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2352.   case "$ac_file" in
  2353.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2354.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2355.   *) ac_file_in="${ac_file}.in" ;;
  2356.   esac
  2357.  
  2358.   # Adjust relative srcdir, etc. for subdirectories.
  2359.  
  2360.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2361.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2362.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2363.     # The file is in a subdirectory.
  2364.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2365.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2366.     # A "../" for each directory in $ac_dir_suffix.
  2367.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2368.   else
  2369.     ac_dir_suffix= ac_dots=
  2370.   fi
  2371.  
  2372.   case "$ac_given_srcdir" in
  2373.   .)  srcdir=.
  2374.       if test -z "$ac_dots"; then top_srcdir=.
  2375.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2376.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2377.   *) # Relative path.
  2378.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2379.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2380.   esac
  2381.  
  2382.   case "$ac_given_INSTALL" in
  2383.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2384.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2385.   esac
  2386.   echo creating "$ac_file"
  2387.   rm -f "$ac_file"
  2388.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2389.   case "$ac_file" in
  2390.   *Makefile*) ac_comsub="1i\\
  2391. # $configure_input" ;;
  2392.   *) ac_comsub= ;;
  2393.   esac
  2394.   sed -e "$ac_comsub
  2395. s%@configure_input@%$configure_input%g
  2396. s%@srcdir@%$srcdir%g
  2397. s%@top_srcdir@%$top_srcdir%g
  2398. s%@INSTALL@%$INSTALL%g
  2399. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2400. fi; done
  2401. rm -f conftest.subs
  2402.  
  2403. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2404. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2405. #
  2406. # ac_d sets the value in "#define NAME VALUE" lines.
  2407. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2408. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2409. ac_dC='\3'
  2410. ac_dD='%g'
  2411. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2412. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2413. ac_uB='\([     ]\)%\1#\2define\3'
  2414. ac_uC=' '
  2415. ac_uD='\4%g'
  2416. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2417. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2418. ac_eB='$%\1#\2define\3'
  2419. ac_eC=' '
  2420. ac_eD='%g'
  2421.  
  2422. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
  2423. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2424.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2425.   case "$ac_file" in
  2426.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2427.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2428.   *) ac_file_in="${ac_file}.in" ;;
  2429.   esac
  2430.  
  2431.   echo creating $ac_file
  2432.  
  2433.   rm -f conftest.frag conftest.in conftest.out
  2434.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2435.  
  2436. EOF
  2437.  
  2438. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2439. # the proper values into config.h.in to produce config.h.  And first:
  2440. # Protect against being on the right side of a sed subst in config.status.
  2441. # Protect against being in an unquoted here document in config.status.
  2442. rm -f conftest.vals
  2443. cat > conftest.hdr <<\EOF
  2444. s/[\\&%]/\\&/g
  2445. s%[\\$`]%\\&%g
  2446. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2447. s%ac_d%ac_u%gp
  2448. s%ac_u%ac_e%gp
  2449. EOF
  2450. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2451. rm -f conftest.hdr
  2452.  
  2453. # This sed command replaces #undef with comments.  This is necessary, for
  2454. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2455. # on some systems where configure will not decide to define it.
  2456. cat >> conftest.vals <<\EOF
  2457. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2458. EOF
  2459.  
  2460. # Break up conftest.vals because some shells have a limit on
  2461. # the size of here documents, and old seds have small limits too.
  2462. # Maximum number of lines to put in a single here document.
  2463. ac_max_here_lines=12
  2464.  
  2465. rm -f conftest.tail
  2466. while :
  2467. do
  2468.   ac_lines=`grep -c . conftest.vals`
  2469.   # grep -c gives empty output for an empty file on some AIX systems.
  2470.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2471.   # Write a limited-size here document to conftest.frag.
  2472.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2473.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2474.   echo 'CEOF
  2475.   sed -f conftest.frag conftest.in > conftest.out
  2476.   rm -f conftest.in
  2477.   mv conftest.out conftest.in
  2478. ' >> $CONFIG_STATUS
  2479.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2480.   rm -f conftest.vals
  2481.   mv conftest.tail conftest.vals
  2482. done
  2483. rm -f conftest.vals
  2484.  
  2485. cat >> $CONFIG_STATUS <<\EOF
  2486.   rm -f conftest.frag conftest.h
  2487.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2488.   cat conftest.in >> conftest.h
  2489.   rm -f conftest.in
  2490.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2491.     echo "$ac_file is unchanged"
  2492.     rm -f conftest.h
  2493.   else
  2494.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2495.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2496.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2497.       # The file is in a subdirectory.
  2498.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2499.     fi
  2500.     rm -f $ac_file
  2501.     mv conftest.h $ac_file
  2502.   fi
  2503. fi; done
  2504.  
  2505.  
  2506. case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
  2507. exit 0
  2508. EOF
  2509. chmod +x $CONFIG_STATUS
  2510. rm -f CONFIG.STATUS.old
  2511. rm -fr confdefs* $ac_clean_files
  2512. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2513.  
  2514.