home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Shells / zsh-3.0.5-MIHS / src / configure < prev    next >
Encoding:
Text File  |  1997-09-25  |  103.3 KB  |  3,739 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  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-zsh-debug         use it if you want to debug zsh"
  16. ac_help="$ac_help
  17.   --enable-zsh-mem           use zsh memory allocation routines"
  18. ac_help="$ac_help
  19.   --enable-zsh-mem-debug     debug zsh memory allocation routines"
  20. ac_help="$ac_help
  21.   --enable-zsh-mem-warning   print warnings when error in memory allocation"
  22. ac_help="$ac_help
  23.   --enable-zsh-secure-free   turn on error checking for free()"
  24. ac_help="$ac_help
  25.   --enable-zsh-hash-debug    turn on debugging of internal hash tables"
  26. ac_help="$ac_help
  27.   --enable-etcdir=directory  default directory for global zsh scripts"
  28. ac_help="$ac_help
  29.   --enable-zshenv=pathname   the full pathname of the global zshenv script"
  30. ac_help="$ac_help
  31.   --enable-zshrc=pathname    the full pathname of the global zshrc script"
  32. ac_help="$ac_help
  33.   --enable-zprofile=pathname the full pathname of the global zprofile script"
  34. ac_help="$ac_help
  35.   --enable-zlogin=pathname   the full pathname of the global zlogin script"
  36. ac_help="$ac_help
  37.   --enable-zlogout=pathname  the full pathname of the global zlogout script"
  38.  
  39. # Initialize some variables set by options.
  40. # The variables have the same names as the options, with
  41. # dashes changed to underlines.
  42. build=NONE
  43. cache_file=./config.cache
  44. exec_prefix=NONE
  45. host=NONE
  46. no_create=
  47. nonopt=NONE
  48. no_recursion=
  49. prefix=NONE
  50. program_prefix=NONE
  51. program_suffix=NONE
  52. program_transform_name=s,x,x,
  53. silent=
  54. site=
  55. srcdir=
  56. target=NONE
  57. verbose=
  58. x_includes=NONE
  59. x_libraries=NONE
  60. bindir='${exec_prefix}/bin'
  61. sbindir='${exec_prefix}/sbin'
  62. libexecdir='${exec_prefix}/libexec'
  63. datadir='${prefix}/share'
  64. sysconfdir='${prefix}/etc'
  65. sharedstatedir='${prefix}/com'
  66. localstatedir='${prefix}/var'
  67. libdir='${exec_prefix}/lib'
  68. includedir='${prefix}/include'
  69. oldincludedir='/usr/include'
  70. infodir='${prefix}/info'
  71. mandir='${prefix}/man'
  72.  
  73. # Initialize some other variables.
  74. subdirs=
  75. MFLAGS= MAKEFLAGS=
  76. # Maximum number of lines to put in a shell here document.
  77. ac_max_here_lines=12
  78.  
  79. ac_prev=
  80. for ac_option
  81. do
  82.  
  83.   # If the previous option needs an argument, assign it.
  84.   if test -n "$ac_prev"; then
  85.     eval "$ac_prev=\$ac_option"
  86.     ac_prev=
  87.     continue
  88.   fi
  89.  
  90.   case "$ac_option" in
  91.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  92.   *) ac_optarg= ;;
  93.   esac
  94.  
  95.   # Accept the important Cygnus configure options, so we can diagnose typos.
  96.  
  97.   case "$ac_option" in
  98.  
  99.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  100.     ac_prev=bindir ;;
  101.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  102.     bindir="$ac_optarg" ;;
  103.  
  104.   -build | --build | --buil | --bui | --bu)
  105.     ac_prev=build ;;
  106.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  107.     build="$ac_optarg" ;;
  108.  
  109.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  110.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  111.     ac_prev=cache_file ;;
  112.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  113.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  114.     cache_file="$ac_optarg" ;;
  115.  
  116.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  117.     ac_prev=datadir ;;
  118.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  119.   | --da=*)
  120.     datadir="$ac_optarg" ;;
  121.  
  122.   -disable-* | --disable-*)
  123.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  124.     # Reject names that are not valid shell variable names.
  125.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  126.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  127.     fi
  128.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  129.     eval "enable_${ac_feature}=no" ;;
  130.  
  131.   -enable-* | --enable-*)
  132.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  133.     # Reject names that are not valid shell variable names.
  134.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  135.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  136.     fi
  137.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  138.     case "$ac_option" in
  139.       *=*) ;;
  140.       *) ac_optarg=yes ;;
  141.     esac
  142.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  143.  
  144.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  145.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  146.   | --exec | --exe | --ex)
  147.     ac_prev=exec_prefix ;;
  148.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  149.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  150.   | --exec=* | --exe=* | --ex=*)
  151.     exec_prefix="$ac_optarg" ;;
  152.  
  153.   -gas | --gas | --ga | --g)
  154.     # Obsolete; use --with-gas.
  155.     with_gas=yes ;;
  156.  
  157.   -help | --help | --hel | --he)
  158.     # Omit some internal or obsolete options to make the list less imposing.
  159.     # This message is too long to be a string in the A/UX 3.1 sh.
  160.     cat << EOF
  161. Usage: configure [options] [host]
  162. Options: [defaults in brackets after descriptions]
  163. Configuration:
  164.   --cache-file=FILE       cache test results in FILE
  165.   --help                  print this message
  166.   --no-create             do not create output files
  167.   --quiet, --silent       do not print \`checking...' messages
  168.   --version               print the version of autoconf that created configure
  169. Directory and file names:
  170.   --prefix=PREFIX         install architecture-independent files in PREFIX
  171.                           [$ac_default_prefix]
  172.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  173.                           [same as prefix]
  174.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  175.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  176.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  177.   --datadir=DIR           read-only architecture-independent data in DIR
  178.                           [PREFIX/share]
  179.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  180.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  181.                           [PREFIX/com]
  182.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  183.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  184.   --includedir=DIR        C header files in DIR [PREFIX/include]
  185.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  186.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  187.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  188.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  189.   --program-prefix=PREFIX prepend PREFIX to installed program names
  190.   --program-suffix=SUFFIX append SUFFIX to installed program names
  191.   --program-transform-name=PROGRAM
  192.                           run sed PROGRAM on installed program names
  193. EOF
  194.     cat << EOF
  195. Host type:
  196.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  197.   --host=HOST             configure for HOST [guessed]
  198.   --target=TARGET         configure for TARGET [TARGET=HOST]
  199. Features and packages:
  200.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  201.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  202.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  203.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  204.   --x-includes=DIR        X include files are in DIR
  205.   --x-libraries=DIR       X library files are in DIR
  206. EOF
  207.     if test -n "$ac_help"; then
  208.       echo "--enable and --with options recognized:$ac_help"
  209.     fi
  210.     exit 0 ;;
  211.  
  212.   -host | --host | --hos | --ho)
  213.     ac_prev=host ;;
  214.   -host=* | --host=* | --hos=* | --ho=*)
  215.     host="$ac_optarg" ;;
  216.  
  217.   -includedir | --includedir | --includedi | --included | --include \
  218.   | --includ | --inclu | --incl | --inc)
  219.     ac_prev=includedir ;;
  220.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  221.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  222.     includedir="$ac_optarg" ;;
  223.  
  224.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  225.     ac_prev=infodir ;;
  226.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  227.     infodir="$ac_optarg" ;;
  228.  
  229.   -libdir | --libdir | --libdi | --libd)
  230.     ac_prev=libdir ;;
  231.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  232.     libdir="$ac_optarg" ;;
  233.  
  234.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  235.   | --libexe | --libex | --libe)
  236.     ac_prev=libexecdir ;;
  237.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  238.   | --libexe=* | --libex=* | --libe=*)
  239.     libexecdir="$ac_optarg" ;;
  240.  
  241.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  242.   | --localstate | --localstat | --localsta | --localst \
  243.   | --locals | --local | --loca | --loc | --lo)
  244.     ac_prev=localstatedir ;;
  245.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  246.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  247.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  248.     localstatedir="$ac_optarg" ;;
  249.  
  250.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  251.     ac_prev=mandir ;;
  252.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  253.     mandir="$ac_optarg" ;;
  254.  
  255.   -nfp | --nfp | --nf)
  256.     # Obsolete; use --without-fp.
  257.     with_fp=no ;;
  258.  
  259.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  260.   | --no-cr | --no-c)
  261.     no_create=yes ;;
  262.  
  263.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  264.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  265.     no_recursion=yes ;;
  266.  
  267.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  268.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  269.   | --oldin | --oldi | --old | --ol | --o)
  270.     ac_prev=oldincludedir ;;
  271.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  272.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  273.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  274.     oldincludedir="$ac_optarg" ;;
  275.  
  276.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  277.     ac_prev=prefix ;;
  278.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  279.     prefix="$ac_optarg" ;;
  280.  
  281.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  282.   | --program-pre | --program-pr | --program-p)
  283.     ac_prev=program_prefix ;;
  284.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  285.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  286.     program_prefix="$ac_optarg" ;;
  287.  
  288.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  289.   | --program-suf | --program-su | --program-s)
  290.     ac_prev=program_suffix ;;
  291.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  292.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  293.     program_suffix="$ac_optarg" ;;
  294.  
  295.   -program-transform-name | --program-transform-name \
  296.   | --program-transform-nam | --program-transform-na \
  297.   | --program-transform-n | --program-transform- \
  298.   | --program-transform | --program-transfor \
  299.   | --program-transfo | --program-transf \
  300.   | --program-trans | --program-tran \
  301.   | --progr-tra | --program-tr | --program-t)
  302.     ac_prev=program_transform_name ;;
  303.   -program-transform-name=* | --program-transform-name=* \
  304.   | --program-transform-nam=* | --program-transform-na=* \
  305.   | --program-transform-n=* | --program-transform-=* \
  306.   | --program-transform=* | --program-transfor=* \
  307.   | --program-transfo=* | --program-transf=* \
  308.   | --program-trans=* | --program-tran=* \
  309.   | --progr-tra=* | --program-tr=* | --program-t=*)
  310.     program_transform_name="$ac_optarg" ;;
  311.  
  312.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  313.   | -silent | --silent | --silen | --sile | --sil)
  314.     silent=yes ;;
  315.  
  316.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  317.     ac_prev=sbindir ;;
  318.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  319.   | --sbi=* | --sb=*)
  320.     sbindir="$ac_optarg" ;;
  321.  
  322.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  323.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  324.   | --sharedst | --shareds | --shared | --share | --shar \
  325.   | --sha | --sh)
  326.     ac_prev=sharedstatedir ;;
  327.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  328.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  329.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  330.   | --sha=* | --sh=*)
  331.     sharedstatedir="$ac_optarg" ;;
  332.  
  333.   -site | --site | --sit)
  334.     ac_prev=site ;;
  335.   -site=* | --site=* | --sit=*)
  336.     site="$ac_optarg" ;;
  337.  
  338.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  339.     ac_prev=srcdir ;;
  340.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  341.     srcdir="$ac_optarg" ;;
  342.  
  343.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  344.   | --syscon | --sysco | --sysc | --sys | --sy)
  345.     ac_prev=sysconfdir ;;
  346.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  347.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  348.     sysconfdir="$ac_optarg" ;;
  349.  
  350.   -target | --target | --targe | --targ | --tar | --ta | --t)
  351.     ac_prev=target ;;
  352.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  353.     target="$ac_optarg" ;;
  354.  
  355.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  356.     verbose=yes ;;
  357.  
  358.   -version | --version | --versio | --versi | --vers)
  359.     echo "configure generated by autoconf version 2.12"
  360.     exit 0 ;;
  361.  
  362.   -with-* | --with-*)
  363.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  364.     # Reject names that are not valid shell variable names.
  365.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  366.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  367.     fi
  368.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  369.     case "$ac_option" in
  370.       *=*) ;;
  371.       *) ac_optarg=yes ;;
  372.     esac
  373.     eval "with_${ac_package}='$ac_optarg'" ;;
  374.  
  375.   -without-* | --without-*)
  376.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  377.     # Reject names that are not valid shell variable names.
  378.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  379.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  380.     fi
  381.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  382.     eval "with_${ac_package}=no" ;;
  383.  
  384.   --x)
  385.     # Obsolete; use --with-x.
  386.     with_x=yes ;;
  387.  
  388.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  389.   | --x-incl | --x-inc | --x-in | --x-i)
  390.     ac_prev=x_includes ;;
  391.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  392.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  393.     x_includes="$ac_optarg" ;;
  394.  
  395.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  396.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  397.     ac_prev=x_libraries ;;
  398.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  399.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  400.     x_libraries="$ac_optarg" ;;
  401.  
  402.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  403.     ;;
  404.  
  405.   *)
  406.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  407.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  408.     fi
  409.     if test "x$nonopt" != xNONE; then
  410.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  411.     fi
  412.     nonopt="$ac_option"
  413.     ;;
  414.  
  415.   esac
  416. done
  417.  
  418. if test -n "$ac_prev"; then
  419.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  420. fi
  421.  
  422. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  423.  
  424. # File descriptor usage:
  425. # 0 standard input
  426. # 1 file creation
  427. # 2 errors and warnings
  428. # 3 some systems may open it to /dev/tty
  429. # 4 used on the Kubota Titan
  430. # 6 checking for... messages and results
  431. # 5 compiler messages saved in config.log
  432. if test "$silent" = yes; then
  433.   exec 6>/dev/null
  434. else
  435.   exec 6>&1
  436. fi
  437. exec 5>./config.log
  438.  
  439. echo "\
  440. This file contains any messages produced by compilers while
  441. running configure, to aid debugging if configure makes a mistake.
  442. " 1>&5
  443.  
  444. # Strip out --no-create and --no-recursion so they do not pile up.
  445. # Also quote any args containing shell metacharacters.
  446. ac_configure_args=
  447. for ac_arg
  448. do
  449.   case "$ac_arg" in
  450.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  451.   | --no-cr | --no-c) ;;
  452.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  453.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  454.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  455.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  456.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  457.   esac
  458. done
  459.  
  460. # NLS nuisances.
  461. # Only set these to C if already set.  These must not be set unconditionally
  462. # because not all systems understand e.g. LANG=C (notably SCO).
  463. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  464. # Non-C LC_CTYPE values break the ctype check.
  465. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  466. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  467. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  468. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  469.  
  470. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  471. rm -rf conftest* confdefs.h
  472. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  473. echo > confdefs.h
  474.  
  475. # A filename unique to this package, relative to the directory that
  476. # configure is in, which we can look for to find out if srcdir is correct.
  477. ac_unique_file=Src/zsh.h
  478.  
  479. # Find the source files, if location was not specified.
  480. if test -z "$srcdir"; then
  481.   ac_srcdir_defaulted=yes
  482.   # Try the directory containing this script, then its parent.
  483.   ac_prog=$0
  484.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  485.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  486.   srcdir=$ac_confdir
  487.   if test ! -r $srcdir/$ac_unique_file; then
  488.     srcdir=..
  489.   fi
  490. else
  491.   ac_srcdir_defaulted=no
  492. fi
  493. if test ! -r $srcdir/$ac_unique_file; then
  494.   if test "$ac_srcdir_defaulted" = yes; then
  495.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  496.   else
  497.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  498.   fi
  499. fi
  500. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  501.  
  502. # Prefer explicitly selected file to automatically selected ones.
  503. if test -z "$CONFIG_SITE"; then
  504.   if test "x$prefix" != xNONE; then
  505.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  506.   else
  507.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  508.   fi
  509. fi
  510. for ac_site_file in $CONFIG_SITE; do
  511.   if test -r "$ac_site_file"; then
  512.     echo "loading site script $ac_site_file"
  513.     . "$ac_site_file"
  514.   fi
  515. done
  516.  
  517. if test -r "$cache_file"; then
  518.   echo "loading cache $cache_file"
  519.   . $cache_file
  520. else
  521.   echo "creating cache $cache_file"
  522.   > $cache_file
  523. fi
  524.  
  525. ac_ext=c
  526. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  527. ac_cpp='$CPP $CPPFLAGS'
  528. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  529. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  530. cross_compiling=$ac_cv_prog_cc_cross
  531.  
  532. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  533.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  534.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  535.     ac_n= ac_c='
  536. ' ac_t='    '
  537.   else
  538.     ac_n=-n ac_c= ac_t=
  539.   fi
  540. else
  541.   ac_n= ac_c='\c' ac_t=
  542. fi
  543.  
  544.  
  545.  
  546.  
  547. VERSION=`sed -e 's/^.*"\(.*\)"$/\1/' ${srcdir}/Src/version.h`
  548. echo "configuring for zsh $VERSION"
  549.  
  550. ac_aux_dir=
  551. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  552.   if test -f $ac_dir/install-sh; then
  553.     ac_aux_dir=$ac_dir
  554.     ac_install_sh="$ac_aux_dir/install-sh -c"
  555.     break
  556.   elif test -f $ac_dir/install.sh; then
  557.     ac_aux_dir=$ac_dir
  558.     ac_install_sh="$ac_aux_dir/install.sh -c"
  559.     break
  560.   fi
  561. done
  562. if test -z "$ac_aux_dir"; then
  563.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  564. fi
  565. ac_config_guess=$ac_aux_dir/config.guess
  566. ac_config_sub=$ac_aux_dir/config.sub
  567. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  568.  
  569.  
  570. # Make sure we can run config.sub.
  571. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  572. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  573. fi
  574.  
  575. echo $ac_n "checking host system type""... $ac_c" 1>&6
  576. echo "configure:577: checking host system type" >&5
  577.  
  578. host_alias=$host
  579. case "$host_alias" in
  580. NONE)
  581.   case $nonopt in
  582.   NONE)
  583.     if host_alias=`$ac_config_guess`; then :
  584.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  585.     fi ;;
  586.   *) host_alias=$nonopt ;;
  587.   esac ;;
  588. esac
  589.  
  590. host=`$ac_config_sub $host_alias`
  591. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  592. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  593. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  594. echo "$ac_t""$host" 1>&6
  595.  
  596. cat >> confdefs.h <<EOF
  597. #define OSTYPE "$host_os"
  598. EOF
  599.  
  600. cat >> confdefs.h <<EOF
  601. #define MACHTYPE "$host_cpu"
  602. EOF
  603.  
  604. cat >> confdefs.h <<EOF
  605. #define VENDOR "$host_vendor"
  606. EOF
  607.  
  608.  
  609. # Check whether --enable-zsh-debug or --disable-zsh-debug was given.
  610. if test "${enable_zsh_debug+set}" = set; then
  611.   enableval="$enable_zsh_debug"
  612.   if test x$enableval = xyes; then
  613.   cat >> confdefs.h <<\EOF
  614. #define DEBUG 1
  615. EOF
  616.  
  617. fi
  618. fi
  619.  
  620.  
  621. # Check whether --enable-zsh-mem or --disable-zsh-mem was given.
  622. if test "${enable_zsh_mem+set}" = set; then
  623.   enableval="$enable_zsh_mem"
  624.   if test x$enableval = xyes; then
  625.   cat >> confdefs.h <<\EOF
  626. #define ZSH_MEM 1
  627. EOF
  628.  
  629. fi
  630. fi
  631.  
  632.  
  633. # Check whether --enable-zsh-mem-debug or --disable-zsh-mem-debug was given.
  634. if test "${enable_zsh_mem_debug+set}" = set; then
  635.   enableval="$enable_zsh_mem_debug"
  636.   if test x$enableval = xyes; then
  637.   cat >> confdefs.h <<\EOF
  638. #define ZSH_MEM_DEBUG 1
  639. EOF
  640.  
  641. fi
  642. fi
  643.  
  644.  
  645. # Check whether --enable-zsh-mem-warning or --disable-zsh-mem-warning was given.
  646. if test "${enable_zsh_mem_warning+set}" = set; then
  647.   enableval="$enable_zsh_mem_warning"
  648.   if test x$enableval = xyes; then
  649.   cat >> confdefs.h <<\EOF
  650. #define ZSH_MEM_WARNING 1
  651. EOF
  652.  
  653. fi
  654. fi
  655.  
  656.  
  657. # Check whether --enable-zsh-secure-free or --disable-zsh-secure-free was given.
  658. if test "${enable_zsh_secure_free+set}" = set; then
  659.   enableval="$enable_zsh_secure_free"
  660.   if test x$enableval = xyes; then
  661.   cat >> confdefs.h <<\EOF
  662. #define ZSH_SECURE_FREE 1
  663. EOF
  664.  
  665. fi
  666. fi
  667.  
  668.  
  669. # Check whether --enable-zsh-hash-debug or --disable-zsh-hash-debug was given.
  670. if test "${enable_zsh_hash_debug+set}" = set; then
  671.   enableval="$enable_zsh_hash_debug"
  672.   if test x$enableval = xyes; then
  673.   cat >> confdefs.h <<\EOF
  674. #define ZSH_HASH_DEBUG 1
  675. EOF
  676.  
  677. fi
  678. fi
  679.  
  680.  
  681. # Check whether --enable-etcdir or --disable-etcdir was given.
  682. if test "${enable_etcdir+set}" = set; then
  683.   enableval="$enable_etcdir"
  684.   etcdir="$enableval"
  685. else
  686.   etcdir=/etc
  687. fi
  688.  
  689.  
  690. # Check whether --enable-zshenv or --disable-zshenv was given.
  691. if test "${enable_zshenv+set}" = set; then
  692.   enableval="$enable_zshenv"
  693.   zshenv="$enableval"
  694. else
  695.   if test "x$etcdir" = xno; then
  696.   zshenv=no
  697. else
  698.   zshenv="$etcdir/zshenv"
  699. fi
  700. fi
  701.  
  702. if test "x$zshenv" != xno; then
  703.   cat >> confdefs.h <<EOF
  704. #define GLOBAL_ZSHENV "$zshenv"
  705. EOF
  706.  
  707. fi
  708.  
  709. # Check whether --enable-zshrc or --disable-zshrc was given.
  710. if test "${enable_zshrc+set}" = set; then
  711.   enableval="$enable_zshrc"
  712.   zshrc="$enableval"
  713. else
  714.   if test "x$etcdir" = xno; then
  715.   zshrc=no
  716. else
  717.   zshrc="$etcdir/zshrc"
  718. fi
  719. fi
  720.  
  721. if test "x$zshrc" != xno; then
  722.   cat >> confdefs.h <<EOF
  723. #define GLOBAL_ZSHRC "$zshrc"
  724. EOF
  725.  
  726. fi
  727.  
  728. # Check whether --enable-zprofile or --disable-zprofile was given.
  729. if test "${enable_zprofile+set}" = set; then
  730.   enableval="$enable_zprofile"
  731.   zprofile="$enableval"
  732. else
  733.   if test "x$etcdir" = xno; then
  734.   zprofile=no
  735. else
  736.   zprofile="$etcdir/zprofile"
  737. fi
  738. fi
  739.  
  740. if test "x$zprofile" != xno; then
  741.   cat >> confdefs.h <<EOF
  742. #define GLOBAL_ZPROFILE "$zprofile"
  743. EOF
  744.  
  745. fi
  746.  
  747. # Check whether --enable-zlogin or --disable-zlogin was given.
  748. if test "${enable_zlogin+set}" = set; then
  749.   enableval="$enable_zlogin"
  750.   zlogin="$enableval"
  751. else
  752.   if test "x$etcdir" = xno; then
  753.   zlogin=no
  754. else
  755.   zlogin="$etcdir/zlogin"
  756. fi
  757. fi
  758.  
  759. if test "x$zlogin" != xno; then
  760.   cat >> confdefs.h <<EOF
  761. #define GLOBAL_ZLOGIN "$zlogin"
  762. EOF
  763.  
  764. fi
  765.  
  766. # Check whether --enable-zlogout or --disable-zlogout was given.
  767. if test "${enable_zlogout+set}" = set; then
  768.   enableval="$enable_zlogout"
  769.   zlogout="$enableval"
  770. else
  771.   if test "x$etcdir" = xno; then
  772.   zlogout=no
  773. else
  774.   zlogout="$etcdir/zlogout"
  775. fi
  776. fi
  777.  
  778. if test "x$zlogout" != xno; then
  779.   cat >> confdefs.h <<EOF
  780. #define GLOBAL_ZLOGOUT "$zlogout"
  781. EOF
  782.  
  783. fi
  784.  
  785.  
  786. test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
  787. if test "${enable_zsh_debug}" = yes; then
  788.   test -z "$LDFLAGS" && LDFLAGS=-g
  789. fi
  790.  
  791. # Extract the first word of "gcc", so it can be a program name with args.
  792. set dummy gcc; ac_word=$2
  793. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  794. echo "configure:795: checking for $ac_word" >&5
  795. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  796.   echo $ac_n "(cached) $ac_c" 1>&6
  797. else
  798.   if test -n "$CC"; then
  799.   ac_cv_prog_CC="$CC" # Let the user override the test.
  800. else
  801.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  802.   for ac_dir in $PATH; do
  803.     test -z "$ac_dir" && ac_dir=.
  804.     if test -f $ac_dir/$ac_word; then
  805.       ac_cv_prog_CC="gcc"
  806.       break
  807.     fi
  808.   done
  809.   IFS="$ac_save_ifs"
  810. fi
  811. fi
  812. CC="$ac_cv_prog_CC"
  813. if test -n "$CC"; then
  814.   echo "$ac_t""$CC" 1>&6
  815. else
  816.   echo "$ac_t""no" 1>&6
  817. fi
  818.  
  819. if test -z "$CC"; then
  820.   # Extract the first word of "cc", so it can be a program name with args.
  821. set dummy cc; ac_word=$2
  822. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  823. echo "configure:824: checking for $ac_word" >&5
  824. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  825.   echo $ac_n "(cached) $ac_c" 1>&6
  826. else
  827.   if test -n "$CC"; then
  828.   ac_cv_prog_CC="$CC" # Let the user override the test.
  829. else
  830.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  831.   ac_prog_rejected=no
  832.   for ac_dir in $PATH; do
  833.     test -z "$ac_dir" && ac_dir=.
  834.     if test -f $ac_dir/$ac_word; then
  835.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  836.         ac_prog_rejected=yes
  837.     continue
  838.       fi
  839.       ac_cv_prog_CC="cc"
  840.       break
  841.     fi
  842.   done
  843.   IFS="$ac_save_ifs"
  844. if test $ac_prog_rejected = yes; then
  845.   # We found a bogon in the path, so make sure we never use it.
  846.   set dummy $ac_cv_prog_CC
  847.   shift
  848.   if test $# -gt 0; then
  849.     # We chose a different compiler from the bogus one.
  850.     # However, it has the same basename, so the bogon will be chosen
  851.     # first if we set CC to just the basename; use the full file name.
  852.     shift
  853.     set dummy "$ac_dir/$ac_word" "$@"
  854.     shift
  855.     ac_cv_prog_CC="$@"
  856.   fi
  857. fi
  858. fi
  859. fi
  860. CC="$ac_cv_prog_CC"
  861. if test -n "$CC"; then
  862.   echo "$ac_t""$CC" 1>&6
  863. else
  864.   echo "$ac_t""no" 1>&6
  865. fi
  866.  
  867.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  868. fi
  869.  
  870. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  871. echo "configure:872: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  872.  
  873. ac_ext=c
  874. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  875. ac_cpp='$CPP $CPPFLAGS'
  876. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  877. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  878. cross_compiling=$ac_cv_prog_cc_cross
  879.  
  880. cat > conftest.$ac_ext <<EOF
  881. #line 882 "configure"
  882. #include "confdefs.h"
  883. main(){return(0);}
  884. EOF
  885. if { (eval echo configure:886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  886.   ac_cv_prog_cc_works=yes
  887.   # If we can't run a trivial program, we are probably using a cross compiler.
  888.   if (./conftest; exit) 2>/dev/null; then
  889.     ac_cv_prog_cc_cross=no
  890.   else
  891.     ac_cv_prog_cc_cross=yes
  892.   fi
  893. else
  894.   echo "configure: failed program was:" >&5
  895.   cat conftest.$ac_ext >&5
  896.   ac_cv_prog_cc_works=no
  897. fi
  898. rm -fr conftest*
  899.  
  900. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  901. if test $ac_cv_prog_cc_works = no; then
  902.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  903. fi
  904. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  905. echo "configure:906: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  906. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  907. cross_compiling=$ac_cv_prog_cc_cross
  908.  
  909. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  910. echo "configure:911: checking whether we are using GNU C" >&5
  911. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  912.   echo $ac_n "(cached) $ac_c" 1>&6
  913. else
  914.   cat > conftest.c <<EOF
  915. #ifdef __GNUC__
  916.   yes;
  917. #endif
  918. EOF
  919. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  920.   ac_cv_prog_gcc=yes
  921. else
  922.   ac_cv_prog_gcc=no
  923. fi
  924. fi
  925.  
  926. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  927.  
  928. if test $ac_cv_prog_gcc = yes; then
  929.   GCC=yes
  930.   ac_test_CFLAGS="${CFLAGS+set}"
  931.   ac_save_CFLAGS="$CFLAGS"
  932.   CFLAGS=
  933.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  934. echo "configure:935: checking whether ${CC-cc} accepts -g" >&5
  935. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  936.   echo $ac_n "(cached) $ac_c" 1>&6
  937. else
  938.   echo 'void f(){}' > conftest.c
  939. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  940.   ac_cv_prog_cc_g=yes
  941. else
  942.   ac_cv_prog_cc_g=no
  943. fi
  944. rm -f conftest*
  945.  
  946. fi
  947.  
  948. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  949.   if test "$ac_test_CFLAGS" = set; then
  950.     CFLAGS="$ac_save_CFLAGS"
  951.   elif test $ac_cv_prog_cc_g = yes; then
  952.     CFLAGS="-g -O2"
  953.   else
  954.     CFLAGS="-O2"
  955.   fi
  956. else
  957.   GCC=
  958.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  959. fi
  960.  
  961.  
  962. if test -n "$auto_cflags"; then
  963.   if test "${enable_zsh_debug}" = yes; then
  964.     if test -n "$GCC"; then
  965.       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -g"
  966.     else
  967.       CFLAGS="$CFLAGS -g"
  968.     fi
  969.   else
  970.     if test -n "$GCC"; then
  971.       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -O2"
  972.     else
  973.       CFLAGS="$CFLAGS -O"
  974.     fi
  975.   fi
  976. fi
  977.  
  978. if test `echo $host_os | sed 's/^\(...\).*/\1/'` = sco; then
  979.   CFLAGS="-D__sco $CFLAGS"
  980. fi
  981.  
  982.  
  983. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  984. echo "configure:985: checking how to run the C preprocessor" >&5
  985. # On Suns, sometimes $CPP names a directory.
  986. if test -n "$CPP" && test -d "$CPP"; then
  987.   CPP=
  988. fi
  989. if test -z "$CPP"; then
  990. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  991.   echo $ac_n "(cached) $ac_c" 1>&6
  992. else
  993.     # This must be in double quotes, not single quotes, because CPP may get
  994.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  995.   CPP="${CC-cc} -E"
  996.   # On the NeXT, cc -E runs the code through the compiler's parser,
  997.   # not just through cpp.
  998.   cat > conftest.$ac_ext <<EOF
  999. #line 1000 "configure"
  1000. #include "confdefs.h"
  1001. #include <assert.h>
  1002. Syntax Error
  1003. EOF
  1004. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1005. { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1006. ac_err=`grep -v '^ *+' conftest.out`
  1007. if test -z "$ac_err"; then
  1008.   :
  1009. else
  1010.   echo "$ac_err" >&5
  1011.   echo "configure: failed program was:" >&5
  1012.   cat conftest.$ac_ext >&5
  1013.   rm -rf conftest*
  1014.   CPP="${CC-cc} -E -traditional-cpp"
  1015.   cat > conftest.$ac_ext <<EOF
  1016. #line 1017 "configure"
  1017. #include "confdefs.h"
  1018. #include <assert.h>
  1019. Syntax Error
  1020. EOF
  1021. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1022. { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1023. ac_err=`grep -v '^ *+' conftest.out`
  1024. if test -z "$ac_err"; then
  1025.   :
  1026. else
  1027.   echo "$ac_err" >&5
  1028.   echo "configure: failed program was:" >&5
  1029.   cat conftest.$ac_ext >&5
  1030.   rm -rf conftest*
  1031.   CPP=/lib/cpp
  1032. fi
  1033. rm -f conftest*
  1034. fi
  1035. rm -f conftest*
  1036.   ac_cv_prog_CPP="$CPP"
  1037. fi
  1038.   CPP="$ac_cv_prog_CPP"
  1039. else
  1040.   ac_cv_prog_CPP="$CPP"
  1041. fi
  1042. echo "$ac_t""$CPP" 1>&6
  1043.                  if test $ac_cv_prog_gcc = yes; then
  1044.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  1045. echo "configure:1046: checking whether ${CC-cc} needs -traditional" >&5
  1046. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  1047.   echo $ac_n "(cached) $ac_c" 1>&6
  1048. else
  1049.     ac_pattern="Autoconf.*'x'"
  1050.   cat > conftest.$ac_ext <<EOF
  1051. #line 1052 "configure"
  1052. #include "confdefs.h"
  1053. #include <sgtty.h>
  1054. Autoconf TIOCGETP
  1055. EOF
  1056. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1057.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1058.   rm -rf conftest*
  1059.   ac_cv_prog_gcc_traditional=yes
  1060. else
  1061.   rm -rf conftest*
  1062.   ac_cv_prog_gcc_traditional=no
  1063. fi
  1064. rm -f conftest*
  1065.  
  1066.  
  1067.   if test $ac_cv_prog_gcc_traditional = no; then
  1068.     cat > conftest.$ac_ext <<EOF
  1069. #line 1070 "configure"
  1070. #include "confdefs.h"
  1071. #include <termio.h>
  1072. Autoconf TCGETA
  1073. EOF
  1074. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1075.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1076.   rm -rf conftest*
  1077.   ac_cv_prog_gcc_traditional=yes
  1078. fi
  1079. rm -f conftest*
  1080.  
  1081.   fi
  1082. fi
  1083.  
  1084. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1085.   if test $ac_cv_prog_gcc_traditional = yes; then
  1086.     CC="$CC -traditional"
  1087.   fi
  1088. fi
  1089.      echo $ac_n "checking for working const""... $ac_c" 1>&6
  1090. echo "configure:1091: checking for working const" >&5
  1091. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1092.   echo $ac_n "(cached) $ac_c" 1>&6
  1093. else
  1094.   cat > conftest.$ac_ext <<EOF
  1095. #line 1096 "configure"
  1096. #include "confdefs.h"
  1097.  
  1098. int main() {
  1099.  
  1100. /* Ultrix mips cc rejects this.  */
  1101. typedef int charset[2]; const charset x;
  1102. /* SunOS 4.1.1 cc rejects this.  */
  1103. char const *const *ccp;
  1104. char **p;
  1105. /* NEC SVR4.0.2 mips cc rejects this.  */
  1106. struct point {int x, y;};
  1107. static struct point const zero = {0,0};
  1108. /* AIX XL C 1.02.0.0 rejects this.
  1109.    It does not let you subtract one const X* pointer from another in an arm
  1110.    of an if-expression whose if-part is not a constant expression */
  1111. const char *g = "string";
  1112. ccp = &g + (g ? g-g : 0);
  1113. /* HPUX 7.0 cc rejects these. */
  1114. ++ccp;
  1115. p = (char**) ccp;
  1116. ccp = (char const *const *) p;
  1117. { /* SCO 3.2v4 cc rejects this.  */
  1118.   char *t;
  1119.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1120.  
  1121.   *t++ = 0;
  1122. }
  1123. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1124.   int x[] = {25, 17};
  1125.   const int *foo = &x[0];
  1126.   ++foo;
  1127. }
  1128. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1129.   typedef const int *iptr;
  1130.   iptr p = 0;
  1131.   ++p;
  1132. }
  1133. { /* AIX XL C 1.02.0.0 rejects this saying
  1134.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1135.   struct s { int j; const int *ap[3]; };
  1136.   struct s *b; b->j = 5;
  1137. }
  1138. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1139.   const int foo = 10;
  1140. }
  1141.  
  1142. ; return 0; }
  1143. EOF
  1144. if { (eval echo configure:1145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1145.   rm -rf conftest*
  1146.   ac_cv_c_const=yes
  1147. else
  1148.   echo "configure: failed program was:" >&5
  1149.   cat conftest.$ac_ext >&5
  1150.   rm -rf conftest*
  1151.   ac_cv_c_const=no
  1152. fi
  1153. rm -f conftest*
  1154. fi
  1155.  
  1156. echo "$ac_t""$ac_cv_c_const" 1>&6
  1157. if test $ac_cv_c_const = no; then
  1158.   cat >> confdefs.h <<\EOF
  1159. #define const 
  1160. EOF
  1161.  
  1162. fi
  1163.                   echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1164. echo "configure:1165: checking for ${CC-cc} option to accept ANSI C" >&5
  1165. if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
  1166.   echo $ac_n "(cached) $ac_c" 1>&6
  1167. else
  1168.   ac_cv_prog_cc_stdc=no
  1169. ac_save_CFLAGS="$CFLAGS"
  1170. # Don't try gcc -ansi; that turns off useful extensions and
  1171. # breaks some systems' header files.
  1172. # AIX            -qlanglvl=ansi
  1173. # Ultrix and OSF/1    -std1
  1174. # HP-UX            -Aa -D_HPUX_SOURCE
  1175. # SVR4            -Xc
  1176. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
  1177. do
  1178.   CFLAGS="$ac_save_CFLAGS $ac_arg"
  1179.   cat > conftest.$ac_ext <<EOF
  1180. #line 1181 "configure"
  1181. #include "confdefs.h"
  1182. #ifndef __STDC__
  1183. choke me
  1184. #endif    
  1185.  
  1186. int main() {
  1187. int test (int i, double x);
  1188. struct s1 {int (*f) (int a);};
  1189. struct s2 {int (*f) (double a);};
  1190. ; return 0; }
  1191. EOF
  1192. if { (eval echo configure:1193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1193.   rm -rf conftest*
  1194.   ac_cv_prog_cc_stdc="$ac_arg"; break
  1195. else
  1196.   echo "configure: failed program was:" >&5
  1197.   cat conftest.$ac_ext >&5
  1198. fi
  1199. rm -f conftest*
  1200. done
  1201. CFLAGS="$ac_save_CFLAGS"
  1202.  
  1203. fi
  1204.  
  1205. echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
  1206. case "x$ac_cv_prog_cc_stdc" in
  1207.   x|xno) ;;
  1208.   *) CC="$CC $ac_cv_prog_cc_stdc" ;;
  1209. esac
  1210.  
  1211.  
  1212. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1213. echo "configure:1214: checking for function prototypes" >&5
  1214. if test "$ac_cv_prog_cc_stdc" != no; then
  1215.   echo "$ac_t""yes" 1>&6
  1216.   cat >> confdefs.h <<\EOF
  1217. #define PROTOTYPES 1
  1218. EOF
  1219.  
  1220.   U=
  1221. else
  1222.   echo "$ac_t""no" 1>&6
  1223.   U=_
  1224. fi
  1225.              echo $ac_n "checking size of long""... $ac_c" 1>&6
  1226. echo "configure:1227: checking size of long" >&5
  1227. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  1228.   echo $ac_n "(cached) $ac_c" 1>&6
  1229. else
  1230.   if test "$cross_compiling" = yes; then
  1231.   ac_cv_sizeof_long=8
  1232. else
  1233.   cat > conftest.$ac_ext <<EOF
  1234. #line 1235 "configure"
  1235. #include "confdefs.h"
  1236. #include <stdio.h>
  1237. main()
  1238. {
  1239.   FILE *f=fopen("conftestval", "w");
  1240.   if (!f) exit(1);
  1241.   fprintf(f, "%d\n", sizeof(long));
  1242.   exit(0);
  1243. }
  1244. EOF
  1245. if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1246. then
  1247.   ac_cv_sizeof_long=`cat conftestval`
  1248. else
  1249.   echo "configure: failed program was:" >&5
  1250.   cat conftest.$ac_ext >&5
  1251.   rm -fr conftest*
  1252.   ac_cv_sizeof_long=0
  1253. fi
  1254. rm -fr conftest*
  1255. fi
  1256.  
  1257. fi
  1258. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  1259. cat >> confdefs.h <<EOF
  1260. #define SIZEOF_LONG $ac_cv_sizeof_long
  1261. EOF
  1262.  
  1263.     
  1264. echo $ac_n "checking if the compiler supports union initialisation""... $ac_c" 1>&6
  1265. echo "configure:1266: checking if the compiler supports union initialisation" >&5
  1266. if eval "test \"`echo '$''{'zsh_cv_c_have_union_init'+set}'`\" = set"; then
  1267.   echo $ac_n "(cached) $ac_c" 1>&6
  1268. else
  1269.   cat > conftest.$ac_ext <<EOF
  1270. #line 1271 "configure"
  1271. #include "confdefs.h"
  1272. union{void *p;long l;}u={0};
  1273. int main() {
  1274. u.l=1;
  1275. ; return 0; }
  1276. EOF
  1277. if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1278.   rm -rf conftest*
  1279.   zsh_cv_c_have_union_init=yes
  1280. else
  1281.   echo "configure: failed program was:" >&5
  1282.   cat conftest.$ac_ext >&5
  1283.   rm -rf conftest*
  1284.   zsh_cv_c_have_union_init=no
  1285. fi
  1286. rm -f conftest*
  1287. fi
  1288.  
  1289. echo "$ac_t""$zsh_cv_c_have_union_init" 1>&6
  1290. if test $zsh_cv_c_have_union_init = yes; then
  1291.   cat >> confdefs.h <<\EOF
  1292. #define HAVE_UNION_INIT 1
  1293. EOF
  1294.  
  1295. fi
  1296.  
  1297. echo $ac_n "checking if signed to unsigned casting is broken""... $ac_c" 1>&6
  1298. echo "configure:1299: checking if signed to unsigned casting is broken" >&5
  1299. if eval "test \"`echo '$''{'zsh_cv_c_broken_signed_to_unsigned_casting'+set}'`\" = set"; then
  1300.   echo $ac_n "(cached) $ac_c" 1>&6
  1301. else
  1302.   if test "$cross_compiling" = yes; then
  1303.   zsh_cv_c_broken_signed_to_unsigned_casting=no
  1304. else
  1305.   cat > conftest.$ac_ext <<EOF
  1306. #line 1307 "configure"
  1307. #include "confdefs.h"
  1308. main(){return((int)(unsigned char)((char) -1) == 255);}
  1309. EOF
  1310. if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1311. then
  1312.   zsh_cv_c_broken_signed_to_unsigned_casting=yes
  1313. else
  1314.   echo "configure: failed program was:" >&5
  1315.   cat conftest.$ac_ext >&5
  1316.   rm -fr conftest*
  1317.   zsh_cv_c_broken_signed_to_unsigned_casting=no
  1318. fi
  1319. rm -fr conftest*
  1320. fi
  1321.  
  1322. fi
  1323.  
  1324. echo "$ac_t""$zsh_cv_c_broken_signed_to_unsigned_casting" 1>&6
  1325. if test $zsh_cv_c_broken_signed_to_unsigned_casting = yes; then
  1326.   cat >> confdefs.h <<\EOF
  1327. #define BROKEN_SIGNED_TO_UNSIGNED_CASTING 1
  1328. EOF
  1329.  
  1330. fi
  1331.  
  1332. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  1333. echo "configure:1334: checking whether ${MAKE-make} sets \${MAKE}" >&5
  1334. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  1335. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  1336.   echo $ac_n "(cached) $ac_c" 1>&6
  1337. else
  1338.   cat > conftestmake <<\EOF
  1339. all:
  1340.     @echo 'ac_maketemp="${MAKE}"'
  1341. EOF
  1342. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1343. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  1344. if test -n "$ac_maketemp"; then
  1345.   eval ac_cv_prog_make_${ac_make}_set=yes
  1346. else
  1347.   eval ac_cv_prog_make_${ac_make}_set=no
  1348. fi
  1349. rm -f conftestmake
  1350. fi
  1351. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  1352.   echo "$ac_t""yes" 1>&6
  1353.   SET_MAKE=
  1354. else
  1355.   echo "$ac_t""no" 1>&6
  1356.   SET_MAKE="MAKE=${MAKE-make}"
  1357. fi
  1358.             # Find a good install program.  We prefer a C program (faster),
  1359. # so one script is as good as another.  But avoid the broken or
  1360. # incompatible versions:
  1361. # SysV /etc/install, /usr/sbin/install
  1362. # SunOS /usr/etc/install
  1363. # IRIX /sbin/install
  1364. # AIX /bin/install
  1365. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1366. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1367. # ./install, which can be erroneously created by make from ./install.sh.
  1368. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1369. echo "configure:1370: checking for a BSD compatible install" >&5
  1370. if test -z "$INSTALL"; then
  1371. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1372.   echo $ac_n "(cached) $ac_c" 1>&6
  1373. else
  1374.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  1375.   for ac_dir in $PATH; do
  1376.     # Account for people who put trailing slashes in PATH elements.
  1377.     case "$ac_dir/" in
  1378.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1379.     *)
  1380.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1381.       for ac_prog in ginstall installbsd scoinst install; do
  1382.         if test -f $ac_dir/$ac_prog; then
  1383.       if test $ac_prog = install &&
  1384.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1385.         # AIX install.  It has an incompatible calling convention.
  1386.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1387.         :
  1388.       else
  1389.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1390.         break 2
  1391.       fi
  1392.     fi
  1393.       done
  1394.       ;;
  1395.     esac
  1396.   done
  1397.   IFS="$ac_save_IFS"
  1398.  
  1399. fi
  1400.   if test "${ac_cv_path_install+set}" = set; then
  1401.     INSTALL="$ac_cv_path_install"
  1402.   else
  1403.     # As a last resort, use the slow shell script.  We don't cache a
  1404.     # path for INSTALL within a source directory, because that will
  1405.     # break other packages using the cache if that directory is
  1406.     # removed, or if the path is relative.
  1407.     INSTALL="$ac_install_sh"
  1408.   fi
  1409. fi
  1410. echo "$ac_t""$INSTALL" 1>&6
  1411.  
  1412. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1413. # It thinks the first close brace ends the variable substitution.
  1414. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1415.  
  1416. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1417.              for ac_prog in mawk gawk nawk awk
  1418. do
  1419. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1420. set dummy $ac_prog; ac_word=$2
  1421. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1422. echo "configure:1423: checking for $ac_word" >&5
  1423. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  1424.   echo $ac_n "(cached) $ac_c" 1>&6
  1425. else
  1426.   if test -n "$AWK"; then
  1427.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  1428. else
  1429.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1430.   for ac_dir in $PATH; do
  1431.     test -z "$ac_dir" && ac_dir=.
  1432.     if test -f $ac_dir/$ac_word; then
  1433.       ac_cv_prog_AWK="$ac_prog"
  1434.       break
  1435.     fi
  1436.   done
  1437.   IFS="$ac_save_ifs"
  1438. fi
  1439. fi
  1440. AWK="$ac_cv_prog_AWK"
  1441. if test -n "$AWK"; then
  1442.   echo "$ac_t""$AWK" 1>&6
  1443. else
  1444.   echo "$ac_t""no" 1>&6
  1445. fi
  1446.  
  1447. test -n "$AWK" && break
  1448. done
  1449.                  
  1450. ac_header_dirent=no
  1451. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1452. do
  1453. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1454. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1455. echo "configure:1456: checking for $ac_hdr that defines DIR" >&5
  1456. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1457.   echo $ac_n "(cached) $ac_c" 1>&6
  1458. else
  1459.   cat > conftest.$ac_ext <<EOF
  1460. #line 1461 "configure"
  1461. #include "confdefs.h"
  1462. #include <sys/types.h>
  1463. #include <$ac_hdr>
  1464. int main() {
  1465. DIR *dirp = 0;
  1466. ; return 0; }
  1467. EOF
  1468. if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1469.   rm -rf conftest*
  1470.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1471. else
  1472.   echo "configure: failed program was:" >&5
  1473.   cat conftest.$ac_ext >&5
  1474.   rm -rf conftest*
  1475.   eval "ac_cv_header_dirent_$ac_safe=no"
  1476. fi
  1477. rm -f conftest*
  1478. fi
  1479. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1480.   echo "$ac_t""yes" 1>&6
  1481.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1482.   cat >> confdefs.h <<EOF
  1483. #define $ac_tr_hdr 1
  1484. EOF
  1485.  ac_header_dirent=$ac_hdr; break
  1486. else
  1487.   echo "$ac_t""no" 1>&6
  1488. fi
  1489. done
  1490. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1491. if test $ac_header_dirent = dirent.h; then
  1492. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1493. echo "configure:1494: checking for opendir in -ldir" >&5
  1494. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1495. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1496.   echo $ac_n "(cached) $ac_c" 1>&6
  1497. else
  1498.   ac_save_LIBS="$LIBS"
  1499. LIBS="-ldir  $LIBS"
  1500. cat > conftest.$ac_ext <<EOF
  1501. #line 1502 "configure"
  1502. #include "confdefs.h"
  1503. /* Override any gcc2 internal prototype to avoid an error.  */
  1504. /* We use char because int might match the return type of a gcc2
  1505.     builtin and then its argument prototype would still apply.  */
  1506. char opendir();
  1507.  
  1508. int main() {
  1509. opendir()
  1510. ; return 0; }
  1511. EOF
  1512. if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1513.   rm -rf conftest*
  1514.   eval "ac_cv_lib_$ac_lib_var=yes"
  1515. else
  1516.   echo "configure: failed program was:" >&5
  1517.   cat conftest.$ac_ext >&5
  1518.   rm -rf conftest*
  1519.   eval "ac_cv_lib_$ac_lib_var=no"
  1520. fi
  1521. rm -f conftest*
  1522. LIBS="$ac_save_LIBS"
  1523.  
  1524. fi
  1525. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1526.   echo "$ac_t""yes" 1>&6
  1527.   LIBS="$LIBS -ldir"
  1528. else
  1529.   echo "$ac_t""no" 1>&6
  1530. fi
  1531.  
  1532. else
  1533. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1534. echo "configure:1535: checking for opendir in -lx" >&5
  1535. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1536. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1537.   echo $ac_n "(cached) $ac_c" 1>&6
  1538. else
  1539.   ac_save_LIBS="$LIBS"
  1540. LIBS="-lx  $LIBS"
  1541. cat > conftest.$ac_ext <<EOF
  1542. #line 1543 "configure"
  1543. #include "confdefs.h"
  1544. /* Override any gcc2 internal prototype to avoid an error.  */
  1545. /* We use char because int might match the return type of a gcc2
  1546.     builtin and then its argument prototype would still apply.  */
  1547. char opendir();
  1548.  
  1549. int main() {
  1550. opendir()
  1551. ; return 0; }
  1552. EOF
  1553. if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1554.   rm -rf conftest*
  1555.   eval "ac_cv_lib_$ac_lib_var=yes"
  1556. else
  1557.   echo "configure: failed program was:" >&5
  1558.   cat conftest.$ac_ext >&5
  1559.   rm -rf conftest*
  1560.   eval "ac_cv_lib_$ac_lib_var=no"
  1561. fi
  1562. rm -f conftest*
  1563. LIBS="$ac_save_LIBS"
  1564.  
  1565. fi
  1566. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1567.   echo "$ac_t""yes" 1>&6
  1568.   LIBS="$LIBS -lx"
  1569. else
  1570.   echo "$ac_t""no" 1>&6
  1571. fi
  1572.  
  1573. fi
  1574.  
  1575. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1576. echo "configure:1577: checking for ANSI C header files" >&5
  1577. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1578.   echo $ac_n "(cached) $ac_c" 1>&6
  1579. else
  1580.   cat > conftest.$ac_ext <<EOF
  1581. #line 1582 "configure"
  1582. #include "confdefs.h"
  1583. #include <stdlib.h>
  1584. #include <stdarg.h>
  1585. #include <string.h>
  1586. #include <float.h>
  1587. EOF
  1588. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1589. { (eval echo configure:1590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1590. ac_err=`grep -v '^ *+' conftest.out`
  1591. if test -z "$ac_err"; then
  1592.   rm -rf conftest*
  1593.   ac_cv_header_stdc=yes
  1594. else
  1595.   echo "$ac_err" >&5
  1596.   echo "configure: failed program was:" >&5
  1597.   cat conftest.$ac_ext >&5
  1598.   rm -rf conftest*
  1599.   ac_cv_header_stdc=no
  1600. fi
  1601. rm -f conftest*
  1602.  
  1603. if test $ac_cv_header_stdc = yes; then
  1604.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1605. cat > conftest.$ac_ext <<EOF
  1606. #line 1607 "configure"
  1607. #include "confdefs.h"
  1608. #include <string.h>
  1609. EOF
  1610. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1611.   egrep "memchr" >/dev/null 2>&1; then
  1612.   :
  1613. else
  1614.   rm -rf conftest*
  1615.   ac_cv_header_stdc=no
  1616. fi
  1617. rm -f conftest*
  1618.  
  1619. fi
  1620.  
  1621. if test $ac_cv_header_stdc = yes; then
  1622.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1623. cat > conftest.$ac_ext <<EOF
  1624. #line 1625 "configure"
  1625. #include "confdefs.h"
  1626. #include <stdlib.h>
  1627. EOF
  1628. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1629.   egrep "free" >/dev/null 2>&1; then
  1630.   :
  1631. else
  1632.   rm -rf conftest*
  1633.   ac_cv_header_stdc=no
  1634. fi
  1635. rm -f conftest*
  1636.  
  1637. fi
  1638.  
  1639. if test $ac_cv_header_stdc = yes; then
  1640.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1641. if test "$cross_compiling" = yes; then
  1642.   :
  1643. else
  1644.   cat > conftest.$ac_ext <<EOF
  1645. #line 1646 "configure"
  1646. #include "confdefs.h"
  1647. #include <ctype.h>
  1648. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1649. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1650. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1651. int main () { int i; for (i = 0; i < 256; i++)
  1652. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1653. exit (0); }
  1654.  
  1655. EOF
  1656. if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1657. then
  1658.   :
  1659. else
  1660.   echo "configure: failed program was:" >&5
  1661.   cat conftest.$ac_ext >&5
  1662.   rm -fr conftest*
  1663.   ac_cv_header_stdc=no
  1664. fi
  1665. rm -fr conftest*
  1666. fi
  1667.  
  1668. fi
  1669. fi
  1670.  
  1671. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1672. if test $ac_cv_header_stdc = yes; then
  1673.   cat >> confdefs.h <<\EOF
  1674. #define STDC_HEADERS 1
  1675. EOF
  1676.  
  1677. fi
  1678.  
  1679. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1680. echo "configure:1681: checking whether time.h and sys/time.h may both be included" >&5
  1681. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1682.   echo $ac_n "(cached) $ac_c" 1>&6
  1683. else
  1684.   cat > conftest.$ac_ext <<EOF
  1685. #line 1686 "configure"
  1686. #include "confdefs.h"
  1687. #include <sys/types.h>
  1688. #include <sys/time.h>
  1689. #include <time.h>
  1690. int main() {
  1691. struct tm *tp;
  1692. ; return 0; }
  1693. EOF
  1694. if { (eval echo configure:1695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1695.   rm -rf conftest*
  1696.   ac_cv_header_time=yes
  1697. else
  1698.   echo "configure: failed program was:" >&5
  1699.   cat conftest.$ac_ext >&5
  1700.   rm -rf conftest*
  1701.   ac_cv_header_time=no
  1702. fi
  1703. rm -f conftest*
  1704. fi
  1705.  
  1706. echo "$ac_t""$ac_cv_header_time" 1>&6
  1707. if test $ac_cv_header_time = yes; then
  1708.   cat >> confdefs.h <<\EOF
  1709. #define TIME_WITH_SYS_TIME 1
  1710. EOF
  1711.  
  1712. fi
  1713.  
  1714. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  1715. echo "configure:1716: checking whether stat file-mode macros are broken" >&5
  1716. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1717.   echo $ac_n "(cached) $ac_c" 1>&6
  1718. else
  1719.   cat > conftest.$ac_ext <<EOF
  1720. #line 1721 "configure"
  1721. #include "confdefs.h"
  1722. #include <sys/types.h>
  1723. #include <sys/stat.h>
  1724.  
  1725. #if defined(S_ISBLK) && defined(S_IFDIR)
  1726. # if S_ISBLK (S_IFDIR)
  1727. You lose.
  1728. # endif
  1729. #endif
  1730.  
  1731. #if defined(S_ISBLK) && defined(S_IFCHR)
  1732. # if S_ISBLK (S_IFCHR)
  1733. You lose.
  1734. # endif
  1735. #endif
  1736.  
  1737. #if defined(S_ISLNK) && defined(S_IFREG)
  1738. # if S_ISLNK (S_IFREG)
  1739. You lose.
  1740. # endif
  1741. #endif
  1742.  
  1743. #if defined(S_ISSOCK) && defined(S_IFREG)
  1744. # if S_ISSOCK (S_IFREG)
  1745. You lose.
  1746. # endif
  1747. #endif
  1748.  
  1749. EOF
  1750. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1751.   egrep "You lose" >/dev/null 2>&1; then
  1752.   rm -rf conftest*
  1753.   ac_cv_header_stat_broken=yes
  1754. else
  1755.   rm -rf conftest*
  1756.   ac_cv_header_stat_broken=no
  1757. fi
  1758. rm -f conftest*
  1759.  
  1760. fi
  1761.  
  1762. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  1763. if test $ac_cv_header_stat_broken = yes; then
  1764.   cat >> confdefs.h <<\EOF
  1765. #define STAT_MACROS_BROKEN 1
  1766. EOF
  1767.  
  1768. fi
  1769.  
  1770. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  1771. echo "configure:1772: checking for sys/wait.h that is POSIX.1 compatible" >&5
  1772. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1773.   echo $ac_n "(cached) $ac_c" 1>&6
  1774. else
  1775.   cat > conftest.$ac_ext <<EOF
  1776. #line 1777 "configure"
  1777. #include "confdefs.h"
  1778. #include <sys/types.h>
  1779. #include <sys/wait.h>
  1780. #ifndef WEXITSTATUS
  1781. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1782. #endif
  1783. #ifndef WIFEXITED
  1784. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1785. #endif
  1786. int main() {
  1787. int s;
  1788. wait (&s);
  1789. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1790. ; return 0; }
  1791. EOF
  1792. if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1793.   rm -rf conftest*
  1794.   ac_cv_header_sys_wait_h=yes
  1795. else
  1796.   echo "configure: failed program was:" >&5
  1797.   cat conftest.$ac_ext >&5
  1798.   rm -rf conftest*
  1799.   ac_cv_header_sys_wait_h=no
  1800. fi
  1801. rm -f conftest*
  1802. fi
  1803.  
  1804. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  1805. if test $ac_cv_header_sys_wait_h = yes; then
  1806.   cat >> confdefs.h <<\EOF
  1807. #define HAVE_SYS_WAIT_H 1
  1808. EOF
  1809.  
  1810. fi
  1811.  
  1812. for ac_hdr in sys/time.h sys/times.h sys/select.h termcap.h termio.h \
  1813.          termios.h sys/param.h sys/filio.h string.h memory.h \
  1814.          limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
  1815.          locale.h errno.h stdlib.h unistd.h
  1816. do
  1817. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1818. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1819. echo "configure:1820: checking for $ac_hdr" >&5
  1820. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1821.   echo $ac_n "(cached) $ac_c" 1>&6
  1822. else
  1823.   cat > conftest.$ac_ext <<EOF
  1824. #line 1825 "configure"
  1825. #include "confdefs.h"
  1826. #include <$ac_hdr>
  1827. EOF
  1828. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1829. { (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1830. ac_err=`grep -v '^ *+' conftest.out`
  1831. if test -z "$ac_err"; then
  1832.   rm -rf conftest*
  1833.   eval "ac_cv_header_$ac_safe=yes"
  1834. else
  1835.   echo "$ac_err" >&5
  1836.   echo "configure: failed program was:" >&5
  1837.   cat conftest.$ac_ext >&5
  1838.   rm -rf conftest*
  1839.   eval "ac_cv_header_$ac_safe=no"
  1840. fi
  1841. rm -f conftest*
  1842. fi
  1843. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1844.   echo "$ac_t""yes" 1>&6
  1845.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1846.   cat >> confdefs.h <<EOF
  1847. #define $ac_tr_hdr 1
  1848. EOF
  1849.  
  1850. else
  1851.   echo "$ac_t""no" 1>&6
  1852. fi
  1853. done
  1854.  
  1855.  
  1856. if test $ac_cv_header_sys_time_h = yes -a $ac_cv_header_sys_select_h = yes; then
  1857.   echo $ac_n "checking for conflicts in sys/time.h and sys/select.h""... $ac_c" 1>&6
  1858. echo "configure:1859: checking for conflicts in sys/time.h and sys/select.h" >&5
  1859. if eval "test \"`echo '$''{'zsh_cv_header_time_h_select_h_conflicts'+set}'`\" = set"; then
  1860.   echo $ac_n "(cached) $ac_c" 1>&6
  1861. else
  1862.   cat > conftest.$ac_ext <<EOF
  1863. #line 1864 "configure"
  1864. #include "confdefs.h"
  1865. #include <sys/time.h>
  1866. #include <sys/select.h>
  1867. int main() {
  1868. int i;
  1869. ; return 0; }
  1870. EOF
  1871. if { (eval echo configure:1872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1872.   rm -rf conftest*
  1873.   zsh_cv_header_time_h_select_h_conflicts=no
  1874. else
  1875.   echo "configure: failed program was:" >&5
  1876.   cat conftest.$ac_ext >&5
  1877.   rm -rf conftest*
  1878.   zsh_cv_header_time_h_select_h_conflicts=yes
  1879. fi
  1880. rm -f conftest*
  1881. fi
  1882.  
  1883. echo "$ac_t""$zsh_cv_header_time_h_select_h_conflicts" 1>&6
  1884.   if test $zsh_cv_header_time_h_select_h_conflicts = yes; then
  1885.     cat >> confdefs.h <<\EOF
  1886. #define TIME_H_SELECT_H_CONFLICTS 1
  1887. EOF
  1888.  
  1889.   fi
  1890. fi
  1891.  
  1892. echo $ac_n "checking ut_host in struct utmp""... $ac_c" 1>&6
  1893. echo "configure:1894: checking ut_host in struct utmp" >&5
  1894. if eval "test \"`echo '$''{'zsh_cv_struct_utmp_ut_host'+set}'`\" = set"; then
  1895.   echo $ac_n "(cached) $ac_c" 1>&6
  1896. else
  1897.   cat > conftest.$ac_ext <<EOF
  1898. #line 1899 "configure"
  1899. #include "confdefs.h"
  1900. #include <sys/types.h>
  1901. #include <utmp.h>
  1902. int main() {
  1903. struct utmp ut; ut.ut_host;
  1904. ; return 0; }
  1905. EOF
  1906. if { (eval echo configure:1907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1907.   rm -rf conftest*
  1908.   zsh_cv_struct_utmp_ut_host=yes
  1909. else
  1910.   echo "configure: failed program was:" >&5
  1911.   cat conftest.$ac_ext >&5
  1912.   rm -rf conftest*
  1913.   zsh_cv_struct_utmp_ut_host=no
  1914. fi
  1915. rm -f conftest*
  1916. fi
  1917.  
  1918. echo "$ac_t""$zsh_cv_struct_utmp_ut_host" 1>&6
  1919. if test $zsh_cv_struct_utmp_ut_host = yes; then
  1920.   have_ut_host=1
  1921.   cat >> confdefs.h <<\EOF
  1922. #define HAVE_UT_HOST 1
  1923. EOF
  1924.  
  1925. fi
  1926.  
  1927. if test -z "$have_ut_host"; then
  1928.   echo $ac_n "checking ut_host in struct utmpx""... $ac_c" 1>&6
  1929. echo "configure:1930: checking ut_host in struct utmpx" >&5
  1930. if eval "test \"`echo '$''{'zsh_cv_struct_utmpx_ut_host'+set}'`\" = set"; then
  1931.   echo $ac_n "(cached) $ac_c" 1>&6
  1932. else
  1933.   cat > conftest.$ac_ext <<EOF
  1934. #line 1935 "configure"
  1935. #include "confdefs.h"
  1936. #include <sys/types.h>
  1937. #include <utmpx.h>
  1938. int main() {
  1939. struct utmpx ut; ut.ut_host;
  1940. ; return 0; }
  1941. EOF
  1942. if { (eval echo configure:1943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1943.   rm -rf conftest*
  1944.   zsh_cv_struct_utmpx_ut_host=yes
  1945. else
  1946.   echo "configure: failed program was:" >&5
  1947.   cat conftest.$ac_ext >&5
  1948.   rm -rf conftest*
  1949.   zsh_cv_struct_utmpx_ut_host=no
  1950. fi
  1951. rm -f conftest*
  1952. fi
  1953.  
  1954. echo "$ac_t""$zsh_cv_struct_utmpx_ut_host" 1>&6
  1955.   if test $zsh_cv_struct_utmpx_ut_host = yes; then
  1956.     cat >> confdefs.h <<\EOF
  1957. #define HAVE_UTMPX_H 1
  1958. EOF
  1959.  
  1960.     cat >> confdefs.h <<\EOF
  1961. #define HAVE_UT_HOST 1
  1962. EOF
  1963.  
  1964.   fi
  1965. fi
  1966.  
  1967. echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
  1968. echo "configure:1969: checking POSIX termios" >&5
  1969. if eval "test \"`echo '$''{'zsh_cv_sys_posix_termios'+set}'`\" = set"; then
  1970.   echo $ac_n "(cached) $ac_c" 1>&6
  1971. else
  1972.   cat > conftest.$ac_ext <<EOF
  1973. #line 1974 "configure"
  1974. #include "confdefs.h"
  1975. #include <sys/types.h>
  1976. #include <unistd.h>
  1977. #include <termios.h>
  1978. int main() {
  1979. /* SunOS 4.0.3 has termios.h but not the library calls.  */
  1980. tcgetattr(0, 0);
  1981. ; return 0; }
  1982. EOF
  1983. if { (eval echo configure:1984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1984.   rm -rf conftest*
  1985.   zsh_cv_sys_posix_termios=yes
  1986. else
  1987.   echo "configure: failed program was:" >&5
  1988.   cat conftest.$ac_ext >&5
  1989.   rm -rf conftest*
  1990.   zsh_cv_sys_posix_termios=no
  1991. fi
  1992. rm -f conftest*
  1993. fi
  1994.  
  1995. echo "$ac_t""$zsh_cv_sys_posix_termios" 1>&6
  1996.  
  1997. if test $zsh_cv_sys_posix_termios = yes; then
  1998.   echo $ac_n "checking TIOCGWINSZ in termios.h""... $ac_c" 1>&6
  1999. echo "configure:2000: checking TIOCGWINSZ in termios.h" >&5
  2000. if eval "test \"`echo '$''{'zsh_cv_header_termios_h_tiocgwinsz'+set}'`\" = set"; then
  2001.   echo $ac_n "(cached) $ac_c" 1>&6
  2002. else
  2003.   cat > conftest.$ac_ext <<EOF
  2004. #line 2005 "configure"
  2005. #include "confdefs.h"
  2006. #include <sys/types.h>
  2007. #include <termios.h>
  2008. int main() {
  2009. int x = TIOCGWINSZ;
  2010. ; return 0; }
  2011. EOF
  2012. if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2013.   rm -rf conftest*
  2014.   zsh_cv_header_termios_h_tiocgwinsz=yes
  2015. else
  2016.   echo "configure: failed program was:" >&5
  2017.   cat conftest.$ac_ext >&5
  2018.   rm -rf conftest*
  2019.   zsh_cv_header_termios_h_tiocgwinsz=no
  2020. fi
  2021. rm -f conftest*
  2022. fi
  2023.  
  2024. echo "$ac_t""$zsh_cv_header_termios_h_tiocgwinsz" 1>&6
  2025. else
  2026.   zsh_cv_header_termios_h_tiocgwinsz=no
  2027. fi
  2028.  
  2029. if test $zsh_cv_header_termios_h_tiocgwinsz = no; then
  2030.   echo $ac_n "checking TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
  2031. echo "configure:2032: checking TIOCGWINSZ in sys/ioctl.h" >&5
  2032. if eval "test \"`echo '$''{'zsh_cv_header_sys_ioctl_h_tiocgwinsz'+set}'`\" = set"; then
  2033.   echo $ac_n "(cached) $ac_c" 1>&6
  2034. else
  2035.   cat > conftest.$ac_ext <<EOF
  2036. #line 2037 "configure"
  2037. #include "confdefs.h"
  2038. #include <sys/types.h>
  2039. #include <sys/ioctl.h>
  2040. int main() {
  2041. int x = TIOCGWINSZ;
  2042. ; return 0; }
  2043. EOF
  2044. if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2045.   rm -rf conftest*
  2046.   zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes
  2047. else
  2048.   echo "configure: failed program was:" >&5
  2049.   cat conftest.$ac_ext >&5
  2050.   rm -rf conftest*
  2051.   zsh_cv_header_sys_ioctl_h_tiocgwinsz=no
  2052. fi
  2053. rm -f conftest*
  2054. fi
  2055.  
  2056. echo "$ac_t""$zsh_cv_header_sys_ioctl_h_tiocgwinsz" 1>&6
  2057.   if test $zsh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
  2058.     cat >> confdefs.h <<\EOF
  2059. #define GWINSZ_IN_SYS_IOCTL 1
  2060. EOF
  2061.  
  2062.   fi
  2063. fi
  2064.  
  2065. ac_safe=`echo "sys/ptem.h" | sed 'y%./+-%__p_%'`
  2066. echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
  2067. echo "configure:2068: checking for sys/ptem.h" >&5
  2068. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2069.   echo $ac_n "(cached) $ac_c" 1>&6
  2070. else
  2071.   cat > conftest.$ac_ext <<EOF
  2072. #line 2073 "configure"
  2073. #include "confdefs.h"
  2074. #include <sys/ptem.h>
  2075. EOF
  2076. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2077. { (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2078. ac_err=`grep -v '^ *+' conftest.out`
  2079. if test -z "$ac_err"; then
  2080.   rm -rf conftest*
  2081.   eval "ac_cv_header_$ac_safe=yes"
  2082. else
  2083.   echo "$ac_err" >&5
  2084.   echo "configure: failed program was:" >&5
  2085.   cat conftest.$ac_ext >&5
  2086.   rm -rf conftest*
  2087.   eval "ac_cv_header_$ac_safe=no"
  2088. fi
  2089. rm -f conftest*
  2090. fi
  2091. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2092.   echo "$ac_t""yes" 1>&6
  2093.   cat >> confdefs.h <<\EOF
  2094. #define WINSIZE_IN_PTEM 1
  2095. EOF
  2096.  
  2097. else
  2098.   echo "$ac_t""no" 1>&6
  2099. fi
  2100.  
  2101.  
  2102. case $host_os in
  2103.   aix* | hpux10* ) termcap_curses_order="curses ncurses termcap";;
  2104.   *)               termcap_curses_order="termcap curses ncurses";;
  2105. esac
  2106.  
  2107. for lib in $termcap_curses_order; do
  2108.   echo $ac_n "checking for tgetent in -l${lib}""... $ac_c" 1>&6
  2109. echo "configure:2110: checking for tgetent in -l${lib}" >&5
  2110. ac_lib_var=`echo ${lib}'_'tgetent | sed 'y%./+-%__p_%'`
  2111. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2112.   echo $ac_n "(cached) $ac_c" 1>&6
  2113. else
  2114.   ac_save_LIBS="$LIBS"
  2115. LIBS="-l${lib}  $LIBS"
  2116. cat > conftest.$ac_ext <<EOF
  2117. #line 2118 "configure"
  2118. #include "confdefs.h"
  2119. /* Override any gcc2 internal prototype to avoid an error.  */
  2120. /* We use char because int might match the return type of a gcc2
  2121.     builtin and then its argument prototype would still apply.  */
  2122. char tgetent();
  2123.  
  2124. int main() {
  2125. tgetent()
  2126. ; return 0; }
  2127. EOF
  2128. if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2129.   rm -rf conftest*
  2130.   eval "ac_cv_lib_$ac_lib_var=yes"
  2131. else
  2132.   echo "configure: failed program was:" >&5
  2133.   cat conftest.$ac_ext >&5
  2134.   rm -rf conftest*
  2135.   eval "ac_cv_lib_$ac_lib_var=no"
  2136. fi
  2137. rm -f conftest*
  2138. LIBS="$ac_save_LIBS"
  2139.  
  2140. fi
  2141. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2142.   echo "$ac_t""yes" 1>&6
  2143.   LIBS="$LIBS -l$lib"; break
  2144. else
  2145.   echo "$ac_t""no" 1>&6
  2146. fi
  2147.  
  2148. done
  2149.  
  2150. for ac_func in getdomainname
  2151. do
  2152. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2153. echo "configure:2154: checking for $ac_func" >&5
  2154. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2155.   echo $ac_n "(cached) $ac_c" 1>&6
  2156. else
  2157.   cat > conftest.$ac_ext <<EOF
  2158. #line 2159 "configure"
  2159. #include "confdefs.h"
  2160. /* System header to define __stub macros and hopefully few prototypes,
  2161.     which can conflict with char $ac_func(); below.  */
  2162. #include <assert.h>
  2163. /* Override any gcc2 internal prototype to avoid an error.  */
  2164. /* We use char because int might match the return type of a gcc2
  2165.     builtin and then its argument prototype would still apply.  */
  2166. char $ac_func();
  2167.  
  2168. int main() {
  2169.  
  2170. /* The GNU C library defines this for functions which it implements
  2171.     to always fail with ENOSYS.  Some functions are actually named
  2172.     something starting with __ and the normal name is an alias.  */
  2173. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2174. choke me
  2175. #else
  2176. $ac_func();
  2177. #endif
  2178.  
  2179. ; return 0; }
  2180. EOF
  2181. if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2182.   rm -rf conftest*
  2183.   eval "ac_cv_func_$ac_func=yes"
  2184. else
  2185.   echo "configure: failed program was:" >&5
  2186.   cat conftest.$ac_ext >&5
  2187.   rm -rf conftest*
  2188.   eval "ac_cv_func_$ac_func=no"
  2189. fi
  2190. rm -f conftest*
  2191. fi
  2192.  
  2193. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2194.   echo "$ac_t""yes" 1>&6
  2195.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2196.   cat >> confdefs.h <<EOF
  2197. #define $ac_tr_func 1
  2198. EOF
  2199.  
  2200. else
  2201.   echo "$ac_t""no" 1>&6
  2202. fi
  2203. done
  2204.  
  2205. if test $ac_cv_func_getdomainname = no; then
  2206.   echo $ac_n "checking for getdomainname in -lnsl""... $ac_c" 1>&6
  2207. echo "configure:2208: checking for getdomainname in -lnsl" >&5
  2208. ac_lib_var=`echo nsl'_'getdomainname | sed 'y%./+-%__p_%'`
  2209. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2210.   echo $ac_n "(cached) $ac_c" 1>&6
  2211. else
  2212.   ac_save_LIBS="$LIBS"
  2213. LIBS="-lnsl  $LIBS"
  2214. cat > conftest.$ac_ext <<EOF
  2215. #line 2216 "configure"
  2216. #include "confdefs.h"
  2217. /* Override any gcc2 internal prototype to avoid an error.  */
  2218. /* We use char because int might match the return type of a gcc2
  2219.     builtin and then its argument prototype would still apply.  */
  2220. char getdomainname();
  2221.  
  2222. int main() {
  2223. getdomainname()
  2224. ; return 0; }
  2225. EOF
  2226. if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2227.   rm -rf conftest*
  2228.   eval "ac_cv_lib_$ac_lib_var=yes"
  2229. else
  2230.   echo "configure: failed program was:" >&5
  2231.   cat conftest.$ac_ext >&5
  2232.   rm -rf conftest*
  2233.   eval "ac_cv_lib_$ac_lib_var=no"
  2234. fi
  2235. rm -f conftest*
  2236. LIBS="$ac_save_LIBS"
  2237.  
  2238. fi
  2239. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2240.   echo "$ac_t""yes" 1>&6
  2241.     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2242.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2243.   cat >> confdefs.h <<EOF
  2244. #define $ac_tr_lib 1
  2245. EOF
  2246.  
  2247.   LIBS="-lnsl $LIBS"
  2248.  
  2249. else
  2250.   echo "$ac_t""no" 1>&6
  2251. fi
  2252.  
  2253. fi
  2254.  
  2255. if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
  2256.   LIBS="-lcraylm -lkrb -lnisdb -lnsl -lrpcsvc $LIBS"
  2257. fi
  2258.  
  2259. echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6
  2260. echo "configure:2261: checking if an include file defines ospeed" >&5
  2261. if eval "test \"`echo '$''{'zsh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then
  2262.   echo $ac_n "(cached) $ac_c" 1>&6
  2263. else
  2264.   cat > conftest.$ac_ext <<EOF
  2265. #line 2266 "configure"
  2266. #include "confdefs.h"
  2267. #include <sys/types.h>
  2268. #if HAVE_TERMIOS_H
  2269. #include <termios.h>
  2270. #endif
  2271. #if HAVE_TERMCAP_H
  2272. #include <termcap.h>
  2273. #endif
  2274. int main() {
  2275. ospeed = 0;
  2276. ; return 0; }
  2277. EOF
  2278. if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2279.   rm -rf conftest*
  2280.   zsh_cv_decl_ospeed_include_defines=yes
  2281. else
  2282.   echo "configure: failed program was:" >&5
  2283.   cat conftest.$ac_ext >&5
  2284.   rm -rf conftest*
  2285.   zsh_cv_decl_ospeed_include_defines=no
  2286. fi
  2287. rm -f conftest*
  2288. fi
  2289.  
  2290. echo "$ac_t""$zsh_cv_decl_ospeed_include_defines" 1>&6
  2291.  
  2292. if test $zsh_cv_decl_ospeed_include_defines = no; then
  2293.   echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6
  2294. echo "configure:2295: checking if you must define ospeed" >&5
  2295. if eval "test \"`echo '$''{'zsh_cv_decl_ospeed_must_define'+set}'`\" = set"; then
  2296.   echo $ac_n "(cached) $ac_c" 1>&6
  2297. else
  2298.   cat > conftest.$ac_ext <<EOF
  2299. #line 2300 "configure"
  2300. #include "confdefs.h"
  2301.  
  2302. int main() {
  2303. extern short ospeed; ospeed = 0;
  2304. ; return 0; }
  2305. EOF
  2306. if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2307.   rm -rf conftest*
  2308.   zsh_cv_decl_ospeed_must_define=yes
  2309. else
  2310.   echo "configure: failed program was:" >&5
  2311.   cat conftest.$ac_ext >&5
  2312.   rm -rf conftest*
  2313.   zsh_cv_decl_ospeed_must_define=no
  2314. fi
  2315. rm -f conftest*
  2316. fi
  2317.  
  2318. echo "$ac_t""$zsh_cv_decl_ospeed_must_define" 1>&6
  2319. fi
  2320.  
  2321. if test $zsh_cv_decl_ospeed_include_defines = yes; then
  2322.   cat >> confdefs.h <<\EOF
  2323. #define HAVE_OSPEED 1
  2324. EOF
  2325.  
  2326. elif test $zsh_cv_decl_ospeed_must_define = yes; then
  2327.   cat >> confdefs.h <<\EOF
  2328. #define HAVE_OSPEED 1
  2329. EOF
  2330.  
  2331.   cat >> confdefs.h <<\EOF
  2332. #define MUST_DEFINE_OSPEED 1
  2333. EOF
  2334.  
  2335. fi
  2336.  
  2337. echo $ac_n "checking if tgetent accepts NULL""... $ac_c" 1>&6
  2338. echo "configure:2339: checking if tgetent accepts NULL" >&5
  2339. if eval "test \"`echo '$''{'zsh_cv_func_tgetent_accepts_null'+set}'`\" = set"; then
  2340.   echo $ac_n "(cached) $ac_c" 1>&6
  2341. else
  2342.   if test "$cross_compiling" = yes; then
  2343.   zsh_cv_func_tgetent_accepts_null=no
  2344. else
  2345.   cat > conftest.$ac_ext <<EOF
  2346. #line 2347 "configure"
  2347. #include "confdefs.h"
  2348. main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}
  2349. EOF
  2350. if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2351. then
  2352.   zsh_cv_func_tgetent_accepts_null=yes
  2353. else
  2354.   echo "configure: failed program was:" >&5
  2355.   cat conftest.$ac_ext >&5
  2356.   rm -fr conftest*
  2357.   zsh_cv_func_tgetent_accepts_null=no
  2358. fi
  2359. rm -fr conftest*
  2360. fi
  2361.  
  2362. fi
  2363.  
  2364. echo "$ac_t""$zsh_cv_func_tgetent_accepts_null" 1>&6
  2365. if test $zsh_cv_func_tgetent_accepts_null = yes; then
  2366.   cat >> confdefs.h <<\EOF
  2367. #define TGETENT_ACCEPTS_NULL 1
  2368. EOF
  2369.  
  2370. fi
  2371.  
  2372. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2373. echo "configure:2374: checking return type of signal handlers" >&5
  2374. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2375.   echo $ac_n "(cached) $ac_c" 1>&6
  2376. else
  2377.   cat > conftest.$ac_ext <<EOF
  2378. #line 2379 "configure"
  2379. #include "confdefs.h"
  2380. #include <sys/types.h>
  2381. #include <signal.h>
  2382. #ifdef signal
  2383. #undef signal
  2384. #endif
  2385. #ifdef __cplusplus
  2386. extern "C" void (*signal (int, void (*)(int)))(int);
  2387. #else
  2388. void (*signal ()) ();
  2389. #endif
  2390.  
  2391. int main() {
  2392. int i;
  2393. ; return 0; }
  2394. EOF
  2395. if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2396.   rm -rf conftest*
  2397.   ac_cv_type_signal=void
  2398. else
  2399.   echo "configure: failed program was:" >&5
  2400.   cat conftest.$ac_ext >&5
  2401.   rm -rf conftest*
  2402.   ac_cv_type_signal=int
  2403. fi
  2404. rm -f conftest*
  2405. fi
  2406.  
  2407. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2408. cat >> confdefs.h <<EOF
  2409. #define RETSIGTYPE $ac_cv_type_signal
  2410. EOF
  2411.  
  2412.  
  2413. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2414. echo "configure:2415: checking for pid_t" >&5
  2415. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2416.   echo $ac_n "(cached) $ac_c" 1>&6
  2417. else
  2418.   cat > conftest.$ac_ext <<EOF
  2419. #line 2420 "configure"
  2420. #include "confdefs.h"
  2421. #include <sys/types.h>
  2422. #if STDC_HEADERS
  2423. #include <stdlib.h>
  2424. #include <stddef.h>
  2425. #endif
  2426. EOF
  2427. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2428.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2429.   rm -rf conftest*
  2430.   ac_cv_type_pid_t=yes
  2431. else
  2432.   rm -rf conftest*
  2433.   ac_cv_type_pid_t=no
  2434. fi
  2435. rm -f conftest*
  2436.  
  2437. fi
  2438. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2439. if test $ac_cv_type_pid_t = no; then
  2440.   cat >> confdefs.h <<\EOF
  2441. #define pid_t int
  2442. EOF
  2443.  
  2444. fi
  2445.  
  2446. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2447. echo "configure:2448: checking for off_t" >&5
  2448. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  2449.   echo $ac_n "(cached) $ac_c" 1>&6
  2450. else
  2451.   cat > conftest.$ac_ext <<EOF
  2452. #line 2453 "configure"
  2453. #include "confdefs.h"
  2454. #include <sys/types.h>
  2455. #if STDC_HEADERS
  2456. #include <stdlib.h>
  2457. #include <stddef.h>
  2458. #endif
  2459. EOF
  2460. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2461.   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2462.   rm -rf conftest*
  2463.   ac_cv_type_off_t=yes
  2464. else
  2465.   rm -rf conftest*
  2466.   ac_cv_type_off_t=no
  2467. fi
  2468. rm -f conftest*
  2469.  
  2470. fi
  2471. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2472. if test $ac_cv_type_off_t = no; then
  2473.   cat >> confdefs.h <<\EOF
  2474. #define off_t long
  2475. EOF
  2476.  
  2477. fi
  2478.  
  2479. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  2480. echo "configure:2481: checking for mode_t" >&5
  2481. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  2482.   echo $ac_n "(cached) $ac_c" 1>&6
  2483. else
  2484.   cat > conftest.$ac_ext <<EOF
  2485. #line 2486 "configure"
  2486. #include "confdefs.h"
  2487. #include <sys/types.h>
  2488. #if STDC_HEADERS
  2489. #include <stdlib.h>
  2490. #include <stddef.h>
  2491. #endif
  2492. EOF
  2493. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2494.   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2495.   rm -rf conftest*
  2496.   ac_cv_type_mode_t=yes
  2497. else
  2498.   rm -rf conftest*
  2499.   ac_cv_type_mode_t=no
  2500. fi
  2501. rm -f conftest*
  2502.  
  2503. fi
  2504. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  2505. if test $ac_cv_type_mode_t = no; then
  2506.   cat >> confdefs.h <<\EOF
  2507. #define mode_t int
  2508. EOF
  2509.  
  2510. fi
  2511.  
  2512. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2513. echo "configure:2514: checking for uid_t in sys/types.h" >&5
  2514. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  2515.   echo $ac_n "(cached) $ac_c" 1>&6
  2516. else
  2517.   cat > conftest.$ac_ext <<EOF
  2518. #line 2519 "configure"
  2519. #include "confdefs.h"
  2520. #include <sys/types.h>
  2521. EOF
  2522. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2523.   egrep "uid_t" >/dev/null 2>&1; then
  2524.   rm -rf conftest*
  2525.   ac_cv_type_uid_t=yes
  2526. else
  2527.   rm -rf conftest*
  2528.   ac_cv_type_uid_t=no
  2529. fi
  2530. rm -f conftest*
  2531.  
  2532. fi
  2533.  
  2534. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2535. if test $ac_cv_type_uid_t = no; then
  2536.   cat >> confdefs.h <<\EOF
  2537. #define uid_t int
  2538. EOF
  2539.  
  2540.   cat >> confdefs.h <<\EOF
  2541. #define gid_t int
  2542. EOF
  2543.  
  2544. fi
  2545.  
  2546. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2547. echo "configure:2548: checking for size_t" >&5
  2548. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2549.   echo $ac_n "(cached) $ac_c" 1>&6
  2550. else
  2551.   cat > conftest.$ac_ext <<EOF
  2552. #line 2553 "configure"
  2553. #include "confdefs.h"
  2554. #include <sys/types.h>
  2555. #if STDC_HEADERS
  2556. #include <stdlib.h>
  2557. #include <stddef.h>
  2558. #endif
  2559. EOF
  2560. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2561.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2562.   rm -rf conftest*
  2563.   ac_cv_type_size_t=yes
  2564. else
  2565.   rm -rf conftest*
  2566.   ac_cv_type_size_t=no
  2567. fi
  2568. rm -f conftest*
  2569.  
  2570. fi
  2571. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2572. if test $ac_cv_type_size_t = no; then
  2573.   cat >> confdefs.h <<\EOF
  2574. #define size_t unsigned
  2575. EOF
  2576.  
  2577. fi
  2578.  
  2579.  
  2580. echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
  2581. echo "configure:2582: checking for sigset_t" >&5
  2582. if eval "test \"`echo '$''{'zsh_cv_type_sigset_t'+set}'`\" = set"; then
  2583.   echo $ac_n "(cached) $ac_c" 1>&6
  2584. else
  2585.   cat > conftest.$ac_ext <<EOF
  2586. #line 2587 "configure"
  2587. #include "confdefs.h"
  2588. #include <sys/types.h>
  2589. #include <signal.h>
  2590. int main() {
  2591. sigset_t tempsigset;
  2592. ; return 0; }
  2593. EOF
  2594. if { (eval echo configure:2595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2595.   rm -rf conftest*
  2596.   zsh_cv_type_sigset_t=yes
  2597. else
  2598.   echo "configure: failed program was:" >&5
  2599.   cat conftest.$ac_ext >&5
  2600.   rm -rf conftest*
  2601.   zsh_cv_type_sigset_t=no
  2602. fi
  2603. rm -f conftest*
  2604. fi
  2605.  
  2606. echo "$ac_t""$zsh_cv_type_sigset_t" 1>&6
  2607. if test $zsh_cv_type_sigset_t = no; then
  2608.   cat >> confdefs.h <<\EOF
  2609. #define sigset_t unsigned int
  2610. EOF
  2611.  
  2612. fi
  2613.  
  2614. echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
  2615. echo "configure:2616: checking for struct timezone" >&5
  2616. if eval "test \"`echo '$''{'zsh_cv_struct_timezone'+set}'`\" = set"; then
  2617.   echo $ac_n "(cached) $ac_c" 1>&6
  2618. else
  2619.   cat > conftest.$ac_ext <<EOF
  2620. #line 2621 "configure"
  2621. #include "confdefs.h"
  2622. #include <sys/time.h>
  2623. int main() {
  2624. struct timezone dummy_tz;
  2625. ; return 0; }
  2626. EOF
  2627. if { (eval echo configure:2628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2628.   rm -rf conftest*
  2629.   zsh_cv_struct_timezone=yes
  2630. else
  2631.   echo "configure: failed program was:" >&5
  2632.   cat conftest.$ac_ext >&5
  2633.   rm -rf conftest*
  2634.   zsh_cv_struct_timezone=no
  2635. fi
  2636. rm -f conftest*
  2637. fi
  2638.  
  2639. echo "$ac_t""$zsh_cv_struct_timezone" 1>&6
  2640. if test $zsh_cv_struct_timezone = yes; then
  2641.   cat >> confdefs.h <<\EOF
  2642. #define HAVE_STRUCT_TIMEZONE 1
  2643. EOF
  2644.  
  2645. fi
  2646.  
  2647. echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  2648. echo "configure:2649: checking whether getpgrp takes no argument" >&5
  2649. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  2650.   echo $ac_n "(cached) $ac_c" 1>&6
  2651. else
  2652.   if test "$cross_compiling" = yes; then
  2653.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  2654. else
  2655.   cat > conftest.$ac_ext <<EOF
  2656. #line 2657 "configure"
  2657. #include "confdefs.h"
  2658.  
  2659. /*
  2660.  * If this system has a BSD-style getpgrp(),
  2661.  * which takes a pid argument, exit unsuccessfully.
  2662.  *
  2663.  * Snarfed from Chet Ramey's bash pgrp.c test program
  2664.  */
  2665. #include <stdio.h>
  2666. #include <sys/types.h>
  2667.  
  2668. int     pid;
  2669. int     pg1, pg2, pg3, pg4;
  2670. int     ng, np, s, child;
  2671.  
  2672. main()
  2673. {
  2674.         pid = getpid();
  2675.         pg1 = getpgrp(0);
  2676.         pg2 = getpgrp();
  2677.         pg3 = getpgrp(pid);
  2678.         pg4 = getpgrp(1);
  2679.  
  2680.         /*
  2681.          * If all of these values are the same, it's pretty sure that
  2682.          * we're on a system that ignores getpgrp's first argument.
  2683.          */
  2684.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  2685.                 exit(0);
  2686.  
  2687.         child = fork();
  2688.         if (child < 0)
  2689.                 exit(1);
  2690.         else if (child == 0) {
  2691.                 np = getpid();
  2692.                 /*
  2693.                  * If this is Sys V, this will not work; pgrp will be
  2694.                  * set to np because setpgrp just changes a pgrp to be
  2695.                  * the same as the pid.
  2696.                  */
  2697.                 setpgrp(np, pg1);
  2698.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  2699.                 if (ng == pg1) {
  2700.                         exit(1);
  2701.                 } else {
  2702.                         exit(0);
  2703.                 }
  2704.         } else {
  2705.                 wait(&s);
  2706.                 exit(s>>8);
  2707.         }
  2708. }
  2709.  
  2710. EOF
  2711. if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2712. then
  2713.   ac_cv_func_getpgrp_void=yes
  2714. else
  2715.   echo "configure: failed program was:" >&5
  2716.   cat conftest.$ac_ext >&5
  2717.   rm -fr conftest*
  2718.   ac_cv_func_getpgrp_void=no
  2719. fi
  2720. rm -fr conftest*
  2721. fi
  2722.  
  2723.  
  2724. fi
  2725.  
  2726. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  2727. if test $ac_cv_func_getpgrp_void = yes; then
  2728.   cat >> confdefs.h <<\EOF
  2729. #define GETPGRP_VOID 1
  2730. EOF
  2731.  
  2732. fi
  2733.  
  2734. echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
  2735. echo "configure:2736: checking for working strcoll" >&5
  2736. if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
  2737.   echo $ac_n "(cached) $ac_c" 1>&6
  2738. else
  2739.   if test "$cross_compiling" = yes; then
  2740.   ac_cv_func_strcoll_works=no
  2741. else
  2742.   cat > conftest.$ac_ext <<EOF
  2743. #line 2744 "configure"
  2744. #include "confdefs.h"
  2745. #include <string.h>
  2746. main ()
  2747. {
  2748.   exit (strcoll ("abc", "def") >= 0 ||
  2749.     strcoll ("ABC", "DEF") >= 0 ||
  2750.     strcoll ("123", "456") >= 0);
  2751. }
  2752. EOF
  2753. if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2754. then
  2755.   ac_cv_func_strcoll_works=yes
  2756. else
  2757.   echo "configure: failed program was:" >&5
  2758.   cat conftest.$ac_ext >&5
  2759.   rm -fr conftest*
  2760.   ac_cv_func_strcoll_works=no
  2761. fi
  2762. rm -fr conftest*
  2763. fi
  2764.  
  2765. fi
  2766.  
  2767. echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
  2768. if test $ac_cv_func_strcoll_works = yes; then
  2769.   cat >> confdefs.h <<\EOF
  2770. #define HAVE_STRCOLL 1
  2771. EOF
  2772.  
  2773. fi
  2774.  
  2775.  
  2776.  
  2777. for ac_func in strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
  2778.               getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \
  2779.               sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \
  2780.               sigprocmask setuid seteuid setreuid setresuid strerror nis_list \
  2781.               initgroups
  2782. do
  2783. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2784. echo "configure:2785: checking for $ac_func" >&5
  2785. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2786.   echo $ac_n "(cached) $ac_c" 1>&6
  2787. else
  2788.   cat > conftest.$ac_ext <<EOF
  2789. #line 2790 "configure"
  2790. #include "confdefs.h"
  2791. /* System header to define __stub macros and hopefully few prototypes,
  2792.     which can conflict with char $ac_func(); below.  */
  2793. #include <assert.h>
  2794. /* Override any gcc2 internal prototype to avoid an error.  */
  2795. /* We use char because int might match the return type of a gcc2
  2796.     builtin and then its argument prototype would still apply.  */
  2797. char $ac_func();
  2798.  
  2799. int main() {
  2800.  
  2801. /* The GNU C library defines this for functions which it implements
  2802.     to always fail with ENOSYS.  Some functions are actually named
  2803.     something starting with __ and the normal name is an alias.  */
  2804. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2805. choke me
  2806. #else
  2807. $ac_func();
  2808. #endif
  2809.  
  2810. ; return 0; }
  2811. EOF
  2812. if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2813.   rm -rf conftest*
  2814.   eval "ac_cv_func_$ac_func=yes"
  2815. else
  2816.   echo "configure: failed program was:" >&5
  2817.   cat conftest.$ac_ext >&5
  2818.   rm -rf conftest*
  2819.   eval "ac_cv_func_$ac_func=no"
  2820. fi
  2821. rm -f conftest*
  2822. fi
  2823.  
  2824. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2825.   echo "$ac_t""yes" 1>&6
  2826.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2827.   cat >> confdefs.h <<EOF
  2828. #define $ac_tr_func 1
  2829. EOF
  2830.  
  2831. else
  2832.   echo "$ac_t""no" 1>&6
  2833. fi
  2834. done
  2835.  
  2836.  
  2837.  
  2838. echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6
  2839. echo "configure:2840: checking what style of signals to use" >&5
  2840. if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
  2841.   signals_style=POSIX_SIGNALS
  2842.   cat >> confdefs.h <<\EOF
  2843. #define POSIX_SIGNALS 1
  2844. EOF
  2845.  
  2846. elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
  2847.   signals_style=BSD_SIGNALS
  2848.   cat >> confdefs.h <<\EOF
  2849. #define BSD_SIGNALS 1
  2850. EOF
  2851.  
  2852. elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
  2853.   signals_style=SYSV_SIGNALS
  2854.   cat >> confdefs.h <<\EOF
  2855. #define SYSV_SIGNALS 1
  2856. EOF
  2857.  
  2858. else
  2859.   signals_style=NO_SIGNAL_BLOCKING
  2860.   cat >> confdefs.h <<\EOF
  2861. #define NO_SIGNAL_BLOCKING 1
  2862. EOF
  2863.  
  2864. fi
  2865. cat >> confdefs.h <<EOF
  2866. #define $signals_style 1
  2867. EOF
  2868.  
  2869. echo "$ac_t""$signals_style" 1>&6
  2870.  
  2871. echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6
  2872. echo "configure:2873: checking where signal.h is located" >&5
  2873. if eval "test \"`echo '$''{'zsh_cv_path_signal_h'+set}'`\" = set"; then
  2874.   echo $ac_n "(cached) $ac_c" 1>&6
  2875. else
  2876.   for SIGNAL_H in /usr/include/bsd/sys/signal.h                   /usr/include/asm/signum.h                       /usr/include/asm/signal.h                       /usr/include/linux/signal.h                     /usr/include/sys/signal.h                       /dev/null;                     do
  2877.   test -f $SIGNAL_H && \
  2878.   grep '#[     ]*define[     ][     ]*SIG[0-9A-Z]*[     ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
  2879.   break
  2880. done
  2881. zsh_cv_path_signal_h=$SIGNAL_H
  2882.  
  2883. fi
  2884.  
  2885. echo "$ac_t""$zsh_cv_path_signal_h" 1>&6
  2886. SIGNAL_H=$zsh_cv_path_signal_h
  2887.  
  2888. echo $ac_n "checking where the RLIMIT macros are located""... $ac_c" 1>&6
  2889. echo "configure:2890: checking where the RLIMIT macros are located" >&5
  2890. if eval "test \"`echo '$''{'zsh_cv_path_rlimit_h'+set}'`\" = set"; then
  2891.   echo $ac_n "(cached) $ac_c" 1>&6
  2892. else
  2893.   for RESOURCE_H in /usr/include/bsd/sys/resource.h                      /usr/include/asm/resource.h                            /usr/include/linux/resource.h                        /usr/include/sys/resource.h                          /usr/include/resourcebits.h                          /dev/null;
  2894. do
  2895.   test -f $RESOURCE_H && \
  2896.   grep '#[     ]*define[     ][     ]*RLIMIT_[A-Z]*[     ]*[0-9A-Z][0-9]*' $RESOURCE_H > /dev/null && \
  2897.   break
  2898. done
  2899. zsh_cv_path_rlimit_h=$RESOURCE_H
  2900. if test $RESOURCE_H = "/dev/null" -a $ac_cv_func_getrlimit = yes; then
  2901.   echo "RLIMIT MACROS NOT FOUND:  please report to developers"
  2902. fi
  2903. fi
  2904.  
  2905. echo "$ac_t""$zsh_cv_path_rlimit_h" 1>&6
  2906. RLIMITS_INC_H=$zsh_cv_path_rlimit_h
  2907. if test $zsh_cv_path_rlimit_h = /dev/null -a $ac_cv_func_getrlimit = no; then
  2908.   RLIMITS_SRC_H=
  2909. else
  2910.   RLIMITS_SRC_H=rlimits.h
  2911. fi
  2912.  
  2913. DEFAULT_RLIM_T=long
  2914. echo $ac_n "checking if rlim_t is quad_t""... $ac_c" 1>&6
  2915. echo "configure:2916: checking if rlim_t is quad_t" >&5
  2916. if eval "test \"`echo '$''{'zsh_cv_rlim_t_is_quad_t'+set}'`\" = set"; then
  2917.   echo $ac_n "(cached) $ac_c" 1>&6
  2918. else
  2919.   if test "$cross_compiling" = yes; then
  2920.   zsh_cv_rlim_t_is_quad_t=yes
  2921. else
  2922.   cat > conftest.$ac_ext <<EOF
  2923. #line 2924 "configure"
  2924. #include "confdefs.h"
  2925.  
  2926. #ifdef HAVE_SYS_TIME_H
  2927. #include <sys/time.h>
  2928. #endif
  2929. #include <sys/resource.h>
  2930. main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}
  2931. EOF
  2932. if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2933. then
  2934.   zsh_cv_rlim_t_is_quad_t=yes
  2935. else
  2936.   echo "configure: failed program was:" >&5
  2937.   cat conftest.$ac_ext >&5
  2938.   rm -fr conftest*
  2939.   zsh_cv_rlim_t_is_quad_t=no
  2940. fi
  2941. rm -fr conftest*
  2942. fi
  2943.  
  2944. fi
  2945.  
  2946. echo "$ac_t""$zsh_cv_rlim_t_is_quad_t" 1>&6
  2947. if test $zsh_cv_rlim_t_is_quad_t = yes; then
  2948.   cat >> confdefs.h <<\EOF
  2949. #define RLIM_T_IS_QUAD_T 1
  2950. EOF
  2951.  
  2952.   DEFAULT_RLIM_T=quad_t
  2953. else
  2954.   echo $ac_n "checking if the rlim_t is unsigned""... $ac_c" 1>&6
  2955. echo "configure:2956: checking if the rlim_t is unsigned" >&5
  2956. if eval "test \"`echo '$''{'zsh_cv_type_rlim_t_is_unsigned'+set}'`\" = set"; then
  2957.   echo $ac_n "(cached) $ac_c" 1>&6
  2958. else
  2959.   if test "$cross_compiling" = yes; then
  2960.   zsh_cv_type_rlim_t_is_unsigned=no
  2961. else
  2962.   cat > conftest.$ac_ext <<EOF
  2963. #line 2964 "configure"
  2964. #include "confdefs.h"
  2965.  
  2966. #ifdef HAVE_SYS_TIME_H
  2967. #include <sys/time.h>
  2968. #endif
  2969. #include <sys/resource.h>
  2970.   main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}
  2971. EOF
  2972. if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2973. then
  2974.   zsh_cv_type_rlim_t_is_unsigned=yes
  2975. else
  2976.   echo "configure: failed program was:" >&5
  2977.   cat conftest.$ac_ext >&5
  2978.   rm -fr conftest*
  2979.   zsh_cv_type_rlim_t_is_unsigned=no
  2980. fi
  2981. rm -fr conftest*
  2982. fi
  2983.  
  2984. fi
  2985.  
  2986. echo "$ac_t""$zsh_cv_type_rlim_t_is_unsigned" 1>&6
  2987.   if test $zsh_cv_type_rlim_t_is_unsigned = yes; then
  2988.     cat >> confdefs.h <<\EOF
  2989. #define RLIM_T_IS_UNSIGNED 1
  2990. EOF
  2991.  
  2992.     DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T"
  2993.   fi
  2994. fi
  2995.  
  2996. echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
  2997. echo "configure:2998: checking for rlim_t" >&5
  2998. if eval "test \"`echo '$''{'zsh_cv_type_rlim_t'+set}'`\" = set"; then
  2999.   echo $ac_n "(cached) $ac_c" 1>&6
  3000. else
  3001.   cat > conftest.$ac_ext <<EOF
  3002. #line 3003 "configure"
  3003. #include "confdefs.h"
  3004.  
  3005. #include <sys/types.h>
  3006. #ifdef HAVE_SYS_TIME_H
  3007. #include <sys/time.h>
  3008. #endif
  3009. #include <sys/resource.h>
  3010. int main() {
  3011. rlim_t l;
  3012. ; return 0; }
  3013. EOF
  3014. if { (eval echo configure:3015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3015.   rm -rf conftest*
  3016.   zsh_cv_type_rlim_t=yes
  3017. else
  3018.   echo "configure: failed program was:" >&5
  3019.   cat conftest.$ac_ext >&5
  3020.   rm -rf conftest*
  3021.   zsh_cv_type_rlim_t=no
  3022. fi
  3023. rm -f conftest*
  3024. fi
  3025.  
  3026. echo "$ac_t""$zsh_cv_type_rlim_t" 1>&6
  3027. if test $zsh_cv_type_rlim_t = no; then
  3028.   cat >> confdefs.h <<EOF
  3029. #define rlim_t $DEFAULT_RLIM_T
  3030. EOF
  3031.  
  3032. fi
  3033.  
  3034. echo $ac_n "checking for /dev/fd filesystem""... $ac_c" 1>&6
  3035. echo "configure:3036: checking for /dev/fd filesystem" >&5
  3036. if eval "test \"`echo '$''{'zsh_cv_sys_path_dev_fd'+set}'`\" = set"; then
  3037.   echo $ac_n "(cached) $ac_c" 1>&6
  3038. else
  3039.   for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
  3040.    test x`echo ok|cat $zsh_cv_sys_path_dev_fd/0 2>/dev/null` = xok && break
  3041.  done
  3042. fi
  3043.  
  3044. echo "$ac_t""$zsh_cv_sys_path_dev_fd" 1>&6
  3045. if test $zsh_cv_sys_path_dev_fd != no; then
  3046.   cat >> confdefs.h <<EOF
  3047. #define PATH_DEV_FD "$zsh_cv_sys_path_dev_fd"
  3048. EOF
  3049.  
  3050. fi
  3051.  
  3052. echo $ac_n "checking for RFS superroot directory""... $ac_c" 1>&6
  3053. echo "configure:3054: checking for RFS superroot directory" >&5
  3054. if eval "test \"`echo '$''{'zsh_cv_sys_superroot'+set}'`\" = set"; then
  3055.   echo $ac_n "(cached) $ac_c" 1>&6
  3056. else
  3057.   test -d /../.LOCALROOT && zsh_cv_sys_superroot=yes || zsh_cv_sys_superroot=no
  3058. fi
  3059.  
  3060. echo "$ac_t""$zsh_cv_sys_superroot" 1>&6
  3061. if test $zsh_cv_sys_superroot = yes; then
  3062.   cat >> confdefs.h <<\EOF
  3063. #define HAVE_SUPERROOT 1
  3064. EOF
  3065.  
  3066. fi
  3067.  
  3068. echo $ac_n "checking for NIS""... $ac_c" 1>&6
  3069. echo "configure:3070: checking for NIS" >&5
  3070. if eval "test \"`echo '$''{'zsh_cv_sys_nis'+set}'`\" = set"; then
  3071.   echo $ac_n "(cached) $ac_c" 1>&6
  3072. else
  3073.   test -f /usr/bin/ypcat && /usr/bin/ypcat passwd.byname > /dev/null 2>&1 && \
  3074. zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no
  3075. fi
  3076.  
  3077. echo "$ac_t""$zsh_cv_sys_nis" 1>&6
  3078. if test $zsh_cv_sys_nis = yes; then
  3079.   cat >> confdefs.h <<\EOF
  3080. #define HAVE_NIS 1
  3081. EOF
  3082.  
  3083. fi
  3084.  
  3085. echo $ac_n "checking for NIS+""... $ac_c" 1>&6
  3086. echo "configure:3087: checking for NIS+" >&5
  3087. if eval "test \"`echo '$''{'zsh_cv_sys_nis_plus'+set}'`\" = set"; then
  3088.   echo $ac_n "(cached) $ac_c" 1>&6
  3089. else
  3090.   test $ac_cv_func_nis_list = yes && test -f /usr/bin/nisls && \
  3091.  /usr/bin/nisls > /dev/null 2>&1 && \
  3092. zsh_cv_sys_nis_plus=yes || zsh_cv_sys_nis_plus=no
  3093. fi
  3094.  
  3095. echo "$ac_t""$zsh_cv_sys_nis_plus" 1>&6
  3096. if test $zsh_cv_sys_nis_plus = yes; then
  3097.   cat >> confdefs.h <<\EOF
  3098. #define HAVE_NIS_PLUS 1
  3099. EOF
  3100.  
  3101. fi
  3102.  
  3103. echo $ac_n "checking where utmp is located""... $ac_c" 1>&6
  3104. echo "configure:3105: checking where utmp is located" >&5
  3105. if eval "test \"`echo '$''{'zsh_cv_path_utmp'+set}'`\" = set"; then
  3106.   echo $ac_n "(cached) $ac_c" 1>&6
  3107. else
  3108.   for utmp_file in /etc/utmp                       /usr/etc/utmp                    /var/adm/utmp                    /usr/adm/utmp                    /var/run/utmp                    /dev/null;      do
  3109.   test -f $utmp_file && break
  3110. done
  3111. zsh_cv_path_utmp=$utmp_file
  3112.  
  3113. fi
  3114.  
  3115. echo "$ac_t""$zsh_cv_path_utmp" 1>&6
  3116. cat >> confdefs.h <<EOF
  3117. #define UTMP_FILE_CONFIG "$zsh_cv_path_utmp"
  3118. EOF
  3119.  
  3120.  
  3121. echo $ac_n "checking where wtmp is located""... $ac_c" 1>&6
  3122. echo "configure:3123: checking where wtmp is located" >&5
  3123. if eval "test \"`echo '$''{'zsh_cv_path_wtmp'+set}'`\" = set"; then
  3124.   echo $ac_n "(cached) $ac_c" 1>&6
  3125. else
  3126.   for wtmp_file in /etc/wtmp                      /usr/etc/wtmp                   /var/adm/wtmp                   /usr/adm/wtmp                   /var/log/wtmp                   /dev/null;     do
  3127.   test -f $wtmp_file && break
  3128. done
  3129. zsh_cv_path_wtmp=$wtmp_file
  3130.  
  3131. fi
  3132.  
  3133. echo "$ac_t""$zsh_cv_path_wtmp" 1>&6
  3134. cat >> confdefs.h <<EOF
  3135. #define WTMP_FILE_CONFIG "$zsh_cv_path_wtmp"
  3136. EOF
  3137.  
  3138.  
  3139. echo $ac_n "checking if typeahead needs FIONREAD""... $ac_c" 1>&6
  3140. echo "configure:3141: checking if typeahead needs FIONREAD" >&5
  3141. if eval "test \"`echo '$''{'zsh_cv_sys_clobbers_typeahead'+set}'`\" = set"; then
  3142.   echo $ac_n "(cached) $ac_c" 1>&6
  3143. else
  3144.   case x-$host_os in
  3145.     x-ultrix* | x-dgux*)
  3146.     zsh_cv_sys_clobbers_typeahead=yes;;
  3147.     *)
  3148.     zsh_cv_sys_clobbers_typeahead=no;;
  3149. esac
  3150. fi
  3151.  
  3152. echo "$ac_t""$zsh_cv_sys_clobbers_typeahead" 1>&6
  3153. if test $zsh_cv_sys_clobbers_typeahead = yes; then
  3154.   cat >> confdefs.h <<\EOF
  3155. #define CLOBBERS_TYPEAHEAD 1
  3156. EOF
  3157.  
  3158. fi
  3159.  
  3160. echo $ac_n "checking for brk() prototype in <unistd.h>""... $ac_c" 1>&6
  3161. echo "configure:3162: checking for brk() prototype in <unistd.h>" >&5
  3162. if eval "test \"`echo '$''{'zsh_cv_header_unistd_h_brk_proto'+set}'`\" = set"; then
  3163.   echo $ac_n "(cached) $ac_c" 1>&6
  3164. else
  3165.   cat > conftest.$ac_ext <<EOF
  3166. #line 3167 "configure"
  3167. #include "confdefs.h"
  3168. #include <unistd.h>
  3169. double brk();
  3170. int main() {
  3171. int i;
  3172. ; return 0; }
  3173. EOF
  3174. if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3175.   rm -rf conftest*
  3176.   zsh_cv_header_unistd_h_brk_proto=no
  3177. else
  3178.   echo "configure: failed program was:" >&5
  3179.   cat conftest.$ac_ext >&5
  3180.   rm -rf conftest*
  3181.   zsh_cv_header_unistd_h_brk_proto=yes
  3182. fi
  3183. rm -f conftest*
  3184. fi
  3185.  
  3186. echo "$ac_t""$zsh_cv_header_unistd_h_brk_proto" 1>&6
  3187. if test $zsh_cv_header_unistd_h_brk_proto = yes; then
  3188.   cat >> confdefs.h <<\EOF
  3189. #define HAVE_BRK_PROTO 1
  3190. EOF
  3191.  
  3192. fi
  3193.  
  3194. echo $ac_n "checking for sbrk() prototype in <unistd.h>""... $ac_c" 1>&6
  3195. echo "configure:3196: checking for sbrk() prototype in <unistd.h>" >&5
  3196. if eval "test \"`echo '$''{'zsh_cv_header_unistd_h_sbrk_proto'+set}'`\" = set"; then
  3197.   echo $ac_n "(cached) $ac_c" 1>&6
  3198. else
  3199.   cat > conftest.$ac_ext <<EOF
  3200. #line 3201 "configure"
  3201. #include "confdefs.h"
  3202. #include <unistd.h>
  3203. double sbrk();
  3204. int main() {
  3205. int i;
  3206. ; return 0; }
  3207. EOF
  3208. if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3209.   rm -rf conftest*
  3210.   zsh_cv_header_unistd_h_sbrk_proto=no
  3211. else
  3212.   echo "configure: failed program was:" >&5
  3213.   cat conftest.$ac_ext >&5
  3214.   rm -rf conftest*
  3215.   zsh_cv_header_unistd_h_sbrk_proto=yes
  3216. fi
  3217. rm -f conftest*
  3218. fi
  3219.  
  3220. echo "$ac_t""$zsh_cv_header_unistd_h_sbrk_proto" 1>&6
  3221. if test $zsh_cv_header_unistd_h_sbrk_proto = yes; then
  3222.   cat >> confdefs.h <<\EOF
  3223. #define HAVE_SBRK_PROTO 1
  3224. EOF
  3225.  
  3226. fi
  3227.  
  3228.  
  3229. if test "$ac_cv_prog_cc_stdc" != no; then
  3230.   echo $ac_n "checking for ioctl prototype in <sys/ioctl.h>""... $ac_c" 1>&6
  3231. echo "configure:3232: checking for ioctl prototype in <sys/ioctl.h>" >&5
  3232. if eval "test \"`echo '$''{'zsh_cv_header_sys_ioctl_h_ioctl_proto'+set}'`\" = set"; then
  3233.   echo $ac_n "(cached) $ac_c" 1>&6
  3234. else
  3235.   cat > conftest.$ac_ext <<EOF
  3236. #line 3237 "configure"
  3237. #include "confdefs.h"
  3238. #include <sys/ioctl.h>
  3239.    int ioctl(double x);
  3240. int main() {
  3241. int i;
  3242. ; return 0; }
  3243. EOF
  3244. if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3245.   rm -rf conftest*
  3246.   zsh_cv_header_sys_ioctl_h_ioctl_proto=no
  3247. else
  3248.   echo "configure: failed program was:" >&5
  3249.   cat conftest.$ac_ext >&5
  3250.   rm -rf conftest*
  3251.   zsh_cv_header_sys_ioctl_h_ioctl_proto=yes
  3252. fi
  3253. rm -f conftest*
  3254. fi
  3255.  
  3256. echo "$ac_t""$zsh_cv_header_sys_ioctl_h_ioctl_proto" 1>&6
  3257.   if test $zsh_cv_header_sys_ioctl_h_ioctl_proto = yes; then
  3258.     cat >> confdefs.h <<\EOF
  3259. #define HAVE_IOCTL_PROTO 1
  3260. EOF
  3261.  
  3262.   fi
  3263. fi
  3264.  
  3265. echo $ac_n "checking if named FIFOs work""... $ac_c" 1>&6
  3266. echo "configure:3267: checking if named FIFOs work" >&5
  3267. if eval "test \"`echo '$''{'zsh_cv_sys_fifo'+set}'`\" = set"; then
  3268.   echo $ac_n "(cached) $ac_c" 1>&6
  3269. else
  3270.   if test "$cross_compiling" = yes; then
  3271.   zsh_cv_sys_fifo=yes
  3272. else
  3273.   cat > conftest.$ac_ext <<EOF
  3274. #line 3275 "configure"
  3275. #include "confdefs.h"
  3276.  
  3277. #include <fcntl.h>
  3278. #include <signal.h>
  3279. main()
  3280. {
  3281.     char c;
  3282.     int fd;
  3283.     int pid, ret;
  3284.     unlink("/tmp/fifo$$");
  3285. #ifdef HAVE_MKFIFO
  3286.     if(mkfifo("/tmp/fifo$$", 0600) < 0)
  3287. #else
  3288.     if(mknod("/tmp/fifo$$", 0010600, 0) < 0)
  3289. #endif
  3290.     exit(1);
  3291.     pid = fork();
  3292.     if(pid < 0)
  3293.     exit(1);
  3294.     if(pid) {
  3295.     fd = open("/tmp/fifo$$", O_RDONLY);
  3296.     exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
  3297.     }
  3298.     fd = open("/tmp/fifo$$", O_WRONLY);
  3299.     ret = (fd < 0 || write(fd, "x", 1) < 1);
  3300.     unlink("/tmp/fifo$$");
  3301.     exit(ret);
  3302. }
  3303.  
  3304. EOF
  3305. if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3306. then
  3307.   zsh_cv_sys_fifo=yes
  3308. else
  3309.   echo "configure: failed program was:" >&5
  3310.   cat conftest.$ac_ext >&5
  3311.   rm -fr conftest*
  3312.   zsh_cv_sys_fifo=no
  3313. fi
  3314. rm -fr conftest*
  3315. fi
  3316.  
  3317. fi
  3318.  
  3319. echo "$ac_t""$zsh_cv_sys_fifo" 1>&6
  3320. if test $zsh_cv_sys_fifo = yes; then
  3321.   cat >> confdefs.h <<\EOF
  3322. #define HAVE_FIFOS 1
  3323. EOF
  3324.  
  3325. fi
  3326. echo $ac_n "checking if echo in /bin/sh interprets escape sequences""... $ac_c" 1>&6
  3327. echo "configure:3328: checking if echo in /bin/sh interprets escape sequences" >&5
  3328. if eval "test \"`echo '$''{'zsh_cv_prog_sh_echo_escape'+set}'`\" = set"; then
  3329.   echo $ac_n "(cached) $ac_c" 1>&6
  3330. else
  3331.   if test "`/bin/sh -c \"echo '\\n'\"`" = "\\n"; then
  3332.   zsh_cv_prog_sh_echo_escape=no
  3333. else
  3334.   zsh_cv_prog_sh_echo_escape=yes
  3335. fi
  3336. fi
  3337.  
  3338. echo "$ac_t""$zsh_cv_prog_sh_echo_escape" 1>&6
  3339. if test $zsh_cv_prog_sh_echo_escape = no; then
  3340.   cat >> confdefs.h <<\EOF
  3341. #define SH_USE_BSD_ECHO 1
  3342. EOF
  3343.  
  3344. fi
  3345.  
  3346. trap '' 1 2 15
  3347. cat > confcache <<\EOF
  3348. # This file is a shell script that caches the results of configure
  3349. # tests run on this system so they can be shared between configure
  3350. # scripts and configure runs.  It is not useful on other systems.
  3351. # If it contains results you don't want to keep, you may remove or edit it.
  3352. #
  3353. # By default, configure uses ./config.cache as the cache file,
  3354. # creating it if it does not exist already.  You can give configure
  3355. # the --cache-file=FILE option to use a different cache file; that is
  3356. # what configure does when it calls configure scripts in
  3357. # subdirectories, so they share the cache.
  3358. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3359. # config.status only pays attention to the cache file if you give it the
  3360. # --recheck option to rerun configure.
  3361. #
  3362. EOF
  3363. # The following way of writing the cache mishandles newlines in values,
  3364. # but we know of no workaround that is simple, portable, and efficient.
  3365. # So, don't put newlines in cache variables' values.
  3366. # Ultrix sh set writes to stderr and can't be redirected directly,
  3367. # and sets the high bit in the cache file unless we assign to the vars.
  3368. (set) 2>&1 |
  3369.   case `(ac_space=' '; set) 2>&1` in
  3370.   *ac_space=\ *)
  3371.     # `set' does not quote correctly, so add quotes (double-quote substitution
  3372.     # turns \\\\ into \\, and sed turns \\ into \).
  3373.     sed -n \
  3374.       -e "s/'/'\\\\''/g" \
  3375.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  3376.     ;;
  3377.   *)
  3378.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  3379.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  3380.     ;;
  3381.   esac >> confcache
  3382. if cmp -s $cache_file confcache; then
  3383.   :
  3384. else
  3385.   if test -w $cache_file; then
  3386.     echo "updating cache $cache_file"
  3387.     cat confcache > $cache_file
  3388.   else
  3389.     echo "not updating unwritable cache $cache_file"
  3390.   fi
  3391. fi
  3392. rm -f confcache
  3393.  
  3394. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3395.  
  3396. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3397. # Let make expand exec_prefix.
  3398. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3399.  
  3400. # Any assignment to VPATH causes Sun make to only execute
  3401. # the first set of double-colon rules, so remove it if not needed.
  3402. # If there is a colon in the path, we need to keep it.
  3403. if test "x$srcdir" = x.; then
  3404.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3405. fi
  3406.  
  3407. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3408.  
  3409. DEFS=-DHAVE_CONFIG_H
  3410.  
  3411. # Without the "./", some shells look in PATH for config.status.
  3412. : ${CONFIG_STATUS=./config.status}
  3413.  
  3414. echo creating $CONFIG_STATUS
  3415. rm -f $CONFIG_STATUS
  3416. cat > $CONFIG_STATUS <<EOF
  3417. #! /bin/sh
  3418. # Generated automatically by configure.
  3419. # Run this file to recreate the current configuration.
  3420. # This directory was configured as follows,
  3421. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3422. #
  3423. # $0 $ac_configure_args
  3424. #
  3425. # Compiler output produced by configure, useful for debugging
  3426. # configure, is in ./config.log if it exists.
  3427.  
  3428. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3429. for ac_option
  3430. do
  3431.   case "\$ac_option" in
  3432.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3433.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3434.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3435.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3436.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  3437.     exit 0 ;;
  3438.   -help | --help | --hel | --he | --h)
  3439.     echo "\$ac_cs_usage"; exit 0 ;;
  3440.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3441.   esac
  3442. done
  3443.  
  3444. ac_given_srcdir=$srcdir
  3445. ac_given_INSTALL="$INSTALL"
  3446.  
  3447. trap 'rm -fr `echo "Makefile Src/Makefile Doc/Makefile Etc/Makefile Misc/Makefile \
  3448. Util/Makefile Functions/Makefile StartupFiles/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3449. EOF
  3450. cat >> $CONFIG_STATUS <<EOF
  3451.  
  3452. # Protect against being on the right side of a sed subst in config.status.
  3453. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3454.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3455. $ac_vpsub
  3456. $extrasub
  3457. s%@CFLAGS@%$CFLAGS%g
  3458. s%@CPPFLAGS@%$CPPFLAGS%g
  3459. s%@CXXFLAGS@%$CXXFLAGS%g
  3460. s%@DEFS@%$DEFS%g
  3461. s%@LDFLAGS@%$LDFLAGS%g
  3462. s%@LIBS@%$LIBS%g
  3463. s%@exec_prefix@%$exec_prefix%g
  3464. s%@prefix@%$prefix%g
  3465. s%@program_transform_name@%$program_transform_name%g
  3466. s%@bindir@%$bindir%g
  3467. s%@sbindir@%$sbindir%g
  3468. s%@libexecdir@%$libexecdir%g
  3469. s%@datadir@%$datadir%g
  3470. s%@sysconfdir@%$sysconfdir%g
  3471. s%@sharedstatedir@%$sharedstatedir%g
  3472. s%@localstatedir@%$localstatedir%g
  3473. s%@libdir@%$libdir%g
  3474. s%@includedir@%$includedir%g
  3475. s%@oldincludedir@%$oldincludedir%g
  3476. s%@infodir@%$infodir%g
  3477. s%@mandir@%$mandir%g
  3478. s%@VERSION@%$VERSION%g
  3479. s%@host@%$host%g
  3480. s%@host_alias@%$host_alias%g
  3481. s%@host_cpu@%$host_cpu%g
  3482. s%@host_vendor@%$host_vendor%g
  3483. s%@host_os@%$host_os%g
  3484. s%@zshenv@%$zshenv%g
  3485. s%@zshrc@%$zshrc%g
  3486. s%@zprofile@%$zprofile%g
  3487. s%@zlogin@%$zlogin%g
  3488. s%@zlogout@%$zlogout%g
  3489. s%@CC@%$CC%g
  3490. s%@CPP@%$CPP%g
  3491. s%@U@%$U%g
  3492. s%@SET_MAKE@%$SET_MAKE%g
  3493. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3494. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3495. s%@AWK@%$AWK%g
  3496. s%@SIGNAL_H@%$SIGNAL_H%g
  3497. s%@RLIMITS_SRC_H@%$RLIMITS_SRC_H%g
  3498. s%@RLIMITS_INC_H@%$RLIMITS_INC_H%g
  3499.  
  3500. CEOF
  3501. EOF
  3502.  
  3503. cat >> $CONFIG_STATUS <<\EOF
  3504.  
  3505. # Split the substitutions into bite-sized pieces for seds with
  3506. # small command number limits, like on Digital OSF/1 and HP-UX.
  3507. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3508. ac_file=1 # Number of current file.
  3509. ac_beg=1 # First line for current file.
  3510. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3511. ac_more_lines=:
  3512. ac_sed_cmds=""
  3513. while $ac_more_lines; do
  3514.   if test $ac_beg -gt 1; then
  3515.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3516.   else
  3517.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3518.   fi
  3519.   if test ! -s conftest.s$ac_file; then
  3520.     ac_more_lines=false
  3521.     rm -f conftest.s$ac_file
  3522.   else
  3523.     if test -z "$ac_sed_cmds"; then
  3524.       ac_sed_cmds="sed -f conftest.s$ac_file"
  3525.     else
  3526.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3527.     fi
  3528.     ac_file=`expr $ac_file + 1`
  3529.     ac_beg=$ac_end
  3530.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3531.   fi
  3532. done
  3533. if test -z "$ac_sed_cmds"; then
  3534.   ac_sed_cmds=cat
  3535. fi
  3536. EOF
  3537.  
  3538. cat >> $CONFIG_STATUS <<EOF
  3539.  
  3540. CONFIG_FILES=\${CONFIG_FILES-"Makefile Src/Makefile Doc/Makefile Etc/Makefile Misc/Makefile \
  3541. Util/Makefile Functions/Makefile StartupFiles/Makefile"}
  3542. EOF
  3543. cat >> $CONFIG_STATUS <<\EOF
  3544. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3545.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3546.   case "$ac_file" in
  3547.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3548.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3549.   *) ac_file_in="${ac_file}.in" ;;
  3550.   esac
  3551.  
  3552.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3553.  
  3554.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3555.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3556.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3557.     # The file is in a subdirectory.
  3558.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3559.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3560.     # A "../" for each directory in $ac_dir_suffix.
  3561.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3562.   else
  3563.     ac_dir_suffix= ac_dots=
  3564.   fi
  3565.  
  3566.   case "$ac_given_srcdir" in
  3567.   .)  srcdir=.
  3568.       if test -z "$ac_dots"; then top_srcdir=.
  3569.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3570.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3571.   *) # Relative path.
  3572.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3573.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3574.   esac
  3575.  
  3576.   case "$ac_given_INSTALL" in
  3577.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3578.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3579.   esac
  3580.  
  3581.   echo creating "$ac_file"
  3582.   rm -f "$ac_file"
  3583.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3584.   case "$ac_file" in
  3585.   *Makefile*) ac_comsub="1i\\
  3586. # $configure_input" ;;
  3587.   *) ac_comsub= ;;
  3588.   esac
  3589.  
  3590.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3591.   sed -e "$ac_comsub
  3592. s%@configure_input@%$configure_input%g
  3593. s%@srcdir@%$srcdir%g
  3594. s%@top_srcdir@%$top_srcdir%g
  3595. s%@INSTALL@%$INSTALL%g
  3596. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3597. fi; done
  3598. rm -f conftest.s*
  3599.  
  3600. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3601. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3602. #
  3603. # ac_d sets the value in "#define NAME VALUE" lines.
  3604. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3605. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3606. ac_dC='\3'
  3607. ac_dD='%g'
  3608. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3609. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3610. ac_uB='\([     ]\)%\1#\2define\3'
  3611. ac_uC=' '
  3612. ac_uD='\4%g'
  3613. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3614. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3615. ac_eB='$%\1#\2define\3'
  3616. ac_eC=' '
  3617. ac_eD='%g'
  3618.  
  3619. if test "${CONFIG_HEADERS+set}" != set; then
  3620. EOF
  3621. cat >> $CONFIG_STATUS <<EOF
  3622.   CONFIG_HEADERS="config.h"
  3623. EOF
  3624. cat >> $CONFIG_STATUS <<\EOF
  3625. fi
  3626. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3627.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3628.   case "$ac_file" in
  3629.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3630.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3631.   *) ac_file_in="${ac_file}.in" ;;
  3632.   esac
  3633.  
  3634.   echo creating $ac_file
  3635.  
  3636.   rm -f conftest.frag conftest.in conftest.out
  3637.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3638.   cat $ac_file_inputs > conftest.in
  3639.  
  3640. EOF
  3641.  
  3642. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3643. # the proper values into config.h.in to produce config.h.  And first:
  3644. # Protect against being on the right side of a sed subst in config.status.
  3645. # Protect against being in an unquoted here document in config.status.
  3646. rm -f conftest.vals
  3647. cat > conftest.hdr <<\EOF
  3648. s/[\\&%]/\\&/g
  3649. s%[\\$`]%\\&%g
  3650. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3651. s%ac_d%ac_u%gp
  3652. s%ac_u%ac_e%gp
  3653. EOF
  3654. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3655. rm -f conftest.hdr
  3656.  
  3657. # This sed command replaces #undef with comments.  This is necessary, for
  3658. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3659. # on some systems where configure will not decide to define it.
  3660. cat >> conftest.vals <<\EOF
  3661. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3662. EOF
  3663.  
  3664. # Break up conftest.vals because some shells have a limit on
  3665. # the size of here documents, and old seds have small limits too.
  3666.  
  3667. rm -f conftest.tail
  3668. while :
  3669. do
  3670.   ac_lines=`grep -c . conftest.vals`
  3671.   # grep -c gives empty output for an empty file on some AIX systems.
  3672.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3673.   # Write a limited-size here document to conftest.frag.
  3674.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3675.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3676.   echo 'CEOF
  3677.   sed -f conftest.frag conftest.in > conftest.out
  3678.   rm -f conftest.in
  3679.   mv conftest.out conftest.in
  3680. ' >> $CONFIG_STATUS
  3681.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3682.   rm -f conftest.vals
  3683.   mv conftest.tail conftest.vals
  3684. done
  3685. rm -f conftest.vals
  3686.  
  3687. cat >> $CONFIG_STATUS <<\EOF
  3688.   rm -f conftest.frag conftest.h
  3689.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3690.   cat conftest.in >> conftest.h
  3691.   rm -f conftest.in
  3692.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3693.     echo "$ac_file is unchanged"
  3694.     rm -f conftest.h
  3695.   else
  3696.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3697.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3698.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3699.       # The file is in a subdirectory.
  3700.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3701.     fi
  3702.     rm -f $ac_file
  3703.     mv conftest.h $ac_file
  3704.   fi
  3705. fi; done
  3706.  
  3707. EOF
  3708. cat >> $CONFIG_STATUS <<EOF
  3709.  
  3710. EOF
  3711. cat >> $CONFIG_STATUS <<\EOF
  3712. \
  3713. test -z "$CONFIG_HEADERS" || echo > stamp-h
  3714. exit 0
  3715. EOF
  3716. chmod +x $CONFIG_STATUS
  3717. rm -fr confdefs* $ac_clean_files
  3718. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3719.  
  3720.  
  3721. eval "zshbin1=${bindir}"
  3722. eval "zshbin2=${zshbin1}"
  3723. eval "zshman=${mandir}"
  3724. eval "zshinfo=${infodir}"
  3725.  
  3726. echo "
  3727. zsh configuration
  3728. -----------------
  3729. zsh version           : ${VERSION}
  3730. host operating system : ${host_os}
  3731. source code location  : ${srcdir}
  3732. compiler              : ${CC}
  3733. compiler flags        : ${CFLAGS}
  3734. binary install path   : ${zshbin2}
  3735. man page install path : ${zshman}
  3736. info install path     : ${zshinfo}"
  3737. echo ""
  3738.  
  3739.