home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / readline.zip / readline-2.1 / configure < prev    next >
Text File  |  1997-05-22  |  69KB  |  2,459 lines

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