home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / gas / configure < prev    next >
Text File  |  1996-10-01  |  79KB  |  2,673 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-bfd-assembler  use BFD back end for writing object files"
  16. ac_help="$ac_help
  17.     targets            alternative target configurations besides the primary"
  18. ac_help="$ac_help
  19.   --enable-shared         build shared BFD library"
  20.  
  21. # Initialize some variables set by options.
  22. # The variables have the same names as the options, with
  23. # dashes changed to underlines.
  24. build=NONE
  25. cache_file=./config.cache
  26. exec_prefix=NONE
  27. host=NONE
  28. no_create=
  29. nonopt=NONE
  30. no_recursion=
  31. prefix=NONE
  32. program_prefix=NONE
  33. program_suffix=NONE
  34. program_transform_name=s,x,x,
  35. silent=
  36. site=
  37. srcdir=
  38. target=NONE
  39. verbose=
  40. x_includes=NONE
  41. x_libraries=NONE
  42. bindir='${exec_prefix}/bin'
  43. sbindir='${exec_prefix}/sbin'
  44. libexecdir='${exec_prefix}/libexec'
  45. datadir='${prefix}/share'
  46. sysconfdir='${prefix}/etc'
  47. sharedstatedir='${prefix}/com'
  48. localstatedir='${prefix}/var'
  49. libdir='${exec_prefix}/lib'
  50. includedir='${prefix}/include'
  51. oldincludedir='/usr/include'
  52. infodir='${prefix}/info'
  53. guidedir='${prefix}/guide'
  54. psdir='${prefix}/ps'
  55. dvidir='${prefix}/dvi'
  56. mandir='${prefix}/man'
  57.  
  58. # Initialize some other variables.
  59. subdirs=
  60. MFLAGS= MAKEFLAGS=
  61.  
  62. ac_prev=
  63. for ac_option
  64. do
  65.  
  66.   # If the previous option needs an argument, assign it.
  67.   if test -n "$ac_prev"; then
  68.     eval "$ac_prev=\$ac_option"
  69.     ac_prev=
  70.     continue
  71.   fi
  72.  
  73.   case "$ac_option" in
  74.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  75.   *) ac_optarg= ;;
  76.   esac
  77.  
  78.   # Accept the important Cygnus configure options, so we can diagnose typos.
  79.  
  80.   case "$ac_option" in
  81.  
  82.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  83.     ac_prev=bindir ;;
  84.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  85.     bindir="$ac_optarg" ;;
  86.  
  87.   -build | --build | --buil | --bui | --bu)
  88.     ac_prev=build ;;
  89.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  90.     build="$ac_optarg" ;;
  91.  
  92.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  93.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  94.     ac_prev=cache_file ;;
  95.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  96.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  97.     cache_file="$ac_optarg" ;;
  98.  
  99.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  100.     ac_prev=datadir ;;
  101.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  102.   | --da=*)
  103.     datadir="$ac_optarg" ;;
  104.  
  105.   -disable-* | --disable-*)
  106.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  107.     # Reject names that are not valid shell variable names.
  108.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  109.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  110.     fi
  111.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  112.     eval "enable_${ac_feature}=no" ;;
  113.  
  114.   -enable-* | --enable-*)
  115.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  116.     # Reject names that are not valid shell variable names.
  117.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  118.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  119.     fi
  120.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  121.     case "$ac_option" in
  122.       *=*) ;;
  123.       *) ac_optarg=yes ;;
  124.     esac
  125.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  126.  
  127.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  128.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  129.   | --exec | --exe | --ex)
  130.     ac_prev=exec_prefix ;;
  131.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  132.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  133.   | --exec=* | --exe=* | --ex=*)
  134.     exec_prefix="$ac_optarg" ;;
  135.  
  136.   -gas | --gas | --ga | --g)
  137.     # Obsolete; use --with-gas.
  138.     with_gas=yes ;;
  139.  
  140.   -help | --help | --hel | --he)
  141.     # Omit some internal or obsolete options to make the list less imposing.
  142.     # This message is too long to be a string in the A/UX 3.1 sh.
  143.     cat << EOF
  144. Usage: configure [options] [host]
  145. Options: [defaults in brackets after descriptions]
  146. Configuration:
  147.   --cache-file=FILE       cache test results in FILE
  148.   --help                  print this message
  149.   --no-create             do not create output files
  150.   --quiet, --silent       do not print \`checking...' messages
  151.   --version               print the version of autoconf that created configure
  152. Directory and file names:
  153.   --prefix=PREFIX         install architecture-independent files in PREFIX
  154.                           [$ac_default_prefix]
  155.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  156.                           [same as prefix]
  157.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  158.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  159.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  160.   --datadir=DIR           read-only architecture-independent data in DIR
  161.                           [PREFIX/share]
  162.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  163.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  164.                           [PREFIX/com]
  165.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  166.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  167.   --includedir=DIR        C header files in DIR [PREFIX/include]
  168.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  169.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  170.   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  171.   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  172.   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  173.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  174.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  175.   --program-prefix=PREFIX prepend PREFIX to installed program names
  176.   --program-suffix=SUFFIX append SUFFIX to installed program names
  177.   --program-transform-name=PROGRAM
  178.                           run sed PROGRAM on installed program names
  179. EOF
  180.     cat << EOF
  181. Host type:
  182.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  183.   --host=HOST             configure for HOST [guessed]
  184.   --target=TARGET         configure for TARGET [TARGET=HOST]
  185. Features and packages:
  186.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  187.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  188.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  189.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  190.   --x-includes=DIR        X include files are in DIR
  191.   --x-libraries=DIR       X library files are in DIR
  192. EOF
  193.     if test -n "$ac_help"; then
  194.       echo "--enable and --with options recognized:$ac_help"
  195.     fi
  196.     exit 0 ;;
  197.  
  198.   -host | --host | --hos | --ho)
  199.     ac_prev=host ;;
  200.   -host=* | --host=* | --hos=* | --ho=*)
  201.     host="$ac_optarg" ;;
  202.  
  203.   -includedir | --includedir | --includedi | --included | --include \
  204.   | --includ | --inclu | --incl | --inc)
  205.     ac_prev=includedir ;;
  206.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  207.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  208.     includedir="$ac_optarg" ;;
  209.  
  210.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  211.     ac_prev=infodir ;;
  212.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  213.     infodir="$ac_optarg" ;;
  214.  
  215.  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  216.    ac_prev=guidedir ;;
  217.  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  218.  
  219.  -psdir | --psdir | --psdi | --psd | --ps)
  220.    ac_prev=psdir ;;
  221.  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  222.  
  223.  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  224.    ac_prev=dvidir ;;
  225.  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  226.  
  227.   -libdir | --libdir | --libdi | --libd)
  228.     ac_prev=libdir ;;
  229.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  230.     libdir="$ac_optarg" ;;
  231.  
  232.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  233.   | --libexe | --libex | --libe)
  234.     ac_prev=libexecdir ;;
  235.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  236.   | --libexe=* | --libex=* | --libe=*)
  237.     libexecdir="$ac_optarg" ;;
  238.  
  239.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  240.   | --localstate | --localstat | --localsta | --localst \
  241.   | --locals | --local | --loca | --loc | --lo)
  242.     ac_prev=localstatedir ;;
  243.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  244.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  245.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  246.     localstatedir="$ac_optarg" ;;
  247.  
  248.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  249.     ac_prev=mandir ;;
  250.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  251.     mandir="$ac_optarg" ;;
  252.  
  253.   -nfp | --nfp | --nf)
  254.     # Obsolete; use --without-fp.
  255.     with_fp=no ;;
  256.  
  257.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  258.   | --no-cr | --no-c)
  259.     no_create=yes ;;
  260.  
  261.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  262.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  263.     no_recursion=yes ;;
  264.  
  265.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  266.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  267.   | --oldin | --oldi | --old | --ol | --o)
  268.     ac_prev=oldincludedir ;;
  269.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  270.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  271.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  272.     oldincludedir="$ac_optarg" ;;
  273.  
  274.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  275.     ac_prev=prefix ;;
  276.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  277.     prefix="$ac_optarg" ;;
  278.  
  279.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  280.   | --program-pre | --program-pr | --program-p)
  281.     ac_prev=program_prefix ;;
  282.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  283.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  284.     program_prefix="$ac_optarg" ;;
  285.  
  286.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  287.   | --program-suf | --program-su | --program-s)
  288.     ac_prev=program_suffix ;;
  289.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  290.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  291.     program_suffix="$ac_optarg" ;;
  292.  
  293.   -program-transform-name | --program-transform-name \
  294.   | --program-transform-nam | --program-transform-na \
  295.   | --program-transform-n | --program-transform- \
  296.   | --program-transform | --program-transfor \
  297.   | --program-transfo | --program-transf \
  298.   | --program-trans | --program-tran \
  299.   | --progr-tra | --program-tr | --program-t)
  300.     ac_prev=program_transform_name ;;
  301.   -program-transform-name=* | --program-transform-name=* \
  302.   | --program-transform-nam=* | --program-transform-na=* \
  303.   | --program-transform-n=* | --program-transform-=* \
  304.   | --program-transform=* | --program-transfor=* \
  305.   | --program-transfo=* | --program-transf=* \
  306.   | --program-trans=* | --program-tran=* \
  307.   | --progr-tra=* | --program-tr=* | --program-t=*)
  308.     program_transform_name="$ac_optarg" ;;
  309.  
  310.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  311.   | -silent | --silent | --silen | --sile | --sil)
  312.     silent=yes ;;
  313.  
  314.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  315.     ac_prev=sbindir ;;
  316.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  317.   | --sbi=* | --sb=*)
  318.     sbindir="$ac_optarg" ;;
  319.  
  320.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  321.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  322.   | --sharedst | --shareds | --shared | --share | --shar \
  323.   | --sha | --sh)
  324.     ac_prev=sharedstatedir ;;
  325.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  326.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  327.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  328.   | --sha=* | --sh=*)
  329.     sharedstatedir="$ac_optarg" ;;
  330.  
  331.   -site | --site | --sit)
  332.     ac_prev=site ;;
  333.   -site=* | --site=* | --sit=*)
  334.     site="$ac_optarg" ;;
  335.  
  336.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  337.     ac_prev=srcdir ;;
  338.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  339.     srcdir="$ac_optarg" ;;
  340.  
  341.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  342.   | --syscon | --sysco | --sysc | --sys | --sy)
  343.     ac_prev=sysconfdir ;;
  344.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  345.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  346.     sysconfdir="$ac_optarg" ;;
  347.  
  348.   -target | --target | --targe | --targ | --tar | --ta | --t)
  349.     ac_prev=target ;;
  350.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  351.     target="$ac_optarg" ;;
  352.  
  353.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  354.     verbose=yes ;;
  355.  
  356.   -version | --version | --versio | --versi | --vers)
  357.     echo "configure generated by autoconf version 2.10"
  358.     exit 0 ;;
  359.  
  360.   -with-* | --with-*)
  361.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  362.     # Reject names that are not valid shell variable names.
  363.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  364.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  365.     fi
  366.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  367.     case "$ac_option" in
  368.       *=*) ;;
  369.       *) ac_optarg=yes ;;
  370.     esac
  371.     eval "with_${ac_package}='$ac_optarg'" ;;
  372.  
  373.   -without-* | --without-*)
  374.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  375.     # Reject names that are not valid shell variable names.
  376.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  377.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  378.     fi
  379.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  380.     eval "with_${ac_package}=no" ;;
  381.  
  382.   --x)
  383.     # Obsolete; use --with-x.
  384.     with_x=yes ;;
  385.  
  386.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  387.   | --x-incl | --x-inc | --x-in | --x-i)
  388.     ac_prev=x_includes ;;
  389.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  390.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  391.     x_includes="$ac_optarg" ;;
  392.  
  393.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  394.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  395.     ac_prev=x_libraries ;;
  396.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  397.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  398.     x_libraries="$ac_optarg" ;;
  399.  
  400.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  401.     ;;
  402.  
  403.   *)
  404.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  405.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  406.     fi
  407.     if test "x$nonopt" != xNONE; then
  408.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  409.     fi
  410.     nonopt="$ac_option"
  411.     ;;
  412.  
  413.   esac
  414. done
  415.  
  416. if test -n "$ac_prev"; then
  417.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  418. fi
  419.  
  420. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  421.  
  422. # File descriptor usage:
  423. # 0 standard input
  424. # 1 file creation
  425. # 2 errors and warnings
  426. # 3 some systems may open it to /dev/tty
  427. # 4 used on the Kubota Titan
  428. # 6 checking for... messages and results
  429. # 5 compiler messages saved in config.log
  430. if test "$silent" = yes; then
  431.   exec 6>/dev/null
  432. else
  433.   exec 6>&1
  434. fi
  435. exec 5>./config.log
  436.  
  437. echo "\
  438. This file contains any messages produced by compilers while
  439. running configure, to aid debugging if configure makes a mistake.
  440. " 1>&5
  441.  
  442. # Strip out --no-create and --no-recursion so they do not pile up.
  443. # Also quote any args containing shell metacharacters.
  444. ac_configure_args=
  445. for ac_arg
  446. do
  447.   case "$ac_arg" in
  448.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  449.   | --no-cr | --no-c) ;;
  450.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  451.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  452.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  453.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  454.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  455.   esac
  456. done
  457.  
  458. # NLS nuisances.
  459. # Only set LANG and LC_ALL to C if already set.
  460. # These must not be set unconditionally because not all systems understand
  461. # e.g. LANG=C (notably SCO).
  462. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  463. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  464.  
  465. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  466. rm -rf conftest* confdefs.h
  467. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  468. echo > confdefs.h
  469.  
  470. # A filename unique to this package, relative to the directory that
  471. # configure is in, which we can look for to find out if srcdir is correct.
  472. ac_unique_file=as.h
  473.  
  474. # Find the source files, if location was not specified.
  475. if test -z "$srcdir"; then
  476.   ac_srcdir_defaulted=yes
  477.   # Try the directory containing this script, then its parent.
  478.   ac_prog=$0
  479.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  480.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  481.   srcdir=$ac_confdir
  482.   if test ! -r $srcdir/$ac_unique_file; then
  483.     srcdir=..
  484.   fi
  485. else
  486.   ac_srcdir_defaulted=no
  487. fi
  488. if test ! -r $srcdir/$ac_unique_file; then
  489.   if test "$ac_srcdir_defaulted" = yes; then
  490.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  491.   else
  492.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  493.   fi
  494. fi
  495. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  496.  
  497. # Prefer explicitly selected file to automatically selected ones.
  498. if test -z "$CONFIG_SITE"; then
  499.   if test "x$prefix" != xNONE; then
  500.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  501.   else
  502.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  503.   fi
  504. fi
  505. for ac_site_file in $CONFIG_SITE; do
  506.   if test -r "$ac_site_file"; then
  507.     echo "loading site script $ac_site_file"
  508.     . "$ac_site_file"
  509.   fi
  510. done
  511.  
  512. if test -r "$cache_file"; then
  513.   echo "loading cache $cache_file"
  514.   . $cache_file
  515. else
  516.   echo "creating cache $cache_file"
  517.   > $cache_file
  518. fi
  519.  
  520. ac_ext=c
  521. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  522. ac_cpp='$CPP $CPPFLAGS'
  523. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  524. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  525.  
  526. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  527.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  528.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  529.     ac_n= ac_c='
  530. ' ac_t='    '
  531.   else
  532.     ac_n=-n ac_c= ac_t=
  533.   fi
  534. else
  535.   ac_n= ac_c='\c' ac_t=
  536. fi
  537.  
  538. user_bfd_gas=
  539. # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
  540. if test "${enable_bfd_assembler+set}" = set; then
  541.   enableval="$enable_bfd_assembler"
  542.   case "${enableval}" in
  543.   yes) need_bfd=yes user_bfd_gas=yes ;;
  544.   no)  user_bfd_gas=no ;;
  545.   *)   { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
  546. esac
  547. fi
  548. # Check whether --enable-targets or --disable-targets was given.
  549. if test "${enable_targets+set}" = set; then
  550.   enableval="$enable_targets"
  551.   case "${enableval}" in
  552.   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
  553.         ;;
  554.   no)        enable_targets= ;;
  555.   *)        enable_targets=$enableval ;;
  556. esac
  557. fi
  558. # Check whether --enable-shared or --disable-shared was given.
  559. if test "${enable_shared+set}" = set; then
  560.   enableval="$enable_shared"
  561.   case "${enableval}" in
  562.   yes) shared=true shared_bfd=true shared_opcodes=true ;;
  563.   no)  shared=false ;;
  564.   *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
  565.   *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
  566.   *bfd*) shared=true shared_bfd=true ;;
  567.   *opcodes*) shared=true shared_opcodes=true ;;
  568.   *) shared=false ;;
  569. esac
  570. fi
  571.  
  572. # Generate a header file -- gets more post-processing by Makefile later.
  573.  
  574.  
  575. ac_aux_dir=
  576. for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
  577.   if test -f $ac_dir/install-sh; then
  578.     ac_aux_dir=$ac_dir
  579.     ac_install_sh="$ac_aux_dir/install-sh -c"
  580.     break
  581.   elif test -f $ac_dir/install.sh; then
  582.     ac_aux_dir=$ac_dir
  583.     ac_install_sh="$ac_aux_dir/install.sh -c"
  584.     break
  585.   fi
  586. done
  587. if test -z "$ac_aux_dir"; then
  588.   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
  589. fi
  590. ac_config_guess=$ac_aux_dir/config.guess
  591. ac_config_sub=$ac_aux_dir/config.sub
  592. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  593.  
  594.  
  595. # Do some error checking and defaulting for the host and target type.
  596. # The inputs are:
  597. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  598. #
  599. # The rules are:
  600. # 1. You are not allowed to specify --host, --target, and nonopt at the
  601. #    same time.
  602. # 2. Host defaults to nonopt.
  603. # 3. If nonopt is not specified, then host defaults to the current host,
  604. #    as determined by config.guess.
  605. # 4. Target and build default to nonopt.
  606. # 5. If nonopt is not specified, then target and build default to host.
  607.  
  608. # The aliases save the names the user supplied, while $host etc.
  609. # will get canonicalized.
  610. case $host---$target---$nonopt in
  611. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  612. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  613. esac
  614.  
  615.  
  616. # Make sure we can run config.sub.
  617. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  618. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  619. fi
  620.  
  621. echo $ac_n "checking host system type""... $ac_c" 1>&6
  622.  
  623. host_alias=$host
  624. case "$host_alias" in
  625. NONE)
  626.   case $nonopt in
  627.   NONE)
  628.     if host_alias=`$ac_config_guess`; then :
  629.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  630.     fi ;;
  631.   *) host_alias=$nonopt ;;
  632.   esac ;;
  633. esac
  634.  
  635. host=`$ac_config_sub $host_alias`
  636. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  637. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  638. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  639. echo "$ac_t""$host" 1>&6
  640.  
  641. echo $ac_n "checking target system type""... $ac_c" 1>&6
  642.  
  643. target_alias=$target
  644. case "$target_alias" in
  645. NONE)
  646.   case $nonopt in
  647.   NONE) target_alias=$host_alias ;;
  648.   *) target_alias=$nonopt ;;
  649.   esac ;;
  650. esac
  651.  
  652. target=`$ac_config_sub $target_alias`
  653. target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  654. target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  655. target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  656. echo "$ac_t""$target" 1>&6
  657.  
  658. echo $ac_n "checking build system type""... $ac_c" 1>&6
  659.  
  660. build_alias=$build
  661. case "$build_alias" in
  662. NONE)
  663.   case $nonopt in
  664.   NONE) build_alias=$host_alias ;;
  665.   *) build_alias=$nonopt ;;
  666.   esac ;;
  667. esac
  668.  
  669. build=`$ac_config_sub $build_alias`
  670. build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  671. build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  672. build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  673. echo "$ac_t""$build" 1>&6
  674.  
  675. test "$host_alias" != "$target_alias" &&
  676.   test "$program_prefix$program_suffix$program_transform_name" = \
  677.     NONENONEs,x,x, &&
  678.   program_prefix=${target_alias}-
  679.  
  680. if test "$program_transform_name" = s,x,x,; then
  681.   program_transform_name=
  682. else
  683.   # Double any \ or $.  echo might interpret backslashes.
  684.   cat <<\EOF_SED > conftestsed
  685. s,\\,\\\\,g; s,\$,$$,g
  686. EOF_SED
  687.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  688.   rm -f conftestsed
  689. fi
  690. test "$program_prefix" != NONE &&
  691.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  692. # Use a double $ so make ignores it.
  693. test "$program_suffix" != NONE &&
  694.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  695.  
  696. # sed with no file args requires a program.
  697. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  698.  
  699.  
  700. te_file=generic
  701.  
  702. canon_targets=""
  703. if test -n "$enable_targets" ; then
  704.   for t in `echo $enable_targets | sed 's/,/ /g'`; do
  705.     result=`$ac_config_sub $t 2>/dev/null`
  706.     if test -n "$result" ; then
  707.       canon_targets="$canon_targets $result"
  708. #    else
  709. #      # Permit "all", etc.  We don't support it yet though.
  710. #      canon_targets="$canon_targets $t"
  711.     fi
  712.   done
  713.   _gas_uniq_list="$canon_targets"
  714. _gas_uniq_newlist=""
  715. for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
  716.   case $_gas_uniq_i in
  717.   _gas_uniq_dummy) ;;
  718.   *) case " $_gas_uniq_newlist " in
  719.        *" $_gas_uniq_i "*) ;;
  720.        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
  721.      esac ;;
  722.   esac
  723. done
  724. canon_targets=$_gas_uniq_newlist
  725.  
  726. fi
  727.  
  728. emulations=""
  729.  
  730. for this_target in $target $canon_targets ; do
  731.  
  732.     eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
  733.  
  734.     # check for architecture variants
  735.     case ${cpu} in
  736.       armeb)        cpu_type=arm endian=big ;;
  737.       arm*)        cpu_type=arm endian=little ;;
  738.       hppa*)        cpu_type=hppa ;;
  739.       i[456]86)        cpu_type=i386 ;;
  740.       m680[012346]0)    cpu_type=m68k ;;
  741.       m68008)        cpu_type=m68k ;;
  742.       m683??)        cpu_type=m68k ;;
  743.       m8*)        cpu_type=m88k ;;
  744.       m68*)        cpu_type=m68k ;;
  745.       mips*el)        cpu_type=mips endian=little;;
  746.       mips*)        cpu_type=mips endian=big ;;
  747.       powerpcle*)    cpu_type=ppc endian=little ;;
  748.       powerpc*)        cpu_type=ppc endian=big ;;
  749.       rs6000*)        cpu_type=ppc ;;
  750.       sparc64)        cpu_type=sparc want_sparc_v9=true ;;
  751.       sparc*)        cpu_type=sparc ;;
  752.       *)        cpu_type=${cpu} ;;
  753.     esac
  754.  
  755.     if test ${this_target} = $target ; then
  756.       target_cpu_type=${cpu_type}
  757.     elif test ${target_cpu_type} != ${cpu_type} ; then
  758.       continue
  759.     fi
  760.  
  761.     targ=${cpu_type}
  762.     generic_target=${cpu_type}-$vendor-$os
  763.     dev=no
  764.     bfd_gas=no
  765.     em=generic
  766.  
  767.     # assign object format
  768.     case ${generic_target} in
  769.       a29k-*-coff)          fmt=coff targ=ebmon29k ;;
  770.       a29k-amd-udi)         fmt=coff targ=ebmon29k ;;
  771.       a29k-amd-ebmon)       fmt=coff targ=ebmon29k ;;
  772.       a29k-nyu-sym1)        fmt=coff targ=ebmon29k ;;
  773.       a29k-*-vxworks*)      fmt=coff ;;
  774.  
  775.       alpha-*-netware*)     fmt=ecoff ;;
  776.       alpha-*-osf*)         fmt=ecoff ;;
  777.       alpha-*-linuxecoff*)  fmt=ecoff ;;
  778.       alpha-*-linux*)       fmt=elf em=linux ;;
  779.  
  780.  
  781.       arm-*-riscix*)        fmt=aout targ=arm-lit em=riscix ;;
  782.       arm-*-aout)        fmt=aout
  783.                 case "$endian" in
  784.                   big)    targ=arm-big ;;
  785.                   *)    targ=arm-lit ;;
  786.                 esac
  787.                 ;;
  788.       arm-*-coff)           fmt=coff ;;
  789.       arm-*-riscix*)        fmt=aout ;;
  790.       arm-*-pe)             fmt=coff targ=armcoff em=pe ;;
  791.  
  792.       hppa-*-*elf*)         fmt=elf em=hppa ;;
  793.       hppa-*-lites*)        fmt=elf em=hppa ;;
  794.       hppa-*-osf*)          fmt=som em=hppa ;;
  795.       hppa-*-hpux*)         fmt=som em=hppa ;;
  796.       hppa-*-bsd*)          fmt=som em=hppa ;;
  797.       hppa-*-hiux*)         fmt=som em=hppa ;;
  798.  
  799.       h8300-*-coff)         fmt=coff ;;
  800.  
  801.       i386-ibm-aix*)        fmt=coff targ=i386coff
  802.                  em=i386aix ;;
  803.       i386-*-bsd*)          fmt=aout em=386bsd ;;
  804.       i386-*-netbsd0.8)     fmt=aout em=386bsd ;;
  805.       i386-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes;;
  806.       i386-*-linux*aout* | i386-*-linuxoldld)   fmt=aout em=linux ;;
  807.       i386-*-linux*coff*)   fmt=coff em=linux
  808.                  targ=i386coff ;;
  809.       i386-*-linux*)        fmt=elf em=linux ;;
  810.       i386-*-lynxos*)       fmt=coff targ=i386coff
  811.                  em=lynx ;;
  812.       i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
  813.                 fmt=elf ;;
  814.       i386-*-sco*elf*)      fmt=elf targ=sco5 ;;
  815.       i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
  816.                 fmt=coff targ=i386coff ;;
  817.       i386-*-vsta)          fmt=aout ;;
  818.       i386-*-go32)          fmt=coff targ=i386coff ;;
  819.       i386-*-rtems*)        fmt=coff targ=i386coff ;;
  820.       i386-*-gnu*)          fmt=elf ;;
  821.       i386-*-mach*)
  822.                 fmt=aout em=mach bfd_gas=yes ;;
  823.       i386-*-msdos*)        fmt=aout ;;
  824.       i386-*-moss*)        fmt=elf ;;
  825.       i386-*-pe)            fmt=coff targ=i386coff em=pe ;;
  826.       i386-*-cygwin32)      fmt=coff targ=i386coff em=pe ;;
  827.       i386-*-*nt)           fmt=coff targ=i386coff em=pe ;;
  828.       i960-*-bout)          fmt=bout ;;
  829.       i960-*-coff)          fmt=coff em=ic960 targ=ic960coff ;;
  830.       i960-*-rtems*)        fmt=coff em=ic960 targ=ic960coff ;;
  831.       i960-*-nindy*)        fmt=bout ;;
  832.       i960-*-vxworks4*)     fmt=bout ;;
  833.       i960-*-vxworks5.0)    fmt=bout ;;
  834.       i960-*-vxworks5.*)    fmt=coff em=ic960 targ=ic960coff ;;
  835.       i960-*-vxworks*)      fmt=bout ;;
  836.  
  837.       m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos* | m68*-*-amigaos*)
  838.                 fmt=aout em=sun3 ;;
  839.       m68k-motorola-sysv*)  fmt=coff targ=m68kcoff em=delta ;;
  840.       m68k-bull-sysv3*)     fmt=coff targ=m68kcoff em=dpx2 ;;
  841.       m68k-apollo-*)        fmt=coff targ=apollo em=apollo ;;
  842.       m68k-*-sysv4 | m68k-*-elf) # must be before -sysv*
  843.                 fmt=elf ;;
  844.       m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
  845.                 fmt=coff targ=m68kcoff ;;
  846.       m68k-*-hpux*)         fmt=hp300 em=hp300 ;;
  847.       m68k-*-linux*aout*)   fmt=aout em=linux ;;
  848.       m68k-*-linux*)        fmt=elf em=linux ;;
  849.       m68k-*-lynxos*)       fmt=coff targ=m68kcoff
  850.                  em=lynx ;;
  851.       m68k-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes ;;
  852.       m68k-apple-aux*)      fmt=coff targ=m68kcoff em=aux ;;
  853.       m68k-*-psos*)         fmt=elf em=psos;;
  854.  
  855.       m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
  856.       m88k-*-coff*)         fmt=coff targ=m88kcoff ;;
  857.  
  858.       # don't change em like *-*-bsd does
  859.       mips-dec-netbsd*)        fmt=elf targ=mips-lit endian=little ;;
  860.       mips-dec-bsd*)        fmt=aout targ=mips-lit ;;
  861.       mips-sony-bsd*)       fmt=ecoff targ=mips-big ;;
  862.       mips-*-bsd*)          { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
  863.       mips-*-ultrix*)       fmt=ecoff targ=mips-lit endian=little ;;
  864.       mips-*-osf*)          fmt=ecoff targ=mips-lit endian=little ;;
  865.       mips-*-ecoff*)        fmt=ecoff 
  866.                 case "$endian" in
  867.                 big) targ=mips-big ;;
  868.                 *)   targ=mips-lit ;;
  869.                 esac
  870.                 ;;
  871.       mips-*-ecoff*)        fmt=ecoff targ=mips-big ;;
  872.       mips-*-gnu*)          fmt=aout
  873.                 case "$endian" in
  874.                 big) targ=mips-big ;;
  875.                 *)   targ=mips-lit ;;
  876.                 esac
  877.                 ;;
  878.       mips-*-irix5*)        fmt=elf targ=mips-big ;;
  879.       mips-*-irix*)         fmt=ecoff targ=mips-big ;;
  880.       mips-*-riscos*)       fmt=ecoff targ=mips-big ;;
  881.       mips-*-sysv*)         fmt=ecoff targ=mips-big ;;
  882.       mips-*-elf*)          fmt=elf 
  883.                 case "$endian" in
  884.                 big) targ=mips-big ;;
  885.                 *)   targ=mips-lit ;;
  886.                 esac
  887.                 ;;
  888.       ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
  889.                     fmt=coff em=pe 
  890.                 case "$endian" in
  891.                 big) targ=ppc-big ;;
  892.                 *)   targ=ppc-lit ;;
  893.                 esac
  894.                             ;;
  895.       ppc-*-aix*)           fmt=coff ;;
  896.       ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4* | ppc-*-amigaos*)
  897.                 fmt=elf
  898.                 case "$endian" in
  899.                 big)  targ=ppc-big ;;
  900.                 *)    targ=ppc-lit ;;
  901.                 esac
  902.                 ;;
  903.       ppc-*-linux*)        fmt=elf
  904.                 case "$endian" in
  905.                 big)  targ=ppc-big ;;
  906.                 *)    { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
  907.                 esac
  908.                 ;;
  909.       ppc-*-solaris*)        fmt=elf
  910.                 case "$endian" in
  911.                 big)  { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
  912.                 *)    targ=ppc-sol ;;
  913.                 esac
  914.                 ;;
  915.       ppc-*-rtems*)
  916.                 fmt=elf
  917.                 case "$endian" in
  918.                 big)  targ=ppc-big ;;
  919.                 *)    targ=ppc-lit ;;
  920.                 esac
  921.                 ;;
  922.       ppc-*-macos* | ppc-*-mpw*)
  923.                 fmt=coff em=macos ;;
  924.       ppc-*-netware*)       fmt=elf em=ppcnw ;;
  925.  
  926.       sh-*-coff)            fmt=coff ;;
  927.  
  928.       ns32k-pc532-mach* | ns32k-pc532-ux*)    fmt=aout em=pc532mach ;;
  929.       ns32k-pc532-netbsd* | ns32k-pc532-lites*)  fmt=aout em=nbsd532 ;;
  930.  
  931.       sparc-*-rtems*)       fmt=aout ;;
  932.       sparc-*-sunos4*)      fmt=aout em=sun3 ;;
  933.       sparc-*-aout | sparc*-*-vxworks*)
  934.                 fmt=aout ;;
  935.       sparc-*-coff)         fmt=coff ;;
  936.       sparc-*-lynxos*)      fmt=coff em=lynx ;;
  937.       sparc-fujitsu-none)   fmt=aout ;;
  938.       sparc-*-elf | sparc-*-solaris*)
  939.                 fmt=elf ;;
  940.       sparc-*-netbsd*)      fmt=aout em=nbsd bfd_gas=yes ;;
  941.  
  942.       vax-*-bsd* | vax-*-ultrix*)
  943.                 fmt=aout ;;
  944.       vax-*-vms)            fmt=vms ;;
  945.  
  946.       z8k-*-coff | z8k-*-sim)
  947.                 fmt=coff ;;
  948.  
  949.       w65-*-*)              fmt=coff ;;
  950.  
  951.       *-*-aout | *-*-scout)
  952.                 fmt=aout ;;
  953.       *-*-nindy*)
  954.                 fmt=bout ;;
  955.       *-*-bsd*)
  956.                 fmt=aout em=sun3 ;;
  957.       *-*-generic)          fmt=generic ;;
  958.       *-*-xray | *-*-hms)   fmt=coff ;;
  959.       *-*-sim)              fmt=coff ;;
  960.       *-*-elf | *-*-sysv4* | *-*-solaris*)
  961.                 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
  962.                 fmt=elf dev=yes ;;
  963.       *-*-vxworks)          fmt=aout ;;
  964.       *-*-netware)          fmt=elf ;;
  965.     esac
  966.  
  967.     case ${cpu_type}-${fmt} in
  968.       alpha-*)    bfd_gas=yes ;;
  969.       arm-*)    bfd_gas=yes ;;
  970.     # not yet
  971.     # i386-aout)    bfd_gas=preferred ;;
  972.       mips-*)    bfd_gas=yes ;;
  973.       ns32k-*)    bfd_gas=yes ;;
  974.       ppc-*)    bfd_gas=yes ;;
  975.       sparc-*)    bfd_gas=yes ;;
  976.       *-elf)    bfd_gas=yes ;;
  977.       *-ecoff)    bfd_gas=yes ;;
  978.       *-som)    bfd_gas=yes ;;
  979.       *)        ;;
  980.     esac
  981.  
  982. # Other random stuff.
  983.  
  984.     # do we need the opcodes library?
  985.     case ${cpu_type} in
  986.       vax | i386)
  987.     ;;
  988.       *)
  989.     need_opcodes=yes
  990.     if test "${shared_opcodes}" = "true"; then
  991.       # A shared libopcodes must be linked against libbfd.
  992.       need_bfd=yes
  993.     fi
  994.     ;;
  995.     esac
  996.  
  997.     test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
  998. #define SPARC_V9 1
  999. EOF
  1000.  
  1001.  
  1002.     case ${cpu}-${vendor}-${os} in
  1003.       sparc64-*-elf*) cat >> confdefs.h <<\EOF
  1004. #define SPARC_ARCH64 1
  1005. EOF
  1006.  ;;
  1007.     esac
  1008.  
  1009.     case ${cpu_type} in
  1010.       m68k)
  1011.     case ${extra_objects} in
  1012.     *m68k-parse.o*) ;;
  1013.     *) extra_objects="$extra_objects m68k-parse.o" ;;
  1014.     esac
  1015.     ;;
  1016.     esac
  1017.  
  1018. # See if we really can support this configuration with the emulation code.
  1019.  
  1020.     if test $this_target = $target ; then
  1021.       primary_bfd_gas=$bfd_gas
  1022.       obj_format=$fmt
  1023.       gas_target=$targ
  1024.       te_file=$em
  1025.  
  1026.       if test $bfd_gas = no ; then
  1027.     # Can't support other configurations this way.
  1028.     break
  1029.       fi
  1030.     elif test $bfd_gas = no ; then
  1031.       # Can't support this configuration.
  1032.       break
  1033.     fi
  1034.  
  1035. # From target name and format, produce a list of supported emulations.
  1036.  
  1037.     case ${generic_target}-${fmt} in
  1038.       mips-*-irix5*-*)    emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
  1039.       mips-*-*-ecoff)    case "$endian" in
  1040.             big)    emulation="mipsbecoff mipslecoff mipsecoff" ;;
  1041.             *)    emulation="mipslecoff mipsbecoff mipsecoff" ;;
  1042.             esac ;;
  1043.       mips-*-*-elf)    case "$endian" in
  1044.             big)    emulation="mipsbelf mipslelf mipself" ;;
  1045.             *)    emulation="mipslelf mipsbelf mipself" ;;
  1046.             esac ;;
  1047.     esac
  1048.  
  1049.     emulations="$emulations $emulation"
  1050.  
  1051. done
  1052.  
  1053. # Assign floating point type.  Most processors with FP support
  1054. # IEEE FP.  On those that don't support FP at all, usually IEEE
  1055. # is emulated.
  1056. case ${target_cpu} in
  1057.   vax | tahoe )    atof=${target_cpu} ;;
  1058.   *)        atof=ieee ;;
  1059. esac
  1060.  
  1061. case "${obj_format}" in
  1062.   "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
  1063. esac
  1064.  
  1065.  
  1066. if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
  1067.   { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
  1068. fi
  1069.  
  1070. if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
  1071.   { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
  1072. fi
  1073.  
  1074. # and target makefile frag
  1075.  
  1076. target_frag=${srcdir}/config/${gas_target}.mt
  1077. if test ! -r ${target_frag}; then
  1078.   target_frag=/dev/null # ick! but subst_file can't be conditionalized
  1079. fi
  1080.  
  1081.  
  1082. case ${user_bfd_gas}-${primary_bfd_gas} in
  1083.   yes-yes | no-no)
  1084.     # We didn't override user's choice.
  1085.     ;;
  1086.   no-yes)
  1087.     echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
  1088.     ;;
  1089.   no-preferred)
  1090.     primary_bfd_gas=no
  1091.     ;;
  1092.   *-preferred)
  1093.     primary_bfd_gas=yes
  1094.     ;;
  1095.   yes-*)
  1096.     primary_bfd_gas=yes
  1097.     ;;
  1098.   -*)
  1099.     # User specified nothing.
  1100.     ;;
  1101. esac
  1102.  
  1103. # Some COFF configurations want these random other flags set.
  1104. case ${obj_format} in
  1105.   coff)
  1106.     case ${target_cpu_type} in
  1107.       i386) cat >> confdefs.h <<\EOF
  1108. #define I386COFF 1
  1109. EOF
  1110.  ;;
  1111.       m68k) cat >> confdefs.h <<\EOF
  1112. #define M68KCOFF 1
  1113. EOF
  1114.  ;;
  1115.       m88k) cat >> confdefs.h <<\EOF
  1116. #define M88KCOFF 1
  1117. EOF
  1118.  ;;
  1119.     esac
  1120.     ;;
  1121. esac
  1122.  
  1123. # Getting this done right is going to be a bitch.  Each configuration specified
  1124. # with --enable-targets=... should be checked for environment, format, cpu, and
  1125. # bfd_gas setting.
  1126. #
  1127. # For each configuration, the necessary object file support code must be linked
  1128. # in.  This might be only one, it might be up to four.  The necessary emulation
  1129. # code needs to be provided, too.
  1130. #
  1131. # And then there's "--enable-targets=all"....
  1132. #
  1133. # For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
  1134.  
  1135. formats="${obj_format}"
  1136. emfiles=""
  1137. EMULATIONS=""
  1138. _gas_uniq_list="$emulations"
  1139. _gas_uniq_newlist=""
  1140. for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
  1141.   case $_gas_uniq_i in
  1142.   _gas_uniq_dummy) ;;
  1143.   *) case " $_gas_uniq_newlist " in
  1144.        *" $_gas_uniq_i "*) ;;
  1145.        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
  1146.      esac ;;
  1147.   esac
  1148. done
  1149. emulations=$_gas_uniq_newlist
  1150.  
  1151. for em in . $emulations ; do
  1152.   case $em in
  1153.     .)    continue ;;
  1154.     mipsbelf | mipslelf)
  1155.     fmt=elf   file=mipself ;;
  1156.     mipsbecoff | mipslecoff)
  1157.     fmt=ecoff file=mipsecoff ;;
  1158.   esac
  1159.   formats="$formats $fmt"
  1160.   emfiles="$emfiles e-$file.o"
  1161.   EMULATIONS="$EMULATIONS &$em,"
  1162. done
  1163. _gas_uniq_list="$formats"
  1164. _gas_uniq_newlist=""
  1165. for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
  1166.   case $_gas_uniq_i in
  1167.   _gas_uniq_dummy) ;;
  1168.   *) case " $_gas_uniq_newlist " in
  1169.        *" $_gas_uniq_i "*) ;;
  1170.        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
  1171.      esac ;;
  1172.   esac
  1173. done
  1174. formats=$_gas_uniq_newlist
  1175.  
  1176. _gas_uniq_list="$emfiles"
  1177. _gas_uniq_newlist=""
  1178. for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
  1179.   case $_gas_uniq_i in
  1180.   _gas_uniq_dummy) ;;
  1181.   *) case " $_gas_uniq_newlist " in
  1182.        *" $_gas_uniq_i "*) ;;
  1183.        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
  1184.      esac ;;
  1185.   esac
  1186. done
  1187. emfiles=$_gas_uniq_newlist
  1188.  
  1189. if test `set . $formats ; shift ; echo $#` -gt 1 ; then
  1190.   for fmt in $formats ; do
  1191.     case $fmt in
  1192.       aout)    cat >> confdefs.h <<\EOF
  1193. #define OBJ_MAYBE_AOUT 1
  1194. EOF
  1195.     ;;
  1196.       bout)    cat >> confdefs.h <<\EOF
  1197. #define OBJ_MAYBE_BOUT 1
  1198. EOF
  1199.     ;;
  1200.       coff)    cat >> confdefs.h <<\EOF
  1201. #define OBJ_MAYBE_COFF 1
  1202. EOF
  1203.     ;;
  1204.       ecoff)    cat >> confdefs.h <<\EOF
  1205. #define OBJ_MAYBE_ECOFF 1
  1206. EOF
  1207.    ;;
  1208.       elf)    cat >> confdefs.h <<\EOF
  1209. #define OBJ_MAYBE_ELF 1
  1210. EOF
  1211.      ;;
  1212.       generic)    cat >> confdefs.h <<\EOF
  1213. #define OBJ_MAYBE_GENERIC 1
  1214. EOF
  1215.  ;;
  1216.       hp300)    cat >> confdefs.h <<\EOF
  1217. #define OBJ_MAYBE_HP300 1
  1218. EOF
  1219.    ;;
  1220.       ieee)    cat >> confdefs.h <<\EOF
  1221. #define OBJ_MAYBE_IEEE 1
  1222. EOF
  1223.     ;;
  1224.       som)    cat >> confdefs.h <<\EOF
  1225. #define OBJ_MAYBE_SOM 1
  1226. EOF
  1227.      ;;
  1228.       vms)    cat >> confdefs.h <<\EOF
  1229. #define OBJ_MAYBE_VMS 1
  1230. EOF
  1231.      ;;
  1232.     esac
  1233.     extra_objects="$extra_objects obj-$fmt.o"
  1234.   done
  1235.   obj_format=multi
  1236. fi
  1237. if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
  1238.   te_file=multi
  1239.   extra_objects="$extra_objects $emfiles"
  1240.   DEFAULT_EMULATION=`set . $emulations ; echo $2`
  1241.   cat >> confdefs.h <<\EOF
  1242. #define USE_EMULATIONS 1
  1243. EOF
  1244.  
  1245. fi
  1246.  
  1247. cat >> confdefs.h <<EOF
  1248. #define EMULATIONS $EMULATIONS
  1249. EOF
  1250.  
  1251. cat >> confdefs.h <<EOF
  1252. #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
  1253. EOF
  1254.  
  1255.  
  1256. files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
  1257.     config/obj-${obj_format}.h config/obj-${obj_format}.c \
  1258.     config/te-${te_file}.h config/atof-${atof}.c \
  1259.     $extra_files"
  1260. links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
  1261.     $extra_links"
  1262.  
  1263. case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
  1264.   yes-*-coff)    need_bfd=yes ;;
  1265.   no-*-coff)    need_bfd=yes
  1266.         cat >> confdefs.h <<\EOF
  1267. #define MANY_SEGMENTS 1
  1268. EOF
  1269.  ;;
  1270. esac
  1271.  
  1272. reject_dev_configs=yes
  1273.  
  1274. case ${reject_dev_configs}-${dev} in
  1275.   yes-yes) # Oops.
  1276.     { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
  1277.     ;;
  1278. esac
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286. case "${primary_bfd_gas}" in
  1287.   yes)    cat >> confdefs.h <<\EOF
  1288. #define BFD_ASSEMBLER 1
  1289. EOF
  1290.  
  1291.     need_bfd=yes ;;
  1292. esac
  1293.  
  1294. # do we need the opcodes library?
  1295. case "${need_opcodes}" in
  1296. yes)
  1297.   OPCODES_DEP=../opcodes/libopcodes.a
  1298.   OPCODES_LIB='-L../opcodes -lopcodes'
  1299.  
  1300.   # We need to handle some special cases for shared libraries.
  1301.   case "${host}" in
  1302.   *-*-sunos*)
  1303.     # On SunOS, we must link against the name we are going to install,
  1304.     # not -lbfd, since SunOS does not support SONAME.
  1305.     if test "${shared_opcodes}" = "true"; then
  1306.       OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
  1307.     fi
  1308.     ;;
  1309.   alpha*-*-osf*)
  1310.     # On Alpha OSF/1, the native linker searches all the -L
  1311.     # directories for any LIB.so files, and only then searches for any
  1312.     # LIB.a files.  That means that if there is an installed
  1313.     # libbfd.so, but this build is not done with --enable-shared, the
  1314.     # link will wind up being against the install libbfd.so rather
  1315.     # than the newly built libbfd.  To avoid this, we must explicitly
  1316.     # link against libbfd.a when --enable-shared is not used.
  1317.     if test "${shared_opcodes}" != "true"; then
  1318.       OPCODES_LIB='../opcodes/libopcodes.a'
  1319.     fi
  1320.     ;;
  1321.   esac
  1322.   ;;
  1323. esac
  1324.  
  1325.  
  1326.  
  1327. case "${need_bfd}" in
  1328. yes)
  1329.   BFDDEP=../bfd/libbfd.a
  1330.   BFDLIB='-L../bfd -lbfd'
  1331.   ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
  1332.  
  1333.   # We need to handle some special cases for shared libraries
  1334.   case "${host}" in
  1335.   *-*-sunos*)
  1336.     # On SunOS, we must link against the name we are going to install,
  1337.     # not -lbfd, since SunOS does not support SONAME.
  1338.     if test "${shared_bfd}" = "true"; then
  1339.       BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
  1340.     fi
  1341.     ;;
  1342.   alpha*-*-osf*)
  1343.     # On Alpha OSF/1, the native linker searches all the -L
  1344.     # directories for any LIB.so files, and only then searches for any
  1345.     # LIB.a files.  That means that if there is an installed
  1346.     # libbfd.so, but this build is not done with --enable-shared, the
  1347.     # link will wind up being against the install libbfd.so rather
  1348.     # than the newly built libbfd.  To avoid this, we must explicitly
  1349.     # link against libbfd.a when --enable-shared is not used.
  1350.     if test "${shared_bfd}" != "true"; then
  1351.       BFDLIB='../bfd/libbfd.a'
  1352.     fi
  1353.     ;;
  1354.   esac
  1355.   ;;
  1356. esac
  1357.  
  1358.  
  1359.  
  1360.  
  1361. cat >> confdefs.h <<EOF
  1362. #define TARGET_ALIAS "${target_alias}"
  1363. EOF
  1364.  
  1365. cat >> confdefs.h <<EOF
  1366. #define TARGET_CANONICAL "${target}"
  1367. EOF
  1368.  
  1369. cat >> confdefs.h <<EOF
  1370. #define TARGET_CPU "${target_cpu}"
  1371. EOF
  1372.  
  1373. cat >> confdefs.h <<EOF
  1374. #define TARGET_VENDOR "${target_vendor}"
  1375. EOF
  1376.  
  1377. cat >> confdefs.h <<EOF
  1378. #define TARGET_OS "${target_os}"
  1379. EOF
  1380.  
  1381.  
  1382. # Extract the first word of "gcc", so it can be a program name with args.
  1383. set dummy gcc; ac_word=$2
  1384. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1385. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1386.   echo $ac_n "(cached) $ac_c" 1>&6
  1387. else
  1388.   if test -n "$CC"; then
  1389.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1390. else
  1391.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1392.   for ac_dir in $PATH; do
  1393.     test -z "$ac_dir" && ac_dir=.
  1394.     if test -f $ac_dir/$ac_word; then
  1395.       ac_cv_prog_CC="gcc"
  1396.       break
  1397.     fi
  1398.   done
  1399.   IFS="$ac_save_ifs"
  1400. fi
  1401. fi
  1402. CC="$ac_cv_prog_CC"
  1403. if test -n "$CC"; then
  1404.   echo "$ac_t""$CC" 1>&6
  1405. else
  1406.   echo "$ac_t""no" 1>&6
  1407. fi
  1408.  
  1409. if test -z "$CC"; then
  1410.   # Extract the first word of "cc", so it can be a program name with args.
  1411. set dummy cc; ac_word=$2
  1412. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1413. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1414.   echo $ac_n "(cached) $ac_c" 1>&6
  1415. else
  1416.   if test -n "$CC"; then
  1417.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1418. else
  1419.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1420.   ac_prog_rejected=no
  1421.   for ac_dir in $PATH; do
  1422.     test -z "$ac_dir" && ac_dir=.
  1423.     if test -f $ac_dir/$ac_word; then
  1424.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  1425.         ac_prog_rejected=yes
  1426.     continue
  1427.       fi
  1428.       ac_cv_prog_CC="cc"
  1429.       break
  1430.     fi
  1431.   done
  1432.   IFS="$ac_save_ifs"
  1433. if test $ac_prog_rejected = yes; then
  1434.   # We found a bogon in the path, so make sure we never use it.
  1435.   set dummy $ac_cv_prog_CC
  1436.   shift
  1437.   if test $# -gt 0; then
  1438.     # We chose a different compiler from the bogus one.
  1439.     # However, it has the same basename, so the bogon will be chosen
  1440.     # first if we set CC to just the basename; use the full file name.
  1441.     shift
  1442.     set dummy "$ac_dir/$ac_word" "$@"
  1443.     shift
  1444.     ac_cv_prog_CC="$@"
  1445.   fi
  1446. fi
  1447. fi
  1448. fi
  1449. CC="$ac_cv_prog_CC"
  1450. if test -n "$CC"; then
  1451.   echo "$ac_t""$CC" 1>&6
  1452. else
  1453.   echo "$ac_t""no" 1>&6
  1454. fi
  1455.  
  1456.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1457. fi
  1458.  
  1459. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  1460. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  1461.   echo $ac_n "(cached) $ac_c" 1>&6
  1462. else
  1463.   cat > conftest.c <<EOF
  1464. #ifdef __GNUC__
  1465.   yes;
  1466. #endif
  1467. EOF
  1468. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1469.   ac_cv_prog_gcc=yes
  1470. else
  1471.   ac_cv_prog_gcc=no
  1472. fi
  1473. fi
  1474.  
  1475. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  1476. if test $ac_cv_prog_gcc = yes; then
  1477.   GCC=yes
  1478.   if test "${CFLAGS+set}" != set; then
  1479.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  1480. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  1481.   echo $ac_n "(cached) $ac_c" 1>&6
  1482. else
  1483.   echo 'void f(){}' > conftest.c
  1484. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1485.   ac_cv_prog_gcc_g=yes
  1486. else
  1487.   ac_cv_prog_gcc_g=no
  1488. fi
  1489. rm -f conftest*
  1490.  
  1491. fi
  1492.  
  1493. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  1494.     if test $ac_cv_prog_gcc_g = yes; then
  1495.       CFLAGS="-g -O2"
  1496.     else
  1497.       CFLAGS="-O2"
  1498.     fi
  1499.   fi
  1500. else
  1501.   GCC=
  1502.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  1503. fi
  1504.  
  1505. # Find a good install program.  We prefer a C program (faster),
  1506. # so one script is as good as another.  But avoid the broken or
  1507. # incompatible versions:
  1508. # SysV /etc/install, /usr/sbin/install
  1509. # SunOS /usr/etc/install
  1510. # IRIX /sbin/install
  1511. # AIX /bin/install
  1512. # AmigaOS /c/install
  1513. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1514. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1515. # ./install, which can be erroneously created by make from ./install.sh.
  1516. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1517. if test -z "$INSTALL"; then
  1518. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1519.   echo $ac_n "(cached) $ac_c" 1>&6
  1520. else
  1521.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1522.   for ac_dir in $PATH; do
  1523.     # Account for people who put trailing slashes in PATH elements.
  1524.     case "$ac_dir/" in
  1525.     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1526.     *)
  1527.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1528.       for ac_prog in ginstall installbsd scoinst install; do
  1529.         if test -f $ac_dir/$ac_prog; then
  1530.       if test $ac_prog = install &&
  1531.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1532.         # AIX install.  It has an incompatible calling convention.
  1533.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1534.         :
  1535.       else
  1536.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1537.         break 2
  1538.       fi
  1539.     fi
  1540.       done
  1541.       ;;
  1542.     esac
  1543.   done
  1544.   IFS="$ac_save_ifs"
  1545.  
  1546. fi
  1547.   if test "${ac_cv_path_install+set}" = set; then
  1548.     INSTALL="$ac_cv_path_install"
  1549.   else
  1550.     # As a last resort, use the slow shell script.  We don't cache a
  1551.     # path for INSTALL within a source directory, because that will
  1552.     # break other packages using the cache if that directory is
  1553.     # removed, or if the path is relative.
  1554.     INSTALL="$ac_install_sh"
  1555.   fi
  1556. fi
  1557. echo "$ac_t""$INSTALL" 1>&6
  1558.  
  1559. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1560. # It thinks the first close brace ends the variable substitution.
  1561. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1562.  
  1563. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1564.  
  1565.  
  1566. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1567. # On Suns, sometimes $CPP names a directory.
  1568. if test -n "$CPP" && test -d "$CPP"; then
  1569.   CPP=
  1570. fi
  1571. if test -z "$CPP"; then
  1572. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1573.   echo $ac_n "(cached) $ac_c" 1>&6
  1574. else
  1575.     # This must be in double quotes, not single quotes, because CPP may get
  1576.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1577.   CPP="${CC-cc} -E"
  1578.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1579.   # not just through cpp.
  1580.   cat > conftest.$ac_ext <<EOF
  1581. #line 1582 "configure"
  1582. #include "confdefs.h"
  1583. #include <assert.h>
  1584. Syntax Error
  1585. EOF
  1586. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1587. { (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1588. ac_err=`grep -v '^ *+' conftest.out`
  1589. if test -z "$ac_err"; then
  1590.   :
  1591. else
  1592.   echo "$ac_err" >&5
  1593.   rm -rf conftest*
  1594.   CPP="${CC-cc} -E -traditional-cpp"
  1595.   cat > conftest.$ac_ext <<EOF
  1596. #line 1597 "configure"
  1597. #include "confdefs.h"
  1598. #include <assert.h>
  1599. Syntax Error
  1600. EOF
  1601. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1602. { (eval echo configure:1603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1603. ac_err=`grep -v '^ *+' conftest.out`
  1604. if test -z "$ac_err"; then
  1605.   :
  1606. else
  1607.   echo "$ac_err" >&5
  1608.   rm -rf conftest*
  1609.   CPP=/lib/cpp
  1610. fi
  1611. rm -f conftest*
  1612. fi
  1613. rm -f conftest*
  1614.   ac_cv_prog_CPP="$CPP"
  1615. fi
  1616.   CPP="$ac_cv_prog_CPP"
  1617. else
  1618.   ac_cv_prog_CPP="$CPP"
  1619. fi
  1620. echo "$ac_t""$CPP" 1>&6
  1621.  
  1622. for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
  1623. do
  1624. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1625. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1626. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1627.   echo $ac_n "(cached) $ac_c" 1>&6
  1628. else
  1629.   cat > conftest.$ac_ext <<EOF
  1630. #line 1631 "configure"
  1631. #include "confdefs.h"
  1632. #include <$ac_hdr>
  1633. EOF
  1634. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1635. { (eval echo configure:1636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1636. ac_err=`grep -v '^ *+' conftest.out`
  1637. if test -z "$ac_err"; then
  1638.   rm -rf conftest*
  1639.   eval "ac_cv_header_$ac_safe=yes"
  1640. else
  1641.   echo "$ac_err" >&5
  1642.   rm -rf conftest*
  1643.   eval "ac_cv_header_$ac_safe=no"
  1644. fi
  1645. rm -f conftest*
  1646. fi
  1647. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1648.   echo "$ac_t""yes" 1>&6
  1649.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1650.   cat >> confdefs.h <<EOF
  1651. #define $ac_tr_hdr 1
  1652. EOF
  1653.  
  1654. else
  1655.   echo "$ac_t""no" 1>&6
  1656. fi
  1657. done
  1658.  
  1659.  
  1660. # Put this here so that autoconf's "cross-compiling" message doesn't confuse
  1661. # people who are not cross-compiling but are compiling cross-assemblers.
  1662. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
  1663. if test "${host}" = "${target}"; then
  1664.   cross_gas=no
  1665. else
  1666.   cross_gas=yes
  1667.   cat >> confdefs.h <<\EOF
  1668. #define CROSS_COMPILE 1
  1669. EOF
  1670.  
  1671. fi
  1672. echo "$ac_t""$cross_gas" 1>&6
  1673.  
  1674. # If we cannot run a trivial program, we must be cross compiling.
  1675. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1676. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1677.   echo $ac_n "(cached) $ac_c" 1>&6
  1678. else
  1679.   if test "$cross_compiling" = yes; then
  1680.   ac_cv_c_cross=yes
  1681. else
  1682. cat > conftest.$ac_ext <<EOF
  1683. #line 1684 "configure"
  1684. #include "confdefs.h"
  1685. main(){return(0);}
  1686. EOF
  1687. { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1688. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1689.   ac_cv_c_cross=no
  1690. else
  1691.   ac_cv_c_cross=yes
  1692. fi
  1693. fi
  1694. rm -fr conftest*
  1695. fi
  1696.  
  1697. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1698. cross_compiling=$ac_cv_c_cross
  1699.  
  1700. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1701. # for constant arguments.  Useless!
  1702. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1703. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1704.   echo $ac_n "(cached) $ac_c" 1>&6
  1705. else
  1706.   cat > conftest.$ac_ext <<EOF
  1707. #line 1708 "configure"
  1708. #include "confdefs.h"
  1709. #include <alloca.h>
  1710. int main() { t(); return 0; }
  1711. int t() {
  1712. char *p = alloca(2 * sizeof(int));
  1713. ; return 0; }
  1714. EOF
  1715. if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1716.   rm -rf conftest*
  1717.   ac_cv_header_alloca_h=yes
  1718. else
  1719.   rm -rf conftest*
  1720.   ac_cv_header_alloca_h=no
  1721. fi
  1722. rm -f conftest*
  1723.  
  1724. fi
  1725.  
  1726. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1727. if test $ac_cv_header_alloca_h = yes; then
  1728.   cat >> confdefs.h <<\EOF
  1729. #define HAVE_ALLOCA_H 1
  1730. EOF
  1731.  
  1732. fi
  1733.  
  1734. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1735. if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
  1736.   echo $ac_n "(cached) $ac_c" 1>&6
  1737. else
  1738.   cat > conftest.$ac_ext <<EOF
  1739. #line 1740 "configure"
  1740. #include "confdefs.h"
  1741.  
  1742. #ifdef __GNUC__
  1743. # define alloca __builtin_alloca
  1744. #else
  1745. # if HAVE_ALLOCA_H
  1746. #  include <alloca.h>
  1747. # else
  1748. #  ifdef _AIX
  1749.  #pragma alloca
  1750. #  else
  1751. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1752. char *alloca ();
  1753. #   endif
  1754. #  endif
  1755. # endif
  1756. #endif
  1757.  
  1758. int main() { t(); return 0; }
  1759. int t() {
  1760. char *p = (char *) alloca(1);
  1761. ; return 0; }
  1762. EOF
  1763. if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1764.   rm -rf conftest*
  1765.   ac_cv_func_alloca=yes
  1766. else
  1767.   rm -rf conftest*
  1768.   ac_cv_func_alloca=no
  1769. fi
  1770. rm -f conftest*
  1771.  
  1772. fi
  1773.  
  1774. echo "$ac_t""$ac_cv_func_alloca" 1>&6
  1775. if test $ac_cv_func_alloca = yes; then
  1776.   cat >> confdefs.h <<\EOF
  1777. #define HAVE_ALLOCA 1
  1778. EOF
  1779.  
  1780. fi
  1781.  
  1782. if test $ac_cv_func_alloca = no; then
  1783.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1784.   # that cause trouble.  Some versions do not even contain alloca or
  1785.   # contain a buggy version.  If you still want to use their alloca,
  1786.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1787.   ALLOCA=alloca.o
  1788.   cat >> confdefs.h <<\EOF
  1789. #define C_ALLOCA 1
  1790. EOF
  1791.  
  1792.  
  1793. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1794. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1795.   echo $ac_n "(cached) $ac_c" 1>&6
  1796. else
  1797.   cat > conftest.$ac_ext <<EOF
  1798. #line 1799 "configure"
  1799. #include "confdefs.h"
  1800. #if defined(CRAY) && ! defined(CRAY2)
  1801. webecray
  1802. #else
  1803. wenotbecray
  1804. #endif
  1805.  
  1806. EOF
  1807. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1808.   egrep "webecray" >/dev/null 2>&1; then
  1809.   rm -rf conftest*
  1810.   ac_cv_os_cray=yes
  1811. else
  1812.   rm -rf conftest*
  1813.   ac_cv_os_cray=no
  1814. fi
  1815. rm -f conftest*
  1816.  
  1817. fi
  1818.  
  1819. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1820. if test $ac_cv_os_cray = yes; then
  1821. for ac_func in _getb67 GETB67 getb67; do
  1822.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1823. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1824.   echo $ac_n "(cached) $ac_c" 1>&6
  1825. else
  1826.   cat > conftest.$ac_ext <<EOF
  1827. #line 1828 "configure"
  1828. #include "confdefs.h"
  1829. /* System header to define __stub macros and hopefully few prototypes,
  1830.     which can conflict with char $ac_func(); below.  */
  1831. #include <assert.h>
  1832. /* Override any gcc2 internal prototype to avoid an error.  */
  1833. /* We use char because int might match the return type of a gcc2
  1834.     builtin and then its argument prototype would still apply.  */
  1835. char $ac_func();
  1836.  
  1837. int main() { t(); return 0; }
  1838. int t() {
  1839.  
  1840. /* The GNU C library defines this for functions which it implements
  1841.     to always fail with ENOSYS.  Some functions are actually named
  1842.     something starting with __ and the normal name is an alias.  */
  1843. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1844. choke me
  1845. #else
  1846. $ac_func();
  1847. #endif
  1848.  
  1849. ; return 0; }
  1850. EOF
  1851. if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1852.   rm -rf conftest*
  1853.   eval "ac_cv_func_$ac_func=yes"
  1854. else
  1855.   rm -rf conftest*
  1856.   eval "ac_cv_func_$ac_func=no"
  1857. fi
  1858. rm -f conftest*
  1859.  
  1860. fi
  1861. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1862.   echo "$ac_t""yes" 1>&6
  1863.   cat >> confdefs.h <<EOF
  1864. #define CRAY_STACKSEG_END $ac_func
  1865. EOF
  1866.  
  1867.   break
  1868. else
  1869.   echo "$ac_t""no" 1>&6
  1870. fi
  1871.  
  1872. done
  1873. fi
  1874.  
  1875. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1876. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1877.   echo $ac_n "(cached) $ac_c" 1>&6
  1878. else
  1879.   if test "$cross_compiling" = yes; then
  1880.   ac_cv_c_stack_direction=0
  1881. else
  1882. cat > conftest.$ac_ext <<EOF
  1883. #line 1884 "configure"
  1884. #include "confdefs.h"
  1885. find_stack_direction ()
  1886. {
  1887.   static char *addr = 0;
  1888.   auto char dummy;
  1889.   if (addr == 0)
  1890.     {
  1891.       addr = &dummy;
  1892.       return find_stack_direction ();
  1893.     }
  1894.   else
  1895.     return (&dummy > addr) ? 1 : -1;
  1896. }
  1897. main ()
  1898. {
  1899.   exit (find_stack_direction() < 0);
  1900. }
  1901. EOF
  1902. { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1903. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1904.   ac_cv_c_stack_direction=1
  1905. else
  1906.   ac_cv_c_stack_direction=-1
  1907. fi
  1908. fi
  1909. rm -fr conftest*
  1910. fi
  1911.  
  1912. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1913. cat >> confdefs.h <<EOF
  1914. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1915. EOF
  1916.  
  1917. fi
  1918.  
  1919. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1920. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1921.   echo $ac_n "(cached) $ac_c" 1>&6
  1922. else
  1923.   ac_cv_c_inline=no
  1924. for ac_kw in inline __inline__ __inline; do
  1925.   cat > conftest.$ac_ext <<EOF
  1926. #line 1927 "configure"
  1927. #include "confdefs.h"
  1928.  
  1929. int main() { return 0; }
  1930. int t() {
  1931. } $ac_kw foo() {
  1932. ; return 0; }
  1933. EOF
  1934. if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1935.   rm -rf conftest*
  1936.   ac_cv_c_inline=$ac_kw; break
  1937. fi
  1938. rm -f conftest*
  1939.  
  1940. done
  1941.  
  1942. fi
  1943.  
  1944. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1945. case "$ac_cv_c_inline" in
  1946.   inline | yes) ;;
  1947.   no) cat >> confdefs.h <<\EOF
  1948. #define inline 
  1949. EOF
  1950.  ;;
  1951.   *)  cat >> confdefs.h <<EOF
  1952. #define inline $ac_cv_c_inline
  1953. EOF
  1954.  ;;
  1955. esac
  1956.  
  1957.  
  1958. # VMS doesn't have unlink.
  1959. for ac_func in unlink remove
  1960. do
  1961. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1962. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1963.   echo $ac_n "(cached) $ac_c" 1>&6
  1964. else
  1965.   cat > conftest.$ac_ext <<EOF
  1966. #line 1967 "configure"
  1967. #include "confdefs.h"
  1968. /* System header to define __stub macros and hopefully few prototypes,
  1969.     which can conflict with char $ac_func(); below.  */
  1970. #include <assert.h>
  1971. /* Override any gcc2 internal prototype to avoid an error.  */
  1972. /* We use char because int might match the return type of a gcc2
  1973.     builtin and then its argument prototype would still apply.  */
  1974. char $ac_func();
  1975.  
  1976. int main() { t(); return 0; }
  1977. int t() {
  1978.  
  1979. /* The GNU C library defines this for functions which it implements
  1980.     to always fail with ENOSYS.  Some functions are actually named
  1981.     something starting with __ and the normal name is an alias.  */
  1982. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1983. choke me
  1984. #else
  1985. $ac_func();
  1986. #endif
  1987.  
  1988. ; return 0; }
  1989. EOF
  1990. if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1991.   rm -rf conftest*
  1992.   eval "ac_cv_func_$ac_func=yes"
  1993. else
  1994.   rm -rf conftest*
  1995.   eval "ac_cv_func_$ac_func=no"
  1996. fi
  1997. rm -f conftest*
  1998.  
  1999. fi
  2000. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2001.   echo "$ac_t""yes" 1>&6
  2002.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2003.   cat >> confdefs.h <<EOF
  2004. #define $ac_tr_func 1
  2005. EOF
  2006.  break
  2007. else
  2008.   echo "$ac_t""no" 1>&6
  2009. fi
  2010. done
  2011.  
  2012.  
  2013. # Some systems don't have sbrk().
  2014. for ac_func in sbrk
  2015. do
  2016. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2017. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2018.   echo $ac_n "(cached) $ac_c" 1>&6
  2019. else
  2020.   cat > conftest.$ac_ext <<EOF
  2021. #line 2022 "configure"
  2022. #include "confdefs.h"
  2023. /* System header to define __stub macros and hopefully few prototypes,
  2024.     which can conflict with char $ac_func(); below.  */
  2025. #include <assert.h>
  2026. /* Override any gcc2 internal prototype to avoid an error.  */
  2027. /* We use char because int might match the return type of a gcc2
  2028.     builtin and then its argument prototype would still apply.  */
  2029. char $ac_func();
  2030.  
  2031. int main() { t(); return 0; }
  2032. int t() {
  2033.  
  2034. /* The GNU C library defines this for functions which it implements
  2035.     to always fail with ENOSYS.  Some functions are actually named
  2036.     something starting with __ and the normal name is an alias.  */
  2037. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2038. choke me
  2039. #else
  2040. $ac_func();
  2041. #endif
  2042.  
  2043. ; return 0; }
  2044. EOF
  2045. if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2046.   rm -rf conftest*
  2047.   eval "ac_cv_func_$ac_func=yes"
  2048. else
  2049.   rm -rf conftest*
  2050.   eval "ac_cv_func_$ac_func=no"
  2051. fi
  2052. rm -f conftest*
  2053.  
  2054. fi
  2055. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2056.   echo "$ac_t""yes" 1>&6
  2057.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2058.   cat >> confdefs.h <<EOF
  2059. #define $ac_tr_func 1
  2060. EOF
  2061.  
  2062. else
  2063.   echo "$ac_t""no" 1>&6
  2064. fi
  2065. done
  2066.  
  2067.  
  2068. # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
  2069. # enough, but on some of those systems, the assert macro relies on requoting
  2070. # working properly!
  2071. echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
  2072. if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
  2073.   echo $ac_n "(cached) $ac_c" 1>&6
  2074. else
  2075.   cat > conftest.$ac_ext <<EOF
  2076. #line 2077 "configure"
  2077. #include "confdefs.h"
  2078. #include <assert.h>
  2079. #include <stdio.h>
  2080. int main() { t(); return 0; }
  2081. int t() {
  2082.  
  2083. /* check for requoting problems */
  2084. static int a, b, c, d;
  2085. static char *s;
  2086. assert (!strcmp(s, "foo bar baz quux"));
  2087. /* check for newline handling */
  2088. assert (a == b
  2089.         || c == d);
  2090.  
  2091. ; return 0; }
  2092. EOF
  2093. if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2094.   rm -rf conftest*
  2095.   gas_cv_assert_ok=yes
  2096. else
  2097.   rm -rf conftest*
  2098.   gas_cv_assert_ok=no
  2099. fi
  2100. rm -f conftest*
  2101.  
  2102. fi
  2103. echo "$ac_t""$gas_cv_assert_ok" 1>&6
  2104. test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
  2105. #define BROKEN_ASSERT 1
  2106. EOF
  2107.  
  2108.  
  2109.  
  2110. # On some systems, the system header files may not declare malloc, realloc,
  2111. # and free.  There are places where gas needs these functions to have been
  2112. # declared -- such as when taking their addresses.
  2113. gas_test_headers="
  2114. #ifdef HAVE_MEMORY_H
  2115. #include <memory.h>
  2116. #endif
  2117. #ifdef HAVE_STRING_H
  2118. #include <string.h>
  2119. #endif
  2120. #ifdef HAVE_STDLIB_H
  2121. #include <stdlib.h>
  2122. #endif
  2123. #ifdef HAVE_UNISTD_H
  2124. #include <unistd.h>
  2125. #endif
  2126. "
  2127.  
  2128. echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
  2129. if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
  2130.   echo $ac_n "(cached) $ac_c" 1>&6
  2131. else
  2132.   cat > conftest.$ac_ext <<EOF
  2133. #line 2134 "configure"
  2134. #include "confdefs.h"
  2135. $gas_test_headers
  2136. int main() { t(); return 0; }
  2137. int t() {
  2138.  
  2139. typedef char *(*f)();
  2140. f x;
  2141. x = (f) malloc;
  2142.  
  2143. ; return 0; }
  2144. EOF
  2145. if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2146.   rm -rf conftest*
  2147.   gas_cv_decl_needed_malloc=no
  2148. else
  2149.   rm -rf conftest*
  2150.   gas_cv_decl_needed_malloc=yes
  2151. fi
  2152. rm -f conftest*
  2153.  
  2154. fi
  2155. echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
  2156. test $gas_cv_decl_needed_malloc = no || {
  2157.  cat >> confdefs.h <<\EOF
  2158. #define NEED_DECLARATION_MALLOC 1
  2159. EOF
  2160.  
  2161. }
  2162.  
  2163.  
  2164. echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
  2165. if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
  2166.   echo $ac_n "(cached) $ac_c" 1>&6
  2167. else
  2168.   cat > conftest.$ac_ext <<EOF
  2169. #line 2170 "configure"
  2170. #include "confdefs.h"
  2171. $gas_test_headers
  2172. int main() { t(); return 0; }
  2173. int t() {
  2174.  
  2175. typedef void (*f)();
  2176. f x;
  2177. x = (f) free;
  2178.  
  2179. ; return 0; }
  2180. EOF
  2181. if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2182.   rm -rf conftest*
  2183.   gas_cv_decl_needed_free=no
  2184. else
  2185.   rm -rf conftest*
  2186.   gas_cv_decl_needed_free=yes
  2187. fi
  2188. rm -f conftest*
  2189.  
  2190. fi
  2191. echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
  2192. test $gas_cv_decl_needed_free = no || {
  2193.  cat >> confdefs.h <<\EOF
  2194. #define NEED_DECLARATION_FREE 1
  2195. EOF
  2196.  
  2197. }
  2198.  
  2199.  
  2200. # Does errno.h declare errno, or do we have to add a separate declaration
  2201. # for it?
  2202.  
  2203. echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
  2204. if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
  2205.   echo $ac_n "(cached) $ac_c" 1>&6
  2206. else
  2207.   cat > conftest.$ac_ext <<EOF
  2208. #line 2209 "configure"
  2209. #include "confdefs.h"
  2210.  
  2211. #ifdef HAVE_ERRNO_H
  2212. #include <errno.h>
  2213. #endif
  2214.  
  2215. int main() { t(); return 0; }
  2216. int t() {
  2217.  
  2218. typedef int f;
  2219. f x;
  2220. x = (f) errno;
  2221.  
  2222. ; return 0; }
  2223. EOF
  2224. if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2225.   rm -rf conftest*
  2226.   gas_cv_decl_needed_errno=no
  2227. else
  2228.   rm -rf conftest*
  2229.   gas_cv_decl_needed_errno=yes
  2230. fi
  2231. rm -f conftest*
  2232.  
  2233. fi
  2234. echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
  2235. test $gas_cv_decl_needed_errno = no || {
  2236.  cat >> confdefs.h <<\EOF
  2237. #define NEED_DECLARATION_ERRNO 1
  2238. EOF
  2239.  
  2240. }
  2241.  
  2242.  
  2243. HLDFLAGS=
  2244. RPATH_ENVVAR=LD_LIBRARY_PATH
  2245. # If we have shared libraries, try to set rpath reasonably.
  2246. if test "${shared}" = "true"; then
  2247.   case "${host}" in
  2248.   *-*-hpux*)
  2249.     HLDFLAGS='-Wl,+s,+b,$(libdir)'
  2250.     RPATH_ENVVAR=SHLIB_PATH
  2251.     ;;
  2252.   *-*-irix5*)
  2253.     HLDFLAGS='-Wl,-rpath,$(libdir)'
  2254.     ;;
  2255.   *-*-linux*aout*)
  2256.     ;;
  2257.   *-*-linux*)
  2258.     HLDFLAGS='-Wl,-rpath,$(libdir)'
  2259.     ;;
  2260.   *-*-sysv4* | *-*-solaris*)
  2261.     HLDFLAGS='-R $(libdir)'
  2262.     ;;
  2263.   esac
  2264. fi
  2265.  
  2266. ### begin-ADE-local
  2267. # Check for additional host specific CFLAGS.
  2268. echo $ac_n "checking for host dependent CFLAGS""... $ac_c" 1>&6
  2269. other_host_cflags=""
  2270. case "${host}" in
  2271.     m68*-*-amigaos*)    other_host_cflags="-mstackextend" ;;
  2272. esac
  2273. test -n "$other_host_cflags" && CFLAGS="$CFLAGS $other_host_cflags"
  2274. echo "$ac_t""$other_host_cflags" 1>&6
  2275. ### end-ADE-local
  2276.  
  2277. # On SunOS, if the linker supports the -rpath option, use it to
  2278. # prevent ../bfd and ../opcodes from being included in the run time
  2279. # search path.
  2280. case "${host}" in
  2281.   *-*-sunos*)
  2282.     echo 'main () { }' > conftest.c
  2283.     ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
  2284.     if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
  2285.       :
  2286.     elif grep 'No such file' conftest.t >/dev/null 2>&1; then
  2287.       :
  2288.     elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
  2289.       :
  2290.     elif test "${shared}" = "true"; then
  2291.       HLDFLAGS='-Wl,-rpath=$(libdir)'
  2292.     else
  2293.       HLDFLAGS='-Wl,-rpath='
  2294.     fi
  2295.     rm -f conftest.t conftest.c conftest
  2296.     ;;
  2297. esac
  2298.  
  2299.  
  2300.  
  2301. trap '' 1 2 15
  2302. cat > confcache <<\EOF
  2303. # This file is a shell script that caches the results of configure
  2304. # tests run on this system so they can be shared between configure
  2305. # scripts and configure runs.  It is not useful on other systems.
  2306. # If it contains results you don't want to keep, you may remove or edit it.
  2307. #
  2308. # By default, configure uses ./config.cache as the cache file,
  2309. # creating it if it does not exist already.  You can give configure
  2310. # the --cache-file=FILE option to use a different cache file; that is
  2311. # what configure does when it calls configure scripts in
  2312. # subdirectories, so they share the cache.
  2313. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2314. # config.status only pays attention to the cache file if you give it the
  2315. # --recheck option to rerun configure.
  2316. #
  2317. EOF
  2318. # Ultrix sh set writes to stderr and can't be redirected directly,
  2319. # and sets the high bit in the cache file unless we assign to the vars.
  2320. (set) 2>&1 |
  2321.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2322.   >> confcache
  2323. if cmp -s $cache_file confcache; then
  2324.   :
  2325. else
  2326.   if test -w $cache_file; then
  2327.     echo "updating cache $cache_file"
  2328.     cat confcache > $cache_file
  2329.   else
  2330.     echo "not updating unwritable cache $cache_file"
  2331.   fi
  2332. fi
  2333. rm -f confcache
  2334.  
  2335. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2336.  
  2337. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2338. # Let make expand exec_prefix.
  2339. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2340.  
  2341. # Any assignment to VPATH causes Sun make to only execute
  2342. # the first set of double-colon rules, so remove it if not needed.
  2343. # If there is a colon in the path, we need to keep it.
  2344. if test "x$srcdir" = x.; then
  2345.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2346. fi
  2347.  
  2348. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2349.  
  2350. DEFS=-DHAVE_CONFIG_H
  2351.  
  2352. # Without the "./", some shells look in PATH for config.status.
  2353. : ${CONFIG_STATUS=./config.status}
  2354.  
  2355. echo creating $CONFIG_STATUS
  2356. # Some systems, like AmigaOS, won't allow you to remove a script that is
  2357. # being executed, so just move it out of the way instead.
  2358. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  2359. cat > $CONFIG_STATUS <<EOF
  2360. #! /bin/sh
  2361. # Generated automatically by configure.
  2362. # Run this file to recreate the current configuration.
  2363. # This directory was configured as follows,
  2364. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2365. #
  2366. # $0 $ac_configure_args
  2367. #
  2368. # Compiler output produced by configure, useful for debugging
  2369. # configure, is in ./config.log if it exists.
  2370.  
  2371. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2372. for ac_option
  2373. do
  2374.   case "\$ac_option" in
  2375.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2376.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2377.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2378.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2379.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  2380.     exit 0 ;;
  2381.   -help | --help | --hel | --he | --h)
  2382.     echo "\$ac_cs_usage"; exit 0 ;;
  2383.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2384.   esac
  2385. done
  2386.  
  2387. ac_given_srcdir=$srcdir
  2388. ac_given_INSTALL="$INSTALL"
  2389.  
  2390. trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2391. EOF
  2392. cat >> $CONFIG_STATUS <<EOF
  2393.  
  2394. # Protect against being on the right side of a sed subst in config.status.
  2395. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2396.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2397. $ac_vpsub
  2398. $extrasub
  2399. s%@CFLAGS@%$CFLAGS%g
  2400. s%@CPPFLAGS@%$CPPFLAGS%g
  2401. s%@CXXFLAGS@%$CXXFLAGS%g
  2402. s%@DEFS@%$DEFS%g
  2403. s%@LDFLAGS@%$LDFLAGS%g
  2404. s%@LIBS@%$LIBS%g
  2405. s%@exec_prefix@%$exec_prefix%g
  2406. s%@prefix@%$prefix%g
  2407. s%@program_transform_name@%$program_transform_name%g
  2408. s%@bindir@%$bindir%g
  2409. s%@sbindir@%$sbindir%g
  2410. s%@libexecdir@%$libexecdir%g
  2411. s%@datadir@%$datadir%g
  2412. s%@sysconfdir@%$sysconfdir%g
  2413. s%@sharedstatedir@%$sharedstatedir%g
  2414. s%@localstatedir@%$localstatedir%g
  2415. s%@libdir@%$libdir%g
  2416. s%@includedir@%$includedir%g
  2417. s%@oldincludedir@%$oldincludedir%g
  2418. s%@infodir@%$infodir%g
  2419. s%@guidedir@%$guidedir%g
  2420. s%@psdir@%$psdir%g
  2421. s%@dvidir@%$dvidir%g
  2422. s%@mandir@%$mandir%g
  2423. s%@host@%$host%g
  2424. s%@host_alias@%$host_alias%g
  2425. s%@host_cpu@%$host_cpu%g
  2426. s%@host_vendor@%$host_vendor%g
  2427. s%@host_os@%$host_os%g
  2428. s%@target@%$target%g
  2429. s%@target_alias@%$target_alias%g
  2430. s%@target_cpu@%$target_cpu%g
  2431. s%@target_vendor@%$target_vendor%g
  2432. s%@target_os@%$target_os%g
  2433. s%@build@%$build%g
  2434. s%@build_alias@%$build_alias%g
  2435. s%@build_cpu@%$build_cpu%g
  2436. s%@build_vendor@%$build_vendor%g
  2437. s%@build_os@%$build_os%g
  2438. /@target_frag@/r $target_frag
  2439. s%@target_frag@%%g
  2440. s%@extra_objects@%$extra_objects%g
  2441. s%@target_cpu_type@%$target_cpu_type%g
  2442. s%@obj_format@%$obj_format%g
  2443. s%@atof@%$atof%g
  2444. s%@OPCODES_DEP@%$OPCODES_DEP%g
  2445. s%@OPCODES_LIB@%$OPCODES_LIB%g
  2446. s%@BFDDEP@%$BFDDEP%g
  2447. s%@BFDLIB@%$BFDLIB%g
  2448. s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
  2449. s%@CC@%$CC%g
  2450. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2451. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2452. s%@CPP@%$CPP%g
  2453. s%@ALLOCA@%$ALLOCA%g
  2454. s%@HLDFLAGS@%$HLDFLAGS%g
  2455. s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
  2456.  
  2457. CEOF
  2458. EOF
  2459. cat >> $CONFIG_STATUS <<EOF
  2460.  
  2461. CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
  2462. EOF
  2463. cat >> $CONFIG_STATUS <<\EOF
  2464. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2465.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2466.   case "$ac_file" in
  2467.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2468.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2469.   *) ac_file_in="${ac_file}.in" ;;
  2470.   esac
  2471.  
  2472.   # Adjust relative srcdir, etc. for subdirectories.
  2473.  
  2474.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2475.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2476.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2477.     # The file is in a subdirectory.
  2478.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2479.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2480.     # A "../" for each directory in $ac_dir_suffix.
  2481.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2482.   else
  2483.     ac_dir_suffix= ac_dots=
  2484.   fi
  2485.  
  2486.   case "$ac_given_srcdir" in
  2487.   .)  srcdir=.
  2488.       if test -z "$ac_dots"; then top_srcdir=.
  2489.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2490.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2491.   *) # Relative path.
  2492.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2493.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2494.   esac
  2495.  
  2496.   case "$ac_given_INSTALL" in
  2497.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2498.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2499.   esac
  2500.   echo creating "$ac_file"
  2501.   rm -f "$ac_file"
  2502.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2503.   case "$ac_file" in
  2504.   *Makefile*) ac_comsub="1i\\
  2505. # $configure_input" ;;
  2506.   *) ac_comsub= ;;
  2507.   esac
  2508.   sed -e "$ac_comsub
  2509. s%@configure_input@%$configure_input%g
  2510. s%@srcdir@%$srcdir%g
  2511. s%@top_srcdir@%$top_srcdir%g
  2512. s%@INSTALL@%$INSTALL%g
  2513. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2514. fi; done
  2515. rm -f conftest.subs
  2516.  
  2517. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2518. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2519. #
  2520. # ac_d sets the value in "#define NAME VALUE" lines.
  2521. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2522. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2523. ac_dC='\3'
  2524. ac_dD='%g'
  2525. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2526. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2527. ac_uB='\([     ]\)%\1#\2define\3'
  2528. ac_uC=' '
  2529. ac_uD='\4%g'
  2530. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2531. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2532. ac_eB='$%\1#\2define\3'
  2533. ac_eC=' '
  2534. ac_eD='%g'
  2535.  
  2536. CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
  2537. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2538.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2539.   case "$ac_file" in
  2540.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2541.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2542.   *) ac_file_in="${ac_file}.in" ;;
  2543.   esac
  2544.  
  2545.   echo creating $ac_file
  2546.  
  2547.   rm -f conftest.frag conftest.in conftest.out
  2548.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2549.  
  2550. EOF
  2551.  
  2552. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2553. # the proper values into config.h.in to produce config.h.  And first:
  2554. # Protect against being on the right side of a sed subst in config.status.
  2555. # Protect against being in an unquoted here document in config.status.
  2556. rm -f conftest.vals
  2557. cat > conftest.hdr <<\EOF
  2558. s/[\\&%]/\\&/g
  2559. s%[\\$`]%\\&%g
  2560. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2561. s%ac_d%ac_u%gp
  2562. s%ac_u%ac_e%gp
  2563. EOF
  2564. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2565. rm -f conftest.hdr
  2566.  
  2567. # This sed command replaces #undef with comments.  This is necessary, for
  2568. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2569. # on some systems where configure will not decide to define it.
  2570. cat >> conftest.vals <<\EOF
  2571. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2572. EOF
  2573.  
  2574. # Break up conftest.vals because some shells have a limit on
  2575. # the size of here documents, and old seds have small limits too.
  2576. # Maximum number of lines to put in a single here document.
  2577. ac_max_here_lines=12
  2578.  
  2579. rm -f conftest.tail
  2580. while :
  2581. do
  2582.   ac_lines=`grep -c . conftest.vals`
  2583.   # grep -c gives empty output for an empty file on some AIX systems.
  2584.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2585.   # Write a limited-size here document to conftest.frag.
  2586.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2587.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2588.   echo 'CEOF
  2589.   sed -f conftest.frag conftest.in > conftest.out
  2590.   rm -f conftest.in
  2591.   mv conftest.out conftest.in
  2592. ' >> $CONFIG_STATUS
  2593.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2594.   rm -f conftest.vals
  2595.   mv conftest.tail conftest.vals
  2596. done
  2597. rm -f conftest.vals
  2598.  
  2599. cat >> $CONFIG_STATUS <<\EOF
  2600.   rm -f conftest.frag conftest.h
  2601.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2602.   cat conftest.in >> conftest.h
  2603.   rm -f conftest.in
  2604.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2605.     echo "$ac_file is unchanged"
  2606.     rm -f conftest.h
  2607.   else
  2608.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2609.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2610.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2611.       # The file is in a subdirectory.
  2612.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2613.     fi
  2614.     rm -f $ac_file
  2615.     mv conftest.h $ac_file
  2616.   fi
  2617. fi; done
  2618.  
  2619. EOF
  2620.  
  2621. cat >> $CONFIG_STATUS <<EOF
  2622. ac_sources="$files"
  2623. ac_dests="$links"
  2624. EOF
  2625.  
  2626. cat >> $CONFIG_STATUS <<\EOF
  2627. srcdir=$ac_given_srcdir
  2628. while test -n "$ac_sources"; do
  2629.   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
  2630.   set $ac_sources; ac_source=$1; shift; ac_sources=$*
  2631.  
  2632.   echo "linking $srcdir/$ac_source to $ac_dest"
  2633.  
  2634.   if test ! -r $srcdir/$ac_source; then
  2635.     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
  2636.   fi
  2637.   rm -f $ac_dest
  2638.  
  2639.   # Make relative symlinks.
  2640.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2641.   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  2642.   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  2643.     # The dest file is in a subdirectory.
  2644.     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  2645.     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
  2646.     # A "../" for each directory in $ac_dest_dir_suffix.
  2647.     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  2648.   else
  2649.     ac_dest_dir_suffix= ac_dots=
  2650.   fi
  2651.  
  2652.   case "$srcdir" in
  2653.   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  2654.   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  2655.   esac
  2656.  
  2657.   # Make a symlink if possible; otherwise try a hard link.
  2658.   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
  2659.     ln $srcdir/$ac_source $ac_dest; then :
  2660.   else
  2661.     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  2662.   fi
  2663. done
  2664.  
  2665.  
  2666. exit 0
  2667. EOF
  2668. chmod +x $CONFIG_STATUS
  2669. rm -f CONFIG.STATUS.old
  2670. rm -fr confdefs* $ac_clean_files
  2671. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2672.  
  2673.