home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / EDITOR / NVI179B / NVI179B.ZIP / build / configure < prev    next >
Text File  |  1997-06-29  |  121KB  |  4,280 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.7 
  5. # Copyright (C) 1992, 1993, 1994 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-debug          Build a debugging version."
  16. ac_help="$ac_help
  17.   --with-x                use the X Window System"
  18. ac_help="$ac_help
  19.   --enable-perlinterp     Include a Perl interpreter in vi."
  20. ac_help="$ac_help
  21.   --enable-tknvi          Build a Tk/Tcl front-end for vi."
  22. ac_help="$ac_help
  23.   --enable-tclinterp      Include a Tk/Tcl interpreter in vi."
  24. ac_help="$ac_help
  25.   --disable-curses        DON'T use the nvi-provided curses routines."
  26. ac_help="$ac_help
  27.   --disable-db            DON'T use the nvi-provided DB routines."
  28. ac_help="$ac_help
  29.   --disable-re            DON'T use the nvi-provided RE routines."
  30.  
  31. # Initialize some variables set by options.
  32. # The variables have the same names as the options, with
  33. # dashes changed to underlines.
  34. build=NONE
  35. cache_file=./config.cache
  36. exec_prefix=NONE
  37. host=NONE
  38. no_create=
  39. nonopt=NONE
  40. no_recursion=
  41. prefix=NONE
  42. program_prefix=NONE
  43. program_suffix=NONE
  44. program_transform_name=s,x,x,
  45. silent=
  46. site=
  47. srcdir=
  48. target=NONE
  49. verbose=
  50. x_includes=NONE
  51. x_libraries=NONE
  52. bindir='${exec_prefix}/bin'
  53. sbindir='${exec_prefix}/sbin'
  54. libexecdir='${exec_prefix}/libexec'
  55. datadir='${prefix}/share'
  56. sysconfdir='${prefix}/etc'
  57. sharedstatedir='${prefix}/com'
  58. localstatedir='${prefix}/var'
  59. libdir='${exec_prefix}/lib'
  60. includedir='${prefix}/include'
  61. oldincludedir='/usr/include'
  62. infodir='${prefix}/info'
  63. mandir='${prefix}/man'
  64.  
  65. # Initialize some other variables.
  66. subdirs=
  67. MFLAGS= MAKEFLAGS=
  68.  
  69. ac_prev=
  70. for ac_option
  71. do
  72.  
  73.   # If the previous option needs an argument, assign it.
  74.   if test -n "$ac_prev"; then
  75.     eval "$ac_prev=\$ac_option"
  76.     ac_prev=
  77.     continue
  78.   fi
  79.  
  80.   case "$ac_option" in
  81.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  82.   *) ac_optarg= ;;
  83.   esac
  84.  
  85.   # Accept the important Cygnus configure options, so we can diagnose typos.
  86.  
  87.   case "$ac_option" in
  88.  
  89.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  90.     ac_prev=bindir ;;
  91.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  92.     bindir="$ac_optarg" ;;
  93.  
  94.   -build | --build | --buil | --bui | --bu)
  95.     ac_prev=build ;;
  96.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  97.     build="$ac_optarg" ;;
  98.  
  99.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  100.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  101.     ac_prev=cache_file ;;
  102.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  103.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  104.     cache_file="$ac_optarg" ;;
  105.  
  106.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  107.     ac_prev=datadir ;;
  108.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  109.   | --da=*)
  110.     datadir="$ac_optarg" ;;
  111.  
  112.   -disable-* | --disable-*)
  113.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  114.     # Reject names that are not valid shell variable names.
  115.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  116.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  117.     fi
  118.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  119.     eval "enable_${ac_feature}=no" ;;
  120.  
  121.   -enable-* | --enable-*)
  122.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  123.     # Reject names that are not valid shell variable names.
  124.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  125.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  126.     fi
  127.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  128.     case "$ac_option" in
  129.       *=*) ;;
  130.       *) ac_optarg=yes ;;
  131.     esac
  132.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  133.  
  134.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  135.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  136.   | --exec | --exe | --ex)
  137.     ac_prev=exec_prefix ;;
  138.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  139.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  140.   | --exec=* | --exe=* | --ex=*)
  141.     exec_prefix="$ac_optarg" ;;
  142.  
  143.   -gas | --gas | --ga | --g)
  144.     # Obsolete; use --with-gas.
  145.     with_gas=yes ;;
  146.  
  147.   -help | --help | --hel | --he)
  148.     # Omit some internal or obsolete options to make the list less imposing.
  149.     # This message is too long to be a string in the A/UX 3.1 sh.
  150.     cat << EOF
  151. Usage: configure [options] [host]
  152. Options: [defaults in brackets after descriptions]
  153. Configuration:
  154.   --cache-file=FILE       cache test results in FILE
  155.   --help                  print this message
  156.   --no-create             do not create output files
  157.   --quiet, --silent       do not print \`checking...' messages
  158.   --version               print the version of autoconf that created configure
  159. Directory and file names:
  160.   --prefix=PREFIX         install architecture-independent files in PREFIX
  161.                           [$ac_default_prefix]
  162.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  163.                           [same as prefix]
  164.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  165.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  166.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  167.   --datadir=DIR           read-only architecture-independent data in DIR
  168.                           [PREFIX/share]
  169.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  170.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  171.                           [PREFIX/com]
  172.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  173.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  174.   --includedir=DIR        C header files in DIR [PREFIX/include]
  175.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  176.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  177.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  178.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  179.   --program-prefix=PREFIX prepend PREFIX to installed program names
  180.   --program-suffix=SUFFIX append SUFFIX to installed program names
  181.   --program-transform-name=PROGRAM
  182.                           run sed PROGRAM on installed program names
  183. EOF
  184.     cat << EOF
  185. Host type:
  186.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  187.   --host=HOST             configure for HOST [guessed]
  188.   --target=TARGET         configure for TARGET [TARGET=HOST]
  189. Features and packages:
  190.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  191.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  192.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  193.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  194.   --x-includes=DIR        X include files are in DIR
  195.   --x-libraries=DIR       X library files are in DIR
  196. EOF
  197.     if test -n "$ac_help"; then
  198.       echo "--enable and --with options recognized:$ac_help"
  199.     fi
  200.     exit 0 ;;
  201.  
  202.   -host | --host | --hos | --ho)
  203.     ac_prev=host ;;
  204.   -host=* | --host=* | --hos=* | --ho=*)
  205.     host="$ac_optarg" ;;
  206.  
  207.   -includedir | --includedir | --includedi | --included | --include \
  208.   | --includ | --inclu | --incl | --inc)
  209.     ac_prev=includedir ;;
  210.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  211.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  212.     includedir="$ac_optarg" ;;
  213.  
  214.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  215.     ac_prev=infodir ;;
  216.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  217.     infodir="$ac_optarg" ;;
  218.  
  219.   -libdir | --libdir | --libdi | --libd)
  220.     ac_prev=libdir ;;
  221.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  222.     libdir="$ac_optarg" ;;
  223.  
  224.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  225.   | --libexe | --libex | --libe)
  226.     ac_prev=libexecdir ;;
  227.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  228.   | --libexe=* | --libex=* | --libe=*)
  229.     libexecdir="$ac_optarg" ;;
  230.  
  231.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  232.   | --localstate | --localstat | --localsta | --localst \
  233.   | --locals | --local | --loca | --loc | --lo)
  234.     ac_prev=localstatedir ;;
  235.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  236.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  237.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  238.     localstatedir="$ac_optarg" ;;
  239.  
  240.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  241.     ac_prev=mandir ;;
  242.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  243.     mandir="$ac_optarg" ;;
  244.  
  245.   -nfp | --nfp | --nf)
  246.     # Obsolete; use --without-fp.
  247.     with_fp=no ;;
  248.  
  249.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  250.   | --no-cr | --no-c)
  251.     no_create=yes ;;
  252.  
  253.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  254.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  255.     no_recursion=yes ;;
  256.  
  257.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  258.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  259.   | --oldin | --oldi | --old | --ol | --o)
  260.     ac_prev=oldincludedir ;;
  261.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  262.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  263.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  264.     oldincludedir="$ac_optarg" ;;
  265.  
  266.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  267.     ac_prev=prefix ;;
  268.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  269.     prefix="$ac_optarg" ;;
  270.  
  271.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  272.   | --program-pre | --program-pr | --program-p)
  273.     ac_prev=program_prefix ;;
  274.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  275.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  276.     program_prefix="$ac_optarg" ;;
  277.  
  278.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  279.   | --program-suf | --program-su | --program-s)
  280.     ac_prev=program_suffix ;;
  281.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  282.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  283.     program_suffix="$ac_optarg" ;;
  284.  
  285.   -program-transform-name | --program-transform-name \
  286.   | --program-transform-nam | --program-transform-na \
  287.   | --program-transform-n | --program-transform- \
  288.   | --program-transform | --program-transfor \
  289.   | --program-transfo | --program-transf \
  290.   | --program-trans | --program-tran \
  291.   | --progr-tra | --program-tr | --program-t)
  292.     ac_prev=program_transform_name ;;
  293.   -program-transform-name=* | --program-transform-name=* \
  294.   | --program-transform-nam=* | --program-transform-na=* \
  295.   | --program-transform-n=* | --program-transform-=* \
  296.   | --program-transform=* | --program-transfor=* \
  297.   | --program-transfo=* | --program-transf=* \
  298.   | --program-trans=* | --program-tran=* \
  299.   | --progr-tra=* | --program-tr=* | --program-t=*)
  300.     program_transform_name="$ac_optarg" ;;
  301.  
  302.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  303.   | -silent | --silent | --silen | --sile | --sil)
  304.     silent=yes ;;
  305.  
  306.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  307.     ac_prev=sbindir ;;
  308.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  309.   | --sbi=* | --sb=*)
  310.     sbindir="$ac_optarg" ;;
  311.  
  312.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  313.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  314.   | --sharedst | --shareds | --shared | --share | --shar \
  315.   | --sha | --sh)
  316.     ac_prev=sharedstatedir ;;
  317.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  318.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  319.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  320.   | --sha=* | --sh=*)
  321.     sharedstatedir="$ac_optarg" ;;
  322.  
  323.   -site | --site | --sit)
  324.     ac_prev=site ;;
  325.   -site=* | --site=* | --sit=*)
  326.     site="$ac_optarg" ;;
  327.  
  328.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  329.     ac_prev=srcdir ;;
  330.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  331.     srcdir="$ac_optarg" ;;
  332.  
  333.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  334.   | --syscon | --sysco | --sysc | --sys | --sy)
  335.     ac_prev=sysconfdir ;;
  336.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  337.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  338.     sysconfdir="$ac_optarg" ;;
  339.  
  340.   -target | --target | --targe | --targ | --tar | --ta | --t)
  341.     ac_prev=target ;;
  342.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  343.     target="$ac_optarg" ;;
  344.  
  345.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  346.     verbose=yes ;;
  347.  
  348.   -version | --version | --versio | --versi | --vers)
  349.     echo "configure generated by autoconf version 2.7"
  350.     exit 0 ;;
  351.  
  352.   -with-* | --with-*)
  353.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  354.     # Reject names that are not valid shell variable names.
  355.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  356.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  357.     fi
  358.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  359.     case "$ac_option" in
  360.       *=*) ;;
  361.       *) ac_optarg=yes ;;
  362.     esac
  363.     eval "with_${ac_package}='$ac_optarg'" ;;
  364.  
  365.   -without-* | --without-*)
  366.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  367.     # Reject names that are not valid shell variable names.
  368.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  369.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  370.     fi
  371.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  372.     eval "with_${ac_package}=no" ;;
  373.  
  374.   --x)
  375.     # Obsolete; use --with-x.
  376.     with_x=yes ;;
  377.  
  378.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  379.   | --x-incl | --x-inc | --x-in | --x-i)
  380.     ac_prev=x_includes ;;
  381.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  382.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  383.     x_includes="$ac_optarg" ;;
  384.  
  385.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  386.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  387.     ac_prev=x_libraries ;;
  388.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  389.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  390.     x_libraries="$ac_optarg" ;;
  391.  
  392.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  393.     ;;
  394.  
  395.   *)
  396.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  397.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  398.     fi
  399.     if test "x$nonopt" != xNONE; then
  400.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  401.     fi
  402.     nonopt="$ac_option"
  403.     ;;
  404.  
  405.   esac
  406. done
  407.  
  408. if test -n "$ac_prev"; then
  409.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  410. fi
  411.  
  412. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  413.  
  414. # File descriptor usage:
  415. # 0 standard input
  416. # 1 file creation
  417. # 2 errors and warnings
  418. # 3 some systems may open it to /dev/tty
  419. # 4 used on the Kubota Titan
  420. # 6 checking for... messages and results
  421. # 5 compiler messages saved in config.log
  422. if test "$silent" = yes; then
  423.   exec 6>/dev/null
  424. else
  425.   exec 6>&1
  426. fi
  427. exec 5>./config.log
  428.  
  429. echo "\
  430. This file contains any messages produced by compilers while
  431. running configure, to aid debugging if configure makes a mistake.
  432. " 1>&5
  433.  
  434. # Strip out --no-create and --no-recursion so they do not pile up.
  435. # Also quote any args containing shell metacharacters.
  436. ac_configure_args=
  437. for ac_arg
  438. do
  439.   case "$ac_arg" in
  440.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  441.   | --no-cr | --no-c) ;;
  442.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  443.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  444.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  445.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  446.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  447.   esac
  448. done
  449.  
  450. # NLS nuisances.
  451. # Only set LANG and LC_ALL to C if already set.
  452. # These must not be set unconditionally because not all systems understand
  453. # e.g. LANG=C (notably SCO).
  454. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  455. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  456.  
  457. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  458. rm -rf conftest* confdefs.h
  459. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  460. echo > confdefs.h
  461.  
  462. # A filename unique to this package, relative to the directory that
  463. # configure is in, which we can look for to find out if srcdir is correct.
  464. ac_unique_file=../common/main.c
  465.  
  466. # Find the source files, if location was not specified.
  467. if test -z "$srcdir"; then
  468.   ac_srcdir_defaulted=yes
  469.   # Try the directory containing this script, then its parent.
  470.   ac_prog=$0
  471.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  472.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  473.   srcdir=$ac_confdir
  474.   if test ! -r $srcdir/$ac_unique_file; then
  475.     srcdir=..
  476.   fi
  477. else
  478.   ac_srcdir_defaulted=no
  479. fi
  480. if test ! -r $srcdir/$ac_unique_file; then
  481.   if test "$ac_srcdir_defaulted" = yes; then
  482.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  483.   else
  484.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  485.   fi
  486. fi
  487. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  488.  
  489. # Prefer explicitly selected file to automatically selected ones.
  490. if test -z "$CONFIG_SITE"; then
  491.   if test "x$prefix" != xNONE; then
  492.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  493.   else
  494.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  495.   fi
  496. fi
  497. for ac_site_file in $CONFIG_SITE; do
  498.   if test -r "$ac_site_file"; then
  499.     echo "loading site script $ac_site_file"
  500.     . "$ac_site_file"
  501.   fi
  502. done
  503.  
  504. if test -r "$cache_file"; then
  505.   echo "loading cache $cache_file"
  506.   . $cache_file
  507. else
  508.   echo "creating cache $cache_file"
  509.   > $cache_file
  510. fi
  511.  
  512. ac_ext=c
  513. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  514. ac_cpp='echo $CPP $CPPFLAGS 1>&5;
  515. $CPP $CPPFLAGS'
  516. ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
  517. ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  518. ac_link='echo ${CC-cc} -o conftest$EXE $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
  519. ${CC-cc} -o conftest$EXE $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  520.  
  521. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  522.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  523.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  524.     ac_n= ac_c='
  525. ' ac_t='    '
  526.   else
  527.     ac_n=-n ac_c= ac_t=
  528.   fi
  529. else
  530.   ac_n= ac_c='\c' ac_t=
  531. fi
  532.  
  533.  
  534.  
  535.  
  536. ac_aux_dir=
  537. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  538.   if test -f $ac_dir/install-sh; then
  539.     ac_aux_dir=$ac_dir
  540.     ac_install_sh="$ac_aux_dir/install-sh -c"
  541.     break
  542.   elif test -f $ac_dir/install.sh; then
  543.     ac_aux_dir=$ac_dir
  544.     ac_install_sh="$ac_aux_dir/install.sh -c"
  545.     break
  546.   fi
  547. done
  548. if test -z "$ac_aux_dir"; then
  549.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  550. fi
  551. ac_config_guess=$ac_aux_dir/config.guess
  552. ac_config_sub=$ac_aux_dir/config.sub
  553. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  554.  
  555. # Aside on compatibility:  it would be nice if this came *after* the system
  556. # type check, so I could have EXE, CMD, and PATHSEP set right to begin with.
  557. # (half-hearted check, fixed later...)
  558. if test -d 'C:\\'; then
  559.     EXE=.exe
  560.     CMD=.cmd
  561.     PATHSEP=;
  562. else
  563.     EXE=
  564.     CMD=
  565.     PATHSEP=:
  566. fi
  567.  
  568. # Find a good install program.  We prefer a C program (faster),
  569. # so one script is as good as another.  But avoid the broken or
  570. # incompatible versions:
  571. # SysV /etc/install, /usr/sbin/install
  572. # SunOS /usr/etc/install
  573. # IRIX /sbin/install
  574. # AIX /bin/install
  575. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  576. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  577. # ./install, which can be erroneously created by make from ./install.sh.
  578. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  579. if test -z "$INSTALL"; then
  580. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  581.   echo $ac_n "(cached) $ac_c" 1>&6
  582. else
  583.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  584.   for ac_dir in $PATH; do
  585.     # Account for people who put trailing slashes in PATH elements.
  586.     case "$ac_dir/" in
  587.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  588.     *)
  589.       # OSF1 and SCO ODT 3.0 have their own names for install.
  590.       for ac_prog in ginstall installbsd scoinst install; do
  591.         if test -f $ac_dir/$ac_prog$EXE; then
  592.       if test $ac_prog = install &&
  593.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  594.         # AIX install.  It has an incompatible calling convention.
  595.         # OSF/1 installbsd also uses dspmsg, but is usable.
  596.         :
  597.       else
  598.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  599.         break 2
  600.       fi
  601.     fi
  602.       done
  603.       ;;
  604.     esac
  605.   done
  606.   IFS="$ac_save_ifs"
  607.  
  608. fi
  609.   if test "${ac_cv_path_install+set}" = set; then
  610.     INSTALL="$ac_cv_path_install"
  611.   else
  612.     # As a last resort, use the slow shell script.  We don't cache a
  613.     # path for INSTALL within a source directory, because that will
  614.     # break other packages using the cache if that directory is
  615.     # removed, or if the path is relative.
  616.     INSTALL="$ac_install_sh"
  617.   fi
  618. fi
  619. echo "$ac_t""$INSTALL" 1>&6
  620.  
  621. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  622. # It thinks the first close brace ends the variable substitution.
  623. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  624.  
  625. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  626.  
  627.  
  628. # Make sure we can run config.sub.
  629. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  630. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  631. fi
  632.  
  633. echo $ac_n "checking host system type""... $ac_c" 1>&6
  634.  
  635. host_alias=$host
  636. case "$host_alias" in
  637. NONE)
  638.   case $nonopt in
  639.   NONE)
  640.     if host_alias=`$ac_config_guess`; then :
  641.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  642.     fi ;;
  643.   *) host_alias=$nonopt ;;
  644.   esac ;;
  645. esac
  646.  
  647. host=`$ac_config_sub $host_alias`
  648. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  649. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  650. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  651. echo "$ac_t""$host" 1>&6
  652.  
  653. if test "$program_transform_name" = s,x,x,; then
  654.   program_transform_name=
  655. else
  656.   # Double any \ or $.  echo might interpret backslashes.
  657.   cat <<\EOF_SED > conftestsed
  658. s,\\,\\\\,g; s,\$,$$,g
  659. EOF_SED
  660.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  661.   rm -f conftestsed
  662. fi
  663. test "$program_prefix" != NONE &&
  664.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  665. # Use a double $ so make ignores it.
  666. test "$program_suffix" != NONE &&
  667.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  668.  
  669. # sed with no file args requires a program.
  670. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  671.  
  672.  
  673. echo $ac_n "checking if --enable-debug option specified""... $ac_c" 1>&6
  674. # Check whether --enable-debug or --disable-debug was given.
  675. if test "${enable_debug+set}" = set; then
  676.   enableval="$enable_debug"
  677.   vi_cv_debug="yes"
  678. else
  679.   vi_cv_debug="no"
  680. fi
  681.  
  682. if test "$vi_cv_debug" = yes; then
  683.     cat >> confdefs.h <<\EOF
  684. #define DEBUG 1
  685. EOF
  686.  
  687.     OPTFLAG=${OPTFLAG-"-g"}
  688.     no_op_OPTFLAG=${no_op_OPTFLAG-"-g"}
  689. fi
  690. echo "$ac_t""$vi_cv_debug" 1>&6
  691.  
  692.  
  693.  
  694. EXE=
  695. CMD=
  696. PATHSEP=:
  697. vi_cv_DOSish=0
  698. emxadds=
  699. emxfix=:
  700. case "$host_os" in
  701. aix3.2.5)  OPTFLAG=${OPTFLAG-"-O"};;
  702. aix4.1*)   CFLAGS=${CFLAGS-"-qstrict"}
  703.        OPTFLAG=${OPTFLAG-"-O3"};;
  704. aux*)       CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"}
  705.        LDFLAGS=${LDFLAGS-"-ZP"}
  706.        OPTFLAG=${OPTFLAG-"-O"};;
  707. bsd4.4)    OPTFLAG=${OPTFLAG-"-O2"};;
  708. bsdi*)       CC=${CC-"shlicc"}
  709.        OPTFLAG=${OPTFLAG-"-O2"};;
  710. dos*|os2*|win*)
  711.        vi_cv_DOSish=1
  712.        emxadds="-DEMX_MOUSE -DEMX_KEYS -DEMX_TITLEBAR -DEMX_CURSOR"
  713.        EXE=".exe"
  714.        CMD=".cmd"
  715.        OPTFLAG=${OPTFLAG-"-O2 -Zmt"}
  716.        LDFLAGS=${LDFLAGS-"-Zmt"}
  717.        emxfix=${EMX_FIX_CMD-"emxbind -a \$@ -h60"}
  718.        PATHSEP=";";;
  719. irix6*)       OPTFLAG=${OPTFLAG-"-O2"};;
  720. irix*)       OPTFLAG=${OPTFLAG-"-O2"};;
  721. lynxos*)   # Extract the first word of "gcc", so it can be a program name with args.
  722. set dummy gcc; ac_word=$2
  723. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  724. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  725.   echo $ac_n "(cached) $ac_c" 1>&6
  726. else
  727.   if test -n "$CC"; then
  728.   ac_cv_prog_CC="$CC" # Let the user override the test.
  729. else
  730.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS};"
  731.   for ac_dir in $PATH; do
  732.     test -z "$ac_dir" && ac_dir=.
  733.     if test -f $ac_dir/$ac_word$EXE; then
  734.       ac_cv_prog_CC="gcc"
  735.       break
  736.     fi
  737.   done
  738.   IFS="$ac_save_ifs"
  739.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  740. fi
  741. fi
  742. CC="$ac_cv_prog_CC"
  743. if test -n "$CC"; then
  744.   echo "$ac_t""$CC" 1>&6
  745. else
  746.   echo "$ac_t""no" 1>&6
  747. fi
  748.  
  749.  
  750. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  751. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  752.   echo $ac_n "(cached) $ac_c" 1>&6
  753. else
  754.   cat > conftest.c <<EOF
  755. #ifdef __GNUC__
  756.   yes;
  757. #endif
  758. EOF
  759. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  760.   ac_cv_prog_gcc=yes
  761. else
  762.   ac_cv_prog_gcc=no
  763. fi
  764. fi
  765.  
  766. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  767. if test $ac_cv_prog_gcc = yes; then
  768.   GCC=yes
  769.   if test "${CFLAGS+set}" != set; then
  770.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  771. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  772.   echo $ac_n "(cached) $ac_c" 1>&6
  773. else
  774.   echo 'void f(){}' > conftest.c
  775. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  776.   ac_cv_prog_gcc_g=yes
  777. else
  778.   ac_cv_prog_gcc_g=no
  779. fi
  780. rm -f conftest*
  781.  
  782. fi
  783.  
  784. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  785.     if test $ac_cv_prog_gcc_g = yes; then
  786.       CFLAGS="-g -O"
  787.     else
  788.       CFLAGS="-O"
  789.     fi
  790.   fi
  791. else
  792.   GCC=
  793.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  794. fi
  795.  
  796.        echo $ac_n "checking for GNU C (gcc) version 2.x""... $ac_c" 1>&6
  797.        ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \
  798.         grep "gcc version " | sed 's/.*version //'`
  799.        ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'`
  800.        if test "$ac_cv_gcc_major" = "2" ; then
  801.         echo "$ac_t""yes" 1>&6
  802.        else
  803.         echo "$ac_t""no" 1>&6
  804.         echo "Fatal error: Nvi requires gcc 2.x to build on LynxOS."
  805.         echo "See build/README.LynxOS for more information."
  806.         exit 1
  807.        fi;;
  808. nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"}
  809.        LDFLAGS=${LDFLAGS-"-posix"}
  810.        OPTFLAG=${OPTFLAG-"-O9"};;
  811. osf*)       CFLAGS=${CFLAGS-"-Olimit 1000"};;
  812. solaris*)  no_op_OPTFLAG=${no_op_OPTFLAG-""};;
  813. sunos*)       no_op_OPTFLAG=${no_op_OPTFLAG-""};;
  814. esac
  815.  
  816.  
  817. CC=${CC-cc}
  818.  
  819.  
  820. OPTFLAG=${OPTFLAG-"-O"}
  821.  
  822.  
  823. no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"}
  824.  
  825. case "$host_os" in
  826. bsdi2.1)   LIBS=${LIBS-"-lipc"};;
  827. dgux*)       LIBS=${LIBS-"-ldgc"};;
  828. irix6*)       LIBS=${LIBS-"-lbsd"};;
  829. irix*)       LIBS=${LIBS-"-lc_s -lbsd"};;
  830. isc*)       LIBS=${LIBS-"-lcposix -linet"};;
  831. netbsd1*)  LIBS=${LIBS-"-lcrypt"};;
  832. ptx*)       LIBS=${LIBS-"-lseq -linet -lsocket"};;
  833. sco3.2*)   LIBS=${LIBS-"-lsocket"};;
  834. sinix*)       LIBS=${LIBS-"-lelf -lc"};;
  835. solaris*)  LIBS=${LIBS-"-lsocket -lnsl -ldl"}
  836.        RLIBS=yes;;
  837. wgs*)       LIBS=${LIBS-"-lnsl"};;
  838. os2)       LIBS=${LIBS-"-lsocket -lbsd -lsettitle"};;
  839. esac
  840.  
  841. case "$host_os" in
  842. aux*)       LIBOBJS="getopt.o strpbrk.o $LIBOBJS";;
  843. esac
  844.  
  845. case "$host_os" in
  846. ultrix*)   cat >> confdefs.h <<\EOF
  847. #define HAVE_BROKEN_VDISABLE 1
  848. EOF
  849. ;;
  850. esac
  851.  
  852. CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS"
  853.  
  854. LDFLAGS="$ADDLDFLAGS $LDFLAGS"
  855.  
  856. LIBS="$ADDLIBS $LIBS"
  857.  
  858. # If we cannot run a trivial program, we must be cross compiling.
  859. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  860. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  861.   echo $ac_n "(cached) $ac_c" 1>&6
  862. else
  863.   if test "$cross_compiling" = yes; then
  864.   ac_cv_c_cross=yes
  865. else
  866. cat > conftest.$ac_ext <<EOF
  867. #line 839 "configure"
  868. #include "confdefs.h"
  869. main(){return(0);}
  870. EOF
  871. eval $ac_link
  872. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  873.   ac_cv_c_cross=no
  874. else
  875.   ac_cv_c_cross=yes
  876. fi
  877. fi
  878. rm -fr conftest*
  879. fi
  880.  
  881. echo "$ac_t""$ac_cv_c_cross" 1>&6
  882. cross_compiling=$ac_cv_c_cross
  883.  
  884. echo $ac_n "checking whether the compiler ($CC $CFLAGS $LDFLAGS) actually works""... $ac_c" 1>&6
  885.  
  886.   ac_ext=c
  887. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  888. ac_cpp='echo $CPP $CPPFLAGS 1>&5;
  889. $CPP $CPPFLAGS'
  890. ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
  891. ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  892. ac_link='echo ${CC-cc} -o conftest$EXE $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
  893. ${CC-cc} -o conftest$EXE $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  894.  
  895.   if test "$cross_compiling" = yes; then
  896.                cat > conftest.$ac_ext <<EOF
  897. #line 869 "configure"
  898. #include "confdefs.h"
  899.  
  900. int main() { return 0; }
  901. int t() {
  902.  
  903. ; return 0; }
  904. EOF
  905. if eval $ac_link; then
  906.   rm -rf conftest*
  907.   am_cv_prog_cc_works=yes
  908. else
  909.   rm -rf conftest*
  910.   am_cv_prog_cc_works=no
  911. fi
  912. rm -f conftest*
  913.  
  914. else
  915. cat > conftest.$ac_ext <<EOF
  916. #line 888 "configure"
  917. #include "confdefs.h"
  918. main() { exit(0); }
  919. EOF
  920. eval $ac_link
  921. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  922.   am_cv_prog_cc_works=yes
  923. else
  924.   am_cv_prog_cc_works=no
  925. fi
  926. fi
  927. rm -fr conftest*
  928.  
  929. case "$am_cv_prog_cc_works" in
  930.   *no) { echo "configure: error: Installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } ;;
  931.   *yes) ;;
  932. esac
  933. echo "$ac_t""yes" 1>&6
  934.  
  935.  
  936. PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib:"
  937.  
  938. # Extract the first word of "sh", so it can be a program name with args.
  939. set dummy sh; ac_word=$2
  940. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  941. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_shell'+set}'`\" = set"; then
  942.   echo $ac_n "(cached) $ac_c" 1>&6
  943. else
  944.   case "$vi_cv_path_shell" in
  945.   /*)
  946.   ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path.
  947.   ;;
  948.   *)
  949.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  950.   for ac_dir in $PATH; do
  951.     test -z "$ac_dir" && ac_dir=.
  952.     if test -f $ac_dir/$ac_word$EXE; then
  953.       ac_cv_path_vi_cv_path_shell="$ac_dir/$ac_word"
  954.       break
  955.     fi
  956.   done
  957.   IFS="$ac_save_ifs"
  958.   test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no"
  959.   ;;
  960. esac
  961. fi
  962. vi_cv_path_shell="$ac_cv_path_vi_cv_path_shell"
  963. if test -n "$vi_cv_path_shell"; then
  964.   echo "$ac_t""$vi_cv_path_shell" 1>&6
  965. else
  966.   echo "$ac_t""no" 1>&6
  967. fi
  968.  
  969. if test "$vi_cv_path_shell" = no; then
  970.     echo "Fatal error: the shell utility not found."
  971.     exit 1
  972. fi
  973.  
  974. # Extract the first word of "sendmail", so it can be a program name with args.
  975. set dummy sendmail; ac_word=$2
  976. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  977. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_sendmail'+set}'`\" = set"; then
  978.   echo $ac_n "(cached) $ac_c" 1>&6
  979. else
  980.   case "$vi_cv_path_sendmail" in
  981.   /*)
  982.   ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path.
  983.   ;;
  984.   *)
  985.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  986.   for ac_dir in $PATH; do
  987.     test -z "$ac_dir" && ac_dir=.
  988.     if test -f $ac_dir/$ac_word$EXE; then
  989.       ac_cv_path_vi_cv_path_sendmail="$ac_dir/$ac_word"
  990.       break
  991.     fi
  992.   done
  993.   IFS="$ac_save_ifs"
  994.   test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no"
  995.   ;;
  996. esac
  997. fi
  998. vi_cv_path_sendmail="$ac_cv_path_vi_cv_path_sendmail"
  999. if test -n "$vi_cv_path_sendmail"; then
  1000.   echo "$ac_t""$vi_cv_path_sendmail" 1>&6
  1001. else
  1002.   echo "$ac_t""no" 1>&6
  1003. fi
  1004.  
  1005. if test "$vi_cv_path_sendmail" = no; then
  1006.     echo "WARNING: The sendmail utility was not found!"
  1007.     echo "WARNING: Users will not be told of saved files."
  1008. fi
  1009.  
  1010.  
  1011. for ac_prog in perl5 perl
  1012. do
  1013. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1014. set dummy $ac_prog; ac_word=$2
  1015. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1016. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
  1017.   echo $ac_n "(cached) $ac_c" 1>&6
  1018. else
  1019.   case "$vi_cv_path_perl" in
  1020.   /*)
  1021.   ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
  1022.   ;;
  1023.   *)
  1024.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1025.   for ac_dir in $PATH; do
  1026.     test -z "$ac_dir" && ac_dir=.
  1027.     if test -f $ac_dir/$ac_word$EXE; then
  1028.       ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
  1029.       break
  1030.     fi
  1031.   done
  1032.   IFS="$ac_save_ifs"
  1033.   ;;
  1034. esac
  1035. fi
  1036. vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
  1037. if test -n "$vi_cv_path_perl"; then
  1038.   echo "$ac_t""$vi_cv_path_perl" 1>&6
  1039. else
  1040.   echo "$ac_t""no" 1>&6
  1041. fi
  1042.  
  1043. test -n "$vi_cv_path_perl" && break
  1044. done
  1045. test -n "$vi_cv_path_perl" || vi_cv_path_perl="no"
  1046.  
  1047.  
  1048.  
  1049. echo $ac_n "checking for preserve directory""... $ac_c" 1>&6
  1050. if eval "test \"`echo '$''{'vi_cv_path_preserve'+set}'`\" = set"; then
  1051.   echo $ac_n "(cached) $ac_c" 1>&6
  1052. else
  1053.     if test "$vi_cv_DOSish" = 1; then
  1054.         dirlist="$prefix/preserve C:/preserve C:/temp C:/tmp C:/"
  1055.     else
  1056.         dirlist="/var/preserve /var/tmp /usr/tmp /tmp"
  1057.     fi
  1058.     vi_cv_path_preserve=no
  1059.     for i in $dirlist; do
  1060.         if test -d $i/vi.recover; then
  1061.             vi_cv_path_preserve=$i/vi.recover
  1062.             break;
  1063.         fi
  1064.     done
  1065.     if test "$vi_cv_path_preserve" = no; then
  1066.         for i in $dirlist; do
  1067.             if test -d $i/recover.vi; then
  1068.                 vi_cv_path_preserve=$i/recover.vi
  1069.                 break;
  1070.             fi
  1071.         done
  1072.     fi
  1073.     if test "$vi_cv_path_preserve" = no; then
  1074.         for i in $dirlist; do
  1075.             if test -d $i -a -w $i; then
  1076.                 if [ $vi_cv_DOSish = 1 ]; then
  1077.                     vi_cv_path_preserve=$i/recover.vi
  1078.                     else
  1079.                     vi_cv_path_preserve=$i/vi.recover
  1080.                 fi
  1081.                 break;
  1082.             fi
  1083.         done
  1084.  
  1085.     fi
  1086. fi
  1087.  
  1088. if test "$vi_cv_path_preserve" = no; then
  1089.     echo "Fatal error: no writeable preserve directory found."
  1090.     exit 1
  1091. fi
  1092. echo "$ac_t""$vi_cv_path_preserve" 1>&6
  1093.  
  1094.  
  1095. # Extract the first word of "chmod", so it can be a program name with args.
  1096. set dummy chmod; ac_word=$2
  1097. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1098. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_chmod'+set}'`\" = set"; then
  1099.   echo $ac_n "(cached) $ac_c" 1>&6
  1100. else
  1101.   case "$vi_cv_path_chmod" in
  1102.   /*)
  1103.   ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path.
  1104.   ;;
  1105.   *)
  1106.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1107.   for ac_dir in $PATH; do
  1108.     test -z "$ac_dir" && ac_dir=.
  1109.     if test -f $ac_dir/$ac_word$EXE; then
  1110.       ac_cv_path_vi_cv_path_chmod="$ac_dir/$ac_word"
  1111.       break
  1112.     fi
  1113.   done
  1114.   IFS="$ac_save_ifs"
  1115.   test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod"
  1116.   ;;
  1117. esac
  1118. fi
  1119. vi_cv_path_chmod="$ac_cv_path_vi_cv_path_chmod"
  1120. if test -n "$vi_cv_path_chmod"; then
  1121.   echo "$ac_t""$vi_cv_path_chmod" 1>&6
  1122. else
  1123.   echo "$ac_t""no" 1>&6
  1124. fi
  1125.  
  1126. # Extract the first word of "cp", so it can be a program name with args.
  1127. set dummy cp; ac_word=$2
  1128. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1129. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_cp'+set}'`\" = set"; then
  1130.   echo $ac_n "(cached) $ac_c" 1>&6
  1131. else
  1132.   case "$vi_cv_path_cp" in
  1133.   /*)
  1134.   ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path.
  1135.   ;;
  1136.   *)
  1137.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1138.   for ac_dir in $PATH; do
  1139.     test -z "$ac_dir" && ac_dir=.
  1140.     if test -f $ac_dir/$ac_word$EXE; then
  1141.       ac_cv_path_vi_cv_path_cp="$ac_dir/$ac_word"
  1142.       break
  1143.     fi
  1144.   done
  1145.   IFS="$ac_save_ifs"
  1146.   test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp"
  1147.   ;;
  1148. esac
  1149. fi
  1150. vi_cv_path_cp="$ac_cv_path_vi_cv_path_cp"
  1151. if test -n "$vi_cv_path_cp"; then
  1152.   echo "$ac_t""$vi_cv_path_cp" 1>&6
  1153. else
  1154.   echo "$ac_t""no" 1>&6
  1155. fi
  1156.  
  1157. # Extract the first word of "ln", so it can be a program name with args.
  1158. set dummy ln; ac_word=$2
  1159. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1160. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ln'+set}'`\" = set"; then
  1161.   echo $ac_n "(cached) $ac_c" 1>&6
  1162. else
  1163.   case "$vi_cv_path_ln" in
  1164.   /*)
  1165.   ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path.
  1166.   ;;
  1167.   *)
  1168.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1169.   for ac_dir in $PATH; do
  1170.     test -z "$ac_dir" && ac_dir=.
  1171.     if test -f $ac_dir/$ac_word$EXE; then
  1172.       ac_cv_path_vi_cv_path_ln="$ac_dir/$ac_word"
  1173.       break
  1174.     fi
  1175.   done
  1176.   IFS="$ac_save_ifs"
  1177.   test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="$vi_cv_path_cp"
  1178.   ;;
  1179. esac
  1180. fi
  1181. vi_cv_path_ln="$ac_cv_path_vi_cv_path_ln"
  1182. if test -n "$vi_cv_path_ln"; then
  1183.   echo "$ac_t""$vi_cv_path_ln" 1>&6
  1184. else
  1185.   echo "$ac_t""no" 1>&6
  1186. fi
  1187.  
  1188. # Extract the first word of "mkdir", so it can be a program name with args.
  1189. set dummy mkdir; ac_word=$2
  1190. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1191. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mkdir'+set}'`\" = set"; then
  1192.   echo $ac_n "(cached) $ac_c" 1>&6
  1193. else
  1194.   case "$vi_cv_path_mkdir" in
  1195.   /*)
  1196.   ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path.
  1197.   ;;
  1198.   *)
  1199.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1200.   for ac_dir in $PATH; do
  1201.     test -z "$ac_dir" && ac_dir=.
  1202.     if test -f $ac_dir/$ac_word$EXE; then
  1203.       ac_cv_path_vi_cv_path_mkdir="$ac_dir/$ac_word"
  1204.       break
  1205.     fi
  1206.   done
  1207.   IFS="$ac_save_ifs"
  1208.   test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir"
  1209.   ;;
  1210. esac
  1211. fi
  1212. vi_cv_path_mkdir="$ac_cv_path_vi_cv_path_mkdir"
  1213. if test -n "$vi_cv_path_mkdir"; then
  1214.   echo "$ac_t""$vi_cv_path_mkdir" 1>&6
  1215. else
  1216.   echo "$ac_t""no" 1>&6
  1217. fi
  1218.  
  1219. # Extract the first word of "rm", so it can be a program name with args.
  1220. set dummy rm; ac_word=$2
  1221. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1222. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_rm'+set}'`\" = set"; then
  1223.   echo $ac_n "(cached) $ac_c" 1>&6
  1224. else
  1225.   case "$vi_cv_path_rm" in
  1226.   /*)
  1227.   ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path.
  1228.   ;;
  1229.   *)
  1230.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1231.   for ac_dir in $PATH; do
  1232.     test -z "$ac_dir" && ac_dir=.
  1233.     if test -f $ac_dir/$ac_word$EXE; then
  1234.       ac_cv_path_vi_cv_path_rm="$ac_dir/$ac_word"
  1235.       break
  1236.     fi
  1237.   done
  1238.   IFS="$ac_save_ifs"
  1239.   test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm"
  1240.   ;;
  1241. esac
  1242. fi
  1243. vi_cv_path_rm="$ac_cv_path_vi_cv_path_rm"
  1244. if test -n "$vi_cv_path_rm"; then
  1245.   echo "$ac_t""$vi_cv_path_rm" 1>&6
  1246. else
  1247.   echo "$ac_t""no" 1>&6
  1248. fi
  1249.  
  1250. # Extract the first word of "strip", so it can be a program name with args.
  1251. set dummy strip; ac_word=$2
  1252. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1253. if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_strip'+set}'`\" = set"; then
  1254.   echo $ac_n "(cached) $ac_c" 1>&6
  1255. else
  1256.   case "$vi_cv_path_strip" in
  1257.   /*)
  1258.   ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path.
  1259.   ;;
  1260.   *)
  1261.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
  1262.   for ac_dir in $PATH; do
  1263.     test -z "$ac_dir" && ac_dir=.
  1264.     if test -f $ac_dir/$ac_word$EXE; then
  1265.       ac_cv_path_vi_cv_path_strip="$ac_dir/$ac_word"
  1266.       break
  1267.     fi
  1268.   done
  1269.   IFS="$ac_save_ifs"
  1270.   test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip"
  1271.   ;;
  1272. esac
  1273. fi
  1274. vi_cv_path_strip="$ac_cv_path_vi_cv_path_strip"
  1275. if test -n "$vi_cv_path_strip"; then
  1276.   echo "$ac_t""$vi_cv_path_strip" 1>&6
  1277. else
  1278.   echo "$ac_t""no" 1>&6
  1279. fi
  1280.  
  1281.  
  1282. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1283. # On Suns, sometimes $CPP names a directory.
  1284. if test -n "$CPP" && test -d "$CPP"; then
  1285.   CPP=
  1286. fi
  1287. if test -z "$CPP"; then
  1288. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1289.   echo $ac_n "(cached) $ac_c" 1>&6
  1290. else
  1291.     # This must be in double quotes, not single quotes, because CPP may get
  1292.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1293.   CPP="${CC-cc} -E"
  1294.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1295.   # not just through cpp.
  1296.   cat > conftest.$ac_ext <<EOF
  1297. #line 1252 "configure"
  1298. #include "confdefs.h"
  1299. #include <assert.h>
  1300. Syntax Error
  1301. EOF
  1302. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1303. ac_err=`grep -v '^ *+' conftest.out`
  1304. if test -z "$ac_err"; then
  1305.   :
  1306. else
  1307.   echo "$ac_err" >&5
  1308.   rm -rf conftest*
  1309.   CPP="${CC-cc} -E -traditional-cpp"
  1310.   cat > conftest.$ac_ext <<EOF
  1311. #line 1266 "configure"
  1312. #include "confdefs.h"
  1313. #include <assert.h>
  1314. Syntax Error
  1315. EOF
  1316. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1317. ac_err=`grep -v '^ *+' conftest.out`
  1318. if test -z "$ac_err"; then
  1319.   :
  1320. else
  1321.   echo "$ac_err" >&5
  1322.   rm -rf conftest*
  1323.   CPP=/lib/cpp
  1324. fi
  1325. rm -f conftest*
  1326. fi
  1327. rm -f conftest*
  1328.   ac_cv_prog_CPP="$CPP"
  1329. fi
  1330.   CPP="$ac_cv_prog_CPP"
  1331. else
  1332.   ac_cv_prog_CPP="$CPP"
  1333. fi
  1334. echo "$ac_t""$CPP" 1>&6
  1335.  
  1336. # If we find X, set shell vars x_includes and x_libraries to the
  1337. # paths, otherwise set no_x=yes.
  1338. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1339. # --without-x overrides everything else, but does not touch the cache.
  1340. echo $ac_n "checking for X""... $ac_c" 1>&6
  1341.  
  1342. # Check whether --with-x or --without-x was given.
  1343. if test "${with_x+set}" = set; then
  1344.   withval="$with_x"
  1345.   :
  1346. fi
  1347.  
  1348. if test "x$with_x" = xno; then
  1349.   no_x=yes
  1350. else
  1351.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1352.     no_x=
  1353.   else
  1354. if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
  1355.   echo $ac_n "(cached) $ac_c" 1>&6
  1356. else
  1357.   # One or both of the vars are not set, and there is no cached value.
  1358. no_x=yes
  1359. rm -fr conftestdir
  1360. if mkdir conftestdir; then
  1361.   cd conftestdir
  1362.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1363.   cat > Imakefile <<'EOF'
  1364. acfindx:
  1365.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1366. EOF
  1367.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1368.     no_x=
  1369.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1370.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1371.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1372.     for ac_extension in a so sl; do
  1373.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1374.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1375.         ac_im_usrlibdir=$ac_im_libdir; break
  1376.       fi
  1377.     done
  1378.     # Screen out bogus values from the imake configuration.
  1379.     case "$ac_im_incroot" in
  1380.     /usr/include) ;;
  1381.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1382.     esac
  1383.     case "$ac_im_usrlibdir" in
  1384.     /usr/lib | /lib) ;;
  1385.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1386.     esac
  1387.   fi
  1388.   cd ..
  1389.   rm -fr conftestdir
  1390. fi
  1391.  
  1392. if test "$no_x" = yes; then
  1393. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1394. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1395. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1396. cat > conftest.$ac_ext <<EOF
  1397. #line 1352 "configure"
  1398. #include "confdefs.h"
  1399. #include <$x_direct_test_include>
  1400. EOF
  1401. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1402. ac_err=`grep -v '^ *+' conftest.out`
  1403. if test -z "$ac_err"; then
  1404.   rm -rf conftest*
  1405.   no_x= ac_x_includes=
  1406. else
  1407.   echo "$ac_err" >&5
  1408.   rm -rf conftest*
  1409.     for ac_dir in               \
  1410.     /usr/X11R6/include        \
  1411.     /usr/X11R5/include        \
  1412.     /usr/X11R4/include        \
  1413.                               \
  1414.     /usr/include/X11R6        \
  1415.     /usr/include/X11R5        \
  1416.     /usr/include/X11R4        \
  1417.                               \
  1418.     /usr/local/X11R6/include  \
  1419.     /usr/local/X11R5/include  \
  1420.     /usr/local/X11R4/include  \
  1421.                               \
  1422.     /usr/local/include/X11R6  \
  1423.     /usr/local/include/X11R5  \
  1424.     /usr/local/include/X11R4  \
  1425.                               \
  1426.     /usr/X11/include          \
  1427.     /usr/include/X11          \
  1428.     /usr/local/X11/include    \
  1429.     /usr/local/include/X11    \
  1430.                               \
  1431.     /usr/X386/include         \
  1432.     /usr/x386/include         \
  1433.     /usr/XFree86/include/X11  \
  1434.                               \
  1435.     /usr/include              \
  1436.     /usr/local/include        \
  1437.     /usr/unsupported/include  \
  1438.     /usr/athena/include       \
  1439.     /usr/local/x11r5/include  \
  1440.     /usr/lpp/Xamples/include  \
  1441.                               \
  1442.     /usr/openwin/include      \
  1443.     /usr/openwin/share/include \
  1444.     ; \
  1445.   do
  1446.     if test -r "$ac_dir/$x_direct_test_include"; then
  1447.       no_x= ac_x_includes=$ac_dir
  1448.       break
  1449.     fi
  1450.   done
  1451. fi
  1452. rm -f conftest*
  1453.  
  1454. # Check for the libraries.
  1455. # See if we find them without any special options.
  1456. # Don't add to $LIBS permanently.
  1457. ac_save_LIBS="$LIBS"
  1458. LIBS="-l$x_direct_test_library $LIBS"
  1459. cat > conftest.$ac_ext <<EOF
  1460. #line 1415 "configure"
  1461. #include "confdefs.h"
  1462.  
  1463. int main() { return 0; }
  1464. int t() {
  1465. ${x_direct_test_function}()
  1466. ; return 0; }
  1467. EOF
  1468. if eval $ac_link; then
  1469.   rm -rf conftest*
  1470.   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
  1471. else
  1472.   rm -rf conftest*
  1473.   LIBS="$ac_save_LIBS"
  1474. # First see if replacing the include by lib works.
  1475. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1476.     /usr/X11R6/lib        \
  1477.     /usr/X11R5/lib        \
  1478.     /usr/X11R4/lib        \
  1479.                           \
  1480.     /usr/lib/X11R6        \
  1481.     /usr/lib/X11R5        \
  1482.     /usr/lib/X11R4        \
  1483.                           \
  1484.     /usr/local/X11R6/lib  \
  1485.     /usr/local/X11R5/lib  \
  1486.     /usr/local/X11R4/lib  \
  1487.                           \
  1488.     /usr/local/lib/X11R6  \
  1489.     /usr/local/lib/X11R5  \
  1490.     /usr/local/lib/X11R4  \
  1491.                           \
  1492.     /usr/X11/lib          \
  1493.     /usr/lib/X11          \
  1494.     /usr/local/X11/lib    \
  1495.     /usr/local/lib/X11    \
  1496.                           \
  1497.     /usr/X386/lib         \
  1498.     /usr/x386/lib         \
  1499.     /usr/XFree86/lib/X11  \
  1500.                           \
  1501.     /usr/lib              \
  1502.     /usr/local/lib        \
  1503.     /usr/unsupported/lib  \
  1504.     /usr/athena/lib       \
  1505.     /usr/local/x11r5/lib  \
  1506.     /usr/lpp/Xamples/lib  \
  1507.                           \
  1508.     /usr/openwin/lib      \
  1509.     /usr/openwin/share/lib \
  1510.     ; \
  1511. do
  1512.   for ac_extension in a so sl; do
  1513.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1514.       no_x= ac_x_libraries=$ac_dir
  1515.       break 2
  1516.     fi
  1517.   done
  1518. done
  1519. fi
  1520. rm -f conftest*
  1521.  
  1522. fi
  1523. if test "$no_x" = yes; then
  1524.   ac_cv_path_x="no_x=yes"
  1525. else
  1526.   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1527. fi
  1528. fi
  1529.   fi
  1530.   eval "$ac_cv_path_x"
  1531. fi # $with_x != no
  1532.  
  1533. if test "$no_x" = yes; then
  1534.   echo "$ac_t""no" 1>&6
  1535. else
  1536.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1537.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1538.   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1539.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1540. fi
  1541.  
  1542.  
  1543. if test "$no_x" != yes; then
  1544.     if test "X$x_libraries" != "X"; then
  1545.         if test "X$RLIBS" = "Xyes"; then
  1546.             XLIBS="-R$x_libraries -L$x_libraries $XLIBS"
  1547.         else
  1548.             XLIBS="-L$x_libraries $XLIBS"
  1549.         fi
  1550.     fi
  1551.     XLIBS="$XLIBS -lX11"
  1552.     if test "X$x_includes" != "X"; then
  1553.         XINCS="-I$x_includes"
  1554.     fi
  1555. fi
  1556.  
  1557.  
  1558.  
  1559. echo $ac_n "checking if --enable-perlinterp option specified""... $ac_c" 1>&6
  1560. # Check whether --enable-perlinterp or --disable-perlinterp was given.
  1561. if test "${enable_perlinterp+set}" = set; then
  1562.   enableval="$enable_perlinterp"
  1563.   vi_cv_perlinterp="yes"
  1564. else
  1565.   vi_cv_perlinterp="no"
  1566. fi
  1567.  
  1568. echo "$ac_t""$vi_cv_perlinterp" 1>&6
  1569. if test "$vi_cv_perlinterp" = "yes"; then
  1570.     if test "$vi_cv_path_perl" = no; then
  1571.         echo "Fatal error: no perl5 utility found."
  1572.         exit 1
  1573.     fi
  1574.     $vi_cv_path_perl -e 'require 5.002' || {
  1575.         echo "Fatal error: perl5 must be version 5.002 or later."
  1576.         exit 1
  1577.     }
  1578.     $vi_cv_path_perl -e 'close(STDERR);require 5.003_01' &&
  1579.         cat >> confdefs.h <<\EOF
  1580. #define HAVE_PERL_5_003_01 1
  1581. EOF
  1582.  
  1583.  
  1584.     eval `$vi_cv_path_perl -V:shrpenv`
  1585.     if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
  1586.         shrpenv=""
  1587.     fi
  1588.     vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'`
  1589.     perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
  1590.             -e 'ccflags;perl_inc'`
  1591.     if test "X$perlcppflags" != "X"; then
  1592.         CPPFLAGS="$perlcppflags $CPPFLAGS"
  1593.     fi
  1594.     perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \
  1595.             -e 'ldopts'`
  1596.     if test "X$perllibs" != "X"; then
  1597.         LIBS="$perllibs $LIBS"
  1598.     fi
  1599.     perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \
  1600.             -e 'ccdlflags'`
  1601.     if test "X$perlldflags" != "X"; then
  1602.         LDFLAGS="$perlldflags $LDFLAGS"
  1603.     fi
  1604.     LIBOBJS="perl.o perlsfio.o $LIBOBJS"
  1605.     cat >> confdefs.h <<\EOF
  1606. #define HAVE_PERL_INTERP 1
  1607. EOF
  1608.  
  1609. fi
  1610.  
  1611.  
  1612.  
  1613. echo $ac_n "checking if --enable-tknvi option specified""... $ac_c" 1>&6
  1614. # Check whether --enable-tknvi or --disable-tknvi was given.
  1615. if test "${enable_tknvi+set}" = set; then
  1616.   enableval="$enable_tknvi"
  1617.   vi_cv_tknvi="yes"
  1618. else
  1619.   vi_cv_tknvi="no"
  1620. fi
  1621.  
  1622. echo "$ac_t""$vi_cv_tknvi" 1>&6
  1623. if test "$vi_cv_tknvi" = "yes"; then
  1624.     tknvi=tknvi
  1625.     TKLIBS="-ltk -ltcl -lm $XLIBS $LIBS"
  1626. fi
  1627.  
  1628. echo $ac_n "checking if --enable-tclinterp option specified""... $ac_c" 1>&6
  1629. # Check whether --enable-tclinterp or --disable-tclinterp was given.
  1630. if test "${enable_tclinterp+set}" = set; then
  1631.   enableval="$enable_tclinterp"
  1632.   vi_cv_tclinterp="yes"
  1633. else
  1634.   vi_cv_tclinterp="no"
  1635. fi
  1636.  
  1637. echo "$ac_t""$vi_cv_tclinterp" 1>&6
  1638. if test "$vi_cv_tclinterp" = "yes"; then
  1639.     LIBOBJS="tcl.o $LIBOBJS"
  1640.     LIBS="-ltk -ltcl -lm $XLIBS $LIBS"
  1641.     cat >> confdefs.h <<\EOF
  1642. #define HAVE_TCL_INTERP 1
  1643. EOF
  1644.  
  1645. fi
  1646.  
  1647. if test "$vi_cv_tknvi" = "yes" || test "$vi_cv_tclinterp" = "yes"; then
  1648.     echo $ac_n "checking for -ltcl""... $ac_c" 1>&6
  1649. ac_lib_var=`echo tcl | tr '.-/+' '___p'`
  1650. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1651.   echo $ac_n "(cached) $ac_c" 1>&6
  1652. else
  1653.   ac_save_LIBS="$LIBS"
  1654. LIBS="-ltcl -ltk -lm $LIBS"
  1655. cat > conftest.$ac_ext <<EOF
  1656. #line 1611 "configure"
  1657. #include "confdefs.h"
  1658.  
  1659. int main() { return 0; }
  1660. int t() {
  1661. main()
  1662. ; return 0; }
  1663. EOF
  1664. if eval $ac_link; then
  1665.   rm -rf conftest*
  1666.   eval "ac_cv_lib_$ac_lib_var=yes"
  1667. else
  1668.   rm -rf conftest*
  1669.   eval "ac_cv_lib_$ac_lib_var=no"
  1670. fi
  1671. rm -f conftest*
  1672. LIBS="$ac_save_LIBS"
  1673.  
  1674. fi
  1675. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1676.   echo "$ac_t""yes" 1>&6
  1677.   vi_cv_tkfatal="no"
  1678. else
  1679.   echo "$ac_t""no" 1>&6
  1680. vi_cv_tkfatal="yes"
  1681. fi
  1682.  
  1683.     if test "$vi_cv_tkfatal" = "yes"; then
  1684.         echo "Fatal error: no Tk/Tcl library; see the section"
  1685.         echo "ADDING LIBRARIES AND INCLUDE FILES in the README file."
  1686.         exit 1
  1687.     fi
  1688. fi
  1689.  
  1690. if test "$vi_cv_tclinterp" = yes || test "$vi_cv_perlinterp" = yes; then
  1691.     LIBOBJS="api.o $LIBOBJS"
  1692. fi
  1693.  
  1694. echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  1695. ac_lib_var=`echo termlib | tr '.-/+' '___p'`
  1696. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1697.   echo $ac_n "(cached) $ac_c" 1>&6
  1698. else
  1699.   ac_save_LIBS="$LIBS"
  1700. LIBS="-ltermlib  $LIBS"
  1701. cat > conftest.$ac_ext <<EOF
  1702. #line 1657 "configure"
  1703. #include "confdefs.h"
  1704.  
  1705. int main() { return 0; }
  1706. int t() {
  1707. tgetent()
  1708. ; return 0; }
  1709. EOF
  1710. if eval $ac_link; then
  1711.   rm -rf conftest*
  1712.   eval "ac_cv_lib_$ac_lib_var=yes"
  1713. else
  1714.   rm -rf conftest*
  1715.   eval "ac_cv_lib_$ac_lib_var=no"
  1716. fi
  1717. rm -f conftest*
  1718. LIBS="$ac_save_LIBS"
  1719.  
  1720. fi
  1721. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1722.   echo "$ac_t""yes" 1>&6
  1723.   vi_cv_termlib=-ltermlib
  1724. else
  1725.   echo "$ac_t""no" 1>&6
  1726. vi_cv_termlib=no
  1727. fi
  1728.  
  1729. if test "$vi_cv_termlib" = no; then
  1730.     echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1731. ac_lib_var=`echo termcap | tr '.-/+' '___p'`
  1732. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1733.   echo $ac_n "(cached) $ac_c" 1>&6
  1734. else
  1735.   ac_save_LIBS="$LIBS"
  1736. LIBS="-ltermcap  $LIBS"
  1737. cat > conftest.$ac_ext <<EOF
  1738. #line 1693 "configure"
  1739. #include "confdefs.h"
  1740.  
  1741. int main() { return 0; }
  1742. int t() {
  1743. tgetent()
  1744. ; return 0; }
  1745. EOF
  1746. if eval $ac_link; then
  1747.   rm -rf conftest*
  1748.   eval "ac_cv_lib_$ac_lib_var=yes"
  1749. else
  1750.   rm -rf conftest*
  1751.   eval "ac_cv_lib_$ac_lib_var=no"
  1752. fi
  1753. rm -f conftest*
  1754. LIBS="$ac_save_LIBS"
  1755.  
  1756. fi
  1757. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1758.   echo "$ac_t""yes" 1>&6
  1759.   vi_cv_termlib=-ltermcap
  1760. else
  1761.   echo "$ac_t""no" 1>&6
  1762. vi_cv_termlib=no
  1763. fi
  1764.  
  1765. fi
  1766. if test "$vi_cv_termlib" != no; then
  1767.     LIBS="$vi_cv_termlib $LIBS"
  1768. fi
  1769.  
  1770. echo $ac_n "checking if --disable-curses option specified""... $ac_c" 1>&6
  1771. # Check whether --enable-curses or --disable-curses was given.
  1772. if test "${enable_curses+set}" = set; then
  1773.   enableval="$enable_curses"
  1774.   vi_cv_curses="other curses"
  1775. else
  1776.   vi_cv_curses="bundled curses"
  1777. fi
  1778.  
  1779. echo "$ac_t""$vi_cv_curses" 1>&6
  1780. case "$vi_cv_curses" in
  1781. "bundled curses")
  1782.     CPPFLAGS="-I\$(srcdir)/curses $CPPFLAGS"
  1783.     cobjs="\$(COBJS)";;
  1784. "other curses")
  1785.     LIBS="-lcurses $LIBS";;
  1786. esac
  1787.  
  1788. echo $ac_n "checking for sys/mman.h""... $ac_c" 1>&6
  1789. if eval "test \"`echo '$''{'vi_cv_include_sys_mman'+set}'`\" = set"; then
  1790.   echo $ac_n "(cached) $ac_c" 1>&6
  1791. else
  1792.   cat > conftest.$ac_ext <<EOF
  1793. #line 1748 "configure"
  1794. #include "confdefs.h"
  1795. #include <sys/mman.h>
  1796. EOF
  1797. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1798. ac_err=`grep -v '^ *+' conftest.out`
  1799. if test -z "$ac_err"; then
  1800.   rm -rf conftest*
  1801.   vi_cv_include_sys_mman=yes
  1802. else
  1803.   echo "$ac_err" >&5
  1804.   rm -rf conftest*
  1805.   vi_cv_include_sys_mman=no
  1806. fi
  1807. rm -f conftest*
  1808. fi
  1809.  
  1810. if test "$vi_cv_include_sys_mman" = yes; then
  1811.     cat >> confdefs.h <<\EOF
  1812. #define HAVE_SYS_MMAN_H 1
  1813. EOF
  1814.  
  1815. fi
  1816. echo "$ac_t""$vi_cv_include_sys_mman" 1>&6
  1817.  
  1818. echo $ac_n "checking for sys/select.h""... $ac_c" 1>&6
  1819. if eval "test \"`echo '$''{'vi_cv_include_sys_select'+set}'`\" = set"; then
  1820.   echo $ac_n "(cached) $ac_c" 1>&6
  1821. else
  1822.   cat > conftest.$ac_ext <<EOF
  1823. #line 1778 "configure"
  1824. #include "confdefs.h"
  1825. #include <sys/select.h>
  1826. EOF
  1827. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1828. ac_err=`grep -v '^ *+' conftest.out`
  1829. if test -z "$ac_err"; then
  1830.   rm -rf conftest*
  1831.   vi_cv_include_sys_select=yes
  1832. else
  1833.   echo "$ac_err" >&5
  1834.   rm -rf conftest*
  1835.   vi_cv_include_sys_select=no
  1836. fi
  1837. rm -f conftest*
  1838. fi
  1839.  
  1840. if test "$vi_cv_include_sys_select" = yes; then
  1841.     cat >> confdefs.h <<\EOF
  1842. #define HAVE_SYS_SELECT_H 1
  1843. EOF
  1844.  
  1845. fi
  1846. echo "$ac_t""$vi_cv_include_sys_select" 1>&6
  1847.  
  1848. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1849. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1850.   echo $ac_n "(cached) $ac_c" 1>&6
  1851. else
  1852.   cat > conftest.$ac_ext <<EOF
  1853. #line 1808 "configure"
  1854. #include "confdefs.h"
  1855. #include <stdlib.h>
  1856. #include <stdarg.h>
  1857. #include <string.h>
  1858. #include <float.h>
  1859. EOF
  1860. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1861. ac_err=`grep -v '^ *+' conftest.out`
  1862. if test -z "$ac_err"; then
  1863.   rm -rf conftest*
  1864.   ac_cv_header_stdc=yes
  1865. else
  1866.   echo "$ac_err" >&5
  1867.   rm -rf conftest*
  1868.   ac_cv_header_stdc=no
  1869. fi
  1870. rm -f conftest*
  1871.  
  1872. if test $ac_cv_header_stdc = yes; then
  1873.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1874. cat > conftest.$ac_ext <<EOF
  1875. #line 1830 "configure"
  1876. #include "confdefs.h"
  1877. #include <string.h>
  1878. EOF
  1879. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1880.   egrep "memchr" >/dev/null 2>&1; then
  1881.   :
  1882. else
  1883.   rm -rf conftest*
  1884.   ac_cv_header_stdc=no
  1885. fi
  1886. rm -f conftest*
  1887.  
  1888. fi
  1889.  
  1890. if test $ac_cv_header_stdc = yes; then
  1891.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1892. cat > conftest.$ac_ext <<EOF
  1893. #line 1848 "configure"
  1894. #include "confdefs.h"
  1895. #include <stdlib.h>
  1896. EOF
  1897. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1898.   egrep "free" >/dev/null 2>&1; then
  1899.   :
  1900. else
  1901.   rm -rf conftest*
  1902.   ac_cv_header_stdc=no
  1903. fi
  1904. rm -f conftest*
  1905.  
  1906. fi
  1907.  
  1908. if test $ac_cv_header_stdc = yes; then
  1909.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1910. if test "$cross_compiling" = yes; then
  1911.   :
  1912. else
  1913. cat > conftest.$ac_ext <<EOF
  1914. #line 1869 "configure"
  1915. #include "confdefs.h"
  1916. #include <ctype.h>
  1917. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1918. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1919. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1920. int main () { int i; for (i = 0; i < 256; i++)
  1921. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1922. exit (0); }
  1923.  
  1924. EOF
  1925. eval $ac_link
  1926. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  1927.   :
  1928. else
  1929.   ac_cv_header_stdc=no
  1930. fi
  1931. fi
  1932. rm -fr conftest*
  1933. fi
  1934. fi
  1935.  
  1936. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1937. if test $ac_cv_header_stdc = yes; then
  1938.   cat >> confdefs.h <<\EOF
  1939. #define STDC_HEADERS 1
  1940. EOF
  1941.  
  1942. fi
  1943.  
  1944. echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
  1945. if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
  1946.   echo $ac_n "(cached) $ac_c" 1>&6
  1947. else
  1948.   cat > conftest.$ac_ext <<EOF
  1949. #line 1904 "configure"
  1950. #include "confdefs.h"
  1951. #include <sys/types.h>
  1952. #if STDC_HEADERS
  1953. #include <stdlib.h>
  1954. #endif
  1955. EOF
  1956. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1957.   egrep "ssize_t" >/dev/null 2>&1; then
  1958.   rm -rf conftest*
  1959.   ac_cv_type_ssize_t=yes
  1960. else
  1961.   rm -rf conftest*
  1962.   ac_cv_type_ssize_t=no
  1963. fi
  1964. rm -f conftest*
  1965.  
  1966. fi
  1967. echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
  1968. if test $ac_cv_type_ssize_t = no; then
  1969.   cat >> confdefs.h <<\EOF
  1970. #define ssize_t int
  1971. EOF
  1972.  
  1973. fi
  1974.  
  1975. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1976. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1977.   echo $ac_n "(cached) $ac_c" 1>&6
  1978. else
  1979.   ac_cv_c_bigendian=unknown
  1980. # See if sys/param.h defines the BYTE_ORDER macro.
  1981. cat > conftest.$ac_ext <<EOF
  1982. #line 1937 "configure"
  1983. #include "confdefs.h"
  1984. #include <sys/types.h>
  1985. #include <sys/param.h>
  1986. int main() { return 0; }
  1987. int t() {
  1988.  
  1989. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1990.  bogus endian macros
  1991. #endif
  1992. ; return 0; }
  1993. EOF
  1994. if eval $ac_compile; then
  1995.   rm -rf conftest*
  1996.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1997. cat > conftest.$ac_ext <<EOF
  1998. #line 1953 "configure"
  1999. #include "confdefs.h"
  2000. #include <sys/types.h>
  2001. #include <sys/param.h>
  2002. int main() { return 0; }
  2003. int t() {
  2004.  
  2005. #if BYTE_ORDER != BIG_ENDIAN
  2006.  not big endian
  2007. #endif
  2008. ; return 0; }
  2009. EOF
  2010. if eval $ac_compile; then
  2011.   rm -rf conftest*
  2012.   ac_cv_c_bigendian=yes
  2013. else
  2014.   rm -rf conftest*
  2015.   ac_cv_c_bigendian=no
  2016. fi
  2017. rm -f conftest*
  2018.  
  2019. fi
  2020. rm -f conftest*
  2021.  
  2022. if test $ac_cv_c_bigendian = unknown; then
  2023. if test "$cross_compiling" = yes; then
  2024.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2025. else
  2026. cat > conftest.$ac_ext <<EOF
  2027. #line 1982 "configure"
  2028. #include "confdefs.h"
  2029. main () {
  2030.   /* Are we little or big endian?  From Harbison&Steele.  */
  2031.   union
  2032.   {
  2033.     long l;
  2034.     char c[sizeof (long)];
  2035.   } u;
  2036.   u.l = 1;
  2037.   exit (u.c[sizeof (long) - 1] == 1);
  2038. }
  2039. EOF
  2040. eval $ac_link
  2041. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  2042.   ac_cv_c_bigendian=no
  2043. else
  2044.   ac_cv_c_bigendian=yes
  2045. fi
  2046. fi
  2047. rm -fr conftest*
  2048. fi
  2049. fi
  2050.  
  2051. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  2052. if test $ac_cv_c_bigendian = yes; then
  2053.   cat >> confdefs.h <<\EOF
  2054. #define WORDS_BIGENDIAN 1
  2055. EOF
  2056.  
  2057. fi
  2058.  
  2059. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2060. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2061.   echo $ac_n "(cached) $ac_c" 1>&6
  2062. else
  2063.   cat > conftest.$ac_ext <<EOF
  2064. #line 2019 "configure"
  2065. #include "confdefs.h"
  2066.  
  2067. int main() { return 0; }
  2068. int t() {
  2069.  
  2070. /* Ultrix mips cc rejects this.  */
  2071. typedef int charset[2]; const charset x;
  2072. /* SunOS 4.1.1 cc rejects this.  */
  2073. char const *const *ccp;
  2074. char **p;
  2075. /* NEC SVR4.0.2 mips cc rejects this.  */
  2076. struct point {int x, y;};
  2077. static struct point const zero = {0,0};
  2078. /* AIX XL C 1.02.0.0 rejects this.
  2079.    It does not let you subtract one const X* pointer from another in an arm
  2080.    of an if-expression whose if-part is not a constant expression */
  2081. const char *g = "string";
  2082. ccp = &g + (g ? g-g : 0);
  2083. /* HPUX 7.0 cc rejects these. */
  2084. ++ccp;
  2085. p = (char**) ccp;
  2086. ccp = (char const *const *) p;
  2087. { /* SCO 3.2v4 cc rejects this.  */
  2088.   char *t;
  2089.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2090.  
  2091.   *t++ = 0;
  2092. }
  2093. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2094.   int x[] = {25, 17};
  2095.   const int *foo = &x[0];
  2096.   ++foo;
  2097. }
  2098. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2099.   typedef const int *iptr;
  2100.   iptr p = 0;
  2101.   ++p;
  2102. }
  2103. { /* AIX XL C 1.02.0.0 rejects this saying
  2104.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2105.   struct s { int j; const int *ap[3]; };
  2106.   struct s *b; b->j = 5;
  2107. }
  2108. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2109.   const int foo = 10;
  2110. }
  2111.  
  2112. ; return 0; }
  2113. EOF
  2114. if eval $ac_compile; then
  2115.   rm -rf conftest*
  2116.   ac_cv_c_const=yes
  2117. else
  2118.   rm -rf conftest*
  2119.   ac_cv_c_const=no
  2120. fi
  2121. rm -f conftest*
  2122.  
  2123. fi
  2124.  
  2125. echo "$ac_t""$ac_cv_c_const" 1>&6
  2126. if test $ac_cv_c_const = no; then
  2127.   cat >> confdefs.h <<\EOF
  2128. #define const 
  2129. EOF
  2130.  
  2131. fi
  2132.  
  2133. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  2134. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  2135.   echo $ac_n "(cached) $ac_c" 1>&6
  2136. else
  2137.   cat > conftest.$ac_ext <<EOF
  2138. #line 2093 "configure"
  2139. #include "confdefs.h"
  2140. #include <sys/types.h>
  2141. #include <sys/stat.h>
  2142. int main() { return 0; }
  2143. int t() {
  2144. struct stat s; s.st_blksize;
  2145. ; return 0; }
  2146. EOF
  2147. if eval $ac_compile; then
  2148.   rm -rf conftest*
  2149.   ac_cv_struct_st_blksize=yes
  2150. else
  2151.   rm -rf conftest*
  2152.   ac_cv_struct_st_blksize=no
  2153. fi
  2154. rm -f conftest*
  2155.  
  2156. fi
  2157.  
  2158. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  2159. if test $ac_cv_struct_st_blksize = yes; then
  2160.   cat >> confdefs.h <<\EOF
  2161. #define HAVE_ST_BLKSIZE 1
  2162. EOF
  2163.  
  2164. fi
  2165.  
  2166. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  2167. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  2168.   echo $ac_n "(cached) $ac_c" 1>&6
  2169. else
  2170.   cat > conftest.$ac_ext <<EOF
  2171. #line 2126 "configure"
  2172. #include "confdefs.h"
  2173. #include <sys/types.h>
  2174. #if STDC_HEADERS
  2175. #include <stdlib.h>
  2176. #endif
  2177. EOF
  2178. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2179.   egrep "mode_t" >/dev/null 2>&1; then
  2180.   rm -rf conftest*
  2181.   ac_cv_type_mode_t=yes
  2182. else
  2183.   rm -rf conftest*
  2184.   ac_cv_type_mode_t=no
  2185. fi
  2186. rm -f conftest*
  2187.  
  2188. fi
  2189. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  2190. if test $ac_cv_type_mode_t = no; then
  2191.   cat >> confdefs.h <<\EOF
  2192. #define mode_t int
  2193. EOF
  2194. fi
  2195. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2196. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  2197.   echo $ac_n "(cached) $ac_c" 1>&6
  2198. else
  2199.   cat > conftest.$ac_ext <<EOF
  2200. #line 2157 "configure"
  2201. #include "confdefs.h"
  2202. #include <sys/types.h>
  2203. #if STDC_HEADERS
  2204. #include <stdlib.h>
  2205. #endif
  2206. EOF
  2207. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2208.   egrep "off_t" >/dev/null 2>&1; then
  2209.   rm -rf conftest*
  2210.   ac_cv_type_off_t=yes
  2211. else
  2212.   rm -rf conftest*
  2213.   ac_cv_type_off_t=no
  2214. fi
  2215. rm -f conftest*
  2216. fi
  2217. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2218. if test $ac_cv_type_off_t = no; then
  2219.   cat >> confdefs.h <<\EOF
  2220. #define off_t long
  2221. EOF
  2222. fi
  2223. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2224. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2225.   echo $ac_n "(cached) $ac_c" 1>&6
  2226. else
  2227.   cat > conftest.$ac_ext <<EOF
  2228. #line 2188 "configure"
  2229. #include "confdefs.h"
  2230. #include <sys/types.h>
  2231. #if STDC_HEADERS
  2232. #include <stdlib.h>
  2233. #endif
  2234. EOF
  2235. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2236.   egrep "pid_t" >/dev/null 2>&1; then
  2237.   rm -rf conftest*
  2238.   ac_cv_type_pid_t=yes
  2239. else
  2240.   rm -rf conftest*
  2241.   ac_cv_type_pid_t=no
  2242. fi
  2243. rm -f conftest*
  2244. fi
  2245. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2246. if test $ac_cv_type_pid_t = no; then
  2247.   cat >> confdefs.h <<\EOF
  2248. #define pid_t int
  2249. EOF
  2250. fi
  2251. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2252. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2253.   echo $ac_n "(cached) $ac_c" 1>&6
  2254. else
  2255.   cat > conftest.$ac_ext <<EOF
  2256. #line 2219 "configure"
  2257. #include "confdefs.h"
  2258. #include <sys/types.h>
  2259. #if STDC_HEADERS
  2260. #include <stdlib.h>
  2261. #endif
  2262. EOF
  2263. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2264.   egrep "size_t" >/dev/null 2>&1; then
  2265.   rm -rf conftest*
  2266.   ac_cv_type_size_t=yes
  2267. else
  2268.   rm -rf conftest*
  2269.   ac_cv_type_size_t=no
  2270. fi
  2271. rm -f conftest*
  2272. fi
  2273. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2274. if test $ac_cv_type_size_t = no; then
  2275.   cat >> confdefs.h <<\EOF
  2276. #define size_t unsigned
  2277. EOF
  2278. fi
  2279. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2280. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2281.   echo $ac_n "(cached) $ac_c" 1>&6
  2282. else
  2283.   cat > conftest.$ac_ext <<EOF
  2284. #line 2250 "configure"
  2285. #include "confdefs.h"
  2286. #include <sys/types.h>
  2287. #include <time.h>
  2288. int main() { return 0; }
  2289. int t() {
  2290. struct tm *tp; tp->tm_sec;
  2291. ; return 0; }
  2292. EOF
  2293. if eval $ac_compile; then
  2294.   rm -rf conftest*
  2295.   ac_cv_struct_tm=time.h
  2296. else
  2297.   rm -rf conftest*
  2298.   ac_cv_struct_tm=sys/time.h
  2299. fi
  2300. rm -f conftest*
  2301. fi
  2302. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2303. if test $ac_cv_struct_tm = sys/time.h; then
  2304.   cat >> confdefs.h <<\EOF
  2305. #define TM_IN_SYS_TIME 1
  2306. EOF
  2307. fi
  2308.  
  2309.   for ac_func in bsearch gethostname getopt memchr memcpy memmove memset
  2310. do
  2311. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2312. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2313.   echo $ac_n "(cached) $ac_c" 1>&6
  2314. else
  2315.   cat > conftest.$ac_ext <<EOF
  2316. #line 2286 "configure"
  2317. #include "confdefs.h"
  2318. /* System header to define __stub macros and hopefully few prototypes,
  2319.     which can conflict with char $ac_func(); below.  */
  2320. #include <assert.h>
  2321. /* Override any gcc2 internal prototype to avoid an error.  */
  2322. char $ac_func();
  2323. int main() { return 0; }
  2324. int t() {
  2325. /* The GNU C library defines this for functions which it implements
  2326.     to always fail with ENOSYS.  Some functions are actually named
  2327.     something starting with __ and the normal name is an alias.  */
  2328. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2329. choke me
  2330. #else
  2331. $ac_func();
  2332. #endif
  2333. ; return 0; }
  2334. EOF
  2335. if eval $ac_link; then
  2336.   rm -rf conftest*
  2337.   eval "ac_cv_func_$ac_func=yes"
  2338. else
  2339.   rm -rf conftest*
  2340.   eval "ac_cv_func_$ac_func=no"
  2341. fi
  2342. rm -f conftest*
  2343. fi
  2344. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2345.   echo "$ac_t""yes" 1>&6
  2346.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2347.   cat >> confdefs.h <<EOF
  2348. #define $ac_tr_func 1
  2349. EOF
  2350.  
  2351. else
  2352.   echo "$ac_t""no" 1>&6
  2353. fi
  2354. done
  2355. for ac_func in bsearch gethostname getopt memchr memcpy memmove memset
  2356. do
  2357. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2358. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2359.   echo $ac_n "(cached) $ac_c" 1>&6
  2360. else
  2361.   cat > conftest.$ac_ext <<EOF
  2362. #line 2337 "configure"
  2363. #include "confdefs.h"
  2364. /* System header to define __stub macros and hopefully few prototypes,
  2365.     which can conflict with char $ac_func(); below.  */
  2366. #include <assert.h>
  2367. /* Override any gcc2 internal prototype to avoid an error.  */
  2368. char $ac_func();
  2369. int main() { return 0; }
  2370. int t() {
  2371. /* The GNU C library defines this for functions which it implements
  2372.     to always fail with ENOSYS.  Some functions are actually named
  2373.     something starting with __ and the normal name is an alias.  */
  2374. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2375. choke me
  2376. #else
  2377. $ac_func();
  2378. #endif
  2379. ; return 0; }
  2380. EOF
  2381. if eval $ac_link; then
  2382.   rm -rf conftest*
  2383.   eval "ac_cv_func_$ac_func=yes"
  2384. else
  2385.   rm -rf conftest*
  2386.   eval "ac_cv_func_$ac_func=no"
  2387. fi
  2388. rm -f conftest*
  2389. fi
  2390. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2391.   echo "$ac_t""yes" 1>&6
  2392.   :
  2393. else
  2394.   echo "$ac_t""no" 1>&6
  2395. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2396. fi
  2397. done
  2398.   for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol
  2399. do
  2400. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2401. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2402.   echo $ac_n "(cached) $ac_c" 1>&6
  2403. else
  2404.   cat > conftest.$ac_ext <<EOF
  2405. #line 2386 "configure"
  2406. #include "confdefs.h"
  2407. /* System header to define __stub macros and hopefully few prototypes,
  2408.     which can conflict with char $ac_func(); below.  */
  2409. #include <assert.h>
  2410. /* Override any gcc2 internal prototype to avoid an error.  */
  2411. char $ac_func();
  2412. int main() { return 0; }
  2413. int t() {
  2414. /* The GNU C library defines this for functions which it implements
  2415.     to always fail with ENOSYS.  Some functions are actually named
  2416.     something starting with __ and the normal name is an alias.  */
  2417. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2418. choke me
  2419. #else
  2420. $ac_func();
  2421. #endif
  2422. ; return 0; }
  2423. EOF
  2424. if eval $ac_link; then
  2425.   rm -rf conftest*
  2426.   eval "ac_cv_func_$ac_func=yes"
  2427. else
  2428.   rm -rf conftest*
  2429.   eval "ac_cv_func_$ac_func=no"
  2430. fi
  2431. rm -f conftest*
  2432. fi
  2433. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2434.   echo "$ac_t""yes" 1>&6
  2435.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2436.   cat >> confdefs.h <<EOF
  2437. #define $ac_tr_func 1
  2438. EOF
  2439.  
  2440. else
  2441.   echo "$ac_t""no" 1>&6
  2442. fi
  2443. done
  2444. for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol
  2445. do
  2446. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2447. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2448.   echo $ac_n "(cached) $ac_c" 1>&6
  2449. else
  2450.   cat > conftest.$ac_ext <<EOF
  2451. #line 2437 "configure"
  2452. #include "confdefs.h"
  2453. /* System header to define __stub macros and hopefully few prototypes,
  2454.     which can conflict with char $ac_func(); below.  */
  2455. #include <assert.h>
  2456. /* Override any gcc2 internal prototype to avoid an error.  */
  2457. char $ac_func();
  2458. int main() { return 0; }
  2459. int t() {
  2460. /* The GNU C library defines this for functions which it implements
  2461.     to always fail with ENOSYS.  Some functions are actually named
  2462.     something starting with __ and the normal name is an alias.  */
  2463. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2464. choke me
  2465. #else
  2466. $ac_func();
  2467. #endif
  2468. ; return 0; }
  2469. EOF
  2470. if eval $ac_link; then
  2471.   rm -rf conftest*
  2472.   eval "ac_cv_func_$ac_func=yes"
  2473. else
  2474.   rm -rf conftest*
  2475.   eval "ac_cv_func_$ac_func=no"
  2476. fi
  2477. rm -f conftest*
  2478. fi
  2479. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2480.   echo "$ac_t""yes" 1>&6
  2481.   :
  2482. else
  2483.   echo "$ac_t""no" 1>&6
  2484. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2485. fi
  2486. done
  2487.   for ac_func in strtoul vsnprintf
  2488. do
  2489. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2490. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2491.   echo $ac_n "(cached) $ac_c" 1>&6
  2492. else
  2493.   cat > conftest.$ac_ext <<EOF
  2494. #line 2486 "configure"
  2495. #include "confdefs.h"
  2496. /* System header to define __stub macros and hopefully few prototypes,
  2497.     which can conflict with char $ac_func(); below.  */
  2498. #include <assert.h>
  2499. /* Override any gcc2 internal prototype to avoid an error.  */
  2500. char $ac_func();
  2501. int main() { return 0; }
  2502. int t() {
  2503. /* The GNU C library defines this for functions which it implements
  2504.     to always fail with ENOSYS.  Some functions are actually named
  2505.     something starting with __ and the normal name is an alias.  */
  2506. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2507. choke me
  2508. #else
  2509. $ac_func();
  2510. #endif
  2511. ; return 0; }
  2512. EOF
  2513. if eval $ac_link; then
  2514.   rm -rf conftest*
  2515.   eval "ac_cv_func_$ac_func=yes"
  2516. else
  2517.   rm -rf conftest*
  2518.   eval "ac_cv_func_$ac_func=no"
  2519. fi
  2520. rm -f conftest*
  2521. fi
  2522. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2523.   echo "$ac_t""yes" 1>&6
  2524.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2525.   cat >> confdefs.h <<EOF
  2526. #define $ac_tr_func 1
  2527. EOF
  2528.  
  2529. else
  2530.   echo "$ac_t""no" 1>&6
  2531. fi
  2532. done
  2533. for ac_func in strtoul vsnprintf
  2534. do
  2535. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2536. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2537.   echo $ac_n "(cached) $ac_c" 1>&6
  2538. else
  2539.   cat > conftest.$ac_ext <<EOF
  2540. #line 2537 "configure"
  2541. #include "confdefs.h"
  2542. /* System header to define __stub macros and hopefully few prototypes,
  2543.     which can conflict with char $ac_func(); below.  */
  2544. #include <assert.h>
  2545. /* Override any gcc2 internal prototype to avoid an error.  */
  2546. char $ac_func();
  2547. int main() { return 0; }
  2548. int t() {
  2549. /* The GNU C library defines this for functions which it implements
  2550.     to always fail with ENOSYS.  Some functions are actually named
  2551.     something starting with __ and the normal name is an alias.  */
  2552. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2553. choke me
  2554. #else
  2555. $ac_func();
  2556. #endif
  2557. ; return 0; }
  2558. EOF
  2559. if eval $ac_link; then
  2560.   rm -rf conftest*
  2561.   eval "ac_cv_func_$ac_func=yes"
  2562. else
  2563.   rm -rf conftest*
  2564.   eval "ac_cv_func_$ac_func=no"
  2565. fi
  2566. rm -f conftest*
  2567. fi
  2568. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2569.   echo "$ac_t""yes" 1>&6
  2570.   :
  2571. else
  2572.   echo "$ac_t""no" 1>&6
  2573. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2574. fi
  2575. done
  2576.  
  2577. for ac_func in select
  2578. do
  2579. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2580. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2581.   echo $ac_n "(cached) $ac_c" 1>&6
  2582. else
  2583.   cat > conftest.$ac_ext <<EOF
  2584. #line 2587 "configure"
  2585. #include "confdefs.h"
  2586. /* System header to define __stub macros and hopefully few prototypes,
  2587.     which can conflict with char $ac_func(); below.  */
  2588. #include <assert.h>
  2589. /* Override any gcc2 internal prototype to avoid an error.  */
  2590. char $ac_func();
  2591. int main() { return 0; }
  2592. int t() {
  2593. /* The GNU C library defines this for functions which it implements
  2594.     to always fail with ENOSYS.  Some functions are actually named
  2595.     something starting with __ and the normal name is an alias.  */
  2596. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2597. choke me
  2598. #else
  2599. $ac_func();
  2600. #endif
  2601. ; return 0; }
  2602. EOF
  2603. if eval $ac_link; then
  2604.   rm -rf conftest*
  2605.   eval "ac_cv_func_$ac_func=yes"
  2606. else
  2607.   rm -rf conftest*
  2608.   eval "ac_cv_func_$ac_func=no"
  2609. fi
  2610. rm -f conftest*
  2611. fi
  2612. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2613.   echo "$ac_t""yes" 1>&6
  2614.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2615.   cat >> confdefs.h <<EOF
  2616. #define $ac_tr_func 1
  2617. EOF
  2618.  
  2619. else
  2620.   echo "$ac_t""no" 1>&6
  2621. fi
  2622. done
  2623. for ac_func in setenv
  2624. do
  2625. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2626. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2627.   echo $ac_n "(cached) $ac_c" 1>&6
  2628. else
  2629.   cat > conftest.$ac_ext <<EOF
  2630. #line 2638 "configure"
  2631. #include "confdefs.h"
  2632. /* System header to define __stub macros and hopefully few prototypes,
  2633.     which can conflict with char $ac_func(); below.  */
  2634. #include <assert.h>
  2635. /* Override any gcc2 internal prototype to avoid an error.  */
  2636. char $ac_func();
  2637. int main() { return 0; }
  2638. int t() {
  2639. /* The GNU C library defines this for functions which it implements
  2640.     to always fail with ENOSYS.  Some functions are actually named
  2641.     something starting with __ and the normal name is an alias.  */
  2642. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2643. choke me
  2644. #else
  2645. $ac_func();
  2646. #endif
  2647. ; return 0; }
  2648. EOF
  2649. if eval $ac_link; then
  2650.   rm -rf conftest*
  2651.   eval "ac_cv_func_$ac_func=yes"
  2652. else
  2653.   rm -rf conftest*
  2654.   eval "ac_cv_func_$ac_func=no"
  2655. fi
  2656. rm -f conftest*
  2657. fi
  2658. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2659.   echo "$ac_t""yes" 1>&6
  2660.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2661.   cat >> confdefs.h <<EOF
  2662. #define $ac_tr_func 1
  2663. EOF
  2664.  need_env=no
  2665. else
  2666.   echo "$ac_t""no" 1>&6
  2667. need_env=yes
  2668. fi
  2669. done
  2670. for ac_func in strsep
  2671. do
  2672. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2673. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2674.   echo $ac_n "(cached) $ac_c" 1>&6
  2675. else
  2676.   cat > conftest.$ac_ext <<EOF
  2677. #line 2690 "configure"
  2678. #include "confdefs.h"
  2679. /* System header to define __stub macros and hopefully few prototypes,
  2680.     which can conflict with char $ac_func(); below.  */
  2681. #include <assert.h>
  2682. /* Override any gcc2 internal prototype to avoid an error.  */
  2683. char $ac_func();
  2684. int main() { return 0; }
  2685. int t() {
  2686. /* The GNU C library defines this for functions which it implements
  2687.     to always fail with ENOSYS.  Some functions are actually named
  2688.     something starting with __ and the normal name is an alias.  */
  2689. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2690. choke me
  2691. #else
  2692. $ac_func();
  2693. #endif
  2694. ; return 0; }
  2695. EOF
  2696. if eval $ac_link; then
  2697.   rm -rf conftest*
  2698.   eval "ac_cv_func_$ac_func=yes"
  2699. else
  2700.   rm -rf conftest*
  2701.   eval "ac_cv_func_$ac_func=no"
  2702. fi
  2703. rm -f conftest*
  2704. fi
  2705. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2706.   echo "$ac_t""yes" 1>&6
  2707.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2708.   cat >> confdefs.h <<EOF
  2709. #define $ac_tr_func 1
  2710. EOF
  2711.  need_strsep=no
  2712. else
  2713.   echo "$ac_t""no" 1>&6
  2714. need_strsep=yes
  2715. fi
  2716. done
  2717. for ac_func in unsetenv
  2718. do
  2719. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2720. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2721.   echo $ac_n "(cached) $ac_c" 1>&6
  2722. else
  2723.   cat > conftest.$ac_ext <<EOF
  2724. #line 2742 "configure"
  2725. #include "confdefs.h"
  2726. /* System header to define __stub macros and hopefully few prototypes,
  2727.     which can conflict with char $ac_func(); below.  */
  2728. #include <assert.h>
  2729. /* Override any gcc2 internal prototype to avoid an error.  */
  2730. char $ac_func();
  2731. int main() { return 0; }
  2732. int t() {
  2733. /* The GNU C library defines this for functions which it implements
  2734.     to always fail with ENOSYS.  Some functions are actually named
  2735.     something starting with __ and the normal name is an alias.  */
  2736. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2737. choke me
  2738. #else
  2739. $ac_func();
  2740. #endif
  2741. ; return 0; }
  2742. EOF
  2743. if eval $ac_link; then
  2744.   rm -rf conftest*
  2745.   eval "ac_cv_func_$ac_func=yes"
  2746. else
  2747.   rm -rf conftest*
  2748.   eval "ac_cv_func_$ac_func=no"
  2749. fi
  2750. rm -f conftest*
  2751. fi
  2752. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2753.   echo "$ac_t""yes" 1>&6
  2754.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2755.   cat >> confdefs.h <<EOF
  2756. #define $ac_tr_func 1
  2757. EOF
  2758.  
  2759. else
  2760.   echo "$ac_t""no" 1>&6
  2761. need_env=yes
  2762. fi
  2763. done
  2764.  
  2765. for ac_func in valloc getpagesize
  2766. do
  2767. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2768. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2769.   echo $ac_n "(cached) $ac_c" 1>&6
  2770. else
  2771.   cat > conftest.$ac_ext <<EOF
  2772. #line 2795 "configure"
  2773. #include "confdefs.h"
  2774. /* System header to define __stub macros and hopefully few prototypes,
  2775.     which can conflict with char $ac_func(); below.  */
  2776. #include <assert.h>
  2777. /* Override any gcc2 internal prototype to avoid an error.  */
  2778. char $ac_func();
  2779. int main() { return 0; }
  2780. int t() {
  2781. /* The GNU C library defines this for functions which it implements
  2782.     to always fail with ENOSYS.  Some functions are actually named
  2783.     something starting with __ and the normal name is an alias.  */
  2784. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2785. choke me
  2786. #else
  2787. $ac_func();
  2788. #endif
  2789. ; return 0; }
  2790. EOF
  2791. if eval $ac_link; then
  2792.   rm -rf conftest*
  2793.   eval "ac_cv_func_$ac_func=yes"
  2794. else
  2795.   rm -rf conftest*
  2796.   eval "ac_cv_func_$ac_func=no"
  2797. fi
  2798. rm -f conftest*
  2799. fi
  2800. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2801.   echo "$ac_t""yes" 1>&6
  2802.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2803.   cat >> confdefs.h <<EOF
  2804. #define $ac_tr_func 1
  2805. EOF
  2806.  
  2807. else
  2808.   echo "$ac_t""no" 1>&6
  2809. fi
  2810. done
  2811. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  2812. if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
  2813.   echo $ac_n "(cached) $ac_c" 1>&6
  2814. else
  2815.   if test "$cross_compiling" = yes; then
  2816.   ac_cv_func_mmap=no
  2817. else
  2818. cat > conftest.$ac_ext <<EOF
  2819. #line 2847 "configure"
  2820. #include "confdefs.h"
  2821. /* Thanks to Mike Haertel and Jim Avera for this test. */
  2822. #include <sys/types.h>
  2823. #include <fcntl.h>
  2824. #include <sys/mman.h>
  2825. #ifndef HAVE_GETPAGESIZE
  2826. # include <sys/param.h>
  2827. # ifdef EXEC_PAGESIZE
  2828. #  define getpagesize() EXEC_PAGESIZE
  2829. # else
  2830. #  ifdef NBPG
  2831. #   define getpagesize() NBPG * CLSIZE
  2832. #   ifndef CLSIZE
  2833. #    define CLSIZE 1
  2834. #   endif
  2835. #  else
  2836. #   ifdef NBPC
  2837. #    define getpagesize() NBPC
  2838. #   else
  2839. #    define getpagesize() PAGESIZE /* SVR4 */
  2840. #   endif
  2841. #  endif
  2842. # endif
  2843. #endif
  2844. #ifndef HAVE_VALLOC
  2845. # define valloc malloc
  2846. #endif
  2847. #ifdef __cplusplus
  2848. extern "C" { void *valloc(unsigned), *malloc(unsigned); }
  2849. #else
  2850. char *valloc(), *malloc();
  2851. #endif
  2852. int
  2853. main()
  2854. {
  2855.   char *buf1, *buf2, *buf3;
  2856.   int i = getpagesize(), j;
  2857.   int i2 = i * 2;
  2858.   int fd;
  2859.   buf1 = (char *)valloc(i2);
  2860.   buf2 = (char *)valloc(i);
  2861.   buf3 = (char *)malloc(i2);
  2862.   for (j = 0; j < i2; ++j)
  2863.     *(buf1 + j) = rand();
  2864.   fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
  2865.   write(fd, buf1, i2);
  2866.   mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
  2867.   for (j = 0; j < i; ++j)
  2868.     if (*(buf1 + j) != *(buf2 + j))
  2869.       exit(1);
  2870.   lseek(fd, (long)i, 0);
  2871.   read(fd, buf2, i); /* read into mapped memory -- file should not change */
  2872.   /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
  2873.   lseek(fd, (long)0, 0);
  2874.   read(fd, buf3, i2);
  2875.   for (j = 0; j < i2; ++j)
  2876.     if (*(buf1 + j) != *(buf3 + j))
  2877.       exit(1);
  2878.   exit(0);
  2879. }
  2880. EOF
  2881. eval $ac_link
  2882. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  2883.   ac_cv_func_mmap=yes
  2884. else
  2885.   ac_cv_func_mmap=no
  2886. fi
  2887. fi
  2888. rm -fr conftest*
  2889. fi
  2890. echo "$ac_t""$ac_cv_func_mmap" 1>&6
  2891. if test $ac_cv_func_mmap = yes; then
  2892.   cat >> confdefs.h <<\EOF
  2893. #define HAVE_MMAP 1
  2894. EOF
  2895. fi
  2896. ac_safe=`echo "vfork.h" | tr './\055' '___'`
  2897. echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
  2898. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2899.   echo $ac_n "(cached) $ac_c" 1>&6
  2900. else
  2901.   cat > conftest.$ac_ext <<EOF
  2902. #line 2940 "configure"
  2903. #include "confdefs.h"
  2904. #include <vfork.h>
  2905. EOF
  2906. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2907. ac_err=`grep -v '^ *+' conftest.out`
  2908. if test -z "$ac_err"; then
  2909.   rm -rf conftest*
  2910.   eval "ac_cv_header_$ac_safe=yes"
  2911. else
  2912.   echo "$ac_err" >&5
  2913.   rm -rf conftest*
  2914.   eval "ac_cv_header_$ac_safe=no"
  2915. fi
  2916. rm -f conftest*
  2917. fi
  2918. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2919.   echo "$ac_t""yes" 1>&6
  2920.   cat >> confdefs.h <<\EOF
  2921. #define HAVE_VFORK_H 1
  2922. EOF
  2923. else
  2924.   echo "$ac_t""no" 1>&6
  2925. fi
  2926. echo $ac_n "checking for working vfork""... $ac_c" 1>&6
  2927. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  2928.   echo $ac_n "(cached) $ac_c" 1>&6
  2929. else
  2930.   if test "$cross_compiling" = yes; then
  2931.   echo $ac_n "checking for vfork""... $ac_c" 1>&6
  2932. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  2933.   echo $ac_n "(cached) $ac_c" 1>&6
  2934. else
  2935.   cat > conftest.$ac_ext <<EOF
  2936. #line 2976 "configure"
  2937. #include "confdefs.h"
  2938. /* System header to define __stub macros and hopefully few prototypes,
  2939.     which can conflict with char vfork(); below.  */
  2940. #include <assert.h>
  2941. /* Override any gcc2 internal prototype to avoid an error.  */
  2942. char vfork();
  2943. int main() { return 0; }
  2944. int t() {
  2945. /* The GNU C library defines this for functions which it implements
  2946.     to always fail with ENOSYS.  Some functions are actually named
  2947.     something starting with __ and the normal name is an alias.  */
  2948. #if defined (__stub_vfork) || defined (__stub___vfork)
  2949. choke me
  2950. #else
  2951. vfork();
  2952. #endif
  2953. ; return 0; }
  2954. EOF
  2955. if eval $ac_link; then
  2956.   rm -rf conftest*
  2957.   eval "ac_cv_func_vfork=yes"
  2958. else
  2959.   rm -rf conftest*
  2960.   eval "ac_cv_func_vfork=no"
  2961. fi
  2962. rm -f conftest*
  2963. fi
  2964. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  2965.   echo "$ac_t""yes" 1>&6
  2966.   :
  2967. else
  2968.   echo "$ac_t""no" 1>&6
  2969. fi
  2970. else
  2971. cat > conftest.$ac_ext <<EOF
  2972. #line 3017 "configure"
  2973. #include "confdefs.h"
  2974. /* Thanks to Paul Eggert for this test.  */
  2975. #include <stdio.h>
  2976. #include <sys/types.h>
  2977. #include <sys/stat.h>
  2978. #ifdef HAVE_UNISTD_H
  2979. #include <unistd.h>
  2980. #endif
  2981. #ifdef HAVE_VFORK_H
  2982. #include <vfork.h>
  2983. #endif
  2984. /* On some sparc systems, changes by the child to local and incoming
  2985.    argument registers are propagated back to the parent.
  2986.    The compiler is told about this with #include <vfork.h>,
  2987.    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  2988.    Test for this by using a static variable whose address
  2989.    is put into a register that is clobbered by the vfork.  */
  2990. static
  2991. #ifdef __cplusplus
  2992. sparc_address_test (int arg)
  2993. #else
  2994. sparc_address_test (arg) int arg;
  2995. #endif
  2996. {
  2997.   static pid_t child;
  2998.   if (!child) {
  2999.     child = vfork ();
  3000.     if (child < 0)
  3001.       perror ("vfork");
  3002.     if (!child) {
  3003.       arg = getpid();
  3004.       write(-1, "", 0);
  3005.       _exit (arg);
  3006.     }
  3007.   }
  3008. }
  3009. main() {
  3010.   pid_t parent = getpid ();
  3011.   pid_t child;
  3012.   sparc_address_test ();
  3013.   child = vfork ();
  3014.   if (child == 0) {
  3015.     /* Here is another test for sparc vfork register problems.
  3016.        This test uses lots of local variables, at least
  3017.        as many local variables as main has allocated so far
  3018.        including compiler temporaries.  4 locals are enough for
  3019.        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
  3020.        A buggy compiler should reuse the register of parent
  3021.        for one of the local variables, since it will think that
  3022.        parent can't possibly be used any more in this routine.
  3023.        Assigning to the local variable will thus munge parent
  3024.        in the parent process.  */
  3025.     pid_t
  3026.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  3027.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  3028.     /* Convince the compiler that p..p7 are live; otherwise, it might
  3029.        use the same hardware register for all 8 local variables.  */
  3030.     if (p != p1 || p != p2 || p != p3 || p != p4
  3031.     || p != p5 || p != p6 || p != p7)
  3032.       _exit(1);
  3033.     /* On some systems (e.g. IRIX 3.3),
  3034.        vfork doesn't separate parent from child file descriptors.
  3035.        If the child closes a descriptor before it execs or exits,
  3036.        this munges the parent's descriptor as well.
  3037.        Test for this by closing stdout in the child.  */
  3038.     _exit(close(fileno(stdout)) != 0);
  3039.   } else {
  3040.     int status;
  3041.     struct stat st;
  3042.     while (wait(&status) != child)
  3043.       ;
  3044.     exit(
  3045.      /* Was there some problem with vforking?  */
  3046.      child < 0
  3047.      /* Did the child fail?  (This shouldn't happen.)  */
  3048.      || status
  3049.      /* Did the vfork/compiler bug occur?  */
  3050.      || parent != getpid()
  3051.      /* Did the file descriptor bug occur?  */
  3052.      || fstat(fileno(stdout), &st) != 0
  3053.      );
  3054.   }
  3055. }
  3056. EOF
  3057. eval $ac_link
  3058. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3059.   ac_cv_func_vfork=yes
  3060. else
  3061.   ac_cv_func_vfork=no
  3062. fi
  3063. fi
  3064. rm -fr conftest*
  3065. fi
  3066. echo "$ac_t""$ac_cv_func_vfork" 1>&6
  3067. if test $ac_cv_func_vfork = no; then
  3068.   cat >> confdefs.h <<\EOF
  3069. #define vfork fork
  3070. EOF
  3071. fi
  3072.  
  3073. if test "$need_env" = yes; then
  3074.     LIBOBJS="env.o $LIBOBJS"
  3075. fi
  3076. if test "$need_strsep" = yes; then
  3077.     LIBOBJS="strsep.o $LIBOBJS"
  3078. fi
  3079. echo $ac_n "checking for fcntl/flock""... $ac_c" 1>&6
  3080. if eval "test \"`echo '$''{'vi_cv_lock'+set}'`\" = set"; then
  3081.   echo $ac_n "(cached) $ac_c" 1>&6
  3082. else
  3083.       vi_cv_lock=none
  3084.     case "$host_os" in
  3085.     dgux*);;
  3086.     irix*);;
  3087.     *)
  3088.         cat > conftest.$ac_ext <<EOF
  3089. #line 3147 "configure"
  3090. #include "confdefs.h"
  3091. #include <fcntl.h>
  3092. int main() { return 0; }
  3093. int t() {
  3094. flock(0, 0);
  3095. ; return 0; }
  3096. EOF
  3097. if eval $ac_link; then
  3098.   rm -rf conftest*
  3099.   vi_cv_lock=flock
  3100. fi
  3101. rm -f conftest*
  3102. ;;
  3103.     esac
  3104.     if test "$vi_cv_lock" = none; then
  3105.         cat > conftest.$ac_ext <<EOF
  3106. #line 3164 "configure"
  3107. #include "confdefs.h"
  3108. #include <fcntl.h>
  3109. int main() { return 0; }
  3110. int t() {
  3111. fcntl(0, F_SETLK, 0);
  3112. ; return 0; }
  3113. EOF
  3114. if eval $ac_link; then
  3115.   rm -rf conftest*
  3116.   vi_cv_lock=fcntl
  3117. fi
  3118. rm -f conftest*
  3119.     fi
  3120. fi
  3121.  
  3122. if test "$vi_cv_lock" = flock; then
  3123.     cat >> confdefs.h <<\EOF
  3124. #define HAVE_LOCK_FLOCK 1
  3125. EOF
  3126. fi
  3127. if test "$vi_cv_lock" = fcntl; then
  3128.     cat >> confdefs.h <<\EOF
  3129. #define HAVE_LOCK_FCNTL 1
  3130. EOF
  3131. fi
  3132. echo "$ac_t""$vi_cv_lock" 1>&6
  3133. echo $ac_n "checking for ftruncate/chsize""... $ac_c" 1>&6
  3134. if eval "test \"`echo '$''{'vi_cv_ftruncate'+set}'`\" = set"; then
  3135.   echo $ac_n "(cached) $ac_c" 1>&6
  3136. else
  3137.   cat > conftest.$ac_ext <<EOF
  3138. #line 3201 "configure"
  3139. #include "confdefs.h"
  3140. #include <unistd.h>
  3141. int main() { return 0; }
  3142. int t() {
  3143. ftruncate(0, 0);
  3144. ; return 0; }
  3145. EOF
  3146. if eval $ac_link; then
  3147.   rm -rf conftest*
  3148.   vi_cv_ftruncate=ftruncate
  3149. else
  3150.   rm -rf conftest*
  3151.   cat > conftest.$ac_ext <<EOF
  3152. #line 3215 "configure"
  3153. #include "confdefs.h"
  3154. #include <unistd.h>
  3155. int main() { return 0; }
  3156. int t() {
  3157. chsize(0, 0);
  3158. ; return 0; }
  3159. EOF
  3160. if eval $ac_link; then
  3161.   rm -rf conftest*
  3162.   vi_cv_ftruncate=chsize
  3163. else
  3164.   rm -rf conftest*
  3165.   vi_cv_ftruncate=no
  3166. fi
  3167. rm -f conftest*
  3168. fi
  3169. rm -f conftest*
  3170. fi
  3171. if test "$vi_cv_ftruncate" = ftruncate; then
  3172.     cat >> confdefs.h <<\EOF
  3173. #define HAVE_FTRUNCATE_FTRUNCATE 1
  3174. EOF
  3175. fi
  3176. if test "$vi_cv_ftruncate" = chsize; then
  3177.     cat >> confdefs.h <<\EOF
  3178. #define HAVE_FTRUNCATE_CHSIZE 1
  3179. EOF
  3180. fi
  3181. if test "$vi_cv_ftruncate" = no; then
  3182.     echo
  3183.     echo "Fatal error: no file truncation system call."
  3184.     exit 1
  3185. fi
  3186. echo "$ac_t""$vi_cv_ftruncate" 1>&6
  3187. echo $ac_n "checking for tigetstr/tigetnum""... $ac_c" 1>&6
  3188. if eval "test \"`echo '$''{'vi_cv_have_curses_tigetstr'+set}'`\" = set"; then
  3189.   echo $ac_n "(cached) $ac_c" 1>&6
  3190. else
  3191.   cat > conftest.$ac_ext <<EOF
  3192. #line 3261 "configure"
  3193. #include "confdefs.h"
  3194. #include <curses.h>
  3195. int main() { return 0; }
  3196. int t() {
  3197. tigetstr(0);
  3198. ; return 0; }
  3199. EOF
  3200. if eval $ac_link; then
  3201.   rm -rf conftest*
  3202.   vi_cv_have_curses_tigetstr=yes
  3203. else
  3204.   rm -rf conftest*
  3205.   vi_cv_have_curses_tigetstr=no
  3206. fi
  3207. rm -f conftest*
  3208. fi
  3209. if test "$vi_cv_have_curses_tigetstr" = yes; then
  3210.     cat >> confdefs.h <<\EOF
  3211. #define HAVE_CURSES_TIGETSTR 1
  3212. EOF
  3213. fi
  3214. echo "$ac_t""$vi_cv_have_curses_tigetstr" 1>&6
  3215. if test "$vi_cv_curses" = "bundled curses"; then
  3216.     cat >> confdefs.h <<\EOF
  3217. #define HAVE_BSD_CURSES 1
  3218. EOF
  3219.     cat >> confdefs.h <<\EOF
  3220. #define HAVE_CURSES_ADDNSTR 1
  3221. EOF
  3222.     cat >> confdefs.h <<\EOF
  3223. #define HAVE_CURSES_IDLOK 1
  3224. EOF
  3225. else
  3226.         echo $ac_n "checking for addnstr""... $ac_c" 1>&6
  3227.     if eval "test \"`echo '$''{'vi_cv_have_curses_addnstr'+set}'`\" = set"; then
  3228.   echo $ac_n "(cached) $ac_c" 1>&6
  3229. else
  3230.       cat > conftest.$ac_ext <<EOF
  3231. #line 3307 "configure"
  3232. #include "confdefs.h"
  3233. #include <curses.h>
  3234. int main() { return 0; }
  3235. int t() {
  3236. addnstr(0, 0);
  3237. ; return 0; }
  3238. EOF
  3239. if eval $ac_link; then
  3240.   rm -rf conftest*
  3241.   vi_cv_have_curses_addnstr=yes
  3242. else
  3243.   rm -rf conftest*
  3244.   vi_cv_have_curses_addnstr=no
  3245. fi
  3246. rm -f conftest*
  3247. fi
  3248.     if test "$vi_cv_have_curses_addnstr" = yes; then
  3249.         cat >> confdefs.h <<\EOF
  3250. #define HAVE_CURSES_ADDNSTR 1
  3251. EOF
  3252.     fi
  3253.     echo "$ac_t""$vi_cv_have_curses_addnstr" 1>&6
  3254.         echo $ac_n "checking for beep""... $ac_c" 1>&6
  3255.     if eval "test \"`echo '$''{'vi_cv_have_curses_beep'+set}'`\" = set"; then
  3256.   echo $ac_n "(cached) $ac_c" 1>&6
  3257. else
  3258.       cat > conftest.$ac_ext <<EOF
  3259. #line 3339 "configure"
  3260. #include "confdefs.h"
  3261. #include <curses.h>
  3262. int main() { return 0; }
  3263. int t() {
  3264. beep();
  3265. ; return 0; }
  3266. EOF
  3267. if eval $ac_link; then
  3268.   rm -rf conftest*
  3269.   vi_cv_have_curses_beep=yes
  3270. else
  3271.   rm -rf conftest*
  3272.   vi_cv_have_curses_beep=no
  3273. fi
  3274. rm -f conftest*
  3275. fi
  3276.     if test "$vi_cv_have_curses_beep" = yes; then
  3277.         cat >> confdefs.h <<\EOF
  3278. #define HAVE_CURSES_BEEP 1
  3279. EOF
  3280.     fi
  3281.     echo "$ac_t""$vi_cv_have_curses_beep" 1>&6
  3282.         echo $ac_n "checking for flash""... $ac_c" 1>&6
  3283.     if eval "test \"`echo '$''{'vi_cv_have_curses_flash'+set}'`\" = set"; then
  3284.   echo $ac_n "(cached) $ac_c" 1>&6
  3285. else
  3286.       cat > conftest.$ac_ext <<EOF
  3287. #line 3371 "configure"
  3288. #include "confdefs.h"
  3289. #include <curses.h>
  3290. int main() { return 0; }
  3291. int t() {
  3292. flash();
  3293. ; return 0; }
  3294. EOF
  3295. if eval $ac_link; then
  3296.   rm -rf conftest*
  3297.   vi_cv_have_curses_flash=yes
  3298. else
  3299.   rm -rf conftest*
  3300.   vi_cv_have_curses_flash=no
  3301. fi
  3302. rm -f conftest*
  3303. fi
  3304.     if test "$vi_cv_have_curses_flash" = yes; then
  3305.         cat >> confdefs.h <<\EOF
  3306. #define HAVE_CURSES_FLASH 1
  3307. EOF
  3308.     fi
  3309.     echo "$ac_t""$vi_cv_have_curses_flash" 1>&6
  3310.         echo $ac_n "checking for idlok""... $ac_c" 1>&6
  3311.     if eval "test \"`echo '$''{'vi_cv_have_curses_idlok'+set}'`\" = set"; then
  3312.   echo $ac_n "(cached) $ac_c" 1>&6
  3313. else
  3314.       cat > conftest.$ac_ext <<EOF
  3315. #line 3403 "configure"
  3316. #include "confdefs.h"
  3317. #include <curses.h>
  3318. int main() { return 0; }
  3319. int t() {
  3320. idlok(0, 0);
  3321. ; return 0; }
  3322. EOF
  3323. if eval $ac_link; then
  3324.   rm -rf conftest*
  3325.   vi_cv_have_curses_idlok=yes
  3326. else
  3327.   rm -rf conftest*
  3328.   vi_cv_have_curses_idlok=no
  3329. fi
  3330. rm -f conftest*
  3331. fi
  3332.     if test "$vi_cv_have_curses_idlok" = yes; then
  3333.         cat >> confdefs.h <<\EOF
  3334. #define HAVE_CURSES_IDLOK 1
  3335. EOF
  3336.     fi
  3337.     echo "$ac_t""$vi_cv_have_curses_idlok" 1>&6
  3338.         echo $ac_n "checking for keypad""... $ac_c" 1>&6
  3339.     if eval "test \"`echo '$''{'vi_cv_have_curses_keypad'+set}'`\" = set"; then
  3340.   echo $ac_n "(cached) $ac_c" 1>&6
  3341. else
  3342.       cat > conftest.$ac_ext <<EOF
  3343. #line 3435 "configure"
  3344. #include "confdefs.h"
  3345. #include <curses.h>
  3346. int main() { return 0; }
  3347. int t() {
  3348. keypad(0, 0);
  3349. ; return 0; }
  3350. EOF
  3351. if eval $ac_link; then
  3352.   rm -rf conftest*
  3353.   vi_cv_have_curses_keypad=yes
  3354. else
  3355.   rm -rf conftest*
  3356.   vi_cv_have_curses_keypad=no
  3357. fi
  3358. rm -f conftest*
  3359. fi
  3360.     if test "$vi_cv_have_curses_keypad" = yes; then
  3361.         cat >> confdefs.h <<\EOF
  3362. #define HAVE_CURSES_KEYPAD 1
  3363. EOF
  3364.     fi
  3365.     echo "$ac_t""$vi_cv_have_curses_keypad" 1>&6
  3366.         echo $ac_n "checking for newterm""... $ac_c" 1>&6
  3367.     if eval "test \"`echo '$''{'vi_cv_have_curses_newterm'+set}'`\" = set"; then
  3368.   echo $ac_n "(cached) $ac_c" 1>&6
  3369. else
  3370.       cat > conftest.$ac_ext <<EOF
  3371. #line 3467 "configure"
  3372. #include "confdefs.h"
  3373. #include <curses.h>
  3374. int main() { return 0; }
  3375. int t() {
  3376. newterm(0, 0, 0);
  3377. ; return 0; }
  3378. EOF
  3379. if eval $ac_link; then
  3380.   rm -rf conftest*
  3381.   vi_cv_have_curses_newterm=yes
  3382. else
  3383.   rm -rf conftest*
  3384.   vi_cv_have_curses_newterm=no
  3385. fi
  3386. rm -f conftest*
  3387. fi
  3388.     if test "$vi_cv_have_curses_newterm" = yes; then
  3389.         cat >> confdefs.h <<\EOF
  3390. #define HAVE_CURSES_NEWTERM 1
  3391. EOF
  3392.     fi
  3393.     echo "$ac_t""$vi_cv_have_curses_newterm" 1>&6
  3394.     if test "$vi_cv_have_curses_newterm" = no; then
  3395.         cat >> confdefs.h <<\EOF
  3396. #define HAVE_BSD_CURSES 1
  3397. EOF
  3398.     fi
  3399. fi
  3400. echo $ac_n "checking for setupterm""... $ac_c" 1>&6
  3401. if eval "test \"`echo '$''{'vi_cv_have_curses_setupterm'+set}'`\" = set"; then
  3402.   echo $ac_n "(cached) $ac_c" 1>&6
  3403. else
  3404.   cat > conftest.$ac_ext <<EOF
  3405. #line 3507 "configure"
  3406. #include "confdefs.h"
  3407. #include <curses.h>
  3408. int main() { return 0; }
  3409. int t() {
  3410. setupterm(0, 0, 0);
  3411. ; return 0; }
  3412. EOF
  3413. if eval $ac_link; then
  3414.   rm -rf conftest*
  3415.   vi_cv_have_curses_setupterm=yes
  3416. else
  3417.   rm -rf conftest*
  3418.   vi_cv_have_curses_setupterm=no
  3419. fi
  3420. rm -f conftest*
  3421. fi
  3422. if test "$vi_cv_have_curses_setupterm" = yes; then
  3423.     cat >> confdefs.h <<\EOF
  3424. #define HAVE_CURSES_SETUPTERM 1
  3425. EOF
  3426. fi
  3427. echo "$ac_t""$vi_cv_have_curses_setupterm" 1>&6
  3428. echo $ac_n "checking for broken gettimeofday system call""... $ac_c" 1>&6
  3429. if eval "test \"`echo '$''{'vi_cv_gettimeofday'+set}'`\" = set"; then
  3430.   echo $ac_n "(cached) $ac_c" 1>&6
  3431. else
  3432.   cat > conftest.$ac_ext <<EOF
  3433. #line 3539 "configure"
  3434. #include "confdefs.h"
  3435. #include <sys/types.h>
  3436. #include <sys/time.h>
  3437. int main() { return 0; }
  3438. int t() {
  3439. gettimeofday(0, 0);
  3440. ; return 0; }
  3441. EOF
  3442. if eval $ac_link; then
  3443.   rm -rf conftest*
  3444.   vi_cv_gettimeofday=okay
  3445. else
  3446.   rm -rf conftest*
  3447.   vi_cv_gettimeofday=broken
  3448. fi
  3449. rm -f conftest*
  3450. fi
  3451. if test "$vi_cv_gettimeofday" = broken; then
  3452.     cat >> confdefs.h <<\EOF
  3453. #define HAVE_BROKEN_GETTIMEOFDAY 1
  3454. EOF
  3455. fi
  3456. echo "$ac_t""$vi_cv_gettimeofday" 1>&6
  3457. echo $ac_n "checking for System V pty calls""... $ac_c" 1>&6
  3458. if eval "test \"`echo '$''{'vi_cv_sys5_pty'+set}'`\" = set"; then
  3459.   echo $ac_n "(cached) $ac_c" 1>&6
  3460. else
  3461.   cat > conftest.$ac_ext <<EOF
  3462. #line 3572 "configure"
  3463. #include "confdefs.h"
  3464. int main() { return 0; }
  3465. int t() {
  3466. grantpt(0);
  3467. ; return 0; }
  3468. EOF
  3469. if eval $ac_link; then
  3470.   rm -rf conftest*
  3471.   vi_cv_sys5_pty=yes
  3472. else
  3473.   rm -rf conftest*
  3474.   vi_cv_sys5_pty=no
  3475. fi
  3476. rm -f conftest*
  3477. fi
  3478. if test "$vi_cv_sys5_pty" = yes; then
  3479.     cat >> confdefs.h <<\EOF
  3480. #define HAVE_SYS5_PTY 1
  3481. EOF
  3482. fi
  3483. echo "$ac_t""$vi_cv_sys5_pty" 1>&6
  3484. echo $ac_n "checking for revoke system call""... $ac_c" 1>&6
  3485. if eval "test \"`echo '$''{'vi_cv_revoke'+set}'`\" = set"; then
  3486.   echo $ac_n "(cached) $ac_c" 1>&6
  3487. else
  3488.   cat > conftest.$ac_ext <<EOF
  3489. #line 3604 "configure"
  3490. #include "confdefs.h"
  3491. int main() { return 0; }
  3492. int t() {
  3493. revoke("a");
  3494. ; return 0; }
  3495. EOF
  3496. if eval $ac_link; then
  3497.   rm -rf conftest*
  3498.   vi_cv_revoke=yes
  3499. else
  3500.   rm -rf conftest*
  3501.   vi_cv_revoke=no
  3502. fi
  3503. rm -f conftest*
  3504. fi
  3505. if test "$vi_cv_revoke" = yes; then
  3506.     cat >> confdefs.h <<\EOF
  3507. #define HAVE_REVOKE 1
  3508. EOF
  3509. fi
  3510. echo "$ac_t""$vi_cv_revoke" 1>&6
  3511. echo $ac_n "checking for int type sprintf return value""... $ac_c" 1>&6
  3512. if eval "test \"`echo '$''{'vi_cv_sprintf_count'+set}'`\" = set"; then
  3513.   echo $ac_n "(cached) $ac_c" 1>&6
  3514. else
  3515.   if test "$cross_compiling" = yes; then
  3516.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3517. else
  3518. cat > conftest.$ac_ext <<EOF
  3519. #line 3639 "configure"
  3520. #include "confdefs.h"
  3521. main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}
  3522. EOF
  3523. eval $ac_link
  3524. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3525.   vi_cv_sprintf_count=yes
  3526. else
  3527.   vi_cv_sprintf_count=no
  3528. fi
  3529. fi
  3530. rm -fr conftest*
  3531. fi
  3532. if test "$vi_cv_sprintf_count" = no; then
  3533.     cat >> confdefs.h <<\EOF
  3534. #define SPRINTF_RET_CHARPNT 1
  3535. EOF
  3536. fi
  3537. echo "$ac_t""$vi_cv_sprintf_count" 1>&6
  3538. echo $ac_n "checking if --disable-db option specified""... $ac_c" 1>&6
  3539. # Check whether --enable-db or --disable-db was given.
  3540. if test "${enable_db+set}" = set; then
  3541.   enableval="$enable_db"
  3542.   vi_cv_db_lib="other DB"
  3543. else
  3544.   vi_cv_db_lib="bundled DB"
  3545. fi
  3546. echo "$ac_t""$vi_cv_db_lib" 1>&6
  3547. case "$vi_cv_db_lib" in
  3548. "bundled DB")
  3549.     CPPFLAGS="-I\$(srcdir)/db/include $CPPFLAGS"
  3550.     LIBOBJS="\$(DBOBJS) $LIBOBJS";;
  3551. "other DB")
  3552.     ;;
  3553. esac
  3554. echo $ac_n "checking if --disable-re option specified""... $ac_c" 1>&6
  3555. # Check whether --enable-re or --disable-re was given.
  3556. if test "${enable_re+set}" = set; then
  3557.   enableval="$enable_re"
  3558.   vi_cv_re_lib="other RE"
  3559. else
  3560.   vi_cv_re_lib="bundled RE"
  3561. fi
  3562. echo "$ac_t""$vi_cv_re_lib" 1>&6
  3563. case "$vi_cv_re_lib" in
  3564. "bundled RE")
  3565.     CPPFLAGS="-I\$(srcdir)/regex $CPPFLAGS"
  3566.     LIBOBJS="\$(REOBJS) $LIBOBJS";;
  3567. "other RE")
  3568.     ;;
  3569. esac
  3570.  
  3571. echo $ac_n "checking for u_char""... $ac_c" 1>&6
  3572. if eval "test \"`echo '$''{'vi_cv_uchar'+set}'`\" = set"; then
  3573.   echo $ac_n "(cached) $ac_c" 1>&6
  3574. else
  3575.   cat > conftest.$ac_ext <<EOF
  3576. #line 3703 "configure"
  3577. #include "confdefs.h"
  3578. #include <sys/types.h>
  3579. int main() { return 0; }
  3580. int t() {
  3581. u_char foo;
  3582. ; return 0; }
  3583. EOF
  3584. if eval $ac_compile; then
  3585.   rm -rf conftest*
  3586.   vi_cv_uchar=yes
  3587. else
  3588.   rm -rf conftest*
  3589.   vi_cv_uchar=no
  3590. fi
  3591. rm -f conftest*
  3592. fi
  3593. echo "$ac_t""$vi_cv_uchar" 1>&6
  3594. if test "$vi_cv_uchar" = no; then
  3595.     u_char_decl="typedef unsigned char u_char;"
  3596. fi
  3597.  
  3598. echo $ac_n "checking for u_short""... $ac_c" 1>&6
  3599. if eval "test \"`echo '$''{'vi_cv_ushort'+set}'`\" = set"; then
  3600.   echo $ac_n "(cached) $ac_c" 1>&6
  3601. else
  3602.   cat > conftest.$ac_ext <<EOF
  3603. #line 3733 "configure"
  3604. #include "confdefs.h"
  3605. #include <sys/types.h>
  3606. int main() { return 0; }
  3607. int t() {
  3608. u_short foo;
  3609. ; return 0; }
  3610. EOF
  3611. if eval $ac_compile; then
  3612.   rm -rf conftest*
  3613.   vi_cv_ushort=yes
  3614. else
  3615.   rm -rf conftest*
  3616.   vi_cv_ushort=no
  3617. fi
  3618. rm -f conftest*
  3619. fi
  3620. echo "$ac_t""$vi_cv_ushort" 1>&6
  3621. if test "$vi_cv_ushort" = no; then
  3622.     u_short_decl="typedef unsigned short u_short;"
  3623. fi
  3624.  
  3625. echo $ac_n "checking for u_int""... $ac_c" 1>&6
  3626. if eval "test \"`echo '$''{'vi_cv_uint'+set}'`\" = set"; then
  3627.   echo $ac_n "(cached) $ac_c" 1>&6
  3628. else
  3629.   cat > conftest.$ac_ext <<EOF
  3630. #line 3763 "configure"
  3631. #include "confdefs.h"
  3632. #include <sys/types.h>
  3633. int main() { return 0; }
  3634. int t() {
  3635. u_int foo;
  3636. ; return 0; }
  3637. EOF
  3638. if eval $ac_compile; then
  3639.   rm -rf conftest*
  3640.   vi_cv_uint=yes
  3641. else
  3642.   rm -rf conftest*
  3643.   vi_cv_uint=no
  3644. fi
  3645. rm -f conftest*
  3646. fi
  3647. echo "$ac_t""$vi_cv_uint" 1>&6
  3648. if test "$vi_cv_uint" = no; then
  3649.     u_int_decl="typedef unsigned int u_int;"
  3650. fi
  3651.  
  3652. echo $ac_n "checking for u_long""... $ac_c" 1>&6
  3653. if eval "test \"`echo '$''{'vi_cv_ulong'+set}'`\" = set"; then
  3654.   echo $ac_n "(cached) $ac_c" 1>&6
  3655. else
  3656.   cat > conftest.$ac_ext <<EOF
  3657. #line 3793 "configure"
  3658. #include "confdefs.h"
  3659. #include <sys/types.h>
  3660. int main() { return 0; }
  3661. int t() {
  3662. u_long foo;
  3663. ; return 0; }
  3664. EOF
  3665. if eval $ac_compile; then
  3666.   rm -rf conftest*
  3667.   vi_cv_ulong=yes
  3668. else
  3669.   rm -rf conftest*
  3670.   vi_cv_ulong=no
  3671. fi
  3672. rm -f conftest*
  3673. fi
  3674. echo "$ac_t""$vi_cv_ulong" 1>&6
  3675. if test "$vi_cv_ulong" = no; then
  3676.     u_long_decl="typedef unsigned long u_long;"
  3677. fi
  3678.  
  3679. echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
  3680. if eval "test \"`echo '$''{'vi_cv_uint8'+set}'`\" = set"; then
  3681.   echo $ac_n "(cached) $ac_c" 1>&6
  3682. else
  3683.   cat > conftest.$ac_ext <<EOF
  3684. #line 3823 "configure"
  3685. #include "confdefs.h"
  3686. #include <sys/types.h>
  3687. int main() { return 0; }
  3688. int t() {
  3689. u_int8_t foo;
  3690. ; return 0; }
  3691. EOF
  3692. if eval $ac_compile; then
  3693.   rm -rf conftest*
  3694.   vi_cv_uint8=yes
  3695. else
  3696.   rm -rf conftest*
  3697.   if test "$cross_compiling" = yes; then
  3698.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3699. else
  3700. cat > conftest.$ac_ext <<EOF
  3701. #line 3840 "configure"
  3702. #include "confdefs.h"
  3703. main(){exit(sizeof(unsigned char) != 1);}
  3704. EOF
  3705. eval $ac_link
  3706. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3707.   vi_cv_uint8="unsigned char"
  3708. else
  3709.   vi_cv_uint8=no
  3710. fi
  3711. fi
  3712. rm -fr conftest*
  3713. fi
  3714. rm -f conftest*
  3715. fi
  3716. echo "$ac_t""$vi_cv_uint8" 1>&6
  3717. if test "$vi_cv_uint8" = no; then
  3718.     echo
  3719.     echo "Fatal error: no unsigned, 8-bit integral type."
  3720.     exit 1
  3721. fi
  3722. if test "$vi_cv_uint8" != yes; then
  3723.     u_int8_decl="typedef $vi_cv_uint8 u_int8_t;"
  3724. fi
  3725.  
  3726. echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
  3727. if eval "test \"`echo '$''{'vi_cv_uint16'+set}'`\" = set"; then
  3728.   echo $ac_n "(cached) $ac_c" 1>&6
  3729. else
  3730.   cat > conftest.$ac_ext <<EOF
  3731. #line 3873 "configure"
  3732. #include "confdefs.h"
  3733. #include <sys/types.h>
  3734. int main() { return 0; }
  3735. int t() {
  3736. u_int16_t foo;
  3737. ; return 0; }
  3738. EOF
  3739. if eval $ac_compile; then
  3740.   rm -rf conftest*
  3741.   vi_cv_uint16=yes
  3742. else
  3743.   rm -rf conftest*
  3744.   if test "$cross_compiling" = yes; then
  3745.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3746. else
  3747. cat > conftest.$ac_ext <<EOF
  3748. #line 3890 "configure"
  3749. #include "confdefs.h"
  3750. main(){exit(sizeof(unsigned short) != 2);}
  3751. EOF
  3752. eval $ac_link
  3753. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3754.   vi_cv_uint16="unsigned short"
  3755. else
  3756.   if test "$cross_compiling" = yes; then
  3757.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3758. else
  3759. cat > conftest.$ac_ext <<EOF
  3760. #line 3902 "configure"
  3761. #include "confdefs.h"
  3762. main(){exit(sizeof(unsigned int) != 2);}
  3763. EOF
  3764. eval $ac_link
  3765. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3766.   vi_cv_uint16="unsigned int"
  3767. else
  3768.   vi_cv_uint16=no
  3769. fi
  3770. fi
  3771. rm -fr conftest*
  3772. fi
  3773. fi
  3774. rm -fr conftest*
  3775. fi
  3776. rm -f conftest*
  3777. fi
  3778. echo "$ac_t""$vi_cv_uint16" 1>&6
  3779. if test "$vi_cv_uint16" = no; then
  3780.     echo
  3781.     echo "Fatal error: no unsigned, 16-bit integral type."
  3782.     exit 1
  3783. fi
  3784. if test "$vi_cv_uint16" != yes; then
  3785.     u_int16_decl="typedef $vi_cv_uint16 u_int16_t;"
  3786. fi
  3787.  
  3788. echo $ac_n "checking for int16_t""... $ac_c" 1>&6
  3789. if eval "test \"`echo '$''{'vi_cv_int16'+set}'`\" = set"; then
  3790.   echo $ac_n "(cached) $ac_c" 1>&6
  3791. else
  3792.   cat > conftest.$ac_ext <<EOF
  3793. #line 3938 "configure"
  3794. #include "confdefs.h"
  3795. #include <sys/types.h>
  3796. int main() { return 0; }
  3797. int t() {
  3798. int16_t foo;
  3799. ; return 0; }
  3800. EOF
  3801. if eval $ac_compile; then
  3802.   rm -rf conftest*
  3803.   vi_cv_int16=yes
  3804. else
  3805.   rm -rf conftest*
  3806.   if test "$cross_compiling" = yes; then
  3807.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3808. else
  3809. cat > conftest.$ac_ext <<EOF
  3810. #line 3955 "configure"
  3811. #include "confdefs.h"
  3812. main(){exit(sizeof(short) != 2);}
  3813. EOF
  3814. eval $ac_link
  3815. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3816.   vi_cv_int16="short"
  3817. else
  3818.   if test "$cross_compiling" = yes; then
  3819.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3820. else
  3821. cat > conftest.$ac_ext <<EOF
  3822. #line 3967 "configure"
  3823. #include "confdefs.h"
  3824. main(){exit(sizeof(int) != 2);}
  3825. EOF
  3826. eval $ac_link
  3827. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3828.   vi_cv_int16="int"
  3829. else
  3830.   vi_cv_int16=no
  3831. fi
  3832. fi
  3833. rm -fr conftest*
  3834. fi
  3835. fi
  3836. rm -fr conftest*
  3837. fi
  3838. rm -f conftest*
  3839. fi
  3840. echo "$ac_t""$vi_cv_int16" 1>&6
  3841. if test "$vi_cv_int16" = no; then
  3842.     echo
  3843.     echo "Fatal error: no signed, 16-bit integral type."
  3844.     exit 1
  3845. fi
  3846. if test "$vi_cv_int16" != yes; then
  3847.     int16_decl="typedef $vi_cv_int16 int16_t;"
  3848. fi
  3849.  
  3850. echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
  3851. if eval "test \"`echo '$''{'vi_cv_uint32'+set}'`\" = set"; then
  3852.   echo $ac_n "(cached) $ac_c" 1>&6
  3853. else
  3854.   cat > conftest.$ac_ext <<EOF
  3855. #line 4003 "configure"
  3856. #include "confdefs.h"
  3857. #include <sys/types.h>
  3858. int main() { return 0; }
  3859. int t() {
  3860. u_int32_t foo;
  3861. ; return 0; }
  3862. EOF
  3863. if eval $ac_compile; then
  3864.   rm -rf conftest*
  3865.   vi_cv_uint32=yes
  3866. else
  3867.   rm -rf conftest*
  3868.   if test "$cross_compiling" = yes; then
  3869.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3870. else
  3871. cat > conftest.$ac_ext <<EOF
  3872. #line 4020 "configure"
  3873. #include "confdefs.h"
  3874. main(){exit(sizeof(unsigned int) != 4);}
  3875. EOF
  3876. eval $ac_link
  3877. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3878.   vi_cv_uint32="unsigned int"
  3879. else
  3880.   if test "$cross_compiling" = yes; then
  3881.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3882. else
  3883. cat > conftest.$ac_ext <<EOF
  3884. #line 4032 "configure"
  3885. #include "confdefs.h"
  3886. main(){exit(sizeof(unsigned long) != 4);}
  3887. EOF
  3888. eval $ac_link
  3889. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3890.   vi_cv_uint32="unsigned long"
  3891. else
  3892.   vi_cv_uint32=no
  3893. fi
  3894. fi
  3895. rm -fr conftest*
  3896. fi
  3897. fi
  3898. rm -fr conftest*
  3899. fi
  3900. rm -f conftest*
  3901. fi
  3902. echo "$ac_t""$vi_cv_uint32" 1>&6
  3903. if test "$vi_cv_uint32" = no; then
  3904.     echo
  3905.     echo "Fatal error: no unsigned, 32-bit integral type."
  3906.     exit 1
  3907. fi
  3908. if test "$vi_cv_uint32" != yes; then
  3909.     u_int32_decl="typedef $vi_cv_uint32 u_int32_t;"
  3910. fi
  3911.  
  3912. echo $ac_n "checking for int32_t""... $ac_c" 1>&6
  3913. if eval "test \"`echo '$''{'vi_cv_int32'+set}'`\" = set"; then
  3914.   echo $ac_n "(cached) $ac_c" 1>&6
  3915. else
  3916.   cat > conftest.$ac_ext <<EOF
  3917. #line 4068 "configure"
  3918. #include "confdefs.h"
  3919. #include <sys/types.h>
  3920. int main() { return 0; }
  3921. int t() {
  3922. int32_t foo;
  3923. ; return 0; }
  3924. EOF
  3925. if eval $ac_compile; then
  3926.   rm -rf conftest*
  3927.   vi_cv_int32=yes
  3928. else
  3929.   rm -rf conftest*
  3930.   if test "$cross_compiling" = yes; then
  3931.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3932. else
  3933. cat > conftest.$ac_ext <<EOF
  3934. #line 4085 "configure"
  3935. #include "confdefs.h"
  3936. main(){exit(sizeof(int) != 4);}
  3937. EOF
  3938. eval $ac_link
  3939. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3940.   vi_cv_int32="int"
  3941. else
  3942.   if test "$cross_compiling" = yes; then
  3943.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3944. else
  3945. cat > conftest.$ac_ext <<EOF
  3946. #line 4097 "configure"
  3947. #include "confdefs.h"
  3948. main(){exit(sizeof(long) != 4);}
  3949. EOF
  3950. eval $ac_link
  3951. if test -s conftest$EXE && (./conftest; exit) 2>/dev/null; then
  3952.   vi_cv_int32="long"
  3953. else
  3954.   vi_cv_int32=no
  3955. fi
  3956. fi
  3957. rm -fr conftest*
  3958. fi
  3959. fi
  3960. rm -fr conftest*
  3961. fi
  3962. rm -f conftest*
  3963. fi
  3964. echo "$ac_t""$vi_cv_int32" 1>&6
  3965. if test "$vi_cv_int32" = no; then
  3966.     echo
  3967.     echo "Fatal error: no signed, 32-bit integral type."
  3968.     exit 1
  3969. fi
  3970. if test "$vi_cv_int32" != yes; then
  3971.     int32_decl="typedef $vi_cv_int32 int32_t;"
  3972. fi
  3973. trap '' 1 2 15
  3974. cat > confcache <<\EOF
  3975. # This file is a shell script that caches the results of configure
  3976. # tests run on this system so they can be shared between configure
  3977. # scripts and configure runs.  It is not useful on other systems.
  3978. # If it contains results you don't want to keep, you may remove or edit it.
  3979. #
  3980. # By default, configure uses ./config.cache as the cache file,
  3981. # creating it if it does not exist already.  You can give configure
  3982. # the --cache-file=FILE option to use a different cache file; that is
  3983. # what configure does when it calls configure scripts in
  3984. # subdirectories, so they share the cache.
  3985. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3986. # config.status only pays attention to the cache file if you give it the
  3987. # --recheck option to rerun configure.
  3988. #
  3989. EOF
  3990. # Ultrix sh set writes to stderr and can't be redirected directly,
  3991. # and sets the high bit in the cache file unless we assign to the vars.
  3992. (set) 2>&1 |
  3993.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3994.   >> confcache
  3995. if cmp -s $cache_file confcache; then
  3996.   :
  3997. else
  3998.   if test -w $cache_file; then
  3999.     echo "updating cache $cache_file"
  4000.     cat confcache > $cache_file
  4001.   else
  4002.     echo "not updating unwritable cache $cache_file"
  4003.   fi
  4004. fi
  4005. rm -f confcache
  4006. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4007. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4008. # Let make expand exec_prefix.
  4009. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4010. # Any assignment to VPATH causes Sun make to only execute
  4011. # the first set of double-colon rules, so remove it if not needed.
  4012. # If there is a colon in the path, we need to keep it.
  4013. if test "x$srcdir" = x.; then
  4014.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4015. fi
  4016. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4017. DEFS=-DHAVE_CONFIG_H
  4018. # Without the "./", some shells look in PATH for config.status.
  4019. : ${CONFIG_STATUS=./config.status}
  4020. echo creating $CONFIG_STATUS
  4021. rm -f $CONFIG_STATUS
  4022. cat > $CONFIG_STATUS <<EOF
  4023. #! ${CONFIG_SHELL-/bin/sh}
  4024. # Generated automatically by configure.
  4025. # Run this file to recreate the current configuration.
  4026. # This directory was configured as follows,
  4027. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4028. #
  4029. # $0 $ac_configure_args
  4030. #
  4031. # Compiler output produced by configure, useful for debugging
  4032. # configure, is in ./config.log if it exists.
  4033. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4034. for ac_option
  4035. do
  4036.   case "\$ac_option" in
  4037.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4038.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4039.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4040.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4041.     echo "$CONFIG_STATUS generated by autoconf version 2.7"
  4042.     exit 0 ;;
  4043.   -help | --help | --hel | --he | --h)
  4044.     echo "\$ac_cs_usage"; exit 0 ;;
  4045.   *) echo "\$ac_cs_usage"; exit 1 ;;
  4046.   esac
  4047. done
  4048. ac_given_srcdir=$srcdir
  4049. ac_given_INSTALL="$INSTALL"
  4050. trap 'rm -fr `echo "Makefile port.h:port.h.in
  4051.     pathnames.h:pathnames.h.in recover$EXE:recover.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4052. EOF
  4053. cat >> $CONFIG_STATUS <<EOF
  4054. # Protect against being on the right side of a sed subst in config.status.
  4055. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4056.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/; s!\\\\\\\\!/!g' > conftest.subs <<\\CEOF
  4057. $ac_vpsub
  4058. $extrasub
  4059. s%@CFLAGS@%$CFLAGS%g
  4060. s%@CPPFLAGS@%$CPPFLAGS%g
  4061. s%@CXXFLAGS@%$CXXFLAGS%g
  4062. s%@DEFS@%$DEFS%g
  4063. s%@LDFLAGS@%$LDFLAGS%g
  4064. s%@LIBS@%$LIBS%g
  4065. s%@exec_prefix@%$exec_prefix%g
  4066. s%@prefix@%$prefix%g
  4067. s%@program_transform_name@%$program_transform_name%g
  4068. s%@bindir@%$bindir%g
  4069. s%@sbindir@%$sbindir%g
  4070. s%@libexecdir@%$libexecdir%g
  4071. s%@datadir@%$datadir%g
  4072. s%@sysconfdir@%$sysconfdir%g
  4073. s%@sharedstatedir@%$sharedstatedir%g
  4074. s%@localstatedir@%$localstatedir%g
  4075. s%@libdir@%$libdir%g
  4076. s%@includedir@%$includedir%g
  4077. s%@oldincludedir@%$oldincludedir%g
  4078. s%@infodir@%$infodir%g
  4079. s%@mandir@%$mandir%g
  4080. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4081. s%@INSTALL_DATA@%$INSTALL_DATA%g
  4082. s%@host@%$host%g
  4083. s%@host_alias@%$host_alias%g
  4084. s%@host_cpu@%$host_cpu%g
  4085. s%@host_vendor@%$host_vendor%g
  4086. s%@host_os@%$host_os%g
  4087. s%@CC@%$CC%g
  4088. s%@OPTFLAG@%$OPTFLAG%g
  4089. s%@no_op_OPTFLAG@%$no_op_OPTFLAG%g
  4090. s%@vi_cv_path_shell@%$vi_cv_path_shell%g
  4091. s%@vi_cv_path_sendmail@%$vi_cv_path_sendmail%g
  4092. s%@vi_cv_path_perl@%$vi_cv_path_perl%g
  4093. s%@vi_cv_path_preserve@%$vi_cv_path_preserve%g
  4094. s%@vi_cv_path_chmod@%$vi_cv_path_chmod%g
  4095. s%@vi_cv_path_cp@%$vi_cv_path_cp%g
  4096. s%@vi_cv_path_ln@%$vi_cv_path_ln%g
  4097. s%@vi_cv_path_mkdir@%$vi_cv_path_mkdir%g
  4098. s%@vi_cv_path_rm@%$vi_cv_path_rm%g
  4099. s%@vi_cv_path_strip@%$vi_cv_path_strip%g
  4100. s%@CPP@%$CPP%g
  4101. s%@XINCS@%$XINCS%g
  4102. s%@shrpenv@%$shrpenv%g
  4103. s%@vi_cv_perllib@%$vi_cv_perllib%g
  4104. s%@tknvi@%$tknvi%g
  4105. s%@TKLIBS@%$TKLIBS%g
  4106. s%@cobjs@%$cobjs%g
  4107. s%@LIBOBJS@%$LIBOBJS%g
  4108. s%@u_char_decl@%$u_char_decl%g
  4109. s%@u_short_decl@%$u_short_decl%g
  4110. s%@u_int_decl@%$u_int_decl%g
  4111. s%@u_long_decl@%$u_long_decl%g
  4112. s%@u_int8_decl@%$u_int8_decl%g
  4113. s%@u_int16_decl@%$u_int16_decl%g
  4114. s%@int16_decl@%$int16_decl%g
  4115. s%@u_int32_decl@%$u_int32_decl%g
  4116. s%@int32_decl@%$int32_decl%g
  4117. s%@CMD@%$CMD%g
  4118. s%@EXE@%$EXE%g
  4119. s%@PATHSEP@%$PATHSEP%g
  4120. s%@VI_DOSISH@%$vi_cv_DOSish%g
  4121. s%@emxadds@%$emxadds%g
  4122. s%@emxfix@%$emxfix%g
  4123.  
  4124. CEOF
  4125. EOF
  4126. # @@@@ might try to distinguish between all-longname systems and per-FS
  4127. # @@@@ systems later...
  4128. cat >> $CONFIG_STATUS <<EOF
  4129.  
  4130. host_os="$host_os"
  4131. CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  4132.  
  4133. CONFIG_FILES=\${CONFIG_FILES-"Makefile port.h:port.h.in
  4134.     pathnames.h:pathnames.h.in recover$CMD:recover.in"}
  4135. EOF
  4136. cat >> $CONFIG_STATUS <<\EOF
  4137. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  4138.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  4139.   case "$ac_file" in
  4140.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  4141.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4142.   *) ac_file_in="${ac_file}.in" ;;
  4143.   esac
  4144.   # Adjust relative srcdir, etc. for subdirectories.
  4145.   # Remove last slash and all that follows it.  Not all systems have dirname.
  4146.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4147.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4148.     # The file is in a subdirectory.
  4149.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  4150.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4151.     # A "../" for each directory in $ac_dir_suffix.
  4152.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4153.   else
  4154.     ac_dir_suffix= ac_dots=
  4155.   fi
  4156.   case "$ac_given_srcdir" in
  4157.   .)  srcdir=.
  4158.       if test -z "$ac_dots"; then top_srcdir=.
  4159.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4160.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4161.   *) # Relative path.
  4162.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4163.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4164.   esac
  4165.   case "$ac_given_INSTALL" in
  4166.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  4167.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  4168.   esac
  4169.   echo creating "$ac_file"
  4170.   rm -f "$ac_file"
  4171.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4172.   case "$ac_file" in
  4173.   *Makefile*) ac_comsub="1i\\
  4174. # $configure_input" ;;
  4175.   *recover*) if test "$host_os" = "os2"; then ac_comsub="1i\\
  4176. extproc ${CONFIG_SHELL-/bin/sh}"; else ac_comsub= ; fi ;;
  4177.   *) ac_comsub= ;;
  4178.   esac
  4179.   sed -e "$ac_comsub
  4180. s%@configure_input@%$configure_input%g
  4181. s%@srcdir@%$srcdir%g
  4182. s%@top_srcdir@%$top_srcdir%g
  4183. s%@INSTALL@%$INSTALL%g
  4184. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  4185. fi; done
  4186. rm -f conftest.subs
  4187. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  4188. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  4189. #
  4190. # ac_d sets the value in "#define NAME VALUE" lines.
  4191. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  4192. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  4193. ac_dC='\3'
  4194. ac_dD='%g'
  4195. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  4196. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4197. ac_uB='\([     ]\)%\1#\2define\3'
  4198. ac_uC=' '
  4199. ac_uD='\4%g'
  4200. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  4201. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4202. ac_eB='$%\1#\2define\3'
  4203. ac_eC=' '
  4204. ac_eD='%g'
  4205. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  4206. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  4207.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  4208.   case "$ac_file" in
  4209.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  4210.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4211.   *) ac_file_in="${ac_file}.in" ;;
  4212.   esac
  4213.   echo creating $ac_file
  4214.   rm -f conftest.frag conftest.in conftest.out
  4215.   cp $ac_given_srcdir/$ac_file_in conftest.in
  4216. EOF
  4217. # Transform confdefs.h into a sed script conftest.vals that substitutes
  4218. # the proper values into config.h.in to produce config.h.  And first:
  4219. # Protect against being on the right side of a sed subst in config.status.
  4220. # Protect against being in an unquoted here document in config.status.
  4221. rm -f conftest.vals
  4222. cat > conftest.hdr <<\EOF
  4223. s/[\\&%]/\\&/g
  4224. s%[\\$`]%\\&%g
  4225. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  4226. s%ac_d%ac_u%gp
  4227. s%ac_u%ac_e%gp
  4228. EOF
  4229. sed -n -f conftest.hdr confdefs.h > conftest.vals
  4230. rm -f conftest.hdr
  4231. # This sed command replaces #undef with comments.  This is necessary, for
  4232. # example, in the case of _POSIX_SOURCE, which is predefined and required
  4233. # on some systems where configure will not decide to define it.
  4234. cat >> conftest.vals <<\EOF
  4235. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  4236. EOF
  4237. # Break up conftest.vals because some shells have a limit on
  4238. # the size of here documents, and old seds have small limits too.
  4239. # Maximum number of lines to put in a single here document.
  4240. ac_max_here_lines=12
  4241. rm -f conftest.tail
  4242. while :
  4243. do
  4244.   ac_lines=`grep -c . conftest.vals`
  4245.   # grep -c gives empty output for an empty file on some AIX systems.
  4246.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4247.   # Write a limited-size here document to conftest.frag.
  4248.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4249.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4250.   echo 'CEOF
  4251.   sed -f conftest.frag conftest.in > conftest.out
  4252.   rm -f conftest.in
  4253.   mv conftest.out conftest.in
  4254. ' >> $CONFIG_STATUS
  4255.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4256.   rm -f conftest.vals
  4257.   mv conftest.tail conftest.vals
  4258. done
  4259. rm -f conftest.vals
  4260. cat >> $CONFIG_STATUS <<\EOF
  4261.   rm -f conftest.frag conftest.h
  4262.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4263.   cat conftest.in >> conftest.h
  4264.   rm -f conftest.in
  4265.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4266.     echo "$ac_file is unchanged"
  4267.     rm -f conftest.h
  4268.   else
  4269.     rm -f $ac_file
  4270.     mv conftest.h $ac_file
  4271.   fi
  4272. fi; done
  4273.  
  4274.  
  4275. exit 0
  4276. EOF
  4277. chmod +x $CONFIG_STATUS
  4278. rm -fr confdefs* $ac_clean_files
  4279. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4280.