home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / opcodes / configure < prev    next >
Text File  |  1996-10-01  |  50KB  |  1,575 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 opcodes library"
  18. ac_help="$ac_help
  19.   --enable-commonbfdlib   build shared BFD/opcodes/libiberty 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=z8k-dis.c
  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.  
  539. #    configure.in script for the opcodes library.
  540. #    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
  541. #    Written by Cygnus Support.
  542. # This program is free software; you can redistribute it and/or modify
  543. # it under the terms of the GNU General Public License as published by
  544. # the Free Software Foundation; either version 2 of the License, or
  545. # (at your option) any later version.
  546. # This program is distributed in the hope that it will be useful,
  547. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  548. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  549. # GNU General Public License for more details.
  550. # You should have received a copy of the GNU General Public License
  551. # along with this program; if not, write to the Free Software
  552. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  553.  
  554. # Check whether --enable-targets or --disable-targets was given.
  555. if test "${enable_targets+set}" = set; then
  556.   enableval="$enable_targets"
  557.   case "${enableval}" in
  558.   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
  559.             ;;
  560.   no)       enable_targets= ;;
  561.   *)        enable_targets=$enableval ;;
  562. esac
  563. fi
  564. # Check whether --enable-shared or --disable-shared was given.
  565. if test "${enable_shared+set}" = set; then
  566.   enableval="$enable_shared"
  567.   case "${enableval}" in
  568.   yes) shared=true ;;
  569.   no)  shared=false ;;
  570.   *opcodes*) shared=true ;;
  571.   *) shared=false ;;
  572. esac
  573. fi
  574. # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
  575. if test "${enable_commonbfdlib+set}" = set; then
  576.   enableval="$enable_commonbfdlib"
  577.   case "${enableval}" in
  578.   yes) commonbfdlib=true ;;
  579.   no)  commonbfdlib=false ;;
  580.   *)   { echo "configure: error: bad value ${enableval} for opcodes commonbfdlib option" 1>&2; exit 1; } ;;
  581. esac
  582. fi
  583.  
  584.  
  585.  
  586. ac_aux_dir=
  587. for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
  588.   if test -f $ac_dir/install-sh; then
  589.     ac_aux_dir=$ac_dir
  590.     ac_install_sh="$ac_aux_dir/install-sh -c"
  591.     break
  592.   elif test -f $ac_dir/install.sh; then
  593.     ac_aux_dir=$ac_dir
  594.     ac_install_sh="$ac_aux_dir/install.sh -c"
  595.     break
  596.   fi
  597. done
  598. if test -z "$ac_aux_dir"; then
  599.   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
  600. fi
  601. ac_config_guess=$ac_aux_dir/config.guess
  602. ac_config_sub=$ac_aux_dir/config.sub
  603. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  604.  
  605.  
  606. # Do some error checking and defaulting for the host and target type.
  607. # The inputs are:
  608. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  609. #
  610. # The rules are:
  611. # 1. You are not allowed to specify --host, --target, and nonopt at the
  612. #    same time.
  613. # 2. Host defaults to nonopt.
  614. # 3. If nonopt is not specified, then host defaults to the current host,
  615. #    as determined by config.guess.
  616. # 4. Target and build default to nonopt.
  617. # 5. If nonopt is not specified, then target and build default to host.
  618.  
  619. # The aliases save the names the user supplied, while $host etc.
  620. # will get canonicalized.
  621. case $host---$target---$nonopt in
  622. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  623. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  624. esac
  625.  
  626.  
  627. # Make sure we can run config.sub.
  628. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  629. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  630. fi
  631.  
  632. echo $ac_n "checking host system type""... $ac_c" 1>&6
  633.  
  634. host_alias=$host
  635. case "$host_alias" in
  636. NONE)
  637.   case $nonopt in
  638.   NONE)
  639.     if host_alias=`$ac_config_guess`; then :
  640.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  641.     fi ;;
  642.   *) host_alias=$nonopt ;;
  643.   esac ;;
  644. esac
  645.  
  646. host=`$ac_config_sub $host_alias`
  647. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  648. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  649. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  650. echo "$ac_t""$host" 1>&6
  651.  
  652. echo $ac_n "checking target system type""... $ac_c" 1>&6
  653.  
  654. target_alias=$target
  655. case "$target_alias" in
  656. NONE)
  657.   case $nonopt in
  658.   NONE) target_alias=$host_alias ;;
  659.   *) target_alias=$nonopt ;;
  660.   esac ;;
  661. esac
  662.  
  663. target=`$ac_config_sub $target_alias`
  664. target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  665. target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  666. target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  667. echo "$ac_t""$target" 1>&6
  668.  
  669. echo $ac_n "checking build system type""... $ac_c" 1>&6
  670.  
  671. build_alias=$build
  672. case "$build_alias" in
  673. NONE)
  674.   case $nonopt in
  675.   NONE) build_alias=$host_alias ;;
  676.   *) build_alias=$nonopt ;;
  677.   esac ;;
  678. esac
  679.  
  680. build=`$ac_config_sub $build_alias`
  681. build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  682. build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  683. build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  684. echo "$ac_t""$build" 1>&6
  685.  
  686. test "$host_alias" != "$target_alias" &&
  687.   test "$program_prefix$program_suffix$program_transform_name" = \
  688.     NONENONEs,x,x, &&
  689.   program_prefix=${target_alias}-
  690.  
  691. if test -z "$target" ; then
  692.     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
  693. fi
  694. if test "$program_transform_name" = s,x,x,; then
  695.   program_transform_name=
  696. else
  697.   # Double any \ or $.  echo might interpret backslashes.
  698.   cat <<\EOF_SED > conftestsed
  699. s,\\,\\\\,g; s,\$,$$,g
  700. EOF_SED
  701.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  702.   rm -f conftestsed
  703. fi
  704. test "$program_prefix" != NONE &&
  705.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  706. # Use a double $ so make ignores it.
  707. test "$program_suffix" != NONE &&
  708.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  709.  
  710. # sed with no file args requires a program.
  711. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  712.  
  713.  
  714. # host-specific stuff:
  715.  
  716. ALLLIBS='$(TARGETLIB)'
  717. PICFLAG=
  718. SHLIB=unused-shlib
  719. SHLINK=unused-shlink
  720. if test "${shared}" = "true"; then
  721.   ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
  722.   PICFLAG=-fpic
  723.   if test "${commonbfdlib}" = "true"; then
  724.     SHLIB=../bfd/libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
  725.     SHLINK=../bfd/libbfd.so
  726.   else
  727.     SHLIB=libopcodes.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
  728.     SHLINK=libopcodes.so
  729.   fi
  730. fi
  731.  
  732. # Extract the first word of "gcc", so it can be a program name with args.
  733. set dummy gcc; ac_word=$2
  734. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  735. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  736.   echo $ac_n "(cached) $ac_c" 1>&6
  737. else
  738.   if test -n "$CC"; then
  739.   ac_cv_prog_CC="$CC" # Let the user override the test.
  740. else
  741.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  742.   for ac_dir in $PATH; do
  743.     test -z "$ac_dir" && ac_dir=.
  744.     if test -f $ac_dir/$ac_word; then
  745.       ac_cv_prog_CC="gcc"
  746.       break
  747.     fi
  748.   done
  749.   IFS="$ac_save_ifs"
  750. fi
  751. fi
  752. CC="$ac_cv_prog_CC"
  753. if test -n "$CC"; then
  754.   echo "$ac_t""$CC" 1>&6
  755. else
  756.   echo "$ac_t""no" 1>&6
  757. fi
  758.  
  759. if test -z "$CC"; then
  760.   # Extract the first word of "cc", so it can be a program name with args.
  761. set dummy cc; ac_word=$2
  762. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  763. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  764.   echo $ac_n "(cached) $ac_c" 1>&6
  765. else
  766.   if test -n "$CC"; then
  767.   ac_cv_prog_CC="$CC" # Let the user override the test.
  768. else
  769.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  770.   ac_prog_rejected=no
  771.   for ac_dir in $PATH; do
  772.     test -z "$ac_dir" && ac_dir=.
  773.     if test -f $ac_dir/$ac_word; then
  774.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  775.         ac_prog_rejected=yes
  776.     continue
  777.       fi
  778.       ac_cv_prog_CC="cc"
  779.       break
  780.     fi
  781.   done
  782.   IFS="$ac_save_ifs"
  783. if test $ac_prog_rejected = yes; then
  784.   # We found a bogon in the path, so make sure we never use it.
  785.   set dummy $ac_cv_prog_CC
  786.   shift
  787.   if test $# -gt 0; then
  788.     # We chose a different compiler from the bogus one.
  789.     # However, it has the same basename, so the bogon will be chosen
  790.     # first if we set CC to just the basename; use the full file name.
  791.     shift
  792.     set dummy "$ac_dir/$ac_word" "$@"
  793.     shift
  794.     ac_cv_prog_CC="$@"
  795.   fi
  796. fi
  797. fi
  798. fi
  799. CC="$ac_cv_prog_CC"
  800. if test -n "$CC"; then
  801.   echo "$ac_t""$CC" 1>&6
  802. else
  803.   echo "$ac_t""no" 1>&6
  804. fi
  805.  
  806.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  807. fi
  808.  
  809. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  810. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  811.   echo $ac_n "(cached) $ac_c" 1>&6
  812. else
  813.   cat > conftest.c <<EOF
  814. #ifdef __GNUC__
  815.   yes;
  816. #endif
  817. EOF
  818. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  819.   ac_cv_prog_gcc=yes
  820. else
  821.   ac_cv_prog_gcc=no
  822. fi
  823. fi
  824.  
  825. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  826. if test $ac_cv_prog_gcc = yes; then
  827.   GCC=yes
  828.   if test "${CFLAGS+set}" != set; then
  829.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  830. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  831.   echo $ac_n "(cached) $ac_c" 1>&6
  832. else
  833.   echo 'void f(){}' > conftest.c
  834. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  835.   ac_cv_prog_gcc_g=yes
  836. else
  837.   ac_cv_prog_gcc_g=no
  838. fi
  839. rm -f conftest*
  840.  
  841. fi
  842.  
  843. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  844.     if test $ac_cv_prog_gcc_g = yes; then
  845.       CFLAGS="-g -O2"
  846.     else
  847.       CFLAGS="-O2"
  848.     fi
  849.   fi
  850. else
  851.   GCC=
  852.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  853. fi
  854.  
  855.  
  856. . ${srcdir}/../bfd/configure.host
  857.  
  858.  
  859. if test $host != $build; then
  860.   ac_tool_prefix=${host_alias}-
  861. else
  862.   ac_tool_prefix=
  863. fi
  864.  
  865. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  866. set dummy ${ac_tool_prefix}ar; ac_word=$2
  867. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  868. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  869.   echo $ac_n "(cached) $ac_c" 1>&6
  870. else
  871.   if test -n "$AR"; then
  872.   ac_cv_prog_AR="$AR" # Let the user override the test.
  873. else
  874.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  875.   for ac_dir in $PATH; do
  876.     test -z "$ac_dir" && ac_dir=.
  877.     if test -f $ac_dir/$ac_word; then
  878.       ac_cv_prog_AR="${ac_tool_prefix}ar"
  879.       break
  880.     fi
  881.   done
  882.   IFS="$ac_save_ifs"
  883.   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
  884. fi
  885. fi
  886. AR="$ac_cv_prog_AR"
  887. if test -n "$AR"; then
  888.   echo "$ac_t""$AR" 1>&6
  889. else
  890.   echo "$ac_t""no" 1>&6
  891. fi
  892.  
  893.  
  894.  
  895. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  896. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  897. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  898. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  899.   echo $ac_n "(cached) $ac_c" 1>&6
  900. else
  901.   if test -n "$RANLIB"; then
  902.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  903. else
  904.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  905.   for ac_dir in $PATH; do
  906.     test -z "$ac_dir" && ac_dir=.
  907.     if test -f $ac_dir/$ac_word; then
  908.       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  909.       break
  910.     fi
  911.   done
  912.   IFS="$ac_save_ifs"
  913. fi
  914. fi
  915. RANLIB="$ac_cv_prog_RANLIB"
  916. if test -n "$RANLIB"; then
  917.   echo "$ac_t""$RANLIB" 1>&6
  918. else
  919.   echo "$ac_t""no" 1>&6
  920. fi
  921.  
  922.  
  923. if test -z "$ac_cv_prog_RANLIB"; then
  924. if test -n "$ac_tool_prefix"; then
  925.   # Extract the first word of "ranlib", so it can be a program name with args.
  926. set dummy ranlib; ac_word=$2
  927. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  928. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  929.   echo $ac_n "(cached) $ac_c" 1>&6
  930. else
  931.   if test -n "$RANLIB"; then
  932.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  933. else
  934.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  935.   for ac_dir in $PATH; do
  936.     test -z "$ac_dir" && ac_dir=.
  937.     if test -f $ac_dir/$ac_word; then
  938.       ac_cv_prog_RANLIB="ranlib"
  939.       break
  940.     fi
  941.   done
  942.   IFS="$ac_save_ifs"
  943.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  944. fi
  945. fi
  946. RANLIB="$ac_cv_prog_RANLIB"
  947. if test -n "$RANLIB"; then
  948.   echo "$ac_t""$RANLIB" 1>&6
  949. else
  950.   echo "$ac_t""no" 1>&6
  951. fi
  952.  
  953. else
  954.   RANLIB=":"
  955. fi
  956. fi
  957.  
  958. # Find a good install program.  We prefer a C program (faster),
  959. # so one script is as good as another.  But avoid the broken or
  960. # incompatible versions:
  961. # SysV /etc/install, /usr/sbin/install
  962. # SunOS /usr/etc/install
  963. # IRIX /sbin/install
  964. # AIX /bin/install
  965. # AmigaOS /c/install
  966. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  967. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  968. # ./install, which can be erroneously created by make from ./install.sh.
  969. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  970. if test -z "$INSTALL"; then
  971. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  972.   echo $ac_n "(cached) $ac_c" 1>&6
  973. else
  974.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  975.   for ac_dir in $PATH; do
  976.     # Account for people who put trailing slashes in PATH elements.
  977.     case "$ac_dir/" in
  978.     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  979.     *)
  980.       # OSF1 and SCO ODT 3.0 have their own names for install.
  981.       for ac_prog in ginstall installbsd scoinst install; do
  982.         if test -f $ac_dir/$ac_prog; then
  983.       if test $ac_prog = install &&
  984.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  985.         # AIX install.  It has an incompatible calling convention.
  986.         # OSF/1 installbsd also uses dspmsg, but is usable.
  987.         :
  988.       else
  989.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  990.         break 2
  991.       fi
  992.     fi
  993.       done
  994.       ;;
  995.     esac
  996.   done
  997.   IFS="$ac_save_ifs"
  998.  
  999. fi
  1000.   if test "${ac_cv_path_install+set}" = set; then
  1001.     INSTALL="$ac_cv_path_install"
  1002.   else
  1003.     # As a last resort, use the slow shell script.  We don't cache a
  1004.     # path for INSTALL within a source directory, because that will
  1005.     # break other packages using the cache if that directory is
  1006.     # removed, or if the path is relative.
  1007.     INSTALL="$ac_install_sh"
  1008.   fi
  1009. fi
  1010. echo "$ac_t""$INSTALL" 1>&6
  1011.  
  1012. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1013. # It thinks the first close brace ends the variable substitution.
  1014. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1015.  
  1016. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1017.  
  1018.  
  1019. if test "${shared}" = "true"; then
  1020.   if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
  1021.     echo "configure: warning: opcodes --enable-shared only supported when using gcc" 1>&2
  1022.     shared=false
  1023.     ALLLIBS='$(TARGETLIB)'
  1024.     PICFLAG=
  1025.     SHLIB=unused-shlib
  1026.   fi
  1027. fi
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034. if test "${commonbfdlib}" = "true"; then
  1035.   COMMON_SHLIB=yes
  1036.   # Rebuild the shared library if libiberty or libbfd changes.
  1037.   SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
  1038.   BFD_PICLIST=../bfd/piclist
  1039. else
  1040.   COMMON_SHLIB=
  1041.   SHLIB_DEP=
  1042.   BFD_PICLIST=
  1043. fi
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1050. # On Suns, sometimes $CPP names a directory.
  1051. if test -n "$CPP" && test -d "$CPP"; then
  1052.   CPP=
  1053. fi
  1054. if test -z "$CPP"; then
  1055. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1056.   echo $ac_n "(cached) $ac_c" 1>&6
  1057. else
  1058.     # This must be in double quotes, not single quotes, because CPP may get
  1059.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1060.   CPP="${CC-cc} -E"
  1061.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1062.   # not just through cpp.
  1063.   cat > conftest.$ac_ext <<EOF
  1064. #line 1068 "configure"
  1065. #include "confdefs.h"
  1066. #include <assert.h>
  1067. Syntax Error
  1068. EOF
  1069. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1070. { (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1071. ac_err=`grep -v '^ *+' conftest.out`
  1072. if test -z "$ac_err"; then
  1073.   :
  1074. else
  1075.   echo "$ac_err" >&5
  1076.   rm -rf conftest*
  1077.   CPP="${CC-cc} -E -traditional-cpp"
  1078.   cat > conftest.$ac_ext <<EOF
  1079. #line 1083 "configure"
  1080. #include "confdefs.h"
  1081. #include <assert.h>
  1082. Syntax Error
  1083. EOF
  1084. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1085. { (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1086. ac_err=`grep -v '^ *+' conftest.out`
  1087. if test -z "$ac_err"; then
  1088.   :
  1089. else
  1090.   echo "$ac_err" >&5
  1091.   rm -rf conftest*
  1092.   CPP=/lib/cpp
  1093. fi
  1094. rm -f conftest*
  1095. fi
  1096. rm -f conftest*
  1097.   ac_cv_prog_CPP="$CPP"
  1098. fi
  1099.   CPP="$ac_cv_prog_CPP"
  1100. else
  1101.   ac_cv_prog_CPP="$CPP"
  1102. fi
  1103. echo "$ac_t""$CPP" 1>&6
  1104.  
  1105. for ac_hdr in string.h strings.h
  1106. do
  1107. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1108. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1109. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1110.   echo $ac_n "(cached) $ac_c" 1>&6
  1111. else
  1112.   cat > conftest.$ac_ext <<EOF
  1113. #line 1117 "configure"
  1114. #include "confdefs.h"
  1115. #include <$ac_hdr>
  1116. EOF
  1117. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1118. { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1119. ac_err=`grep -v '^ *+' conftest.out`
  1120. if test -z "$ac_err"; then
  1121.   rm -rf conftest*
  1122.   eval "ac_cv_header_$ac_safe=yes"
  1123. else
  1124.   echo "$ac_err" >&5
  1125.   rm -rf conftest*
  1126.   eval "ac_cv_header_$ac_safe=no"
  1127. fi
  1128. rm -f conftest*
  1129. fi
  1130. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1131.   echo "$ac_t""yes" 1>&6
  1132.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1133.   cat >> confdefs.h <<EOF
  1134. #define $ac_tr_hdr 1
  1135. EOF
  1136.  
  1137. else
  1138.   echo "$ac_t""no" 1>&6
  1139. fi
  1140. done
  1141.  
  1142.  
  1143. # target-specific stuff:
  1144.  
  1145. # Canonicalize the secondary target names.
  1146. if test -n "$enable_targets" ; then
  1147.     for targ in `echo $enable_targets | sed 's/,/ /g'`
  1148.     do
  1149.     result=`$ac_config_sub $targ 2>/dev/null`
  1150.     if test -n "$result" ; then
  1151.         canon_targets="$canon_targets $result"
  1152.     else
  1153.         # Allow targets that config.sub doesn't recognize, like "all".
  1154.         canon_targets="$canon_targets $targ"
  1155.     fi
  1156.     done
  1157. fi
  1158.  
  1159. all_targets=false
  1160. selarchs=
  1161. for targ in $target $canon_targets
  1162. do
  1163.     if test "x$targ" = "xall" ; then
  1164.         all_targets=true
  1165.     else
  1166.     . $srcdir/../bfd/config.bfd
  1167.     selarchs="$selarchs $targ_archs"
  1168.     fi
  1169. done    
  1170.  
  1171. # We don't do any links based on the target system, just makefile config.
  1172.  
  1173. if test x${all_targets} = xfalse ; then
  1174.  
  1175.     # Target architecture .o files.
  1176.     ta=
  1177.  
  1178.     for arch in $selarchs
  1179.     do
  1180.     ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
  1181.     archdefs="$archdefs -DARCH_$ad"
  1182.     case "$arch" in
  1183.     bfd_a29k_arch)        ta="$ta a29k-dis.o" ;;
  1184.     bfd_alliant_arch)    ;;
  1185.     bfd_alpha_arch)        ta="$ta alpha-dis.o alpha-opc.o" ;;
  1186.     bfd_arm_arch)        ta="$ta arm-dis.o" ;;
  1187.     bfd_convex_arch)    ;;
  1188.     bfd_h8300_arch)        ta="$ta h8300-dis.o" ;;
  1189.     bfd_h8500_arch)        ta="$ta h8500-dis.o" ;;
  1190.     bfd_hppa_arch)        ta="$ta hppa-dis.o" ;;
  1191.     bfd_i386_arch)        ta="$ta i386-dis.o" ;;
  1192.     bfd_i860_arch)        ;;
  1193.     bfd_i960_arch)        ta="$ta i960-dis.o" ;;
  1194.     bfd_m68k_arch)        ta="$ta m68k-dis.o m68k-opc.o" ;;
  1195.     bfd_m88k_arch)        ta="$ta m88k-dis.o" ;;
  1196.     bfd_mips_arch)        ta="$ta mips-dis.o mips-opc.o" ;;
  1197.     bfd_ns32k_arch)        ta="$ta ns32k-dis.o" ;;
  1198.     bfd_powerpc_arch)    ta="$ta ppc-dis.o ppc-opc.o" ;;
  1199.     bfd_pyramid_arch)    ;;
  1200.     bfd_romp_arch)        ;;
  1201.     bfd_rs6000_arch)    ta="$ta ppc-dis.o ppc-opc.o" ;;
  1202.     bfd_sh_arch)        ta="$ta sh-dis.o" ;;
  1203.     bfd_sparc_arch)        ta="$ta sparc-dis.o sparc-opc.o" ;;
  1204.     bfd_tahoe_arch)        ;;
  1205.     bfd_vax_arch)        ;;
  1206.     bfd_w65_arch)        ta="$ta w65-dis.o" ;;
  1207.     bfd_we32k_arch)        ;;
  1208.     bfd_z8k_arch)        ta="$ta z8k-dis.o" ;;
  1209.  
  1210.     "")            ;;
  1211.     *)        { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
  1212.     esac
  1213.     done
  1214.  
  1215.     # Weed out duplicate .o files.
  1216.     f=""
  1217.     for i in $ta ; do
  1218.     case " $f " in
  1219.     *" $i "*) ;;
  1220.     *) f="$f $i" ;;
  1221.     esac
  1222.     done
  1223.     ta="$f"
  1224.  
  1225.     # And duplicate -D flags.
  1226.     f=""
  1227.     for i in $archdefs ; do
  1228.     case " $f " in
  1229.     *" $i "*) ;;
  1230.     *) f="$f $i" ;;
  1231.     esac
  1232.     done
  1233.     archdefs="$f"
  1234.  
  1235.     BFD_MACHINES="$ta"
  1236.  
  1237. else    # all_targets is true
  1238.     archdefs=-DARCH_all
  1239.     BFD_MACHINES='$(ALL_MACHINES)'
  1240. fi
  1241.  
  1242.  
  1243.  
  1244.  
  1245. trap '' 1 2 15
  1246. cat > confcache <<\EOF
  1247. # This file is a shell script that caches the results of configure
  1248. # tests run on this system so they can be shared between configure
  1249. # scripts and configure runs.  It is not useful on other systems.
  1250. # If it contains results you don't want to keep, you may remove or edit it.
  1251. #
  1252. # By default, configure uses ./config.cache as the cache file,
  1253. # creating it if it does not exist already.  You can give configure
  1254. # the --cache-file=FILE option to use a different cache file; that is
  1255. # what configure does when it calls configure scripts in
  1256. # subdirectories, so they share the cache.
  1257. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1258. # config.status only pays attention to the cache file if you give it the
  1259. # --recheck option to rerun configure.
  1260. #
  1261. EOF
  1262. # Ultrix sh set writes to stderr and can't be redirected directly,
  1263. # and sets the high bit in the cache file unless we assign to the vars.
  1264. (set) 2>&1 |
  1265.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1266.   >> confcache
  1267. if cmp -s $cache_file confcache; then
  1268.   :
  1269. else
  1270.   if test -w $cache_file; then
  1271.     echo "updating cache $cache_file"
  1272.     cat confcache > $cache_file
  1273.   else
  1274.     echo "not updating unwritable cache $cache_file"
  1275.   fi
  1276. fi
  1277. rm -f confcache
  1278.  
  1279. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1280.  
  1281. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1282. # Let make expand exec_prefix.
  1283. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1284.  
  1285. # Any assignment to VPATH causes Sun make to only execute
  1286. # the first set of double-colon rules, so remove it if not needed.
  1287. # If there is a colon in the path, we need to keep it.
  1288. if test "x$srcdir" = x.; then
  1289.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1290. fi
  1291.  
  1292. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1293.  
  1294. DEFS=-DHAVE_CONFIG_H
  1295.  
  1296. # Without the "./", some shells look in PATH for config.status.
  1297. : ${CONFIG_STATUS=./config.status}
  1298.  
  1299. echo creating $CONFIG_STATUS
  1300. # Some systems, like AmigaOS, won't allow you to remove a script that is
  1301. # being executed, so just move it out of the way instead.
  1302. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1303. cat > $CONFIG_STATUS <<EOF
  1304. #! /bin/sh
  1305. # Generated automatically by configure.
  1306. # Run this file to recreate the current configuration.
  1307. # This directory was configured as follows,
  1308. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1309. #
  1310. # $0 $ac_configure_args
  1311. #
  1312. # Compiler output produced by configure, useful for debugging
  1313. # configure, is in ./config.log if it exists.
  1314.  
  1315. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1316. for ac_option
  1317. do
  1318.   case "\$ac_option" in
  1319.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1320.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1321.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1322.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1323.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  1324.     exit 0 ;;
  1325.   -help | --help | --hel | --he | --h)
  1326.     echo "\$ac_cs_usage"; exit 0 ;;
  1327.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1328.   esac
  1329. done
  1330.  
  1331. ac_given_srcdir=$srcdir
  1332. ac_given_INSTALL="$INSTALL"
  1333.  
  1334. trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1335. EOF
  1336. cat >> $CONFIG_STATUS <<EOF
  1337.  
  1338. # Protect against being on the right side of a sed subst in config.status.
  1339. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1340.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1341. $ac_vpsub
  1342. $extrasub
  1343. s%@CFLAGS@%$CFLAGS%g
  1344. s%@CPPFLAGS@%$CPPFLAGS%g
  1345. s%@CXXFLAGS@%$CXXFLAGS%g
  1346. s%@DEFS@%$DEFS%g
  1347. s%@LDFLAGS@%$LDFLAGS%g
  1348. s%@LIBS@%$LIBS%g
  1349. s%@exec_prefix@%$exec_prefix%g
  1350. s%@prefix@%$prefix%g
  1351. s%@program_transform_name@%$program_transform_name%g
  1352. s%@bindir@%$bindir%g
  1353. s%@sbindir@%$sbindir%g
  1354. s%@libexecdir@%$libexecdir%g
  1355. s%@datadir@%$datadir%g
  1356. s%@sysconfdir@%$sysconfdir%g
  1357. s%@sharedstatedir@%$sharedstatedir%g
  1358. s%@localstatedir@%$localstatedir%g
  1359. s%@libdir@%$libdir%g
  1360. s%@includedir@%$includedir%g
  1361. s%@oldincludedir@%$oldincludedir%g
  1362. s%@infodir@%$infodir%g
  1363. s%@guidedir@%$guidedir%g
  1364. s%@psdir@%$psdir%g
  1365. s%@dvidir@%$dvidir%g
  1366. s%@mandir@%$mandir%g
  1367. s%@host@%$host%g
  1368. s%@host_alias@%$host_alias%g
  1369. s%@host_cpu@%$host_cpu%g
  1370. s%@host_vendor@%$host_vendor%g
  1371. s%@host_os@%$host_os%g
  1372. s%@target@%$target%g
  1373. s%@target_alias@%$target_alias%g
  1374. s%@target_cpu@%$target_cpu%g
  1375. s%@target_vendor@%$target_vendor%g
  1376. s%@target_os@%$target_os%g
  1377. s%@build@%$build%g
  1378. s%@build_alias@%$build_alias%g
  1379. s%@build_cpu@%$build_cpu%g
  1380. s%@build_vendor@%$build_vendor%g
  1381. s%@build_os@%$build_os%g
  1382. s%@CC@%$CC%g
  1383. s%@HDEFINES@%$HDEFINES%g
  1384. s%@AR@%$AR%g
  1385. s%@RANLIB@%$RANLIB%g
  1386. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1387. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1388. s%@ALLLIBS@%$ALLLIBS%g
  1389. s%@PICFLAG@%$PICFLAG%g
  1390. s%@SHLIB@%$SHLIB%g
  1391. s%@SHLIB_CC@%$SHLIB_CC%g
  1392. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  1393. s%@COMMON_SHLIB@%$COMMON_SHLIB%g
  1394. s%@SHLIB_DEP@%$SHLIB_DEP%g
  1395. s%@BFD_PICLIST@%$BFD_PICLIST%g
  1396. s%@SHLINK@%$SHLINK%g
  1397. s%@CPP@%$CPP%g
  1398. s%@archdefs@%$archdefs%g
  1399. s%@BFD_MACHINES@%$BFD_MACHINES%g
  1400.  
  1401. CEOF
  1402. EOF
  1403. cat >> $CONFIG_STATUS <<EOF
  1404.  
  1405. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1406. EOF
  1407. cat >> $CONFIG_STATUS <<\EOF
  1408. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1409.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1410.   case "$ac_file" in
  1411.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1412.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1413.   *) ac_file_in="${ac_file}.in" ;;
  1414.   esac
  1415.  
  1416.   # Adjust relative srcdir, etc. for subdirectories.
  1417.  
  1418.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1419.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1420.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1421.     # The file is in a subdirectory.
  1422.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1423.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1424.     # A "../" for each directory in $ac_dir_suffix.
  1425.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1426.   else
  1427.     ac_dir_suffix= ac_dots=
  1428.   fi
  1429.  
  1430.   case "$ac_given_srcdir" in
  1431.   .)  srcdir=.
  1432.       if test -z "$ac_dots"; then top_srcdir=.
  1433.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1434.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1435.   *) # Relative path.
  1436.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1437.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1438.   esac
  1439.  
  1440.   case "$ac_given_INSTALL" in
  1441.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1442.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1443.   esac
  1444.   echo creating "$ac_file"
  1445.   rm -f "$ac_file"
  1446.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1447.   case "$ac_file" in
  1448.   *Makefile*) ac_comsub="1i\\
  1449. # $configure_input" ;;
  1450.   *) ac_comsub= ;;
  1451.   esac
  1452.   sed -e "$ac_comsub
  1453. s%@configure_input@%$configure_input%g
  1454. s%@srcdir@%$srcdir%g
  1455. s%@top_srcdir@%$top_srcdir%g
  1456. s%@INSTALL@%$INSTALL%g
  1457. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1458. fi; done
  1459. rm -f conftest.subs
  1460.  
  1461. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1462. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1463. #
  1464. # ac_d sets the value in "#define NAME VALUE" lines.
  1465. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1466. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1467. ac_dC='\3'
  1468. ac_dD='%g'
  1469. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1470. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1471. ac_uB='\([     ]\)%\1#\2define\3'
  1472. ac_uC=' '
  1473. ac_uD='\4%g'
  1474. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1475. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1476. ac_eB='$%\1#\2define\3'
  1477. ac_eC=' '
  1478. ac_eD='%g'
  1479.  
  1480. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
  1481. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1482.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1483.   case "$ac_file" in
  1484.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1485.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1486.   *) ac_file_in="${ac_file}.in" ;;
  1487.   esac
  1488.  
  1489.   echo creating $ac_file
  1490.  
  1491.   rm -f conftest.frag conftest.in conftest.out
  1492.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1493.  
  1494. EOF
  1495.  
  1496. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1497. # the proper values into config.h.in to produce config.h.  And first:
  1498. # Protect against being on the right side of a sed subst in config.status.
  1499. # Protect against being in an unquoted here document in config.status.
  1500. rm -f conftest.vals
  1501. cat > conftest.hdr <<\EOF
  1502. s/[\\&%]/\\&/g
  1503. s%[\\$`]%\\&%g
  1504. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1505. s%ac_d%ac_u%gp
  1506. s%ac_u%ac_e%gp
  1507. EOF
  1508. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1509. rm -f conftest.hdr
  1510.  
  1511. # This sed command replaces #undef with comments.  This is necessary, for
  1512. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1513. # on some systems where configure will not decide to define it.
  1514. cat >> conftest.vals <<\EOF
  1515. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1516. EOF
  1517.  
  1518. # Break up conftest.vals because some shells have a limit on
  1519. # the size of here documents, and old seds have small limits too.
  1520. # Maximum number of lines to put in a single here document.
  1521. ac_max_here_lines=12
  1522.  
  1523. rm -f conftest.tail
  1524. while :
  1525. do
  1526.   ac_lines=`grep -c . conftest.vals`
  1527.   # grep -c gives empty output for an empty file on some AIX systems.
  1528.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1529.   # Write a limited-size here document to conftest.frag.
  1530.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1531.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1532.   echo 'CEOF
  1533.   sed -f conftest.frag conftest.in > conftest.out
  1534.   rm -f conftest.in
  1535.   mv conftest.out conftest.in
  1536. ' >> $CONFIG_STATUS
  1537.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1538.   rm -f conftest.vals
  1539.   mv conftest.tail conftest.vals
  1540. done
  1541. rm -f conftest.vals
  1542.  
  1543. cat >> $CONFIG_STATUS <<\EOF
  1544.   rm -f conftest.frag conftest.h
  1545.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1546.   cat conftest.in >> conftest.h
  1547.   rm -f conftest.in
  1548.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1549.     echo "$ac_file is unchanged"
  1550.     rm -f conftest.h
  1551.   else
  1552.     # Remove last slash and all that follows it.  Not all systems have dirname.
  1553.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1554.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1555.       # The file is in a subdirectory.
  1556.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  1557.     fi
  1558.     rm -f $ac_file
  1559.     mv conftest.h $ac_file
  1560.   fi
  1561. fi; done
  1562.  
  1563.  
  1564. case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
  1565. exit 0
  1566. EOF
  1567. chmod +x $CONFIG_STATUS
  1568. rm -f CONFIG.STATUS.old
  1569. rm -fr confdefs* $ac_clean_files
  1570. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1571.  
  1572.