home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lynx2.8.1dev.10.tar.gz / lynx2.8.1dev.10.tar / lynx2-8 / configure < prev    next >
Text File  |  1998-05-10  |  216KB  |  8,228 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12.971230 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_default_prefix=/usr/local
  15.  
  16. # Initialize some variables set by options.
  17. # The variables have the same names as the options, with
  18. # dashes changed to underlines.
  19. build=NONE
  20. cache_file=./config.cache
  21. exec_prefix=NONE
  22. host=NONE
  23. no_create=
  24. nonopt=NONE
  25. no_recursion=
  26. prefix=NONE
  27. program_prefix=NONE
  28. program_suffix=NONE
  29. program_transform_name=s,x,x,
  30. silent=
  31. site=
  32. srcdir=
  33. target=NONE
  34. verbose=
  35. x_includes=NONE
  36. x_libraries=NONE
  37. bindir='${exec_prefix}/bin'
  38. sbindir='${exec_prefix}/sbin'
  39. libexecdir='${exec_prefix}/libexec'
  40. datadir='${prefix}/share'
  41. sysconfdir='${prefix}/etc'
  42. sharedstatedir='${prefix}/com'
  43. localstatedir='${prefix}/var'
  44. libdir='${exec_prefix}/lib'
  45. includedir='${prefix}/include'
  46. oldincludedir='/usr/include'
  47. infodir='${prefix}/info'
  48. mandir='${prefix}/man'
  49.  
  50. # Initialize some other variables.
  51. subdirs=
  52. MFLAGS= MAKEFLAGS=
  53. # Maximum number of lines to put in a shell here document.
  54. ac_max_here_lines=12
  55.  
  56. ac_prev=
  57. for ac_option
  58. do
  59.  
  60.   # If the previous option needs an argument, assign it.
  61.   if test -n "$ac_prev"; then
  62.     eval "$ac_prev=\$ac_option"
  63.     ac_prev=
  64.     continue
  65.   fi
  66.  
  67.   case "$ac_option" in
  68.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  69.   *) ac_optarg= ;;
  70.   esac
  71.  
  72.   # Accept the important Cygnus configure options, so we can diagnose typos.
  73.  
  74.   case "$ac_option" in
  75.  
  76.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  77.     ac_prev=bindir ;;
  78.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  79.     bindir="$ac_optarg" ;;
  80.  
  81.   -build | --build | --buil | --bui | --bu)
  82.     ac_prev=build ;;
  83.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  84.     build="$ac_optarg" ;;
  85.  
  86.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  87.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  88.     ac_prev=cache_file ;;
  89.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  90.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  91.     cache_file="$ac_optarg" ;;
  92.  
  93.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  94.     ac_prev=datadir ;;
  95.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  96.   | --da=*)
  97.     datadir="$ac_optarg" ;;
  98.  
  99.   -disable-* | --disable-*)
  100.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  101.     # Reject names that are not valid shell variable names.
  102.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  103.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  104.     fi
  105.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  106.     eval "enable_${ac_feature}=no" ;;
  107.  
  108.   -enable-* | --enable-*)
  109.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  110.     # Reject names that are not valid shell variable names.
  111.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  112.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  113.     fi
  114.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  115.     case "$ac_option" in
  116.       *=*) ;;
  117.       *) ac_optarg=yes ;;
  118.     esac
  119.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  120.  
  121.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  122.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  123.   | --exec | --exe | --ex)
  124.     ac_prev=exec_prefix ;;
  125.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  126.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  127.   | --exec=* | --exe=* | --ex=*)
  128.     exec_prefix="$ac_optarg" ;;
  129.  
  130.   -gas | --gas | --ga | --g)
  131.     # Obsolete; use --with-gas.
  132.     with_gas=yes ;;
  133.  
  134.   -help | --help | --hel | --he)
  135.     # Omit some internal or obsolete options to make the list less imposing.
  136.     # This message is too long to be a string in the A/UX 3.1 sh.
  137.     cat << EOF
  138. Usage: configure [options] [host]
  139. Options: [defaults in brackets after descriptions]
  140. Configuration:
  141.   --cache-file=FILE       cache test results in FILE
  142.   --help                  print this message
  143.   --no-create             do not create output files
  144.   --quiet, --silent       do not print \`checking...' messages
  145.   --version               print the version of autoconf that created configure
  146. Directory and file names:
  147.   --prefix=PREFIX         install architecture-independent files in PREFIX
  148.                           [$ac_default_prefix]
  149.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  150.                           [same as prefix]
  151.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  152.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  153.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  154.   --datadir=DIR           read-only architecture-independent data in DIR
  155.                           [PREFIX/share]
  156.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  157.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  158.                           [PREFIX/com]
  159.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  160.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  161.   --includedir=DIR        C header files in DIR [PREFIX/include]
  162.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  163.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  164.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  165.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  166.   --program-prefix=PREFIX prepend PREFIX to installed program names
  167.   --program-suffix=SUFFIX append SUFFIX to installed program names
  168.   --program-transform-name=PROGRAM
  169.                           run sed PROGRAM on installed program names
  170. EOF
  171.     cat << EOF
  172. Host type:
  173.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  174.   --host=HOST             configure for HOST [guessed]
  175.   --target=TARGET         configure for TARGET [TARGET=HOST]
  176. Features and packages:
  177.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  178.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  179.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  180.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  181.   --x-includes=DIR        X include files are in DIR
  182.   --x-libraries=DIR       X library files are in DIR
  183. EOF
  184. cat <<EOF
  185. --enable and --with options recognized:
  186. Development Options:
  187.   --disable-echo          test: display "compiling" commands (default: on)
  188.   --enable-find-leaks     logic for testing memory leaks (default: off)
  189.   --enable-debug          logic for traces/debugging (default: off)
  190.   --enable-warnings       GCC compiler warnings (default: off)
  191. Basic Configuration Options:
  192.   --disable-full-paths    control whether full utility pathnames are used (default: on)
  193.   --with-screen=XXX       select screen type
  194.                           (XXX is curses (default), ncurses or slang)
  195. Miscellaneous Options:
  196.   --enable-8bit-toupper   use experimental 8-bit case-conversion (default: off)
  197.   --enable-color-style    use optional/experimental color style (default: off)
  198.   --enable-partial        use experimental partial-display logic (default: off)
  199.   --enable-default-colors enable use of default-colors (ncurses/slang) (default: off)
  200. EOF
  201. cat <<EOF
  202.   --disable-extended-dtd  disable extended HTML DTD logic (default: on)
  203.   --enable-externs        use external commands (default: off)
  204.   --enable-font-switch    use Linux setfont for character-translation (default: off)
  205.   --enable-internal-links  handle following links to same doc differently (default: off)
  206.   --enable-nsl-fork       fork NSL requests, allowing them to be aborted (default: off)
  207.   --enable-underlines     underline links rather than using boldface (default: off)
  208.   --with-zlib             use zlib for decompression of some gzip files
  209. Directory Editor Options:
  210.   --disable-dired          enable optional directory-editor, DirEd (default: on)
  211.   --disable-dired-archive  disable dearchiving commands (default: on)
  212.   --disable-dired-override disable private keymaps (default: on)
  213.   --disable-dired-permit  disable chmod/attrib commands (default: on)
  214. EOF
  215. cat <<EOF
  216.   --disable-dired-xpermit disable chmod/attrib commands (default: on)
  217.   --disable-dired-tar     disable "tar" command (default: on)
  218.   --disable-dired-uudecode disable "uudecode" command (default: on)
  219.   --disable-dired-zip     disable "zip", "unzip"  commands (default: on)
  220.   --disable-dired-gzip    disable "gzip", "gunzip" commands (default: on)
  221.   --disable-long-list     disable long "ls -l" directory listings (default: on)
  222.   --disable-parent-dir-refs
  223.                           disable "Up-to" links in directory listings (default: on)
  224. EOF
  225.     exit 0 ;;
  226.  
  227.   -host | --host | --hos | --ho)
  228.     ac_prev=host ;;
  229.   -host=* | --host=* | --hos=* | --ho=*)
  230.     host="$ac_optarg" ;;
  231.  
  232.   -includedir | --includedir | --includedi | --included | --include \
  233.   | --includ | --inclu | --incl | --inc)
  234.     ac_prev=includedir ;;
  235.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  236.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  237.     includedir="$ac_optarg" ;;
  238.  
  239.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  240.     ac_prev=infodir ;;
  241.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  242.     infodir="$ac_optarg" ;;
  243.  
  244.   -libdir | --libdir | --libdi | --libd)
  245.     ac_prev=libdir ;;
  246.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  247.     libdir="$ac_optarg" ;;
  248.  
  249.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  250.   | --libexe | --libex | --libe)
  251.     ac_prev=libexecdir ;;
  252.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  253.   | --libexe=* | --libex=* | --libe=*)
  254.     libexecdir="$ac_optarg" ;;
  255.  
  256.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  257.   | --localstate | --localstat | --localsta | --localst \
  258.   | --locals | --local | --loca | --loc | --lo)
  259.     ac_prev=localstatedir ;;
  260.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  261.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  262.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  263.     localstatedir="$ac_optarg" ;;
  264.  
  265.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  266.     ac_prev=mandir ;;
  267.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  268.     mandir="$ac_optarg" ;;
  269.  
  270.   -nfp | --nfp | --nf)
  271.     # Obsolete; use --without-fp.
  272.     with_fp=no ;;
  273.  
  274.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  275.   | --no-cr | --no-c)
  276.     no_create=yes ;;
  277.  
  278.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  279.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  280.     no_recursion=yes ;;
  281.  
  282.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  283.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  284.   | --oldin | --oldi | --old | --ol | --o)
  285.     ac_prev=oldincludedir ;;
  286.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  287.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  288.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  289.     oldincludedir="$ac_optarg" ;;
  290.  
  291.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  292.     ac_prev=prefix ;;
  293.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  294.     prefix="$ac_optarg" ;;
  295.  
  296.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  297.   | --program-pre | --program-pr | --program-p)
  298.     ac_prev=program_prefix ;;
  299.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  300.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  301.     program_prefix="$ac_optarg" ;;
  302.  
  303.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  304.   | --program-suf | --program-su | --program-s)
  305.     ac_prev=program_suffix ;;
  306.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  307.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  308.     program_suffix="$ac_optarg" ;;
  309.  
  310.   -program-transform-name | --program-transform-name \
  311.   | --program-transform-nam | --program-transform-na \
  312.   | --program-transform-n | --program-transform- \
  313.   | --program-transform | --program-transfor \
  314.   | --program-transfo | --program-transf \
  315.   | --program-trans | --program-tran \
  316.   | --progr-tra | --program-tr | --program-t)
  317.     ac_prev=program_transform_name ;;
  318.   -program-transform-name=* | --program-transform-name=* \
  319.   | --program-transform-nam=* | --program-transform-na=* \
  320.   | --program-transform-n=* | --program-transform-=* \
  321.   | --program-transform=* | --program-transfor=* \
  322.   | --program-transfo=* | --program-transf=* \
  323.   | --program-trans=* | --program-tran=* \
  324.   | --progr-tra=* | --program-tr=* | --program-t=*)
  325.     program_transform_name="$ac_optarg" ;;
  326.  
  327.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  328.   | -silent | --silent | --silen | --sile | --sil)
  329.     silent=yes ;;
  330.  
  331.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  332.     ac_prev=sbindir ;;
  333.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  334.   | --sbi=* | --sb=*)
  335.     sbindir="$ac_optarg" ;;
  336.  
  337.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  338.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  339.   | --sharedst | --shareds | --shared | --share | --shar \
  340.   | --sha | --sh)
  341.     ac_prev=sharedstatedir ;;
  342.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  343.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  344.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  345.   | --sha=* | --sh=*)
  346.     sharedstatedir="$ac_optarg" ;;
  347.  
  348.   -site | --site | --sit)
  349.     ac_prev=site ;;
  350.   -site=* | --site=* | --sit=*)
  351.     site="$ac_optarg" ;;
  352.  
  353.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  354.     ac_prev=srcdir ;;
  355.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  356.     srcdir="$ac_optarg" ;;
  357.  
  358.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  359.   | --syscon | --sysco | --sysc | --sys | --sy)
  360.     ac_prev=sysconfdir ;;
  361.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  362.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  363.     sysconfdir="$ac_optarg" ;;
  364.  
  365.   -target | --target | --targe | --targ | --tar | --ta | --t)
  366.     ac_prev=target ;;
  367.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  368.     target="$ac_optarg" ;;
  369.  
  370.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  371.     verbose=yes ;;
  372.  
  373.   -version | --version | --versio | --versi | --vers)
  374.     echo "configure generated by autoconf version 2.12.971230"
  375.     exit 0 ;;
  376.  
  377.   -with-* | --with-*)
  378.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  379.     # Reject names that are not valid shell variable names.
  380.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  381.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  382.     fi
  383.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  384.     case "$ac_option" in
  385.       *=*) ;;
  386.       *) ac_optarg=yes ;;
  387.     esac
  388.     eval "with_${ac_package}='$ac_optarg'" ;;
  389.  
  390.   -without-* | --without-*)
  391.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  392.     # Reject names that are not valid shell variable names.
  393.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  394.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  395.     fi
  396.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  397.     eval "with_${ac_package}=no" ;;
  398.  
  399.   --x)
  400.     # Obsolete; use --with-x.
  401.     with_x=yes ;;
  402.  
  403.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  404.   | --x-incl | --x-inc | --x-in | --x-i)
  405.     ac_prev=x_includes ;;
  406.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  407.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  408.     x_includes="$ac_optarg" ;;
  409.  
  410.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  411.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  412.     ac_prev=x_libraries ;;
  413.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  414.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  415.     x_libraries="$ac_optarg" ;;
  416.  
  417.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  418.     ;;
  419.  
  420.   *)
  421.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  422.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  423.     fi
  424.     if test "x$nonopt" != xNONE; then
  425.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  426.     fi
  427.     nonopt="$ac_option"
  428.     ;;
  429.  
  430.   esac
  431. done
  432.  
  433. if test -n "$ac_prev"; then
  434.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  435. fi
  436.  
  437. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  438.  
  439. # File descriptor usage:
  440. # 0 standard input
  441. # 1 file creation
  442. # 2 errors and warnings
  443. # 3 some systems may open it to /dev/tty
  444. # 4 used on the Kubota Titan
  445. # 6 checking for... messages and results
  446. # 5 compiler messages saved in config.log
  447. if test "$silent" = yes; then
  448.   exec 6>/dev/null
  449. else
  450.   exec 6>&1
  451. fi
  452. exec 5>./config.log
  453.  
  454. echo "\
  455. This file contains any messages produced by compilers while
  456. running configure, to aid debugging if configure makes a mistake.
  457. " 1>&5
  458.  
  459. # Strip out --no-create and --no-recursion so they do not pile up.
  460. # Also quote any args containing shell metacharacters.
  461. ac_configure_args=
  462. for ac_arg
  463. do
  464.   case "$ac_arg" in
  465.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  466.   | --no-cr | --no-c) ;;
  467.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  468.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  469.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  470.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  471.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  472.   esac
  473. done
  474.  
  475. # NLS nuisances.
  476. # Only set these to C if already set.  These must not be set unconditionally
  477. # because not all systems understand e.g. LANG=C (notably SCO).
  478. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  479. # Non-C LC_CTYPE values break the ctype check.
  480. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  481. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  482. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  483. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  484.  
  485. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  486. rm -rf conftest* confdefs.h
  487. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  488. echo > confdefs.h
  489.  
  490. # A filename unique to this package, relative to the directory that
  491. # configure is in, which we can look for to find out if srcdir is correct.
  492. ac_unique_file=userdefs.h
  493.  
  494. # Find the source files, if location was not specified.
  495. if test -z "$srcdir"; then
  496.   ac_srcdir_defaulted=yes
  497.   # Try the directory containing this script, then its parent.
  498.   ac_prog=$0
  499.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  500.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  501.   srcdir=$ac_confdir
  502.   if test ! -r $srcdir/$ac_unique_file; then
  503.     srcdir=..
  504.   fi
  505. else
  506.   ac_srcdir_defaulted=no
  507. fi
  508. if test ! -r $srcdir/$ac_unique_file; then
  509.   if test "$ac_srcdir_defaulted" = yes; then
  510.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  511.   else
  512.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  513.   fi
  514. fi
  515. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  516.  
  517. # Prefer explicitly selected file to automatically selected ones.
  518. if test -z "$CONFIG_SITE"; then
  519.   if test "x$prefix" != xNONE; then
  520.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  521.   else
  522.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  523.   fi
  524. fi
  525. for ac_site_file in $CONFIG_SITE; do
  526.   if test -r "$ac_site_file"; then
  527.     echo "loading site script $ac_site_file"
  528.     . "$ac_site_file"
  529.   fi
  530. done
  531.  
  532. if test -r "$cache_file"; then
  533.   echo "loading cache $cache_file"
  534.   . $cache_file
  535. else
  536.   echo "creating cache $cache_file"
  537.   > $cache_file
  538. fi
  539.  
  540. ac_ext=c
  541. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  542. ac_cpp='$CPP $CPPFLAGS'
  543. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  544. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  545. cross_compiling=$ac_cv_prog_cc_cross
  546.  
  547. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  548.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  549.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  550.     ac_n= ac_c='
  551. ' ac_t='    '
  552.   else
  553.     ac_n=-n ac_c= ac_t=
  554.   fi
  555. else
  556.   ac_n= ac_c='\c' ac_t=
  557. fi
  558.  
  559.  
  560.  
  561.  
  562.  
  563. ac_aux_dir=
  564. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  565.   if test -f $ac_dir/install-sh; then
  566.     ac_aux_dir=$ac_dir
  567.     ac_install_sh="$ac_aux_dir/install-sh -c"
  568.     break
  569.   elif test -f $ac_dir/install.sh; then
  570.     ac_aux_dir=$ac_dir
  571.     ac_install_sh="$ac_aux_dir/install.sh -c"
  572.     break
  573.   fi
  574. done
  575. if test -z "$ac_aux_dir"; then
  576.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  577. fi
  578. ac_config_guess=$ac_aux_dir/config.guess
  579. ac_config_sub=$ac_aux_dir/config.sub
  580. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  581.  
  582.  
  583. # Make sure we can run config.sub.
  584. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  585. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  586. fi
  587.  
  588. echo $ac_n "checking host system type""... $ac_c" 1>&6
  589. echo "configure:590: checking host system type" >&5
  590.  
  591. host_alias=$host
  592. case "$host_alias" in
  593. NONE)
  594.   case $nonopt in
  595.   NONE)
  596.     if host_alias=`$ac_config_guess`; then :
  597.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  598.     fi ;;
  599.   *) host_alias=$nonopt ;;
  600.   esac ;;
  601. esac
  602.  
  603. host=`$ac_config_sub $host_alias`
  604. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  605. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  606. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  607. echo "$ac_t""$host" 1>&6
  608.  
  609.  
  610.  
  611. # Extract the first word of "gcc", so it can be a program name with args.
  612. set dummy gcc; ac_word=$2
  613. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  614. echo "configure:615: checking for $ac_word" >&5
  615. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  616.   echo $ac_n "(cached) $ac_c" 1>&6
  617. else
  618.   if test -n "$CC"; then
  619.   ac_cv_prog_CC="$CC" # Let the user override the test.
  620. else
  621.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  622.   for ac_dir in $PATH; do
  623.     test -z "$ac_dir" && ac_dir=.
  624.     if test -f $ac_dir/$ac_word; then
  625.       ac_cv_prog_CC="gcc"
  626.       break
  627.     fi
  628.   done
  629.   IFS="$ac_save_ifs"
  630. fi
  631. fi
  632. CC="$ac_cv_prog_CC"
  633. if test -n "$CC"; then
  634.   echo "$ac_t""$CC" 1>&6
  635. else
  636.   echo "$ac_t""no" 1>&6
  637. fi
  638.  
  639. if test -z "$CC"; then
  640.   # Extract the first word of "cc", so it can be a program name with args.
  641. set dummy cc; ac_word=$2
  642. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  643. echo "configure:644: checking for $ac_word" >&5
  644. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  645.   echo $ac_n "(cached) $ac_c" 1>&6
  646. else
  647.   if test -n "$CC"; then
  648.   ac_cv_prog_CC="$CC" # Let the user override the test.
  649. else
  650.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  651.   ac_prog_rejected=no
  652.   for ac_dir in $PATH; do
  653.     test -z "$ac_dir" && ac_dir=.
  654.     if test -f $ac_dir/$ac_word; then
  655.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  656.         ac_prog_rejected=yes
  657.     continue
  658.       fi
  659.       ac_cv_prog_CC="cc"
  660.       break
  661.     fi
  662.   done
  663.   IFS="$ac_save_ifs"
  664. if test $ac_prog_rejected = yes; then
  665.   # We found a bogon in the path, so make sure we never use it.
  666.   set dummy $ac_cv_prog_CC
  667.   shift
  668.   if test $# -gt 0; then
  669.     # We chose a different compiler from the bogus one.
  670.     # However, it has the same basename, so the bogon will be chosen
  671.     # first if we set CC to just the basename; use the full file name.
  672.     shift
  673.     set dummy "$ac_dir/$ac_word" "$@"
  674.     shift
  675.     ac_cv_prog_CC="$@"
  676.   fi
  677. fi
  678. fi
  679. fi
  680. CC="$ac_cv_prog_CC"
  681. if test -n "$CC"; then
  682.   echo "$ac_t""$CC" 1>&6
  683. else
  684.   echo "$ac_t""no" 1>&6
  685. fi
  686.  
  687.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  688. fi
  689.  
  690. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  691. echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  692.  
  693. ac_ext=c
  694. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  695. ac_cpp='$CPP $CPPFLAGS'
  696. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  697. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  698. cross_compiling=$ac_cv_prog_cc_cross
  699.  
  700. cat > conftest.$ac_ext <<EOF
  701. #line 702 "configure"
  702. #include "confdefs.h"
  703. main(){return(0);}
  704. EOF
  705. if { (eval echo configure:706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  706.   ac_cv_prog_cc_works=yes
  707.   # If we can't run a trivial program, we are probably using a cross compiler.
  708.   if (./conftest; exit) 2>/dev/null; then
  709.     ac_cv_prog_cc_cross=no
  710.   else
  711.     ac_cv_prog_cc_cross=yes
  712.   fi
  713. else
  714.   echo "configure: failed program was:" >&5
  715.   cat conftest.$ac_ext >&5
  716.   ac_cv_prog_cc_works=no
  717. fi
  718. rm -fr conftest*
  719.  
  720. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  721. if test $ac_cv_prog_cc_works = no; then
  722.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  723. fi
  724. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  725. echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  726. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  727. cross_compiling=$ac_cv_prog_cc_cross
  728.  
  729. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  730. echo "configure:731: checking whether we are using GNU C" >&5
  731. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  732.   echo $ac_n "(cached) $ac_c" 1>&6
  733. else
  734.   cat > conftest.c <<EOF
  735. #ifdef __GNUC__
  736.   yes;
  737. #endif
  738. EOF
  739. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  740.   ac_cv_prog_gcc=yes
  741. else
  742.   ac_cv_prog_gcc=no
  743. fi
  744. fi
  745.  
  746. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  747.  
  748. if test $ac_cv_prog_gcc = yes; then
  749.   GCC=yes
  750.   ac_test_CFLAGS="${CFLAGS+set}"
  751.   ac_save_CFLAGS="$CFLAGS"
  752.   CFLAGS=
  753.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  754. echo "configure:755: checking whether ${CC-cc} accepts -g" >&5
  755. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  756.   echo $ac_n "(cached) $ac_c" 1>&6
  757. else
  758.   echo 'void f(){}' > conftest.c
  759. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  760.   ac_cv_prog_cc_g=yes
  761. else
  762.   ac_cv_prog_cc_g=no
  763. fi
  764. rm -f conftest*
  765.  
  766. fi
  767.  
  768. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  769.   if test "$ac_test_CFLAGS" = set; then
  770.     CFLAGS="$ac_save_CFLAGS"
  771.   elif test $ac_cv_prog_cc_g = yes; then
  772.     CFLAGS="-g -O2"
  773.   else
  774.     CFLAGS="-O2"
  775.   fi
  776. else
  777.   GCC=
  778.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  779. fi
  780.  
  781. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  782. echo "configure:783: checking how to run the C preprocessor" >&5
  783. # On Suns, sometimes $CPP names a directory.
  784. if test -n "$CPP" && test -d "$CPP"; then
  785.   CPP=
  786. fi
  787. if test -z "$CPP"; then
  788. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  789.   echo $ac_n "(cached) $ac_c" 1>&6
  790. else
  791.     # This must be in double quotes, not single quotes, because CPP may get
  792.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  793.   CPP="${CC-cc} -E"
  794.   # On the NeXT, cc -E runs the code through the compiler's parser,
  795.   # not just through cpp.
  796.   cat > conftest.$ac_ext <<EOF
  797. #line 798 "configure"
  798. #include "confdefs.h"
  799. #include <assert.h>
  800. Syntax Error
  801. EOF
  802. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  803. { (eval echo configure:804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  804. ac_err=`grep -v '^ *+' conftest.out`
  805. if test -z "$ac_err"; then
  806.   :
  807. else
  808.   echo "$ac_err" >&5
  809.   echo "configure: failed program was:" >&5
  810.   cat conftest.$ac_ext >&5
  811.   rm -rf conftest*
  812.   CPP="${CC-cc} -E -traditional-cpp"
  813.   cat > conftest.$ac_ext <<EOF
  814. #line 815 "configure"
  815. #include "confdefs.h"
  816. #include <assert.h>
  817. Syntax Error
  818. EOF
  819. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  820. { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  821. ac_err=`grep -v '^ *+' conftest.out`
  822. if test -z "$ac_err"; then
  823.   :
  824. else
  825.   echo "$ac_err" >&5
  826.   echo "configure: failed program was:" >&5
  827.   cat conftest.$ac_ext >&5
  828.   rm -rf conftest*
  829.   CPP=/lib/cpp
  830. fi
  831. rm -f conftest*
  832. fi
  833. rm -f conftest*
  834.   ac_cv_prog_CPP="$CPP"
  835. fi
  836.   CPP="$ac_cv_prog_CPP"
  837. else
  838.   ac_cv_prog_CPP="$CPP"
  839. fi
  840. echo "$ac_t""$CPP" 1>&6
  841.  
  842. # Extract the first word of "ranlib", so it can be a program name with args.
  843. set dummy ranlib; ac_word=$2
  844. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  845. echo "configure:846: checking for $ac_word" >&5
  846. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  847.   echo $ac_n "(cached) $ac_c" 1>&6
  848. else
  849.   if test -n "$RANLIB"; then
  850.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  851. else
  852.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  853.   for ac_dir in $PATH; do
  854.     test -z "$ac_dir" && ac_dir=.
  855.     if test -f $ac_dir/$ac_word; then
  856.       ac_cv_prog_RANLIB="ranlib"
  857.       break
  858.     fi
  859.   done
  860.   IFS="$ac_save_ifs"
  861.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  862. fi
  863. fi
  864. RANLIB="$ac_cv_prog_RANLIB"
  865. if test -n "$RANLIB"; then
  866.   echo "$ac_t""$RANLIB" 1>&6
  867. else
  868.   echo "$ac_t""no" 1>&6
  869. fi
  870.  
  871. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  872. echo "configure:873: checking whether ${MAKE-make} sets \${MAKE}" >&5
  873. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  874. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  875.   echo $ac_n "(cached) $ac_c" 1>&6
  876. else
  877.   cat > conftestmake <<\EOF
  878. all:
  879.     @echo 'ac_maketemp="${MAKE}"'
  880. EOF
  881. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  882. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  883. if test -n "$ac_maketemp"; then
  884.   eval ac_cv_prog_make_${ac_make}_set=yes
  885. else
  886.   eval ac_cv_prog_make_${ac_make}_set=no
  887. fi
  888. rm -f conftestmake
  889. fi
  890. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  891.   echo "$ac_t""yes" 1>&6
  892.   SET_MAKE=
  893. else
  894.   echo "$ac_t""no" 1>&6
  895.   SET_MAKE="MAKE=${MAKE-make}"
  896. fi
  897.  
  898.  
  899. echo $ac_n "checking for style of include in makefiles""... $ac_c" 1>&6
  900. echo "configure:901: checking for style of include in makefiles" >&5
  901.  
  902. make_include_left=""
  903. make_include_right=""
  904. make_include_quote="unknown"
  905.  
  906. cf_inc=head$$
  907. cf_dir=subd$$
  908. echo 'RESULT=OK' >$cf_inc
  909. mkdir $cf_dir
  910.  
  911. for cf_include in "include" ".include" "!include"
  912. do
  913.     for cf_quote in '' '"'
  914.     do
  915.         cat >$cf_dir/makefile <<CF_EOF
  916. SHELL=/bin/sh
  917. ${cf_include} ${cf_quote}../$cf_inc${cf_quote}
  918. all :
  919.     @echo 'cf_make_include=\$(RESULT)'
  920. CF_EOF
  921.     cf_make_include=""
  922.     eval `cd $cf_dir && ${MAKE-make} 2>&5 | grep cf_make_include=OK`
  923.     if test -n "$cf_make_include"; then
  924.         make_include_left="$cf_include"
  925.         make_include_quote="$cf_quote"
  926.         break
  927.     else
  928.         echo Tried 1>&5
  929.         cat $cf_dir/makefile 1>&5
  930.     fi
  931.     done
  932.     test -n "$cf_make_include" && break
  933. done
  934.  
  935. rm -rf $cf_inc $cf_dir
  936.  
  937. if test -z "$make_include_left" ; then
  938.     { echo "configure: error: Your $ac_make program does not support includes" 1>&2; exit 1; }
  939. fi
  940. if test ".$make_include_quote" != .unknown ; then
  941.     make_include_left="$make_include_left $make_include_quote"
  942.     make_include_right="$make_include_quote"
  943. fi
  944.  
  945. echo "$ac_t""${make_include_left}file${make_include_right}" 1>&6
  946.  
  947.  
  948.  
  949.  
  950. # Find a good install program.  We prefer a C program (faster),
  951. # so one script is as good as another.  But avoid the broken or
  952. # incompatible versions:
  953. # SysV /etc/install, /usr/sbin/install
  954. # SunOS /usr/etc/install
  955. # IRIX /sbin/install
  956. # AIX /bin/install
  957. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  958. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  959. # ./install, which can be erroneously created by make from ./install.sh.
  960. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  961. echo "configure:962: checking for a BSD compatible install" >&5
  962. if test -z "$INSTALL"; then
  963. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  964.   echo $ac_n "(cached) $ac_c" 1>&6
  965. else
  966.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  967.   for ac_dir in $PATH; do
  968.     # Account for people who put trailing slashes in PATH elements.
  969.     case "$ac_dir/" in
  970.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  971.     *)
  972.       # OSF1 and SCO ODT 3.0 have their own names for install.
  973.       for ac_prog in ginstall installbsd scoinst install; do
  974.         if test -f $ac_dir/$ac_prog; then
  975.       if test $ac_prog = install &&
  976.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  977.         # AIX install.  It has an incompatible calling convention.
  978.         # OSF/1 installbsd also uses dspmsg, but is usable.
  979.         :
  980.       else
  981.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  982.         break 2
  983.       fi
  984.     fi
  985.       done
  986.       ;;
  987.     esac
  988.   done
  989.   IFS="$ac_save_IFS"
  990.  
  991. fi
  992.   if test "${ac_cv_path_install+set}" = set; then
  993.     INSTALL="$ac_cv_path_install"
  994.   else
  995.     # As a last resort, use the slow shell script.  We don't cache a
  996.     # path for INSTALL within a source directory, because that will
  997.     # break other packages using the cache if that directory is
  998.     # removed, or if the path is relative.
  999.     INSTALL="$ac_install_sh"
  1000.   fi
  1001. fi
  1002. echo "$ac_t""$INSTALL" 1>&6
  1003.  
  1004. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1005. # It thinks the first close brace ends the variable substitution.
  1006. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1007.  
  1008. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1009.  
  1010. for ac_prog in lint alint lclint tdlint
  1011. do
  1012. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1013. set dummy $ac_prog; ac_word=$2
  1014. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1015. echo "configure:1016: checking for $ac_word" >&5
  1016. if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
  1017.   echo $ac_n "(cached) $ac_c" 1>&6
  1018. else
  1019.   if test -n "$LINT"; then
  1020.   ac_cv_prog_LINT="$LINT" # Let the user override the test.
  1021. else
  1022.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1023.   for ac_dir in $PATH; do
  1024.     test -z "$ac_dir" && ac_dir=.
  1025.     if test -f $ac_dir/$ac_word; then
  1026.       ac_cv_prog_LINT="$ac_prog"
  1027.       break
  1028.     fi
  1029.   done
  1030.   IFS="$ac_save_ifs"
  1031. fi
  1032. fi
  1033. LINT="$ac_cv_prog_LINT"
  1034. if test -n "$LINT"; then
  1035.   echo "$ac_t""$LINT" 1>&6
  1036. else
  1037.   echo "$ac_t""no" 1>&6
  1038. fi
  1039.  
  1040. test -n "$LINT" && break
  1041. done
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048. echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
  1049. echo "configure:1050: checking if you want to see long compiling messages" >&5
  1050.  
  1051. # Check whether --enable-echo or --disable-echo was given.
  1052. if test "${enable_echo+set}" = set; then
  1053.   enableval="$enable_echo"
  1054.   test "$enableval" != no && enableval=yes
  1055.   if test "$enableval" != "yes" ; then
  1056.     
  1057.     ECHO_LD='@echo linking $@;'
  1058.     RULE_CC='    @echo compiling $<'
  1059.     SHOW_CC='    @echo compiling $@'
  1060.     ECHO_CC='@'
  1061.  
  1062.   else
  1063.     
  1064.     ECHO_LD=''
  1065.     RULE_CC='# compiling'
  1066.     SHOW_CC='# compiling'
  1067.     ECHO_CC=''
  1068.  
  1069.   fi
  1070. else
  1071.   enableval=yes 
  1072.   
  1073.     ECHO_LD=''
  1074.     RULE_CC='# compiling'
  1075.     SHOW_CC='# compiling'
  1076.     ECHO_CC=''
  1077.  
  1078.   
  1079. fi
  1080.  
  1081. echo "$ac_t""$enableval" 1>&6
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088. echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6
  1089. echo "configure:1090: checking if you want to check memory-leaks" >&5
  1090.  
  1091. # Check whether --enable-find-leaks or --disable-find-leaks was given.
  1092. if test "${enable_find_leaks+set}" = set; then
  1093.   enableval="$enable_find_leaks"
  1094.   test "$enableval" != yes && enableval=no
  1095.   if test "$enableval" != "no" ; then
  1096.     with_leak_checks=yes 
  1097.   else
  1098.     with_leak_checks=no
  1099.   fi
  1100. else
  1101.   enableval=no 
  1102.   with_leak_checks=no
  1103.   
  1104. fi
  1105.  
  1106. echo "$ac_t""$with_leak_checks" 1>&6
  1107. test "$with_leak_checks" = "yes" && cat >> confdefs.h <<\EOF
  1108. #define LY_FIND_LEAKS 1
  1109. EOF
  1110.  
  1111.  
  1112. echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6
  1113. echo "configure:1114: checking if you want to enable debug-code" >&5
  1114.  
  1115. # Check whether --enable-debug or --disable-debug was given.
  1116. if test "${enable_debug+set}" = set; then
  1117.   enableval="$enable_debug"
  1118.   test "$enableval" != yes && enableval=no
  1119.   if test "$enableval" != "no" ; then
  1120.     with_debug=yes 
  1121.   else
  1122.     with_debug=no
  1123.   fi
  1124. else
  1125.   enableval=no 
  1126.   with_debug=no
  1127.   
  1128. fi
  1129.  
  1130. echo "$ac_t""$with_debug" 1>&6
  1131. if test "$with_debug" = "yes" ; then
  1132.     case $host_os in
  1133.     ultrix*|osf*)
  1134.         
  1135. CFLAGS=`echo ${CFLAGS} | sed -e 's/-O[1-9]\? //' -e 's/-O[1-9]\?$//'`
  1136.  
  1137.         if test -z "$GCC" ; then
  1138.             CFLAGS="$CFLAGS -g3"
  1139.         fi
  1140.         ;;
  1141.     esac
  1142. else
  1143.     case $host_os in
  1144.     osf*) #(vi
  1145.         CFLAGS="$CFLAGS -std1"
  1146.         CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
  1147.         ;;
  1148.     *)
  1149.         CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
  1150.         ;;
  1151.     esac
  1152. fi
  1153.  
  1154.  
  1155. if test -n "$GCC"
  1156. then
  1157. echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
  1158. echo "configure:1159: checking if you want to turn on gcc warnings" >&5
  1159.  
  1160. # Check whether --enable-warnings or --disable-warnings was given.
  1161. if test "${enable_warnings+set}" = set; then
  1162.   enableval="$enable_warnings"
  1163.   test "$enableval" != yes && enableval=no
  1164.   if test "$enableval" != "no" ; then
  1165.     with_warnings=yes 
  1166.   else
  1167.     with_warnings=no
  1168.   fi
  1169. else
  1170.   enableval=no 
  1171.   with_warnings=no
  1172.   
  1173. fi
  1174.  
  1175. echo "$ac_t""$with_warnings" 1>&6
  1176. if test "$with_warnings" = "yes"
  1177. then
  1178.     
  1179. if test -n "$GCC"
  1180. then
  1181. cat > conftest.i <<EOF
  1182. #ifndef GCC_PRINTF
  1183. #define GCC_PRINTF 0
  1184. #endif
  1185. #ifndef GCC_SCANF
  1186. #define GCC_SCANF 0
  1187. #endif
  1188. #ifndef GCC_NORETURN
  1189. #define GCC_NORETURN /* nothing */
  1190. #endif
  1191. #ifndef GCC_UNUSED
  1192. #define GCC_UNUSED /* nothing */
  1193. #endif
  1194. EOF
  1195. if test -n "$GCC"
  1196. then
  1197.     echo "checking for gcc __attribute__ directives" 1>&6
  1198. echo "configure:1199: checking for gcc __attribute__ directives" >&5
  1199.     cat > conftest.$ac_ext <<EOF
  1200. #line 1201 "configure"
  1201. #include "confdefs.h"
  1202. #include "conftest.h"
  1203. #include "conftest.i"
  1204. #if    GCC_PRINTF
  1205. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
  1206. #else
  1207. #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
  1208. #endif
  1209. #if    GCC_SCANF
  1210. #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
  1211. #else
  1212. #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
  1213. #endif
  1214. extern void wow(char *,...) GCC_SCANFLIKE(1,2);
  1215. extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
  1216. extern void foo(void) GCC_NORETURN;
  1217. int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
  1218. EOF
  1219.         for cf_attribute in scanf printf unused noreturn
  1220.     do
  1221.         
  1222. CF_ATTRIBUTE=`echo $cf_attribute | tr '[a-z]' '[A-Z]'`
  1223.  
  1224.         cf_directive="__attribute__(($cf_attribute))"
  1225.         echo "checking for gcc $cf_directive" 1>&5
  1226.         case $cf_attribute in
  1227.         scanf|printf)
  1228.         cat >conftest.h <<EOF
  1229. #define GCC_$CF_ATTRIBUTE 1
  1230. EOF
  1231.             ;;
  1232.         *)
  1233.         cat >conftest.h <<EOF
  1234. #define GCC_$CF_ATTRIBUTE $cf_directive
  1235. EOF
  1236.             ;;
  1237.         esac
  1238.         if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1239.             test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
  1240.             cat conftest.h >>confdefs.h
  1241. #        else
  1242. #            sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
  1243.         fi
  1244.     done
  1245. else
  1246.     fgrep define conftest.i >>confdefs.h
  1247. fi
  1248. rm -rf conftest*
  1249. fi
  1250.  
  1251.     
  1252. if test -n "$GCC"
  1253. then
  1254.         cat > conftest.$ac_ext <<EOF
  1255. #line 1256 "configure"
  1256. int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
  1257. EOF
  1258.         echo "checking for gcc warning options" 1>&6
  1259. echo "configure:1260: checking for gcc warning options" >&5
  1260.     cf_save_CFLAGS="$CFLAGS"
  1261.     EXTRA_CFLAGS="-W -Wall"
  1262.     cf_warn_CONST=""
  1263.     test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
  1264.     for cf_opt in \
  1265.         Wbad-function-cast \
  1266.         Wcast-align \
  1267.         Wcast-qual \
  1268.         Winline \
  1269.         Wmissing-declarations \
  1270.         Wmissing-prototypes \
  1271.         Wnested-externs \
  1272.         Wpointer-arith \
  1273.         Wshadow \
  1274.         Wstrict-prototypes $cf_warn_CONST
  1275.     do
  1276.         CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  1277.         if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1278.             test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
  1279.             EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  1280.             test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
  1281.         fi
  1282.     done
  1283.     rm -f conftest*
  1284.     CFLAGS="$cf_save_CFLAGS"
  1285. fi
  1286.  
  1287.  
  1288. fi
  1289. fi
  1290.  
  1291.  
  1292.  
  1293.  
  1294. echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6
  1295. echo "configure:1296: checking if you want full utility pathnames" >&5
  1296.  
  1297. # Check whether --enable-full-paths or --disable-full-paths was given.
  1298. if test "${enable_full_paths+set}" = set; then
  1299.   enableval="$enable_full_paths"
  1300.   test "$enableval" != no && enableval=yes
  1301.   if test "$enableval" != "yes" ; then
  1302.     with_full_paths=no 
  1303.   else
  1304.     with_full_paths=yes
  1305.   fi
  1306. else
  1307.   enableval=yes 
  1308.   with_full_paths=yes
  1309.   
  1310. fi
  1311.  
  1312. echo "$ac_t""$with_full_paths" 1>&6
  1313.  
  1314.  
  1315. echo $ac_n "checking for system mailer""... $ac_c" 1>&6
  1316. echo "configure:1317: checking for system mailer" >&5
  1317. if eval "test \"`echo '$''{'cf_cv_SYSTEM_MAIL'+set}'`\" = set"; then
  1318.   echo $ac_n "(cached) $ac_c" 1>&6
  1319. else
  1320.   
  1321.     cf_cv_SYSTEM_MAIL=unknown
  1322.     for cv_path in /usr/mmdf/bin/submit \
  1323.     /usr/sbin/sendmail \
  1324.     /usr/lib/sendmail  \
  1325.     
  1326.     do
  1327.         if test -f $cv_path ; then
  1328.             cf_cv_SYSTEM_MAIL=$cv_path
  1329.             break
  1330.         fi
  1331.     done
  1332.     
  1333. fi
  1334.  
  1335. echo "$ac_t""$cf_cv_SYSTEM_MAIL" 1>&6
  1336. cat >> confdefs.h <<EOF
  1337. #define SYSTEM_MAIL "$cf_cv_SYSTEM_MAIL"
  1338. EOF
  1339.  
  1340.  
  1341.  
  1342. echo $ac_n "checking system mail flags""... $ac_c" 1>&6
  1343. echo "configure:1344: checking system mail flags" >&5
  1344. if eval "test \"`echo '$''{'cf_cv_system_mail_flags'+set}'`\" = set"; then
  1345.   echo $ac_n "(cached) $ac_c" 1>&6
  1346. else
  1347.   
  1348.     case $cf_cv_SYSTEM_MAIL in
  1349.     */mmdf/*)
  1350.         cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
  1351.             ;; 
  1352.     *)
  1353.             cf_cv_system_mail_flags="-t -oi"
  1354.     esac
  1355.     
  1356. fi
  1357.  
  1358. echo "$ac_t""$cf_cv_system_mail_flags" 1>&6
  1359. cat >> confdefs.h <<EOF
  1360. #define SYSTEM_MAIL_FLAGS "$cf_cv_system_mail_flags"
  1361. EOF
  1362.  
  1363.  
  1364.  
  1365.  
  1366. test -z "$CHMOD" && CHMOD=chmod
  1367. if test "$with_full_paths" = yes ; then
  1368.     # Extract the first word of "chmod", so it can be a program name with args.
  1369. set dummy chmod; ac_word=$2
  1370. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1371. echo "configure:1372: checking for $ac_word" >&5
  1372. if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
  1373.   echo $ac_n "(cached) $ac_c" 1>&6
  1374. else
  1375.   case "$CHMOD" in
  1376.   /*)
  1377.   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
  1378.   ;;
  1379.   *)
  1380.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1381.   for ac_dir in $PATH; do
  1382.     test -z "$ac_dir" && ac_dir=.
  1383.     if test -f $ac_dir/$ac_word; then
  1384.       ac_cv_path_CHMOD="$ac_dir/$ac_word"
  1385.       break
  1386.     fi
  1387.   done
  1388.   IFS="$ac_save_ifs"
  1389.   test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD="$CHMOD"
  1390.   ;;
  1391. esac
  1392. fi
  1393. CHMOD="$ac_cv_path_CHMOD"
  1394. if test -n "$CHMOD"; then
  1395.   echo "$ac_t""$CHMOD" 1>&6
  1396. else
  1397.   echo "$ac_t""no" 1>&6
  1398. fi
  1399.  
  1400. else
  1401.     echo $ac_n "checking for chmod""... $ac_c" 1>&6
  1402. echo "configure:1403: checking for chmod" >&5
  1403.     echo "$ac_t""$CHMOD" 1>&6
  1404. fi
  1405.  
  1406. cf_path_prog=""
  1407. cf_path_args=""
  1408. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1409. for cf_temp in $ac_cv_path_CHMOD
  1410. do
  1411.     if test -z "$cf_path_prog" ; then
  1412.         cf_path_prog="$cf_temp"
  1413.     elif test -z "$cf_path_args" ; then
  1414.         cf_path_args="$cf_temp"
  1415.     else
  1416.         cf_path_args="$cf_path_args $cf_temp"
  1417.     fi
  1418. done
  1419. IFS="$cf_save_ifs"
  1420.  
  1421. cat >> confdefs.h <<EOF
  1422. #define CHMOD_PATH "$cf_path_prog"
  1423. EOF
  1424.  
  1425. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1426. #define CHMOD_ARGS "$cf_path_args"
  1427. EOF
  1428.  
  1429.  
  1430.  
  1431. test -z "$COMPRESS" && COMPRESS=compress
  1432. if test "$with_full_paths" = yes ; then
  1433.     # Extract the first word of "compress", so it can be a program name with args.
  1434. set dummy compress; ac_word=$2
  1435. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1436. echo "configure:1437: checking for $ac_word" >&5
  1437. if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then
  1438.   echo $ac_n "(cached) $ac_c" 1>&6
  1439. else
  1440.   case "$COMPRESS" in
  1441.   /*)
  1442.   ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
  1443.   ;;
  1444.   *)
  1445.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1446.   for ac_dir in $PATH; do
  1447.     test -z "$ac_dir" && ac_dir=.
  1448.     if test -f $ac_dir/$ac_word; then
  1449.       ac_cv_path_COMPRESS="$ac_dir/$ac_word"
  1450.       break
  1451.     fi
  1452.   done
  1453.   IFS="$ac_save_ifs"
  1454.   test -z "$ac_cv_path_COMPRESS" && ac_cv_path_COMPRESS="$COMPRESS"
  1455.   ;;
  1456. esac
  1457. fi
  1458. COMPRESS="$ac_cv_path_COMPRESS"
  1459. if test -n "$COMPRESS"; then
  1460.   echo "$ac_t""$COMPRESS" 1>&6
  1461. else
  1462.   echo "$ac_t""no" 1>&6
  1463. fi
  1464.  
  1465. else
  1466.     echo $ac_n "checking for compress""... $ac_c" 1>&6
  1467. echo "configure:1468: checking for compress" >&5
  1468.     echo "$ac_t""$COMPRESS" 1>&6
  1469. fi
  1470.  
  1471. cf_path_prog=""
  1472. cf_path_args=""
  1473. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1474. for cf_temp in $ac_cv_path_COMPRESS
  1475. do
  1476.     if test -z "$cf_path_prog" ; then
  1477.         cf_path_prog="$cf_temp"
  1478.     elif test -z "$cf_path_args" ; then
  1479.         cf_path_args="$cf_temp"
  1480.     else
  1481.         cf_path_args="$cf_path_args $cf_temp"
  1482.     fi
  1483. done
  1484. IFS="$cf_save_ifs"
  1485.  
  1486. cat >> confdefs.h <<EOF
  1487. #define COMPRESS_PATH "$cf_path_prog"
  1488. EOF
  1489.  
  1490. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1491. #define COMPRESS_ARGS "$cf_path_args"
  1492. EOF
  1493.  
  1494.  
  1495.  
  1496. test -z "$COPY" && COPY=cp
  1497. if test "$with_full_paths" = yes ; then
  1498.     # Extract the first word of "cp", so it can be a program name with args.
  1499. set dummy cp; ac_word=$2
  1500. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1501. echo "configure:1502: checking for $ac_word" >&5
  1502. if eval "test \"`echo '$''{'ac_cv_path_COPY'+set}'`\" = set"; then
  1503.   echo $ac_n "(cached) $ac_c" 1>&6
  1504. else
  1505.   case "$COPY" in
  1506.   /*)
  1507.   ac_cv_path_COPY="$COPY" # Let the user override the test with a path.
  1508.   ;;
  1509.   *)
  1510.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1511.   for ac_dir in $PATH; do
  1512.     test -z "$ac_dir" && ac_dir=.
  1513.     if test -f $ac_dir/$ac_word; then
  1514.       ac_cv_path_COPY="$ac_dir/$ac_word"
  1515.       break
  1516.     fi
  1517.   done
  1518.   IFS="$ac_save_ifs"
  1519.   test -z "$ac_cv_path_COPY" && ac_cv_path_COPY="$COPY"
  1520.   ;;
  1521. esac
  1522. fi
  1523. COPY="$ac_cv_path_COPY"
  1524. if test -n "$COPY"; then
  1525.   echo "$ac_t""$COPY" 1>&6
  1526. else
  1527.   echo "$ac_t""no" 1>&6
  1528. fi
  1529.  
  1530. else
  1531.     echo $ac_n "checking for cp""... $ac_c" 1>&6
  1532. echo "configure:1533: checking for cp" >&5
  1533.     echo "$ac_t""$COPY" 1>&6
  1534. fi
  1535.  
  1536. cf_path_prog=""
  1537. cf_path_args=""
  1538. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1539. for cf_temp in $ac_cv_path_COPY
  1540. do
  1541.     if test -z "$cf_path_prog" ; then
  1542.         cf_path_prog="$cf_temp"
  1543.     elif test -z "$cf_path_args" ; then
  1544.         cf_path_args="$cf_temp"
  1545.     else
  1546.         cf_path_args="$cf_path_args $cf_temp"
  1547.     fi
  1548. done
  1549. IFS="$cf_save_ifs"
  1550.  
  1551. cat >> confdefs.h <<EOF
  1552. #define COPY_PATH "$cf_path_prog"
  1553. EOF
  1554.  
  1555. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1556. #define COPY_ARGS "$cf_path_args"
  1557. EOF
  1558.  
  1559.  
  1560.  
  1561. test -z "$GZIP" && GZIP=gzip
  1562. if test "$with_full_paths" = yes ; then
  1563.     # Extract the first word of "gzip", so it can be a program name with args.
  1564. set dummy gzip; ac_word=$2
  1565. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1566. echo "configure:1567: checking for $ac_word" >&5
  1567. if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then
  1568.   echo $ac_n "(cached) $ac_c" 1>&6
  1569. else
  1570.   case "$GZIP" in
  1571.   /*)
  1572.   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
  1573.   ;;
  1574.   *)
  1575.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1576.   for ac_dir in $PATH; do
  1577.     test -z "$ac_dir" && ac_dir=.
  1578.     if test -f $ac_dir/$ac_word; then
  1579.       ac_cv_path_GZIP="$ac_dir/$ac_word"
  1580.       break
  1581.     fi
  1582.   done
  1583.   IFS="$ac_save_ifs"
  1584.   test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="$GZIP"
  1585.   ;;
  1586. esac
  1587. fi
  1588. GZIP="$ac_cv_path_GZIP"
  1589. if test -n "$GZIP"; then
  1590.   echo "$ac_t""$GZIP" 1>&6
  1591. else
  1592.   echo "$ac_t""no" 1>&6
  1593. fi
  1594.  
  1595. else
  1596.     echo $ac_n "checking for gzip""... $ac_c" 1>&6
  1597. echo "configure:1598: checking for gzip" >&5
  1598.     echo "$ac_t""$GZIP" 1>&6
  1599. fi
  1600.  
  1601. cf_path_prog=""
  1602. cf_path_args=""
  1603. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1604. for cf_temp in $ac_cv_path_GZIP
  1605. do
  1606.     if test -z "$cf_path_prog" ; then
  1607.         cf_path_prog="$cf_temp"
  1608.     elif test -z "$cf_path_args" ; then
  1609.         cf_path_args="$cf_temp"
  1610.     else
  1611.         cf_path_args="$cf_path_args $cf_temp"
  1612.     fi
  1613. done
  1614. IFS="$cf_save_ifs"
  1615.  
  1616. cat >> confdefs.h <<EOF
  1617. #define GZIP_PATH "$cf_path_prog"
  1618. EOF
  1619.  
  1620. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1621. #define GZIP_ARGS "$cf_path_args"
  1622. EOF
  1623.  
  1624.  
  1625.  
  1626. test -z "$MKDIR" && MKDIR=mkdir
  1627. if test "$with_full_paths" = yes ; then
  1628.     # Extract the first word of "mkdir", so it can be a program name with args.
  1629. set dummy mkdir; ac_word=$2
  1630. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1631. echo "configure:1632: checking for $ac_word" >&5
  1632. if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
  1633.   echo $ac_n "(cached) $ac_c" 1>&6
  1634. else
  1635.   case "$MKDIR" in
  1636.   /*)
  1637.   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
  1638.   ;;
  1639.   *)
  1640.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1641.   for ac_dir in $PATH; do
  1642.     test -z "$ac_dir" && ac_dir=.
  1643.     if test -f $ac_dir/$ac_word; then
  1644.       ac_cv_path_MKDIR="$ac_dir/$ac_word"
  1645.       break
  1646.     fi
  1647.   done
  1648.   IFS="$ac_save_ifs"
  1649.   test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="$MKDIR"
  1650.   ;;
  1651. esac
  1652. fi
  1653. MKDIR="$ac_cv_path_MKDIR"
  1654. if test -n "$MKDIR"; then
  1655.   echo "$ac_t""$MKDIR" 1>&6
  1656. else
  1657.   echo "$ac_t""no" 1>&6
  1658. fi
  1659.  
  1660. else
  1661.     echo $ac_n "checking for mkdir""... $ac_c" 1>&6
  1662. echo "configure:1663: checking for mkdir" >&5
  1663.     echo "$ac_t""$MKDIR" 1>&6
  1664. fi
  1665.  
  1666. cf_path_prog=""
  1667. cf_path_args=""
  1668. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1669. for cf_temp in $ac_cv_path_MKDIR
  1670. do
  1671.     if test -z "$cf_path_prog" ; then
  1672.         cf_path_prog="$cf_temp"
  1673.     elif test -z "$cf_path_args" ; then
  1674.         cf_path_args="$cf_temp"
  1675.     else
  1676.         cf_path_args="$cf_path_args $cf_temp"
  1677.     fi
  1678. done
  1679. IFS="$cf_save_ifs"
  1680.  
  1681. cat >> confdefs.h <<EOF
  1682. #define MKDIR_PATH "$cf_path_prog"
  1683. EOF
  1684.  
  1685. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1686. #define MKDIR_ARGS "$cf_path_args"
  1687. EOF
  1688.  
  1689.  
  1690.  
  1691. test -z "$MV" && MV=mv
  1692. if test "$with_full_paths" = yes ; then
  1693.     # Extract the first word of "mv", so it can be a program name with args.
  1694. set dummy mv; ac_word=$2
  1695. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1696. echo "configure:1697: checking for $ac_word" >&5
  1697. if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
  1698.   echo $ac_n "(cached) $ac_c" 1>&6
  1699. else
  1700.   case "$MV" in
  1701.   /*)
  1702.   ac_cv_path_MV="$MV" # Let the user override the test with a path.
  1703.   ;;
  1704.   *)
  1705.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1706.   for ac_dir in $PATH; do
  1707.     test -z "$ac_dir" && ac_dir=.
  1708.     if test -f $ac_dir/$ac_word; then
  1709.       ac_cv_path_MV="$ac_dir/$ac_word"
  1710.       break
  1711.     fi
  1712.   done
  1713.   IFS="$ac_save_ifs"
  1714.   test -z "$ac_cv_path_MV" && ac_cv_path_MV="$MV"
  1715.   ;;
  1716. esac
  1717. fi
  1718. MV="$ac_cv_path_MV"
  1719. if test -n "$MV"; then
  1720.   echo "$ac_t""$MV" 1>&6
  1721. else
  1722.   echo "$ac_t""no" 1>&6
  1723. fi
  1724.  
  1725. else
  1726.     echo $ac_n "checking for mv""... $ac_c" 1>&6
  1727. echo "configure:1728: checking for mv" >&5
  1728.     echo "$ac_t""$MV" 1>&6
  1729. fi
  1730.  
  1731. cf_path_prog=""
  1732. cf_path_args=""
  1733. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1734. for cf_temp in $ac_cv_path_MV
  1735. do
  1736.     if test -z "$cf_path_prog" ; then
  1737.         cf_path_prog="$cf_temp"
  1738.     elif test -z "$cf_path_args" ; then
  1739.         cf_path_args="$cf_temp"
  1740.     else
  1741.         cf_path_args="$cf_path_args $cf_temp"
  1742.     fi
  1743. done
  1744. IFS="$cf_save_ifs"
  1745.  
  1746. cat >> confdefs.h <<EOF
  1747. #define MV_PATH "$cf_path_prog"
  1748. EOF
  1749.  
  1750. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1751. #define MV_ARGS "$cf_path_args"
  1752. EOF
  1753.  
  1754.  
  1755.  
  1756. test -z "$RM" && RM=rm
  1757. if test "$with_full_paths" = yes ; then
  1758.     # Extract the first word of "rm", so it can be a program name with args.
  1759. set dummy rm; ac_word=$2
  1760. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1761. echo "configure:1762: checking for $ac_word" >&5
  1762. if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
  1763.   echo $ac_n "(cached) $ac_c" 1>&6
  1764. else
  1765.   case "$RM" in
  1766.   /*)
  1767.   ac_cv_path_RM="$RM" # Let the user override the test with a path.
  1768.   ;;
  1769.   *)
  1770.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1771.   for ac_dir in $PATH; do
  1772.     test -z "$ac_dir" && ac_dir=.
  1773.     if test -f $ac_dir/$ac_word; then
  1774.       ac_cv_path_RM="$ac_dir/$ac_word"
  1775.       break
  1776.     fi
  1777.   done
  1778.   IFS="$ac_save_ifs"
  1779.   test -z "$ac_cv_path_RM" && ac_cv_path_RM="$RM"
  1780.   ;;
  1781. esac
  1782. fi
  1783. RM="$ac_cv_path_RM"
  1784. if test -n "$RM"; then
  1785.   echo "$ac_t""$RM" 1>&6
  1786. else
  1787.   echo "$ac_t""no" 1>&6
  1788. fi
  1789.  
  1790. else
  1791.     echo $ac_n "checking for rm""... $ac_c" 1>&6
  1792. echo "configure:1793: checking for rm" >&5
  1793.     echo "$ac_t""$RM" 1>&6
  1794. fi
  1795.  
  1796. cf_path_prog=""
  1797. cf_path_args=""
  1798. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1799. for cf_temp in $ac_cv_path_RM
  1800. do
  1801.     if test -z "$cf_path_prog" ; then
  1802.         cf_path_prog="$cf_temp"
  1803.     elif test -z "$cf_path_args" ; then
  1804.         cf_path_args="$cf_temp"
  1805.     else
  1806.         cf_path_args="$cf_path_args $cf_temp"
  1807.     fi
  1808. done
  1809. IFS="$cf_save_ifs"
  1810.  
  1811. cat >> confdefs.h <<EOF
  1812. #define RM_PATH "$cf_path_prog"
  1813. EOF
  1814.  
  1815. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1816. #define RM_ARGS "$cf_path_args"
  1817. EOF
  1818.  
  1819.  
  1820.  
  1821. test -z "$TAR" && TAR=tar
  1822. if test "$with_full_paths" = yes ; then
  1823.     # Extract the first word of "tar", so it can be a program name with args.
  1824. set dummy tar; ac_word=$2
  1825. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1826. echo "configure:1827: checking for $ac_word" >&5
  1827. if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
  1828.   echo $ac_n "(cached) $ac_c" 1>&6
  1829. else
  1830.   case "$TAR" in
  1831.   /*)
  1832.   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
  1833.   ;;
  1834.   *)
  1835.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1836.   for ac_dir in $PATH; do
  1837.     test -z "$ac_dir" && ac_dir=.
  1838.     if test -f $ac_dir/$ac_word; then
  1839.       ac_cv_path_TAR="$ac_dir/$ac_word"
  1840.       break
  1841.     fi
  1842.   done
  1843.   IFS="$ac_save_ifs"
  1844.   test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="$TAR"
  1845.   ;;
  1846. esac
  1847. fi
  1848. TAR="$ac_cv_path_TAR"
  1849. if test -n "$TAR"; then
  1850.   echo "$ac_t""$TAR" 1>&6
  1851. else
  1852.   echo "$ac_t""no" 1>&6
  1853. fi
  1854.  
  1855. else
  1856.     echo $ac_n "checking for tar""... $ac_c" 1>&6
  1857. echo "configure:1858: checking for tar" >&5
  1858.     echo "$ac_t""$TAR" 1>&6
  1859. fi
  1860.  
  1861. cf_path_prog=""
  1862. cf_path_args=""
  1863. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1864. for cf_temp in $ac_cv_path_TAR
  1865. do
  1866.     if test -z "$cf_path_prog" ; then
  1867.         cf_path_prog="$cf_temp"
  1868.     elif test -z "$cf_path_args" ; then
  1869.         cf_path_args="$cf_temp"
  1870.     else
  1871.         cf_path_args="$cf_path_args $cf_temp"
  1872.     fi
  1873. done
  1874. IFS="$cf_save_ifs"
  1875.  
  1876. cat >> confdefs.h <<EOF
  1877. #define TAR_PATH "$cf_path_prog"
  1878. EOF
  1879.  
  1880. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1881. #define TAR_ARGS "$cf_path_args"
  1882. EOF
  1883.  
  1884.  
  1885.  
  1886. test -z "$TOUCH" && TOUCH=touch
  1887. if test "$with_full_paths" = yes ; then
  1888.     # Extract the first word of "touch", so it can be a program name with args.
  1889. set dummy touch; ac_word=$2
  1890. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1891. echo "configure:1892: checking for $ac_word" >&5
  1892. if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then
  1893.   echo $ac_n "(cached) $ac_c" 1>&6
  1894. else
  1895.   case "$TOUCH" in
  1896.   /*)
  1897.   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
  1898.   ;;
  1899.   *)
  1900.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1901.   for ac_dir in $PATH; do
  1902.     test -z "$ac_dir" && ac_dir=.
  1903.     if test -f $ac_dir/$ac_word; then
  1904.       ac_cv_path_TOUCH="$ac_dir/$ac_word"
  1905.       break
  1906.     fi
  1907.   done
  1908.   IFS="$ac_save_ifs"
  1909.   test -z "$ac_cv_path_TOUCH" && ac_cv_path_TOUCH="$TOUCH"
  1910.   ;;
  1911. esac
  1912. fi
  1913. TOUCH="$ac_cv_path_TOUCH"
  1914. if test -n "$TOUCH"; then
  1915.   echo "$ac_t""$TOUCH" 1>&6
  1916. else
  1917.   echo "$ac_t""no" 1>&6
  1918. fi
  1919.  
  1920. else
  1921.     echo $ac_n "checking for touch""... $ac_c" 1>&6
  1922. echo "configure:1923: checking for touch" >&5
  1923.     echo "$ac_t""$TOUCH" 1>&6
  1924. fi
  1925.  
  1926. cf_path_prog=""
  1927. cf_path_args=""
  1928. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1929. for cf_temp in $ac_cv_path_TOUCH
  1930. do
  1931.     if test -z "$cf_path_prog" ; then
  1932.         cf_path_prog="$cf_temp"
  1933.     elif test -z "$cf_path_args" ; then
  1934.         cf_path_args="$cf_temp"
  1935.     else
  1936.         cf_path_args="$cf_path_args $cf_temp"
  1937.     fi
  1938. done
  1939. IFS="$cf_save_ifs"
  1940.  
  1941. cat >> confdefs.h <<EOF
  1942. #define TOUCH_PATH "$cf_path_prog"
  1943. EOF
  1944.  
  1945. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  1946. #define TOUCH_ARGS "$cf_path_args"
  1947. EOF
  1948.  
  1949.  
  1950.  
  1951. test -z "$UNCOMPRESS" && UNCOMPRESS=gunzip
  1952. if test "$with_full_paths" = yes ; then
  1953.     # Extract the first word of "gunzip", so it can be a program name with args.
  1954. set dummy gunzip; ac_word=$2
  1955. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1956. echo "configure:1957: checking for $ac_word" >&5
  1957. if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then
  1958.   echo $ac_n "(cached) $ac_c" 1>&6
  1959. else
  1960.   case "$UNCOMPRESS" in
  1961.   /*)
  1962.   ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path.
  1963.   ;;
  1964.   *)
  1965.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1966.   for ac_dir in $PATH; do
  1967.     test -z "$ac_dir" && ac_dir=.
  1968.     if test -f $ac_dir/$ac_word; then
  1969.       ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word"
  1970.       break
  1971.     fi
  1972.   done
  1973.   IFS="$ac_save_ifs"
  1974.   test -z "$ac_cv_path_UNCOMPRESS" && ac_cv_path_UNCOMPRESS="$UNCOMPRESS"
  1975.   ;;
  1976. esac
  1977. fi
  1978. UNCOMPRESS="$ac_cv_path_UNCOMPRESS"
  1979. if test -n "$UNCOMPRESS"; then
  1980.   echo "$ac_t""$UNCOMPRESS" 1>&6
  1981. else
  1982.   echo "$ac_t""no" 1>&6
  1983. fi
  1984.  
  1985. else
  1986.     echo $ac_n "checking for gunzip""... $ac_c" 1>&6
  1987. echo "configure:1988: checking for gunzip" >&5
  1988.     echo "$ac_t""$UNCOMPRESS" 1>&6
  1989. fi
  1990.  
  1991. cf_path_prog=""
  1992. cf_path_args=""
  1993. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  1994. for cf_temp in $ac_cv_path_UNCOMPRESS
  1995. do
  1996.     if test -z "$cf_path_prog" ; then
  1997.         cf_path_prog="$cf_temp"
  1998.     elif test -z "$cf_path_args" ; then
  1999.         cf_path_args="$cf_temp"
  2000.     else
  2001.         cf_path_args="$cf_path_args $cf_temp"
  2002.     fi
  2003. done
  2004. IFS="$cf_save_ifs"
  2005.  
  2006. cat >> confdefs.h <<EOF
  2007. #define UNCOMPRESS_PATH "$cf_path_prog"
  2008. EOF
  2009.  
  2010. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  2011. #define UNCOMPRESS_ARGS "$cf_path_args"
  2012. EOF
  2013.  
  2014.  
  2015.  
  2016. test -z "$UNZIP" && UNZIP=unzip
  2017. if test "$with_full_paths" = yes ; then
  2018.     # Extract the first word of "unzip", so it can be a program name with args.
  2019. set dummy unzip; ac_word=$2
  2020. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2021. echo "configure:2022: checking for $ac_word" >&5
  2022. if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
  2023.   echo $ac_n "(cached) $ac_c" 1>&6
  2024. else
  2025.   case "$UNZIP" in
  2026.   /*)
  2027.   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
  2028.   ;;
  2029.   *)
  2030.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2031.   for ac_dir in $PATH; do
  2032.     test -z "$ac_dir" && ac_dir=.
  2033.     if test -f $ac_dir/$ac_word; then
  2034.       ac_cv_path_UNZIP="$ac_dir/$ac_word"
  2035.       break
  2036.     fi
  2037.   done
  2038.   IFS="$ac_save_ifs"
  2039.   test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP="$UNZIP"
  2040.   ;;
  2041. esac
  2042. fi
  2043. UNZIP="$ac_cv_path_UNZIP"
  2044. if test -n "$UNZIP"; then
  2045.   echo "$ac_t""$UNZIP" 1>&6
  2046. else
  2047.   echo "$ac_t""no" 1>&6
  2048. fi
  2049.  
  2050. else
  2051.     echo $ac_n "checking for unzip""... $ac_c" 1>&6
  2052. echo "configure:2053: checking for unzip" >&5
  2053.     echo "$ac_t""$UNZIP" 1>&6
  2054. fi
  2055.  
  2056. cf_path_prog=""
  2057. cf_path_args=""
  2058. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  2059. for cf_temp in $ac_cv_path_UNZIP
  2060. do
  2061.     if test -z "$cf_path_prog" ; then
  2062.         cf_path_prog="$cf_temp"
  2063.     elif test -z "$cf_path_args" ; then
  2064.         cf_path_args="$cf_temp"
  2065.     else
  2066.         cf_path_args="$cf_path_args $cf_temp"
  2067.     fi
  2068. done
  2069. IFS="$cf_save_ifs"
  2070.  
  2071. cat >> confdefs.h <<EOF
  2072. #define UNZIP_PATH "$cf_path_prog"
  2073. EOF
  2074.  
  2075. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  2076. #define UNZIP_ARGS "$cf_path_args"
  2077. EOF
  2078.  
  2079.  
  2080.  
  2081. test -z "$UUDECODE" && UUDECODE=uudecode
  2082. if test "$with_full_paths" = yes ; then
  2083.     # Extract the first word of "uudecode", so it can be a program name with args.
  2084. set dummy uudecode; ac_word=$2
  2085. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2086. echo "configure:2087: checking for $ac_word" >&5
  2087. if eval "test \"`echo '$''{'ac_cv_path_UUDECODE'+set}'`\" = set"; then
  2088.   echo $ac_n "(cached) $ac_c" 1>&6
  2089. else
  2090.   case "$UUDECODE" in
  2091.   /*)
  2092.   ac_cv_path_UUDECODE="$UUDECODE" # Let the user override the test with a path.
  2093.   ;;
  2094.   *)
  2095.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2096.   for ac_dir in $PATH; do
  2097.     test -z "$ac_dir" && ac_dir=.
  2098.     if test -f $ac_dir/$ac_word; then
  2099.       ac_cv_path_UUDECODE="$ac_dir/$ac_word"
  2100.       break
  2101.     fi
  2102.   done
  2103.   IFS="$ac_save_ifs"
  2104.   test -z "$ac_cv_path_UUDECODE" && ac_cv_path_UUDECODE="$UUDECODE"
  2105.   ;;
  2106. esac
  2107. fi
  2108. UUDECODE="$ac_cv_path_UUDECODE"
  2109. if test -n "$UUDECODE"; then
  2110.   echo "$ac_t""$UUDECODE" 1>&6
  2111. else
  2112.   echo "$ac_t""no" 1>&6
  2113. fi
  2114.  
  2115. else
  2116.     echo $ac_n "checking for uudecode""... $ac_c" 1>&6
  2117. echo "configure:2118: checking for uudecode" >&5
  2118.     echo "$ac_t""$UUDECODE" 1>&6
  2119. fi
  2120.  
  2121. cf_path_prog=""
  2122. cf_path_args=""
  2123. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  2124. for cf_temp in $ac_cv_path_UUDECODE
  2125. do
  2126.     if test -z "$cf_path_prog" ; then
  2127.         cf_path_prog="$cf_temp"
  2128.     elif test -z "$cf_path_args" ; then
  2129.         cf_path_args="$cf_temp"
  2130.     else
  2131.         cf_path_args="$cf_path_args $cf_temp"
  2132.     fi
  2133. done
  2134. IFS="$cf_save_ifs"
  2135.  
  2136. cat >> confdefs.h <<EOF
  2137. #define UUDECODE_PATH "$cf_path_prog"
  2138. EOF
  2139.  
  2140. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  2141. #define UUDECODE_ARGS "$cf_path_args"
  2142. EOF
  2143.  
  2144.  
  2145.  
  2146. test -z "$ZCAT" && ZCAT=zcat
  2147. if test "$with_full_paths" = yes ; then
  2148.     # Extract the first word of "zcat", so it can be a program name with args.
  2149. set dummy zcat; ac_word=$2
  2150. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2151. echo "configure:2152: checking for $ac_word" >&5
  2152. if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then
  2153.   echo $ac_n "(cached) $ac_c" 1>&6
  2154. else
  2155.   case "$ZCAT" in
  2156.   /*)
  2157.   ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
  2158.   ;;
  2159.   *)
  2160.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2161.   for ac_dir in $PATH; do
  2162.     test -z "$ac_dir" && ac_dir=.
  2163.     if test -f $ac_dir/$ac_word; then
  2164.       ac_cv_path_ZCAT="$ac_dir/$ac_word"
  2165.       break
  2166.     fi
  2167.   done
  2168.   IFS="$ac_save_ifs"
  2169.   test -z "$ac_cv_path_ZCAT" && ac_cv_path_ZCAT="$ZCAT"
  2170.   ;;
  2171. esac
  2172. fi
  2173. ZCAT="$ac_cv_path_ZCAT"
  2174. if test -n "$ZCAT"; then
  2175.   echo "$ac_t""$ZCAT" 1>&6
  2176. else
  2177.   echo "$ac_t""no" 1>&6
  2178. fi
  2179.  
  2180. else
  2181.     echo $ac_n "checking for zcat""... $ac_c" 1>&6
  2182. echo "configure:2183: checking for zcat" >&5
  2183.     echo "$ac_t""$ZCAT" 1>&6
  2184. fi
  2185.  
  2186. cf_path_prog=""
  2187. cf_path_args=""
  2188. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  2189. for cf_temp in $ac_cv_path_ZCAT
  2190. do
  2191.     if test -z "$cf_path_prog" ; then
  2192.         cf_path_prog="$cf_temp"
  2193.     elif test -z "$cf_path_args" ; then
  2194.         cf_path_args="$cf_temp"
  2195.     else
  2196.         cf_path_args="$cf_path_args $cf_temp"
  2197.     fi
  2198. done
  2199. IFS="$cf_save_ifs"
  2200.  
  2201. cat >> confdefs.h <<EOF
  2202. #define ZCAT_PATH "$cf_path_prog"
  2203. EOF
  2204.  
  2205. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  2206. #define ZCAT_ARGS "$cf_path_args"
  2207. EOF
  2208.  
  2209.  
  2210.  
  2211. test -z "$ZIP" && ZIP=zip
  2212. if test "$with_full_paths" = yes ; then
  2213.     # Extract the first word of "zip", so it can be a program name with args.
  2214. set dummy zip; ac_word=$2
  2215. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2216. echo "configure:2217: checking for $ac_word" >&5
  2217. if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
  2218.   echo $ac_n "(cached) $ac_c" 1>&6
  2219. else
  2220.   case "$ZIP" in
  2221.   /*)
  2222.   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
  2223.   ;;
  2224.   *)
  2225.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2226.   for ac_dir in $PATH; do
  2227.     test -z "$ac_dir" && ac_dir=.
  2228.     if test -f $ac_dir/$ac_word; then
  2229.       ac_cv_path_ZIP="$ac_dir/$ac_word"
  2230.       break
  2231.     fi
  2232.   done
  2233.   IFS="$ac_save_ifs"
  2234.   test -z "$ac_cv_path_ZIP" && ac_cv_path_ZIP="$ZIP"
  2235.   ;;
  2236. esac
  2237. fi
  2238. ZIP="$ac_cv_path_ZIP"
  2239. if test -n "$ZIP"; then
  2240.   echo "$ac_t""$ZIP" 1>&6
  2241. else
  2242.   echo "$ac_t""no" 1>&6
  2243. fi
  2244.  
  2245. else
  2246.     echo $ac_n "checking for zip""... $ac_c" 1>&6
  2247. echo "configure:2248: checking for zip" >&5
  2248.     echo "$ac_t""$ZIP" 1>&6
  2249. fi
  2250.  
  2251. cf_path_prog=""
  2252. cf_path_args=""
  2253. IFS="${IFS=     }"; cf_save_ifs="$IFS"; IFS="${IFS}:"
  2254. for cf_temp in $ac_cv_path_ZIP
  2255. do
  2256.     if test -z "$cf_path_prog" ; then
  2257.         cf_path_prog="$cf_temp"
  2258.     elif test -z "$cf_path_args" ; then
  2259.         cf_path_args="$cf_temp"
  2260.     else
  2261.         cf_path_args="$cf_path_args $cf_temp"
  2262.     fi
  2263. done
  2264. IFS="$cf_save_ifs"
  2265.  
  2266. cat >> confdefs.h <<EOF
  2267. #define ZIP_PATH "$cf_path_prog"
  2268. EOF
  2269.  
  2270. test -n "$cf_path_args" && cat >> confdefs.h <<EOF
  2271. #define ZIP_ARGS "$cf_path_args"
  2272. EOF
  2273.  
  2274.  
  2275.  
  2276. case "$INSTALL" in
  2277. $srcdir*) # (vi
  2278.     cat >> confdefs.h <<EOF
  2279. #define INSTALL_PATH "install"
  2280. EOF
  2281.  
  2282.     ;;
  2283. *) # (vi
  2284.     cat >> confdefs.h <<EOF
  2285. #define INSTALL_PATH "$INSTALL"
  2286. EOF
  2287.  
  2288.     ;;
  2289. esac
  2290.  
  2291.  
  2292. cat >> confdefs.h <<\EOF
  2293. #define UNIX 1
  2294. EOF
  2295.  
  2296.  
  2297. if test -z "$GCC" ; then
  2298.     
  2299. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  2300. echo "configure:2301: checking for ${CC-cc} option to accept ANSI C" >&5
  2301. if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
  2302.   echo $ac_n "(cached) $ac_c" 1>&6
  2303. else
  2304.   
  2305. cf_cv_ansi_cc=no
  2306. cf_save_CFLAGS="$CFLAGS"
  2307. # Don't try gcc -ansi; that turns off useful extensions and
  2308. # breaks some systems' header files.
  2309. # AIX            -qlanglvl=ansi
  2310. # Ultrix and OSF/1    -std1
  2311. # HP-UX            -Aa -D_HPUX_SOURCE
  2312. # SVR4            -Xc
  2313. # UnixWare 1.2        (cannot use -Xc, since ANSI/POSIX clashes)
  2314. for cf_arg in "-DCC_HAS_PROTOS" \
  2315.     "" \
  2316.     -qlanglvl=ansi \
  2317.     -std1 \
  2318.     "-Aa -D_HPUX_SOURCE +e" \
  2319.     "-Aa -D_HPUX_SOURCE" \
  2320.     -Xc
  2321. do
  2322.     CFLAGS="$cf_save_CFLAGS $cf_arg"
  2323.     cat > conftest.$ac_ext <<EOF
  2324. #line 2325 "configure"
  2325. #include "confdefs.h"
  2326.  
  2327. #ifndef CC_HAS_PROTOS
  2328. #if !defined(__STDC__) || __STDC__ != 1
  2329. choke me
  2330. #endif
  2331. #endif
  2332.  
  2333. int main() {
  2334.  
  2335.     int test (int i, double x);
  2336.     struct s1 {int (*f) (int a);};
  2337.     struct s2 {int (*f) (double a);};
  2338. ; return 0; }
  2339. EOF
  2340. if { (eval echo configure:2341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2341.   rm -rf conftest*
  2342.   cf_cv_ansi_cc="$cf_arg"; break
  2343. else
  2344.   echo "configure: failed program was:" >&5
  2345.   cat conftest.$ac_ext >&5
  2346. fi
  2347. rm -f conftest*
  2348. done
  2349. CFLAGS="$cf_save_CFLAGS"
  2350.  
  2351. fi
  2352.  
  2353. echo "$ac_t""$cf_cv_ansi_cc" 1>&6
  2354.  
  2355. if test "$cf_cv_ansi_cc" != "no"; then
  2356. if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
  2357.     CFLAGS="$CFLAGS $cf_cv_ansi_cc"
  2358. else
  2359.     cat >> confdefs.h <<\EOF
  2360. #define CC_HAS_PROTOS 1
  2361. EOF
  2362.  
  2363. fi
  2364. fi
  2365.  
  2366. fi
  2367. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2368. echo "configure:2369: checking for working const" >&5
  2369. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2370.   echo $ac_n "(cached) $ac_c" 1>&6
  2371. else
  2372.   cat > conftest.$ac_ext <<EOF
  2373. #line 2374 "configure"
  2374. #include "confdefs.h"
  2375.  
  2376. int main() {
  2377.  
  2378. /* Ultrix mips cc rejects this.  */
  2379. typedef int charset[2]; const charset x;
  2380. /* SunOS 4.1.1 cc rejects this.  */
  2381. char const *const *ccp;
  2382. char **p;
  2383. /* NEC SVR4.0.2 mips cc rejects this.  */
  2384. struct point {int x, y;};
  2385. static struct point const zero = {0,0};
  2386. /* AIX XL C 1.02.0.0 rejects this.
  2387.    It does not let you subtract one const X* pointer from another in an arm
  2388.    of an if-expression whose if-part is not a constant expression */
  2389. const char *g = "string";
  2390. ccp = &g + (g ? g-g : 0);
  2391. /* HPUX 7.0 cc rejects these. */
  2392. ++ccp;
  2393. p = (char**) ccp;
  2394. ccp = (char const *const *) p;
  2395. { /* SCO 3.2v4 cc rejects this.  */
  2396.   char *t;
  2397.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2398.  
  2399.   *t++ = 0;
  2400. }
  2401. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2402.   int x[] = {25, 17};
  2403.   const int *foo = &x[0];
  2404.   ++foo;
  2405. }
  2406. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2407.   typedef const int *iptr;
  2408.   iptr p = 0;
  2409.   ++p;
  2410. }
  2411. { /* AIX XL C 1.02.0.0 rejects this saying
  2412.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2413.   struct s { int j; const int *ap[3]; };
  2414.   struct s *b; b->j = 5;
  2415. }
  2416. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2417.   const int foo = 10;
  2418. }
  2419.  
  2420. ; return 0; }
  2421. EOF
  2422. if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2423.   rm -rf conftest*
  2424.   ac_cv_c_const=yes
  2425. else
  2426.   echo "configure: failed program was:" >&5
  2427.   cat conftest.$ac_ext >&5
  2428.   rm -rf conftest*
  2429.   ac_cv_c_const=no
  2430. fi
  2431. rm -f conftest*
  2432. fi
  2433.  
  2434. echo "$ac_t""$ac_cv_c_const" 1>&6
  2435. if test $ac_cv_c_const = no; then
  2436.   cat >> confdefs.h <<\EOF
  2437. #define const 
  2438. EOF
  2439.  
  2440. fi
  2441.  
  2442.  
  2443. PROG_EXT=
  2444. case $host_os in
  2445. aix4*)
  2446.     CFLAGS="$CFLAGS -DAIX4 -D_BSD=44" 
  2447.     LIBS="$LIBS -lbsd"
  2448.     ;;
  2449. aix*)
  2450.     LIBS="$LIBS -lbsd"
  2451.     ;;
  2452. apollo*)
  2453.     CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4"
  2454.     ;;
  2455. bsdi*)
  2456.     CFLAGS="$CFLAGS -DBSDI" 
  2457.     ;;
  2458. clix*)
  2459.     # Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
  2460.     # contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
  2461.     # references -lmalloc and -lbsd.
  2462.     echo $ac_n "checking for strcmp in -lc_s""... $ac_c" 1>&6
  2463. echo "configure:2464: checking for strcmp in -lc_s" >&5
  2464. ac_lib_var=`echo c_s'_'strcmp | sed 'y%./+-%__p_%'`
  2465. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2466.   echo $ac_n "(cached) $ac_c" 1>&6
  2467. else
  2468.   ac_save_LIBS="$LIBS"
  2469. LIBS="-lc_s  $LIBS"
  2470. cat > conftest.$ac_ext <<EOF
  2471. #line 2472 "configure"
  2472. #include "confdefs.h"
  2473. /* Override any gcc2 internal prototype to avoid an error.  */
  2474. /* We use char because int might match the return type of a gcc2
  2475.     builtin and then its argument prototype would still apply.  */
  2476. char strcmp();
  2477.  
  2478. int main() {
  2479. strcmp()
  2480. ; return 0; }
  2481. EOF
  2482. if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2483.   rm -rf conftest*
  2484.   eval "ac_cv_lib_$ac_lib_var=yes"
  2485. else
  2486.   echo "configure: failed program was:" >&5
  2487.   cat conftest.$ac_ext >&5
  2488.   rm -rf conftest*
  2489.   eval "ac_cv_lib_$ac_lib_var=no"
  2490. fi
  2491. rm -f conftest*
  2492. LIBS="$ac_save_LIBS"
  2493.  
  2494. fi
  2495. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2496.   echo "$ac_t""yes" 1>&6
  2497.     ac_tr_lib=HAVE_LIB`echo c_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2498.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2499.   cat >> confdefs.h <<EOF
  2500. #define $ac_tr_lib 1
  2501. EOF
  2502.  
  2503.   LIBS="-lc_s $LIBS"
  2504.  
  2505. else
  2506.   echo "$ac_t""no" 1>&6
  2507. fi
  2508.  
  2509.     ;;
  2510. convex*)
  2511.     CFLAGS="$CFLAGS -D__STDC__ -Dunix"
  2512.     ;;
  2513. dgux*)
  2514.     CFLAGS="$CFLAGS -DDGUX" 
  2515.     ;;
  2516. hpux*)
  2517.     CFLAGS="$CFLAGS -DSNAKE" 
  2518.     ;;
  2519. isc*)
  2520.     # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
  2521.     CFLAGS="$CFLAGS -DISC -DPOSIX_JC"
  2522.     LIBS="$LIBS -linet -lnsl_s -lcposix"
  2523.     ;;
  2524. irix*)
  2525.     # The original makefile used the $CFLAGS option -cckr for some form
  2526.     # of K&R compatibility.  However, this causes compilation warnings for
  2527.     # varargs on IRIX 5.2, and does not appear to be needed.
  2528.     #removed: CFLAGS="$CFLAGS -cckr" 
  2529.     ;;
  2530. linux*)
  2531.     CFLAGS="$CFLAGS -DLINUX" 
  2532.     ;;
  2533. next*)
  2534.     CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK"
  2535.     ;;
  2536. openbsd*)
  2537.     LIBS="$LIBS -lcompat"
  2538.     ;;
  2539. os2*)
  2540.     # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
  2541.     CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
  2542.     LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
  2543.     PROG_EXT=".exe"
  2544.     ;;
  2545. osf4*) 
  2546.     # The -Olimit flag (see below) is no longer available with 
  2547.     # Digital C 5.2, which is bundled with Digital UNIX 4.0. 
  2548.     CFLAGS="$CFLAGS -DDSYS5" 
  2549.     ;; 
  2550. osf*)
  2551.     # Increase the maximum size of functions that will be optimized.
  2552.     test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000"
  2553.     CFLAGS="$CFLAGS -DDSYS5"
  2554.     ;;
  2555. sco3.2v5*)
  2556.     test $ac_cv_prog_gcc != yes && CC="cc -belf"
  2557.     ;;
  2558. sco*)
  2559.     LIBS="$LIBS -lmalloc"
  2560.     # It's a little late to do much, but try to warn user if he's using
  2561.     # SCO's cc (which is reported to have broken const/volatile).
  2562.     case "$CC" in #(vi
  2563.     cc|*/cc)
  2564.         echo "configure: warning: You should consider using gcc or rcc if available" 1>&2
  2565.         unset ac_cv_prog_CC
  2566.         for ac_prog in gcc rcc
  2567. do
  2568. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2569. set dummy $ac_prog; ac_word=$2
  2570. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2571. echo "configure:2572: checking for $ac_word" >&5
  2572. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  2573.   echo $ac_n "(cached) $ac_c" 1>&6
  2574. else
  2575.   if test -n "$CC"; then
  2576.   ac_cv_prog_CC="$CC" # Let the user override the test.
  2577. else
  2578.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2579.   for ac_dir in $PATH; do
  2580.     test -z "$ac_dir" && ac_dir=.
  2581.     if test -f $ac_dir/$ac_word; then
  2582.       ac_cv_prog_CC="$ac_prog"
  2583.       break
  2584.     fi
  2585.   done
  2586.   IFS="$ac_save_ifs"
  2587. fi
  2588. fi
  2589. CC="$ac_cv_prog_CC"
  2590. if test -n "$CC"; then
  2591.   echo "$ac_t""$CC" 1>&6
  2592. else
  2593.   echo "$ac_t""no" 1>&6
  2594. fi
  2595.  
  2596. test -n "$CC" && break
  2597. done
  2598. test -n "$CC" || CC="$CC"
  2599.  
  2600.         ;;
  2601.     esac
  2602.     ;;
  2603. sequent-ptx)
  2604.     CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
  2605.     ;;
  2606. sequent-ptx2)
  2607.     CFLAGS="$CFLAGS -DSVR4_BSDSELECT"
  2608.     ;;
  2609. sony-newsos*)
  2610.     CFLAGS="$CFLAGS -I/usr/sony/include"
  2611.     for ac_hdr in jcurses.h
  2612. do
  2613. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2614. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2615. echo "configure:2616: checking for $ac_hdr" >&5
  2616. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2617.   echo $ac_n "(cached) $ac_c" 1>&6
  2618. else
  2619.   cat > conftest.$ac_ext <<EOF
  2620. #line 2621 "configure"
  2621. #include "confdefs.h"
  2622. #include <$ac_hdr>
  2623. EOF
  2624. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2625. { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2626. ac_err=`grep -v '^ *+' conftest.out`
  2627. if test -z "$ac_err"; then
  2628.   rm -rf conftest*
  2629.   eval "ac_cv_header_$ac_safe=yes"
  2630. else
  2631.   echo "$ac_err" >&5
  2632.   echo "configure: failed program was:" >&5
  2633.   cat conftest.$ac_ext >&5
  2634.   rm -rf conftest*
  2635.   eval "ac_cv_header_$ac_safe=no"
  2636. fi
  2637. rm -f conftest*
  2638. fi
  2639. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2640.   echo "$ac_t""yes" 1>&6
  2641.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2642.   cat >> confdefs.h <<EOF
  2643. #define $ac_tr_hdr 1
  2644. EOF
  2645.  
  2646. else
  2647.   echo "$ac_t""no" 1>&6
  2648. fi
  2649. done
  2650.  
  2651.     ;;
  2652. svr4)
  2653.     CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DSVR4"
  2654.     ;;
  2655. sunos3*)
  2656.     CFLAGS="$CFLAGS -DSUN"
  2657.     ;;
  2658. sunos4*)
  2659.     CFLAGS="$CFLAGS -DSUN -DSUN4"
  2660.     ;;
  2661. ultrix*)
  2662.     # Increase the maximum size of functions that will be optimized.
  2663.     test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7"
  2664.     CFLAGS="$CFLAGS -DULTRIX" 
  2665.     for ac_hdr in cursesX.h
  2666. do
  2667. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2668. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2669. echo "configure:2670: checking for $ac_hdr" >&5
  2670. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2671.   echo $ac_n "(cached) $ac_c" 1>&6
  2672. else
  2673.   cat > conftest.$ac_ext <<EOF
  2674. #line 2675 "configure"
  2675. #include "confdefs.h"
  2676. #include <$ac_hdr>
  2677. EOF
  2678. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2679. { (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2680. ac_err=`grep -v '^ *+' conftest.out`
  2681. if test -z "$ac_err"; then
  2682.   rm -rf conftest*
  2683.   eval "ac_cv_header_$ac_safe=yes"
  2684. else
  2685.   echo "$ac_err" >&5
  2686.   echo "configure: failed program was:" >&5
  2687.   cat conftest.$ac_ext >&5
  2688.   rm -rf conftest*
  2689.   eval "ac_cv_header_$ac_safe=no"
  2690. fi
  2691. rm -f conftest*
  2692. fi
  2693. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2694.   echo "$ac_t""yes" 1>&6
  2695.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2696.   cat >> confdefs.h <<EOF
  2697. #define $ac_tr_hdr 1
  2698. EOF
  2699.  cf_cv_ncurses_header=cursesX.h
  2700. else
  2701.   echo "$ac_t""no" 1>&6
  2702. fi
  2703. done
  2704.  
  2705.     ;;
  2706. esac
  2707.  
  2708.  
  2709.  
  2710.  
  2711. cf_test_netlibs=no
  2712. echo $ac_n "checking for network libraries""... $ac_c" 1>&6
  2713. echo "configure:2714: checking for network libraries" >&5
  2714. if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then
  2715.   echo $ac_n "(cached) $ac_c" 1>&6
  2716. else
  2717.   
  2718. echo "$ac_t""working..." 1>&6
  2719. cf_cv_netlibs=""
  2720. cf_test_netlibs=yes
  2721. for ac_func in gethostname
  2722. do
  2723. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2724. echo "configure:2725: checking for $ac_func" >&5
  2725. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2726.   echo $ac_n "(cached) $ac_c" 1>&6
  2727. else
  2728.   cat > conftest.$ac_ext <<EOF
  2729. #line 2730 "configure"
  2730. #include "confdefs.h"
  2731. /* System header to define __stub macros and hopefully few prototypes,
  2732.     which can conflict with char $ac_func(); below.  */
  2733. #include <assert.h>
  2734. /* Override any gcc2 internal prototype to avoid an error.  */
  2735. /* We use char because int might match the return type of a gcc2
  2736.     builtin and then its argument prototype would still apply.  */
  2737. char $ac_func();
  2738.  
  2739. int main() {
  2740.  
  2741. /* The GNU C library defines this for functions which it implements
  2742.     to always fail with ENOSYS.  Some functions are actually named
  2743.     something starting with __ and the normal name is an alias.  */
  2744. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2745. choke me
  2746. #else
  2747. $ac_func();
  2748. #endif
  2749.  
  2750. ; return 0; }
  2751. EOF
  2752. if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2753.   rm -rf conftest*
  2754.   eval "ac_cv_func_$ac_func=yes"
  2755. else
  2756.   echo "configure: failed program was:" >&5
  2757.   cat conftest.$ac_ext >&5
  2758.   rm -rf conftest*
  2759.   eval "ac_cv_func_$ac_func=no"
  2760. fi
  2761. rm -f conftest*
  2762. fi
  2763.  
  2764. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2765.   echo "$ac_t""yes" 1>&6
  2766.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2767.   cat >> confdefs.h <<EOF
  2768. #define $ac_tr_func 1
  2769. EOF
  2770.  
  2771. else
  2772.   echo "$ac_t""no" 1>&6
  2773.  
  2774. echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
  2775. echo "configure:2776: checking for gethostname in -lnsl" >&5
  2776. ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
  2777. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2778.   echo $ac_n "(cached) $ac_c" 1>&6
  2779. else
  2780.   ac_save_LIBS="$LIBS"
  2781. LIBS="-lnsl $cf_cv_netlibs $LIBS"
  2782. cat > conftest.$ac_ext <<EOF
  2783. #line 2784 "configure"
  2784. #include "confdefs.h"
  2785. /* Override any gcc2 internal prototype to avoid an error.  */
  2786. /* We use char because int might match the return type of a gcc2
  2787.     builtin and then its argument prototype would still apply.  */
  2788. char gethostname();
  2789.  
  2790. int main() {
  2791. gethostname()
  2792. ; return 0; }
  2793. EOF
  2794. if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2795.   rm -rf conftest*
  2796.   eval "ac_cv_lib_$ac_lib_var=yes"
  2797. else
  2798.   echo "configure: failed program was:" >&5
  2799.   cat conftest.$ac_ext >&5
  2800.   rm -rf conftest*
  2801.   eval "ac_cv_lib_$ac_lib_var=no"
  2802. fi
  2803. rm -f conftest*
  2804. LIBS="$ac_save_LIBS"
  2805.  
  2806. fi
  2807. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2808.   echo "$ac_t""yes" 1>&6
  2809.   
  2810.     
  2811. cf_tr_func=`echo gethostname | tr 'a-z' 'A-Z'`
  2812.  
  2813.     cat >> confdefs.h <<EOF
  2814. #define HAVE_$cf_tr_func 1
  2815. EOF
  2816.  
  2817.     ac_cv_func_gethostname=yes
  2818.     cf_cv_netlibs="-lnsl $cf_cv_netlibs"
  2819. else
  2820.   echo "$ac_t""no" 1>&6
  2821.  
  2822.     ac_cv_func_gethostname=unknown
  2823.     unset ac_cv_func_gethostname 2>/dev/null
  2824.     
  2825.         
  2826. echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
  2827. echo "configure:2828: checking for gethostname in -lsocket" >&5
  2828. ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
  2829. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2830.   echo $ac_n "(cached) $ac_c" 1>&6
  2831. else
  2832.   ac_save_LIBS="$LIBS"
  2833. LIBS="-lsocket $cf_cv_netlibs $LIBS"
  2834. cat > conftest.$ac_ext <<EOF
  2835. #line 2836 "configure"
  2836. #include "confdefs.h"
  2837. /* Override any gcc2 internal prototype to avoid an error.  */
  2838. /* We use char because int might match the return type of a gcc2
  2839.     builtin and then its argument prototype would still apply.  */
  2840. char gethostname();
  2841.  
  2842. int main() {
  2843. gethostname()
  2844. ; return 0; }
  2845. EOF
  2846. if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2847.   rm -rf conftest*
  2848.   eval "ac_cv_lib_$ac_lib_var=yes"
  2849. else
  2850.   echo "configure: failed program was:" >&5
  2851.   cat conftest.$ac_ext >&5
  2852.   rm -rf conftest*
  2853.   eval "ac_cv_lib_$ac_lib_var=no"
  2854. fi
  2855. rm -f conftest*
  2856. LIBS="$ac_save_LIBS"
  2857.  
  2858. fi
  2859. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2860.   echo "$ac_t""yes" 1>&6
  2861.   
  2862.     
  2863. cf_tr_func=`echo gethostname | tr 'a-z' 'A-Z'`
  2864.  
  2865.     cat >> confdefs.h <<EOF
  2866. #define HAVE_$cf_tr_func 1
  2867. EOF
  2868.  
  2869.     ac_cv_func_gethostname=yes
  2870.     cf_cv_netlibs="-lsocket $cf_cv_netlibs"
  2871. else
  2872.   echo "$ac_t""no" 1>&6
  2873.  
  2874.     ac_cv_func_gethostname=unknown
  2875.     unset ac_cv_func_gethostname 2>/dev/null
  2876.     
  2877. fi
  2878.  
  2879.  
  2880. fi
  2881.  
  2882.  
  2883. fi
  2884. done
  2885.  
  2886. #
  2887. # FIXME:  sequent needs this library (i.e., -lsocket -linet -lnsl), but
  2888. # I don't know the entrypoints - 97/7/22 TD
  2889. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  2890. echo "configure:2891: checking for -linet" >&5
  2891. if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then
  2892.   echo $ac_n "(cached) $ac_c" 1>&6
  2893. else
  2894.   ac_save_LIBS="$LIBS"
  2895. LIBS="-linet  $LIBS"
  2896. cat > conftest.$ac_ext <<EOF
  2897. #line 2898 "configure"
  2898. #include "confdefs.h"
  2899.  
  2900. int main() {
  2901. main()
  2902. ; return 0; }
  2903. EOF
  2904. if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2905.   rm -rf conftest*
  2906.   ac_cv_lib_inet=yes
  2907. else
  2908.   echo "configure: failed program was:" >&5
  2909.   cat conftest.$ac_ext >&5
  2910.   rm -rf conftest*
  2911.   ac_cv_lib_inet=no
  2912. fi
  2913. rm -f conftest*
  2914. LIBS="$ac_save_LIBS"
  2915.  
  2916. fi
  2917. echo "$ac_t""$ac_cv_lib_inet" 1>&6
  2918. if test "$ac_cv_lib_inet" = yes; then
  2919.   cf_cv_netlibs="-linet $cf_cv_netlibs"
  2920. fi
  2921.  
  2922. #
  2923. if test "$ac_cv_func_lsocket" != no ; then
  2924. for ac_func in socket
  2925. do
  2926. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2927. echo "configure:2928: checking for $ac_func" >&5
  2928. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2929.   echo $ac_n "(cached) $ac_c" 1>&6
  2930. else
  2931.   cat > conftest.$ac_ext <<EOF
  2932. #line 2933 "configure"
  2933. #include "confdefs.h"
  2934. /* System header to define __stub macros and hopefully few prototypes,
  2935.     which can conflict with char $ac_func(); below.  */
  2936. #include <assert.h>
  2937. /* Override any gcc2 internal prototype to avoid an error.  */
  2938. /* We use char because int might match the return type of a gcc2
  2939.     builtin and then its argument prototype would still apply.  */
  2940. char $ac_func();
  2941.  
  2942. int main() {
  2943.  
  2944. /* The GNU C library defines this for functions which it implements
  2945.     to always fail with ENOSYS.  Some functions are actually named
  2946.     something starting with __ and the normal name is an alias.  */
  2947. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2948. choke me
  2949. #else
  2950. $ac_func();
  2951. #endif
  2952.  
  2953. ; return 0; }
  2954. EOF
  2955. if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2956.   rm -rf conftest*
  2957.   eval "ac_cv_func_$ac_func=yes"
  2958. else
  2959.   echo "configure: failed program was:" >&5
  2960.   cat conftest.$ac_ext >&5
  2961.   rm -rf conftest*
  2962.   eval "ac_cv_func_$ac_func=no"
  2963. fi
  2964. rm -f conftest*
  2965. fi
  2966.  
  2967. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2968.   echo "$ac_t""yes" 1>&6
  2969.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2970.   cat >> confdefs.h <<EOF
  2971. #define $ac_tr_func 1
  2972. EOF
  2973.  
  2974. else
  2975.   echo "$ac_t""no" 1>&6
  2976.  
  2977. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  2978. echo "configure:2979: checking for socket in -lsocket" >&5
  2979. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  2980. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2981.   echo $ac_n "(cached) $ac_c" 1>&6
  2982. else
  2983.   ac_save_LIBS="$LIBS"
  2984. LIBS="-lsocket $cf_cv_netlibs $LIBS"
  2985. cat > conftest.$ac_ext <<EOF
  2986. #line 2987 "configure"
  2987. #include "confdefs.h"
  2988. /* Override any gcc2 internal prototype to avoid an error.  */
  2989. /* We use char because int might match the return type of a gcc2
  2990.     builtin and then its argument prototype would still apply.  */
  2991. char socket();
  2992.  
  2993. int main() {
  2994. socket()
  2995. ; return 0; }
  2996. EOF
  2997. if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2998.   rm -rf conftest*
  2999.   eval "ac_cv_lib_$ac_lib_var=yes"
  3000. else
  3001.   echo "configure: failed program was:" >&5
  3002.   cat conftest.$ac_ext >&5
  3003.   rm -rf conftest*
  3004.   eval "ac_cv_lib_$ac_lib_var=no"
  3005. fi
  3006. rm -f conftest*
  3007. LIBS="$ac_save_LIBS"
  3008.  
  3009. fi
  3010. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3011.   echo "$ac_t""yes" 1>&6
  3012.   
  3013.     
  3014. cf_tr_func=`echo socket | tr 'a-z' 'A-Z'`
  3015.  
  3016.     cat >> confdefs.h <<EOF
  3017. #define HAVE_$cf_tr_func 1
  3018. EOF
  3019.  
  3020.     ac_cv_func_socket=yes
  3021.     cf_cv_netlibs="-lsocket $cf_cv_netlibs"
  3022. else
  3023.   echo "$ac_t""no" 1>&6
  3024.  
  3025.     ac_cv_func_socket=unknown
  3026.     unset ac_cv_func_socket 2>/dev/null
  3027.     
  3028.         
  3029. echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
  3030. echo "configure:3031: checking for socket in -lbsd" >&5
  3031. ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
  3032. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3033.   echo $ac_n "(cached) $ac_c" 1>&6
  3034. else
  3035.   ac_save_LIBS="$LIBS"
  3036. LIBS="-lbsd $cf_cv_netlibs $LIBS"
  3037. cat > conftest.$ac_ext <<EOF
  3038. #line 3039 "configure"
  3039. #include "confdefs.h"
  3040. /* Override any gcc2 internal prototype to avoid an error.  */
  3041. /* We use char because int might match the return type of a gcc2
  3042.     builtin and then its argument prototype would still apply.  */
  3043. char socket();
  3044.  
  3045. int main() {
  3046. socket()
  3047. ; return 0; }
  3048. EOF
  3049. if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3050.   rm -rf conftest*
  3051.   eval "ac_cv_lib_$ac_lib_var=yes"
  3052. else
  3053.   echo "configure: failed program was:" >&5
  3054.   cat conftest.$ac_ext >&5
  3055.   rm -rf conftest*
  3056.   eval "ac_cv_lib_$ac_lib_var=no"
  3057. fi
  3058. rm -f conftest*
  3059. LIBS="$ac_save_LIBS"
  3060.  
  3061. fi
  3062. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3063.   echo "$ac_t""yes" 1>&6
  3064.   
  3065.     
  3066. cf_tr_func=`echo socket | tr 'a-z' 'A-Z'`
  3067.  
  3068.     cat >> confdefs.h <<EOF
  3069. #define HAVE_$cf_tr_func 1
  3070. EOF
  3071.  
  3072.     ac_cv_func_socket=yes
  3073.     cf_cv_netlibs="-lbsd $cf_cv_netlibs"
  3074. else
  3075.   echo "$ac_t""no" 1>&6
  3076.  
  3077.     ac_cv_func_socket=unknown
  3078.     unset ac_cv_func_socket 2>/dev/null
  3079.     
  3080. fi
  3081.  
  3082.  
  3083. fi
  3084.  
  3085.  
  3086. fi
  3087. done
  3088.  
  3089. fi
  3090. #
  3091. for ac_func in gethostbyname
  3092. do
  3093. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3094. echo "configure:3095: checking for $ac_func" >&5
  3095. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3096.   echo $ac_n "(cached) $ac_c" 1>&6
  3097. else
  3098.   cat > conftest.$ac_ext <<EOF
  3099. #line 3100 "configure"
  3100. #include "confdefs.h"
  3101. /* System header to define __stub macros and hopefully few prototypes,
  3102.     which can conflict with char $ac_func(); below.  */
  3103. #include <assert.h>
  3104. /* Override any gcc2 internal prototype to avoid an error.  */
  3105. /* We use char because int might match the return type of a gcc2
  3106.     builtin and then its argument prototype would still apply.  */
  3107. char $ac_func();
  3108.  
  3109. int main() {
  3110.  
  3111. /* The GNU C library defines this for functions which it implements
  3112.     to always fail with ENOSYS.  Some functions are actually named
  3113.     something starting with __ and the normal name is an alias.  */
  3114. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3115. choke me
  3116. #else
  3117. $ac_func();
  3118. #endif
  3119.  
  3120. ; return 0; }
  3121. EOF
  3122. if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3123.   rm -rf conftest*
  3124.   eval "ac_cv_func_$ac_func=yes"
  3125. else
  3126.   echo "configure: failed program was:" >&5
  3127.   cat conftest.$ac_ext >&5
  3128.   rm -rf conftest*
  3129.   eval "ac_cv_func_$ac_func=no"
  3130. fi
  3131. rm -f conftest*
  3132. fi
  3133.  
  3134. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3135.   echo "$ac_t""yes" 1>&6
  3136.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3137.   cat >> confdefs.h <<EOF
  3138. #define $ac_tr_func 1
  3139. EOF
  3140.  
  3141. else
  3142.   echo "$ac_t""no" 1>&6
  3143.  
  3144. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3145. echo "configure:3146: checking for gethostbyname in -lnsl" >&5
  3146. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3147. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3148.   echo $ac_n "(cached) $ac_c" 1>&6
  3149. else
  3150.   ac_save_LIBS="$LIBS"
  3151. LIBS="-lnsl $cf_cv_netlibs $LIBS"
  3152. cat > conftest.$ac_ext <<EOF
  3153. #line 3154 "configure"
  3154. #include "confdefs.h"
  3155. /* Override any gcc2 internal prototype to avoid an error.  */
  3156. /* We use char because int might match the return type of a gcc2
  3157.     builtin and then its argument prototype would still apply.  */
  3158. char gethostbyname();
  3159.  
  3160. int main() {
  3161. gethostbyname()
  3162. ; return 0; }
  3163. EOF
  3164. if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3165.   rm -rf conftest*
  3166.   eval "ac_cv_lib_$ac_lib_var=yes"
  3167. else
  3168.   echo "configure: failed program was:" >&5
  3169.   cat conftest.$ac_ext >&5
  3170.   rm -rf conftest*
  3171.   eval "ac_cv_lib_$ac_lib_var=no"
  3172. fi
  3173. rm -f conftest*
  3174. LIBS="$ac_save_LIBS"
  3175.  
  3176. fi
  3177. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3178.   echo "$ac_t""yes" 1>&6
  3179.   
  3180.     
  3181. cf_tr_func=`echo gethostbyname | tr 'a-z' 'A-Z'`
  3182.  
  3183.     cat >> confdefs.h <<EOF
  3184. #define HAVE_$cf_tr_func 1
  3185. EOF
  3186.  
  3187.     ac_cv_func_gethostbyname=yes
  3188.     cf_cv_netlibs="-lnsl $cf_cv_netlibs"
  3189. else
  3190.   echo "$ac_t""no" 1>&6
  3191.  
  3192.     ac_cv_func_gethostbyname=unknown
  3193.     unset ac_cv_func_gethostbyname 2>/dev/null
  3194.     
  3195. fi
  3196.  
  3197.  
  3198. fi
  3199. done
  3200.  
  3201. #
  3202. for ac_func in strcasecmp
  3203. do
  3204. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3205. echo "configure:3206: checking for $ac_func" >&5
  3206. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3207.   echo $ac_n "(cached) $ac_c" 1>&6
  3208. else
  3209.   cat > conftest.$ac_ext <<EOF
  3210. #line 3211 "configure"
  3211. #include "confdefs.h"
  3212. /* System header to define __stub macros and hopefully few prototypes,
  3213.     which can conflict with char $ac_func(); below.  */
  3214. #include <assert.h>
  3215. /* Override any gcc2 internal prototype to avoid an error.  */
  3216. /* We use char because int might match the return type of a gcc2
  3217.     builtin and then its argument prototype would still apply.  */
  3218. char $ac_func();
  3219.  
  3220. int main() {
  3221.  
  3222. /* The GNU C library defines this for functions which it implements
  3223.     to always fail with ENOSYS.  Some functions are actually named
  3224.     something starting with __ and the normal name is an alias.  */
  3225. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3226. choke me
  3227. #else
  3228. $ac_func();
  3229. #endif
  3230.  
  3231. ; return 0; }
  3232. EOF
  3233. if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3234.   rm -rf conftest*
  3235.   eval "ac_cv_func_$ac_func=yes"
  3236. else
  3237.   echo "configure: failed program was:" >&5
  3238.   cat conftest.$ac_ext >&5
  3239.   rm -rf conftest*
  3240.   eval "ac_cv_func_$ac_func=no"
  3241. fi
  3242. rm -f conftest*
  3243. fi
  3244.  
  3245. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3246.   echo "$ac_t""yes" 1>&6
  3247.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3248.   cat >> confdefs.h <<EOF
  3249. #define $ac_tr_func 1
  3250. EOF
  3251.  
  3252. else
  3253.   echo "$ac_t""no" 1>&6
  3254.  
  3255. echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
  3256. echo "configure:3257: checking for strcasecmp in -lresolv" >&5
  3257. ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
  3258. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3259.   echo $ac_n "(cached) $ac_c" 1>&6
  3260. else
  3261.   ac_save_LIBS="$LIBS"
  3262. LIBS="-lresolv $cf_cv_netlibs $LIBS"
  3263. cat > conftest.$ac_ext <<EOF
  3264. #line 3265 "configure"
  3265. #include "confdefs.h"
  3266. /* Override any gcc2 internal prototype to avoid an error.  */
  3267. /* We use char because int might match the return type of a gcc2
  3268.     builtin and then its argument prototype would still apply.  */
  3269. char strcasecmp();
  3270.  
  3271. int main() {
  3272. strcasecmp()
  3273. ; return 0; }
  3274. EOF
  3275. if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3276.   rm -rf conftest*
  3277.   eval "ac_cv_lib_$ac_lib_var=yes"
  3278. else
  3279.   echo "configure: failed program was:" >&5
  3280.   cat conftest.$ac_ext >&5
  3281.   rm -rf conftest*
  3282.   eval "ac_cv_lib_$ac_lib_var=no"
  3283. fi
  3284. rm -f conftest*
  3285. LIBS="$ac_save_LIBS"
  3286.  
  3287. fi
  3288. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3289.   echo "$ac_t""yes" 1>&6
  3290.   
  3291.     
  3292. cf_tr_func=`echo strcasecmp | tr 'a-z' 'A-Z'`
  3293.  
  3294.     cat >> confdefs.h <<EOF
  3295. #define HAVE_$cf_tr_func 1
  3296. EOF
  3297.  
  3298.     ac_cv_func_strcasecmp=yes
  3299.     cf_cv_netlibs="-lresolv $cf_cv_netlibs"
  3300. else
  3301.   echo "$ac_t""no" 1>&6
  3302.  
  3303.     ac_cv_func_strcasecmp=unknown
  3304.     unset ac_cv_func_strcasecmp 2>/dev/null
  3305.     
  3306. fi
  3307.  
  3308.  
  3309. fi
  3310. done
  3311.  
  3312.  
  3313. fi
  3314.  
  3315. LIBS="$LIBS $cf_cv_netlibs"
  3316. test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6
  3317.  
  3318.  
  3319. echo $ac_n "checking for screen type""... $ac_c" 1>&6
  3320. echo "configure:3321: checking for screen type" >&5
  3321. if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then
  3322.   echo $ac_n "(cached) $ac_c" 1>&6
  3323. else
  3324.   
  3325.  
  3326. # Check whether --with-screen or --without-screen was given.
  3327. if test "${with_screen+set}" = set; then
  3328.   withval="$with_screen"
  3329.   
  3330. case $withval in
  3331. curses|ncurses|slang)
  3332.     cf_cv_screen=$withval
  3333.     ;;
  3334. *)    { echo "configure: error: Unexpected value" 1>&2; exit 1; }
  3335.     ;;
  3336. esac
  3337. else
  3338.   cf_cv_screen=curses
  3339. fi
  3340.  
  3341. fi
  3342.  
  3343. echo "$ac_t""$cf_cv_screen" 1>&6
  3344.  
  3345. if test $cf_cv_screen != ncurses ; then
  3346.     if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then
  3347.         cf_cv_ncurses_header=curses.h
  3348.     fi
  3349. fi
  3350.  
  3351. case $cf_cv_screen in
  3352. curses)
  3353.     
  3354. echo $ac_n "checking for initscr""... $ac_c" 1>&6
  3355. echo "configure:3356: checking for initscr" >&5
  3356. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  3357.   echo $ac_n "(cached) $ac_c" 1>&6
  3358. else
  3359.   cat > conftest.$ac_ext <<EOF
  3360. #line 3361 "configure"
  3361. #include "confdefs.h"
  3362. /* System header to define __stub macros and hopefully few prototypes,
  3363.     which can conflict with char initscr(); below.  */
  3364. #include <assert.h>
  3365. /* Override any gcc2 internal prototype to avoid an error.  */
  3366. /* We use char because int might match the return type of a gcc2
  3367.     builtin and then its argument prototype would still apply.  */
  3368. char initscr();
  3369.  
  3370. int main() {
  3371.  
  3372. /* The GNU C library defines this for functions which it implements
  3373.     to always fail with ENOSYS.  Some functions are actually named
  3374.     something starting with __ and the normal name is an alias.  */
  3375. #if defined (__stub_initscr) || defined (__stub___initscr)
  3376. choke me
  3377. #else
  3378. initscr();
  3379. #endif
  3380.  
  3381. ; return 0; }
  3382. EOF
  3383. if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3384.   rm -rf conftest*
  3385.   eval "ac_cv_func_initscr=yes"
  3386. else
  3387.   echo "configure: failed program was:" >&5
  3388.   cat conftest.$ac_ext >&5
  3389.   rm -rf conftest*
  3390.   eval "ac_cv_func_initscr=no"
  3391. fi
  3392. rm -f conftest*
  3393. fi
  3394.  
  3395. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  3396.   echo "$ac_t""yes" 1>&6
  3397.   :
  3398. else
  3399.   echo "$ac_t""no" 1>&6
  3400.  
  3401. case $host_os in #(vi
  3402. freebsd*) #(vi
  3403.     echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  3404. echo "configure:3405: checking for tgoto in -lmytinfo" >&5
  3405. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  3406. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3407.   echo $ac_n "(cached) $ac_c" 1>&6
  3408. else
  3409.   ac_save_LIBS="$LIBS"
  3410. LIBS="-lmytinfo  $LIBS"
  3411. cat > conftest.$ac_ext <<EOF
  3412. #line 3413 "configure"
  3413. #include "confdefs.h"
  3414. /* Override any gcc2 internal prototype to avoid an error.  */
  3415. /* We use char because int might match the return type of a gcc2
  3416.     builtin and then its argument prototype would still apply.  */
  3417. char tgoto();
  3418.  
  3419. int main() {
  3420. tgoto()
  3421. ; return 0; }
  3422. EOF
  3423. if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3424.   rm -rf conftest*
  3425.   eval "ac_cv_lib_$ac_lib_var=yes"
  3426. else
  3427.   echo "configure: failed program was:" >&5
  3428.   cat conftest.$ac_ext >&5
  3429.   rm -rf conftest*
  3430.   eval "ac_cv_lib_$ac_lib_var=no"
  3431. fi
  3432. rm -f conftest*
  3433. LIBS="$ac_save_LIBS"
  3434.  
  3435. fi
  3436. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3437.   echo "$ac_t""yes" 1>&6
  3438.   LIBS="-lmytinfo $LIBS"
  3439. else
  3440.   echo "$ac_t""no" 1>&6
  3441. fi
  3442.  
  3443.     ;;
  3444. hpux10.*)
  3445.     echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
  3446. echo "configure:3447: checking for initscr in -lcur_colr" >&5
  3447. ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
  3448. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3449.   echo $ac_n "(cached) $ac_c" 1>&6
  3450. else
  3451.   ac_save_LIBS="$LIBS"
  3452. LIBS="-lcur_colr  $LIBS"
  3453. cat > conftest.$ac_ext <<EOF
  3454. #line 3455 "configure"
  3455. #include "confdefs.h"
  3456. /* Override any gcc2 internal prototype to avoid an error.  */
  3457. /* We use char because int might match the return type of a gcc2
  3458.     builtin and then its argument prototype would still apply.  */
  3459. char initscr();
  3460.  
  3461. int main() {
  3462. initscr()
  3463. ; return 0; }
  3464. EOF
  3465. if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3466.   rm -rf conftest*
  3467.   eval "ac_cv_lib_$ac_lib_var=yes"
  3468. else
  3469.   echo "configure: failed program was:" >&5
  3470.   cat conftest.$ac_ext >&5
  3471.   rm -rf conftest*
  3472.   eval "ac_cv_lib_$ac_lib_var=no"
  3473. fi
  3474. rm -f conftest*
  3475. LIBS="$ac_save_LIBS"
  3476.  
  3477. fi
  3478. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3479.   echo "$ac_t""yes" 1>&6
  3480.   
  3481.         LIBS="-lcur_colr $LIBS"
  3482.         CFLAGS="-I/usr/include/curses_colr $CFLAGS"
  3483.         ac_cv_func_initscr=yes
  3484.         
  3485. else
  3486.   echo "$ac_t""no" 1>&6
  3487.  
  3488.     echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
  3489. echo "configure:3490: checking for initscr in -lHcurses" >&5
  3490. ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
  3491. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3492.   echo $ac_n "(cached) $ac_c" 1>&6
  3493. else
  3494.   ac_save_LIBS="$LIBS"
  3495. LIBS="-lHcurses  $LIBS"
  3496. cat > conftest.$ac_ext <<EOF
  3497. #line 3498 "configure"
  3498. #include "confdefs.h"
  3499. /* Override any gcc2 internal prototype to avoid an error.  */
  3500. /* We use char because int might match the return type of a gcc2
  3501.     builtin and then its argument prototype would still apply.  */
  3502. char initscr();
  3503.  
  3504. int main() {
  3505. initscr()
  3506. ; return 0; }
  3507. EOF
  3508. if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3509.   rm -rf conftest*
  3510.   eval "ac_cv_lib_$ac_lib_var=yes"
  3511. else
  3512.   echo "configure: failed program was:" >&5
  3513.   cat conftest.$ac_ext >&5
  3514.   rm -rf conftest*
  3515.   eval "ac_cv_lib_$ac_lib_var=no"
  3516. fi
  3517. rm -f conftest*
  3518. LIBS="$ac_save_LIBS"
  3519.  
  3520. fi
  3521. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3522.   echo "$ac_t""yes" 1>&6
  3523.   
  3524.         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
  3525.         LIBS="-lHcurses $LIBS"
  3526.         CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS"
  3527.         ac_cv_func_initscr=yes
  3528.         
  3529. else
  3530.   echo "$ac_t""no" 1>&6
  3531. fi
  3532.  
  3533. fi
  3534.  
  3535.     ;;
  3536. esac
  3537.  
  3538. if test ".$With5lib" != ".no" ; then
  3539. if test -d /usr/5lib ; then
  3540.     # SunOS 3.x or 4.x
  3541.     CPPFLAGS="$CPPFLAGS -I/usr/5include"
  3542.     LIBS="$LIBS -L/usr/5lib"
  3543. fi
  3544. fi
  3545.  
  3546. if test ".$ac_cv_func_initscr" != .yes ; then
  3547.     cf_save_LIBS="$LIBS"
  3548.     cf_term_lib=""
  3549.     cf_curs_lib=""
  3550.  
  3551.     # Check for library containing tgoto.  Do this before curses library
  3552.     # because it may be needed to link the test-case for initscr.
  3553.     echo $ac_n "checking for tgoto""... $ac_c" 1>&6
  3554. echo "configure:3555: checking for tgoto" >&5
  3555. if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
  3556.   echo $ac_n "(cached) $ac_c" 1>&6
  3557. else
  3558.   cat > conftest.$ac_ext <<EOF
  3559. #line 3560 "configure"
  3560. #include "confdefs.h"
  3561. /* System header to define __stub macros and hopefully few prototypes,
  3562.     which can conflict with char tgoto(); below.  */
  3563. #include <assert.h>
  3564. /* Override any gcc2 internal prototype to avoid an error.  */
  3565. /* We use char because int might match the return type of a gcc2
  3566.     builtin and then its argument prototype would still apply.  */
  3567. char tgoto();
  3568.  
  3569. int main() {
  3570.  
  3571. /* The GNU C library defines this for functions which it implements
  3572.     to always fail with ENOSYS.  Some functions are actually named
  3573.     something starting with __ and the normal name is an alias.  */
  3574. #if defined (__stub_tgoto) || defined (__stub___tgoto)
  3575. choke me
  3576. #else
  3577. tgoto();
  3578. #endif
  3579.  
  3580. ; return 0; }
  3581. EOF
  3582. if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3583.   rm -rf conftest*
  3584.   eval "ac_cv_func_tgoto=yes"
  3585. else
  3586.   echo "configure: failed program was:" >&5
  3587.   cat conftest.$ac_ext >&5
  3588.   rm -rf conftest*
  3589.   eval "ac_cv_func_tgoto=no"
  3590. fi
  3591. rm -f conftest*
  3592. fi
  3593.  
  3594. if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
  3595.   echo "$ac_t""yes" 1>&6
  3596.   cf_term_lib=predefined
  3597. else
  3598.   echo "$ac_t""no" 1>&6
  3599.  
  3600.         for cf_term_lib in termcap termlib unknown
  3601.         do
  3602.             echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
  3603. echo "configure:3604: checking for tgoto in -l$cf_term_lib" >&5
  3604. ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
  3605. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3606.   echo $ac_n "(cached) $ac_c" 1>&6
  3607. else
  3608.   ac_save_LIBS="$LIBS"
  3609. LIBS="-l$cf_term_lib  $LIBS"
  3610. cat > conftest.$ac_ext <<EOF
  3611. #line 3612 "configure"
  3612. #include "confdefs.h"
  3613. /* Override any gcc2 internal prototype to avoid an error.  */
  3614. /* We use char because int might match the return type of a gcc2
  3615.     builtin and then its argument prototype would still apply.  */
  3616. char tgoto();
  3617.  
  3618. int main() {
  3619. tgoto()
  3620. ; return 0; }
  3621. EOF
  3622. if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3623.   rm -rf conftest*
  3624.   eval "ac_cv_lib_$ac_lib_var=yes"
  3625. else
  3626.   echo "configure: failed program was:" >&5
  3627.   cat conftest.$ac_ext >&5
  3628.   rm -rf conftest*
  3629.   eval "ac_cv_lib_$ac_lib_var=no"
  3630. fi
  3631. rm -f conftest*
  3632. LIBS="$ac_save_LIBS"
  3633.  
  3634. fi
  3635. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3636.   echo "$ac_t""yes" 1>&6
  3637.   break
  3638. else
  3639.   echo "$ac_t""no" 1>&6
  3640. fi
  3641.  
  3642.         done
  3643.     
  3644. fi
  3645.  
  3646.  
  3647.     # Check for library containing initscr
  3648.     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
  3649.     for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown
  3650.     do
  3651.         echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
  3652. echo "configure:3653: checking for initscr in -l$cf_curs_lib" >&5
  3653. ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
  3654. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3655.   echo $ac_n "(cached) $ac_c" 1>&6
  3656. else
  3657.   ac_save_LIBS="$LIBS"
  3658. LIBS="-l$cf_curs_lib  $LIBS"
  3659. cat > conftest.$ac_ext <<EOF
  3660. #line 3661 "configure"
  3661. #include "confdefs.h"
  3662. /* Override any gcc2 internal prototype to avoid an error.  */
  3663. /* We use char because int might match the return type of a gcc2
  3664.     builtin and then its argument prototype would still apply.  */
  3665. char initscr();
  3666.  
  3667. int main() {
  3668. initscr()
  3669. ; return 0; }
  3670. EOF
  3671. if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3672.   rm -rf conftest*
  3673.   eval "ac_cv_lib_$ac_lib_var=yes"
  3674. else
  3675.   echo "configure: failed program was:" >&5
  3676.   cat conftest.$ac_ext >&5
  3677.   rm -rf conftest*
  3678.   eval "ac_cv_lib_$ac_lib_var=no"
  3679. fi
  3680. rm -f conftest*
  3681. LIBS="$ac_save_LIBS"
  3682.  
  3683. fi
  3684. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3685.   echo "$ac_t""yes" 1>&6
  3686.   break
  3687. else
  3688.   echo "$ac_t""no" 1>&6
  3689. fi
  3690.  
  3691.     done
  3692.     test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
  3693.  
  3694.     LIBS="-l$cf_curs_lib $cf_save_LIBS"
  3695.     if test "$cf_term_lib" = unknown ; then
  3696.         echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
  3697. echo "configure:3698: checking if we can link with $cf_curs_lib library" >&5
  3698.         cat > conftest.$ac_ext <<EOF
  3699. #line 3700 "configure"
  3700. #include "confdefs.h"
  3701. #include <${cf_cv_ncurses_header-curses.h}>
  3702. int main() {
  3703. initscr()
  3704. ; return 0; }
  3705. EOF
  3706. if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3707.   rm -rf conftest*
  3708.   cf_result=yes
  3709. else
  3710.   echo "configure: failed program was:" >&5
  3711.   cat conftest.$ac_ext >&5
  3712.   rm -rf conftest*
  3713.   cf_result=no
  3714. fi
  3715. rm -f conftest*
  3716.         echo "$ac_t""$cf_result" 1>&6
  3717.         test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
  3718.     elif test "$cf_term_lib" != predefined ; then
  3719.         echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
  3720. echo "configure:3721: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
  3721.         cat > conftest.$ac_ext <<EOF
  3722. #line 3723 "configure"
  3723. #include "confdefs.h"
  3724. #include <${cf_cv_ncurses_header-curses.h}>
  3725. int main() {
  3726. initscr(); tgoto((char *)0, 0, 0);
  3727. ; return 0; }
  3728. EOF
  3729. if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3730.   rm -rf conftest*
  3731.   cf_result=no
  3732. else
  3733.   echo "configure: failed program was:" >&5
  3734.   cat conftest.$ac_ext >&5
  3735.   rm -rf conftest*
  3736.   
  3737.             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
  3738.             cat > conftest.$ac_ext <<EOF
  3739. #line 3740 "configure"
  3740. #include "confdefs.h"
  3741. #include <${cf_cv_ncurses_header-curses.h}>
  3742. int main() {
  3743. initscr()
  3744. ; return 0; }
  3745. EOF
  3746. if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3747.   rm -rf conftest*
  3748.   cf_result=yes
  3749. else
  3750.   echo "configure: failed program was:" >&5
  3751.   cat conftest.$ac_ext >&5
  3752.   rm -rf conftest*
  3753.   cf_result=error
  3754. fi
  3755. rm -f conftest*
  3756.             
  3757. fi
  3758. rm -f conftest*
  3759.         echo "$ac_t""$cf_result" 1>&6
  3760.     fi
  3761. fi
  3762.  
  3763.  
  3764. fi
  3765.  
  3766.     
  3767. echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6
  3768. echo "configure:3769: checking for curses performance tradeoff" >&5
  3769. if eval "test \"`echo '$''{'cf_cv_curs_performance'+set}'`\" = set"; then
  3770.   echo $ac_n "(cached) $ac_c" 1>&6
  3771. else
  3772.   
  3773.     cf_cv_curs_performance=no
  3774.     cat > conftest.$ac_ext <<EOF
  3775. #line 3776 "configure"
  3776. #include "confdefs.h"
  3777.  
  3778. #include <${cf_cv_ncurses_header-curses.h}>
  3779. int main() {
  3780.  
  3781. #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
  3782.     int x = ERR;
  3783. #else
  3784.     int x = ;    /* force an error */
  3785. #endif
  3786.     
  3787. ; return 0; }
  3788. EOF
  3789. if { (eval echo configure:3790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3790.   rm -rf conftest*
  3791.   
  3792.     cat > conftest.$ac_ext <<EOF
  3793. #line 3794 "configure"
  3794. #include "confdefs.h"
  3795.  
  3796. #define CURS_PERFORMANCE
  3797. #include <${cf_cv_ncurses_header-curses.h}>
  3798. int main() {
  3799.  
  3800. #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
  3801.     int x = ;    /* force an error */
  3802. #else
  3803.     int x = ERR;
  3804. #endif
  3805.     
  3806. ; return 0; }
  3807. EOF
  3808. if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3809.   rm -rf conftest*
  3810.   cf_cv_curs_performance=yes
  3811. else
  3812.   echo "configure: failed program was:" >&5
  3813.   cat conftest.$ac_ext >&5
  3814. fi
  3815. rm -f conftest*
  3816. else
  3817.   echo "configure: failed program was:" >&5
  3818.   cat conftest.$ac_ext >&5
  3819. fi
  3820. rm -f conftest*
  3821. fi
  3822.  
  3823. echo "$ac_t""$cf_cv_curs_performance" 1>&6
  3824. test $cf_cv_curs_performance = yes && cat >> confdefs.h <<\EOF
  3825. #define CURS_PERFORMANCE 1
  3826. EOF
  3827.  
  3828.  
  3829.     ;;
  3830. ncurses)
  3831.     
  3832. echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6
  3833. echo "configure:3834: checking for ncurses header file" >&5
  3834. if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
  3835.   echo $ac_n "(cached) $ac_c" 1>&6
  3836. else
  3837.   
  3838.     cat > conftest.$ac_ext <<EOF
  3839. #line 3840 "configure"
  3840. #include "confdefs.h"
  3841. #include <curses.h>
  3842. int main() {
  3843.  
  3844. #ifdef NCURSES_VERSION
  3845. printf("%s\n", NCURSES_VERSION);
  3846. #else
  3847. #ifdef __NCURSES_H
  3848. printf("old\n");
  3849. #else
  3850. make an error
  3851. #endif
  3852. #endif
  3853.     
  3854. ; return 0; }
  3855. EOF
  3856. if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3857.   rm -rf conftest*
  3858.   cf_cv_ncurses_header=predefined
  3859. else
  3860.   echo "configure: failed program was:" >&5
  3861.   cat conftest.$ac_ext >&5
  3862.   rm -rf conftest*
  3863.   
  3864.     cf_search=""
  3865. if test -d "$includedir"  ; then
  3866. test "$includedir" != NONE       && cf_search="$cf_search $includedir $includedir/ncurses"
  3867. fi
  3868. if test -d "$oldincludedir"  ; then
  3869. test "$oldincludedir" != NONE    && cf_search="$cf_search $oldincludedir $oldincludedir/ncurses"
  3870. fi
  3871. if test -d "$prefix"; then
  3872. test "$prefix" != NONE           && cf_search="$cf_search $prefix/include $prefix/include/ncurses"
  3873. fi
  3874. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/include /usr/local/include/ncurses"
  3875. test "$prefix" != /usr           && cf_search="$cf_search /usr/include /usr/include/ncurses"
  3876.  
  3877.     test -n "$verbose" && echo
  3878.     for cf_incdir in $cf_search
  3879.     do
  3880.         for cf_header in \
  3881.             curses.h \
  3882.             ncurses.h
  3883.         do
  3884.             if egrep "NCURSES_[VH]" $cf_incdir/$cf_header 1>&5 2>&1; then
  3885.                 cf_cv_ncurses_header=$cf_incdir/$cf_header
  3886.                 test -n "$verbose" && echo $ac_n "    ... found $ac_c" 1>&6
  3887.                 break
  3888.             fi
  3889.             test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
  3890.         done
  3891.         test -n "$cf_cv_ncurses_header" && break
  3892.     done
  3893.     test -z "$cf_cv_ncurses_header" && { echo "configure: error: not found" 1>&2; exit 1; }
  3894.     
  3895. fi
  3896. rm -f conftest*
  3897. fi
  3898.  
  3899. echo "$ac_t""$cf_cv_ncurses_header" 1>&6
  3900. cat >> confdefs.h <<\EOF
  3901. #define NCURSES 1
  3902. EOF
  3903.  
  3904.  
  3905. cf_incdir=`echo $cf_cv_ncurses_header | sed -e 's:/[^/]*$::'`
  3906.  
  3907. case $cf_cv_ncurses_header in # (vi
  3908. */ncurses.h)
  3909.     cat >> confdefs.h <<\EOF
  3910. #define HAVE_NCURSES_H 1
  3911. EOF
  3912.  
  3913.     ;;
  3914. esac
  3915.  
  3916. case $cf_cv_ncurses_header in # (vi
  3917. predefined) # (vi
  3918.     cf_cv_ncurses_header=curses.h
  3919.     ;;
  3920. *)
  3921.     
  3922. for cf_add_incdir in $cf_incdir
  3923. do
  3924.     while true
  3925.     do
  3926.         case $cf_add_incdir in
  3927.         /usr/include) # (vi
  3928.             ;;
  3929.         *) # (vi
  3930.             CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  3931.             ;;
  3932.         esac
  3933.         cf_top_incdir=`echo $cf_add_incdir | sed -e 's:/include/.*$:/include:'`
  3934.         test "$cf_top_incdir" = "$cf_add_incdir" && break
  3935.         cf_add_incdir="$cf_top_incdir"
  3936.     done
  3937. done
  3938.  
  3939.     ;;
  3940. esac
  3941. echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  3942. echo "configure:3943: checking for ncurses version" >&5
  3943. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  3944.   echo $ac_n "(cached) $ac_c" 1>&6
  3945. else
  3946.   
  3947.     cf_cv_ncurses_version=no
  3948.     cf_tempfile=out$$
  3949.     if test "$cross_compiling" = yes; then
  3950.   
  3951.  
  3952.     # This will not work if the preprocessor splits the line after the
  3953.     # Autoconf token.  The 'unproto' program does that.
  3954.     cat > conftest.$ac_ext <<EOF
  3955. #include <${cf_cv_ncurses_header-curses.h}>
  3956. #undef Autoconf
  3957. #ifdef NCURSES_VERSION
  3958. Autoconf NCURSES_VERSION
  3959. #else
  3960. #ifdef __NCURSES_H
  3961. Autoconf "old"
  3962. #endif
  3963. ;
  3964. #endif
  3965. EOF
  3966.     cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  3967.     { (eval echo configure:3968: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  3968.     if test -f conftest.out ; then
  3969.         cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
  3970.         test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  3971.         rm -f conftest.out
  3972.     fi
  3973.  
  3974. else
  3975.   cat > conftest.$ac_ext <<EOF
  3976. #line 3977 "configure"
  3977. #include "confdefs.h"
  3978.  
  3979. #include <${cf_cv_ncurses_header-curses.h}>
  3980. int main()
  3981. {
  3982.     FILE *fp = fopen("$cf_tempfile", "w");
  3983. #ifdef NCURSES_VERSION
  3984. # ifdef NCURSES_VERSION_PATCH
  3985.     fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  3986. # else
  3987.     fprintf(fp, "%s\n", NCURSES_VERSION);
  3988. # endif
  3989. #else
  3990. # ifdef __NCURSES_H
  3991.     fprintf(fp, "old\n");
  3992. # else
  3993.     make an error
  3994. # endif
  3995. #endif
  3996.     exit(0);
  3997. }
  3998. EOF
  3999. if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  4000. then
  4001.   
  4002.     cf_cv_ncurses_version=`cat $cf_tempfile`
  4003.     rm -f $cf_tempfile
  4004. else
  4005.   echo "configure: failed program was:" >&5
  4006.   cat conftest.$ac_ext >&5
  4007. fi
  4008. rm -fr conftest*
  4009. fi
  4010.  
  4011. fi
  4012.  
  4013. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  4014.  
  4015.  
  4016.     
  4017.  
  4018.     # This works, except for the special case where we find gpm, but
  4019.     # ncurses is in a nonstandard location via $LIBS, and we really want
  4020.     # to link gpm.
  4021. cf_ncurses_LIBS=""
  4022. cf_ncurses_SAVE="$LIBS"
  4023. echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  4024. echo "configure:4025: checking for Gpm_Open in -lgpm" >&5
  4025. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  4026. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4027.   echo $ac_n "(cached) $ac_c" 1>&6
  4028. else
  4029.   ac_save_LIBS="$LIBS"
  4030. LIBS="-lgpm  $LIBS"
  4031. cat > conftest.$ac_ext <<EOF
  4032. #line 4033 "configure"
  4033. #include "confdefs.h"
  4034. /* Override any gcc2 internal prototype to avoid an error.  */
  4035. /* We use char because int might match the return type of a gcc2
  4036.     builtin and then its argument prototype would still apply.  */
  4037. char Gpm_Open();
  4038.  
  4039. int main() {
  4040. Gpm_Open()
  4041. ; return 0; }
  4042. EOF
  4043. if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4044.   rm -rf conftest*
  4045.   eval "ac_cv_lib_$ac_lib_var=yes"
  4046. else
  4047.   echo "configure: failed program was:" >&5
  4048.   cat conftest.$ac_ext >&5
  4049.   rm -rf conftest*
  4050.   eval "ac_cv_lib_$ac_lib_var=no"
  4051. fi
  4052. rm -f conftest*
  4053. LIBS="$ac_save_LIBS"
  4054.  
  4055. fi
  4056. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4057.   echo "$ac_t""yes" 1>&6
  4058.   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
  4059. echo "configure:4060: checking for initscr in -lgpm" >&5
  4060. ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
  4061. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4062.   echo $ac_n "(cached) $ac_c" 1>&6
  4063. else
  4064.   ac_save_LIBS="$LIBS"
  4065. LIBS="-lgpm  $LIBS"
  4066. cat > conftest.$ac_ext <<EOF
  4067. #line 4068 "configure"
  4068. #include "confdefs.h"
  4069. /* Override any gcc2 internal prototype to avoid an error.  */
  4070. /* We use char because int might match the return type of a gcc2
  4071.     builtin and then its argument prototype would still apply.  */
  4072. char initscr();
  4073.  
  4074. int main() {
  4075. initscr()
  4076. ; return 0; }
  4077. EOF
  4078. if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4079.   rm -rf conftest*
  4080.   eval "ac_cv_lib_$ac_lib_var=yes"
  4081. else
  4082.   echo "configure: failed program was:" >&5
  4083.   cat conftest.$ac_ext >&5
  4084.   rm -rf conftest*
  4085.   eval "ac_cv_lib_$ac_lib_var=no"
  4086. fi
  4087. rm -f conftest*
  4088. LIBS="$ac_save_LIBS"
  4089.  
  4090. fi
  4091. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4092.   echo "$ac_t""yes" 1>&6
  4093.   LIBS="$cf_ncurses_SAVE"
  4094. else
  4095.   echo "$ac_t""no" 1>&6
  4096. cf_ncurses_LIBS="-lgpm"
  4097. fi
  4098.  
  4099. else
  4100.   echo "$ac_t""no" 1>&6
  4101. fi
  4102.  
  4103.  
  4104. case $host_os in #(vi
  4105. freebsd*)
  4106.     # This is only necessary if you are linking against an obsolete
  4107.     # version of ncurses (but it should do no harm, since it's static).
  4108.     echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  4109. echo "configure:4110: checking for tgoto in -lmytinfo" >&5
  4110. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  4111. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4112.   echo $ac_n "(cached) $ac_c" 1>&6
  4113. else
  4114.   ac_save_LIBS="$LIBS"
  4115. LIBS="-lmytinfo  $LIBS"
  4116. cat > conftest.$ac_ext <<EOF
  4117. #line 4118 "configure"
  4118. #include "confdefs.h"
  4119. /* Override any gcc2 internal prototype to avoid an error.  */
  4120. /* We use char because int might match the return type of a gcc2
  4121.     builtin and then its argument prototype would still apply.  */
  4122. char tgoto();
  4123.  
  4124. int main() {
  4125. tgoto()
  4126. ; return 0; }
  4127. EOF
  4128. if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4129.   rm -rf conftest*
  4130.   eval "ac_cv_lib_$ac_lib_var=yes"
  4131. else
  4132.   echo "configure: failed program was:" >&5
  4133.   cat conftest.$ac_ext >&5
  4134.   rm -rf conftest*
  4135.   eval "ac_cv_lib_$ac_lib_var=no"
  4136. fi
  4137. rm -f conftest*
  4138. LIBS="$ac_save_LIBS"
  4139.  
  4140. fi
  4141. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4142.   echo "$ac_t""yes" 1>&6
  4143.   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
  4144. else
  4145.   echo "$ac_t""no" 1>&6
  4146. fi
  4147.  
  4148.     ;;
  4149. esac
  4150.  
  4151. LIBS="$cf_ncurses_LIBS $LIBS"
  4152.  
  4153.     cf_cv_have_lib_ncurses=no
  4154.     cf_libdir=""
  4155.     echo $ac_n "checking for initscr""... $ac_c" 1>&6
  4156. echo "configure:4157: checking for initscr" >&5
  4157. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  4158.   echo $ac_n "(cached) $ac_c" 1>&6
  4159. else
  4160.   cat > conftest.$ac_ext <<EOF
  4161. #line 4162 "configure"
  4162. #include "confdefs.h"
  4163. /* System header to define __stub macros and hopefully few prototypes,
  4164.     which can conflict with char initscr(); below.  */
  4165. #include <assert.h>
  4166. /* Override any gcc2 internal prototype to avoid an error.  */
  4167. /* We use char because int might match the return type of a gcc2
  4168.     builtin and then its argument prototype would still apply.  */
  4169. char initscr();
  4170.  
  4171. int main() {
  4172.  
  4173. /* The GNU C library defines this for functions which it implements
  4174.     to always fail with ENOSYS.  Some functions are actually named
  4175.     something starting with __ and the normal name is an alias.  */
  4176. #if defined (__stub_initscr) || defined (__stub___initscr)
  4177. choke me
  4178. #else
  4179. initscr();
  4180. #endif
  4181.  
  4182. ; return 0; }
  4183. EOF
  4184. if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4185.   rm -rf conftest*
  4186.   eval "ac_cv_func_initscr=yes"
  4187. else
  4188.   echo "configure: failed program was:" >&5
  4189.   cat conftest.$ac_ext >&5
  4190.   rm -rf conftest*
  4191.   eval "ac_cv_func_initscr=no"
  4192. fi
  4193. rm -f conftest*
  4194. fi
  4195.  
  4196. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  4197.   echo "$ac_t""yes" 1>&6
  4198.   cf_cv_have_lib_ncurses=yes
  4199. else
  4200.   echo "$ac_t""no" 1>&6
  4201.  
  4202.         cf_save_LIBS="$LIBS"
  4203.         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
  4204. echo "configure:4205: checking for initscr in -lncurses" >&5
  4205.         LIBS="-lncurses $LIBS"
  4206.         cat > conftest.$ac_ext <<EOF
  4207. #line 4208 "configure"
  4208. #include "confdefs.h"
  4209. #include <${cf_cv_ncurses_header-curses.h}>
  4210. int main() {
  4211. initscr()
  4212. ; return 0; }
  4213. EOF
  4214. if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4215.   rm -rf conftest*
  4216.   echo "$ac_t""yes" 1>&6
  4217.              cf_cv_have_lib_ncurses=yes
  4218.             
  4219. else
  4220.   echo "configure: failed program was:" >&5
  4221.   cat conftest.$ac_ext >&5
  4222.   rm -rf conftest*
  4223.   echo "$ac_t""no" 1>&6
  4224.             cf_search=""
  4225. if test -d "$libdir"  ; then
  4226. test "$libdir" != NONE           && cf_search="$cf_search $libdir $libdir/ncurses"
  4227. fi
  4228. if test -d "$exec_prefix"; then
  4229. test "$exec_prefix" != NONE      && cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/ncurses"
  4230. fi
  4231. if test -d "$prefix"; then
  4232. test "$prefix" != NONE           && \
  4233. test "$prefix" != "$exec_prefix" && cf_search="$cf_search $prefix/lib $prefix/lib/ncurses"
  4234. fi
  4235. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/lib /usr/local/lib/ncurses"
  4236. test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/ncurses"
  4237.  
  4238.             for cf_libdir in $cf_search
  4239.             do
  4240.                 echo $ac_n "checking for -lncurses in $cf_libdir""... $ac_c" 1>&6
  4241. echo "configure:4242: checking for -lncurses in $cf_libdir" >&5
  4242.                 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS"
  4243.                 cat > conftest.$ac_ext <<EOF
  4244. #line 4245 "configure"
  4245. #include "confdefs.h"
  4246. #include <${cf_cv_ncurses_header-curses.h}>
  4247. int main() {
  4248. initscr()
  4249. ; return 0; }
  4250. EOF
  4251. if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4252.   rm -rf conftest*
  4253.   echo "$ac_t""yes" 1>&6
  4254.                       cf_cv_have_lib_ncurses=yes
  4255.                      break
  4256. else
  4257.   echo "configure: failed program was:" >&5
  4258.   cat conftest.$ac_ext >&5
  4259.   rm -rf conftest*
  4260.   echo "$ac_t""no" 1>&6
  4261.                      LIBS="$cf_save_LIBS"
  4262. fi
  4263. rm -f conftest*
  4264.             done
  4265.             
  4266. fi
  4267. rm -f conftest*
  4268.         
  4269. fi
  4270.  
  4271. if test $cf_cv_have_lib_ncurses = no ; then
  4272.     { echo "configure: error: Cannot link ncurses library" 1>&2; exit 1; }
  4273. fi
  4274. case $host_os in #(vi
  4275. linux*) # Suse Linux does not follow /usr/lib convention
  4276.     ncurses="$ncurses /lib"
  4277.     ;;
  4278. esac
  4279.  
  4280.  
  4281. if test -n "$cf_ncurses_LIBS" ; then
  4282.     echo $ac_n "checking if we can link ncurses without $cf_ncurses_LIBS""... $ac_c" 1>&6
  4283. echo "configure:4284: checking if we can link ncurses without $cf_ncurses_LIBS" >&5
  4284.     cf_ncurses_SAVE="$LIBS"
  4285.     for p in $cf_ncurses_LIBS ; do
  4286.         q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'`
  4287.         if test "$q" != "$LIBS" ; then
  4288.             LIBS="$q"
  4289.         fi
  4290.     done
  4291.     cat > conftest.$ac_ext <<EOF
  4292. #line 4293 "configure"
  4293. #include "confdefs.h"
  4294. #include <${cf_cv_ncurses_header-curses.h}>
  4295. int main() {
  4296. initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  4297. ; return 0; }
  4298. EOF
  4299. if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4300.   rm -rf conftest*
  4301.   echo "$ac_t""yes" 1>&6
  4302. else
  4303.   echo "configure: failed program was:" >&5
  4304.   cat conftest.$ac_ext >&5
  4305.   rm -rf conftest*
  4306.   echo "$ac_t""no" 1>&6
  4307.          LIBS="$cf_ncurses_SAVE"
  4308. fi
  4309. rm -f conftest*
  4310. fi
  4311.  
  4312.     ;;
  4313. slang)
  4314.     
  4315. echo $ac_n "checking for slang header file""... $ac_c" 1>&6
  4316. echo "configure:4317: checking for slang header file" >&5
  4317. if eval "test \"`echo '$''{'cf_cv_slang_header'+set}'`\" = set"; then
  4318.   echo $ac_n "(cached) $ac_c" 1>&6
  4319. else
  4320.   
  4321.     cat > conftest.$ac_ext <<EOF
  4322. #line 4323 "configure"
  4323. #include "confdefs.h"
  4324. #include <slang.h>
  4325. int main() {
  4326. printf("%s\n", SLANG_VERSION)
  4327. ; return 0; }
  4328. EOF
  4329. if { (eval echo configure:4330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4330.   rm -rf conftest*
  4331.   cf_cv_slang_header=predefined
  4332. else
  4333.   echo "configure: failed program was:" >&5
  4334.   cat conftest.$ac_ext >&5
  4335.   rm -rf conftest*
  4336.   
  4337.     cf_search=""
  4338. if test -d "$includedir"  ; then
  4339. test "$includedir" != NONE       && cf_search="$cf_search $includedir $includedir/slang"
  4340. fi
  4341. if test -d "$oldincludedir"  ; then
  4342. test "$oldincludedir" != NONE    && cf_search="$cf_search $oldincludedir $oldincludedir/slang"
  4343. fi
  4344. if test -d "$prefix"; then
  4345. test "$prefix" != NONE           && cf_search="$cf_search $prefix/include $prefix/include/slang"
  4346. fi
  4347. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/include /usr/local/include/slang"
  4348. test "$prefix" != /usr           && cf_search="$cf_search /usr/include /usr/include/slang"
  4349.  
  4350.     for cf_incdir in $cf_search
  4351.     do
  4352.         for cf_header in \
  4353.             slang.h
  4354.         do
  4355.             echo trying $cf_incdir/$cf_header 1>&5
  4356.             if egrep "SLANG_VERSION" $cf_incdir/$cf_header 1>&5 2>&1; then
  4357.                 cf_cv_slang_header=$cf_incdir/$cf_header 
  4358.                 break
  4359.             fi
  4360.         done
  4361.         test -n "$cf_cv_slang_header" && break
  4362.     done
  4363.     test -z "$cf_cv_slang_header" && { echo "configure: error: not found" 1>&2; exit 1; }
  4364.     
  4365. fi
  4366. rm -f conftest*
  4367. fi
  4368.  
  4369. echo "$ac_t""$cf_cv_slang_header" 1>&6
  4370. cat >> confdefs.h <<\EOF
  4371. #define USE_SLANG 1
  4372. EOF
  4373.  
  4374.  
  4375. cf_incdir=`echo $cf_cv_slang_header | sed -e 's:/[^/]*$::'`
  4376.  
  4377. case $cf_cv_slang_header in # (vi
  4378. predefined) # (vi
  4379.     ;;
  4380. *)
  4381.     
  4382. for cf_add_incdir in $cf_incdir
  4383. do
  4384.     while true
  4385.     do
  4386.         case $cf_add_incdir in
  4387.         /usr/include) # (vi
  4388.             ;;
  4389.         *) # (vi
  4390.             CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  4391.             ;;
  4392.         esac
  4393.         cf_top_incdir=`echo $cf_add_incdir | sed -e 's:/include/.*$:/include:'`
  4394.         test "$cf_top_incdir" = "$cf_add_incdir" && break
  4395.         cf_add_incdir="$cf_top_incdir"
  4396.     done
  4397. done
  4398.  
  4399.     ;;
  4400. esac
  4401.  
  4402.     
  4403. cf_slang_LIBS1="$LIBS"
  4404.  
  4405. if eval "test \"`echo '$''{'cf_cv_lib_termcap'+set}'`\" = set"; then
  4406.   echo $ac_n "(cached) $ac_c" 1>&6
  4407. else
  4408.   
  4409. cf_cv_lib_termcap=none
  4410. # HP-UX 9.x terminfo has setupterm, but no tigetstr.
  4411. if test "$termlib" = none; then
  4412.     echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6
  4413. echo "configure:4414: checking for tigetstr in -ltermlib" >&5
  4414. ac_lib_var=`echo termlib'_'tigetstr | sed 'y%./+-%__p_%'`
  4415. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4416.   echo $ac_n "(cached) $ac_c" 1>&6
  4417. else
  4418.   ac_save_LIBS="$LIBS"
  4419. LIBS="-ltermlib  $LIBS"
  4420. cat > conftest.$ac_ext <<EOF
  4421. #line 4422 "configure"
  4422. #include "confdefs.h"
  4423. /* Override any gcc2 internal prototype to avoid an error.  */
  4424. /* We use char because int might match the return type of a gcc2
  4425.     builtin and then its argument prototype would still apply.  */
  4426. char tigetstr();
  4427.  
  4428. int main() {
  4429. tigetstr()
  4430. ; return 0; }
  4431. EOF
  4432. if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4433.   rm -rf conftest*
  4434.   eval "ac_cv_lib_$ac_lib_var=yes"
  4435. else
  4436.   echo "configure: failed program was:" >&5
  4437.   cat conftest.$ac_ext >&5
  4438.   rm -rf conftest*
  4439.   eval "ac_cv_lib_$ac_lib_var=no"
  4440. fi
  4441. rm -f conftest*
  4442. LIBS="$ac_save_LIBS"
  4443.  
  4444. fi
  4445. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4446.   echo "$ac_t""yes" 1>&6
  4447.   LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=terminfo
  4448. else
  4449.   echo "$ac_t""no" 1>&6
  4450. fi
  4451.  
  4452. fi
  4453. if test "$cf_cv_lib_termcap" = none; then
  4454.     echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6
  4455. echo "configure:4456: checking for tgoto in -ltermlib" >&5
  4456. ac_lib_var=`echo termlib'_'tgoto | sed 'y%./+-%__p_%'`
  4457. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4458.   echo $ac_n "(cached) $ac_c" 1>&6
  4459. else
  4460.   ac_save_LIBS="$LIBS"
  4461. LIBS="-ltermlib  $LIBS"
  4462. cat > conftest.$ac_ext <<EOF
  4463. #line 4464 "configure"
  4464. #include "confdefs.h"
  4465. /* Override any gcc2 internal prototype to avoid an error.  */
  4466. /* We use char because int might match the return type of a gcc2
  4467.     builtin and then its argument prototype would still apply.  */
  4468. char tgoto();
  4469.  
  4470. int main() {
  4471. tgoto()
  4472. ; return 0; }
  4473. EOF
  4474. if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4475.   rm -rf conftest*
  4476.   eval "ac_cv_lib_$ac_lib_var=yes"
  4477. else
  4478.   echo "configure: failed program was:" >&5
  4479.   cat conftest.$ac_ext >&5
  4480.   rm -rf conftest*
  4481.   eval "ac_cv_lib_$ac_lib_var=no"
  4482. fi
  4483. rm -f conftest*
  4484. LIBS="$ac_save_LIBS"
  4485.  
  4486. fi
  4487. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4488.   echo "$ac_t""yes" 1>&6
  4489.   LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=termcap
  4490. else
  4491.   echo "$ac_t""no" 1>&6
  4492. fi
  4493.  
  4494. fi
  4495. if test "$cf_cv_lib_termcap" = none; then
  4496.     # allow curses library for broken AIX system.
  4497.     echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
  4498. echo "configure:4499: checking for initscr in -lcurses" >&5
  4499. ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
  4500. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4501.   echo $ac_n "(cached) $ac_c" 1>&6
  4502. else
  4503.   ac_save_LIBS="$LIBS"
  4504. LIBS="-lcurses  $LIBS"
  4505. cat > conftest.$ac_ext <<EOF
  4506. #line 4507 "configure"
  4507. #include "confdefs.h"
  4508. /* Override any gcc2 internal prototype to avoid an error.  */
  4509. /* We use char because int might match the return type of a gcc2
  4510.     builtin and then its argument prototype would still apply.  */
  4511. char initscr();
  4512.  
  4513. int main() {
  4514. initscr()
  4515. ; return 0; }
  4516. EOF
  4517. if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4518.   rm -rf conftest*
  4519.   eval "ac_cv_lib_$ac_lib_var=yes"
  4520. else
  4521.   echo "configure: failed program was:" >&5
  4522.   cat conftest.$ac_ext >&5
  4523.   rm -rf conftest*
  4524.   eval "ac_cv_lib_$ac_lib_var=no"
  4525. fi
  4526. rm -f conftest*
  4527. LIBS="$ac_save_LIBS"
  4528.  
  4529. fi
  4530. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4531.   echo "$ac_t""yes" 1>&6
  4532.   LIBS="$LIBS -lcurses" cf_cv_lib_termcap=termcap
  4533. else
  4534.   echo "$ac_t""no" 1>&6
  4535. fi
  4536.  
  4537.     echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
  4538. echo "configure:4539: checking for tgoto in -ltermcap" >&5
  4539. ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
  4540. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4541.   echo $ac_n "(cached) $ac_c" 1>&6
  4542. else
  4543.   ac_save_LIBS="$LIBS"
  4544. LIBS="-ltermcap  $LIBS"
  4545. cat > conftest.$ac_ext <<EOF
  4546. #line 4547 "configure"
  4547. #include "confdefs.h"
  4548. /* Override any gcc2 internal prototype to avoid an error.  */
  4549. /* We use char because int might match the return type of a gcc2
  4550.     builtin and then its argument prototype would still apply.  */
  4551. char tgoto();
  4552.  
  4553. int main() {
  4554. tgoto()
  4555. ; return 0; }
  4556. EOF
  4557. if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4558.   rm -rf conftest*
  4559.   eval "ac_cv_lib_$ac_lib_var=yes"
  4560. else
  4561.   echo "configure: failed program was:" >&5
  4562.   cat conftest.$ac_ext >&5
  4563.   rm -rf conftest*
  4564.   eval "ac_cv_lib_$ac_lib_var=no"
  4565. fi
  4566. rm -f conftest*
  4567. LIBS="$ac_save_LIBS"
  4568.  
  4569. fi
  4570. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4571.   echo "$ac_t""yes" 1>&6
  4572.   LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
  4573. else
  4574.   echo "$ac_t""no" 1>&6
  4575. fi
  4576.  
  4577. fi
  4578. if test "$cf_cv_lib_termcap" = none; then
  4579.     echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
  4580. echo "configure:4581: checking for tgoto in -ltermcap" >&5
  4581. ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
  4582. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4583.   echo $ac_n "(cached) $ac_c" 1>&6
  4584. else
  4585.   ac_save_LIBS="$LIBS"
  4586. LIBS="-ltermcap  $LIBS"
  4587. cat > conftest.$ac_ext <<EOF
  4588. #line 4589 "configure"
  4589. #include "confdefs.h"
  4590. /* Override any gcc2 internal prototype to avoid an error.  */
  4591. /* We use char because int might match the return type of a gcc2
  4592.     builtin and then its argument prototype would still apply.  */
  4593. char tgoto();
  4594.  
  4595. int main() {
  4596. tgoto()
  4597. ; return 0; }
  4598. EOF
  4599. if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4600.   rm -rf conftest*
  4601.   eval "ac_cv_lib_$ac_lib_var=yes"
  4602. else
  4603.   echo "configure: failed program was:" >&5
  4604.   cat conftest.$ac_ext >&5
  4605.   rm -rf conftest*
  4606.   eval "ac_cv_lib_$ac_lib_var=no"
  4607. fi
  4608. rm -f conftest*
  4609. LIBS="$ac_save_LIBS"
  4610.  
  4611. fi
  4612. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4613.   echo "$ac_t""yes" 1>&6
  4614.   LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
  4615. else
  4616.   echo "$ac_t""no" 1>&6
  4617. fi
  4618.  
  4619. fi
  4620. if test "$cf_cv_lib_termcap" = none; then
  4621.     echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6
  4622. echo "configure:4623: checking for tgoto in -lncurses" >&5
  4623. ac_lib_var=`echo ncurses'_'tgoto | sed 'y%./+-%__p_%'`
  4624. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4625.   echo $ac_n "(cached) $ac_c" 1>&6
  4626. else
  4627.   ac_save_LIBS="$LIBS"
  4628. LIBS="-lncurses  $LIBS"
  4629. cat > conftest.$ac_ext <<EOF
  4630. #line 4631 "configure"
  4631. #include "confdefs.h"
  4632. /* Override any gcc2 internal prototype to avoid an error.  */
  4633. /* We use char because int might match the return type of a gcc2
  4634.     builtin and then its argument prototype would still apply.  */
  4635. char tgoto();
  4636.  
  4637. int main() {
  4638. tgoto()
  4639. ; return 0; }
  4640. EOF
  4641. if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4642.   rm -rf conftest*
  4643.   eval "ac_cv_lib_$ac_lib_var=yes"
  4644. else
  4645.   echo "configure: failed program was:" >&5
  4646.   cat conftest.$ac_ext >&5
  4647.   rm -rf conftest*
  4648.   eval "ac_cv_lib_$ac_lib_var=no"
  4649. fi
  4650. rm -f conftest*
  4651. LIBS="$ac_save_LIBS"
  4652.  
  4653. fi
  4654. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4655.   echo "$ac_t""yes" 1>&6
  4656.   LIBS="$LIBS -lncurses" cf_cv_lib_termcap=ncurses
  4657. else
  4658.   echo "$ac_t""no" 1>&6
  4659. fi
  4660.  
  4661. fi
  4662.  
  4663. fi
  4664.  
  4665. if test "$cf_cv_lib_termcap" = none; then
  4666.     { echo "configure: error: Can't find -ltermlib, -lcurses, or -ltermcap" 1>&2; exit 1; }
  4667. fi
  4668.  
  4669. cf_slang_LIBS2="$LIBS"
  4670. echo $ac_n "checking for acos""... $ac_c" 1>&6
  4671. echo "configure:4672: checking for acos" >&5
  4672. if eval "test \"`echo '$''{'ac_cv_func_acos'+set}'`\" = set"; then
  4673.   echo $ac_n "(cached) $ac_c" 1>&6
  4674. else
  4675.   cat > conftest.$ac_ext <<EOF
  4676. #line 4677 "configure"
  4677. #include "confdefs.h"
  4678. /* System header to define __stub macros and hopefully few prototypes,
  4679.     which can conflict with char acos(); below.  */
  4680. #include <assert.h>
  4681. /* Override any gcc2 internal prototype to avoid an error.  */
  4682. /* We use char because int might match the return type of a gcc2
  4683.     builtin and then its argument prototype would still apply.  */
  4684. char acos();
  4685.  
  4686. int main() {
  4687.  
  4688. /* The GNU C library defines this for functions which it implements
  4689.     to always fail with ENOSYS.  Some functions are actually named
  4690.     something starting with __ and the normal name is an alias.  */
  4691. #if defined (__stub_acos) || defined (__stub___acos)
  4692. choke me
  4693. #else
  4694. acos();
  4695. #endif
  4696.  
  4697. ; return 0; }
  4698. EOF
  4699. if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4700.   rm -rf conftest*
  4701.   eval "ac_cv_func_acos=yes"
  4702. else
  4703.   echo "configure: failed program was:" >&5
  4704.   cat conftest.$ac_ext >&5
  4705.   rm -rf conftest*
  4706.   eval "ac_cv_func_acos=no"
  4707. fi
  4708. rm -f conftest*
  4709. fi
  4710.  
  4711. if eval "test \"`echo '$ac_cv_func_'acos`\" = yes"; then
  4712.   echo "$ac_t""yes" 1>&6
  4713.   :
  4714. else
  4715.   echo "$ac_t""no" 1>&6
  4716.  
  4717. echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6
  4718. echo "configure:4719: checking for acos in -lm" >&5
  4719. ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'`
  4720. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4721.   echo $ac_n "(cached) $ac_c" 1>&6
  4722. else
  4723.   ac_save_LIBS="$LIBS"
  4724. LIBS="-lm $LIBS $LIBS"
  4725. cat > conftest.$ac_ext <<EOF
  4726. #line 4727 "configure"
  4727. #include "confdefs.h"
  4728. /* Override any gcc2 internal prototype to avoid an error.  */
  4729. /* We use char because int might match the return type of a gcc2
  4730.     builtin and then its argument prototype would still apply.  */
  4731. char acos();
  4732.  
  4733. int main() {
  4734. acos()
  4735. ; return 0; }
  4736. EOF
  4737. if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4738.   rm -rf conftest*
  4739.   eval "ac_cv_lib_$ac_lib_var=yes"
  4740. else
  4741.   echo "configure: failed program was:" >&5
  4742.   cat conftest.$ac_ext >&5
  4743.   rm -rf conftest*
  4744.   eval "ac_cv_lib_$ac_lib_var=no"
  4745. fi
  4746. rm -f conftest*
  4747. LIBS="$ac_save_LIBS"
  4748.  
  4749. fi
  4750. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4751.   echo "$ac_t""yes" 1>&6
  4752.   
  4753.     
  4754. cf_tr_func=`echo acos | tr '[a-z]' '[A-Z]'`
  4755.  
  4756.     cat >> confdefs.h <<EOF
  4757. #define HAVE_$cf_tr_func 1
  4758. EOF
  4759.  
  4760.     ac_cv_func_acos=yes
  4761.     LIBS="-lm $LIBS"
  4762. else
  4763.   echo "$ac_t""no" 1>&6
  4764.  
  4765.     ac_cv_func_acos=unknown
  4766.     unset ac_cv_func_acos 2>/dev/null
  4767.     
  4768. fi
  4769.  
  4770.  
  4771. fi
  4772.  
  4773.  
  4774.     cf_cv_have_lib_slang=no
  4775.     cf_libdir=""
  4776.     echo $ac_n "checking for SLtt_get_screen_size""... $ac_c" 1>&6
  4777. echo "configure:4778: checking for SLtt_get_screen_size" >&5
  4778. if eval "test \"`echo '$''{'ac_cv_func_SLtt_get_screen_size'+set}'`\" = set"; then
  4779.   echo $ac_n "(cached) $ac_c" 1>&6
  4780. else
  4781.   cat > conftest.$ac_ext <<EOF
  4782. #line 4783 "configure"
  4783. #include "confdefs.h"
  4784. /* System header to define __stub macros and hopefully few prototypes,
  4785.     which can conflict with char SLtt_get_screen_size(); below.  */
  4786. #include <assert.h>
  4787. /* Override any gcc2 internal prototype to avoid an error.  */
  4788. /* We use char because int might match the return type of a gcc2
  4789.     builtin and then its argument prototype would still apply.  */
  4790. char SLtt_get_screen_size();
  4791.  
  4792. int main() {
  4793.  
  4794. /* The GNU C library defines this for functions which it implements
  4795.     to always fail with ENOSYS.  Some functions are actually named
  4796.     something starting with __ and the normal name is an alias.  */
  4797. #if defined (__stub_SLtt_get_screen_size) || defined (__stub___SLtt_get_screen_size)
  4798. choke me
  4799. #else
  4800. SLtt_get_screen_size();
  4801. #endif
  4802.  
  4803. ; return 0; }
  4804. EOF
  4805. if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4806.   rm -rf conftest*
  4807.   eval "ac_cv_func_SLtt_get_screen_size=yes"
  4808. else
  4809.   echo "configure: failed program was:" >&5
  4810.   cat conftest.$ac_ext >&5
  4811.   rm -rf conftest*
  4812.   eval "ac_cv_func_SLtt_get_screen_size=no"
  4813. fi
  4814. rm -f conftest*
  4815. fi
  4816.  
  4817. if eval "test \"`echo '$ac_cv_func_'SLtt_get_screen_size`\" = yes"; then
  4818.   echo "$ac_t""yes" 1>&6
  4819.   cf_cv_have_lib_slang=yes
  4820. else
  4821.   echo "$ac_t""no" 1>&6
  4822.  
  4823.         cf_save_LIBS="$LIBS"
  4824.         echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6
  4825. echo "configure:4826: checking for SLtt_get_screen_size in -lslang" >&5
  4826.         LIBS="-lslang $LIBS"
  4827.         cat > conftest.$ac_ext <<EOF
  4828. #line 4829 "configure"
  4829. #include "confdefs.h"
  4830. #include <slang.h>
  4831. int main() {
  4832. SLtt_get_screen_size()
  4833. ; return 0; }
  4834. EOF
  4835. if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4836.   rm -rf conftest*
  4837.   echo "$ac_t""yes" 1>&6
  4838.              cf_cv_have_lib_slang=yes
  4839.             
  4840. else
  4841.   echo "configure: failed program was:" >&5
  4842.   cat conftest.$ac_ext >&5
  4843.   rm -rf conftest*
  4844.   echo "$ac_t""no" 1>&6
  4845.             cf_search=""
  4846. if test -d "$libdir"  ; then
  4847. test "$libdir" != NONE           && cf_search="$cf_search $libdir $libdir/slang"
  4848. fi
  4849. if test -d "$exec_prefix"; then
  4850. test "$exec_prefix" != NONE      && cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/slang"
  4851. fi
  4852. if test -d "$prefix"; then
  4853. test "$prefix" != NONE           && \
  4854. test "$prefix" != "$exec_prefix" && cf_search="$cf_search $prefix/lib $prefix/lib/slang"
  4855. fi
  4856. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/lib /usr/local/lib/slang"
  4857. test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/slang"
  4858.  
  4859.             for cf_libdir in $cf_search
  4860.             do
  4861.                 echo $ac_n "checking for -lslang in $cf_libdir""... $ac_c" 1>&6
  4862. echo "configure:4863: checking for -lslang in $cf_libdir" >&5
  4863.                 LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
  4864.                 cat > conftest.$ac_ext <<EOF
  4865. #line 4866 "configure"
  4866. #include "confdefs.h"
  4867. #include <slang.h>
  4868. int main() {
  4869. SLtt_get_screen_size()
  4870. ; return 0; }
  4871. EOF
  4872. if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4873.   rm -rf conftest*
  4874.   echo "$ac_t""yes" 1>&6
  4875.                       cf_cv_have_lib_slang=yes
  4876.                      break
  4877. else
  4878.   echo "configure: failed program was:" >&5
  4879.   cat conftest.$ac_ext >&5
  4880.   rm -rf conftest*
  4881.   echo "$ac_t""no" 1>&6
  4882.                      LIBS="$cf_save_LIBS"
  4883. fi
  4884. rm -f conftest*
  4885.             done
  4886.             
  4887. fi
  4888. rm -f conftest*
  4889.         
  4890. fi
  4891.  
  4892. if test $cf_cv_have_lib_slang = no ; then
  4893.     { echo "configure: error: Cannot link slang library" 1>&2; exit 1; }
  4894. fi
  4895. case $host_os in #(vi
  4896. linux*) # Suse Linux does not follow /usr/lib convention
  4897.     slang="$slang /lib"
  4898.     ;;
  4899. esac
  4900.  
  4901. cf_slang_LIBS3="$LIBS"
  4902. echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6
  4903. echo "configure:4904: checking if we can link slang without termcap" >&5
  4904. if test -n "`echo $cf_slang_LIBS1 | sed -e 's/ //g'`" ; then
  4905.     cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s@$cf_slang_LIBS1@@" -e 's@^.@@'`
  4906. else
  4907.     cf_exclude="$cf_slang_LIBS2"
  4908. fi
  4909. LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'`
  4910. cat > conftest.$ac_ext <<EOF
  4911. #line 4912 "configure"
  4912. #include "confdefs.h"
  4913. #include <slang.h>
  4914. int main() {
  4915. SLtt_get_screen_size()
  4916. ; return 0; }
  4917. EOF
  4918. if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4919.   rm -rf conftest*
  4920.   cf_result=yes
  4921. else
  4922.   echo "configure: failed program was:" >&5
  4923.   cat conftest.$ac_ext >&5
  4924.   rm -rf conftest*
  4925.   cf_result=no
  4926. fi
  4927. rm -f conftest*
  4928. echo "$ac_t""$cf_result" 1>&6
  4929. test $cf_result = no && LIBS="$cf_slang_LIBS3"
  4930.  
  4931.     ;;
  4932. esac
  4933.  
  4934. eval cf_libdir=$libdir
  4935. cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$prefix/@ -e s@'^NONE/'@$ac_default_prefix/@`
  4936.  
  4937. echo $ac_n "checking for location of config-file""... $ac_c" 1>&6
  4938. echo "configure:4939: checking for location of config-file" >&5
  4939. LYNX_CFG_FILE=$cf_libdir/lynx.cfg
  4940. cat >> confdefs.h <<EOF
  4941. #define LYNX_CFG_FILE "$LYNX_CFG_FILE"
  4942. EOF
  4943.  
  4944. echo "$ac_t""$LYNX_CFG_FILE" 1>&6
  4945.  
  4946.  
  4947. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  4948. echo "configure:4949: checking for ANSI C header files" >&5
  4949. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  4950.   echo $ac_n "(cached) $ac_c" 1>&6
  4951. else
  4952.   cat > conftest.$ac_ext <<EOF
  4953. #line 4954 "configure"
  4954. #include "confdefs.h"
  4955. #include <stdlib.h>
  4956. #include <stdarg.h>
  4957. #include <string.h>
  4958. #include <float.h>
  4959. EOF
  4960. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4961. { (eval echo configure:4962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4962. ac_err=`grep -v '^ *+' conftest.out`
  4963. if test -z "$ac_err"; then
  4964.   rm -rf conftest*
  4965.   ac_cv_header_stdc=yes
  4966. else
  4967.   echo "$ac_err" >&5
  4968.   echo "configure: failed program was:" >&5
  4969.   cat conftest.$ac_ext >&5
  4970.   rm -rf conftest*
  4971.   ac_cv_header_stdc=no
  4972. fi
  4973. rm -f conftest*
  4974.  
  4975. if test $ac_cv_header_stdc = yes; then
  4976.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  4977. cat > conftest.$ac_ext <<EOF
  4978. #line 4979 "configure"
  4979. #include "confdefs.h"
  4980. #include <string.h>
  4981. EOF
  4982. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4983.   egrep "memchr" >/dev/null 2>&1; then
  4984.   :
  4985. else
  4986.   rm -rf conftest*
  4987.   ac_cv_header_stdc=no
  4988. fi
  4989. rm -f conftest*
  4990.  
  4991. fi
  4992.  
  4993. if test $ac_cv_header_stdc = yes; then
  4994.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  4995. cat > conftest.$ac_ext <<EOF
  4996. #line 4997 "configure"
  4997. #include "confdefs.h"
  4998. #include <stdlib.h>
  4999. EOF
  5000. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5001.   egrep "free" >/dev/null 2>&1; then
  5002.   :
  5003. else
  5004.   rm -rf conftest*
  5005.   ac_cv_header_stdc=no
  5006. fi
  5007. rm -f conftest*
  5008.  
  5009. fi
  5010.  
  5011. if test $ac_cv_header_stdc = yes; then
  5012.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  5013. if test "$cross_compiling" = yes; then
  5014.   :
  5015. else
  5016.   cat > conftest.$ac_ext <<EOF
  5017. #line 5018 "configure"
  5018. #include "confdefs.h"
  5019. #include <ctype.h>
  5020. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  5021. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  5022. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  5023. int main () { int i; for (i = 0; i < 256; i++)
  5024. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  5025. exit (0); }
  5026.  
  5027. EOF
  5028. if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5029. then
  5030.   :
  5031. else
  5032.   echo "configure: failed program was:" >&5
  5033.   cat conftest.$ac_ext >&5
  5034.   rm -fr conftest*
  5035.   ac_cv_header_stdc=no
  5036. fi
  5037. rm -fr conftest*
  5038. fi
  5039.  
  5040. fi
  5041. fi
  5042.  
  5043. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  5044. if test $ac_cv_header_stdc = yes; then
  5045.   cat >> confdefs.h <<\EOF
  5046. #define STDC_HEADERS 1
  5047. EOF
  5048.  
  5049. fi
  5050.  
  5051. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  5052. echo "configure:5053: checking whether time.h and sys/time.h may both be included" >&5
  5053. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  5054.   echo $ac_n "(cached) $ac_c" 1>&6
  5055. else
  5056.   cat > conftest.$ac_ext <<EOF
  5057. #line 5058 "configure"
  5058. #include "confdefs.h"
  5059. #include <sys/types.h>
  5060. #include <sys/time.h>
  5061. #include <time.h>
  5062. int main() {
  5063. struct tm *tp;
  5064. ; return 0; }
  5065. EOF
  5066. if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5067.   rm -rf conftest*
  5068.   ac_cv_header_time=yes
  5069. else
  5070.   echo "configure: failed program was:" >&5
  5071.   cat conftest.$ac_ext >&5
  5072.   rm -rf conftest*
  5073.   ac_cv_header_time=no
  5074. fi
  5075. rm -f conftest*
  5076. fi
  5077.  
  5078. echo "$ac_t""$ac_cv_header_time" 1>&6
  5079. if test $ac_cv_header_time = yes; then
  5080.   cat >> confdefs.h <<\EOF
  5081. #define TIME_WITH_SYS_TIME 1
  5082. EOF
  5083.  
  5084. fi
  5085.  
  5086. ac_header_dirent=no
  5087. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  5088. do
  5089. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5090. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  5091. echo "configure:5092: checking for $ac_hdr that defines DIR" >&5
  5092. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  5093.   echo $ac_n "(cached) $ac_c" 1>&6
  5094. else
  5095.   cat > conftest.$ac_ext <<EOF
  5096. #line 5097 "configure"
  5097. #include "confdefs.h"
  5098. #include <sys/types.h>
  5099. #include <$ac_hdr>
  5100. int main() {
  5101. DIR *dirp = 0;
  5102. ; return 0; }
  5103. EOF
  5104. if { (eval echo configure:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5105.   rm -rf conftest*
  5106.   eval "ac_cv_header_dirent_$ac_safe=yes"
  5107. else
  5108.   echo "configure: failed program was:" >&5
  5109.   cat conftest.$ac_ext >&5
  5110.   rm -rf conftest*
  5111.   eval "ac_cv_header_dirent_$ac_safe=no"
  5112. fi
  5113. rm -f conftest*
  5114. fi
  5115. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  5116.   echo "$ac_t""yes" 1>&6
  5117.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5118.   cat >> confdefs.h <<EOF
  5119. #define $ac_tr_hdr 1
  5120. EOF
  5121.  ac_header_dirent=$ac_hdr; break
  5122. else
  5123.   echo "$ac_t""no" 1>&6
  5124. fi
  5125. done
  5126. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  5127. if test $ac_header_dirent = dirent.h; then
  5128. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  5129. echo "configure:5130: checking for opendir in -ldir" >&5
  5130. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  5131. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5132.   echo $ac_n "(cached) $ac_c" 1>&6
  5133. else
  5134.   ac_save_LIBS="$LIBS"
  5135. LIBS="-ldir  $LIBS"
  5136. cat > conftest.$ac_ext <<EOF
  5137. #line 5138 "configure"
  5138. #include "confdefs.h"
  5139. /* Override any gcc2 internal prototype to avoid an error.  */
  5140. /* We use char because int might match the return type of a gcc2
  5141.     builtin and then its argument prototype would still apply.  */
  5142. char opendir();
  5143.  
  5144. int main() {
  5145. opendir()
  5146. ; return 0; }
  5147. EOF
  5148. if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5149.   rm -rf conftest*
  5150.   eval "ac_cv_lib_$ac_lib_var=yes"
  5151. else
  5152.   echo "configure: failed program was:" >&5
  5153.   cat conftest.$ac_ext >&5
  5154.   rm -rf conftest*
  5155.   eval "ac_cv_lib_$ac_lib_var=no"
  5156. fi
  5157. rm -f conftest*
  5158. LIBS="$ac_save_LIBS"
  5159.  
  5160. fi
  5161. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5162.   echo "$ac_t""yes" 1>&6
  5163.   LIBS="$LIBS -ldir"
  5164. else
  5165.   echo "$ac_t""no" 1>&6
  5166. fi
  5167.  
  5168. else
  5169. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  5170. echo "configure:5171: checking for opendir in -lx" >&5
  5171. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  5172. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5173.   echo $ac_n "(cached) $ac_c" 1>&6
  5174. else
  5175.   ac_save_LIBS="$LIBS"
  5176. LIBS="-lx  $LIBS"
  5177. cat > conftest.$ac_ext <<EOF
  5178. #line 5179 "configure"
  5179. #include "confdefs.h"
  5180. /* Override any gcc2 internal prototype to avoid an error.  */
  5181. /* We use char because int might match the return type of a gcc2
  5182.     builtin and then its argument prototype would still apply.  */
  5183. char opendir();
  5184.  
  5185. int main() {
  5186. opendir()
  5187. ; return 0; }
  5188. EOF
  5189. if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5190.   rm -rf conftest*
  5191.   eval "ac_cv_lib_$ac_lib_var=yes"
  5192. else
  5193.   echo "configure: failed program was:" >&5
  5194.   cat conftest.$ac_ext >&5
  5195.   rm -rf conftest*
  5196.   eval "ac_cv_lib_$ac_lib_var=no"
  5197. fi
  5198. rm -f conftest*
  5199. LIBS="$ac_save_LIBS"
  5200.  
  5201. fi
  5202. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5203.   echo "$ac_t""yes" 1>&6
  5204.   LIBS="$LIBS -lx"
  5205. else
  5206.   echo "$ac_t""no" 1>&6
  5207. fi
  5208.  
  5209. fi
  5210.  
  5211. for ac_hdr in \
  5212.     fcntl.h \
  5213.     limits.h \
  5214.     stdlib.h \
  5215.     string.h \
  5216.     sys/fcntl.h \
  5217.     sys/filio.h \
  5218.     sys/ioctl.h \
  5219.     sys/param.h \
  5220.     sys/time.h \
  5221.     termio.h \
  5222.     termios.h \
  5223.     unistd.h \
  5224.  
  5225. do
  5226. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5227. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5228. echo "configure:5229: checking for $ac_hdr" >&5
  5229. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5230.   echo $ac_n "(cached) $ac_c" 1>&6
  5231. else
  5232.   cat > conftest.$ac_ext <<EOF
  5233. #line 5234 "configure"
  5234. #include "confdefs.h"
  5235. #include <$ac_hdr>
  5236. EOF
  5237. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5238. { (eval echo configure:5239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5239. ac_err=`grep -v '^ *+' conftest.out`
  5240. if test -z "$ac_err"; then
  5241.   rm -rf conftest*
  5242.   eval "ac_cv_header_$ac_safe=yes"
  5243. else
  5244.   echo "$ac_err" >&5
  5245.   echo "configure: failed program was:" >&5
  5246.   cat conftest.$ac_ext >&5
  5247.   rm -rf conftest*
  5248.   eval "ac_cv_header_$ac_safe=no"
  5249. fi
  5250. rm -f conftest*
  5251. fi
  5252. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5253.   echo "$ac_t""yes" 1>&6
  5254.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5255.   cat >> confdefs.h <<EOF
  5256. #define $ac_tr_hdr 1
  5257. EOF
  5258.  
  5259. else
  5260.   echo "$ac_t""no" 1>&6
  5261. fi
  5262. done
  5263.  
  5264.  
  5265. echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6
  5266. echo "configure:5267: checking termio.h and termios.h" >&5
  5267. if eval "test \"`echo '$''{'cf_cv_termio_and_termios'+set}'`\" = set"; then
  5268.   echo $ac_n "(cached) $ac_c" 1>&6
  5269. else
  5270.   
  5271.     cat > conftest.$ac_ext <<EOF
  5272. #line 5273 "configure"
  5273. #include "confdefs.h"
  5274.  
  5275. #if HAVE_TERMIO_H
  5276. #include <termio.h>
  5277. #endif
  5278. #if HAVE_TERMIOS_H
  5279. #include <termios.h>
  5280. #endif 
  5281. int main() {
  5282. putchar (0x0a)
  5283. ; return 0; }
  5284. EOF
  5285. if { (eval echo configure:5286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5286.   rm -rf conftest*
  5287.   cf_cv_termio_and_termios=yes
  5288. else
  5289.   echo "configure: failed program was:" >&5
  5290.   cat conftest.$ac_ext >&5
  5291.   rm -rf conftest*
  5292.   cf_cv_termio_and_termios=no
  5293. fi
  5294. rm -f conftest*
  5295. fi
  5296.  
  5297. echo "$ac_t""$cf_cv_termio_and_termios" 1>&6
  5298. test $cf_cv_termio_and_termios = no && cat >> confdefs.h <<\EOF
  5299. #define TERMIO_AND_TERMIOS 1
  5300. EOF
  5301.  
  5302.  
  5303.  
  5304. for ac_hdr in sys/wait.h
  5305. do
  5306. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5307. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5308. echo "configure:5309: checking for $ac_hdr" >&5
  5309. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5310.   echo $ac_n "(cached) $ac_c" 1>&6
  5311. else
  5312.   cat > conftest.$ac_ext <<EOF
  5313. #line 5314 "configure"
  5314. #include "confdefs.h"
  5315. #include <$ac_hdr>
  5316. EOF
  5317. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5318. { (eval echo configure:5319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5319. ac_err=`grep -v '^ *+' conftest.out`
  5320. if test -z "$ac_err"; then
  5321.   rm -rf conftest*
  5322.   eval "ac_cv_header_$ac_safe=yes"
  5323. else
  5324.   echo "$ac_err" >&5
  5325.   echo "configure: failed program was:" >&5
  5326.   cat conftest.$ac_ext >&5
  5327.   rm -rf conftest*
  5328.   eval "ac_cv_header_$ac_safe=no"
  5329. fi
  5330. rm -f conftest*
  5331. fi
  5332. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5333.   echo "$ac_t""yes" 1>&6
  5334.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5335.   cat >> confdefs.h <<EOF
  5336. #define $ac_tr_hdr 1
  5337. EOF
  5338.  
  5339. else
  5340.   echo "$ac_t""no" 1>&6
  5341. fi
  5342. done
  5343.  
  5344. cf_wait_headers="#include <sys/types.h>
  5345. "
  5346. if test $ac_cv_header_sys_wait_h = yes; then
  5347. cf_wait_headers="$cf_wait_headers
  5348. #include <sys/wait.h>
  5349. "
  5350. else
  5351. for ac_hdr in wait.h
  5352. do
  5353. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5354. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5355. echo "configure:5356: checking for $ac_hdr" >&5
  5356. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5357.   echo $ac_n "(cached) $ac_c" 1>&6
  5358. else
  5359.   cat > conftest.$ac_ext <<EOF
  5360. #line 5361 "configure"
  5361. #include "confdefs.h"
  5362. #include <$ac_hdr>
  5363. EOF
  5364. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5365. { (eval echo configure:5366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5366. ac_err=`grep -v '^ *+' conftest.out`
  5367. if test -z "$ac_err"; then
  5368.   rm -rf conftest*
  5369.   eval "ac_cv_header_$ac_safe=yes"
  5370. else
  5371.   echo "$ac_err" >&5
  5372.   echo "configure: failed program was:" >&5
  5373.   cat conftest.$ac_ext >&5
  5374.   rm -rf conftest*
  5375.   eval "ac_cv_header_$ac_safe=no"
  5376. fi
  5377. rm -f conftest*
  5378. fi
  5379. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5380.   echo "$ac_t""yes" 1>&6
  5381.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5382.   cat >> confdefs.h <<EOF
  5383. #define $ac_tr_hdr 1
  5384. EOF
  5385.  
  5386. else
  5387.   echo "$ac_t""no" 1>&6
  5388. fi
  5389. done
  5390.  
  5391. for ac_hdr in waitstatus.h
  5392. do
  5393. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5394. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5395. echo "configure:5396: checking for $ac_hdr" >&5
  5396. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5397.   echo $ac_n "(cached) $ac_c" 1>&6
  5398. else
  5399.   cat > conftest.$ac_ext <<EOF
  5400. #line 5401 "configure"
  5401. #include "confdefs.h"
  5402. #include <$ac_hdr>
  5403. EOF
  5404. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5405. { (eval echo configure:5406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5406. ac_err=`grep -v '^ *+' conftest.out`
  5407. if test -z "$ac_err"; then
  5408.   rm -rf conftest*
  5409.   eval "ac_cv_header_$ac_safe=yes"
  5410. else
  5411.   echo "$ac_err" >&5
  5412.   echo "configure: failed program was:" >&5
  5413.   cat conftest.$ac_ext >&5
  5414.   rm -rf conftest*
  5415.   eval "ac_cv_header_$ac_safe=no"
  5416. fi
  5417. rm -f conftest*
  5418. fi
  5419. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5420.   echo "$ac_t""yes" 1>&6
  5421.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5422.   cat >> confdefs.h <<EOF
  5423. #define $ac_tr_hdr 1
  5424. EOF
  5425.  
  5426. else
  5427.   echo "$ac_t""no" 1>&6
  5428. fi
  5429. done
  5430.  
  5431. if test $ac_cv_header_wait_h = yes; then
  5432. cf_wait_headers="$cf_wait_headers
  5433. #include <wait.h>
  5434. "
  5435. fi
  5436. if test $ac_cv_header_waitstatus_h = yes; then
  5437. cf_wait_headers="$cf_wait_headers
  5438. #include <waitstatus.h>
  5439. "
  5440. fi
  5441. fi
  5442.  
  5443.  
  5444.  
  5445. echo $ac_n "checking for union wait""... $ac_c" 1>&6
  5446. echo "configure:5447: checking for union wait" >&5
  5447. if eval "test \"`echo '$''{'cf_cv_type_unionwait'+set}'`\" = set"; then
  5448.   echo $ac_n "(cached) $ac_c" 1>&6
  5449. else
  5450.   
  5451.     cat > conftest.$ac_ext <<EOF
  5452. #line 5453 "configure"
  5453. #include "confdefs.h"
  5454. $cf_wait_headers
  5455. int main() {
  5456. int x;
  5457.      int y = WEXITSTATUS(x);
  5458.      int z = WTERMSIG(x);
  5459.      wait(&x);
  5460.     
  5461. ; return 0; }
  5462. EOF
  5463. if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5464.   rm -rf conftest*
  5465.   cf_cv_type_unionwait=no
  5466.      echo compiles ok w/o union wait 1>&5
  5467.     
  5468. else
  5469.   echo "configure: failed program was:" >&5
  5470.   cat conftest.$ac_ext >&5
  5471.   rm -rf conftest*
  5472.   
  5473.     cat > conftest.$ac_ext <<EOF
  5474. #line 5475 "configure"
  5475. #include "confdefs.h"
  5476. $cf_wait_headers
  5477. int main() {
  5478. union wait x;
  5479. #ifdef WEXITSTATUS
  5480.      int y = WEXITSTATUS(x);
  5481. #endif
  5482. #ifdef WTERMSIG
  5483.      int z = WTERMSIG(x);
  5484. #endif
  5485.      wait(&x);
  5486.     
  5487. ; return 0; }
  5488. EOF
  5489. if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5490.   rm -rf conftest*
  5491.   cf_cv_type_unionwait=yes
  5492.      echo compiles ok with union wait and possibly macros too 1>&5
  5493.     
  5494. else
  5495.   echo "configure: failed program was:" >&5
  5496.   cat conftest.$ac_ext >&5
  5497.   rm -rf conftest*
  5498.   cf_cv_type_unionwait=no
  5499. fi
  5500. rm -f conftest*
  5501. fi
  5502. rm -f conftest*
  5503. fi
  5504.  
  5505. echo "$ac_t""$cf_cv_type_unionwait" 1>&6
  5506. test $cf_cv_type_unionwait = yes && cat >> confdefs.h <<\EOF
  5507. #define HAVE_TYPE_UNIONWAIT 1
  5508. EOF
  5509.  
  5510.  
  5511.  
  5512.  
  5513. if test $cf_cv_type_unionwait = yes; then
  5514.  
  5515.     echo $ac_n "checking if union wait can be used as wait-arg""... $ac_c" 1>&6
  5516. echo "configure:5517: checking if union wait can be used as wait-arg" >&5
  5517.     if eval "test \"`echo '$''{'cf_cv_arg_union_wait'+set}'`\" = set"; then
  5518.   echo $ac_n "(cached) $ac_c" 1>&6
  5519. else
  5520.   
  5521.         cat > conftest.$ac_ext <<EOF
  5522. #line 5523 "configure"
  5523. #include "confdefs.h"
  5524. $cf_wait_headers
  5525. int main() {
  5526. union wait x; wait(&x)
  5527. ; return 0; }
  5528. EOF
  5529. if { (eval echo configure:5530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5530.   rm -rf conftest*
  5531.   cf_cv_arg_union_wait=yes
  5532. else
  5533.   echo "configure: failed program was:" >&5
  5534.   cat conftest.$ac_ext >&5
  5535.   rm -rf conftest*
  5536.   cf_cv_arg_union_wait=no
  5537. fi
  5538. rm -f conftest*
  5539.         
  5540. fi
  5541.  
  5542.     echo "$ac_t""$cf_cv_arg_union_wait" 1>&6
  5543.     test $cf_cv_arg_union_wait = yes && cat >> confdefs.h <<\EOF
  5544. #define WAIT_USES_UNION 1
  5545. EOF
  5546.  
  5547.  
  5548.     echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6
  5549. echo "configure:5550: checking if union wait can be used as waitpid-arg" >&5
  5550.     if eval "test \"`echo '$''{'cf_cv_arg_union_waitpid'+set}'`\" = set"; then
  5551.   echo $ac_n "(cached) $ac_c" 1>&6
  5552. else
  5553.   
  5554.         cat > conftest.$ac_ext <<EOF
  5555. #line 5556 "configure"
  5556. #include "confdefs.h"
  5557. $cf_wait_headers
  5558. int main() {
  5559. union wait x; waitpid(0, &x, 0)
  5560. ; return 0; }
  5561. EOF
  5562. if { (eval echo configure:5563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5563.   rm -rf conftest*
  5564.   cf_cv_arg_union_waitpid=yes
  5565. else
  5566.   echo "configure: failed program was:" >&5
  5567.   cat conftest.$ac_ext >&5
  5568.   rm -rf conftest*
  5569.   cf_cv_arg_union_waitpid=no
  5570. fi
  5571. rm -f conftest*
  5572.         
  5573. fi
  5574.  
  5575.     echo "$ac_t""$cf_cv_arg_union_waitpid" 1>&6
  5576.     test $cf_cv_arg_union_waitpid = yes && cat >> confdefs.h <<\EOF
  5577. #define WAITPID_USES_UNION 1
  5578. EOF
  5579.  
  5580.  
  5581. fi
  5582.  
  5583. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  5584. echo "configure:5585: checking for mode_t" >&5
  5585. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  5586.   echo $ac_n "(cached) $ac_c" 1>&6
  5587. else
  5588.   cat > conftest.$ac_ext <<EOF
  5589. #line 5590 "configure"
  5590. #include "confdefs.h"
  5591. #include <sys/types.h>
  5592. #if STDC_HEADERS
  5593. #include <stdlib.h>
  5594. #include <stddef.h>
  5595. #endif
  5596. EOF
  5597. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5598.   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  5599.   rm -rf conftest*
  5600.   ac_cv_type_mode_t=yes
  5601. else
  5602.   rm -rf conftest*
  5603.   ac_cv_type_mode_t=no
  5604. fi
  5605. rm -f conftest*
  5606.  
  5607. fi
  5608. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  5609. if test $ac_cv_type_mode_t = no; then
  5610.   cat >> confdefs.h <<\EOF
  5611. #define mode_t int
  5612. EOF
  5613.  
  5614. fi
  5615.  
  5616.  
  5617.  
  5618. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  5619. echo "configure:5620: checking for pid_t" >&5
  5620. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  5621.   echo $ac_n "(cached) $ac_c" 1>&6
  5622. else
  5623.   cat > conftest.$ac_ext <<EOF
  5624. #line 5625 "configure"
  5625. #include "confdefs.h"
  5626. #include <sys/types.h>
  5627. #if STDC_HEADERS
  5628. #include <stdlib.h>
  5629. #include <stddef.h>
  5630. #endif
  5631. EOF
  5632. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5633.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  5634.   rm -rf conftest*
  5635.   ac_cv_type_pid_t=yes
  5636. else
  5637.   rm -rf conftest*
  5638.   ac_cv_type_pid_t=no
  5639. fi
  5640. rm -f conftest*
  5641.  
  5642. fi
  5643. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  5644. if test $ac_cv_type_pid_t = no; then
  5645.   cat >> confdefs.h <<\EOF
  5646. #define pid_t int
  5647. EOF
  5648.  
  5649. fi
  5650.  
  5651. ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
  5652. echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
  5653. echo "configure:5654: checking for vfork.h" >&5
  5654. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5655.   echo $ac_n "(cached) $ac_c" 1>&6
  5656. else
  5657.   cat > conftest.$ac_ext <<EOF
  5658. #line 5659 "configure"
  5659. #include "confdefs.h"
  5660. #include <vfork.h>
  5661. EOF
  5662. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5663. { (eval echo configure:5664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5664. ac_err=`grep -v '^ *+' conftest.out`
  5665. if test -z "$ac_err"; then
  5666.   rm -rf conftest*
  5667.   eval "ac_cv_header_$ac_safe=yes"
  5668. else
  5669.   echo "$ac_err" >&5
  5670.   echo "configure: failed program was:" >&5
  5671.   cat conftest.$ac_ext >&5
  5672.   rm -rf conftest*
  5673.   eval "ac_cv_header_$ac_safe=no"
  5674. fi
  5675. rm -f conftest*
  5676. fi
  5677. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5678.   echo "$ac_t""yes" 1>&6
  5679.   cat >> confdefs.h <<\EOF
  5680. #define HAVE_VFORK_H 1
  5681. EOF
  5682.  
  5683. else
  5684.   echo "$ac_t""no" 1>&6
  5685. fi
  5686.  
  5687. echo $ac_n "checking for working vfork""... $ac_c" 1>&6
  5688. echo "configure:5689: checking for working vfork" >&5
  5689. if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
  5690.   echo $ac_n "(cached) $ac_c" 1>&6
  5691. else
  5692.   if test "$cross_compiling" = yes; then
  5693.   echo $ac_n "checking for vfork""... $ac_c" 1>&6
  5694. echo "configure:5695: checking for vfork" >&5
  5695. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  5696.   echo $ac_n "(cached) $ac_c" 1>&6
  5697. else
  5698.   cat > conftest.$ac_ext <<EOF
  5699. #line 5700 "configure"
  5700. #include "confdefs.h"
  5701. /* System header to define __stub macros and hopefully few prototypes,
  5702.     which can conflict with char vfork(); below.  */
  5703. #include <assert.h>
  5704. /* Override any gcc2 internal prototype to avoid an error.  */
  5705. /* We use char because int might match the return type of a gcc2
  5706.     builtin and then its argument prototype would still apply.  */
  5707. char vfork();
  5708.  
  5709. int main() {
  5710.  
  5711. /* The GNU C library defines this for functions which it implements
  5712.     to always fail with ENOSYS.  Some functions are actually named
  5713.     something starting with __ and the normal name is an alias.  */
  5714. #if defined (__stub_vfork) || defined (__stub___vfork)
  5715. choke me
  5716. #else
  5717. vfork();
  5718. #endif
  5719.  
  5720. ; return 0; }
  5721. EOF
  5722. if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5723.   rm -rf conftest*
  5724.   eval "ac_cv_func_vfork=yes"
  5725. else
  5726.   echo "configure: failed program was:" >&5
  5727.   cat conftest.$ac_ext >&5
  5728.   rm -rf conftest*
  5729.   eval "ac_cv_func_vfork=no"
  5730. fi
  5731. rm -f conftest*
  5732. fi
  5733.  
  5734. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  5735.   echo "$ac_t""yes" 1>&6
  5736.   :
  5737. else
  5738.   echo "$ac_t""no" 1>&6
  5739. fi
  5740.  
  5741. else
  5742.   cat > conftest.$ac_ext <<EOF
  5743. #line 5744 "configure"
  5744. #include "confdefs.h"
  5745. /* Thanks to Paul Eggert for this test.  */
  5746. #include <stdio.h>
  5747. #include <sys/types.h>
  5748. #include <sys/stat.h>
  5749. #ifdef HAVE_UNISTD_H
  5750. #include <unistd.h>
  5751. #endif
  5752. #ifdef HAVE_VFORK_H
  5753. #include <vfork.h>
  5754. #endif
  5755. /* On some sparc systems, changes by the child to local and incoming
  5756.    argument registers are propagated back to the parent.
  5757.    The compiler is told about this with #include <vfork.h>,
  5758.    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  5759.    Test for this by using a static variable whose address
  5760.    is put into a register that is clobbered by the vfork.  */
  5761. static
  5762. #ifdef __cplusplus
  5763. sparc_address_test (int arg)
  5764. #else
  5765. sparc_address_test (arg) int arg;
  5766. #endif
  5767. {
  5768.   static pid_t child;
  5769.   if (!child) {
  5770.     child = vfork ();
  5771.     if (child < 0) {
  5772.       perror ("vfork");
  5773.       _exit(2);
  5774.     }
  5775.     if (!child) {
  5776.       arg = getpid();
  5777.       write(-1, "", 0);
  5778.       _exit (arg);
  5779.     }
  5780.   }
  5781. }
  5782. main() {
  5783.   pid_t parent = getpid ();
  5784.   pid_t child;
  5785.  
  5786.   sparc_address_test ();
  5787.  
  5788.   child = vfork ();
  5789.  
  5790.   if (child == 0) {
  5791.     /* Here is another test for sparc vfork register problems.
  5792.        This test uses lots of local variables, at least
  5793.        as many local variables as main has allocated so far
  5794.        including compiler temporaries.  4 locals are enough for
  5795.        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
  5796.        A buggy compiler should reuse the register of parent
  5797.        for one of the local variables, since it will think that
  5798.        parent can't possibly be used any more in this routine.
  5799.        Assigning to the local variable will thus munge parent
  5800.        in the parent process.  */
  5801.     pid_t
  5802.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  5803.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  5804.     /* Convince the compiler that p..p7 are live; otherwise, it might
  5805.        use the same hardware register for all 8 local variables.  */
  5806.     if (p != p1 || p != p2 || p != p3 || p != p4
  5807.     || p != p5 || p != p6 || p != p7)
  5808.       _exit(1);
  5809.  
  5810.     /* On some systems (e.g. IRIX 3.3),
  5811.        vfork doesn't separate parent from child file descriptors.
  5812.        If the child closes a descriptor before it execs or exits,
  5813.        this munges the parent's descriptor as well.
  5814.        Test for this by closing stdout in the child.  */
  5815.     _exit(close(fileno(stdout)) != 0);
  5816.   } else {
  5817.     int status;
  5818.     struct stat st;
  5819.  
  5820.     while (wait(&status) != child)
  5821.       ;
  5822.     exit(
  5823.      /* Was there some problem with vforking?  */
  5824.      child < 0
  5825.  
  5826.      /* Did the child fail?  (This shouldn't happen.)  */
  5827.      || status
  5828.  
  5829.      /* Did the vfork/compiler bug occur?  */
  5830.      || parent != getpid()
  5831.  
  5832.      /* Did the file descriptor bug occur?  */
  5833.      || fstat(fileno(stdout), &st) != 0
  5834.      );
  5835.   }
  5836. }
  5837. EOF
  5838. if { (eval echo configure:5839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5839. then
  5840.   ac_cv_func_vfork_works=yes
  5841. else
  5842.   echo "configure: failed program was:" >&5
  5843.   cat conftest.$ac_ext >&5
  5844.   rm -fr conftest*
  5845.   ac_cv_func_vfork_works=no
  5846. fi
  5847. rm -fr conftest*
  5848. fi
  5849.  
  5850. fi
  5851.  
  5852. echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
  5853. if test $ac_cv_func_vfork_works = no; then
  5854.   cat >> confdefs.h <<\EOF
  5855. #define vfork fork
  5856. EOF
  5857.  
  5858. fi
  5859.  
  5860.  
  5861. echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6
  5862. echo "configure:5863: checking if we should use fcntl or ioctl" >&5
  5863. if eval "test \"`echo '$''{'cf_cv_fionbio'+set}'`\" = set"; then
  5864.   echo $ac_n "(cached) $ac_c" 1>&6
  5865. else
  5866.   
  5867. cat > conftest.$ac_ext <<EOF
  5868. #line 5869 "configure"
  5869. #include "confdefs.h"
  5870.  
  5871. #include <sys/types.h>
  5872. #include <sys/ioctl.h>
  5873.  
  5874. int main() {
  5875.  
  5876.         int ret = ioctl(0, FIONBIO, (char *)0);
  5877.     
  5878. ; return 0; }
  5879. EOF
  5880. if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5881.   rm -rf conftest*
  5882.   cf_cv_fionbio=ioctl
  5883. else
  5884.   echo "configure: failed program was:" >&5
  5885.   cat conftest.$ac_ext >&5
  5886.   rm -rf conftest*
  5887.   
  5888. cat > conftest.$ac_ext <<EOF
  5889. #line 5890 "configure"
  5890. #include "confdefs.h"
  5891.  
  5892. #include <sys/types.h>
  5893. #if HAVE_FCNTL_H
  5894. #include <fcntl.h>
  5895. #else
  5896. #if HAVE_SYS_FCNTL_H
  5897. #include <sys/fcntl.h>
  5898. #endif
  5899. #endif
  5900. int main() {
  5901.  
  5902.         int ret = fcntl(0, F_SETFL, O_NONBLOCK);
  5903.     
  5904. ; return 0; }
  5905. EOF
  5906. if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5907.   rm -rf conftest*
  5908.   cf_cv_fionbio=fcntl
  5909. else
  5910.   echo "configure: failed program was:" >&5
  5911.   cat conftest.$ac_ext >&5
  5912.   rm -rf conftest*
  5913.   cf_cv_fionbio=unknown
  5914. fi
  5915. rm -f conftest*
  5916. fi
  5917. rm -f conftest*
  5918.  
  5919. fi
  5920.  
  5921. echo "$ac_t""$cf_cv_fionbio" 1>&6
  5922. test "$cf_cv_fionbio" = "fcntl" && cat >> confdefs.h <<\EOF
  5923. #define USE_FCNTL 1
  5924. EOF
  5925.  
  5926.  
  5927.  
  5928. echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6
  5929. echo "configure:5930: checking for broken/missing definition of remove" >&5
  5930. if eval "test \"`echo '$''{'cf_cv_baddef_remove'+set}'`\" = set"; then
  5931.   echo $ac_n "(cached) $ac_c" 1>&6
  5932. else
  5933.   
  5934. cat > conftest.$ac_ext <<EOF
  5935. #line 5936 "configure"
  5936. #include "confdefs.h"
  5937. #include <stdio.h>
  5938. int main() {
  5939. remove("dummy")
  5940. ; return 0; }
  5941. EOF
  5942. if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5943.   rm -rf conftest*
  5944.   cf_cv_baddef_remove=no
  5945. else
  5946.   echo "configure: failed program was:" >&5
  5947.   cat conftest.$ac_ext >&5
  5948.   rm -rf conftest*
  5949.   cat > conftest.$ac_ext <<EOF
  5950. #line 5951 "configure"
  5951. #include "confdefs.h"
  5952. #include <stdio.h>
  5953.         int __unlink(name) { return unlink(name); } 
  5954. int main() {
  5955. remove("dummy")
  5956. ; return 0; }
  5957. EOF
  5958. if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5959.   rm -rf conftest*
  5960.   cf_cv_baddef_remove=yes
  5961. else
  5962.   echo "configure: failed program was:" >&5
  5963.   cat conftest.$ac_ext >&5
  5964.   rm -rf conftest*
  5965.   cf_cv_baddef_remove=unknown
  5966. fi
  5967. rm -f conftest*
  5968.     
  5969. fi
  5970. rm -f conftest*
  5971.  
  5972. fi
  5973.  
  5974. echo "$ac_t""$cf_cv_baddef_remove" 1>&6
  5975. test "$cf_cv_baddef_remove" != no && cat >> confdefs.h <<\EOF
  5976. #define NEED_REMOVE 1
  5977. EOF
  5978.  
  5979.  
  5980.  
  5981. echo $ac_n "checking for lstat""... $ac_c" 1>&6
  5982. echo "configure:5983: checking for lstat" >&5
  5983. if eval "test \"`echo '$''{'ac_cv_func_lstat'+set}'`\" = set"; then
  5984.   echo $ac_n "(cached) $ac_c" 1>&6
  5985. else
  5986.   
  5987. cat > conftest.$ac_ext <<EOF
  5988. #line 5989 "configure"
  5989. #include "confdefs.h"
  5990.  
  5991. #include <sys/types.h>
  5992. #include <sys/stat.h>
  5993. int main() {
  5994. lstat(".", (struct stat *)0)
  5995. ; return 0; }
  5996. EOF
  5997. if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5998.   rm -rf conftest*
  5999.   ac_cv_func_lstat=yes
  6000. else
  6001.   echo "configure: failed program was:" >&5
  6002.   cat conftest.$ac_ext >&5
  6003.   rm -rf conftest*
  6004.   ac_cv_func_lstat=no
  6005. fi
  6006. rm -f conftest*
  6007.     
  6008. fi
  6009.  
  6010. echo "$ac_t""$ac_cv_func_lstat " 1>&6
  6011. if test $ac_cv_func_lstat = yes; then
  6012.     cat >> confdefs.h <<\EOF
  6013. #define HAVE_LSTAT 1
  6014. EOF
  6015.  
  6016. fi
  6017.  
  6018. for ac_func in \
  6019.     cuserid \
  6020.     getcwd \
  6021.     getgroups \
  6022.     putenv \
  6023.     readdir \
  6024.     strerror \
  6025.     waitpid \
  6026.  
  6027. do
  6028. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  6029. echo "configure:6030: checking for $ac_func" >&5
  6030. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  6031.   echo $ac_n "(cached) $ac_c" 1>&6
  6032. else
  6033.   cat > conftest.$ac_ext <<EOF
  6034. #line 6035 "configure"
  6035. #include "confdefs.h"
  6036. /* System header to define __stub macros and hopefully few prototypes,
  6037.     which can conflict with char $ac_func(); below.  */
  6038. #include <assert.h>
  6039. /* Override any gcc2 internal prototype to avoid an error.  */
  6040. /* We use char because int might match the return type of a gcc2
  6041.     builtin and then its argument prototype would still apply.  */
  6042. char $ac_func();
  6043.  
  6044. int main() {
  6045.  
  6046. /* The GNU C library defines this for functions which it implements
  6047.     to always fail with ENOSYS.  Some functions are actually named
  6048.     something starting with __ and the normal name is an alias.  */
  6049. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  6050. choke me
  6051. #else
  6052. $ac_func();
  6053. #endif
  6054.  
  6055. ; return 0; }
  6056. EOF
  6057. if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6058.   rm -rf conftest*
  6059.   eval "ac_cv_func_$ac_func=yes"
  6060. else
  6061.   echo "configure: failed program was:" >&5
  6062.   cat conftest.$ac_ext >&5
  6063.   rm -rf conftest*
  6064.   eval "ac_cv_func_$ac_func=no"
  6065. fi
  6066. rm -f conftest*
  6067. fi
  6068.  
  6069. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  6070.   echo "$ac_t""yes" 1>&6
  6071.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  6072.   cat >> confdefs.h <<EOF
  6073. #define $ac_tr_func 1
  6074. EOF
  6075.  
  6076. else
  6077.   echo "$ac_t""no" 1>&6
  6078. fi
  6079. done
  6080.  
  6081. for ac_func in \
  6082.     mktime \
  6083.     strstr \
  6084.  
  6085. do
  6086. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  6087. echo "configure:6088: checking for $ac_func" >&5
  6088. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  6089.   echo $ac_n "(cached) $ac_c" 1>&6
  6090. else
  6091.   cat > conftest.$ac_ext <<EOF
  6092. #line 6093 "configure"
  6093. #include "confdefs.h"
  6094. /* System header to define __stub macros and hopefully few prototypes,
  6095.     which can conflict with char $ac_func(); below.  */
  6096. #include <assert.h>
  6097. /* Override any gcc2 internal prototype to avoid an error.  */
  6098. /* We use char because int might match the return type of a gcc2
  6099.     builtin and then its argument prototype would still apply.  */
  6100. char $ac_func();
  6101.  
  6102. int main() {
  6103.  
  6104. /* The GNU C library defines this for functions which it implements
  6105.     to always fail with ENOSYS.  Some functions are actually named
  6106.     something starting with __ and the normal name is an alias.  */
  6107. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  6108. choke me
  6109. #else
  6110. $ac_func();
  6111. #endif
  6112.  
  6113. ; return 0; }
  6114. EOF
  6115. if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6116.   rm -rf conftest*
  6117.   eval "ac_cv_func_$ac_func=yes"
  6118. else
  6119.   echo "configure: failed program was:" >&5
  6120.   cat conftest.$ac_ext >&5
  6121.   rm -rf conftest*
  6122.   eval "ac_cv_func_$ac_func=no"
  6123. fi
  6124. rm -f conftest*
  6125. fi
  6126.  
  6127. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  6128.   echo "$ac_t""yes" 1>&6
  6129.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  6130.   cat >> confdefs.h <<EOF
  6131. #define $ac_tr_func 1
  6132. EOF
  6133.  
  6134. else
  6135.   echo "$ac_t""no" 1>&6
  6136. LIBOBJS="$LIBOBJS ${ac_func}.o"
  6137. fi
  6138. done
  6139.  
  6140.  
  6141.  
  6142. for ac_func in strstr
  6143. do
  6144.  
  6145. echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
  6146. echo "configure:6147: checking for $ac_func declaration" >&5
  6147. if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
  6148.   echo $ac_n "(cached) $ac_c" 1>&6
  6149. else
  6150.   cat > conftest.$ac_ext <<EOF
  6151. #line 6152 "configure"
  6152. #include "confdefs.h"
  6153. #include <string.h>
  6154. int main() {
  6155. #ifndef ${ac_func}
  6156. extern    int    ${ac_func}();
  6157. #endif
  6158. ; return 0; }
  6159. EOF
  6160. if { (eval echo configure:6161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6161.   rm -rf conftest*
  6162.   
  6163. cat > conftest.$ac_ext <<EOF
  6164. #line 6165 "configure"
  6165. #include "confdefs.h"
  6166. #include <string.h>
  6167. int main() {
  6168. #ifndef ${ac_func}
  6169. int    (*p)() = ${ac_func};
  6170. #endif
  6171. ; return 0; }
  6172. EOF
  6173. if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6174.   rm -rf conftest*
  6175.   
  6176. eval "ac_cv_func_decl_$ac_func=yes"
  6177. else
  6178.   echo "configure: failed program was:" >&5
  6179.   cat conftest.$ac_ext >&5
  6180.   rm -rf conftest*
  6181.   
  6182. eval "ac_cv_func_decl_$ac_func=no"
  6183. fi
  6184. rm -f conftest*
  6185. else
  6186.   echo "configure: failed program was:" >&5
  6187.   cat conftest.$ac_ext >&5
  6188.   rm -rf conftest*
  6189.   
  6190. eval "ac_cv_func_decl_$ac_func=yes"
  6191. fi
  6192. rm -f conftest*
  6193. fi
  6194.  
  6195. if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
  6196.   echo "$ac_t""yes" 1>&6
  6197.   :
  6198. else
  6199.   echo "$ac_t""no" 1>&6
  6200.  
  6201.   
  6202. ac_tr_func=`echo DECL_$ac_func | tr '[a-z]' '[A-Z]'`
  6203.  
  6204.   cat >> confdefs.h <<EOF
  6205. #define $ac_tr_func 1
  6206. EOF
  6207.  
  6208. fi
  6209. done
  6210.  
  6211. for ac_func in getgrgid getgrnam
  6212. do
  6213.  
  6214. echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
  6215. echo "configure:6216: checking for $ac_func declaration" >&5
  6216. if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
  6217.   echo $ac_n "(cached) $ac_c" 1>&6
  6218. else
  6219.   cat > conftest.$ac_ext <<EOF
  6220. #line 6221 "configure"
  6221. #include "confdefs.h"
  6222.  
  6223. #include <stdio.h>
  6224. #include <grp.h>
  6225. int main() {
  6226. #ifndef ${ac_func}
  6227. extern    int    ${ac_func}();
  6228. #endif
  6229. ; return 0; }
  6230. EOF
  6231. if { (eval echo configure:6232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6232.   rm -rf conftest*
  6233.   
  6234. cat > conftest.$ac_ext <<EOF
  6235. #line 6236 "configure"
  6236. #include "confdefs.h"
  6237.  
  6238. #include <stdio.h>
  6239. #include <grp.h>
  6240. int main() {
  6241. #ifndef ${ac_func}
  6242. int    (*p)() = ${ac_func};
  6243. #endif
  6244. ; return 0; }
  6245. EOF
  6246. if { (eval echo configure:6247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6247.   rm -rf conftest*
  6248.   
  6249. eval "ac_cv_func_decl_$ac_func=yes"
  6250. else
  6251.   echo "configure: failed program was:" >&5
  6252.   cat conftest.$ac_ext >&5
  6253.   rm -rf conftest*
  6254.   
  6255. eval "ac_cv_func_decl_$ac_func=no"
  6256. fi
  6257. rm -f conftest*
  6258. else
  6259.   echo "configure: failed program was:" >&5
  6260.   cat conftest.$ac_ext >&5
  6261.   rm -rf conftest*
  6262.   
  6263. eval "ac_cv_func_decl_$ac_func=yes"
  6264. fi
  6265. rm -f conftest*
  6266. fi
  6267.  
  6268. if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
  6269.   echo "$ac_t""yes" 1>&6
  6270.   :
  6271. else
  6272.   echo "$ac_t""no" 1>&6
  6273.  
  6274.   
  6275. ac_tr_func=`echo DECL_$ac_func | tr '[a-z]' '[A-Z]'`
  6276.  
  6277.   cat >> confdefs.h <<EOF
  6278. #define $ac_tr_func 1
  6279. EOF
  6280.  
  6281. fi
  6282. done
  6283.  
  6284.  
  6285.  
  6286.  
  6287. echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6
  6288. echo "configure:6289: checking if TRUE/FALSE are defined" >&5
  6289. if eval "test \"`echo '$''{'cf_cv_bool_defs'+set}'`\" = set"; then
  6290.   echo $ac_n "(cached) $ac_c" 1>&6
  6291. else
  6292.   
  6293. cat > conftest.$ac_ext <<EOF
  6294. #line 6295 "configure"
  6295. #include "confdefs.h"
  6296.  
  6297. #include <${cf_cv_ncurses_header-curses.h}>
  6298. #include <stdio.h>
  6299. int main() {
  6300. int x = TRUE, y = FALSE
  6301. ; return 0; }
  6302. EOF
  6303. if { (eval echo configure:6304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6304.   rm -rf conftest*
  6305.   cf_cv_bool_defs=yes
  6306. else
  6307.   echo "configure: failed program was:" >&5
  6308.   cat conftest.$ac_ext >&5
  6309.   rm -rf conftest*
  6310.   cf_cv_bool_defs=no
  6311. fi
  6312. rm -f conftest*
  6313. fi
  6314.  
  6315. echo "$ac_t""$cf_cv_bool_defs" 1>&6
  6316. if test "$cf_cv_bool_defs" = no ; then
  6317.     cat >> confdefs.h <<\EOF
  6318. #define TRUE (1)
  6319. EOF
  6320.  
  6321.     cat >> confdefs.h <<\EOF
  6322. #define FALSE (0)
  6323. EOF
  6324.  
  6325. fi
  6326.  
  6327.  
  6328.  
  6329. echo $ac_n "checking declaration of errno""... $ac_c" 1>&6
  6330. echo "configure:6331: checking declaration of errno" >&5
  6331. if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
  6332.   echo $ac_n "(cached) $ac_c" 1>&6
  6333. else
  6334.   
  6335.     cat > conftest.$ac_ext <<EOF
  6336. #line 6337 "configure"
  6337. #include "confdefs.h"
  6338.  
  6339. #if HAVE_STDLIB_H
  6340. #include <stdlib.h>
  6341. #endif
  6342. #include <stdio.h>
  6343. #include <sys/types.h>
  6344. #include <errno.h> 
  6345. int main() {
  6346. long x = (long) errno
  6347. ; return 0; }
  6348. EOF
  6349. if { (eval echo configure:6350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6350.   rm -rf conftest*
  6351.   eval 'cf_cv_dcl_'errno'=yes'
  6352. else
  6353.   echo "configure: failed program was:" >&5
  6354.   cat conftest.$ac_ext >&5
  6355.   rm -rf conftest*
  6356.   eval 'cf_cv_dcl_'errno'=no'
  6357. fi
  6358. rm -f conftest*
  6359. fi
  6360.  
  6361. eval 'cf_result=$cf_cv_dcl_'errno
  6362. echo "$ac_t""$cf_result" 1>&6
  6363.  
  6364. # It's possible (for near-UNIX clones) that the data doesn't exist
  6365. if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
  6366.   echo $ac_n "(cached) $ac_c" 1>&6
  6367. else
  6368.   
  6369. if test $cf_result = no ; then
  6370.     eval 'cf_result=DECL_'errno
  6371.     
  6372. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  6373.  
  6374.     cat >> confdefs.h <<EOF
  6375. #define $cf_result 1
  6376. EOF
  6377.  
  6378.     echo $ac_n "checking existence of errno""... $ac_c" 1>&6
  6379. echo "configure:6380: checking existence of errno" >&5
  6380.         cat > conftest.$ac_ext <<EOF
  6381. #line 6382 "configure"
  6382. #include "confdefs.h"
  6383.  
  6384. #undef errno
  6385. extern long errno;
  6386.  
  6387. int main() {
  6388. errno = 2
  6389. ; return 0; }
  6390. EOF
  6391. if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6392.   rm -rf conftest*
  6393.   eval 'cf_cv_have_'errno'=yes'
  6394. else
  6395.   echo "configure: failed program was:" >&5
  6396.   cat conftest.$ac_ext >&5
  6397.   rm -rf conftest*
  6398.   eval 'cf_cv_have_'errno'=no'
  6399. fi
  6400. rm -f conftest*
  6401.         eval 'cf_result=$cf_cv_have_'errno
  6402.         echo "$ac_t""$cf_result" 1>&6
  6403. else
  6404.     eval 'cf_cv_have_'errno'=yes'
  6405. fi
  6406.  
  6407. fi
  6408.  
  6409. eval 'cf_result=HAVE_'errno
  6410.  
  6411. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  6412.  
  6413. eval 'test $cf_cv_have_'errno' = yes && cat >> confdefs.h <<EOF
  6414. #define $cf_result 1
  6415. EOF
  6416. '
  6417.  
  6418.  
  6419.  
  6420. echo $ac_n "checking for setlocale()""... $ac_c" 1>&6
  6421. echo "configure:6422: checking for setlocale()" >&5
  6422. if eval "test \"`echo '$''{'cf_cv_locale'+set}'`\" = set"; then
  6423.   echo $ac_n "(cached) $ac_c" 1>&6
  6424. else
  6425.   
  6426. cat > conftest.$ac_ext <<EOF
  6427. #line 6428 "configure"
  6428. #include "confdefs.h"
  6429. #include <locale.h>
  6430. int main() {
  6431. setlocale(LC_ALL, "")
  6432. ; return 0; }
  6433. EOF
  6434. if { (eval echo configure:6435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6435.   rm -rf conftest*
  6436.   cf_cv_locale=yes
  6437. else
  6438.   echo "configure: failed program was:" >&5
  6439.   cat conftest.$ac_ext >&5
  6440.   rm -rf conftest*
  6441.   cf_cv_locale=no
  6442. fi
  6443. rm -f conftest*
  6444.     
  6445. fi
  6446.  
  6447. echo "$ac_t""$cf_cv_locale" 1>&6
  6448. test $cf_cv_locale = yes && cat >> confdefs.h <<\EOF
  6449. #define LOCALE 1
  6450. EOF
  6451.  
  6452.  
  6453.  
  6454. echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6
  6455. echo "configure:6456: checking if NGROUPS is defined" >&5
  6456. if eval "test \"`echo '$''{'cf_cv_ngroups'+set}'`\" = set"; then
  6457.   echo $ac_n "(cached) $ac_c" 1>&6
  6458. else
  6459.   
  6460. cat > conftest.$ac_ext <<EOF
  6461. #line 6462 "configure"
  6462. #include "confdefs.h"
  6463.  
  6464. #if HAVE_SYS_PARAM_H
  6465. #include <sys/param.h>
  6466. #endif
  6467. #if HAVE_LIMITS_H
  6468. #include <limits.h>
  6469. #endif
  6470.  
  6471. int main() {
  6472. int x = NGROUPS
  6473. ; return 0; }
  6474. EOF
  6475. if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6476.   rm -rf conftest*
  6477.   cf_cv_ngroups=yes
  6478. else
  6479.   echo "configure: failed program was:" >&5
  6480.   cat conftest.$ac_ext >&5
  6481.   rm -rf conftest*
  6482.   cat > conftest.$ac_ext <<EOF
  6483. #line 6484 "configure"
  6484. #include "confdefs.h"
  6485.  
  6486. #if HAVE_SYS_PARAM_H
  6487. #include <sys/param.h>
  6488. #endif
  6489. #if HAVE_LIMITS_H
  6490. #include <limits.h>
  6491. #endif
  6492.  
  6493. int main() {
  6494. int x = NGROUPS_MAX
  6495. ; return 0; }
  6496. EOF
  6497. if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6498.   rm -rf conftest*
  6499.   cf_cv_ngroups=NGROUPS_MAX
  6500. else
  6501.   echo "configure: failed program was:" >&5
  6502.   cat conftest.$ac_ext >&5
  6503.   rm -rf conftest*
  6504.   cf_cv_ngroups=no
  6505. fi
  6506. rm -f conftest*
  6507.     
  6508. fi
  6509. rm -f conftest*
  6510. echo "$ac_t""$cf_cv_ngroups" 1>&6
  6511. if test "$cf_cv_ngroups" = no ; then
  6512.     cat >> confdefs.h <<\EOF
  6513. #define NGROUPS 16
  6514. EOF
  6515.  
  6516. elif test "$cf_cv_ngroups" = NGROUPS_MAX ; then
  6517.     cat >> confdefs.h <<\EOF
  6518. #define NGROUPS NGROUPS_MAX
  6519. EOF
  6520.  
  6521. fi
  6522.  
  6523. fi
  6524.  
  6525.  
  6526.  
  6527. for cf_name in sys_nerr sys_errlist
  6528. do
  6529.     
  6530. echo $ac_n "checking declaration of $cf_name""... $ac_c" 1>&6
  6531. echo "configure:6532: checking declaration of $cf_name" >&5
  6532. if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
  6533.   echo $ac_n "(cached) $ac_c" 1>&6
  6534. else
  6535.   
  6536.     cat > conftest.$ac_ext <<EOF
  6537. #line 6538 "configure"
  6538. #include "confdefs.h"
  6539.  
  6540. #if HAVE_STDLIB_H
  6541. #include <stdlib.h>
  6542. #endif
  6543. #include <stdio.h>
  6544. #include <sys/types.h>
  6545. #include <errno.h> 
  6546. int main() {
  6547. long x = (long) $cf_name
  6548. ; return 0; }
  6549. EOF
  6550. if { (eval echo configure:6551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6551.   rm -rf conftest*
  6552.   eval 'cf_cv_dcl_'$cf_name'=yes'
  6553. else
  6554.   echo "configure: failed program was:" >&5
  6555.   cat conftest.$ac_ext >&5
  6556.   rm -rf conftest*
  6557.   eval 'cf_cv_dcl_'$cf_name'=no'
  6558. fi
  6559. rm -f conftest*
  6560. fi
  6561.  
  6562. eval 'cf_result=$cf_cv_dcl_'$cf_name
  6563. echo "$ac_t""$cf_result" 1>&6
  6564.  
  6565. # It's possible (for near-UNIX clones) that the data doesn't exist
  6566. if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
  6567.   echo $ac_n "(cached) $ac_c" 1>&6
  6568. else
  6569.   
  6570. if test $cf_result = no ; then
  6571.     eval 'cf_result=DECL_'$cf_name
  6572.     
  6573. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  6574.  
  6575.     cat >> confdefs.h <<EOF
  6576. #define $cf_result 1
  6577. EOF
  6578.  
  6579.     echo $ac_n "checking existence of $cf_name""... $ac_c" 1>&6
  6580. echo "configure:6581: checking existence of $cf_name" >&5
  6581.         cat > conftest.$ac_ext <<EOF
  6582. #line 6583 "configure"
  6583. #include "confdefs.h"
  6584.  
  6585. #undef $cf_name
  6586. extern long $cf_name;
  6587.  
  6588. int main() {
  6589. $cf_name = 2
  6590. ; return 0; }
  6591. EOF
  6592. if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6593.   rm -rf conftest*
  6594.   eval 'cf_cv_have_'$cf_name'=yes'
  6595. else
  6596.   echo "configure: failed program was:" >&5
  6597.   cat conftest.$ac_ext >&5
  6598.   rm -rf conftest*
  6599.   eval 'cf_cv_have_'$cf_name'=no'
  6600. fi
  6601. rm -f conftest*
  6602.         eval 'cf_result=$cf_cv_have_'$cf_name
  6603.         echo "$ac_t""$cf_result" 1>&6
  6604. else
  6605.     eval 'cf_cv_have_'$cf_name'=yes'
  6606. fi
  6607.  
  6608. fi
  6609.  
  6610. eval 'cf_result=HAVE_'$cf_name
  6611.  
  6612. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  6613.  
  6614. eval 'test $cf_cv_have_'$cf_name' = yes && cat >> confdefs.h <<EOF
  6615. #define $cf_result 1
  6616. EOF
  6617. '
  6618.  
  6619. done
  6620.  
  6621.  
  6622. echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6
  6623. echo "configure:6624: checking if struct utmp is declared" >&5
  6624. if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then
  6625.   echo $ac_n "(cached) $ac_c" 1>&6
  6626. else
  6627.   
  6628.     cat > conftest.$ac_ext <<EOF
  6629. #line 6630 "configure"
  6630. #include "confdefs.h"
  6631.  
  6632. #include <sys/types.h>
  6633. #include <utmp.h>
  6634. int main() {
  6635. struct utmp x; char *y = &x.ut_host[0]
  6636. ; return 0; }
  6637. EOF
  6638. if { (eval echo configure:6639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6639.   rm -rf conftest*
  6640.   cf_cv_have_utmp=yes
  6641. else
  6642.   echo "configure: failed program was:" >&5
  6643.   cat conftest.$ac_ext >&5
  6644.   rm -rf conftest*
  6645.   cat > conftest.$ac_ext <<EOF
  6646. #line 6647 "configure"
  6647. #include "confdefs.h"
  6648. #include <utmpx.h>
  6649. int main() {
  6650. struct utmpx x; char *y = &x.ut_host[0]
  6651. ; return 0; }
  6652. EOF
  6653. if { (eval echo configure:6654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6654.   rm -rf conftest*
  6655.   cf_cv_have_utmp=utmpx
  6656. else
  6657.   echo "configure: failed program was:" >&5
  6658.   cat conftest.$ac_ext >&5
  6659.   rm -rf conftest*
  6660.   cf_cv_have_utmp=no
  6661. fi
  6662. rm -f conftest*
  6663.         
  6664. fi
  6665. rm -f conftest*
  6666.     
  6667. fi
  6668.  
  6669. echo "$ac_t""$cf_cv_have_utmp" 1>&6
  6670. test $cf_cv_have_utmp != no && cat >> confdefs.h <<\EOF
  6671. #define HAVE_UTMP 1
  6672. EOF
  6673.  
  6674. test $cf_cv_have_utmp = utmpx && cat >> confdefs.h <<\EOF
  6675. #define UTMPX_FOR_UTMP 1
  6676. EOF
  6677.  
  6678.  
  6679.  
  6680. ### These tests must be run after establishing the curses library.
  6681. if test $cf_cv_screen != slang ; then
  6682.     
  6683. echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6
  6684. echo "configure:6685: checking if curses supports alternate-character set" >&5
  6685. if eval "test \"`echo '$''{'cf_cv_alt_char_set'+set}'`\" = set"; then
  6686.   echo $ac_n "(cached) $ac_c" 1>&6
  6687. else
  6688.   
  6689. for mapname in acs_map _acs_map
  6690. do
  6691.     cat > conftest.$ac_ext <<EOF
  6692. #line 6693 "configure"
  6693. #include "confdefs.h"
  6694.  
  6695. #include <${cf_cv_ncurses_header-curses.h}>
  6696.     
  6697. int main() {
  6698. chtype x = acs_map['l']; acs_map['m'] = 0
  6699. ; return 0; }
  6700. EOF
  6701. if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6702.   rm -rf conftest*
  6703.   cf_cv_alt_char_set=$mapname
  6704.      break
  6705. else
  6706.   echo "configure: failed program was:" >&5
  6707.   cat conftest.$ac_ext >&5
  6708.   rm -rf conftest*
  6709.   cf_cv_alt_char_set=no
  6710. fi
  6711. rm -f conftest*
  6712. done
  6713.     
  6714. fi
  6715.  
  6716. echo "$ac_t""$cf_cv_alt_char_set" 1>&6
  6717. test $cf_cv_alt_char_set != no && cat >> confdefs.h <<EOF
  6718. #define ALT_CHAR_SET $mapname
  6719. EOF
  6720.  
  6721.  
  6722.     
  6723. echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6
  6724. echo "configure:6725: checking if curses supports fancy attributes" >&5
  6725. if eval "test \"`echo '$''{'cf_cv_fancy_curses'+set}'`\" = set"; then
  6726.   echo $ac_n "(cached) $ac_c" 1>&6
  6727. else
  6728.   
  6729.     cat > conftest.$ac_ext <<EOF
  6730. #line 6731 "configure"
  6731. #include "confdefs.h"
  6732.  
  6733. #include <${cf_cv_ncurses_header-curses.h}>
  6734.  
  6735. int main() {
  6736. attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
  6737.      wattrset(stdscr, A_BLINK|A_DIM);
  6738.      attroff(A_BOLD);
  6739.      keypad(stdscr,TRUE);
  6740.     
  6741. ; return 0; }
  6742. EOF
  6743. if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6744.   rm -rf conftest*
  6745.   cf_cv_fancy_curses=yes
  6746. else
  6747.   echo "configure: failed program was:" >&5
  6748.   cat conftest.$ac_ext >&5
  6749.   rm -rf conftest*
  6750.   cf_cv_fancy_curses=no
  6751. fi
  6752. rm -f conftest*
  6753.     
  6754. fi
  6755.  
  6756. echo "$ac_t""$cf_cv_fancy_curses" 1>&6
  6757. test $cf_cv_fancy_curses = yes && cat >> confdefs.h <<\EOF
  6758. #define FANCY_CURSES 1
  6759. EOF
  6760.  
  6761.  
  6762.     echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  6763. echo "configure:6764: checking for ncurses version" >&5
  6764. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  6765.   echo $ac_n "(cached) $ac_c" 1>&6
  6766. else
  6767.   
  6768.     cf_cv_ncurses_version=no
  6769.     cf_tempfile=out$$
  6770.     if test "$cross_compiling" = yes; then
  6771.   
  6772.  
  6773.     # This will not work if the preprocessor splits the line after the
  6774.     # Autoconf token.  The 'unproto' program does that.
  6775.     cat > conftest.$ac_ext <<EOF
  6776. #include <${cf_cv_ncurses_header-curses.h}>
  6777. #undef Autoconf
  6778. #ifdef NCURSES_VERSION
  6779. Autoconf NCURSES_VERSION
  6780. #else
  6781. #ifdef __NCURSES_H
  6782. Autoconf "old"
  6783. #endif
  6784. ;
  6785. #endif
  6786. EOF
  6787.     cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  6788.     { (eval echo configure:6789: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  6789.     if test -f conftest.out ; then
  6790.         cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
  6791.         test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  6792.         rm -f conftest.out
  6793.     fi
  6794.  
  6795. else
  6796.   cat > conftest.$ac_ext <<EOF
  6797. #line 6798 "configure"
  6798. #include "confdefs.h"
  6799.  
  6800. #include <${cf_cv_ncurses_header-curses.h}>
  6801. int main()
  6802. {
  6803.     FILE *fp = fopen("$cf_tempfile", "w");
  6804. #ifdef NCURSES_VERSION
  6805. # ifdef NCURSES_VERSION_PATCH
  6806.     fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  6807. # else
  6808.     fprintf(fp, "%s\n", NCURSES_VERSION);
  6809. # endif
  6810. #else
  6811. # ifdef __NCURSES_H
  6812.     fprintf(fp, "old\n");
  6813. # else
  6814.     make an error
  6815. # endif
  6816. #endif
  6817.     exit(0);
  6818. }
  6819. EOF
  6820. if { (eval echo configure:6821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  6821. then
  6822.   
  6823.     cf_cv_ncurses_version=`cat $cf_tempfile`
  6824.     rm -f $cf_tempfile
  6825. else
  6826.   echo "configure: failed program was:" >&5
  6827.   cat conftest.$ac_ext >&5
  6828. fi
  6829. rm -fr conftest*
  6830. fi
  6831.  
  6832. fi
  6833.  
  6834. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  6835.  
  6836.     
  6837.  
  6838. if test "$cf_cv_ncurses_version" != no ; then
  6839. echo $ac_n "checking for obsolete/broken version of ncurses""... $ac_c" 1>&6
  6840. echo "configure:6841: checking for obsolete/broken version of ncurses" >&5
  6841. if eval "test \"`echo '$''{'cf_cv_ncurses_broken'+set}'`\" = set"; then
  6842.   echo $ac_n "(cached) $ac_c" 1>&6
  6843. else
  6844.   
  6845. cat > conftest.$ac_ext <<EOF
  6846. #line 6847 "configure"
  6847. #include "confdefs.h"
  6848.  
  6849. #include <${cf_cv_ncurses_header-curses.h}>
  6850. int main() {
  6851.  
  6852. #if defined(NCURSES_VERSION) && defined(wgetbkgd)
  6853.     make an error
  6854. #else
  6855.     int x = 1
  6856. #endif
  6857.  
  6858. ; return 0; }
  6859. EOF
  6860. if { (eval echo configure:6861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6861.   rm -rf conftest*
  6862.   cf_cv_ncurses_broken=no
  6863. else
  6864.   echo "configure: failed program was:" >&5
  6865.   cat conftest.$ac_ext >&5
  6866.   rm -rf conftest*
  6867.   cf_cv_ncurses_broken=yes
  6868. fi
  6869. rm -f conftest*
  6870.  
  6871. fi
  6872.  
  6873. echo "$ac_t""$cf_cv_ncurses_broken" 1>&6
  6874. if test "$cf_cv_ncurses_broken" = yes ; then
  6875.     echo "configure: warning: hmm... you should get an up-to-date version of ncurses" 1>&2
  6876.     cat >> confdefs.h <<\EOF
  6877. #define NCURSES_BROKEN 1
  6878. EOF
  6879.  
  6880. fi
  6881. fi
  6882.  
  6883.     
  6884. echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6
  6885. echo "configure:6886: checking if curses supports color attributes" >&5
  6886. if eval "test \"`echo '$''{'cf_cv_color_curses'+set}'`\" = set"; then
  6887.   echo $ac_n "(cached) $ac_c" 1>&6
  6888. else
  6889.   
  6890.     cat > conftest.$ac_ext <<EOF
  6891. #line 6892 "configure"
  6892. #include "confdefs.h"
  6893.  
  6894. #include <${cf_cv_ncurses_header-curses.h}>
  6895.  
  6896. int main() {
  6897. chtype x = COLOR_BLUE;
  6898.      has_colors();
  6899.      start_color();
  6900. #ifndef NCURSES_BROKEN
  6901.      wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
  6902. #endif
  6903.     
  6904. ; return 0; }
  6905. EOF
  6906. if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6907.   rm -rf conftest*
  6908.   cf_cv_color_curses=yes
  6909. else
  6910.   echo "configure: failed program was:" >&5
  6911.   cat conftest.$ac_ext >&5
  6912.   rm -rf conftest*
  6913.   cf_cv_color_curses=no
  6914. fi
  6915. rm -f conftest*
  6916.     
  6917. fi
  6918.  
  6919. echo "$ac_t""$cf_cv_color_curses" 1>&6
  6920. if test $cf_cv_color_curses = yes ; then
  6921.     cat >> confdefs.h <<\EOF
  6922. #define COLOR_CURSES 1
  6923. EOF
  6924.  
  6925.     test ".$cf_cv_ncurses_broken" != .yes && cat >> confdefs.h <<\EOF
  6926. #define HAVE_GETBKGD 1
  6927. EOF
  6928.  
  6929. fi
  6930.  
  6931.     
  6932. echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
  6933. echo "configure:6934: checking declaration of size-change" >&5
  6934. if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
  6935.   echo $ac_n "(cached) $ac_c" 1>&6
  6936. else
  6937.   
  6938.     cf_cv_sizechange=unknown
  6939.     cf_save_CFLAGS="$CFLAGS"
  6940.  
  6941. for cf_opts in "" "NEED_PTEM_H"
  6942. do
  6943.  
  6944.     CFLAGS="$cf_save_CFLAGS"
  6945.     test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
  6946.     cat > conftest.$ac_ext <<EOF
  6947. #line 6948 "configure"
  6948. #include "confdefs.h"
  6949. #include <sys/types.h>
  6950. #if HAVE_TERMIOS_H
  6951. #include <termios.h>
  6952. #else
  6953. #if HAVE_TERMIO_H
  6954. #include <termio.h>
  6955. #endif
  6956. #endif
  6957. #if NEED_PTEM_H
  6958. /* This is a workaround for SCO:  they neglected to define struct winsize in
  6959.  * termios.h -- it's only in termio.h and ptem.h
  6960.  */
  6961. #include        <sys/stream.h>
  6962. #include        <sys/ptem.h>
  6963. #endif
  6964. #if !defined(sun) || !defined(HAVE_TERMIOS_H)
  6965. #include <sys/ioctl.h>
  6966. #endif
  6967.  
  6968. int main() {
  6969.  
  6970. #ifdef TIOCGSIZE
  6971.     struct ttysize win;    /* FIXME: what system is this? */
  6972.     int y = win.ts_lines;
  6973.     int x = win.ts_cols;
  6974. #else
  6975. #ifdef TIOCGWINSZ
  6976.     struct winsize win;
  6977.     int y = win.ws_row;
  6978.     int x = win.ws_col;
  6979. #else
  6980.     no TIOCGSIZE or TIOCGWINSZ
  6981. #endif /* TIOCGWINSZ */
  6982. #endif /* TIOCGSIZE */
  6983.     
  6984. ; return 0; }
  6985. EOF
  6986. if { (eval echo configure:6987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6987.   rm -rf conftest*
  6988.   cf_cv_sizechange=yes
  6989. else
  6990.   echo "configure: failed program was:" >&5
  6991.   cat conftest.$ac_ext >&5
  6992.   rm -rf conftest*
  6993.   cf_cv_sizechange=no
  6994. fi
  6995. rm -f conftest*
  6996.  
  6997.     CFLAGS="$cf_save_CFLAGS"
  6998.     if test "$cf_cv_sizechange" = yes ; then
  6999.         echo "size-change succeeded ($cf_opts)" >&5
  7000.         test -n "$cf_opts" && cat >> confdefs.h <<EOF
  7001. #define $cf_opts 1
  7002. EOF
  7003.  
  7004.         break
  7005.     fi
  7006. done
  7007.     
  7008. fi
  7009.  
  7010. echo "$ac_t""$cf_cv_sizechange" 1>&6
  7011. test $cf_cv_sizechange != no && cat >> confdefs.h <<\EOF
  7012. #define HAVE_SIZECHANGE 1
  7013. EOF
  7014.  
  7015.  
  7016.     
  7017. echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6
  7018. echo "configure:7019: checking if ttytype is declared in curses library" >&5
  7019. if eval "test \"`echo '$''{'cf_cv_have_ttytype'+set}'`\" = set"; then
  7020.   echo $ac_n "(cached) $ac_c" 1>&6
  7021. else
  7022.   
  7023.     cat > conftest.$ac_ext <<EOF
  7024. #line 7025 "configure"
  7025. #include "confdefs.h"
  7026. #include <${cf_cv_ncurses_header-curses.h}>
  7027. int main() {
  7028. char *x = &ttytype[1]; *x = 1
  7029. ; return 0; }
  7030. EOF
  7031. if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7032.   rm -rf conftest*
  7033.   cf_cv_have_ttytype=yes
  7034. else
  7035.   echo "configure: failed program was:" >&5
  7036.   cat conftest.$ac_ext >&5
  7037.   rm -rf conftest*
  7038.   cf_cv_have_ttytype=no
  7039. fi
  7040. rm -f conftest*
  7041.     
  7042. fi
  7043.  
  7044. echo "$ac_t""$cf_cv_have_ttytype" 1>&6
  7045. test $cf_cv_have_ttytype = yes && cat >> confdefs.h <<\EOF
  7046. #define HAVE_TTYTYPE 1
  7047. EOF
  7048.  
  7049.  
  7050.     for ac_func in \
  7051.         cbreak \
  7052.         keypad \
  7053.         use_default_colors \
  7054.         wborder \
  7055.     
  7056. do
  7057. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  7058. echo "configure:7059: checking for $ac_func" >&5
  7059. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  7060.   echo $ac_n "(cached) $ac_c" 1>&6
  7061. else
  7062.   cat > conftest.$ac_ext <<EOF
  7063. #line 7064 "configure"
  7064. #include "confdefs.h"
  7065. /* System header to define __stub macros and hopefully few prototypes,
  7066.     which can conflict with char $ac_func(); below.  */
  7067. #include <assert.h>
  7068. /* Override any gcc2 internal prototype to avoid an error.  */
  7069. /* We use char because int might match the return type of a gcc2
  7070.     builtin and then its argument prototype would still apply.  */
  7071. char $ac_func();
  7072.  
  7073. int main() {
  7074.  
  7075. /* The GNU C library defines this for functions which it implements
  7076.     to always fail with ENOSYS.  Some functions are actually named
  7077.     something starting with __ and the normal name is an alias.  */
  7078. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  7079. choke me
  7080. #else
  7081. $ac_func();
  7082. #endif
  7083.  
  7084. ; return 0; }
  7085. EOF
  7086. if { (eval echo configure:7087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7087.   rm -rf conftest*
  7088.   eval "ac_cv_func_$ac_func=yes"
  7089. else
  7090.   echo "configure: failed program was:" >&5
  7091.   cat conftest.$ac_ext >&5
  7092.   rm -rf conftest*
  7093.   eval "ac_cv_func_$ac_func=no"
  7094. fi
  7095. rm -f conftest*
  7096. fi
  7097.  
  7098. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  7099.   echo "$ac_t""yes" 1>&6
  7100.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  7101.   cat >> confdefs.h <<EOF
  7102. #define $ac_tr_func 1
  7103. EOF
  7104.  
  7105. else
  7106.   echo "$ac_t""no" 1>&6
  7107. fi
  7108. done
  7109.  
  7110. fi
  7111.  
  7112.  
  7113.  
  7114.  
  7115. echo $ac_n "checking if experimental 8-bit case-conversion should be used""... $ac_c" 1>&6
  7116. echo "configure:7117: checking if experimental 8-bit case-conversion should be used" >&5
  7117.  
  7118. # Check whether --enable-8bit-toupper or --disable-8bit-toupper was given.
  7119. if test "${enable_8bit_toupper+set}" = set; then
  7120.   enableval="$enable_8bit_toupper"
  7121.   test "$enableval" != yes && enableval=no
  7122.   if test "$enableval" != "no" ; then
  7123.     use_8bit_toupper=$enableval 
  7124.   else
  7125.     use_8bit_toupper=no
  7126.   fi
  7127. else
  7128.   enableval=no 
  7129.   use_8bit_toupper=no
  7130.   
  7131. fi
  7132.  
  7133. echo "$ac_t""$use_8bit_toupper" 1>&6
  7134. test $use_8bit_toupper != no && cat >> confdefs.h <<\EOF
  7135. #define EXP_8BIT_TOUPPER 1
  7136. EOF
  7137.  
  7138.  
  7139. echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6
  7140. echo "configure:7141: checking if color-style code should be used" >&5
  7141.  
  7142. # Check whether --enable-color-style or --disable-color-style was given.
  7143. if test "${enable_color_style+set}" = set; then
  7144.   enableval="$enable_color_style"
  7145.   test "$enableval" != yes && enableval=no
  7146.   if test "$enableval" != "no" ; then
  7147.     use_color_style=$enableval 
  7148.   else
  7149.     use_color_style=no
  7150.   fi
  7151. else
  7152.   enableval=no 
  7153.   use_color_style=no
  7154.   
  7155. fi
  7156.  
  7157.  
  7158. if test $use_color_style != no ; then
  7159.     if test .$cf_cv_color_curses != .yes ; then
  7160.         { echo "configure: error: Configuration does not support color-styles" 1>&2; exit 1; }
  7161.     fi
  7162.     if test $cf_cv_screen = slang ; then
  7163.         { echo "configure: error: Configuration does not support color-styles" 1>&2; exit 1; }
  7164.     fi
  7165.     cat >> confdefs.h <<\EOF
  7166. #define USE_HASH 1
  7167. EOF
  7168.  
  7169.     cat >> confdefs.h <<\EOF
  7170. #define LINKEDSTYLES 1
  7171. EOF
  7172.  
  7173. fi
  7174.  
  7175. case $use_color_style in
  7176. no)
  7177.     echo "$ac_t""no" 1>&6
  7178.     INSTALL_LSS=
  7179.     ;;
  7180. *)
  7181.     cat >> confdefs.h <<\EOF
  7182. #define USE_COLOR_STYLE 1
  7183. EOF
  7184.  
  7185.     echo "$ac_t""yes" 1>&6
  7186.  
  7187.     echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6
  7188. echo "configure:7189: checking for location of style-sheet file" >&5
  7189.     LYNX_LSS_FILE=$cf_libdir/lynx.lss
  7190.     cat >> confdefs.h <<EOF
  7191. #define LYNX_LSS_FILE "$LYNX_LSS_FILE"
  7192. EOF
  7193.  
  7194.     echo "$ac_t""$LYNX_LSS_FILE" 1>&6
  7195.     INSTALL_LSS=install-lss
  7196.     ;;
  7197. esac
  7198.  
  7199.  
  7200. echo $ac_n "checking if experimental partial-display should be used""... $ac_c" 1>&6
  7201. echo "configure:7202: checking if experimental partial-display should be used" >&5
  7202.  
  7203. # Check whether --enable-partial or --disable-partial was given.
  7204. if test "${enable_partial+set}" = set; then
  7205.   enableval="$enable_partial"
  7206.   test "$enableval" != yes && enableval=no
  7207.   if test "$enableval" != "no" ; then
  7208.     use_partial_display=$enableval 
  7209.   else
  7210.     use_partial_display=no
  7211.   fi
  7212. else
  7213.   enableval=no 
  7214.   use_partial_display=no
  7215.   
  7216. fi
  7217.  
  7218. echo "$ac_t""$use_partial_display" 1>&6
  7219. test $use_partial_display != no && cat >> confdefs.h <<\EOF
  7220. #define DISP_PARTIAL 1
  7221. EOF
  7222.  
  7223.  
  7224. use_dft_colors=no
  7225. test ".$cf_cv_screen" = ".slang"                && use_dft_colors=maybe
  7226. test ".$ac_cv_func_use_default_colors" = ".yes" && use_dft_colors=maybe
  7227.  
  7228. if test "$use_dft_colors" != no ; then
  7229. echo $ac_n "checking if you want to use default-colors""... $ac_c" 1>&6
  7230. echo "configure:7231: checking if you want to use default-colors" >&5
  7231.  
  7232. # Check whether --enable-default-colors or --disable-default-colors was given.
  7233. if test "${enable_default_colors+set}" = set; then
  7234.   enableval="$enable_default_colors"
  7235.   test "$enableval" != yes && enableval=no
  7236.   if test "$enableval" != "no" ; then
  7237.     use_dft_colors=yes 
  7238.   else
  7239.     use_dft_colors=no
  7240.   fi
  7241. else
  7242.   enableval=no 
  7243.   use_dft_colors=no
  7244.   
  7245. fi
  7246.  
  7247. echo "$ac_t""$use_dft_colors" 1>&6
  7248. test $use_dft_colors = "yes" && cat >> confdefs.h <<\EOF
  7249. #define USE_DEFAULT_COLORS 1
  7250. EOF
  7251.  
  7252. fi
  7253.  
  7254. echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6
  7255. echo "configure:7256: checking if you want to use extended HTML DTD logic" >&5
  7256.  
  7257. # Check whether --enable-extended-dtd or --disable-extended-dtd was given.
  7258. if test "${enable_extended_dtd+set}" = set; then
  7259.   enableval="$enable_extended_dtd"
  7260.   test "$enableval" != no && enableval=yes
  7261.   if test "$enableval" != "yes" ; then
  7262.     use_ext_htmldtd=no 
  7263.   else
  7264.     use_ext_htmldtd=yes
  7265.   fi
  7266. else
  7267.   enableval=yes 
  7268.   use_ext_htmldtd=yes
  7269.   
  7270. fi
  7271.  
  7272. echo "$ac_t""$use_ext_htmldtd" 1>&6
  7273. test $use_ext_htmldtd = "no" && cat >> confdefs.h <<\EOF
  7274. #define NO_EXTENDED_HTMLDTD 1
  7275. EOF
  7276.  
  7277.  
  7278. echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6
  7279. echo "configure:7280: checking if you want to use external commands" >&5
  7280.  
  7281. # Check whether --enable-externs or --disable-externs was given.
  7282. if test "${enable_externs+set}" = set; then
  7283.   enableval="$enable_externs"
  7284.   test "$enableval" != yes && enableval=no
  7285.   if test "$enableval" != "no" ; then
  7286.     use_externs=yes 
  7287.   else
  7288.     use_externs=no
  7289.   fi
  7290. else
  7291.   enableval=no 
  7292.   use_externs=no
  7293.   
  7294. fi
  7295.  
  7296. echo "$ac_t""$use_externs" 1>&6
  7297. test $use_externs != ".no" && cat >> confdefs.h <<\EOF
  7298. #define USE_EXTERNALS 1
  7299. EOF
  7300.  
  7301.  
  7302. echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6
  7303. echo "configure:7304: checking if you want to use setfont support" >&5
  7304.  
  7305. # Check whether --enable-font-switch or --disable-font-switch was given.
  7306. if test "${enable_font_switch+set}" = set; then
  7307.   enableval="$enable_font_switch"
  7308.   test "$enableval" != yes && enableval=no
  7309.   if test "$enableval" != "no" ; then
  7310.     use_setfont=yes 
  7311.   else
  7312.     use_setfont=no
  7313.   fi
  7314. else
  7315.   enableval=no 
  7316.   use_setfont=no
  7317.   
  7318. fi
  7319.  
  7320. echo "$ac_t""$use_setfont" 1>&6
  7321. test $use_setfont = yes && cat >> confdefs.h <<\EOF
  7322. #define EXP_CHARTRANS_AUTOSWITCH 1
  7323. EOF
  7324.  
  7325.  
  7326. echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6
  7327. echo "configure:7328: checking if you want internal-links feature" >&5
  7328.  
  7329. # Check whether --enable-internal-links or --disable-internal-links was given.
  7330. if test "${enable_internal_links+set}" = set; then
  7331.   enableval="$enable_internal_links"
  7332.   test "$enableval" != yes && enableval=no
  7333.   if test "$enableval" != "no" ; then
  7334.     use_internal_links=yes 
  7335.   else
  7336.     use_internal_links=no
  7337.   fi
  7338. else
  7339.   enableval=no 
  7340.   use_internal_links=no
  7341.   
  7342. fi
  7343.  
  7344. echo "$ac_t""$use_internal_links" 1>&6
  7345. test $use_internal_links = no && cat >> confdefs.h <<\EOF
  7346. #define DONT_TRACK_INTERNAL_LINKS 1
  7347. EOF
  7348.  
  7349.  
  7350. echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6
  7351. echo "configure:7352: checking if you want to fork NSL requests" >&5
  7352.  
  7353. # Check whether --enable-nsl-fork or --disable-nsl-fork was given.
  7354. if test "${enable_nsl_fork+set}" = set; then
  7355.   enableval="$enable_nsl_fork"
  7356.   test "$enableval" != yes && enableval=no
  7357.   if test "$enableval" != "no" ; then
  7358.     use_nsl_fork=yes 
  7359.   else
  7360.     use_nsl_fork=no
  7361.   fi
  7362. else
  7363.   enableval=no 
  7364.   use_nsl_fork=no
  7365.   
  7366. fi
  7367.  
  7368. echo "$ac_t""$use_nsl_fork" 1>&6
  7369. test $use_nsl_fork = yes && cat >> confdefs.h <<\EOF
  7370. #define NSL_FORK 1
  7371. EOF
  7372.  
  7373.  
  7374. echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6
  7375. echo "configure:7376: checking if you want to underline links" >&5
  7376.  
  7377. # Check whether --enable-underlines or --disable-underlines was given.
  7378. if test "${enable_underlines+set}" = set; then
  7379.   enableval="$enable_underlines"
  7380.   test "$enableval" != yes && enableval=no
  7381.   if test "$enableval" != "no" ; then
  7382.     use_underline=yes 
  7383.   else
  7384.     use_underline=no
  7385.   fi
  7386. else
  7387.   enableval=no 
  7388.   use_underline=no
  7389.   
  7390. fi
  7391.  
  7392. echo "$ac_t""$use_underline" 1>&6
  7393. test $use_underline = yes && cat >> confdefs.h <<\EOF
  7394. #define UNDERLINE_LINKS 1
  7395. EOF
  7396.  
  7397.  
  7398. echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6
  7399. echo "configure:7400: checking if you want to use zlib for decompression of some gzip files" >&5
  7400.  
  7401. # Check whether --with-zlib or --without-zlib was given.
  7402. if test "${with_zlib+set}" = set; then
  7403.   withval="$with_zlib"
  7404.   use_zlib=$withval
  7405. else
  7406.   use_zlib=no
  7407. fi
  7408.  
  7409. echo "$ac_t""$use_zlib" 1>&6
  7410.  
  7411. if test ".$use_zlib" != ".no" ; then
  7412.     
  7413.     cf_cv_have_lib_z=no
  7414.     cf_libdir=""
  7415.     echo $ac_n "checking for gzopen""... $ac_c" 1>&6
  7416. echo "configure:7417: checking for gzopen" >&5
  7417. if eval "test \"`echo '$''{'ac_cv_func_gzopen'+set}'`\" = set"; then
  7418.   echo $ac_n "(cached) $ac_c" 1>&6
  7419. else
  7420.   cat > conftest.$ac_ext <<EOF
  7421. #line 7422 "configure"
  7422. #include "confdefs.h"
  7423. /* System header to define __stub macros and hopefully few prototypes,
  7424.     which can conflict with char gzopen(); below.  */
  7425. #include <assert.h>
  7426. /* Override any gcc2 internal prototype to avoid an error.  */
  7427. /* We use char because int might match the return type of a gcc2
  7428.     builtin and then its argument prototype would still apply.  */
  7429. char gzopen();
  7430.  
  7431. int main() {
  7432.  
  7433. /* The GNU C library defines this for functions which it implements
  7434.     to always fail with ENOSYS.  Some functions are actually named
  7435.     something starting with __ and the normal name is an alias.  */
  7436. #if defined (__stub_gzopen) || defined (__stub___gzopen)
  7437. choke me
  7438. #else
  7439. gzopen();
  7440. #endif
  7441.  
  7442. ; return 0; }
  7443. EOF
  7444. if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7445.   rm -rf conftest*
  7446.   eval "ac_cv_func_gzopen=yes"
  7447. else
  7448.   echo "configure: failed program was:" >&5
  7449.   cat conftest.$ac_ext >&5
  7450.   rm -rf conftest*
  7451.   eval "ac_cv_func_gzopen=no"
  7452. fi
  7453. rm -f conftest*
  7454. fi
  7455.  
  7456. if eval "test \"`echo '$ac_cv_func_'gzopen`\" = yes"; then
  7457.   echo "$ac_t""yes" 1>&6
  7458.   cf_cv_have_lib_z=yes
  7459. else
  7460.   echo "$ac_t""no" 1>&6
  7461.  
  7462.         cf_save_LIBS="$LIBS"
  7463.         echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6
  7464. echo "configure:7465: checking for gzopen in -lz" >&5
  7465.         LIBS="-lz $LIBS"
  7466.         cat > conftest.$ac_ext <<EOF
  7467. #line 7468 "configure"
  7468. #include "confdefs.h"
  7469. #include <zlib.h>
  7470. int main() {
  7471. gzopen("name","mode")
  7472. ; return 0; }
  7473. EOF
  7474. if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7475.   rm -rf conftest*
  7476.   echo "$ac_t""yes" 1>&6
  7477.              cf_cv_have_lib_z=yes
  7478.             
  7479. else
  7480.   echo "configure: failed program was:" >&5
  7481.   cat conftest.$ac_ext >&5
  7482.   rm -rf conftest*
  7483.   echo "$ac_t""no" 1>&6
  7484.             cf_search=""
  7485. if test -d "$libdir"  ; then
  7486. test "$libdir" != NONE           && cf_search="$cf_search $libdir $libdir/z"
  7487. fi
  7488. if test -d "$exec_prefix"; then
  7489. test "$exec_prefix" != NONE      && cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/z"
  7490. fi
  7491. if test -d "$prefix"; then
  7492. test "$prefix" != NONE           && \
  7493. test "$prefix" != "$exec_prefix" && cf_search="$cf_search $prefix/lib $prefix/lib/z"
  7494. fi
  7495. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/lib /usr/local/lib/z"
  7496. test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/z"
  7497.  
  7498.             for cf_libdir in $cf_search
  7499.             do
  7500.                 echo $ac_n "checking for -lz in $cf_libdir""... $ac_c" 1>&6
  7501. echo "configure:7502: checking for -lz in $cf_libdir" >&5
  7502.                 LIBS="-L$cf_libdir -lz $cf_save_LIBS"
  7503.                 cat > conftest.$ac_ext <<EOF
  7504. #line 7505 "configure"
  7505. #include "confdefs.h"
  7506. #include <zlib.h>
  7507. int main() {
  7508. gzopen("name","mode")
  7509. ; return 0; }
  7510. EOF
  7511. if { (eval echo configure:7512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7512.   rm -rf conftest*
  7513.   echo "$ac_t""yes" 1>&6
  7514.                       cf_cv_have_lib_z=yes
  7515.                      break
  7516. else
  7517.   echo "configure: failed program was:" >&5
  7518.   cat conftest.$ac_ext >&5
  7519.   rm -rf conftest*
  7520.   echo "$ac_t""no" 1>&6
  7521.                      LIBS="$cf_save_LIBS"
  7522. fi
  7523. rm -f conftest*
  7524.             done
  7525.             
  7526. fi
  7527. rm -f conftest*
  7528.         
  7529. fi
  7530.  
  7531. if test $cf_cv_have_lib_z = no ; then
  7532.     { echo "configure: error: Cannot link z library" 1>&2; exit 1; }
  7533. fi
  7534. case $host_os in #(vi
  7535. linux*) # Suse Linux does not follow /usr/lib convention
  7536.     z="$z /lib"
  7537.     ;;
  7538. esac
  7539.  
  7540.     cat >> confdefs.h <<\EOF
  7541. #define USE_ZLIB 1
  7542. EOF
  7543.  
  7544. fi
  7545.  
  7546.  
  7547.  
  7548.  
  7549. # All DirEd functions that were enabled on compilation can be disabled
  7550. # or modified at run time via DIRED_MENU symbols in lynx.cfg.
  7551. echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6
  7552. echo "configure:7553: checking if directory-editor code should be used" >&5
  7553.  
  7554. # Check whether --enable-dired or --disable-dired was given.
  7555. if test "${enable_dired+set}" = set; then
  7556.   enableval="$enable_dired"
  7557.   test "$enableval" != no && enableval=yes
  7558.   if test "$enableval" != "yes" ; then
  7559.     use_dired=$enableval 
  7560.   else
  7561.     use_dired=yes
  7562.   fi
  7563. else
  7564.   enableval=yes 
  7565.   use_dired=yes
  7566.   
  7567. fi
  7568.  
  7569. echo "$ac_t""$use_dired" 1>&6
  7570.  
  7571. if test ".$use_dired" != ".no" ; then
  7572.     cat >> confdefs.h <<\EOF
  7573. #define DIRED_SUPPORT 1
  7574. EOF
  7575.  
  7576.  
  7577.     echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6
  7578. echo "configure:7579: checking if you wish to allow extracting from archives via DirEd" >&5
  7579.     
  7580. # Check whether --enable-dired-archive or --disable-dired-archive was given.
  7581. if test "${enable_dired_archive+set}" = set; then
  7582.   enableval="$enable_dired_archive"
  7583.   test "$enableval" != no && enableval=yes
  7584.   if test "$enableval" != "yes" ; then
  7585.     cat >> confdefs.h <<\EOF
  7586. #define ARCHIVE_ONLY 1
  7587. EOF
  7588.  
  7589.   fi
  7590. else
  7591.   enableval=yes   
  7592. fi
  7593.  
  7594.     echo "$ac_t""$enableval" 1>&6
  7595.  
  7596.     echo $ac_n "checking if you wish to allow users to redefine DirEd keys""... $ac_c" 1>&6
  7597. echo "configure:7598: checking if you wish to allow users to redefine DirEd keys" >&5
  7598.     
  7599. # Check whether --enable-dired-override or --disable-dired-override was given.
  7600. if test "${enable_dired_override+set}" = set; then
  7601.   enableval="$enable_dired_override"
  7602.   test "$enableval" != no && enableval=yes
  7603.   if test "$enableval" != "yes" ; then
  7604.     : 
  7605.   else
  7606.     cat >> confdefs.h <<\EOF
  7607. #define OK_OVERRIDE 1
  7608. EOF
  7609.  
  7610.   fi
  7611. else
  7612.   enableval=yes 
  7613.   cat >> confdefs.h <<\EOF
  7614. #define OK_OVERRIDE 1
  7615. EOF
  7616.  
  7617.   
  7618. fi
  7619.  
  7620.     echo "$ac_t""$enableval" 1>&6
  7621.  
  7622.     echo $ac_n "checking if you wish to allow permissions commands via DirEd""... $ac_c" 1>&6
  7623. echo "configure:7624: checking if you wish to allow permissions commands via DirEd" >&5
  7624.     
  7625. # Check whether --enable-dired-permit or --disable-dired-permit was given.
  7626. if test "${enable_dired_permit+set}" = set; then
  7627.   enableval="$enable_dired_permit"
  7628.   test "$enableval" != no && enableval=yes
  7629.   if test "$enableval" != "yes" ; then
  7630.     : 
  7631.   else
  7632.     cat >> confdefs.h <<\EOF
  7633. #define OK_PERMIT 1
  7634. EOF
  7635.  
  7636.   fi
  7637. else
  7638.   enableval=yes 
  7639.   cat >> confdefs.h <<\EOF
  7640. #define OK_PERMIT 1
  7641. EOF
  7642.  
  7643.   
  7644. fi
  7645.  
  7646.     echo "$ac_t""$enableval" 1>&6
  7647.  
  7648.     echo $ac_n "checking if you wish to allow executable-permission commands via DirEd""... $ac_c" 1>&6
  7649. echo "configure:7650: checking if you wish to allow executable-permission commands via DirEd" >&5
  7650.     
  7651. # Check whether --enable-dired-xpermit or --disable-dired-xpermit was given.
  7652. if test "${enable_dired_xpermit+set}" = set; then
  7653.   enableval="$enable_dired_xpermit"
  7654.   test "$enableval" != no && enableval=yes
  7655.   if test "$enableval" != "yes" ; then
  7656.     cat >> confdefs.h <<\EOF
  7657. #define NO_CHANGE_EXECUTE_PERMS 1
  7658. EOF
  7659.  
  7660.   fi
  7661. else
  7662.   enableval=yes   
  7663. fi
  7664.  
  7665.     echo "$ac_t""$enableval" 1>&6
  7666.  
  7667.     echo $ac_n "checking if you wish to allow "tar" commands from DirEd""... $ac_c" 1>&6
  7668. echo "configure:7669: checking if you wish to allow "tar" commands from DirEd" >&5
  7669.     
  7670. # Check whether --enable-dired-tar or --disable-dired-tar was given.
  7671. if test "${enable_dired_tar+set}" = set; then
  7672.   enableval="$enable_dired_tar"
  7673.   test "$enableval" != no && enableval=yes
  7674.   if test "$enableval" != "yes" ; then
  7675.     : 
  7676.   else
  7677.     cat >> confdefs.h <<\EOF
  7678. #define OK_TAR 1
  7679. EOF
  7680.  
  7681.   fi
  7682. else
  7683.   enableval=yes 
  7684.   cat >> confdefs.h <<\EOF
  7685. #define OK_TAR 1
  7686. EOF
  7687.  
  7688.   
  7689. fi
  7690.  
  7691.     echo "$ac_t""$enableval" 1>&6
  7692.  
  7693.     echo $ac_n "checking if you wish to allow "uudecode" commands from DirEd""... $ac_c" 1>&6
  7694. echo "configure:7695: checking if you wish to allow "uudecode" commands from DirEd" >&5
  7695.     
  7696. # Check whether --enable-dired-uudecode or --disable-dired-uudecode was given.
  7697. if test "${enable_dired_uudecode+set}" = set; then
  7698.   enableval="$enable_dired_uudecode"
  7699.   test "$enableval" != no && enableval=yes
  7700.   if test "$enableval" != "yes" ; then
  7701.     : 
  7702.   else
  7703.     cat >> confdefs.h <<\EOF
  7704. #define OK_UUDECODE 1
  7705. EOF
  7706.  
  7707.   fi
  7708. else
  7709.   enableval=yes 
  7710.   cat >> confdefs.h <<\EOF
  7711. #define OK_UUDECODE 1
  7712. EOF
  7713.  
  7714.   
  7715. fi
  7716.  
  7717.     echo "$ac_t""$enableval" 1>&6
  7718.  
  7719.     echo $ac_n "checking if you wish to allow "zip" and "unzip" commands from DirEd""... $ac_c" 1>&6
  7720. echo "configure:7721: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5
  7721.     
  7722. # Check whether --enable-dired-zip or --disable-dired-zip was given.
  7723. if test "${enable_dired_zip+set}" = set; then
  7724.   enableval="$enable_dired_zip"
  7725.   test "$enableval" != no && enableval=yes
  7726.   if test "$enableval" != "yes" ; then
  7727.     : 
  7728.   else
  7729.     cat >> confdefs.h <<\EOF
  7730. #define OK_ZIP 1
  7731. EOF
  7732.  
  7733.   fi
  7734. else
  7735.   enableval=yes 
  7736.   cat >> confdefs.h <<\EOF
  7737. #define OK_ZIP 1
  7738. EOF
  7739.  
  7740.   
  7741. fi
  7742.  
  7743.     echo "$ac_t""$enableval" 1>&6
  7744.  
  7745.     echo $ac_n "checking if you wish to allow "gzip" and "gunzip" commands from DirEd""... $ac_c" 1>&6
  7746. echo "configure:7747: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5
  7747.     
  7748. # Check whether --enable-dired-gzip or --disable-dired-gzip was given.
  7749. if test "${enable_dired_gzip+set}" = set; then
  7750.   enableval="$enable_dired_gzip"
  7751.   test "$enableval" != no && enableval=yes
  7752.   if test "$enableval" != "yes" ; then
  7753.     : 
  7754.   else
  7755.     cat >> confdefs.h <<\EOF
  7756. #define OK_GZIP 1
  7757. EOF
  7758.  
  7759.   fi
  7760. else
  7761.   enableval=yes 
  7762.   cat >> confdefs.h <<\EOF
  7763. #define OK_GZIP 1
  7764. EOF
  7765.  
  7766.   
  7767. fi
  7768.  
  7769.     echo "$ac_t""$enableval" 1>&6
  7770. fi
  7771.  
  7772. echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6
  7773. echo "configure:7774: checking if you want long-directory listings" >&5
  7774.  
  7775. # Check whether --enable-long-list or --disable-long-list was given.
  7776. if test "${enable_long_list+set}" = set; then
  7777.   enableval="$enable_long_list"
  7778.   test "$enableval" != no && enableval=yes
  7779.   if test "$enableval" != "yes" ; then
  7780.     : 
  7781.   else
  7782.     cat >> confdefs.h <<\EOF
  7783. #define LONG_LIST 1
  7784. EOF
  7785.  
  7786.   fi
  7787. else
  7788.   enableval=yes 
  7789.   cat >> confdefs.h <<\EOF
  7790. #define LONG_LIST 1
  7791. EOF
  7792.  
  7793.   
  7794. fi
  7795.  
  7796. echo "$ac_t""$enableval" 1>&6
  7797.  
  7798. echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6
  7799. echo "configure:7800: checking if parent-directory references are permitted" >&5
  7800.  
  7801. # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given.
  7802. if test "${enable_parent_dir_refs+set}" = set; then
  7803.   enableval="$enable_parent_dir_refs"
  7804.   test "$enableval" != no && enableval=yes
  7805.   if test "$enableval" != "yes" ; then
  7806.     cat >> confdefs.h <<\EOF
  7807. #define NO_PARENT_DIR_REFERENCE 1
  7808. EOF
  7809.  
  7810.   fi
  7811. else
  7812.   enableval=yes   
  7813. fi
  7814.  
  7815. echo "$ac_t""$enableval" 1>&6
  7816.  
  7817. ### Finally, build config.h and the makefiles
  7818. CFLAGS="$CFLAGS $EXTRA_CFLAGS"
  7819. srcdir="$srcdir"
  7820. SRCDIR_CLEAN="#"
  7821. if test -n "$srcdir" ; then
  7822.     echo srcdir is $srcdir
  7823.     $srcdir/mkdirs.sh WWW/Library/unix
  7824.     $srcdir/mkdirs.sh src/chrtrans
  7825.     test "$srcdir" != "." && SRCDIR_CLEAN=""
  7826. fi
  7827.  
  7828.  
  7829. trap '' 1 2 15
  7830. cat > confcache <<\EOF
  7831. # This file is a shell script that caches the results of configure
  7832. # tests run on this system so they can be shared between configure
  7833. # scripts and configure runs.  It is not useful on other systems.
  7834. # If it contains results you don't want to keep, you may remove or edit it.
  7835. #
  7836. # By default, configure uses ./config.cache as the cache file,
  7837. # creating it if it does not exist already.  You can give configure
  7838. # the --cache-file=FILE option to use a different cache file; that is
  7839. # what configure does when it calls configure scripts in
  7840. # subdirectories, so they share the cache.
  7841. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  7842. # config.status only pays attention to the cache file if you give it the
  7843. # --recheck option to rerun configure.
  7844. #
  7845. EOF
  7846. # The following way of writing the cache mishandles newlines in values,
  7847. # but we know of no workaround that is simple, portable, and efficient.
  7848. # So, don't put newlines in cache variables' values.
  7849. # Ultrix sh set writes to stderr and can't be redirected directly,
  7850. # and sets the high bit in the cache file unless we assign to the vars.
  7851. (set) 2>&1 |
  7852.   case `(ac_space=' '; set) 2>&1 | grep '^ac_space='` in
  7853.   *ac_space=\ *)
  7854.     # `set' does not quote correctly, so add quotes (double-quote substitution
  7855.     # turns \\\\ into \\, and sed turns \\ into \).
  7856.     sed -n \
  7857.       -e "s/'/'\\\\''/g" \
  7858.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  7859.     ;;
  7860.   *)
  7861.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  7862.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  7863.     ;;
  7864.   esac >> confcache
  7865. if cmp -s $cache_file confcache; then
  7866.   :
  7867. else
  7868.   if test -w $cache_file; then
  7869.     echo "updating cache $cache_file"
  7870.     cat confcache > $cache_file
  7871.   else
  7872.     echo "not updating unwritable cache $cache_file"
  7873.   fi
  7874. fi
  7875. rm -f confcache
  7876.  
  7877. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  7878.  
  7879. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  7880. # Let make expand exec_prefix.
  7881. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  7882.  
  7883. # Any assignment to VPATH causes Sun make to only execute
  7884. # the first set of double-colon rules, so remove it if not needed.
  7885. # If there is a colon in the path, we need to keep it.
  7886. if test "x$srcdir" = x.; then
  7887.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  7888. fi
  7889.  
  7890. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  7891.  
  7892. DEFS=-DHAVE_CONFIG_H
  7893.  
  7894. # Without the "./", some shells look in PATH for config.status.
  7895. : ${CONFIG_STATUS=./config.status}
  7896.  
  7897. echo creating $CONFIG_STATUS
  7898. rm -f $CONFIG_STATUS
  7899. cat > $CONFIG_STATUS <<EOF
  7900. #! /bin/sh
  7901. # Generated automatically by configure.
  7902. # Run this file to recreate the current configuration.
  7903. # This directory was configured as follows,
  7904. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  7905. #
  7906. # $0 $ac_configure_args
  7907. #
  7908. # Compiler output produced by configure, useful for debugging
  7909. # configure, is in ./config.log if it exists.
  7910.  
  7911. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  7912. for ac_option
  7913. do
  7914.   case "\$ac_option" in
  7915.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  7916.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  7917.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  7918.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  7919.     echo "$CONFIG_STATUS generated by autoconf version 2.12.971230"
  7920.     exit 0 ;;
  7921.   -help | --help | --hel | --he | --h)
  7922.     echo "\$ac_cs_usage"; exit 0 ;;
  7923.   *) echo "\$ac_cs_usage"; exit 1 ;;
  7924.   esac
  7925. done
  7926.  
  7927. ac_given_srcdir=$srcdir
  7928. ac_given_INSTALL="$INSTALL"
  7929.  
  7930. trap 'rm -fr `echo "makefile \
  7931.     WWW/Library/unix/makefile \
  7932.     src/makefile \
  7933.     src/chrtrans/makefile \
  7934.  lynx_cfg.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  7935. EOF
  7936. cat >> $CONFIG_STATUS <<EOF
  7937.  
  7938. # Protect against being on the right side of a sed subst in config.status.
  7939. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  7940.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  7941. $ac_vpsub
  7942. $extrasub
  7943. s%@CFLAGS@%$CFLAGS%g
  7944. s%@CPPFLAGS@%$CPPFLAGS%g
  7945. s%@CXXFLAGS@%$CXXFLAGS%g
  7946. s%@DEFS@%$DEFS%g
  7947. s%@LDFLAGS@%$LDFLAGS%g
  7948. s%@LIBS@%$LIBS%g
  7949. s%@exec_prefix@%$exec_prefix%g
  7950. s%@prefix@%$prefix%g
  7951. s%@program_transform_name@%$program_transform_name%g
  7952. s%@bindir@%$bindir%g
  7953. s%@sbindir@%$sbindir%g
  7954. s%@libexecdir@%$libexecdir%g
  7955. s%@datadir@%$datadir%g
  7956. s%@sysconfdir@%$sysconfdir%g
  7957. s%@sharedstatedir@%$sharedstatedir%g
  7958. s%@localstatedir@%$localstatedir%g
  7959. s%@libdir@%$libdir%g
  7960. s%@includedir@%$includedir%g
  7961. s%@oldincludedir@%$oldincludedir%g
  7962. s%@infodir@%$infodir%g
  7963. s%@mandir@%$mandir%g
  7964. s%@host@%$host%g
  7965. s%@host_alias@%$host_alias%g
  7966. s%@host_cpu@%$host_cpu%g
  7967. s%@host_vendor@%$host_vendor%g
  7968. s%@host_os@%$host_os%g
  7969. s%@CC@%$CC%g
  7970. s%@CPP@%$CPP%g
  7971. s%@RANLIB@%$RANLIB%g
  7972. s%@SET_MAKE@%$SET_MAKE%g
  7973. s%@make_include_left@%$make_include_left%g
  7974. s%@make_include_right@%$make_include_right%g
  7975. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  7976. s%@INSTALL_DATA@%$INSTALL_DATA%g
  7977. s%@LINT@%$LINT%g
  7978. s%@ECHO_LD@%$ECHO_LD%g
  7979. s%@RULE_CC@%$RULE_CC%g
  7980. s%@SHOW_CC@%$SHOW_CC%g
  7981. s%@ECHO_CC@%$ECHO_CC%g
  7982. s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
  7983. s%@CHMOD@%$CHMOD%g
  7984. s%@COMPRESS@%$COMPRESS%g
  7985. s%@COPY@%$COPY%g
  7986. s%@GZIP@%$GZIP%g
  7987. s%@MKDIR@%$MKDIR%g
  7988. s%@MV@%$MV%g
  7989. s%@RM@%$RM%g
  7990. s%@TAR@%$TAR%g
  7991. s%@TOUCH@%$TOUCH%g
  7992. s%@UNCOMPRESS@%$UNCOMPRESS%g
  7993. s%@UNZIP@%$UNZIP%g
  7994. s%@UUDECODE@%$UUDECODE%g
  7995. s%@ZCAT@%$ZCAT%g
  7996. s%@ZIP@%$ZIP%g
  7997. s%@PROG_EXT@%$PROG_EXT%g
  7998. s%@LIBOBJS@%$LIBOBJS%g
  7999. s%@INSTALL_LSS@%$INSTALL_LSS%g
  8000. s%@SRCDIR_CLEAN@%$SRCDIR_CLEAN%g
  8001.  
  8002. CEOF
  8003. EOF
  8004.  
  8005. cat >> $CONFIG_STATUS <<\EOF
  8006.  
  8007. # Split the substitutions into bite-sized pieces for seds with
  8008. # small command number limits, like on Digital OSF/1 and HP-UX.
  8009. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  8010. ac_file=1 # Number of current file.
  8011. ac_beg=1 # First line for current file.
  8012. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  8013. ac_more_lines=:
  8014. ac_sed_cmds=""
  8015. while $ac_more_lines; do
  8016.   if test $ac_beg -gt 1; then
  8017.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  8018.   else
  8019.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  8020.   fi
  8021.   if test ! -s conftest.s$ac_file; then
  8022.     ac_more_lines=false
  8023.     rm -f conftest.s$ac_file
  8024.   else
  8025.     if test -z "$ac_sed_cmds"; then
  8026.       ac_sed_cmds="sed -f conftest.s$ac_file"
  8027.     else
  8028.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  8029.     fi
  8030.     ac_file=`expr $ac_file + 1`
  8031.     ac_beg=$ac_end
  8032.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  8033.   fi
  8034. done
  8035. if test -z "$ac_sed_cmds"; then
  8036.   ac_sed_cmds=cat
  8037. fi
  8038. EOF
  8039.  
  8040. cat >> $CONFIG_STATUS <<EOF
  8041.  
  8042. CONFIG_FILES=\${CONFIG_FILES-"makefile \
  8043.     WWW/Library/unix/makefile \
  8044.     src/makefile \
  8045.     src/chrtrans/makefile \
  8046. "}
  8047. EOF
  8048. cat >> $CONFIG_STATUS <<\EOF
  8049. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  8050.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  8051.   case "$ac_file" in
  8052.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  8053.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  8054.   *) ac_file_in="${ac_file}.in" ;;
  8055.   esac
  8056.  
  8057.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  8058.  
  8059.   # Remove last slash and all that follows it.  Not all systems have dirname.
  8060.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  8061.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  8062.     # The file is in a subdirectory.
  8063.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  8064.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  8065.     # A "../" for each directory in $ac_dir_suffix.
  8066.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  8067.   else
  8068.     ac_dir_suffix= ac_dots=
  8069.   fi
  8070.  
  8071.   case "$ac_given_srcdir" in
  8072.   .)  srcdir=.
  8073.       if test -z "$ac_dots"; then top_srcdir=.
  8074.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  8075.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  8076.   *) # Relative path.
  8077.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  8078.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  8079.   esac
  8080.  
  8081.   case "$ac_given_INSTALL" in
  8082.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  8083.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  8084.   esac
  8085.  
  8086.   echo creating "$ac_file"
  8087.   rm -f "$ac_file"
  8088.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  8089.   case "$ac_file" in
  8090.   *Makefile*) ac_comsub="1i\\
  8091. # $configure_input" ;;
  8092.   *) ac_comsub= ;;
  8093.   esac
  8094.  
  8095.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  8096.   sed -e "$ac_comsub
  8097. s%@configure_input@%$configure_input%g
  8098. s%@srcdir@%$srcdir%g
  8099. s%@top_srcdir@%$top_srcdir%g
  8100. s%@INSTALL@%$INSTALL%g
  8101. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  8102. fi; done
  8103. rm -f conftest.s*
  8104.  
  8105. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  8106. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  8107. #
  8108. # ac_d sets the value in "#define NAME VALUE" lines.
  8109. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  8110. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  8111. ac_dC='\3'
  8112. ac_dD='%g'
  8113. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  8114. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  8115. ac_uB='\([     ]\)%\1#\2define\3'
  8116. ac_uC=' '
  8117. ac_uD='\4%g'
  8118. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  8119. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  8120. ac_eB='$%\1#\2define\3'
  8121. ac_eC=' '
  8122. ac_eD='%g'
  8123.  
  8124. if test "${CONFIG_HEADERS+set}" != set; then
  8125. EOF
  8126. cat >> $CONFIG_STATUS <<EOF
  8127.   CONFIG_HEADERS="lynx_cfg.h:config.hin"
  8128. EOF
  8129. cat >> $CONFIG_STATUS <<\EOF
  8130. fi
  8131. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  8132.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  8133.   case "$ac_file" in
  8134.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  8135.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  8136.   *) ac_file_in="${ac_file}.in" ;;
  8137.   esac
  8138.  
  8139.   echo creating $ac_file
  8140.  
  8141.   rm -f conftest.frag conftest.in conftest.out
  8142.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  8143.   cat $ac_file_inputs > conftest.in
  8144.  
  8145. EOF
  8146.  
  8147.  
  8148. # Transform confdefs.h into a sed script conftest.vals that substitutes
  8149. # the proper values into config.h.in to produce config.h.  And first:
  8150. # Protect against being on the right side of a sed subst in config.status.
  8151. # Protect against being in an unquoted here document in config.status.
  8152. rm -f conftest.vals
  8153. cat > conftest.hdr <<\EOF
  8154. s/[\\&%]/\\&/g
  8155. s%[\\$`]%\\&%g
  8156. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  8157. s%ac_d%ac_u%gp
  8158. s%ac_u%ac_e%gp
  8159. EOF
  8160. sed -n -f conftest.hdr confdefs.h > conftest.vals
  8161. rm -f conftest.hdr
  8162.  
  8163. # This sed command replaces #undef with comments.  This is necessary, for
  8164. # example, in the case of _POSIX_SOURCE, which is predefined and required
  8165. # on some systems where configure will not decide to define it.
  8166. cat >> conftest.vals <<\EOF
  8167. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  8168. EOF
  8169.  
  8170. # Break up conftest.vals because some shells have a limit on
  8171. # the size of here documents, and old seds have small limits too.
  8172.  
  8173. rm -f conftest.tail
  8174. while :
  8175. do
  8176.   ac_lines=`grep -c . conftest.vals`
  8177.   # grep -c gives empty output for an empty file on some AIX systems.
  8178.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  8179.   # Write a limited-size here document to conftest.frag.
  8180.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  8181.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  8182.   echo 'CEOF
  8183.   sed -f conftest.frag conftest.in > conftest.out
  8184.   rm -f conftest.in
  8185.   mv conftest.out conftest.in
  8186. ' >> $CONFIG_STATUS
  8187.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  8188.   rm -f conftest.vals
  8189.   mv conftest.tail conftest.vals
  8190. done
  8191. rm -f conftest.vals
  8192.  
  8193.  
  8194. cat >> $CONFIG_STATUS <<\EOF
  8195.   rm -f conftest.frag conftest.h
  8196.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  8197.   cat conftest.in >> conftest.h
  8198.   rm -f conftest.in
  8199.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  8200.     echo "$ac_file is unchanged"
  8201.     rm -f conftest.h
  8202.   else
  8203.     # Remove last slash and all that follows it.  Not all systems have dirname.
  8204.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  8205.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  8206.       # The file is in a subdirectory.
  8207.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  8208.     fi
  8209.     rm -f $ac_file
  8210.     mv conftest.h $ac_file
  8211.   fi
  8212. fi; done
  8213.  
  8214. EOF
  8215. cat >> $CONFIG_STATUS <<EOF
  8216. # Extra initialization commands, if any
  8217.  
  8218. EOF
  8219. cat >> $CONFIG_STATUS <<\EOF
  8220. # Extra commands, if any
  8221.  
  8222. exit 0
  8223. EOF
  8224. chmod +x $CONFIG_STATUS
  8225. rm -fr confdefs* $ac_clean_files
  8226. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  8227.  
  8228.