home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / ld / configure < prev    next >
Text File  |  1996-10-01  |  50KB  |  1,605 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-targets        alternative target configurations"
  16. ac_help="$ac_help
  17.   --enable-shared         build shared BFD library"
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40. bindir='${exec_prefix}/bin'
  41. sbindir='${exec_prefix}/sbin'
  42. libexecdir='${exec_prefix}/libexec'
  43. datadir='${prefix}/share'
  44. sysconfdir='${prefix}/etc'
  45. sharedstatedir='${prefix}/com'
  46. localstatedir='${prefix}/var'
  47. libdir='${exec_prefix}/lib'
  48. includedir='${prefix}/include'
  49. oldincludedir='/usr/include'
  50. infodir='${prefix}/info'
  51. guidedir='${prefix}/guide'
  52. psdir='${prefix}/ps'
  53. dvidir='${prefix}/dvi'
  54. mandir='${prefix}/man'
  55.  
  56. # Initialize some other variables.
  57. subdirs=
  58. MFLAGS= MAKEFLAGS=
  59.  
  60. ac_prev=
  61. for ac_option
  62. do
  63.  
  64.   # If the previous option needs an argument, assign it.
  65.   if test -n "$ac_prev"; then
  66.     eval "$ac_prev=\$ac_option"
  67.     ac_prev=
  68.     continue
  69.   fi
  70.  
  71.   case "$ac_option" in
  72.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  73.   *) ac_optarg= ;;
  74.   esac
  75.  
  76.   # Accept the important Cygnus configure options, so we can diagnose typos.
  77.  
  78.   case "$ac_option" in
  79.  
  80.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  81.     ac_prev=bindir ;;
  82.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  83.     bindir="$ac_optarg" ;;
  84.  
  85.   -build | --build | --buil | --bui | --bu)
  86.     ac_prev=build ;;
  87.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  88.     build="$ac_optarg" ;;
  89.  
  90.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  91.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  92.     ac_prev=cache_file ;;
  93.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  94.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  95.     cache_file="$ac_optarg" ;;
  96.  
  97.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  98.     ac_prev=datadir ;;
  99.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  100.   | --da=*)
  101.     datadir="$ac_optarg" ;;
  102.  
  103.   -disable-* | --disable-*)
  104.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  105.     # Reject names that are not valid shell variable names.
  106.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  107.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  108.     fi
  109.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  110.     eval "enable_${ac_feature}=no" ;;
  111.  
  112.   -enable-* | --enable-*)
  113.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  114.     # Reject names that are not valid shell variable names.
  115.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  116.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  117.     fi
  118.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  119.     case "$ac_option" in
  120.       *=*) ;;
  121.       *) ac_optarg=yes ;;
  122.     esac
  123.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  124.  
  125.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  126.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  127.   | --exec | --exe | --ex)
  128.     ac_prev=exec_prefix ;;
  129.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  130.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  131.   | --exec=* | --exe=* | --ex=*)
  132.     exec_prefix="$ac_optarg" ;;
  133.  
  134.   -gas | --gas | --ga | --g)
  135.     # Obsolete; use --with-gas.
  136.     with_gas=yes ;;
  137.  
  138.   -help | --help | --hel | --he)
  139.     # Omit some internal or obsolete options to make the list less imposing.
  140.     # This message is too long to be a string in the A/UX 3.1 sh.
  141.     cat << EOF
  142. Usage: configure [options] [host]
  143. Options: [defaults in brackets after descriptions]
  144. Configuration:
  145.   --cache-file=FILE       cache test results in FILE
  146.   --help                  print this message
  147.   --no-create             do not create output files
  148.   --quiet, --silent       do not print \`checking...' messages
  149.   --version               print the version of autoconf that created configure
  150. Directory and file names:
  151.   --prefix=PREFIX         install architecture-independent files in PREFIX
  152.                           [$ac_default_prefix]
  153.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  154.                           [same as prefix]
  155.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  156.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  157.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  158.   --datadir=DIR           read-only architecture-independent data in DIR
  159.                           [PREFIX/share]
  160.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  161.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  162.                           [PREFIX/com]
  163.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  164.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  165.   --includedir=DIR        C header files in DIR [PREFIX/include]
  166.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  167.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  168.   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  169.   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  170.   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  171.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  172.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  173.   --program-prefix=PREFIX prepend PREFIX to installed program names
  174.   --program-suffix=SUFFIX append SUFFIX to installed program names
  175.   --program-transform-name=PROGRAM
  176.                           run sed PROGRAM on installed program names
  177. EOF
  178.     cat << EOF
  179. Host type:
  180.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  181.   --host=HOST             configure for HOST [guessed]
  182.   --target=TARGET         configure for TARGET [TARGET=HOST]
  183. Features and packages:
  184.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  185.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  186.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  187.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  188.   --x-includes=DIR        X include files are in DIR
  189.   --x-libraries=DIR       X library files are in DIR
  190. EOF
  191.     if test -n "$ac_help"; then
  192.       echo "--enable and --with options recognized:$ac_help"
  193.     fi
  194.     exit 0 ;;
  195.  
  196.   -host | --host | --hos | --ho)
  197.     ac_prev=host ;;
  198.   -host=* | --host=* | --hos=* | --ho=*)
  199.     host="$ac_optarg" ;;
  200.  
  201.   -includedir | --includedir | --includedi | --included | --include \
  202.   | --includ | --inclu | --incl | --inc)
  203.     ac_prev=includedir ;;
  204.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  205.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  206.     includedir="$ac_optarg" ;;
  207.  
  208.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  209.     ac_prev=infodir ;;
  210.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  211.     infodir="$ac_optarg" ;;
  212.  
  213.  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  214.    ac_prev=guidedir ;;
  215.  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  216.  
  217.  -psdir | --psdir | --psdi | --psd | --ps)
  218.    ac_prev=psdir ;;
  219.  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  220.  
  221.  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  222.    ac_prev=dvidir ;;
  223.  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  224.  
  225.   -libdir | --libdir | --libdi | --libd)
  226.     ac_prev=libdir ;;
  227.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  228.     libdir="$ac_optarg" ;;
  229.  
  230.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  231.   | --libexe | --libex | --libe)
  232.     ac_prev=libexecdir ;;
  233.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  234.   | --libexe=* | --libex=* | --libe=*)
  235.     libexecdir="$ac_optarg" ;;
  236.  
  237.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  238.   | --localstate | --localstat | --localsta | --localst \
  239.   | --locals | --local | --loca | --loc | --lo)
  240.     ac_prev=localstatedir ;;
  241.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  242.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  243.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  244.     localstatedir="$ac_optarg" ;;
  245.  
  246.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  247.     ac_prev=mandir ;;
  248.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  249.     mandir="$ac_optarg" ;;
  250.  
  251.   -nfp | --nfp | --nf)
  252.     # Obsolete; use --without-fp.
  253.     with_fp=no ;;
  254.  
  255.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  256.   | --no-cr | --no-c)
  257.     no_create=yes ;;
  258.  
  259.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  260.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  261.     no_recursion=yes ;;
  262.  
  263.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  264.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  265.   | --oldin | --oldi | --old | --ol | --o)
  266.     ac_prev=oldincludedir ;;
  267.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  268.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  269.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  270.     oldincludedir="$ac_optarg" ;;
  271.  
  272.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  273.     ac_prev=prefix ;;
  274.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  275.     prefix="$ac_optarg" ;;
  276.  
  277.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  278.   | --program-pre | --program-pr | --program-p)
  279.     ac_prev=program_prefix ;;
  280.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  281.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  282.     program_prefix="$ac_optarg" ;;
  283.  
  284.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  285.   | --program-suf | --program-su | --program-s)
  286.     ac_prev=program_suffix ;;
  287.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  288.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  289.     program_suffix="$ac_optarg" ;;
  290.  
  291.   -program-transform-name | --program-transform-name \
  292.   | --program-transform-nam | --program-transform-na \
  293.   | --program-transform-n | --program-transform- \
  294.   | --program-transform | --program-transfor \
  295.   | --program-transfo | --program-transf \
  296.   | --program-trans | --program-tran \
  297.   | --progr-tra | --program-tr | --program-t)
  298.     ac_prev=program_transform_name ;;
  299.   -program-transform-name=* | --program-transform-name=* \
  300.   | --program-transform-nam=* | --program-transform-na=* \
  301.   | --program-transform-n=* | --program-transform-=* \
  302.   | --program-transform=* | --program-transfor=* \
  303.   | --program-transfo=* | --program-transf=* \
  304.   | --program-trans=* | --program-tran=* \
  305.   | --progr-tra=* | --program-tr=* | --program-t=*)
  306.     program_transform_name="$ac_optarg" ;;
  307.  
  308.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  309.   | -silent | --silent | --silen | --sile | --sil)
  310.     silent=yes ;;
  311.  
  312.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  313.     ac_prev=sbindir ;;
  314.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  315.   | --sbi=* | --sb=*)
  316.     sbindir="$ac_optarg" ;;
  317.  
  318.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  319.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  320.   | --sharedst | --shareds | --shared | --share | --shar \
  321.   | --sha | --sh)
  322.     ac_prev=sharedstatedir ;;
  323.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  324.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  325.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  326.   | --sha=* | --sh=*)
  327.     sharedstatedir="$ac_optarg" ;;
  328.  
  329.   -site | --site | --sit)
  330.     ac_prev=site ;;
  331.   -site=* | --site=* | --sit=*)
  332.     site="$ac_optarg" ;;
  333.  
  334.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  335.     ac_prev=srcdir ;;
  336.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  337.     srcdir="$ac_optarg" ;;
  338.  
  339.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  340.   | --syscon | --sysco | --sysc | --sys | --sy)
  341.     ac_prev=sysconfdir ;;
  342.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  343.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  344.     sysconfdir="$ac_optarg" ;;
  345.  
  346.   -target | --target | --targe | --targ | --tar | --ta | --t)
  347.     ac_prev=target ;;
  348.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  349.     target="$ac_optarg" ;;
  350.  
  351.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  352.     verbose=yes ;;
  353.  
  354.   -version | --version | --versio | --versi | --vers)
  355.     echo "configure generated by autoconf version 2.10"
  356.     exit 0 ;;
  357.  
  358.   -with-* | --with-*)
  359.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  360.     # Reject names that are not valid shell variable names.
  361.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  362.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  363.     fi
  364.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  365.     case "$ac_option" in
  366.       *=*) ;;
  367.       *) ac_optarg=yes ;;
  368.     esac
  369.     eval "with_${ac_package}='$ac_optarg'" ;;
  370.  
  371.   -without-* | --without-*)
  372.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  373.     # Reject names that are not valid shell variable names.
  374.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  375.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  376.     fi
  377.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  378.     eval "with_${ac_package}=no" ;;
  379.  
  380.   --x)
  381.     # Obsolete; use --with-x.
  382.     with_x=yes ;;
  383.  
  384.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  385.   | --x-incl | --x-inc | --x-in | --x-i)
  386.     ac_prev=x_includes ;;
  387.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  388.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  389.     x_includes="$ac_optarg" ;;
  390.  
  391.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  392.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  393.     ac_prev=x_libraries ;;
  394.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  395.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  396.     x_libraries="$ac_optarg" ;;
  397.  
  398.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  399.     ;;
  400.  
  401.   *)
  402.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  403.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  404.     fi
  405.     if test "x$nonopt" != xNONE; then
  406.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  407.     fi
  408.     nonopt="$ac_option"
  409.     ;;
  410.  
  411.   esac
  412. done
  413.  
  414. if test -n "$ac_prev"; then
  415.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  416. fi
  417.  
  418. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  419.  
  420. # File descriptor usage:
  421. # 0 standard input
  422. # 1 file creation
  423. # 2 errors and warnings
  424. # 3 some systems may open it to /dev/tty
  425. # 4 used on the Kubota Titan
  426. # 6 checking for... messages and results
  427. # 5 compiler messages saved in config.log
  428. if test "$silent" = yes; then
  429.   exec 6>/dev/null
  430. else
  431.   exec 6>&1
  432. fi
  433. exec 5>./config.log
  434.  
  435. echo "\
  436. This file contains any messages produced by compilers while
  437. running configure, to aid debugging if configure makes a mistake.
  438. " 1>&5
  439.  
  440. # Strip out --no-create and --no-recursion so they do not pile up.
  441. # Also quote any args containing shell metacharacters.
  442. ac_configure_args=
  443. for ac_arg
  444. do
  445.   case "$ac_arg" in
  446.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  447.   | --no-cr | --no-c) ;;
  448.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  449.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  450.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  451.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  452.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  453.   esac
  454. done
  455.  
  456. # NLS nuisances.
  457. # Only set LANG and LC_ALL to C if already set.
  458. # These must not be set unconditionally because not all systems understand
  459. # e.g. LANG=C (notably SCO).
  460. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  461. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  462.  
  463. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  464. rm -rf conftest* confdefs.h
  465. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  466. echo > confdefs.h
  467.  
  468. # A filename unique to this package, relative to the directory that
  469. # configure is in, which we can look for to find out if srcdir is correct.
  470. ac_unique_file=ldmain.c
  471.  
  472. # Find the source files, if location was not specified.
  473. if test -z "$srcdir"; then
  474.   ac_srcdir_defaulted=yes
  475.   # Try the directory containing this script, then its parent.
  476.   ac_prog=$0
  477.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  478.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  479.   srcdir=$ac_confdir
  480.   if test ! -r $srcdir/$ac_unique_file; then
  481.     srcdir=..
  482.   fi
  483. else
  484.   ac_srcdir_defaulted=no
  485. fi
  486. if test ! -r $srcdir/$ac_unique_file; then
  487.   if test "$ac_srcdir_defaulted" = yes; then
  488.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  489.   else
  490.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  491.   fi
  492. fi
  493. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  494.  
  495. # Prefer explicitly selected file to automatically selected ones.
  496. if test -z "$CONFIG_SITE"; then
  497.   if test "x$prefix" != xNONE; then
  498.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  499.   else
  500.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  501.   fi
  502. fi
  503. for ac_site_file in $CONFIG_SITE; do
  504.   if test -r "$ac_site_file"; then
  505.     echo "loading site script $ac_site_file"
  506.     . "$ac_site_file"
  507.   fi
  508. done
  509.  
  510. if test -r "$cache_file"; then
  511.   echo "loading cache $cache_file"
  512.   . $cache_file
  513. else
  514.   echo "creating cache $cache_file"
  515.   > $cache_file
  516. fi
  517.  
  518. ac_ext=c
  519. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  520. ac_cpp='$CPP $CPPFLAGS'
  521. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  522. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  523.  
  524. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  525.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  526.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  527.     ac_n= ac_c='
  528. ' ac_t='    '
  529.   else
  530.     ac_n=-n ac_c= ac_t=
  531.   fi
  532. else
  533.   ac_n= ac_c='\c' ac_t=
  534. fi
  535.  
  536.  
  537.  
  538. # Check whether --enable-targets or --disable-targets was given.
  539. if test "${enable_targets+set}" = set; then
  540.   enableval="$enable_targets"
  541.   case "${enableval}" in
  542.   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
  543.             ;;
  544.   no)       enable_targets= ;;
  545.   *)        enable_targets=$enableval ;;
  546. esac
  547. fi
  548. # Check whether --enable-shared or --disable-shared was given.
  549. if test "${enable_shared+set}" = set; then
  550.   enableval="$enable_shared"
  551.   case "${enableval}" in
  552.   yes) shared=true ;;
  553.   no)  shared=false ;;
  554.   *bfd*) shared=true ;;
  555.   *) shared=false ;;
  556. esac
  557. fi
  558.  
  559.  
  560.  
  561. ac_aux_dir=
  562. for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
  563.   if test -f $ac_dir/install-sh; then
  564.     ac_aux_dir=$ac_dir
  565.     ac_install_sh="$ac_aux_dir/install-sh -c"
  566.     break
  567.   elif test -f $ac_dir/install.sh; then
  568.     ac_aux_dir=$ac_dir
  569.     ac_install_sh="$ac_aux_dir/install.sh -c"
  570.     break
  571.   fi
  572. done
  573. if test -z "$ac_aux_dir"; then
  574.   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
  575. fi
  576. ac_config_guess=$ac_aux_dir/config.guess
  577. ac_config_sub=$ac_aux_dir/config.sub
  578. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  579.  
  580.  
  581. # Do some error checking and defaulting for the host and target type.
  582. # The inputs are:
  583. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  584. #
  585. # The rules are:
  586. # 1. You are not allowed to specify --host, --target, and nonopt at the
  587. #    same time.
  588. # 2. Host defaults to nonopt.
  589. # 3. If nonopt is not specified, then host defaults to the current host,
  590. #    as determined by config.guess.
  591. # 4. Target and build default to nonopt.
  592. # 5. If nonopt is not specified, then target and build default to host.
  593.  
  594. # The aliases save the names the user supplied, while $host etc.
  595. # will get canonicalized.
  596. case $host---$target---$nonopt in
  597. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  598. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  599. esac
  600.  
  601.  
  602. # Make sure we can run config.sub.
  603. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  604. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  605. fi
  606.  
  607. echo $ac_n "checking host system type""... $ac_c" 1>&6
  608.  
  609. host_alias=$host
  610. case "$host_alias" in
  611. NONE)
  612.   case $nonopt in
  613.   NONE)
  614.     if host_alias=`$ac_config_guess`; then :
  615.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  616.     fi ;;
  617.   *) host_alias=$nonopt ;;
  618.   esac ;;
  619. esac
  620.  
  621. host=`$ac_config_sub $host_alias`
  622. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  623. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  624. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  625. echo "$ac_t""$host" 1>&6
  626.  
  627. echo $ac_n "checking target system type""... $ac_c" 1>&6
  628.  
  629. target_alias=$target
  630. case "$target_alias" in
  631. NONE)
  632.   case $nonopt in
  633.   NONE) target_alias=$host_alias ;;
  634.   *) target_alias=$nonopt ;;
  635.   esac ;;
  636. esac
  637.  
  638. target=`$ac_config_sub $target_alias`
  639. target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  640. target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  641. target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  642. echo "$ac_t""$target" 1>&6
  643.  
  644. echo $ac_n "checking build system type""... $ac_c" 1>&6
  645.  
  646. build_alias=$build
  647. case "$build_alias" in
  648. NONE)
  649.   case $nonopt in
  650.   NONE) build_alias=$host_alias ;;
  651.   *) build_alias=$nonopt ;;
  652.   esac ;;
  653. esac
  654.  
  655. build=`$ac_config_sub $build_alias`
  656. build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  657. build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  658. build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  659. echo "$ac_t""$build" 1>&6
  660.  
  661. test "$host_alias" != "$target_alias" &&
  662.   test "$program_prefix$program_suffix$program_transform_name" = \
  663.     NONENONEs,x,x, &&
  664.   program_prefix=${target_alias}-
  665.  
  666. if test -z "$target" ; then
  667.     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
  668. fi
  669. if test -z "$host" ; then
  670.     { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
  671. fi
  672. if test "$program_transform_name" = s,x,x,; then
  673.   program_transform_name=
  674. else
  675.   # Double any \ or $.  echo might interpret backslashes.
  676.   cat <<\EOF_SED > conftestsed
  677. s,\\,\\\\,g; s,\$,$$,g
  678. EOF_SED
  679.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  680.   rm -f conftestsed
  681. fi
  682. test "$program_prefix" != NONE &&
  683.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  684. # Use a double $ so make ignores it.
  685. test "$program_suffix" != NONE &&
  686.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  687.  
  688. # sed with no file args requires a program.
  689. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  690.  
  691.  
  692. # host-specific stuff:
  693.  
  694. # Extract the first word of "gcc", so it can be a program name with args.
  695. set dummy gcc; ac_word=$2
  696. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  697. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  698.   echo $ac_n "(cached) $ac_c" 1>&6
  699. else
  700.   if test -n "$CC"; then
  701.   ac_cv_prog_CC="$CC" # Let the user override the test.
  702. else
  703.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  704.   for ac_dir in $PATH; do
  705.     test -z "$ac_dir" && ac_dir=.
  706.     if test -f $ac_dir/$ac_word; then
  707.       ac_cv_prog_CC="gcc"
  708.       break
  709.     fi
  710.   done
  711.   IFS="$ac_save_ifs"
  712. fi
  713. fi
  714. CC="$ac_cv_prog_CC"
  715. if test -n "$CC"; then
  716.   echo "$ac_t""$CC" 1>&6
  717. else
  718.   echo "$ac_t""no" 1>&6
  719. fi
  720.  
  721. if test -z "$CC"; then
  722.   # Extract the first word of "cc", so it can be a program name with args.
  723. set dummy cc; ac_word=$2
  724. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  725. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  726.   echo $ac_n "(cached) $ac_c" 1>&6
  727. else
  728.   if test -n "$CC"; then
  729.   ac_cv_prog_CC="$CC" # Let the user override the test.
  730. else
  731.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  732.   ac_prog_rejected=no
  733.   for ac_dir in $PATH; do
  734.     test -z "$ac_dir" && ac_dir=.
  735.     if test -f $ac_dir/$ac_word; then
  736.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  737.         ac_prog_rejected=yes
  738.     continue
  739.       fi
  740.       ac_cv_prog_CC="cc"
  741.       break
  742.     fi
  743.   done
  744.   IFS="$ac_save_ifs"
  745. if test $ac_prog_rejected = yes; then
  746.   # We found a bogon in the path, so make sure we never use it.
  747.   set dummy $ac_cv_prog_CC
  748.   shift
  749.   if test $# -gt 0; then
  750.     # We chose a different compiler from the bogus one.
  751.     # However, it has the same basename, so the bogon will be chosen
  752.     # first if we set CC to just the basename; use the full file name.
  753.     shift
  754.     set dummy "$ac_dir/$ac_word" "$@"
  755.     shift
  756.     ac_cv_prog_CC="$@"
  757.   fi
  758. fi
  759. fi
  760. fi
  761. CC="$ac_cv_prog_CC"
  762. if test -n "$CC"; then
  763.   echo "$ac_t""$CC" 1>&6
  764. else
  765.   echo "$ac_t""no" 1>&6
  766. fi
  767.  
  768.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  769. fi
  770.  
  771. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  772. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  773.   echo $ac_n "(cached) $ac_c" 1>&6
  774. else
  775.   cat > conftest.c <<EOF
  776. #ifdef __GNUC__
  777.   yes;
  778. #endif
  779. EOF
  780. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  781.   ac_cv_prog_gcc=yes
  782. else
  783.   ac_cv_prog_gcc=no
  784. fi
  785. fi
  786.  
  787. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  788. if test $ac_cv_prog_gcc = yes; then
  789.   GCC=yes
  790.   if test "${CFLAGS+set}" != set; then
  791.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  792. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  793.   echo $ac_n "(cached) $ac_c" 1>&6
  794. else
  795.   echo 'void f(){}' > conftest.c
  796. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  797.   ac_cv_prog_gcc_g=yes
  798. else
  799.   ac_cv_prog_gcc_g=no
  800. fi
  801. rm -f conftest*
  802.  
  803. fi
  804.  
  805. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  806.     if test $ac_cv_prog_gcc_g = yes; then
  807.       CFLAGS="-g -O2"
  808.     else
  809.       CFLAGS="-O2"
  810.     fi
  811.   fi
  812. else
  813.   GCC=
  814.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  815. fi
  816.  
  817. # Find a good install program.  We prefer a C program (faster),
  818. # so one script is as good as another.  But avoid the broken or
  819. # incompatible versions:
  820. # SysV /etc/install, /usr/sbin/install
  821. # SunOS /usr/etc/install
  822. # IRIX /sbin/install
  823. # AIX /bin/install
  824. # AmigaOS /c/install
  825. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  826. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  827. # ./install, which can be erroneously created by make from ./install.sh.
  828. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  829. if test -z "$INSTALL"; then
  830. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  831.   echo $ac_n "(cached) $ac_c" 1>&6
  832. else
  833.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  834.   for ac_dir in $PATH; do
  835.     # Account for people who put trailing slashes in PATH elements.
  836.     case "$ac_dir/" in
  837.     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  838.     *)
  839.       # OSF1 and SCO ODT 3.0 have their own names for install.
  840.       for ac_prog in ginstall installbsd scoinst install; do
  841.         if test -f $ac_dir/$ac_prog; then
  842.       if test $ac_prog = install &&
  843.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  844.         # AIX install.  It has an incompatible calling convention.
  845.         # OSF/1 installbsd also uses dspmsg, but is usable.
  846.         :
  847.       else
  848.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  849.         break 2
  850.       fi
  851.     fi
  852.       done
  853.       ;;
  854.     esac
  855.   done
  856.   IFS="$ac_save_ifs"
  857.  
  858. fi
  859.   if test "${ac_cv_path_install+set}" = set; then
  860.     INSTALL="$ac_cv_path_install"
  861.   else
  862.     # As a last resort, use the slow shell script.  We don't cache a
  863.     # path for INSTALL within a source directory, because that will
  864.     # break other packages using the cache if that directory is
  865.     # removed, or if the path is relative.
  866.     INSTALL="$ac_install_sh"
  867.   fi
  868. fi
  869. echo "$ac_t""$INSTALL" 1>&6
  870.  
  871. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  872. # It thinks the first close brace ends the variable substitution.
  873. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  874.  
  875. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  876.  
  877.  
  878. . ${srcdir}/configure.host
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887. # For most hosts we can use a simple definition to pick up the BFD and
  888. # opcodes libraries.  However, if we are building shared libraries, we
  889. # need to handle some hosts specially.
  890. BFDLIB='-L../bfd -lbfd'
  891. case "${host}" in
  892. *-*-sunos*)
  893.   # On SunOS, we must link against the name we are going to install,
  894.   # not -lbfd, since SunOS does not support SONAME.
  895.   if test "${shared}" = "true"; then
  896.     BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
  897.   fi
  898.   ;;
  899. alpha*-*-osf*)
  900.   # On Alpha OSF/1, the native linker searches all the -L
  901.   # directories for any LIB.so files, and only then searches for any
  902.   # LIB.a files.  That means that if there is an installed
  903.   # libbfd.so, but this build is not done with --enable-shared, the
  904.   # link will wind up being against the install libbfd.so rather
  905.   # than the newly built libbfd.  To avoid this, we must explicitly
  906.   # link against libbfd.a when --enable-shared is not used.
  907.   if test "${shared}" != "true"; then
  908.     BFDLIB='../bfd/libbfd.a'
  909.   fi
  910.   ;;
  911. esac
  912.  
  913.  
  914. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  915. # On Suns, sometimes $CPP names a directory.
  916. if test -n "$CPP" && test -d "$CPP"; then
  917.   CPP=
  918. fi
  919. if test -z "$CPP"; then
  920. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  921.   echo $ac_n "(cached) $ac_c" 1>&6
  922. else
  923.     # This must be in double quotes, not single quotes, because CPP may get
  924.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  925.   CPP="${CC-cc} -E"
  926.   # On the NeXT, cc -E runs the code through the compiler's parser,
  927.   # not just through cpp.
  928.   cat > conftest.$ac_ext <<EOF
  929. #line 930 "configure"
  930. #include "confdefs.h"
  931. #include <assert.h>
  932. Syntax Error
  933. EOF
  934. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  935. { (eval echo configure:936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  936. ac_err=`grep -v '^ *+' conftest.out`
  937. if test -z "$ac_err"; then
  938.   :
  939. else
  940.   echo "$ac_err" >&5
  941.   rm -rf conftest*
  942.   CPP="${CC-cc} -E -traditional-cpp"
  943.   cat > conftest.$ac_ext <<EOF
  944. #line 945 "configure"
  945. #include "confdefs.h"
  946. #include <assert.h>
  947. Syntax Error
  948. EOF
  949. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  950. { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  951. ac_err=`grep -v '^ *+' conftest.out`
  952. if test -z "$ac_err"; then
  953.   :
  954. else
  955.   echo "$ac_err" >&5
  956.   rm -rf conftest*
  957.   CPP=/lib/cpp
  958. fi
  959. rm -f conftest*
  960. fi
  961. rm -f conftest*
  962.   ac_cv_prog_CPP="$CPP"
  963. fi
  964.   CPP="$ac_cv_prog_CPP"
  965. else
  966.   ac_cv_prog_CPP="$CPP"
  967. fi
  968. echo "$ac_t""$CPP" 1>&6
  969.  
  970. for ac_hdr in string.h strings.h stdlib.h unistd.h
  971. do
  972. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  973. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  974. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  975.   echo $ac_n "(cached) $ac_c" 1>&6
  976. else
  977.   cat > conftest.$ac_ext <<EOF
  978. #line 979 "configure"
  979. #include "confdefs.h"
  980. #include <$ac_hdr>
  981. EOF
  982. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  983. { (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  984. ac_err=`grep -v '^ *+' conftest.out`
  985. if test -z "$ac_err"; then
  986.   rm -rf conftest*
  987.   eval "ac_cv_header_$ac_safe=yes"
  988. else
  989.   echo "$ac_err" >&5
  990.   rm -rf conftest*
  991.   eval "ac_cv_header_$ac_safe=no"
  992. fi
  993. rm -f conftest*
  994. fi
  995. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  996.   echo "$ac_t""yes" 1>&6
  997.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  998.   cat >> confdefs.h <<EOF
  999. #define $ac_tr_hdr 1
  1000. EOF
  1001.  
  1002. else
  1003.   echo "$ac_t""no" 1>&6
  1004. fi
  1005. done
  1006.  
  1007. for ac_func in sbrk
  1008. do
  1009. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1010. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1011.   echo $ac_n "(cached) $ac_c" 1>&6
  1012. else
  1013.   cat > conftest.$ac_ext <<EOF
  1014. #line 1015 "configure"
  1015. #include "confdefs.h"
  1016. /* System header to define __stub macros and hopefully few prototypes,
  1017.     which can conflict with char $ac_func(); below.  */
  1018. #include <assert.h>
  1019. /* Override any gcc2 internal prototype to avoid an error.  */
  1020. /* We use char because int might match the return type of a gcc2
  1021.     builtin and then its argument prototype would still apply.  */
  1022. char $ac_func();
  1023.  
  1024. int main() { t(); return 0; }
  1025. int t() {
  1026.  
  1027. /* The GNU C library defines this for functions which it implements
  1028.     to always fail with ENOSYS.  Some functions are actually named
  1029.     something starting with __ and the normal name is an alias.  */
  1030. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1031. choke me
  1032. #else
  1033. $ac_func();
  1034. #endif
  1035.  
  1036. ; return 0; }
  1037. EOF
  1038. if { (eval echo configure:1039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1039.   rm -rf conftest*
  1040.   eval "ac_cv_func_$ac_func=yes"
  1041. else
  1042.   rm -rf conftest*
  1043.   eval "ac_cv_func_$ac_func=no"
  1044. fi
  1045. rm -f conftest*
  1046.  
  1047. fi
  1048. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1049.   echo "$ac_t""yes" 1>&6
  1050.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1051.   cat >> confdefs.h <<EOF
  1052. #define $ac_tr_func 1
  1053. EOF
  1054.  
  1055. else
  1056.   echo "$ac_t""no" 1>&6
  1057. fi
  1058. done
  1059.  
  1060. ac_header_dirent=no
  1061. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1062. do
  1063. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1064. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1065. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1066.   echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068.   cat > conftest.$ac_ext <<EOF
  1069. #line 1070 "configure"
  1070. #include "confdefs.h"
  1071. #include <sys/types.h>
  1072. #include <$ac_hdr>
  1073. int main() { return 0; }
  1074. int t() {
  1075. DIR *dirp = 0;
  1076. ; return 0; }
  1077. EOF
  1078. if { (eval echo configure:1079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1079.   rm -rf conftest*
  1080.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1081. else
  1082.   rm -rf conftest*
  1083.   eval "ac_cv_header_dirent_$ac_safe=no"
  1084. fi
  1085. rm -f conftest*
  1086.  
  1087. fi
  1088. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1089.   echo "$ac_t""yes" 1>&6
  1090.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
  1091.   cat >> confdefs.h <<EOF
  1092. #define $ac_tr_hdr 1
  1093. EOF
  1094.  ac_header_dirent=$ac_hdr; break
  1095. else
  1096.   echo "$ac_t""no" 1>&6
  1097. fi
  1098. done
  1099. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1100. if test $ac_header_dirent = dirent.h; then
  1101. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  1102. ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
  1103. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1104.   echo $ac_n "(cached) $ac_c" 1>&6
  1105. else
  1106.   ac_save_LIBS="$LIBS"
  1107. LIBS="-ldir  $LIBS"
  1108. cat > conftest.$ac_ext <<EOF
  1109. #line 1110 "configure"
  1110. #include "confdefs.h"
  1111. /* Override any gcc2 internal prototype to avoid an error.  */
  1112. /* We use char because int might match the return type of a gcc2
  1113.     builtin and then its argument prototype would still apply.  */
  1114. char opendir();
  1115.  
  1116. int main() { t(); return 0; }
  1117. int t() {
  1118. opendir()
  1119. ; return 0; }
  1120. EOF
  1121. if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1122.   rm -rf conftest*
  1123.   eval "ac_cv_lib_$ac_lib_var=yes"
  1124. else
  1125.   rm -rf conftest*
  1126.   eval "ac_cv_lib_$ac_lib_var=no"
  1127. fi
  1128. rm -f conftest*
  1129. LIBS="$ac_save_LIBS"
  1130.  
  1131. fi
  1132. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1133.   echo "$ac_t""yes" 1>&6
  1134.   LIBS="$LIBS -ldir"
  1135. else
  1136.   echo "$ac_t""no" 1>&6
  1137. fi
  1138.  
  1139. else
  1140. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  1141. ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
  1142. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1143.   echo $ac_n "(cached) $ac_c" 1>&6
  1144. else
  1145.   ac_save_LIBS="$LIBS"
  1146. LIBS="-lx  $LIBS"
  1147. cat > conftest.$ac_ext <<EOF
  1148. #line 1149 "configure"
  1149. #include "confdefs.h"
  1150. /* Override any gcc2 internal prototype to avoid an error.  */
  1151. /* We use char because int might match the return type of a gcc2
  1152.     builtin and then its argument prototype would still apply.  */
  1153. char opendir();
  1154.  
  1155. int main() { t(); return 0; }
  1156. int t() {
  1157. opendir()
  1158. ; return 0; }
  1159. EOF
  1160. if { (eval echo configure:1161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1161.   rm -rf conftest*
  1162.   eval "ac_cv_lib_$ac_lib_var=yes"
  1163. else
  1164.   rm -rf conftest*
  1165.   eval "ac_cv_lib_$ac_lib_var=no"
  1166. fi
  1167. rm -f conftest*
  1168. LIBS="$ac_save_LIBS"
  1169.  
  1170. fi
  1171. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1172.   echo "$ac_t""yes" 1>&6
  1173.   LIBS="$LIBS -lx"
  1174. else
  1175.   echo "$ac_t""no" 1>&6
  1176. fi
  1177.  
  1178. fi
  1179.  
  1180.  
  1181.  
  1182. case "${host}" in
  1183. i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
  1184.   cat >> confdefs.h <<\EOF
  1185. #define USE_BINARY_FOPEN 1
  1186. EOF
  1187.  ;;
  1188. esac
  1189.  
  1190. echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
  1191. if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
  1192.   echo $ac_n "(cached) $ac_c" 1>&6
  1193. else
  1194.   cat > conftest.$ac_ext <<EOF
  1195. #line 1196 "configure"
  1196. #include "confdefs.h"
  1197.  
  1198. #include <stdio.h>
  1199. #ifdef HAVE_STDLIB_H
  1200. #include <stdlib.h>
  1201. #endif
  1202. #ifdef HAVE_UNISTD_H
  1203. #include <unistd.h>
  1204. #endif
  1205. int main() { return 0; }
  1206. int t() {
  1207. char *(*pfn) = (char *(*)) free
  1208. ; return 0; }
  1209. EOF
  1210. if { (eval echo configure:1211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1211.   rm -rf conftest*
  1212.   bfd_cv_decl_needed_free=no
  1213. else
  1214.   rm -rf conftest*
  1215.   bfd_cv_decl_needed_free=yes
  1216. fi
  1217. rm -f conftest*
  1218.  
  1219. fi
  1220.  
  1221. echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
  1222. if test $bfd_cv_decl_needed_free = yes; then
  1223.   bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1224.   cat >> confdefs.h <<EOF
  1225. #define $bfd_tr_decl 1
  1226. EOF
  1227.  
  1228. fi
  1229.  
  1230.  
  1231. # target-specific stuff:
  1232.  
  1233. all_targets=
  1234. EMUL=
  1235. all_emuls=
  1236. TDIRS=
  1237.  
  1238. for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
  1239. do
  1240.   if test "$targ_alias" = "all"; then
  1241.     all_targets=true
  1242.   else
  1243.     # Canonicalize the secondary target names.
  1244.     result=`$ac_config_sub $targ_alias 2>/dev/null`
  1245.     if test -n "$result"; then
  1246.     targ=$result
  1247.     else
  1248.     targ=$targ_alias
  1249.     fi
  1250.  
  1251.     . ${srcdir}/configure.tgt
  1252.  
  1253.     if test "$targ" = "$target"; then
  1254.       EMUL=$targ_emul
  1255.     fi
  1256.  
  1257.     for i in $targ_emul $targ_extra_emuls; do
  1258.     case " $all_emuls " in
  1259.     *" e${i}.o "*) ;;
  1260.     *)
  1261.       all_emuls="$all_emuls e${i}.o"
  1262.       eval result=\$tdir_$i
  1263.       test -z "$result" && result=$targ_alias
  1264.       TDIRS="$TDIRS\\
  1265. tdir_$i=$result"
  1266.       ;;
  1267.     esac
  1268.     done
  1269.   fi
  1270. done
  1271.  
  1272.  
  1273.  
  1274.  
  1275. if test x${all_targets} = xtrue; then
  1276.   EMULATION_OFILES='$(ALL_EMULATIONS)'
  1277. else
  1278.   EMULATION_OFILES=$all_emuls
  1279. fi
  1280.  
  1281.  
  1282. trap '' 1 2 15
  1283. cat > confcache <<\EOF
  1284. # This file is a shell script that caches the results of configure
  1285. # tests run on this system so they can be shared between configure
  1286. # scripts and configure runs.  It is not useful on other systems.
  1287. # If it contains results you don't want to keep, you may remove or edit it.
  1288. #
  1289. # By default, configure uses ./config.cache as the cache file,
  1290. # creating it if it does not exist already.  You can give configure
  1291. # the --cache-file=FILE option to use a different cache file; that is
  1292. # what configure does when it calls configure scripts in
  1293. # subdirectories, so they share the cache.
  1294. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1295. # config.status only pays attention to the cache file if you give it the
  1296. # --recheck option to rerun configure.
  1297. #
  1298. EOF
  1299. # Ultrix sh set writes to stderr and can't be redirected directly,
  1300. # and sets the high bit in the cache file unless we assign to the vars.
  1301. (set) 2>&1 |
  1302.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1303.   >> confcache
  1304. if cmp -s $cache_file confcache; then
  1305.   :
  1306. else
  1307.   if test -w $cache_file; then
  1308.     echo "updating cache $cache_file"
  1309.     cat confcache > $cache_file
  1310.   else
  1311.     echo "not updating unwritable cache $cache_file"
  1312.   fi
  1313. fi
  1314. rm -f confcache
  1315.  
  1316. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1317.  
  1318. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1319. # Let make expand exec_prefix.
  1320. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1321.  
  1322. # Any assignment to VPATH causes Sun make to only execute
  1323. # the first set of double-colon rules, so remove it if not needed.
  1324. # If there is a colon in the path, we need to keep it.
  1325. if test "x$srcdir" = x.; then
  1326.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1327. fi
  1328.  
  1329. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1330.  
  1331. DEFS=-DHAVE_CONFIG_H
  1332.  
  1333. # Without the "./", some shells look in PATH for config.status.
  1334. : ${CONFIG_STATUS=./config.status}
  1335.  
  1336. echo creating $CONFIG_STATUS
  1337. # Some systems, like AmigaOS, won't allow you to remove a script that is
  1338. # being executed, so just move it out of the way instead.
  1339. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1340. cat > $CONFIG_STATUS <<EOF
  1341. #! /bin/sh
  1342. # Generated automatically by configure.
  1343. # Run this file to recreate the current configuration.
  1344. # This directory was configured as follows,
  1345. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1346. #
  1347. # $0 $ac_configure_args
  1348. #
  1349. # Compiler output produced by configure, useful for debugging
  1350. # configure, is in ./config.log if it exists.
  1351.  
  1352. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1353. for ac_option
  1354. do
  1355.   case "\$ac_option" in
  1356.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1357.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1358.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1359.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1360.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  1361.     exit 0 ;;
  1362.   -help | --help | --hel | --he | --h)
  1363.     echo "\$ac_cs_usage"; exit 0 ;;
  1364.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1365.   esac
  1366. done
  1367.  
  1368. ac_given_srcdir=$srcdir
  1369. ac_given_INSTALL="$INSTALL"
  1370.  
  1371. trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1372. EOF
  1373. cat >> $CONFIG_STATUS <<EOF
  1374.  
  1375. # Protect against being on the right side of a sed subst in config.status.
  1376. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1377.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1378. $ac_vpsub
  1379. $extrasub
  1380. s%@CFLAGS@%$CFLAGS%g
  1381. s%@CPPFLAGS@%$CPPFLAGS%g
  1382. s%@CXXFLAGS@%$CXXFLAGS%g
  1383. s%@DEFS@%$DEFS%g
  1384. s%@LDFLAGS@%$LDFLAGS%g
  1385. s%@LIBS@%$LIBS%g
  1386. s%@exec_prefix@%$exec_prefix%g
  1387. s%@prefix@%$prefix%g
  1388. s%@program_transform_name@%$program_transform_name%g
  1389. s%@bindir@%$bindir%g
  1390. s%@sbindir@%$sbindir%g
  1391. s%@libexecdir@%$libexecdir%g
  1392. s%@datadir@%$datadir%g
  1393. s%@sysconfdir@%$sysconfdir%g
  1394. s%@sharedstatedir@%$sharedstatedir%g
  1395. s%@localstatedir@%$localstatedir%g
  1396. s%@libdir@%$libdir%g
  1397. s%@includedir@%$includedir%g
  1398. s%@oldincludedir@%$oldincludedir%g
  1399. s%@infodir@%$infodir%g
  1400. s%@guidedir@%$guidedir%g
  1401. s%@psdir@%$psdir%g
  1402. s%@dvidir@%$dvidir%g
  1403. s%@mandir@%$mandir%g
  1404. s%@host@%$host%g
  1405. s%@host_alias@%$host_alias%g
  1406. s%@host_cpu@%$host_cpu%g
  1407. s%@host_vendor@%$host_vendor%g
  1408. s%@host_os@%$host_os%g
  1409. s%@target@%$target%g
  1410. s%@target_alias@%$target_alias%g
  1411. s%@target_cpu@%$target_cpu%g
  1412. s%@target_vendor@%$target_vendor%g
  1413. s%@target_os@%$target_os%g
  1414. s%@build@%$build%g
  1415. s%@build_alias@%$build_alias%g
  1416. s%@build_cpu@%$build_cpu%g
  1417. s%@build_vendor@%$build_vendor%g
  1418. s%@build_os@%$build_os%g
  1419. s%@CC@%$CC%g
  1420. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1421. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1422. s%@HLDFLAGS@%$HLDFLAGS%g
  1423. s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
  1424. s%@HDEFINES@%$HDEFINES%g
  1425. s%@HOSTING_CRT0@%$HOSTING_CRT0%g
  1426. s%@HOSTING_LIBS@%$HOSTING_LIBS%g
  1427. s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
  1428. s%@BFDLIB@%$BFDLIB%g
  1429. s%@CPP@%$CPP%g
  1430. s%@EMUL@%$EMUL%g
  1431. s%@TDIRS@%$TDIRS%g
  1432. s%@EMULATION_OFILES@%$EMULATION_OFILES%g
  1433.  
  1434. CEOF
  1435. EOF
  1436. cat >> $CONFIG_STATUS <<EOF
  1437.  
  1438. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1439. EOF
  1440. cat >> $CONFIG_STATUS <<\EOF
  1441. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1442.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1443.   case "$ac_file" in
  1444.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1445.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1446.   *) ac_file_in="${ac_file}.in" ;;
  1447.   esac
  1448.  
  1449.   # Adjust relative srcdir, etc. for subdirectories.
  1450.  
  1451.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1452.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1453.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1454.     # The file is in a subdirectory.
  1455.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1456.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1457.     # A "../" for each directory in $ac_dir_suffix.
  1458.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1459.   else
  1460.     ac_dir_suffix= ac_dots=
  1461.   fi
  1462.  
  1463.   case "$ac_given_srcdir" in
  1464.   .)  srcdir=.
  1465.       if test -z "$ac_dots"; then top_srcdir=.
  1466.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1467.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1468.   *) # Relative path.
  1469.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1470.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1471.   esac
  1472.  
  1473.   case "$ac_given_INSTALL" in
  1474.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1475.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1476.   esac
  1477.   echo creating "$ac_file"
  1478.   rm -f "$ac_file"
  1479.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1480.   case "$ac_file" in
  1481.   *Makefile*) ac_comsub="1i\\
  1482. # $configure_input" ;;
  1483.   *) ac_comsub= ;;
  1484.   esac
  1485.   sed -e "$ac_comsub
  1486. s%@configure_input@%$configure_input%g
  1487. s%@srcdir@%$srcdir%g
  1488. s%@top_srcdir@%$top_srcdir%g
  1489. s%@INSTALL@%$INSTALL%g
  1490. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1491. fi; done
  1492. rm -f conftest.subs
  1493.  
  1494. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1495. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1496. #
  1497. # ac_d sets the value in "#define NAME VALUE" lines.
  1498. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1499. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1500. ac_dC='\3'
  1501. ac_dD='%g'
  1502. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1503. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1504. ac_uB='\([     ]\)%\1#\2define\3'
  1505. ac_uC=' '
  1506. ac_uD='\4%g'
  1507. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1508. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1509. ac_eB='$%\1#\2define\3'
  1510. ac_eC=' '
  1511. ac_eD='%g'
  1512.  
  1513. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
  1514. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1515.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1516.   case "$ac_file" in
  1517.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1518.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1519.   *) ac_file_in="${ac_file}.in" ;;
  1520.   esac
  1521.  
  1522.   echo creating $ac_file
  1523.  
  1524.   rm -f conftest.frag conftest.in conftest.out
  1525.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1526.  
  1527. EOF
  1528.  
  1529. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1530. # the proper values into config.h.in to produce config.h.  And first:
  1531. # Protect against being on the right side of a sed subst in config.status.
  1532. # Protect against being in an unquoted here document in config.status.
  1533. rm -f conftest.vals
  1534. cat > conftest.hdr <<\EOF
  1535. s/[\\&%]/\\&/g
  1536. s%[\\$`]%\\&%g
  1537. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1538. s%ac_d%ac_u%gp
  1539. s%ac_u%ac_e%gp
  1540. EOF
  1541. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1542. rm -f conftest.hdr
  1543.  
  1544. # This sed command replaces #undef with comments.  This is necessary, for
  1545. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1546. # on some systems where configure will not decide to define it.
  1547. cat >> conftest.vals <<\EOF
  1548. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1549. EOF
  1550.  
  1551. # Break up conftest.vals because some shells have a limit on
  1552. # the size of here documents, and old seds have small limits too.
  1553. # Maximum number of lines to put in a single here document.
  1554. ac_max_here_lines=12
  1555.  
  1556. rm -f conftest.tail
  1557. while :
  1558. do
  1559.   ac_lines=`grep -c . conftest.vals`
  1560.   # grep -c gives empty output for an empty file on some AIX systems.
  1561.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1562.   # Write a limited-size here document to conftest.frag.
  1563.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1564.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1565.   echo 'CEOF
  1566.   sed -f conftest.frag conftest.in > conftest.out
  1567.   rm -f conftest.in
  1568.   mv conftest.out conftest.in
  1569. ' >> $CONFIG_STATUS
  1570.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1571.   rm -f conftest.vals
  1572.   mv conftest.tail conftest.vals
  1573. done
  1574. rm -f conftest.vals
  1575.  
  1576. cat >> $CONFIG_STATUS <<\EOF
  1577.   rm -f conftest.frag conftest.h
  1578.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1579.   cat conftest.in >> conftest.h
  1580.   rm -f conftest.in
  1581.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1582.     echo "$ac_file is unchanged"
  1583.     rm -f conftest.h
  1584.   else
  1585.     # Remove last slash and all that follows it.  Not all systems have dirname.
  1586.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1587.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1588.       # The file is in a subdirectory.
  1589.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  1590.     fi
  1591.     rm -f $ac_file
  1592.     mv conftest.h $ac_file
  1593.   fi
  1594. fi; done
  1595.  
  1596.  
  1597. case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
  1598. exit 0
  1599. EOF
  1600. chmod +x $CONFIG_STATUS
  1601. rm -f CONFIG.STATUS.old
  1602. rm -fr confdefs* $ac_clean_files
  1603. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1604.  
  1605.