home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vile-src.zip / vile-8.1 / configure < prev    next >
Text File  |  1998-08-30  |  207KB  |  7,677 lines

  1. #! /bin/sh
  2.  
  3. # From configure.in Revision: 1.92 
  4.  
  5. rm -f config.cache
  6.  
  7. ### Use "configure -with-screen" to override the default configuration, which is
  8. ### termcap-based on unix systems.
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. # Guess values for system-dependent variables and create Makefiles.
  17. # Generated automatically using autoconf version 2.12.971230 
  18. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  19. #
  20. # This configure script is free software; the Free Software Foundation
  21. # gives unlimited permission to copy, distribute and modify it.
  22.  
  23. # Defaults:
  24. ac_help=
  25. ac_default_prefix=/usr/local
  26. # Any additions from configure.in:
  27.  
  28. # Initialize some variables set by options.
  29. # The variables have the same names as the options, with
  30. # dashes changed to underlines.
  31. build=NONE
  32. cache_file=./config.cache
  33. exec_prefix=NONE
  34. host=NONE
  35. no_create=
  36. nonopt=NONE
  37. no_recursion=
  38. prefix=NONE
  39. program_prefix=NONE
  40. program_suffix=NONE
  41. program_transform_name=s,x,x,
  42. silent=
  43. site=
  44. srcdir=
  45. target=NONE
  46. verbose=
  47. x_includes=NONE
  48. x_libraries=NONE
  49. bindir='${exec_prefix}/bin'
  50. sbindir='${exec_prefix}/sbin'
  51. libexecdir='${exec_prefix}/libexec'
  52. datadir='${prefix}/share'
  53. sysconfdir='${prefix}/etc'
  54. sharedstatedir='${prefix}/com'
  55. localstatedir='${prefix}/var'
  56. libdir='${exec_prefix}/lib'
  57. includedir='${prefix}/include'
  58. oldincludedir='/usr/include'
  59. infodir='${prefix}/info'
  60. mandir='${prefix}/man'
  61.  
  62. # Initialize some other variables.
  63. subdirs=
  64. MFLAGS= MAKEFLAGS=
  65. # Maximum number of lines to put in a shell here document.
  66. ac_max_here_lines=12
  67.  
  68. ac_prev=
  69. for ac_option
  70. do
  71.  
  72.   # If the previous option needs an argument, assign it.
  73.   if test -n "$ac_prev"; then
  74.     eval "$ac_prev=\$ac_option"
  75.     ac_prev=
  76.     continue
  77.   fi
  78.  
  79.   case "$ac_option" in
  80.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  81.   *) ac_optarg= ;;
  82.   esac
  83.  
  84.   # Accept the important Cygnus configure options, so we can diagnose typos.
  85.  
  86.   case "$ac_option" in
  87.  
  88.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  89.     ac_prev=bindir ;;
  90.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  91.     bindir="$ac_optarg" ;;
  92.  
  93.   -build | --build | --buil | --bui | --bu)
  94.     ac_prev=build ;;
  95.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  96.     build="$ac_optarg" ;;
  97.  
  98.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  99.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  100.     ac_prev=cache_file ;;
  101.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  102.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  103.     cache_file="$ac_optarg" ;;
  104.  
  105.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  106.     ac_prev=datadir ;;
  107.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  108.   | --da=*)
  109.     datadir="$ac_optarg" ;;
  110.  
  111.   -disable-* | --disable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     eval "enable_${ac_feature}=no" ;;
  119.  
  120.   -enable-* | --enable-*)
  121.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  122.     # Reject names that are not valid shell variable names.
  123.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  124.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  125.     fi
  126.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  127.     case "$ac_option" in
  128.       *=*) ;;
  129.       *) ac_optarg=yes ;;
  130.     esac
  131.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  132.  
  133.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  134.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  135.   | --exec | --exe | --ex)
  136.     ac_prev=exec_prefix ;;
  137.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  138.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  139.   | --exec=* | --exe=* | --ex=*)
  140.     exec_prefix="$ac_optarg" ;;
  141.  
  142.   -gas | --gas | --ga | --g)
  143.     # Obsolete; use --with-gas.
  144.     with_gas=yes ;;
  145.  
  146.   -help | --help | --hel | --he)
  147.     # Omit some internal or obsolete options to make the list less imposing.
  148.     # This message is too long to be a string in the A/UX 3.1 sh.
  149.     cat << EOF
  150. Usage: configure [options] [host]
  151. Options: [defaults in brackets after descriptions]
  152. Configuration:
  153.   --cache-file=FILE       cache test results in FILE
  154.   --help                  print this message
  155.   --no-create             do not create output files
  156.   --quiet, --silent       do not print \`checking...' messages
  157.   --version               print the version of autoconf that created configure
  158. Directory and file names:
  159.   --prefix=PREFIX         install architecture-independent files in PREFIX
  160.                           [$ac_default_prefix]
  161.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  162.                           [same as prefix]
  163.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  164.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  165.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  166.   --datadir=DIR           read-only architecture-independent data in DIR
  167.                           [PREFIX/share]
  168.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  169.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  170.                           [PREFIX/com]
  171.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  172.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  173.   --includedir=DIR        C header files in DIR [PREFIX/include]
  174.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  175.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  176.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  177.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  178.   --program-prefix=PREFIX prepend PREFIX to installed program names
  179.   --program-suffix=SUFFIX append SUFFIX to installed program names
  180.   --program-transform-name=PROGRAM
  181.                           run sed PROGRAM on installed program names
  182. EOF
  183.     cat << EOF
  184. Host type:
  185.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  186.   --host=HOST             configure for HOST [guessed]
  187.   --target=TARGET         configure for TARGET [TARGET=HOST]
  188. Features and packages:
  189.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  190.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  191.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  192.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  193.   --x-includes=DIR        X include files are in DIR
  194.   --x-libraries=DIR       X library files are in DIR
  195. EOF
  196. cat <<EOF
  197. --enable and --with options recognized:
  198.   --disable-echo          test: display "compiling" commands (default: on)
  199.   --disable-extensions    test: build only core functions (default: on)
  200.   --disable-shell         test: disable shell/external commands (default: on)
  201.   --with-CFLAGS=value     set default for \$CFLAGS
  202.   --with-cflags=value     (same as --with-CFLAGS)
  203.   --with-startup-path=PATH specify locations to search for vile.hlp, etc.
  204.   --with-perl             enable use of Perl as an extension language
  205.   --with-screen=value     specify terminal driver.  The default is tcap, for
  206.                           the termcap/terminfo driver.  Other values include
  207.                           ncurses (a special case of terminfo), X11, OpenLook,
  208.                           Motif, Athena, Xaw, Xaw3d, neXtaw and ansi.
  209.   --with-scr=value        (same as --with-screen)
  210.   --with-x                use the X Window System
  211.   --with-Xaw3d            link with Xaw 3d library
  212.   --with-neXtaw           link with neXT Athena library
  213.   --with-Xaw-scrollbars   use Xaw scrollbars rather than our own
  214. EOF
  215. cat <<EOF
  216.   --with-drag-extension   use drag/scrolling extension with Xaw
  217.   --with-exec-macros=N    specify count of numbered macros
  218.   --with-locale           use i18n support for character-types
  219.   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
  220.   --with-dmalloc          test: use Gray Watson's dmalloc library
  221.   --with-no-leaks         test: free permanent memory, analyze leaks
  222.   --with-trace            test: turn on debug-tracing
  223.   --with-warnings         test: turn on GCC compiler warnings
  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=mktbls.c
  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. ac_aux_dir=
  563. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  564.   if test -f $ac_dir/install-sh; then
  565.     ac_aux_dir=$ac_dir
  566.     ac_install_sh="$ac_aux_dir/install-sh -c"
  567.     break
  568.   elif test -f $ac_dir/install.sh; then
  569.     ac_aux_dir=$ac_dir
  570.     ac_install_sh="$ac_aux_dir/install.sh -c"
  571.     break
  572.   fi
  573. done
  574. if test -z "$ac_aux_dir"; then
  575.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  576. fi
  577. ac_config_guess=$ac_aux_dir/config.guess
  578. ac_config_sub=$ac_aux_dir/config.sub
  579. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  580.  
  581.  
  582. if test -f $srcdir/config.guess ; then
  583.     
  584. # Make sure we can run config.sub.
  585. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  586. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  587. fi
  588.  
  589. echo $ac_n "checking host system type""... $ac_c" 1>&6
  590. echo "configure:591: checking host system type" >&5
  591.  
  592. host_alias=$host
  593. case "$host_alias" in
  594. NONE)
  595.   case $nonopt in
  596.   NONE)
  597.     if host_alias=`$ac_config_guess`; then :
  598.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  599.     fi ;;
  600.   *) host_alias=$nonopt ;;
  601.   esac ;;
  602. esac
  603.  
  604. host=`$ac_config_sub $host_alias`
  605. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  606. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  607. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  608. echo "$ac_t""$host" 1>&6
  609.  
  610.     system_name="$host_os"
  611. else
  612.     system_name="`(uname -s -r) 2>/dev/null`"
  613.     if test -z "$system_name" ; then
  614.         system_name="`(hostname) 2>/dev/null`"
  615.     fi
  616. fi
  617. test -n "$system_name" && cat >> confdefs.h <<EOF
  618. #define SYSTEM_NAME "$system_name"
  619. EOF
  620.  
  621. if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
  622.   echo $ac_n "(cached) $ac_c" 1>&6
  623. else
  624.   cf_cv_system_name="$system_name"
  625. fi
  626.  
  627.  
  628. test -z "$system_name" && system_name="$cf_cv_system_name"
  629. test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6
  630.  
  631. if test ".$system_name" != ".$cf_cv_system_name" ; then
  632.     echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
  633.     { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
  634. fi
  635.  
  636.  
  637. ###    checks for alternative programs
  638. # Extract the first word of "gcc", so it can be a program name with args.
  639. set dummy gcc; ac_word=$2
  640. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  641. echo "configure:642: checking for $ac_word" >&5
  642. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  643.   echo $ac_n "(cached) $ac_c" 1>&6
  644. else
  645.   if test -n "$CC"; then
  646.   ac_cv_prog_CC="$CC" # Let the user override the test.
  647. else
  648.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  649.   for ac_dir in $PATH; do
  650.     test -z "$ac_dir" && ac_dir=.
  651.     if test -f $ac_dir/$ac_word; then
  652.       ac_cv_prog_CC="gcc"
  653.       break
  654.     fi
  655.   done
  656.   IFS="$ac_save_ifs"
  657. fi
  658. fi
  659. CC="$ac_cv_prog_CC"
  660. if test -n "$CC"; then
  661.   echo "$ac_t""$CC" 1>&6
  662. else
  663.   echo "$ac_t""no" 1>&6
  664. fi
  665.  
  666. if test -z "$CC"; then
  667.   # Extract the first word of "cc", so it can be a program name with args.
  668. set dummy cc; ac_word=$2
  669. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  670. echo "configure:671: checking for $ac_word" >&5
  671. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  672.   echo $ac_n "(cached) $ac_c" 1>&6
  673. else
  674.   if test -n "$CC"; then
  675.   ac_cv_prog_CC="$CC" # Let the user override the test.
  676. else
  677.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  678.   ac_prog_rejected=no
  679.   for ac_dir in $PATH; do
  680.     test -z "$ac_dir" && ac_dir=.
  681.     if test -f $ac_dir/$ac_word; then
  682.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  683.         ac_prog_rejected=yes
  684.     continue
  685.       fi
  686.       ac_cv_prog_CC="cc"
  687.       break
  688.     fi
  689.   done
  690.   IFS="$ac_save_ifs"
  691. if test $ac_prog_rejected = yes; then
  692.   # We found a bogon in the path, so make sure we never use it.
  693.   set dummy $ac_cv_prog_CC
  694.   shift
  695.   if test $# -gt 0; then
  696.     # We chose a different compiler from the bogus one.
  697.     # However, it has the same basename, so the bogon will be chosen
  698.     # first if we set CC to just the basename; use the full file name.
  699.     shift
  700.     set dummy "$ac_dir/$ac_word" "$@"
  701.     shift
  702.     ac_cv_prog_CC="$@"
  703.   fi
  704. fi
  705. fi
  706. fi
  707. CC="$ac_cv_prog_CC"
  708. if test -n "$CC"; then
  709.   echo "$ac_t""$CC" 1>&6
  710. else
  711.   echo "$ac_t""no" 1>&6
  712. fi
  713.  
  714.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  715. fi
  716.  
  717. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  718. echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  719.  
  720. ac_ext=c
  721. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  722. ac_cpp='$CPP $CPPFLAGS'
  723. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  724. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  725. cross_compiling=$ac_cv_prog_cc_cross
  726.  
  727. cat > conftest.$ac_ext <<EOF
  728. #line 729 "configure"
  729. #include "confdefs.h"
  730. main(){return(0);}
  731. EOF
  732. if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  733.   ac_cv_prog_cc_works=yes
  734.   # If we can't run a trivial program, we are probably using a cross compiler.
  735.   if (./conftest; exit) 2>/dev/null; then
  736.     ac_cv_prog_cc_cross=no
  737.   else
  738.     ac_cv_prog_cc_cross=yes
  739.   fi
  740. else
  741.   echo "configure: failed program was:" >&5
  742.   cat conftest.$ac_ext >&5
  743.   ac_cv_prog_cc_works=no
  744. fi
  745. rm -fr conftest*
  746.  
  747. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  748. if test $ac_cv_prog_cc_works = no; then
  749.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  750. fi
  751. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  752. echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  753. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  754. cross_compiling=$ac_cv_prog_cc_cross
  755.  
  756. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  757. echo "configure:758: checking whether we are using GNU C" >&5
  758. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  759.   echo $ac_n "(cached) $ac_c" 1>&6
  760. else
  761.   cat > conftest.c <<EOF
  762. #ifdef __GNUC__
  763.   yes;
  764. #endif
  765. EOF
  766. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  767.   ac_cv_prog_gcc=yes
  768. else
  769.   ac_cv_prog_gcc=no
  770. fi
  771. fi
  772.  
  773. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  774.  
  775. if test $ac_cv_prog_gcc = yes; then
  776.   GCC=yes
  777.   ac_test_CFLAGS="${CFLAGS+set}"
  778.   ac_save_CFLAGS="$CFLAGS"
  779.   CFLAGS=
  780.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  781. echo "configure:782: checking whether ${CC-cc} accepts -g" >&5
  782. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  783.   echo $ac_n "(cached) $ac_c" 1>&6
  784. else
  785.   echo 'void f(){}' > conftest.c
  786. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  787.   ac_cv_prog_cc_g=yes
  788. else
  789.   ac_cv_prog_cc_g=no
  790. fi
  791. rm -f conftest*
  792.  
  793. fi
  794.  
  795. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  796.   if test "$ac_test_CFLAGS" = set; then
  797.     CFLAGS="$ac_save_CFLAGS"
  798.   elif test $ac_cv_prog_cc_g = yes; then
  799.     CFLAGS="-g -O2"
  800.   else
  801.     CFLAGS="-O2"
  802.   fi
  803. else
  804.   GCC=
  805.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  806. fi
  807.  
  808. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  809. echo "configure:810: checking how to run the C preprocessor" >&5
  810. # On Suns, sometimes $CPP names a directory.
  811. if test -n "$CPP" && test -d "$CPP"; then
  812.   CPP=
  813. fi
  814. if test -z "$CPP"; then
  815. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  816.   echo $ac_n "(cached) $ac_c" 1>&6
  817. else
  818.     # This must be in double quotes, not single quotes, because CPP may get
  819.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  820.   CPP="${CC-cc} -E"
  821.   # On the NeXT, cc -E runs the code through the compiler's parser,
  822.   # not just through cpp.
  823.   cat > conftest.$ac_ext <<EOF
  824. #line 825 "configure"
  825. #include "confdefs.h"
  826. #include <assert.h>
  827. Syntax Error
  828. EOF
  829. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  830. { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  831. ac_err=`grep -v '^ *+' conftest.out`
  832. if test -z "$ac_err"; then
  833.   :
  834. else
  835.   echo "$ac_err" >&5
  836.   echo "configure: failed program was:" >&5
  837.   cat conftest.$ac_ext >&5
  838.   rm -rf conftest*
  839.   CPP="${CC-cc} -E -traditional-cpp"
  840.   cat > conftest.$ac_ext <<EOF
  841. #line 842 "configure"
  842. #include "confdefs.h"
  843. #include <assert.h>
  844. Syntax Error
  845. EOF
  846. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  847. { (eval echo configure:848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  848. ac_err=`grep -v '^ *+' conftest.out`
  849. if test -z "$ac_err"; then
  850.   :
  851. else
  852.   echo "$ac_err" >&5
  853.   echo "configure: failed program was:" >&5
  854.   cat conftest.$ac_ext >&5
  855.   rm -rf conftest*
  856.   CPP=/lib/cpp
  857. fi
  858. rm -f conftest*
  859. fi
  860. rm -f conftest*
  861.   ac_cv_prog_CPP="$CPP"
  862. fi
  863.   CPP="$ac_cv_prog_CPP"
  864. else
  865.   ac_cv_prog_CPP="$CPP"
  866. fi
  867. echo "$ac_t""$CPP" 1>&6
  868.  
  869. if test $ac_cv_prog_gcc = yes; then
  870.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  871. echo "configure:872: checking whether ${CC-cc} needs -traditional" >&5
  872. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  873.   echo $ac_n "(cached) $ac_c" 1>&6
  874. else
  875.     ac_pattern="Autoconf.*'x'"
  876.   cat > conftest.$ac_ext <<EOF
  877. #line 878 "configure"
  878. #include "confdefs.h"
  879. #include <sgtty.h>
  880. Autoconf TIOCGETP
  881. EOF
  882. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  883.   egrep "$ac_pattern" >/dev/null 2>&1; then
  884.   rm -rf conftest*
  885.   ac_cv_prog_gcc_traditional=yes
  886. else
  887.   rm -rf conftest*
  888.   ac_cv_prog_gcc_traditional=no
  889. fi
  890. rm -f conftest*
  891.  
  892.  
  893.   if test $ac_cv_prog_gcc_traditional = no; then
  894.     cat > conftest.$ac_ext <<EOF
  895. #line 896 "configure"
  896. #include "confdefs.h"
  897. #include <termio.h>
  898. Autoconf TCGETA
  899. EOF
  900. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  901.   egrep "$ac_pattern" >/dev/null 2>&1; then
  902.   rm -rf conftest*
  903.   ac_cv_prog_gcc_traditional=yes
  904. fi
  905. rm -f conftest*
  906.  
  907.   fi
  908. fi
  909.  
  910. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  911.   if test $ac_cv_prog_gcc_traditional = yes; then
  912.     CC="$CC -traditional"
  913.   fi
  914. fi
  915.  
  916. # Find a good install program.  We prefer a C program (faster),
  917. # so one script is as good as another.  But avoid the broken or
  918. # incompatible versions:
  919. # SysV /etc/install, /usr/sbin/install
  920. # SunOS /usr/etc/install
  921. # IRIX /sbin/install
  922. # AIX /bin/install
  923. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  924. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  925. # ./install, which can be erroneously created by make from ./install.sh.
  926. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  927. echo "configure:928: checking for a BSD compatible install" >&5
  928. if test -z "$INSTALL"; then
  929. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  930.   echo $ac_n "(cached) $ac_c" 1>&6
  931. else
  932.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  933.   for ac_dir in $PATH; do
  934.     # Account for people who put trailing slashes in PATH elements.
  935.     case "$ac_dir/" in
  936.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  937.     *)
  938.       # OSF1 and SCO ODT 3.0 have their own names for install.
  939.       for ac_prog in ginstall installbsd scoinst install; do
  940.         if test -f $ac_dir/$ac_prog; then
  941.       if test $ac_prog = install &&
  942.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  943.         # AIX install.  It has an incompatible calling convention.
  944.         # OSF/1 installbsd also uses dspmsg, but is usable.
  945.         :
  946.       else
  947.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  948.         break 2
  949.       fi
  950.     fi
  951.       done
  952.       ;;
  953.     esac
  954.   done
  955.   IFS="$ac_save_IFS"
  956.  
  957. fi
  958.   if test "${ac_cv_path_install+set}" = set; then
  959.     INSTALL="$ac_cv_path_install"
  960.   else
  961.     # As a last resort, use the slow shell script.  We don't cache a
  962.     # path for INSTALL within a source directory, because that will
  963.     # break other packages using the cache if that directory is
  964.     # removed, or if the path is relative.
  965.     INSTALL="$ac_install_sh"
  966.   fi
  967. fi
  968. echo "$ac_t""$INSTALL" 1>&6
  969.  
  970. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  971. # It thinks the first close brace ends the variable substitution.
  972. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  973.  
  974. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  975.  
  976. # Extract the first word of "td_config", so it can be a program name with args.
  977. set dummy td_config; ac_word=$2
  978. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  979. echo "configure:980: checking for $ac_word" >&5
  980. if eval "test \"`echo '$''{'ac_cv_path_TD_CONFIG'+set}'`\" = set"; then
  981.   echo $ac_n "(cached) $ac_c" 1>&6
  982. else
  983.   case "$TD_CONFIG" in
  984.   /*)
  985.   ac_cv_path_TD_CONFIG="$TD_CONFIG" # Let the user override the test with a path.
  986.   ;;
  987.   *)
  988.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  989.   for ac_dir in $PATH; do
  990.     test -z "$ac_dir" && ac_dir=.
  991.     if test -f $ac_dir/$ac_word; then
  992.       ac_cv_path_TD_CONFIG="$ac_dir/$ac_word"
  993.       break
  994.     fi
  995.   done
  996.   IFS="$ac_save_ifs"
  997.   ;;
  998. esac
  999. fi
  1000. TD_CONFIG="$ac_cv_path_TD_CONFIG"
  1001. if test -n "$TD_CONFIG"; then
  1002.   echo "$ac_t""$TD_CONFIG" 1>&6
  1003. else
  1004.   echo "$ac_t""no" 1>&6
  1005. fi
  1006.  
  1007.  
  1008.  
  1009. echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
  1010. echo "configure:1011: checking if you want to see long compiling messages" >&5
  1011.  
  1012. # Check whether --enable-echo or --disable-echo was given.
  1013. if test "${enable_echo+set}" = set; then
  1014.   enableval="$enable_echo"
  1015.   test "$enableval" != no && enableval=yes
  1016.   if test "$enableval" != "yes" ; then
  1017.     
  1018.     ECHO_LD='@echo linking $@;'
  1019.     RULE_CC='    @echo compiling $<'
  1020.     SHOW_CC='    @echo compiling $@'
  1021.     ECHO_CC='@'
  1022.  
  1023.   else
  1024.     
  1025.     ECHO_LD=''
  1026.     RULE_CC='# compiling'
  1027.     SHOW_CC='# compiling'
  1028.     ECHO_CC=''
  1029.  
  1030.   fi
  1031. else
  1032.   enableval=yes 
  1033.   
  1034.     ECHO_LD=''
  1035.     RULE_CC='# compiling'
  1036.     SHOW_CC='# compiling'
  1037.     ECHO_CC=''
  1038.  
  1039.   
  1040. fi
  1041.  
  1042. echo "$ac_t""$enableval" 1>&6
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050. PROG_EXT=
  1051. case $cf_cv_system_name in
  1052. os2*)
  1053.     # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
  1054.     CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
  1055.     LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
  1056.     PROG_EXT=".exe"
  1057.     ;;
  1058. esac
  1059.  
  1060.  
  1061.  
  1062.  
  1063. # Check whether --enable-extensions or --disable-extensions was given.
  1064. if test "${enable_extensions+set}" = set; then
  1065.   enableval="$enable_extensions"
  1066.   test "$enableval" != no && enableval=yes
  1067.   if test "$enableval" != "yes" ; then
  1068.     cat >> confdefs.h <<\EOF
  1069. #define SMALLER 1
  1070. EOF
  1071.  
  1072.      cat >> confdefs.h <<\EOF
  1073. #define FEWNAMES 1
  1074. EOF
  1075.  
  1076.   else
  1077.     EXTRAOBJS="$EXTRAOBJS btree.o crypt.o"
  1078.   fi
  1079. else
  1080.   enableval=yes 
  1081.   EXTRAOBJS="$EXTRAOBJS btree.o crypt.o"
  1082.   
  1083. fi
  1084.  
  1085.  
  1086. # Check whether --enable-shell or --disable-shell was given.
  1087. if test "${enable_shell+set}" = set; then
  1088.   enableval="$enable_shell"
  1089.   test "$enableval" != no && enableval=yes
  1090.   if test "$enableval" != "yes" ; then
  1091.     cat >> confdefs.h <<\EOF
  1092. #define OPT_SHELL 0
  1093. EOF
  1094.  
  1095.   else
  1096.     EXTRAOBJS="$EXTRAOBJS npopen.o spawn.o"
  1097.   fi
  1098. else
  1099.   enableval=yes 
  1100.   EXTRAOBJS="$EXTRAOBJS npopen.o spawn.o"
  1101.   
  1102. fi
  1103.  
  1104.  
  1105. ###    use option --with-cflags to set default CFLAGS
  1106. echo $ac_n "checking for CFLAGS options""... $ac_c" 1>&6
  1107. echo "configure:1108: checking for CFLAGS options" >&5
  1108.  
  1109. # Check whether --with-CFLAGS or --without-CFLAGS was given.
  1110. if test "${with_CFLAGS+set}" = set; then
  1111.   withval="$with_CFLAGS"
  1112.   cflags=$withval
  1113. fi
  1114.  
  1115. if test -z "$cflags"; then
  1116.     
  1117. # Check whether --with-cflags or --without-cflags was given.
  1118. if test "${with_cflags+set}" = set; then
  1119.   withval="$with_cflags"
  1120.   cflags=$withval
  1121. fi
  1122.  
  1123. fi
  1124.  
  1125. # if the user specified nothing else, set -O.  user can override
  1126. # with --with-cflags=" "
  1127. if test -n "$cflags"; then
  1128.     CFLAGS="$cflags"
  1129. elif test -z "$CFLAGS" ; then
  1130.     CFLAGS="-O"
  1131. fi
  1132. echo "$ac_t""$cflags" 1>&6
  1133.  
  1134. echo $ac_n "checking for startup path""... $ac_c" 1>&6
  1135. echo "configure:1136: checking for startup path" >&5
  1136.  
  1137. # Check whether --with-startup-path or --without-startup-path was given.
  1138. if test "${with_startup_path+set}" = set; then
  1139.   withval="$with_startup_path"
  1140.   VILE_STARTUP_PATH=$withval
  1141. else
  1142.   test -z "$VILE_STARTUP_PATH" &&\
  1143.     VILE_STARTUP_PATH='$(datadir):/usr/local/lib/:/usr/local/:/usr/lib/'
  1144. fi
  1145.  
  1146. echo "$ac_t""$VILE_STARTUP_PATH" 1>&6
  1147.  
  1148.  
  1149. echo $ac_n "checking if you want to use perl as an extension language""... $ac_c" 1>&6
  1150. echo "configure:1151: checking if you want to use perl as an extension language" >&5
  1151.  
  1152. # Check whether --with-perl or --without-perl was given.
  1153. if test "${with_perl+set}" = set; then
  1154.   withval="$with_perl"
  1155.   with_perl=$withval
  1156. else
  1157.   with_perl=no
  1158. fi
  1159.  
  1160. echo "$ac_t""$with_perl" 1>&6
  1161. if test "$with_perl" = yes ; then
  1162.     # find perl binary
  1163. echo $ac_n "checking for perl-5.004""... $ac_c" 1>&6
  1164. echo "configure:1165: checking for perl-5.004" >&5
  1165. if eval "test \"`echo '$''{'cf_cv_prog_PERL'+set}'`\" = set"; then
  1166.   echo $ac_n "(cached) $ac_c" 1>&6
  1167. else
  1168.   echo "configure:1169: ...version 5.004 required" >&5
  1169.   # allow user to override
  1170.   if test -n "$PERL"; then
  1171.     cf_try="$PERL"
  1172.   else
  1173.     cf_try="perl perl5"
  1174.   fi
  1175.  
  1176.   for cf_prog in $cf_try; do
  1177.     echo "configure:1178: trying $cf_prog" >&5
  1178.     if ($cf_prog -e 'printf "found version %g\n",$];exit($]<5.004)') 1>&5 2>&1; then
  1179.       cf_cv_prog_PERL=$cf_prog
  1180.       break
  1181.     fi
  1182.   done
  1183. fi
  1184. PERL="$cf_cv_prog_PERL"
  1185. if test -n "$PERL"; then
  1186.   echo "$ac_t""$PERL" 1>&6
  1187. else
  1188.   echo "$ac_t""no" 1>&6
  1189. fi
  1190.  
  1191.     if test "$PERL" = no; then
  1192.         { echo "configure: error: perl not found" 1>&2; exit 1; }
  1193.     fi
  1194.     perl_lib_path=`$PERL -MConfig -e 'print $Config{privlib}'`
  1195.     cat >> confdefs.h <<\EOF
  1196. #define OPT_PERL 1
  1197. EOF
  1198.  
  1199.     EXTRAOBJS="$EXTRAOBJS perl.o"
  1200.     LINK_PREFIX=`$PERL -MConfig -e 'print $Config{shrpenv}'`
  1201.     ac_link="$LINK_PREFIX $ac_link"
  1202.     CFLAGS="$CFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
  1203.     LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
  1204.     EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(INSTALL_PERL_DIRS)"
  1205.     EXTRA_INSTALL_FILES="$EXTRA_INSTALL_FILES \$(INSTALL_PERL_FILES)"
  1206. fi
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212. # X11 checks will sometimes add to CFLAGS.  We want the state of CFLAGS
  1213. # prior to these checks
  1214. saved_CFLAGS="$CFLAGS"
  1215.  
  1216. ###    checks for UNIX variants that set C preprocessor variables
  1217. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  1218. echo "configure:1219: checking for AIX" >&5
  1219. cat > conftest.$ac_ext <<EOF
  1220. #line 1221 "configure"
  1221. #include "confdefs.h"
  1222. #ifdef _AIX
  1223.   yes
  1224. #endif
  1225.  
  1226. EOF
  1227. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1228.   egrep "yes" >/dev/null 2>&1; then
  1229.   rm -rf conftest*
  1230.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  1231. #define _ALL_SOURCE 1
  1232. EOF
  1233.  
  1234. else
  1235.   rm -rf conftest*
  1236.   echo "$ac_t""no" 1>&6
  1237. fi
  1238. rm -f conftest*
  1239.  
  1240.  
  1241. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  1242. echo "configure:1243: checking for POSIXized ISC" >&5
  1243. if test -d /etc/conf/kconfig.d &&
  1244.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  1245. then
  1246.   echo "$ac_t""yes" 1>&6
  1247.   ISC=yes # If later tests want to check for ISC.
  1248.   cat >> confdefs.h <<\EOF
  1249. #define _POSIX_SOURCE 1
  1250. EOF
  1251.  
  1252.   if test "$GCC" = yes; then
  1253.     CC="$CC -posix"
  1254.   else
  1255.     CC="$CC -Xp"
  1256.   fi
  1257. else
  1258.   echo "$ac_t""no" 1>&6
  1259.   ISC=
  1260. fi
  1261.  
  1262. ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  1263. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  1264. echo "configure:1265: checking for minix/config.h" >&5
  1265. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1266.   echo $ac_n "(cached) $ac_c" 1>&6
  1267. else
  1268.   cat > conftest.$ac_ext <<EOF
  1269. #line 1270 "configure"
  1270. #include "confdefs.h"
  1271. #include <minix/config.h>
  1272. EOF
  1273. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1274. { (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1275. ac_err=`grep -v '^ *+' conftest.out`
  1276. if test -z "$ac_err"; then
  1277.   rm -rf conftest*
  1278.   eval "ac_cv_header_$ac_safe=yes"
  1279. else
  1280.   echo "$ac_err" >&5
  1281.   echo "configure: failed program was:" >&5
  1282.   cat conftest.$ac_ext >&5
  1283.   rm -rf conftest*
  1284.   eval "ac_cv_header_$ac_safe=no"
  1285. fi
  1286. rm -f conftest*
  1287. fi
  1288. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1289.   echo "$ac_t""yes" 1>&6
  1290.   MINIX=yes
  1291. else
  1292.   echo "$ac_t""no" 1>&6
  1293. MINIX=
  1294. fi
  1295.  
  1296. if test "$MINIX" = yes; then
  1297.   cat >> confdefs.h <<\EOF
  1298. #define _POSIX_SOURCE 1
  1299. EOF
  1300.  
  1301.   cat >> confdefs.h <<\EOF
  1302. #define _POSIX_1_SOURCE 2
  1303. EOF
  1304.  
  1305.   cat >> confdefs.h <<\EOF
  1306. #define _MINIX 1
  1307. EOF
  1308.  
  1309. fi
  1310.  
  1311. echo $ac_n "checking for getpwnam""... $ac_c" 1>&6
  1312. echo "configure:1313: checking for getpwnam" >&5
  1313. if eval "test \"`echo '$''{'ac_cv_func_getpwnam'+set}'`\" = set"; then
  1314.   echo $ac_n "(cached) $ac_c" 1>&6
  1315. else
  1316.   cat > conftest.$ac_ext <<EOF
  1317. #line 1318 "configure"
  1318. #include "confdefs.h"
  1319. /* System header to define __stub macros and hopefully few prototypes,
  1320.     which can conflict with char getpwnam(); below.  */
  1321. #include <assert.h>
  1322. /* Override any gcc2 internal prototype to avoid an error.  */
  1323. /* We use char because int might match the return type of a gcc2
  1324.     builtin and then its argument prototype would still apply.  */
  1325. char getpwnam();
  1326.  
  1327. int main() {
  1328.  
  1329. /* The GNU C library defines this for functions which it implements
  1330.     to always fail with ENOSYS.  Some functions are actually named
  1331.     something starting with __ and the normal name is an alias.  */
  1332. #if defined (__stub_getpwnam) || defined (__stub___getpwnam)
  1333. choke me
  1334. #else
  1335. getpwnam();
  1336. #endif
  1337.  
  1338. ; return 0; }
  1339. EOF
  1340. if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1341.   rm -rf conftest*
  1342.   eval "ac_cv_func_getpwnam=yes"
  1343. else
  1344.   echo "configure: failed program was:" >&5
  1345.   cat conftest.$ac_ext >&5
  1346.   rm -rf conftest*
  1347.   eval "ac_cv_func_getpwnam=no"
  1348. fi
  1349. rm -f conftest*
  1350. fi
  1351.  
  1352. if eval "test \"`echo '$ac_cv_func_'getpwnam`\" = yes"; then
  1353.   echo "$ac_t""yes" 1>&6
  1354.   :
  1355. else
  1356.   echo "$ac_t""no" 1>&6
  1357. echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
  1358. echo "configure:1359: checking for getpwnam in -lsun" >&5
  1359. ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
  1360. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1361.   echo $ac_n "(cached) $ac_c" 1>&6
  1362. else
  1363.   ac_save_LIBS="$LIBS"
  1364. LIBS="-lsun  $LIBS"
  1365. cat > conftest.$ac_ext <<EOF
  1366. #line 1367 "configure"
  1367. #include "confdefs.h"
  1368. /* Override any gcc2 internal prototype to avoid an error.  */
  1369. /* We use char because int might match the return type of a gcc2
  1370.     builtin and then its argument prototype would still apply.  */
  1371. char getpwnam();
  1372.  
  1373. int main() {
  1374. getpwnam()
  1375. ; return 0; }
  1376. EOF
  1377. if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1378.   rm -rf conftest*
  1379.   eval "ac_cv_lib_$ac_lib_var=yes"
  1380. else
  1381.   echo "configure: failed program was:" >&5
  1382.   cat conftest.$ac_ext >&5
  1383.   rm -rf conftest*
  1384.   eval "ac_cv_lib_$ac_lib_var=no"
  1385. fi
  1386. rm -f conftest*
  1387. LIBS="$ac_save_LIBS"
  1388.  
  1389. fi
  1390. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1391.   echo "$ac_t""yes" 1>&6
  1392.     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/^a-zA-Z0-9_/_/g' \
  1393.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1394.   cat >> confdefs.h <<EOF
  1395. #define $ac_tr_lib 1
  1396. EOF
  1397.  
  1398.   LIBS="-lsun $LIBS"
  1399.  
  1400. else
  1401.   echo "$ac_t""no" 1>&6
  1402. fi
  1403.  
  1404. fi
  1405.  
  1406.  
  1407. # check for SCO.
  1408. # FIXME:  this is a hack, and should be split into individual features -- the
  1409. # sys/time.h and select.h conflict.
  1410. echo "checking for SCO by checking on /usr/bin/scosh" 1>&6
  1411. echo "configure:1412: checking for SCO by checking on /usr/bin/scosh" >&5
  1412. # Extract the first word of "scosh", so it can be a program name with args.
  1413. set dummy scosh; ac_word=$2
  1414. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1415. echo "configure:1416: checking for $ac_word" >&5
  1416. if eval "test \"`echo '$''{'ac_cv_prog_COULD_BE_SCO'+set}'`\" = set"; then
  1417.   echo $ac_n "(cached) $ac_c" 1>&6
  1418. else
  1419.   if test -n "$COULD_BE_SCO"; then
  1420.   ac_cv_prog_COULD_BE_SCO="$COULD_BE_SCO" # Let the user override the test.
  1421. else
  1422.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1423.   for ac_dir in $PATH; do
  1424.     test -z "$ac_dir" && ac_dir=.
  1425.     if test -f $ac_dir/$ac_word; then
  1426.       ac_cv_prog_COULD_BE_SCO="maybe"
  1427.       break
  1428.     fi
  1429.   done
  1430.   IFS="$ac_save_ifs"
  1431.   test -z "$ac_cv_prog_COULD_BE_SCO" && ac_cv_prog_COULD_BE_SCO="maybenot"
  1432. fi
  1433. fi
  1434. COULD_BE_SCO="$ac_cv_prog_COULD_BE_SCO"
  1435. if test -n "$COULD_BE_SCO"; then
  1436.   echo "$ac_t""$COULD_BE_SCO" 1>&6
  1437. else
  1438.   echo "$ac_t""no" 1>&6
  1439. fi
  1440.  
  1441. if test "$COULD_BE_SCO" = "maybe"
  1442. then
  1443.     cat >> confdefs.h <<\EOF
  1444. #define SYSTEM_LOOKS_LIKE_SCO 1
  1445. EOF
  1446.  
  1447. fi
  1448.  
  1449. # check for a lint program.
  1450. for ac_prog in lint alint lclint
  1451. do
  1452. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1453. set dummy $ac_prog; ac_word=$2
  1454. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1455. echo "configure:1456: checking for $ac_word" >&5
  1456. if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
  1457.   echo $ac_n "(cached) $ac_c" 1>&6
  1458. else
  1459.   if test -n "$LINT"; then
  1460.   ac_cv_prog_LINT="$LINT" # Let the user override the test.
  1461. else
  1462.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1463.   for ac_dir in $PATH; do
  1464.     test -z "$ac_dir" && ac_dir=.
  1465.     if test -f $ac_dir/$ac_word; then
  1466.       ac_cv_prog_LINT="$ac_prog"
  1467.       break
  1468.     fi
  1469.   done
  1470.   IFS="$ac_save_ifs"
  1471. fi
  1472. fi
  1473. LINT="$ac_cv_prog_LINT"
  1474. if test -n "$LINT"; then
  1475.   echo "$ac_t""$LINT" 1>&6
  1476. else
  1477.   echo "$ac_t""no" 1>&6
  1478. fi
  1479.  
  1480. test -n "$LINT" && break
  1481. done
  1482.  
  1483. if test -n "$LINT"
  1484. then
  1485.     cat >> confdefs.h <<\EOF
  1486. #define SYSTEM_HAS_LINT_PROG 1
  1487. EOF
  1488.  
  1489. fi
  1490.  
  1491. ###    checks for header files
  1492. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1493. echo "configure:1494: checking for ANSI C header files" >&5
  1494. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1495.   echo $ac_n "(cached) $ac_c" 1>&6
  1496. else
  1497.   cat > conftest.$ac_ext <<EOF
  1498. #line 1499 "configure"
  1499. #include "confdefs.h"
  1500. #include <stdlib.h>
  1501. #include <stdarg.h>
  1502. #include <string.h>
  1503. #include <float.h>
  1504. EOF
  1505. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1506. { (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1507. ac_err=`grep -v '^ *+' conftest.out`
  1508. if test -z "$ac_err"; then
  1509.   rm -rf conftest*
  1510.   ac_cv_header_stdc=yes
  1511. else
  1512.   echo "$ac_err" >&5
  1513.   echo "configure: failed program was:" >&5
  1514.   cat conftest.$ac_ext >&5
  1515.   rm -rf conftest*
  1516.   ac_cv_header_stdc=no
  1517. fi
  1518. rm -f conftest*
  1519.  
  1520. if test $ac_cv_header_stdc = yes; then
  1521.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1522. cat > conftest.$ac_ext <<EOF
  1523. #line 1524 "configure"
  1524. #include "confdefs.h"
  1525. #include <string.h>
  1526. EOF
  1527. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1528.   egrep "memchr" >/dev/null 2>&1; then
  1529.   :
  1530. else
  1531.   rm -rf conftest*
  1532.   ac_cv_header_stdc=no
  1533. fi
  1534. rm -f conftest*
  1535.  
  1536. fi
  1537.  
  1538. if test $ac_cv_header_stdc = yes; then
  1539.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1542 "configure"
  1542. #include "confdefs.h"
  1543. #include <stdlib.h>
  1544. EOF
  1545. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1546.   egrep "free" >/dev/null 2>&1; then
  1547.   :
  1548. else
  1549.   rm -rf conftest*
  1550.   ac_cv_header_stdc=no
  1551. fi
  1552. rm -f conftest*
  1553.  
  1554. fi
  1555.  
  1556. if test $ac_cv_header_stdc = yes; then
  1557.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1558. if test "$cross_compiling" = yes; then
  1559.   :
  1560. else
  1561.   cat > conftest.$ac_ext <<EOF
  1562. #line 1563 "configure"
  1563. #include "confdefs.h"
  1564. #include <ctype.h>
  1565. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1566. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1567. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1568. int main () { int i; for (i = 0; i < 256; i++)
  1569. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1570. exit (0); }
  1571.  
  1572. EOF
  1573. if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1574. then
  1575.   :
  1576. else
  1577.   echo "configure: failed program was:" >&5
  1578.   cat conftest.$ac_ext >&5
  1579.   rm -fr conftest*
  1580.   ac_cv_header_stdc=no
  1581. fi
  1582. rm -fr conftest*
  1583. fi
  1584.  
  1585. fi
  1586. fi
  1587.  
  1588. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1589. if test $ac_cv_header_stdc = yes; then
  1590.   cat >> confdefs.h <<\EOF
  1591. #define STDC_HEADERS 1
  1592. EOF
  1593.  
  1594. fi
  1595.  
  1596. ac_header_dirent=no
  1597. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1598. do
  1599. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1600. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1601. echo "configure:1602: checking for $ac_hdr that defines DIR" >&5
  1602. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1603.   echo $ac_n "(cached) $ac_c" 1>&6
  1604. else
  1605.   cat > conftest.$ac_ext <<EOF
  1606. #line 1607 "configure"
  1607. #include "confdefs.h"
  1608. #include <sys/types.h>
  1609. #include <$ac_hdr>
  1610. int main() {
  1611. DIR *dirp = 0;
  1612. ; return 0; }
  1613. EOF
  1614. if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1615.   rm -rf conftest*
  1616.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1617. else
  1618.   echo "configure: failed program was:" >&5
  1619.   cat conftest.$ac_ext >&5
  1620.   rm -rf conftest*
  1621.   eval "ac_cv_header_dirent_$ac_safe=no"
  1622. fi
  1623. rm -f conftest*
  1624. fi
  1625. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1626.   echo "$ac_t""yes" 1>&6
  1627.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1628.   cat >> confdefs.h <<EOF
  1629. #define $ac_tr_hdr 1
  1630. EOF
  1631.  ac_header_dirent=$ac_hdr; break
  1632. else
  1633.   echo "$ac_t""no" 1>&6
  1634. fi
  1635. done
  1636. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1637. if test $ac_header_dirent = dirent.h; then
  1638. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1639. echo "configure:1640: checking for opendir in -ldir" >&5
  1640. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1641. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1642.   echo $ac_n "(cached) $ac_c" 1>&6
  1643. else
  1644.   ac_save_LIBS="$LIBS"
  1645. LIBS="-ldir  $LIBS"
  1646. cat > conftest.$ac_ext <<EOF
  1647. #line 1648 "configure"
  1648. #include "confdefs.h"
  1649. /* Override any gcc2 internal prototype to avoid an error.  */
  1650. /* We use char because int might match the return type of a gcc2
  1651.     builtin and then its argument prototype would still apply.  */
  1652. char opendir();
  1653.  
  1654. int main() {
  1655. opendir()
  1656. ; return 0; }
  1657. EOF
  1658. if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1659.   rm -rf conftest*
  1660.   eval "ac_cv_lib_$ac_lib_var=yes"
  1661. else
  1662.   echo "configure: failed program was:" >&5
  1663.   cat conftest.$ac_ext >&5
  1664.   rm -rf conftest*
  1665.   eval "ac_cv_lib_$ac_lib_var=no"
  1666. fi
  1667. rm -f conftest*
  1668. LIBS="$ac_save_LIBS"
  1669.  
  1670. fi
  1671. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1672.   echo "$ac_t""yes" 1>&6
  1673.   LIBS="$LIBS -ldir"
  1674. else
  1675.   echo "$ac_t""no" 1>&6
  1676. fi
  1677.  
  1678. else
  1679. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1680. echo "configure:1681: checking for opendir in -lx" >&5
  1681. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1682. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1683.   echo $ac_n "(cached) $ac_c" 1>&6
  1684. else
  1685.   ac_save_LIBS="$LIBS"
  1686. LIBS="-lx  $LIBS"
  1687. cat > conftest.$ac_ext <<EOF
  1688. #line 1689 "configure"
  1689. #include "confdefs.h"
  1690. /* Override any gcc2 internal prototype to avoid an error.  */
  1691. /* We use char because int might match the return type of a gcc2
  1692.     builtin and then its argument prototype would still apply.  */
  1693. char opendir();
  1694.  
  1695. int main() {
  1696. opendir()
  1697. ; return 0; }
  1698. EOF
  1699. if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1700.   rm -rf conftest*
  1701.   eval "ac_cv_lib_$ac_lib_var=yes"
  1702. else
  1703.   echo "configure: failed program was:" >&5
  1704.   cat conftest.$ac_ext >&5
  1705.   rm -rf conftest*
  1706.   eval "ac_cv_lib_$ac_lib_var=no"
  1707. fi
  1708. rm -f conftest*
  1709. LIBS="$ac_save_LIBS"
  1710.  
  1711. fi
  1712. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1713.   echo "$ac_t""yes" 1>&6
  1714.   LIBS="$LIBS -lx"
  1715. else
  1716.   echo "$ac_t""no" 1>&6
  1717. fi
  1718.  
  1719. fi
  1720.  
  1721. for ac_hdr in unistd.h stdlib.h stdarg.h stddef.h string.h memory.h fcntl.h \
  1722.                 poll.h pwd.h termios.h termio.h sgtty.h \
  1723.         ioctl.h select.h setjmp.h signal.h utime.h varargs.h
  1724. do
  1725. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1726. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1727. echo "configure:1728: checking for $ac_hdr" >&5
  1728. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1729.   echo $ac_n "(cached) $ac_c" 1>&6
  1730. else
  1731.   cat > conftest.$ac_ext <<EOF
  1732. #line 1733 "configure"
  1733. #include "confdefs.h"
  1734. #include <$ac_hdr>
  1735. EOF
  1736. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1737. { (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1738. ac_err=`grep -v '^ *+' conftest.out`
  1739. if test -z "$ac_err"; then
  1740.   rm -rf conftest*
  1741.   eval "ac_cv_header_$ac_safe=yes"
  1742. else
  1743.   echo "$ac_err" >&5
  1744.   echo "configure: failed program was:" >&5
  1745.   cat conftest.$ac_ext >&5
  1746.   rm -rf conftest*
  1747.   eval "ac_cv_header_$ac_safe=no"
  1748. fi
  1749. rm -f conftest*
  1750. fi
  1751. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1752.   echo "$ac_t""yes" 1>&6
  1753.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1754.   cat >> confdefs.h <<EOF
  1755. #define $ac_tr_hdr 1
  1756. EOF
  1757.  
  1758. else
  1759.   echo "$ac_t""no" 1>&6
  1760. fi
  1761. done
  1762.  
  1763.  
  1764. ###    checks for <sys/xxx> header files (separate, to avoid bug in autoconf)
  1765. for ac_hdr in sys/filio.h sys/ioctl.h sys/itimer.h \
  1766.         sys/param.h \
  1767.         sys/resource.h sys/wait.h sys/time.h sys/select.h
  1768. do
  1769. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1770. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1771. echo "configure:1772: checking for $ac_hdr" >&5
  1772. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1773.   echo $ac_n "(cached) $ac_c" 1>&6
  1774. else
  1775.   cat > conftest.$ac_ext <<EOF
  1776. #line 1777 "configure"
  1777. #include "confdefs.h"
  1778. #include <$ac_hdr>
  1779. EOF
  1780. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1781. { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1782. ac_err=`grep -v '^ *+' conftest.out`
  1783. if test -z "$ac_err"; then
  1784.   rm -rf conftest*
  1785.   eval "ac_cv_header_$ac_safe=yes"
  1786. else
  1787.   echo "$ac_err" >&5
  1788.   echo "configure: failed program was:" >&5
  1789.   cat conftest.$ac_ext >&5
  1790.   rm -rf conftest*
  1791.   eval "ac_cv_header_$ac_safe=no"
  1792. fi
  1793. rm -f conftest*
  1794. fi
  1795. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1796.   echo "$ac_t""yes" 1>&6
  1797.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1798.   cat >> confdefs.h <<EOF
  1799. #define $ac_tr_hdr 1
  1800. EOF
  1801.  
  1802. else
  1803.   echo "$ac_t""no" 1>&6
  1804. fi
  1805. done
  1806.  
  1807.  
  1808. ###    checks for typedefs
  1809. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1810. echo "configure:1811: checking return type of signal handlers" >&5
  1811. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1812.   echo $ac_n "(cached) $ac_c" 1>&6
  1813. else
  1814.   cat > conftest.$ac_ext <<EOF
  1815. #line 1816 "configure"
  1816. #include "confdefs.h"
  1817. #include <sys/types.h>
  1818. #include <signal.h>
  1819. #ifdef signal
  1820. #undef signal
  1821. #endif
  1822. #ifdef __cplusplus
  1823. extern "C" void (*signal (int, void (*)(int)))(int);
  1824. #else
  1825. void (*signal ()) ();
  1826. #endif
  1827.  
  1828. int main() {
  1829. int i;
  1830. ; return 0; }
  1831. EOF
  1832. if { (eval echo configure:1833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1833.   rm -rf conftest*
  1834.   ac_cv_type_signal=void
  1835. else
  1836.   echo "configure: failed program was:" >&5
  1837.   cat conftest.$ac_ext >&5
  1838.   rm -rf conftest*
  1839.   ac_cv_type_signal=int
  1840. fi
  1841. rm -f conftest*
  1842. fi
  1843.  
  1844. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1845. cat >> confdefs.h <<EOF
  1846. #define RETSIGTYPE $ac_cv_type_signal
  1847. EOF
  1848.  
  1849.  
  1850. cat >> confdefs.h <<\EOF
  1851. #define SIGT RETSIGTYPE
  1852. EOF
  1853.  
  1854. if test $ac_cv_type_signal = void; then
  1855.     cat >> confdefs.h <<\EOF
  1856. #define SIGRET /*do nothing*/
  1857. EOF
  1858.  
  1859. else
  1860.     cat >> confdefs.h <<\EOF
  1861. #define SIGRET return 0
  1862. EOF
  1863.  
  1864. fi
  1865.  
  1866. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1867. echo "configure:1868: checking for size_t" >&5
  1868. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1869.   echo $ac_n "(cached) $ac_c" 1>&6
  1870. else
  1871.   cat > conftest.$ac_ext <<EOF
  1872. #line 1873 "configure"
  1873. #include "confdefs.h"
  1874. #include <sys/types.h>
  1875. #if STDC_HEADERS
  1876. #include <stdlib.h>
  1877. #include <stddef.h>
  1878. #endif
  1879. EOF
  1880. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1881.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1882.   rm -rf conftest*
  1883.   ac_cv_type_size_t=yes
  1884. else
  1885.   rm -rf conftest*
  1886.   ac_cv_type_size_t=no
  1887. fi
  1888. rm -f conftest*
  1889.  
  1890. fi
  1891. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1892. if test $ac_cv_type_size_t = no; then
  1893.   cat >> confdefs.h <<\EOF
  1894. #define size_t unsigned
  1895. EOF
  1896.  
  1897. fi
  1898.  
  1899. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1900. echo "configure:1901: checking for off_t" >&5
  1901. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1902.   echo $ac_n "(cached) $ac_c" 1>&6
  1903. else
  1904.   cat > conftest.$ac_ext <<EOF
  1905. #line 1906 "configure"
  1906. #include "confdefs.h"
  1907. #include <sys/types.h>
  1908. #if STDC_HEADERS
  1909. #include <stdlib.h>
  1910. #include <stddef.h>
  1911. #endif
  1912. EOF
  1913. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1914.   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1915.   rm -rf conftest*
  1916.   ac_cv_type_off_t=yes
  1917. else
  1918.   rm -rf conftest*
  1919.   ac_cv_type_off_t=no
  1920. fi
  1921. rm -f conftest*
  1922.  
  1923. fi
  1924. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  1925. if test $ac_cv_type_off_t = no; then
  1926.   cat >> confdefs.h <<\EOF
  1927. #define off_t long
  1928. EOF
  1929.  
  1930. fi
  1931.  
  1932. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1933. echo "configure:1934: checking for uid_t in sys/types.h" >&5
  1934. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1935.   echo $ac_n "(cached) $ac_c" 1>&6
  1936. else
  1937.   cat > conftest.$ac_ext <<EOF
  1938. #line 1939 "configure"
  1939. #include "confdefs.h"
  1940. #include <sys/types.h>
  1941. EOF
  1942. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1943.   egrep "uid_t" >/dev/null 2>&1; then
  1944.   rm -rf conftest*
  1945.   ac_cv_type_uid_t=yes
  1946. else
  1947.   rm -rf conftest*
  1948.   ac_cv_type_uid_t=no
  1949. fi
  1950. rm -f conftest*
  1951.  
  1952. fi
  1953.  
  1954. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1955. if test $ac_cv_type_uid_t = no; then
  1956.   cat >> confdefs.h <<\EOF
  1957. #define uid_t int
  1958. EOF
  1959.  
  1960.   cat >> confdefs.h <<\EOF
  1961. #define gid_t int
  1962. EOF
  1963.  
  1964. fi
  1965.  
  1966. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1967. echo "configure:1968: checking for pid_t" >&5
  1968. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1969.   echo $ac_n "(cached) $ac_c" 1>&6
  1970. else
  1971.   cat > conftest.$ac_ext <<EOF
  1972. #line 1973 "configure"
  1973. #include "confdefs.h"
  1974. #include <sys/types.h>
  1975. #if STDC_HEADERS
  1976. #include <stdlib.h>
  1977. #include <stddef.h>
  1978. #endif
  1979. EOF
  1980. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1981.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1982.   rm -rf conftest*
  1983.   ac_cv_type_pid_t=yes
  1984. else
  1985.   rm -rf conftest*
  1986.   ac_cv_type_pid_t=no
  1987. fi
  1988. rm -f conftest*
  1989.  
  1990. fi
  1991. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1992. if test $ac_cv_type_pid_t = no; then
  1993.   cat >> confdefs.h <<\EOF
  1994. #define pid_t int
  1995. EOF
  1996.  
  1997. fi
  1998.  
  1999. echo $ac_n "checking for time_t""... $ac_c" 1>&6
  2000. echo "configure:2001: checking for time_t" >&5
  2001. if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
  2002.   echo $ac_n "(cached) $ac_c" 1>&6
  2003. else
  2004.   cat > conftest.$ac_ext <<EOF
  2005. #line 2006 "configure"
  2006. #include "confdefs.h"
  2007. #include <sys/types.h>
  2008. #if STDC_HEADERS
  2009. #include <stdlib.h>
  2010. #include <stddef.h>
  2011. #endif
  2012. EOF
  2013. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2014.   egrep "time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2015.   rm -rf conftest*
  2016.   ac_cv_type_time_t=yes
  2017. else
  2018.   rm -rf conftest*
  2019.   ac_cv_type_time_t=no
  2020. fi
  2021. rm -f conftest*
  2022.  
  2023. fi
  2024. echo "$ac_t""$ac_cv_type_time_t" 1>&6
  2025. if test $ac_cv_type_time_t = no; then
  2026.   cat >> confdefs.h <<\EOF
  2027. #define time_t long
  2028. EOF
  2029.  
  2030. fi
  2031.  
  2032.  
  2033. ###    checks for library functions
  2034. if test "$cross_compiling" = no; then
  2035.     echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
  2036. echo "configure:2037: checking whether setvbuf arguments are reversed" >&5
  2037. if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
  2038.   echo $ac_n "(cached) $ac_c" 1>&6
  2039. else
  2040.   if test "$cross_compiling" = yes; then
  2041.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2042. else
  2043.   cat > conftest.$ac_ext <<EOF
  2044. #line 2045 "configure"
  2045. #include "confdefs.h"
  2046. #include <stdio.h>
  2047. /* If setvbuf has the reversed format, exit 0. */
  2048. main () {
  2049.   /* This call has the arguments reversed.
  2050.      A reversed system may check and see that the address of main
  2051.      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  2052.   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
  2053.     exit(1);
  2054.   putc('\r', stdout);
  2055.   exit(0);            /* Non-reversed systems segv here.  */
  2056. }
  2057. EOF
  2058. if { (eval echo configure:2059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2059. then
  2060.   ac_cv_func_setvbuf_reversed=yes
  2061. else
  2062.   echo "configure: failed program was:" >&5
  2063.   cat conftest.$ac_ext >&5
  2064.   rm -fr conftest*
  2065.   ac_cv_func_setvbuf_reversed=no
  2066. fi
  2067. rm -fr conftest*
  2068. fi
  2069.  
  2070. rm -f core core.* *.core
  2071. fi
  2072.  
  2073. echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
  2074. if test $ac_cv_func_setvbuf_reversed = yes; then
  2075.   cat >> confdefs.h <<\EOF
  2076. #define SETVBUF_REVERSED 1
  2077. EOF
  2078.  
  2079. fi
  2080.  
  2081. fi
  2082.  
  2083. ###    checks for structures
  2084. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  2085. echo "configure:2086: checking whether stat file-mode macros are broken" >&5
  2086. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  2087.   echo $ac_n "(cached) $ac_c" 1>&6
  2088. else
  2089.   cat > conftest.$ac_ext <<EOF
  2090. #line 2091 "configure"
  2091. #include "confdefs.h"
  2092. #include <sys/types.h>
  2093. #include <sys/stat.h>
  2094.  
  2095. #if defined(S_ISBLK) && defined(S_IFDIR)
  2096. # if S_ISBLK (S_IFDIR)
  2097. You lose.
  2098. # endif
  2099. #endif
  2100.  
  2101. #if defined(S_ISBLK) && defined(S_IFCHR)
  2102. # if S_ISBLK (S_IFCHR)
  2103. You lose.
  2104. # endif
  2105. #endif
  2106.  
  2107. #if defined(S_ISLNK) && defined(S_IFREG)
  2108. # if S_ISLNK (S_IFREG)
  2109. You lose.
  2110. # endif
  2111. #endif
  2112.  
  2113. #if defined(S_ISSOCK) && defined(S_IFREG)
  2114. # if S_ISSOCK (S_IFREG)
  2115. You lose.
  2116. # endif
  2117. #endif
  2118.  
  2119. EOF
  2120. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2121.   egrep "You lose" >/dev/null 2>&1; then
  2122.   rm -rf conftest*
  2123.   ac_cv_header_stat_broken=yes
  2124. else
  2125.   rm -rf conftest*
  2126.   ac_cv_header_stat_broken=no
  2127. fi
  2128. rm -f conftest*
  2129.  
  2130. fi
  2131.  
  2132. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  2133. if test $ac_cv_header_stat_broken = yes; then
  2134.   cat >> confdefs.h <<\EOF
  2135. #define STAT_MACROS_BROKEN 1
  2136. EOF
  2137.  
  2138. fi
  2139.  
  2140. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  2141. echo "configure:2142: checking for st_blksize in struct stat" >&5
  2142. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  2143.   echo $ac_n "(cached) $ac_c" 1>&6
  2144. else
  2145.   cat > conftest.$ac_ext <<EOF
  2146. #line 2147 "configure"
  2147. #include "confdefs.h"
  2148. #include <sys/types.h>
  2149. #include <sys/stat.h>
  2150. int main() {
  2151. struct stat s; s.st_blksize;
  2152. ; return 0; }
  2153. EOF
  2154. if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2155.   rm -rf conftest*
  2156.   ac_cv_struct_st_blksize=yes
  2157. else
  2158.   echo "configure: failed program was:" >&5
  2159.   cat conftest.$ac_ext >&5
  2160.   rm -rf conftest*
  2161.   ac_cv_struct_st_blksize=no
  2162. fi
  2163. rm -f conftest*
  2164. fi
  2165.  
  2166. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  2167. if test $ac_cv_struct_st_blksize = yes; then
  2168.   cat >> confdefs.h <<\EOF
  2169. #define HAVE_ST_BLKSIZE 1
  2170. EOF
  2171.  
  2172. fi
  2173.  
  2174. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
  2175. echo "configure:2176: checking for st_blocks in struct stat" >&5
  2176. if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
  2177.   echo $ac_n "(cached) $ac_c" 1>&6
  2178. else
  2179.   cat > conftest.$ac_ext <<EOF
  2180. #line 2181 "configure"
  2181. #include "confdefs.h"
  2182. #include <sys/types.h>
  2183. #include <sys/stat.h>
  2184. int main() {
  2185. struct stat s; s.st_blocks;
  2186. ; return 0; }
  2187. EOF
  2188. if { (eval echo configure:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2189.   rm -rf conftest*
  2190.   ac_cv_struct_st_blocks=yes
  2191. else
  2192.   echo "configure: failed program was:" >&5
  2193.   cat conftest.$ac_ext >&5
  2194.   rm -rf conftest*
  2195.   ac_cv_struct_st_blocks=no
  2196. fi
  2197. rm -f conftest*
  2198. fi
  2199.  
  2200. echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
  2201. if test $ac_cv_struct_st_blocks = yes; then
  2202.   cat >> confdefs.h <<\EOF
  2203. #define HAVE_ST_BLOCKS 1
  2204. EOF
  2205.  
  2206. else
  2207.   LIBOBJS="$LIBOBJS fileblocks.o"
  2208. fi
  2209.  
  2210. echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
  2211. echo "configure:2212: checking for st_rdev in struct stat" >&5
  2212. if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
  2213.   echo $ac_n "(cached) $ac_c" 1>&6
  2214. else
  2215.   cat > conftest.$ac_ext <<EOF
  2216. #line 2217 "configure"
  2217. #include "confdefs.h"
  2218. #include <sys/types.h>
  2219. #include <sys/stat.h>
  2220. int main() {
  2221. struct stat s; s.st_rdev;
  2222. ; return 0; }
  2223. EOF
  2224. if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2225.   rm -rf conftest*
  2226.   ac_cv_struct_st_rdev=yes
  2227. else
  2228.   echo "configure: failed program was:" >&5
  2229.   cat conftest.$ac_ext >&5
  2230.   rm -rf conftest*
  2231.   ac_cv_struct_st_rdev=no
  2232. fi
  2233. rm -f conftest*
  2234. fi
  2235.  
  2236. echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
  2237. if test $ac_cv_struct_st_rdev = yes; then
  2238.   cat >> confdefs.h <<\EOF
  2239. #define HAVE_ST_RDEV 1
  2240. EOF
  2241.  
  2242. fi
  2243.  
  2244. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2245. echo "configure:2246: checking whether time.h and sys/time.h may both be included" >&5
  2246. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2247.   echo $ac_n "(cached) $ac_c" 1>&6
  2248. else
  2249.   cat > conftest.$ac_ext <<EOF
  2250. #line 2251 "configure"
  2251. #include "confdefs.h"
  2252. #include <sys/types.h>
  2253. #include <sys/time.h>
  2254. #include <time.h>
  2255. int main() {
  2256. struct tm *tp;
  2257. ; return 0; }
  2258. EOF
  2259. if { (eval echo configure:2260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2260.   rm -rf conftest*
  2261.   ac_cv_header_time=yes
  2262. else
  2263.   echo "configure: failed program was:" >&5
  2264.   cat conftest.$ac_ext >&5
  2265.   rm -rf conftest*
  2266.   ac_cv_header_time=no
  2267. fi
  2268. rm -f conftest*
  2269. fi
  2270.  
  2271. echo "$ac_t""$ac_cv_header_time" 1>&6
  2272. if test $ac_cv_header_time = yes; then
  2273.   cat >> confdefs.h <<\EOF
  2274. #define TIME_WITH_SYS_TIME 1
  2275. EOF
  2276.  
  2277. fi
  2278.  
  2279. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2280. echo "configure:2281: checking whether struct tm is in sys/time.h or time.h" >&5
  2281. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2282.   echo $ac_n "(cached) $ac_c" 1>&6
  2283. else
  2284.   cat > conftest.$ac_ext <<EOF
  2285. #line 2286 "configure"
  2286. #include "confdefs.h"
  2287. #include <sys/types.h>
  2288. #include <time.h>
  2289. int main() {
  2290. struct tm *tp; tp->tm_sec;
  2291. ; return 0; }
  2292. EOF
  2293. if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2294.   rm -rf conftest*
  2295.   ac_cv_struct_tm=time.h
  2296. else
  2297.   echo "configure: failed program was:" >&5
  2298.   cat conftest.$ac_ext >&5
  2299.   rm -rf conftest*
  2300.   ac_cv_struct_tm=sys/time.h
  2301. fi
  2302. rm -f conftest*
  2303. fi
  2304.  
  2305. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2306. if test $ac_cv_struct_tm = sys/time.h; then
  2307.   cat >> confdefs.h <<\EOF
  2308. #define TM_IN_SYS_TIME 1
  2309. EOF
  2310.  
  2311. fi
  2312.  
  2313.  
  2314. echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
  2315. echo "configure:2316: checking declaration of size-change" >&5
  2316. if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
  2317.   echo $ac_n "(cached) $ac_c" 1>&6
  2318. else
  2319.   
  2320.     cf_cv_sizechange=unknown
  2321.     cf_save_CFLAGS="$CFLAGS"
  2322.  
  2323. for cf_opts in "" "NEED_PTEM_H"
  2324. do
  2325.  
  2326.     CFLAGS="$cf_save_CFLAGS"
  2327.     test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
  2328.     cat > conftest.$ac_ext <<EOF
  2329. #line 2330 "configure"
  2330. #include "confdefs.h"
  2331. #include <sys/types.h>
  2332. #if HAVE_TERMIOS_H
  2333. #include <termios.h>
  2334. #else
  2335. #if HAVE_TERMIO_H
  2336. #include <termio.h>
  2337. #endif
  2338. #endif
  2339. #if NEED_PTEM_H
  2340. /* This is a workaround for SCO:  they neglected to define struct winsize in
  2341.  * termios.h -- it's only in termio.h and ptem.h
  2342.  */
  2343. #include        <sys/stream.h>
  2344. #include        <sys/ptem.h>
  2345. #endif
  2346. #if !defined(sun) || !defined(HAVE_TERMIOS_H)
  2347. #include <sys/ioctl.h>
  2348. #endif
  2349.  
  2350. int main() {
  2351.  
  2352. #ifdef TIOCGSIZE
  2353.     struct ttysize win;    /* FIXME: what system is this? */
  2354.     int y = win.ts_lines;
  2355.     int x = win.ts_cols;
  2356. #else
  2357. #ifdef TIOCGWINSZ
  2358.     struct winsize win;
  2359.     int y = win.ws_row;
  2360.     int x = win.ws_col;
  2361. #else
  2362.     no TIOCGSIZE or TIOCGWINSZ
  2363. #endif /* TIOCGWINSZ */
  2364. #endif /* TIOCGSIZE */
  2365.     
  2366. ; return 0; }
  2367. EOF
  2368. if { (eval echo configure:2369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2369.   rm -rf conftest*
  2370.   cf_cv_sizechange=yes
  2371. else
  2372.   echo "configure: failed program was:" >&5
  2373.   cat conftest.$ac_ext >&5
  2374.   rm -rf conftest*
  2375.   cf_cv_sizechange=no
  2376. fi
  2377. rm -f conftest*
  2378.  
  2379.     CFLAGS="$cf_save_CFLAGS"
  2380.     if test "$cf_cv_sizechange" = yes ; then
  2381.         echo "size-change succeeded ($cf_opts)" >&5
  2382.         test -n "$cf_opts" && cat >> confdefs.h <<EOF
  2383. #define $cf_opts 1
  2384. EOF
  2385.  
  2386.         break
  2387.     fi
  2388. done
  2389.     
  2390. fi
  2391.  
  2392. echo "$ac_t""$cf_cv_sizechange" 1>&6
  2393. test $cf_cv_sizechange != no && cat >> confdefs.h <<\EOF
  2394. #define HAVE_SIZECHANGE 1
  2395. EOF
  2396.  
  2397.  
  2398.  
  2399. echo $ac_n "checking for file-pointer ready definition""... $ac_c" 1>&6
  2400. echo "configure:2401: checking for file-pointer ready definition" >&5
  2401. if eval "test \"`echo '$''{'cf_cv_fp_isready'+set}'`\" = set"; then
  2402.   echo $ac_n "(cached) $ac_c" 1>&6
  2403. else
  2404.   
  2405. cf_cv_fp_isready=none
  2406. while true
  2407. do
  2408.     read definition
  2409.     test -z "$definition" && break
  2410.     echo "test-compile $definition" 1>&5
  2411.  
  2412.     cat > conftest.$ac_ext <<EOF
  2413. #line 2414 "configure"
  2414. #include "confdefs.h"
  2415.  
  2416. #include <stdio.h>
  2417. #define isready_c(p) $definition
  2418.  
  2419. int main() {
  2420. int x = isready_c(stdin)
  2421. ; return 0; }
  2422. EOF
  2423. if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2424.   rm -rf conftest*
  2425.   echo "$definition" >conftest.env
  2426.      break
  2427. else
  2428.   echo "configure: failed program was:" >&5
  2429.   cat conftest.$ac_ext >&5
  2430. fi
  2431. rm -f conftest*
  2432.  
  2433. done <<'CF_EOF'
  2434. ( (p)->_IO_read_ptr < (p)->_IO_read_end)
  2435. ( (p)->__cnt > 0)
  2436. ( (p)->__rptr < (p)->__rend)
  2437. ( (p)->_cnt > 0)
  2438. ( (p)->_gptr < (p)->_egptr)
  2439. ( (p)->_r > 0)
  2440. ( (p)->_rcount > 0)
  2441. ( (p)->endr < (p)->endb)
  2442. CF_EOF
  2443.  
  2444. test -f conftest.env && cf_cv_fp_isready=`cat conftest.env`
  2445.  
  2446.  
  2447. fi
  2448.  
  2449. echo "$ac_t""$cf_cv_fp_isready" 1>&6
  2450.  
  2451. test "$cf_cv_fp_isready" != none && cat >> confdefs.h <<EOF
  2452. #define isready_c(p) $cf_cv_fp_isready
  2453. EOF
  2454.  
  2455.  
  2456.  
  2457.  
  2458. ###    checks for compiler characteristics
  2459. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2460. echo "configure:2461: checking for working const" >&5
  2461. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2462.   echo $ac_n "(cached) $ac_c" 1>&6
  2463. else
  2464.   cat > conftest.$ac_ext <<EOF
  2465. #line 2466 "configure"
  2466. #include "confdefs.h"
  2467.  
  2468. int main() {
  2469.  
  2470. /* Ultrix mips cc rejects this.  */
  2471. typedef int charset[2]; const charset x;
  2472. /* SunOS 4.1.1 cc rejects this.  */
  2473. char const *const *ccp;
  2474. char **p;
  2475. /* NEC SVR4.0.2 mips cc rejects this.  */
  2476. struct point {int x, y;};
  2477. static struct point const zero = {0,0};
  2478. /* AIX XL C 1.02.0.0 rejects this.
  2479.    It does not let you subtract one const X* pointer from another in an arm
  2480.    of an if-expression whose if-part is not a constant expression */
  2481. const char *g = "string";
  2482. ccp = &g + (g ? g-g : 0);
  2483. /* HPUX 7.0 cc rejects these. */
  2484. ++ccp;
  2485. p = (char**) ccp;
  2486. ccp = (char const *const *) p;
  2487. { /* SCO 3.2v4 cc rejects this.  */
  2488.   char *t;
  2489.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2490.  
  2491.   *t++ = 0;
  2492. }
  2493. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2494.   int x[] = {25, 17};
  2495.   const int *foo = &x[0];
  2496.   ++foo;
  2497. }
  2498. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2499.   typedef const int *iptr;
  2500.   iptr p = 0;
  2501.   ++p;
  2502. }
  2503. { /* AIX XL C 1.02.0.0 rejects this saying
  2504.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2505.   struct s { int j; const int *ap[3]; };
  2506.   struct s *b; b->j = 5;
  2507. }
  2508. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2509.   const int foo = 10;
  2510. }
  2511.  
  2512. ; return 0; }
  2513. EOF
  2514. if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2515.   rm -rf conftest*
  2516.   ac_cv_c_const=yes
  2517. else
  2518.   echo "configure: failed program was:" >&5
  2519.   cat conftest.$ac_ext >&5
  2520.   rm -rf conftest*
  2521.   ac_cv_c_const=no
  2522. fi
  2523. rm -f conftest*
  2524. fi
  2525.  
  2526. echo "$ac_t""$ac_cv_c_const" 1>&6
  2527. if test $ac_cv_c_const = no; then
  2528.   cat >> confdefs.h <<\EOF
  2529. #define const 
  2530. EOF
  2531.  
  2532. fi
  2533.  
  2534.  
  2535. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  2536. echo "configure:2537: checking for ${CC-cc} option to accept ANSI C" >&5
  2537. if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
  2538.   echo $ac_n "(cached) $ac_c" 1>&6
  2539. else
  2540.   
  2541. cf_cv_ansi_cc=no
  2542. cf_save_CFLAGS="$CFLAGS"
  2543. # Don't try gcc -ansi; that turns off useful extensions and
  2544. # breaks some systems' header files.
  2545. # AIX            -qlanglvl=ansi
  2546. # Ultrix and OSF/1    -std1
  2547. # HP-UX            -Aa -D_HPUX_SOURCE
  2548. # SVR4            -Xc
  2549. # UnixWare 1.2        (cannot use -Xc, since ANSI/POSIX clashes)
  2550. for cf_arg in "-DCC_HAS_PROTOS" \
  2551.     "" \
  2552.     -qlanglvl=ansi \
  2553.     -std1 \
  2554.     "-Aa -D_HPUX_SOURCE +e" \
  2555.     "-Aa -D_HPUX_SOURCE" \
  2556.     -Xc
  2557. do
  2558.     CFLAGS="$cf_save_CFLAGS $cf_arg"
  2559.     cat > conftest.$ac_ext <<EOF
  2560. #line 2561 "configure"
  2561. #include "confdefs.h"
  2562.  
  2563. #ifndef CC_HAS_PROTOS
  2564. #if !defined(__STDC__) || __STDC__ != 1
  2565. choke me
  2566. #endif
  2567. #endif
  2568.  
  2569. int main() {
  2570.  
  2571.     int test (int i, double x);
  2572.     struct s1 {int (*f) (int a);};
  2573.     struct s2 {int (*f) (double a);};
  2574. ; return 0; }
  2575. EOF
  2576. if { (eval echo configure:2577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2577.   rm -rf conftest*
  2578.   cf_cv_ansi_cc="$cf_arg"; break
  2579. else
  2580.   echo "configure: failed program was:" >&5
  2581.   cat conftest.$ac_ext >&5
  2582. fi
  2583. rm -f conftest*
  2584. done
  2585. CFLAGS="$cf_save_CFLAGS"
  2586.  
  2587. fi
  2588.  
  2589. echo "$ac_t""$cf_cv_ansi_cc" 1>&6
  2590.  
  2591. if test "$cf_cv_ansi_cc" != "no"; then
  2592. if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
  2593.     CFLAGS="$CFLAGS $cf_cv_ansi_cc"
  2594. else
  2595.     cat >> confdefs.h <<\EOF
  2596. #define CC_HAS_PROTOS 1
  2597. EOF
  2598.  
  2599. fi
  2600. fi
  2601.  
  2602.  
  2603. if test "$cf_cv_ansi_cc" = "no"; then
  2604.     { echo "configure: error: Your compiler does not appear to recognize prototypes.
  2605. You have the following choices:
  2606.     a. adjust your compiler options
  2607.     b. get an up-to-date compiler
  2608.     c. use a wrapper such as unproto" 1>&2; exit 1; }
  2609. fi
  2610.  
  2611.  
  2612. echo $ac_n "checking if we can initialize unions""... $ac_c" 1>&6
  2613. echo "configure:2614: checking if we can initialize unions" >&5
  2614. if eval "test \"`echo '$''{'cf_cv_init_unions'+set}'`\" = set"; then
  2615.   echo $ac_n "(cached) $ac_c" 1>&6
  2616. else
  2617.   
  2618.     cat > conftest.$ac_ext <<EOF
  2619. #line 2620 "configure"
  2620. #include "confdefs.h"
  2621.  
  2622. int main() {
  2623. static struct foo {int x; union {double a; int b; } bar; } c = {0,{1.0}}
  2624. ; return 0; }
  2625. EOF
  2626. if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2627.   rm -rf conftest*
  2628.   cf_cv_init_unions=yes
  2629. else
  2630.   echo "configure: failed program was:" >&5
  2631.   cat conftest.$ac_ext >&5
  2632.   rm -rf conftest*
  2633.   cf_cv_init_unions=no
  2634. fi
  2635. rm -f conftest*
  2636.     
  2637. fi
  2638.  
  2639. echo "$ac_t""$cf_cv_init_unions" 1>&6
  2640. test $cf_cv_init_unions = no && cat >> confdefs.h <<\EOF
  2641. #define CC_CANNOT_INIT_UNIONS 1
  2642. EOF
  2643.  
  2644.  
  2645.  
  2646. echo $ac_n "checking if switch cases work with structure offsets""... $ac_c" 1>&6
  2647. echo "configure:2648: checking if switch cases work with structure offsets" >&5
  2648. if eval "test \"`echo '$''{'cf_cv_case_offsetof'+set}'`\" = set"; then
  2649.   echo $ac_n "(cached) $ac_c" 1>&6
  2650. else
  2651.   
  2652.     cat > conftest.$ac_ext <<EOF
  2653. #line 2654 "configure"
  2654. #include "confdefs.h"
  2655.  
  2656. int main() {
  2657. struct foo {int a,b;};
  2658.      extern getpid();
  2659.      switch(getpid()){case ((int) &(((struct foo *)0)->b)) : printf("foo"); } 
  2660. ; return 0; }
  2661. EOF
  2662. if { (eval echo configure:2663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2663.   rm -rf conftest*
  2664.   cf_cv_case_offsetof=yes
  2665. else
  2666.   echo "configure: failed program was:" >&5
  2667.   cat conftest.$ac_ext >&5
  2668.   rm -rf conftest*
  2669.   cf_cv_case_offsetof=no
  2670. fi
  2671. rm -f conftest*
  2672.     
  2673. fi
  2674.  
  2675. echo "$ac_t""$cf_cv_case_offsetof" 1>&6
  2676. test $cf_cv_case_offsetof = no && cat >> confdefs.h <<\EOF
  2677. #define CC_CANNOT_OFFSET_CASES 1
  2678. EOF
  2679.  
  2680.  
  2681.  
  2682. ###    checks for system services and user specified options
  2683. echo $ac_n "checking for long file names""... $ac_c" 1>&6
  2684. echo "configure:2685: checking for long file names" >&5
  2685. if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
  2686.   echo $ac_n "(cached) $ac_c" 1>&6
  2687. else
  2688.   ac_cv_sys_long_file_names=yes
  2689. # Test for long file names in all the places we know might matter:
  2690. #      .        the current directory, where building will happen
  2691. #      $prefix/lib    where we will be installing things
  2692. #      $exec_prefix/lib    likewise
  2693. # eval it to expand exec_prefix.
  2694. #      $TMPDIR        if set, where it might want to write temporary files
  2695. # if $TMPDIR is not set:
  2696. #      /tmp        where it might want to write temporary files
  2697. #      /var/tmp        likewise
  2698. #      /usr/tmp        likewise
  2699. if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
  2700.   ac_tmpdirs="$TMPDIR"
  2701. else
  2702.   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
  2703. fi
  2704. for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
  2705.   test -d $ac_dir || continue
  2706.   test -w $ac_dir || continue # It is less confusing to not echo anything here.
  2707.   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  2708.   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  2709.   val=`cat $ac_dir/conftest9012345 2>/dev/null`
  2710.   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
  2711.     ac_cv_sys_long_file_names=no
  2712.     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
  2713.     break
  2714.   fi
  2715.   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
  2716. done
  2717. fi
  2718.  
  2719. echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
  2720. if test $ac_cv_sys_long_file_names = yes; then
  2721.   cat >> confdefs.h <<\EOF
  2722. #define HAVE_LONG_FILE_NAMES 1
  2723. EOF
  2724.  
  2725. fi
  2726.  
  2727.  
  2728. echo $ac_n "checking for restartable reads on pipes""... $ac_c" 1>&6
  2729. echo "configure:2730: checking for restartable reads on pipes" >&5
  2730. if eval "test \"`echo '$''{'cf_cv_can_restart_read'+set}'`\" = set"; then
  2731.   echo $ac_n "(cached) $ac_c" 1>&6
  2732. else
  2733.   
  2734. if test "$cross_compiling" = yes; then
  2735.   cf_cv_can_restart_read=unknown
  2736. else
  2737.   cat > conftest.$ac_ext <<EOF
  2738. #line 2739 "configure"
  2739. #include "confdefs.h"
  2740. /* Exit 0 (true) if wait returns something other than -1,
  2741.    i.e. the pid of the child, which means that wait was restarted
  2742.    after getting the signal.  */
  2743. #include <sys/types.h>
  2744. #include <signal.h>
  2745. #ifdef SA_RESTART
  2746. sigwrapper(sig, disp)
  2747. int sig;
  2748. void (*disp)();
  2749. {
  2750.     struct sigaction act, oact;
  2751.  
  2752.     act.sa_handler = disp;
  2753.     sigemptyset(&act.sa_mask);
  2754.     act.sa_flags = SA_RESTART;
  2755.  
  2756.     (void)sigaction(sig, &act, &oact);
  2757.  
  2758. }
  2759. #else
  2760. # define sigwrapper signal
  2761. #endif
  2762. ucatch (isig) { }
  2763. main () {
  2764.   int i, status;
  2765.   int fd[2];
  2766.   char buff[2];
  2767.   pipe(fd);
  2768.   i = fork();
  2769.   if (i == 0) {
  2770.       sleep (2);
  2771.       kill (getppid (), SIGINT);
  2772.       sleep (2);
  2773.       write(fd[1],"done",4);
  2774.       close(fd[1]);
  2775.       exit (0);
  2776.   }
  2777.   sigwrapper (SIGINT, ucatch);
  2778.   status = read(fd[0], buff, sizeof(buff));
  2779.   wait (&i);
  2780.   exit (status == -1);
  2781. }
  2782.  
  2783. EOF
  2784. if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2785. then
  2786.   cf_cv_can_restart_read=yes
  2787. else
  2788.   echo "configure: failed program was:" >&5
  2789.   cat conftest.$ac_ext >&5
  2790.   rm -fr conftest*
  2791.   cf_cv_can_restart_read=no
  2792. fi
  2793. rm -fr conftest*
  2794. fi
  2795.  
  2796. fi
  2797.  
  2798. echo "$ac_t""$cf_cv_can_restart_read" 1>&6
  2799. test $cf_cv_can_restart_read = yes && cat >> confdefs.h <<\EOF
  2800. #define HAVE_RESTARTABLE_PIPEREAD 1
  2801. EOF
  2802.  
  2803.         # is a read() of a pipe restartable?
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2814. echo "configure:2815: checking whether setpgrp takes no argument" >&5
  2815. if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
  2816.   echo $ac_n "(cached) $ac_c" 1>&6
  2817. else
  2818.   if test "$cross_compiling" = yes; then
  2819.   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2820. else
  2821.   cat > conftest.$ac_ext <<EOF
  2822. #line 2823 "configure"
  2823. #include "confdefs.h"
  2824.  
  2825. /*
  2826.  * If this system has a BSD-style setpgrp, which takes arguments, exit
  2827.  * successfully.
  2828.  */
  2829. main()
  2830. {
  2831.     if (setpgrp(1,1) == -1)
  2832.     exit(0);
  2833.     else
  2834.     exit(1);
  2835. }
  2836.  
  2837. EOF
  2838. if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2839. then
  2840.   ac_cv_func_setpgrp_void=no
  2841. else
  2842.   echo "configure: failed program was:" >&5
  2843.   cat conftest.$ac_ext >&5
  2844.   rm -fr conftest*
  2845.   ac_cv_func_setpgrp_void=yes
  2846. fi
  2847. rm -fr conftest*
  2848. fi
  2849.  
  2850.  
  2851. fi
  2852.  
  2853. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  2854. if test $ac_cv_func_setpgrp_void = yes; then
  2855.   cat >> confdefs.h <<\EOF
  2856. #define SETPGRP_VOID 1
  2857. EOF
  2858.  
  2859. fi
  2860.  
  2861. echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  2862. echo "configure:2863: checking whether getpgrp takes no argument" >&5
  2863. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  2864.   echo $ac_n "(cached) $ac_c" 1>&6
  2865. else
  2866.   if test "$cross_compiling" = yes; then
  2867.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  2868. else
  2869.   cat > conftest.$ac_ext <<EOF
  2870. #line 2871 "configure"
  2871. #include "confdefs.h"
  2872.  
  2873. /*
  2874.  * If this system has a BSD-style getpgrp(),
  2875.  * which takes a pid argument, exit unsuccessfully.
  2876.  *
  2877.  * Snarfed from Chet Ramey's bash pgrp.c test program
  2878.  */
  2879. #include <stdio.h>
  2880. #include <sys/types.h>
  2881.  
  2882. int     pid;
  2883. int     pg1, pg2, pg3, pg4;
  2884. int     ng, np, s, child;
  2885.  
  2886. main()
  2887. {
  2888.         pid = getpid();
  2889.         pg1 = getpgrp(0);
  2890.         pg2 = getpgrp();
  2891.         pg3 = getpgrp(pid);
  2892.         pg4 = getpgrp(1);
  2893.  
  2894.         /*
  2895.          * If all of these values are the same, it's pretty sure that
  2896.          * we're on a system that ignores getpgrp's first argument.
  2897.          */
  2898.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  2899.                 exit(0);
  2900.  
  2901.         child = fork();
  2902.         if (child < 0)
  2903.                 exit(1);
  2904.         else if (child == 0) {
  2905.                 np = getpid();
  2906.                 /*
  2907.                  * If this is Sys V, this will not work; pgrp will be
  2908.                  * set to np because setpgrp just changes a pgrp to be
  2909.                  * the same as the pid.
  2910.                  */
  2911.                 setpgrp(np, pg1);
  2912.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  2913.                 if (ng == pg1) {
  2914.                         exit(1);
  2915.                 } else {
  2916.                         exit(0);
  2917.                 }
  2918.         } else {
  2919.                 wait(&s);
  2920.                 exit(s>>8);
  2921.         }
  2922. }
  2923.  
  2924. EOF
  2925. if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2926. then
  2927.   ac_cv_func_getpgrp_void=yes
  2928. else
  2929.   echo "configure: failed program was:" >&5
  2930.   cat conftest.$ac_ext >&5
  2931.   rm -fr conftest*
  2932.   ac_cv_func_getpgrp_void=no
  2933. fi
  2934. rm -fr conftest*
  2935. fi
  2936.  
  2937.  
  2938. fi
  2939.  
  2940. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  2941. if test $ac_cv_func_getpgrp_void = yes; then
  2942.   cat >> confdefs.h <<\EOF
  2943. #define GETPGRP_VOID 1
  2944. EOF
  2945.  
  2946. fi
  2947.  
  2948.  
  2949. echo $ac_n "checking if killpg is needed""... $ac_c" 1>&6
  2950. echo "configure:2951: checking if killpg is needed" >&5
  2951. if eval "test \"`echo '$''{'cf_cv_need_killpg'+set}'`\" = set"; then
  2952.   echo $ac_n "(cached) $ac_c" 1>&6
  2953. else
  2954.   
  2955. if test "$cross_compiling" = yes; then
  2956.   cf_cv_need_killpg=unknown
  2957.  
  2958. else
  2959.   cat > conftest.$ac_ext <<EOF
  2960. #line 2961 "configure"
  2961. #include "confdefs.h"
  2962.  
  2963. #include <sys/types.h>
  2964. #include <signal.h>
  2965. RETSIGTYPE
  2966. handler(s)
  2967.     int s;
  2968. {
  2969.     exit(0);
  2970. }
  2971.  
  2972. main()
  2973. {
  2974. #ifdef SETPGRP_VOID
  2975.     (void) setpgrp();
  2976. #else
  2977.     (void) setpgrp(0,0);
  2978. #endif
  2979.     (void) signal(SIGINT, handler);
  2980.     (void) kill(-getpid(), SIGINT);
  2981.     exit(1);
  2982. }
  2983. EOF
  2984. if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2985. then
  2986.   cf_cv_need_killpg=no
  2987. else
  2988.   echo "configure: failed program was:" >&5
  2989.   cat conftest.$ac_ext >&5
  2990.   rm -fr conftest*
  2991.   cf_cv_need_killpg=yes
  2992. fi
  2993. rm -fr conftest*
  2994. fi
  2995.  
  2996. fi
  2997.  
  2998. echo "$ac_t""$cf_cv_need_killpg" 1>&6
  2999. test $cf_cv_need_killpg = yes && cat >> confdefs.h <<\EOF
  3000. #define HAVE_KILLPG 1
  3001. EOF
  3002.  
  3003.  
  3004.  
  3005.  
  3006. echo $ac_n "checking declaration of errno""... $ac_c" 1>&6
  3007. echo "configure:3008: checking declaration of errno" >&5
  3008. if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
  3009.   echo $ac_n "(cached) $ac_c" 1>&6
  3010. else
  3011.   
  3012.     cat > conftest.$ac_ext <<EOF
  3013. #line 3014 "configure"
  3014. #include "confdefs.h"
  3015.  
  3016. #if HAVE_STDLIB_H
  3017. #include <stdlib.h>
  3018. #endif
  3019. #include <stdio.h>
  3020. #include <sys/types.h>
  3021. #include <errno.h> 
  3022. int main() {
  3023. long x = (long) errno
  3024. ; return 0; }
  3025. EOF
  3026. if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3027.   rm -rf conftest*
  3028.   eval 'cf_cv_dcl_'errno'=yes'
  3029. else
  3030.   echo "configure: failed program was:" >&5
  3031.   cat conftest.$ac_ext >&5
  3032.   rm -rf conftest*
  3033.   eval 'cf_cv_dcl_'errno'=no'
  3034. fi
  3035. rm -f conftest*
  3036. fi
  3037.  
  3038. eval 'cf_result=$cf_cv_dcl_'errno
  3039. echo "$ac_t""$cf_result" 1>&6
  3040.  
  3041. # It's possible (for near-UNIX clones) that the data doesn't exist
  3042. if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
  3043.   echo $ac_n "(cached) $ac_c" 1>&6
  3044. else
  3045.   
  3046. if test $cf_result = no ; then
  3047.     eval 'cf_result=DECL_'errno
  3048.     
  3049. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  3050.  
  3051.     cat >> confdefs.h <<EOF
  3052. #define $cf_result 1
  3053. EOF
  3054.  
  3055.     echo $ac_n "checking existence of errno""... $ac_c" 1>&6
  3056. echo "configure:3057: checking existence of errno" >&5
  3057.         cat > conftest.$ac_ext <<EOF
  3058. #line 3059 "configure"
  3059. #include "confdefs.h"
  3060.  
  3061. #undef errno
  3062. extern long errno;
  3063.  
  3064. int main() {
  3065. errno = 2
  3066. ; return 0; }
  3067. EOF
  3068. if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3069.   rm -rf conftest*
  3070.   eval 'cf_cv_have_'errno'=yes'
  3071. else
  3072.   echo "configure: failed program was:" >&5
  3073.   cat conftest.$ac_ext >&5
  3074.   rm -rf conftest*
  3075.   eval 'cf_cv_have_'errno'=no'
  3076. fi
  3077. rm -f conftest*
  3078.         eval 'cf_result=$cf_cv_have_'errno
  3079.         echo "$ac_t""$cf_result" 1>&6
  3080. else
  3081.     eval 'cf_cv_have_'errno'=yes'
  3082. fi
  3083.  
  3084. fi
  3085.  
  3086. eval 'cf_result=HAVE_'errno
  3087.  
  3088. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  3089.  
  3090. eval 'test $cf_cv_have_'errno' = yes && cat >> confdefs.h <<EOF
  3091. #define $cf_result 1
  3092. EOF
  3093. '
  3094.  
  3095.  
  3096.  
  3097. for cf_name in sys_nerr sys_errlist
  3098. do
  3099.     
  3100. echo $ac_n "checking declaration of $cf_name""... $ac_c" 1>&6
  3101. echo "configure:3102: checking declaration of $cf_name" >&5
  3102. if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
  3103.   echo $ac_n "(cached) $ac_c" 1>&6
  3104. else
  3105.   
  3106.     cat > conftest.$ac_ext <<EOF
  3107. #line 3108 "configure"
  3108. #include "confdefs.h"
  3109.  
  3110. #if HAVE_STDLIB_H
  3111. #include <stdlib.h>
  3112. #endif
  3113. #include <stdio.h>
  3114. #include <sys/types.h>
  3115. #include <errno.h> 
  3116. int main() {
  3117. long x = (long) $cf_name
  3118. ; return 0; }
  3119. EOF
  3120. if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3121.   rm -rf conftest*
  3122.   eval 'cf_cv_dcl_'$cf_name'=yes'
  3123. else
  3124.   echo "configure: failed program was:" >&5
  3125.   cat conftest.$ac_ext >&5
  3126.   rm -rf conftest*
  3127.   eval 'cf_cv_dcl_'$cf_name'=no'
  3128. fi
  3129. rm -f conftest*
  3130. fi
  3131.  
  3132. eval 'cf_result=$cf_cv_dcl_'$cf_name
  3133. echo "$ac_t""$cf_result" 1>&6
  3134.  
  3135. # It's possible (for near-UNIX clones) that the data doesn't exist
  3136. if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
  3137.   echo $ac_n "(cached) $ac_c" 1>&6
  3138. else
  3139.   
  3140. if test $cf_result = no ; then
  3141.     eval 'cf_result=DECL_'$cf_name
  3142.     
  3143. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  3144.  
  3145.     cat >> confdefs.h <<EOF
  3146. #define $cf_result 1
  3147. EOF
  3148.  
  3149.     echo $ac_n "checking existence of $cf_name""... $ac_c" 1>&6
  3150. echo "configure:3151: checking existence of $cf_name" >&5
  3151.         cat > conftest.$ac_ext <<EOF
  3152. #line 3153 "configure"
  3153. #include "confdefs.h"
  3154.  
  3155. #undef $cf_name
  3156. extern long $cf_name;
  3157.  
  3158. int main() {
  3159. $cf_name = 2
  3160. ; return 0; }
  3161. EOF
  3162. if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3163.   rm -rf conftest*
  3164.   eval 'cf_cv_have_'$cf_name'=yes'
  3165. else
  3166.   echo "configure: failed program was:" >&5
  3167.   cat conftest.$ac_ext >&5
  3168.   rm -rf conftest*
  3169.   eval 'cf_cv_have_'$cf_name'=no'
  3170. fi
  3171. rm -f conftest*
  3172.         eval 'cf_result=$cf_cv_have_'$cf_name
  3173.         echo "$ac_t""$cf_result" 1>&6
  3174. else
  3175.     eval 'cf_cv_have_'$cf_name'=yes'
  3176. fi
  3177.  
  3178. fi
  3179.  
  3180. eval 'cf_result=HAVE_'$cf_name
  3181.  
  3182. cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
  3183.  
  3184. eval 'test $cf_cv_have_'$cf_name' = yes && cat >> confdefs.h <<EOF
  3185. #define $cf_result 1
  3186. EOF
  3187. '
  3188.  
  3189. done
  3190.  
  3191. cat >> confdefs.h <<\EOF
  3192. #define SYS_UNIX 1
  3193. EOF
  3194.  
  3195. cat >> confdefs.h <<\EOF
  3196. #define scrn_chosen 1
  3197. EOF
  3198.  
  3199. # Try to eventually eliminate the following
  3200. cat >> confdefs.h <<\EOF
  3201. #define os_chosen 1
  3202. EOF
  3203.  
  3204.  
  3205. echo $ac_n "checking for screen type""... $ac_c" 1>&6
  3206. echo "configure:3207: checking for screen type" >&5
  3207.  
  3208. # Check whether --with-screen or --without-screen was given.
  3209. if test "${with_screen+set}" = set; then
  3210.   withval="$with_screen"
  3211.   screen=$withval
  3212. fi
  3213.  
  3214.  
  3215. if test -z "$screen"; then
  3216.     
  3217. # Check whether --with-scr or --without-scr was given.
  3218. if test "${with_scr+set}" = set; then
  3219.   withval="$with_scr"
  3220.   screen=$withval
  3221. fi
  3222.  
  3223. fi
  3224. test -z "$screen" && test "$with_x" = yes && screen=x11
  3225.  
  3226. if test -z "$screen"; then
  3227.     screen=termcap;
  3228. fi
  3229. echo "$ac_t""$screen" 1>&6
  3230.  
  3231. : See if this is any type of xvile configuration:
  3232. case "$screen" in
  3233.     [Oo]pen[Ll]ook | [Mm]otif* | [xX] | [Aa]thena | [xX][atTmMoO]* | [xX]11 | neXtaw )
  3234.         # If we find X, set shell vars x_includes and x_libraries to the
  3235. # paths, otherwise set no_x=yes.
  3236. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3237. # --without-x overrides everything else, but does not touch the cache.
  3238. echo $ac_n "checking for X""... $ac_c" 1>&6
  3239. echo "configure:3240: checking for X" >&5
  3240.  
  3241.  
  3242. # Check whether --with-x or --without-x was given.
  3243. if test "${with_x+set}" = set; then
  3244.   withval="$with_x"
  3245.   :
  3246. fi
  3247.  
  3248. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3249. if test "x$with_x" = xno; then
  3250.   # The user explicitly disabled X.
  3251.   have_x=disabled
  3252. else
  3253.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3254.     # Both variables are already set.
  3255.     have_x=yes
  3256.   else
  3257. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  3258.   echo $ac_n "(cached) $ac_c" 1>&6
  3259. else
  3260.   # One or both of the vars are not set, and there is no cached value.
  3261. ac_x_includes=NO ac_x_libraries=NO
  3262. rm -fr conftestdir
  3263. if mkdir conftestdir; then
  3264.   cd conftestdir
  3265.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3266.   cat > Imakefile <<'EOF'
  3267. acfindx:
  3268.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3269. EOF
  3270.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3271.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3272.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3273.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3274.     for ac_extension in a so sl; do
  3275.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3276.         test -f $ac_im_libdir/libX11.$ac_extension; then
  3277.         ac_im_usrlibdir=$ac_im_libdir; break
  3278.       fi
  3279.     done
  3280.     # Screen out bogus values from the imake configuration.  They are
  3281.     # bogus both because they are the default anyway, and because
  3282.     # using them would break gcc on systems where it needs fixed includes.
  3283.     case "$ac_im_incroot" in
  3284.     /usr/include) ;;
  3285.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3286.     esac
  3287.     case "$ac_im_usrlibdir" in
  3288.     /usr/lib | /lib) ;;
  3289.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3290.     esac
  3291.   fi
  3292.   cd ..
  3293.   rm -fr conftestdir
  3294. fi
  3295.  
  3296. if test "$ac_x_includes" = NO; then
  3297.   # Guess where to find include files, by looking for this one X11 .h file.
  3298.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3299.  
  3300.   # First, try using that file with no special directory specified.
  3301. cat > conftest.$ac_ext <<EOF
  3302. #line 3303 "configure"
  3303. #include "confdefs.h"
  3304. #include <$x_direct_test_include>
  3305. EOF
  3306. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3307. { (eval echo configure:3308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3308. ac_err=`grep -v '^ *+' conftest.out`
  3309. if test -z "$ac_err"; then
  3310.   rm -rf conftest*
  3311.   # We can compile using X headers with no special include directory.
  3312. ac_x_includes=
  3313. else
  3314.   echo "$ac_err" >&5
  3315.   echo "configure: failed program was:" >&5
  3316.   cat conftest.$ac_ext >&5
  3317.   rm -rf conftest*
  3318.   # Look for the header file in a standard set of common directories.
  3319. # Check X11 before X11Rn because it is often a symlink to the current release.
  3320.   for ac_dir in               \
  3321.     /usr/X11/include          \
  3322.     /usr/X11R6/include        \
  3323.     /usr/X11R5/include        \
  3324.     /usr/X11R4/include        \
  3325.                               \
  3326.     /usr/include/X11          \
  3327.     /usr/include/X11R6        \
  3328.     /usr/include/X11R5        \
  3329.     /usr/include/X11R4        \
  3330.                               \
  3331.     /usr/local/X11/include    \
  3332.     /usr/local/X11R6/include  \
  3333.     /usr/local/X11R5/include  \
  3334.     /usr/local/X11R4/include  \
  3335.                               \
  3336.     /usr/local/include/X11    \
  3337.     /usr/local/include/X11R6  \
  3338.     /usr/local/include/X11R5  \
  3339.     /usr/local/include/X11R4  \
  3340.                               \
  3341.     /usr/X386/include         \
  3342.     /usr/x386/include         \
  3343.     /usr/XFree86/include/X11  \
  3344.                               \
  3345.     /usr/include              \
  3346.     /usr/local/include        \
  3347.     /usr/unsupported/include  \
  3348.     /usr/athena/include       \
  3349.     /usr/local/x11r5/include  \
  3350.     /usr/lpp/Xamples/include  \
  3351.                               \
  3352.     /usr/openwin/include      \
  3353.     /usr/openwin/share/include \
  3354.     ; \
  3355.   do
  3356.     if test -r "$ac_dir/$x_direct_test_include"; then
  3357.       ac_x_includes=$ac_dir
  3358.       break
  3359.     fi
  3360.   done
  3361. fi
  3362. rm -f conftest*
  3363. fi # $ac_x_includes = NO
  3364.  
  3365. if test "$ac_x_libraries" = NO; then
  3366.   # Check for the libraries.
  3367.  
  3368.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3369.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3370.  
  3371.   # See if we find them without any special options.
  3372.   # Don't add to $LIBS permanently.
  3373.   ac_save_LIBS="$LIBS"
  3374.   LIBS="-l$x_direct_test_library $LIBS"
  3375. cat > conftest.$ac_ext <<EOF
  3376. #line 3377 "configure"
  3377. #include "confdefs.h"
  3378.  
  3379. int main() {
  3380. ${x_direct_test_function}()
  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.   LIBS="$ac_save_LIBS"
  3386. # We can link X programs with no special library path.
  3387. ac_x_libraries=
  3388. else
  3389.   echo "configure: failed program was:" >&5
  3390.   cat conftest.$ac_ext >&5
  3391.   rm -rf conftest*
  3392.   LIBS="$ac_save_LIBS"
  3393. # First see if replacing the include by lib works.
  3394. # Check X11 before X11Rn because it is often a symlink to the current release.
  3395. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3396.     /usr/X11/lib          \
  3397.     /usr/X11R6/lib        \
  3398.     /usr/X11R5/lib        \
  3399.     /usr/X11R4/lib        \
  3400.                           \
  3401.     /usr/lib/X11          \
  3402.     /usr/lib/X11R6        \
  3403.     /usr/lib/X11R5        \
  3404.     /usr/lib/X11R4        \
  3405.                           \
  3406.     /usr/local/X11/lib    \
  3407.     /usr/local/X11R6/lib  \
  3408.     /usr/local/X11R5/lib  \
  3409.     /usr/local/X11R4/lib  \
  3410.                           \
  3411.     /usr/local/lib/X11    \
  3412.     /usr/local/lib/X11R6  \
  3413.     /usr/local/lib/X11R5  \
  3414.     /usr/local/lib/X11R4  \
  3415.                           \
  3416.     /usr/X386/lib         \
  3417.     /usr/x386/lib         \
  3418.     /usr/XFree86/lib/X11  \
  3419.                           \
  3420.     /usr/lib              \
  3421.     /usr/local/lib        \
  3422.     /usr/unsupported/lib  \
  3423.     /usr/athena/lib       \
  3424.     /usr/local/x11r5/lib  \
  3425.     /usr/lpp/Xamples/lib  \
  3426.     /lib/usr/lib/X11      \
  3427.                           \
  3428.     /usr/openwin/lib      \
  3429.     /usr/openwin/share/lib \
  3430.     ; \
  3431. do
  3432.   for ac_extension in a so sl; do
  3433.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3434.       ac_x_libraries=$ac_dir
  3435.       break 2
  3436.     fi
  3437.   done
  3438. done
  3439. fi
  3440. rm -f conftest*
  3441. fi # $ac_x_libraries = NO
  3442.  
  3443. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3444.   # Didn't find X anywhere.  Cache the known absence of X.
  3445.   ac_cv_have_x="have_x=no"
  3446. else
  3447.   # Record where we found X for the cache.
  3448.   ac_cv_have_x="have_x=yes \
  3449.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3450. fi
  3451. fi
  3452.   fi
  3453.   eval "$ac_cv_have_x"
  3454. fi # $with_x != no
  3455.  
  3456. if test "$have_x" != yes; then
  3457.   echo "$ac_t""$have_x" 1>&6
  3458.   no_x=yes
  3459. else
  3460.   # If each of the values was on the command line, it overrides each guess.
  3461.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3462.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3463.   # Update the cache value to reflect the command line values.
  3464.   ac_cv_have_x="have_x=yes \
  3465.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3466.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3467. fi
  3468.  
  3469.  
  3470.  
  3471. # We need to check for -lsocket and -lnsl here in order to work around an
  3472. # autoconf bug.  autoconf-2.12 is not checking for these prior to checking for
  3473. # the X11R6 -lSM and -lICE libraries.  The resultant failures cascade...
  3474. #     (tested on Solaris 2.5 w/ X11R6)
  3475. SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
  3476. cf_have_X_LIBS=no
  3477. case $SYSTEM_NAME in
  3478. irix[56]*) ;;
  3479. clix*)
  3480.     # FIXME: modify the library lookup in autoconf to
  3481.     # allow _s.a suffix ahead of .a
  3482.     echo $ac_n "checking for open in -lc_s""... $ac_c" 1>&6
  3483. echo "configure:3484: checking for open in -lc_s" >&5
  3484. ac_lib_var=`echo c_s'_'open | sed 'y%./+-%__p_%'`
  3485. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3486.   echo $ac_n "(cached) $ac_c" 1>&6
  3487. else
  3488.   ac_save_LIBS="$LIBS"
  3489. LIBS="-lc_s  $LIBS"
  3490. cat > conftest.$ac_ext <<EOF
  3491. #line 3492 "configure"
  3492. #include "confdefs.h"
  3493. /* Override any gcc2 internal prototype to avoid an error.  */
  3494. /* We use char because int might match the return type of a gcc2
  3495.     builtin and then its argument prototype would still apply.  */
  3496. char open();
  3497.  
  3498. int main() {
  3499. open()
  3500. ; return 0; }
  3501. EOF
  3502. if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3503.   rm -rf conftest*
  3504.   eval "ac_cv_lib_$ac_lib_var=yes"
  3505. else
  3506.   echo "configure: failed program was:" >&5
  3507.   cat conftest.$ac_ext >&5
  3508.   rm -rf conftest*
  3509.   eval "ac_cv_lib_$ac_lib_var=no"
  3510. fi
  3511. rm -f conftest*
  3512. LIBS="$ac_save_LIBS"
  3513.  
  3514. fi
  3515. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3516.   echo "$ac_t""yes" 1>&6
  3517.   LIBS="-lc_s $LIBS"
  3518.     echo $ac_n "checking for gethostname in -lbsd""... $ac_c" 1>&6
  3519. echo "configure:3520: checking for gethostname in -lbsd" >&5
  3520. ac_lib_var=`echo bsd'_'gethostname | sed 'y%./+-%__p_%'`
  3521. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3522.   echo $ac_n "(cached) $ac_c" 1>&6
  3523. else
  3524.   ac_save_LIBS="$LIBS"
  3525. LIBS="-lbsd  $LIBS"
  3526. cat > conftest.$ac_ext <<EOF
  3527. #line 3528 "configure"
  3528. #include "confdefs.h"
  3529. /* Override any gcc2 internal prototype to avoid an error.  */
  3530. /* We use char because int might match the return type of a gcc2
  3531.     builtin and then its argument prototype would still apply.  */
  3532. char gethostname();
  3533.  
  3534. int main() {
  3535. gethostname()
  3536. ; return 0; }
  3537. EOF
  3538. if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3539.   rm -rf conftest*
  3540.   eval "ac_cv_lib_$ac_lib_var=yes"
  3541. else
  3542.   echo "configure: failed program was:" >&5
  3543.   cat conftest.$ac_ext >&5
  3544.   rm -rf conftest*
  3545.   eval "ac_cv_lib_$ac_lib_var=no"
  3546. fi
  3547. rm -f conftest*
  3548. LIBS="$ac_save_LIBS"
  3549.  
  3550. fi
  3551. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3552.   echo "$ac_t""yes" 1>&6
  3553.   LIBS="-lbsd $LIBS"
  3554.     echo $ac_n "checking for gethostname in -lnsl_s""... $ac_c" 1>&6
  3555. echo "configure:3556: checking for gethostname in -lnsl_s" >&5
  3556. ac_lib_var=`echo nsl_s'_'gethostname | sed 'y%./+-%__p_%'`
  3557. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3558.   echo $ac_n "(cached) $ac_c" 1>&6
  3559. else
  3560.   ac_save_LIBS="$LIBS"
  3561. LIBS="-lnsl_s  $LIBS"
  3562. cat > conftest.$ac_ext <<EOF
  3563. #line 3564 "configure"
  3564. #include "confdefs.h"
  3565. /* Override any gcc2 internal prototype to avoid an error.  */
  3566. /* We use char because int might match the return type of a gcc2
  3567.     builtin and then its argument prototype would still apply.  */
  3568. char gethostname();
  3569.  
  3570. int main() {
  3571. gethostname()
  3572. ; return 0; }
  3573. EOF
  3574. if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3575.   rm -rf conftest*
  3576.   eval "ac_cv_lib_$ac_lib_var=yes"
  3577. else
  3578.   echo "configure: failed program was:" >&5
  3579.   cat conftest.$ac_ext >&5
  3580.   rm -rf conftest*
  3581.   eval "ac_cv_lib_$ac_lib_var=no"
  3582. fi
  3583. rm -f conftest*
  3584. LIBS="$ac_save_LIBS"
  3585.  
  3586. fi
  3587. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3588.   echo "$ac_t""yes" 1>&6
  3589.   LIBS="-lnsl_s $LIBS"
  3590.     echo $ac_n "checking for XOpenDisplay in -lX11_s""... $ac_c" 1>&6
  3591. echo "configure:3592: checking for XOpenDisplay in -lX11_s" >&5
  3592. ac_lib_var=`echo X11_s'_'XOpenDisplay | sed 'y%./+-%__p_%'`
  3593. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3594.   echo $ac_n "(cached) $ac_c" 1>&6
  3595. else
  3596.   ac_save_LIBS="$LIBS"
  3597. LIBS="-lX11_s  $LIBS"
  3598. cat > conftest.$ac_ext <<EOF
  3599. #line 3600 "configure"
  3600. #include "confdefs.h"
  3601. /* Override any gcc2 internal prototype to avoid an error.  */
  3602. /* We use char because int might match the return type of a gcc2
  3603.     builtin and then its argument prototype would still apply.  */
  3604. char XOpenDisplay();
  3605.  
  3606. int main() {
  3607. XOpenDisplay()
  3608. ; return 0; }
  3609. EOF
  3610. if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3611.   rm -rf conftest*
  3612.   eval "ac_cv_lib_$ac_lib_var=yes"
  3613. else
  3614.   echo "configure: failed program was:" >&5
  3615.   cat conftest.$ac_ext >&5
  3616.   rm -rf conftest*
  3617.   eval "ac_cv_lib_$ac_lib_var=no"
  3618. fi
  3619. rm -f conftest*
  3620. LIBS="$ac_save_LIBS"
  3621.  
  3622. fi
  3623. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3624.   echo "$ac_t""yes" 1>&6
  3625.   LIBS="-lX11_s $LIBS"
  3626.     echo $ac_n "checking for XtAppInitialize in -lXt_s""... $ac_c" 1>&6
  3627. echo "configure:3628: checking for XtAppInitialize in -lXt_s" >&5
  3628. ac_lib_var=`echo Xt_s'_'XtAppInitialize | sed 'y%./+-%__p_%'`
  3629. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3630.   echo $ac_n "(cached) $ac_c" 1>&6
  3631. else
  3632.   ac_save_LIBS="$LIBS"
  3633. LIBS="-lXt_s  $LIBS"
  3634. cat > conftest.$ac_ext <<EOF
  3635. #line 3636 "configure"
  3636. #include "confdefs.h"
  3637. /* Override any gcc2 internal prototype to avoid an error.  */
  3638. /* We use char because int might match the return type of a gcc2
  3639.     builtin and then its argument prototype would still apply.  */
  3640. char XtAppInitialize();
  3641.  
  3642. int main() {
  3643. XtAppInitialize()
  3644. ; return 0; }
  3645. EOF
  3646. if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3647.   rm -rf conftest*
  3648.   eval "ac_cv_lib_$ac_lib_var=yes"
  3649. else
  3650.   echo "configure: failed program was:" >&5
  3651.   cat conftest.$ac_ext >&5
  3652.   rm -rf conftest*
  3653.   eval "ac_cv_lib_$ac_lib_var=no"
  3654. fi
  3655. rm -f conftest*
  3656. LIBS="$ac_save_LIBS"
  3657.  
  3658. fi
  3659. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3660.   echo "$ac_t""yes" 1>&6
  3661.   LIBS="-lXt_s $LIBS"
  3662.          cf_have_X_LIBS=Xt
  3663.         
  3664. else
  3665.   echo "$ac_t""no" 1>&6
  3666. fi
  3667.  
  3668. else
  3669.   echo "$ac_t""no" 1>&6
  3670. fi
  3671.  
  3672. else
  3673.   echo "$ac_t""no" 1>&6
  3674. fi
  3675.  
  3676. else
  3677.   echo "$ac_t""no" 1>&6
  3678. fi
  3679.  
  3680. else
  3681.   echo "$ac_t""no" 1>&6
  3682. fi
  3683.  
  3684.     ;;
  3685. *)
  3686.     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  3687. echo "configure:3688: checking for socket in -lsocket" >&5
  3688. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  3689. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3690.   echo $ac_n "(cached) $ac_c" 1>&6
  3691. else
  3692.   ac_save_LIBS="$LIBS"
  3693. LIBS="-lsocket  $LIBS"
  3694. cat > conftest.$ac_ext <<EOF
  3695. #line 3696 "configure"
  3696. #include "confdefs.h"
  3697. /* Override any gcc2 internal prototype to avoid an error.  */
  3698. /* We use char because int might match the return type of a gcc2
  3699.     builtin and then its argument prototype would still apply.  */
  3700. char socket();
  3701.  
  3702. int main() {
  3703. socket()
  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.   eval "ac_cv_lib_$ac_lib_var=yes"
  3709. else
  3710.   echo "configure: failed program was:" >&5
  3711.   cat conftest.$ac_ext >&5
  3712.   rm -rf conftest*
  3713.   eval "ac_cv_lib_$ac_lib_var=no"
  3714. fi
  3715. rm -f conftest*
  3716. LIBS="$ac_save_LIBS"
  3717.  
  3718. fi
  3719. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3720.   echo "$ac_t""yes" 1>&6
  3721.     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3722.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3723.   cat >> confdefs.h <<EOF
  3724. #define $ac_tr_lib 1
  3725. EOF
  3726.  
  3727.   LIBS="-lsocket $LIBS"
  3728.  
  3729. else
  3730.   echo "$ac_t""no" 1>&6
  3731. fi
  3732.  
  3733.     echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
  3734. echo "configure:3735: checking for gethostname in -lnsl" >&5
  3735. ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
  3736. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3737.   echo $ac_n "(cached) $ac_c" 1>&6
  3738. else
  3739.   ac_save_LIBS="$LIBS"
  3740. LIBS="-lnsl  $LIBS"
  3741. cat > conftest.$ac_ext <<EOF
  3742. #line 3743 "configure"
  3743. #include "confdefs.h"
  3744. /* Override any gcc2 internal prototype to avoid an error.  */
  3745. /* We use char because int might match the return type of a gcc2
  3746.     builtin and then its argument prototype would still apply.  */
  3747. char gethostname();
  3748.  
  3749. int main() {
  3750. gethostname()
  3751. ; return 0; }
  3752. EOF
  3753. if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3754.   rm -rf conftest*
  3755.   eval "ac_cv_lib_$ac_lib_var=yes"
  3756. else
  3757.   echo "configure: failed program was:" >&5
  3758.   cat conftest.$ac_ext >&5
  3759.   rm -rf conftest*
  3760.   eval "ac_cv_lib_$ac_lib_var=no"
  3761. fi
  3762. rm -f conftest*
  3763. LIBS="$ac_save_LIBS"
  3764.  
  3765. fi
  3766. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3767.   echo "$ac_t""yes" 1>&6
  3768.     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3769.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3770.   cat >> confdefs.h <<EOF
  3771. #define $ac_tr_lib 1
  3772. EOF
  3773.  
  3774.   LIBS="-lnsl $LIBS"
  3775.  
  3776. else
  3777.   echo "$ac_t""no" 1>&6
  3778. fi
  3779.  
  3780.     ;;
  3781. esac
  3782.  
  3783. if test $cf_have_X_LIBS = no ; then
  3784.     if test "$no_x" = yes; then
  3785.   # Not all programs may use this symbol, but it does not hurt to define it.
  3786.   cat >> confdefs.h <<\EOF
  3787. #define X_DISPLAY_MISSING 1
  3788. EOF
  3789.  
  3790.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3791. else
  3792.   if test -n "$x_includes"; then
  3793.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  3794.   fi
  3795.  
  3796.   # It would also be nice to do this for all -L options, not just this one.
  3797.   if test -n "$x_libraries"; then
  3798.     X_LIBS="$X_LIBS -L$x_libraries"
  3799.     # For Solaris; some versions of Sun CC require a space after -R and
  3800.     # others require no space.  Words are not sufficient . . . .
  3801.     case "`(uname -sr) 2>/dev/null`" in
  3802.     "SunOS 5"*)
  3803.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3804. echo "configure:3805: checking whether -R must be followed by a space" >&5
  3805.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3806.       cat > conftest.$ac_ext <<EOF
  3807. #line 3808 "configure"
  3808. #include "confdefs.h"
  3809.  
  3810. int main() {
  3811.  
  3812. ; return 0; }
  3813. EOF
  3814. if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3815.   rm -rf conftest*
  3816.   ac_R_nospace=yes
  3817. else
  3818.   echo "configure: failed program was:" >&5
  3819.   cat conftest.$ac_ext >&5
  3820.   rm -rf conftest*
  3821.   ac_R_nospace=no
  3822. fi
  3823. rm -f conftest*
  3824.       if test $ac_R_nospace = yes; then
  3825.     echo "$ac_t""no" 1>&6
  3826.     X_LIBS="$X_LIBS -R$x_libraries"
  3827.       else
  3828.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  3829.     cat > conftest.$ac_ext <<EOF
  3830. #line 3831 "configure"
  3831. #include "confdefs.h"
  3832.  
  3833. int main() {
  3834.  
  3835. ; return 0; }
  3836. EOF
  3837. if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3838.   rm -rf conftest*
  3839.   ac_R_space=yes
  3840. else
  3841.   echo "configure: failed program was:" >&5
  3842.   cat conftest.$ac_ext >&5
  3843.   rm -rf conftest*
  3844.   ac_R_space=no
  3845. fi
  3846. rm -f conftest*
  3847.     if test $ac_R_space = yes; then
  3848.       echo "$ac_t""yes" 1>&6
  3849.       X_LIBS="$X_LIBS -R $x_libraries"
  3850.     else
  3851.       echo "$ac_t""neither works" 1>&6
  3852.     fi
  3853.       fi
  3854.       LIBS="$ac_xsave_LIBS"
  3855.     esac
  3856.   fi
  3857.  
  3858.   # Check for system-dependent libraries X programs must link with.
  3859.   # Do this before checking for the system-independent R6 libraries
  3860.   # (-lICE), since we may need -lsocket or whatever for X linking.
  3861.  
  3862.   if test "$ISC" = yes; then
  3863.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3864.   else
  3865.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3866.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  3867.     # the Alpha needs dnet_stub (dnet does not exist).
  3868.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3869. echo "configure:3870: checking for dnet_ntoa in -ldnet" >&5
  3870. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3871. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3872.   echo $ac_n "(cached) $ac_c" 1>&6
  3873. else
  3874.   ac_save_LIBS="$LIBS"
  3875. LIBS="-ldnet  $LIBS"
  3876. cat > conftest.$ac_ext <<EOF
  3877. #line 3878 "configure"
  3878. #include "confdefs.h"
  3879. /* Override any gcc2 internal prototype to avoid an error.  */
  3880. /* We use char because int might match the return type of a gcc2
  3881.     builtin and then its argument prototype would still apply.  */
  3882. char dnet_ntoa();
  3883.  
  3884. int main() {
  3885. dnet_ntoa()
  3886. ; return 0; }
  3887. EOF
  3888. if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3889.   rm -rf conftest*
  3890.   eval "ac_cv_lib_$ac_lib_var=yes"
  3891. else
  3892.   echo "configure: failed program was:" >&5
  3893.   cat conftest.$ac_ext >&5
  3894.   rm -rf conftest*
  3895.   eval "ac_cv_lib_$ac_lib_var=no"
  3896. fi
  3897. rm -f conftest*
  3898. LIBS="$ac_save_LIBS"
  3899.  
  3900. fi
  3901. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3902.   echo "$ac_t""yes" 1>&6
  3903.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3904. else
  3905.   echo "$ac_t""no" 1>&6
  3906. fi
  3907.  
  3908.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3909.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3910. echo "configure:3911: checking for dnet_ntoa in -ldnet_stub" >&5
  3911. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3912. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3913.   echo $ac_n "(cached) $ac_c" 1>&6
  3914. else
  3915.   ac_save_LIBS="$LIBS"
  3916. LIBS="-ldnet_stub  $LIBS"
  3917. cat > conftest.$ac_ext <<EOF
  3918. #line 3919 "configure"
  3919. #include "confdefs.h"
  3920. /* Override any gcc2 internal prototype to avoid an error.  */
  3921. /* We use char because int might match the return type of a gcc2
  3922.     builtin and then its argument prototype would still apply.  */
  3923. char dnet_ntoa();
  3924.  
  3925. int main() {
  3926. dnet_ntoa()
  3927. ; return 0; }
  3928. EOF
  3929. if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3930.   rm -rf conftest*
  3931.   eval "ac_cv_lib_$ac_lib_var=yes"
  3932. else
  3933.   echo "configure: failed program was:" >&5
  3934.   cat conftest.$ac_ext >&5
  3935.   rm -rf conftest*
  3936.   eval "ac_cv_lib_$ac_lib_var=no"
  3937. fi
  3938. rm -f conftest*
  3939. LIBS="$ac_save_LIBS"
  3940.  
  3941. fi
  3942. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3943.   echo "$ac_t""yes" 1>&6
  3944.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3945. else
  3946.   echo "$ac_t""no" 1>&6
  3947. fi
  3948.  
  3949.     fi
  3950.  
  3951.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3952.     # to get the SysV transport functions.
  3953.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3954.     # needs -lnsl.
  3955.     # The nsl library prevents programs from opening the X display
  3956.     # on Irix 5.2, according to dickey@clark.net.
  3957.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3958. echo "configure:3959: checking for gethostbyname" >&5
  3959. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  3960.   echo $ac_n "(cached) $ac_c" 1>&6
  3961. else
  3962.   cat > conftest.$ac_ext <<EOF
  3963. #line 3964 "configure"
  3964. #include "confdefs.h"
  3965. /* System header to define __stub macros and hopefully few prototypes,
  3966.     which can conflict with char gethostbyname(); below.  */
  3967. #include <assert.h>
  3968. /* Override any gcc2 internal prototype to avoid an error.  */
  3969. /* We use char because int might match the return type of a gcc2
  3970.     builtin and then its argument prototype would still apply.  */
  3971. char gethostbyname();
  3972.  
  3973. int main() {
  3974.  
  3975. /* The GNU C library defines this for functions which it implements
  3976.     to always fail with ENOSYS.  Some functions are actually named
  3977.     something starting with __ and the normal name is an alias.  */
  3978. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3979. choke me
  3980. #else
  3981. gethostbyname();
  3982. #endif
  3983.  
  3984. ; return 0; }
  3985. EOF
  3986. if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3987.   rm -rf conftest*
  3988.   eval "ac_cv_func_gethostbyname=yes"
  3989. else
  3990.   echo "configure: failed program was:" >&5
  3991.   cat conftest.$ac_ext >&5
  3992.   rm -rf conftest*
  3993.   eval "ac_cv_func_gethostbyname=no"
  3994. fi
  3995. rm -f conftest*
  3996. fi
  3997.  
  3998. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3999.   echo "$ac_t""yes" 1>&6
  4000.   :
  4001. else
  4002.   echo "$ac_t""no" 1>&6
  4003. fi
  4004.  
  4005.     if test $ac_cv_func_gethostbyname = no; then
  4006.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  4007. echo "configure:4008: checking for gethostbyname in -lnsl" >&5
  4008. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  4009. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4010.   echo $ac_n "(cached) $ac_c" 1>&6
  4011. else
  4012.   ac_save_LIBS="$LIBS"
  4013. LIBS="-lnsl  $LIBS"
  4014. cat > conftest.$ac_ext <<EOF
  4015. #line 4016 "configure"
  4016. #include "confdefs.h"
  4017. /* Override any gcc2 internal prototype to avoid an error.  */
  4018. /* We use char because int might match the return type of a gcc2
  4019.     builtin and then its argument prototype would still apply.  */
  4020. char gethostbyname();
  4021.  
  4022. int main() {
  4023. gethostbyname()
  4024. ; return 0; }
  4025. EOF
  4026. if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4027.   rm -rf conftest*
  4028.   eval "ac_cv_lib_$ac_lib_var=yes"
  4029. else
  4030.   echo "configure: failed program was:" >&5
  4031.   cat conftest.$ac_ext >&5
  4032.   rm -rf conftest*
  4033.   eval "ac_cv_lib_$ac_lib_var=no"
  4034. fi
  4035. rm -f conftest*
  4036. LIBS="$ac_save_LIBS"
  4037.  
  4038. fi
  4039. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4040.   echo "$ac_t""yes" 1>&6
  4041.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  4042. else
  4043.   echo "$ac_t""no" 1>&6
  4044. fi
  4045.  
  4046.     fi
  4047.  
  4048.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  4049.     # socket/setsockopt and other routines are undefined under SCO ODT
  4050.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  4051.     # on later versions), says simon@lia.di.epfl.ch: it contains
  4052.     # gethostby* variants that don't use the nameserver (or something).
  4053.     # -lsocket must be given before -lnsl if both are needed.
  4054.     # We assume that if connect needs -lnsl, so does gethostbyname.
  4055.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  4056. echo "configure:4057: checking for connect" >&5
  4057. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  4058.   echo $ac_n "(cached) $ac_c" 1>&6
  4059. else
  4060.   cat > conftest.$ac_ext <<EOF
  4061. #line 4062 "configure"
  4062. #include "confdefs.h"
  4063. /* System header to define __stub macros and hopefully few prototypes,
  4064.     which can conflict with char connect(); below.  */
  4065. #include <assert.h>
  4066. /* Override any gcc2 internal prototype to avoid an error.  */
  4067. /* We use char because int might match the return type of a gcc2
  4068.     builtin and then its argument prototype would still apply.  */
  4069. char connect();
  4070.  
  4071. int main() {
  4072.  
  4073. /* The GNU C library defines this for functions which it implements
  4074.     to always fail with ENOSYS.  Some functions are actually named
  4075.     something starting with __ and the normal name is an alias.  */
  4076. #if defined (__stub_connect) || defined (__stub___connect)
  4077. choke me
  4078. #else
  4079. connect();
  4080. #endif
  4081.  
  4082. ; return 0; }
  4083. EOF
  4084. if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4085.   rm -rf conftest*
  4086.   eval "ac_cv_func_connect=yes"
  4087. else
  4088.   echo "configure: failed program was:" >&5
  4089.   cat conftest.$ac_ext >&5
  4090.   rm -rf conftest*
  4091.   eval "ac_cv_func_connect=no"
  4092. fi
  4093. rm -f conftest*
  4094. fi
  4095.  
  4096. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  4097.   echo "$ac_t""yes" 1>&6
  4098.   :
  4099. else
  4100.   echo "$ac_t""no" 1>&6
  4101. fi
  4102.  
  4103.     if test $ac_cv_func_connect = no; then
  4104.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  4105. echo "configure:4106: checking for connect in -lsocket" >&5
  4106. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  4107. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4108.   echo $ac_n "(cached) $ac_c" 1>&6
  4109. else
  4110.   ac_save_LIBS="$LIBS"
  4111. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  4112. cat > conftest.$ac_ext <<EOF
  4113. #line 4114 "configure"
  4114. #include "confdefs.h"
  4115. /* Override any gcc2 internal prototype to avoid an error.  */
  4116. /* We use char because int might match the return type of a gcc2
  4117.     builtin and then its argument prototype would still apply.  */
  4118. char connect();
  4119.  
  4120. int main() {
  4121. connect()
  4122. ; return 0; }
  4123. EOF
  4124. if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4125.   rm -rf conftest*
  4126.   eval "ac_cv_lib_$ac_lib_var=yes"
  4127. else
  4128.   echo "configure: failed program was:" >&5
  4129.   cat conftest.$ac_ext >&5
  4130.   rm -rf conftest*
  4131.   eval "ac_cv_lib_$ac_lib_var=no"
  4132. fi
  4133. rm -f conftest*
  4134. LIBS="$ac_save_LIBS"
  4135.  
  4136. fi
  4137. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4138.   echo "$ac_t""yes" 1>&6
  4139.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  4140. else
  4141.   echo "$ac_t""no" 1>&6
  4142. fi
  4143.  
  4144.     fi
  4145.  
  4146.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  4147.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  4148. echo "configure:4149: checking for remove" >&5
  4149. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  4150.   echo $ac_n "(cached) $ac_c" 1>&6
  4151. else
  4152.   cat > conftest.$ac_ext <<EOF
  4153. #line 4154 "configure"
  4154. #include "confdefs.h"
  4155. /* System header to define __stub macros and hopefully few prototypes,
  4156.     which can conflict with char remove(); below.  */
  4157. #include <assert.h>
  4158. /* Override any gcc2 internal prototype to avoid an error.  */
  4159. /* We use char because int might match the return type of a gcc2
  4160.     builtin and then its argument prototype would still apply.  */
  4161. char remove();
  4162.  
  4163. int main() {
  4164.  
  4165. /* The GNU C library defines this for functions which it implements
  4166.     to always fail with ENOSYS.  Some functions are actually named
  4167.     something starting with __ and the normal name is an alias.  */
  4168. #if defined (__stub_remove) || defined (__stub___remove)
  4169. choke me
  4170. #else
  4171. remove();
  4172. #endif
  4173.  
  4174. ; return 0; }
  4175. EOF
  4176. if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4177.   rm -rf conftest*
  4178.   eval "ac_cv_func_remove=yes"
  4179. else
  4180.   echo "configure: failed program was:" >&5
  4181.   cat conftest.$ac_ext >&5
  4182.   rm -rf conftest*
  4183.   eval "ac_cv_func_remove=no"
  4184. fi
  4185. rm -f conftest*
  4186. fi
  4187.  
  4188. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  4189.   echo "$ac_t""yes" 1>&6
  4190.   :
  4191. else
  4192.   echo "$ac_t""no" 1>&6
  4193. fi
  4194.  
  4195.     if test $ac_cv_func_remove = no; then
  4196.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  4197. echo "configure:4198: checking for remove in -lposix" >&5
  4198. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  4199. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4200.   echo $ac_n "(cached) $ac_c" 1>&6
  4201. else
  4202.   ac_save_LIBS="$LIBS"
  4203. LIBS="-lposix  $LIBS"
  4204. cat > conftest.$ac_ext <<EOF
  4205. #line 4206 "configure"
  4206. #include "confdefs.h"
  4207. /* Override any gcc2 internal prototype to avoid an error.  */
  4208. /* We use char because int might match the return type of a gcc2
  4209.     builtin and then its argument prototype would still apply.  */
  4210. char remove();
  4211.  
  4212. int main() {
  4213. remove()
  4214. ; return 0; }
  4215. EOF
  4216. if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4217.   rm -rf conftest*
  4218.   eval "ac_cv_lib_$ac_lib_var=yes"
  4219. else
  4220.   echo "configure: failed program was:" >&5
  4221.   cat conftest.$ac_ext >&5
  4222.   rm -rf conftest*
  4223.   eval "ac_cv_lib_$ac_lib_var=no"
  4224. fi
  4225. rm -f conftest*
  4226. LIBS="$ac_save_LIBS"
  4227.  
  4228. fi
  4229. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4230.   echo "$ac_t""yes" 1>&6
  4231.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  4232. else
  4233.   echo "$ac_t""no" 1>&6
  4234. fi
  4235.  
  4236.     fi
  4237.  
  4238.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  4239.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  4240. echo "configure:4241: checking for shmat" >&5
  4241. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  4242.   echo $ac_n "(cached) $ac_c" 1>&6
  4243. else
  4244.   cat > conftest.$ac_ext <<EOF
  4245. #line 4246 "configure"
  4246. #include "confdefs.h"
  4247. /* System header to define __stub macros and hopefully few prototypes,
  4248.     which can conflict with char shmat(); below.  */
  4249. #include <assert.h>
  4250. /* Override any gcc2 internal prototype to avoid an error.  */
  4251. /* We use char because int might match the return type of a gcc2
  4252.     builtin and then its argument prototype would still apply.  */
  4253. char shmat();
  4254.  
  4255. int main() {
  4256.  
  4257. /* The GNU C library defines this for functions which it implements
  4258.     to always fail with ENOSYS.  Some functions are actually named
  4259.     something starting with __ and the normal name is an alias.  */
  4260. #if defined (__stub_shmat) || defined (__stub___shmat)
  4261. choke me
  4262. #else
  4263. shmat();
  4264. #endif
  4265.  
  4266. ; return 0; }
  4267. EOF
  4268. if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4269.   rm -rf conftest*
  4270.   eval "ac_cv_func_shmat=yes"
  4271. else
  4272.   echo "configure: failed program was:" >&5
  4273.   cat conftest.$ac_ext >&5
  4274.   rm -rf conftest*
  4275.   eval "ac_cv_func_shmat=no"
  4276. fi
  4277. rm -f conftest*
  4278. fi
  4279.  
  4280. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  4281.   echo "$ac_t""yes" 1>&6
  4282.   :
  4283. else
  4284.   echo "$ac_t""no" 1>&6
  4285. fi
  4286.  
  4287.     if test $ac_cv_func_shmat = no; then
  4288.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  4289. echo "configure:4290: checking for shmat in -lipc" >&5
  4290. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  4291. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4292.   echo $ac_n "(cached) $ac_c" 1>&6
  4293. else
  4294.   ac_save_LIBS="$LIBS"
  4295. LIBS="-lipc  $LIBS"
  4296. cat > conftest.$ac_ext <<EOF
  4297. #line 4298 "configure"
  4298. #include "confdefs.h"
  4299. /* Override any gcc2 internal prototype to avoid an error.  */
  4300. /* We use char because int might match the return type of a gcc2
  4301.     builtin and then its argument prototype would still apply.  */
  4302. char shmat();
  4303.  
  4304. int main() {
  4305. shmat()
  4306. ; return 0; }
  4307. EOF
  4308. if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4309.   rm -rf conftest*
  4310.   eval "ac_cv_lib_$ac_lib_var=yes"
  4311. else
  4312.   echo "configure: failed program was:" >&5
  4313.   cat conftest.$ac_ext >&5
  4314.   rm -rf conftest*
  4315.   eval "ac_cv_lib_$ac_lib_var=no"
  4316. fi
  4317. rm -f conftest*
  4318. LIBS="$ac_save_LIBS"
  4319.  
  4320. fi
  4321. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4322.   echo "$ac_t""yes" 1>&6
  4323.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  4324. else
  4325.   echo "$ac_t""no" 1>&6
  4326. fi
  4327.  
  4328.     fi
  4329.   fi
  4330.  
  4331.   # Check for libraries that X11R6 Xt/Xaw programs need.
  4332.   ac_save_LDFLAGS="$LDFLAGS"
  4333.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  4334.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4335.   # check for ICE first), but we must link in the order -lSM -lICE or
  4336.   # we get undefined symbols.  So assume we have SM if we have ICE.
  4337.   # These have to be linked with before -lX11, unlike the other
  4338.   # libraries we check for below, so use a different variable.
  4339.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4340.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  4341. echo "configure:4342: checking for IceConnectionNumber in -lICE" >&5
  4342. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  4343. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4344.   echo $ac_n "(cached) $ac_c" 1>&6
  4345. else
  4346.   ac_save_LIBS="$LIBS"
  4347. LIBS="-lICE  $LIBS"
  4348. cat > conftest.$ac_ext <<EOF
  4349. #line 4350 "configure"
  4350. #include "confdefs.h"
  4351. /* Override any gcc2 internal prototype to avoid an error.  */
  4352. /* We use char because int might match the return type of a gcc2
  4353.     builtin and then its argument prototype would still apply.  */
  4354. char IceConnectionNumber();
  4355.  
  4356. int main() {
  4357. IceConnectionNumber()
  4358. ; return 0; }
  4359. EOF
  4360. if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4361.   rm -rf conftest*
  4362.   eval "ac_cv_lib_$ac_lib_var=yes"
  4363. else
  4364.   echo "configure: failed program was:" >&5
  4365.   cat conftest.$ac_ext >&5
  4366.   rm -rf conftest*
  4367.   eval "ac_cv_lib_$ac_lib_var=no"
  4368. fi
  4369. rm -f conftest*
  4370. LIBS="$ac_save_LIBS"
  4371.  
  4372. fi
  4373. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4374.   echo "$ac_t""yes" 1>&6
  4375.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  4376. else
  4377.   echo "$ac_t""no" 1>&6
  4378. fi
  4379.  
  4380.   LDFLAGS="$ac_save_LDFLAGS"
  4381.  
  4382. fi
  4383.  
  4384.     LDFLAGS="$LDFLAGS $X_LIBS"
  4385.     CFLAGS="$CFLAGS $X_CFLAGS"
  4386.     echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
  4387. echo "configure:4388: checking for XOpenDisplay in -lX11" >&5
  4388. ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
  4389. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4390.   echo $ac_n "(cached) $ac_c" 1>&6
  4391. else
  4392.   ac_save_LIBS="$LIBS"
  4393. LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  4394. cat > conftest.$ac_ext <<EOF
  4395. #line 4396 "configure"
  4396. #include "confdefs.h"
  4397. /* Override any gcc2 internal prototype to avoid an error.  */
  4398. /* We use char because int might match the return type of a gcc2
  4399.     builtin and then its argument prototype would still apply.  */
  4400. char XOpenDisplay();
  4401.  
  4402. int main() {
  4403. XOpenDisplay()
  4404. ; return 0; }
  4405. EOF
  4406. if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4407.   rm -rf conftest*
  4408.   eval "ac_cv_lib_$ac_lib_var=yes"
  4409. else
  4410.   echo "configure: failed program was:" >&5
  4411.   cat conftest.$ac_ext >&5
  4412.   rm -rf conftest*
  4413.   eval "ac_cv_lib_$ac_lib_var=no"
  4414. fi
  4415. rm -f conftest*
  4416. LIBS="$ac_save_LIBS"
  4417.  
  4418. fi
  4419. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4420.   echo "$ac_t""yes" 1>&6
  4421.   LIBS="-lX11 $LIBS"
  4422. else
  4423.   echo "$ac_t""no" 1>&6
  4424. fi
  4425.  
  4426.     echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
  4427. echo "configure:4428: checking for XtAppInitialize in -lXt" >&5
  4428. ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
  4429. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4430.   echo $ac_n "(cached) $ac_c" 1>&6
  4431. else
  4432.   ac_save_LIBS="$LIBS"
  4433. LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  4434. cat > conftest.$ac_ext <<EOF
  4435. #line 4436 "configure"
  4436. #include "confdefs.h"
  4437. /* Override any gcc2 internal prototype to avoid an error.  */
  4438. /* We use char because int might match the return type of a gcc2
  4439.     builtin and then its argument prototype would still apply.  */
  4440. char XtAppInitialize();
  4441.  
  4442. int main() {
  4443. XtAppInitialize()
  4444. ; return 0; }
  4445. EOF
  4446. if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4447.   rm -rf conftest*
  4448.   eval "ac_cv_lib_$ac_lib_var=yes"
  4449. else
  4450.   echo "configure: failed program was:" >&5
  4451.   cat conftest.$ac_ext >&5
  4452.   rm -rf conftest*
  4453.   eval "ac_cv_lib_$ac_lib_var=no"
  4454. fi
  4455. rm -f conftest*
  4456. LIBS="$ac_save_LIBS"
  4457.  
  4458. fi
  4459. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4460.   echo "$ac_t""yes" 1>&6
  4461.   cat >> confdefs.h <<\EOF
  4462. #define HAVE_LIBXT 1
  4463. EOF
  4464.  
  4465.          cf_have_X_LIBS=Xt
  4466.          LIBS="-lXt $X_PRE_LIBS $LIBS"
  4467. else
  4468.   echo "$ac_t""no" 1>&6
  4469. fi
  4470.  
  4471. else
  4472.     LDFLAGS="$LDFLAGS $X_LIBS"
  4473.     CFLAGS="$CFLAGS $X_CFLAGS"
  4474. fi
  4475.  
  4476. if test $cf_have_X_LIBS = no ; then
  4477.     echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
  4478. test program.  You will have to check and add the proper libraries by hand
  4479. to makefile." 1>&2
  4480. fi
  4481.  
  4482.         
  4483. for ac_prog in xmkmf imake
  4484. do
  4485. # Extract the first word of "$ac_prog", so it can be a program name with args.
  4486. set dummy $ac_prog; ac_word=$2
  4487. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4488. echo "configure:4489: checking for $ac_word" >&5
  4489. if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then
  4490.   echo $ac_n "(cached) $ac_c" 1>&6
  4491. else
  4492.   case "$IMAKE" in
  4493.   /*)
  4494.   ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
  4495.   ;;
  4496.   *)
  4497.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4498.   for ac_dir in $PATH; do
  4499.     test -z "$ac_dir" && ac_dir=.
  4500.     if test -f $ac_dir/$ac_word; then
  4501.       ac_cv_path_IMAKE="$ac_dir/$ac_word"
  4502.       break
  4503.     fi
  4504.   done
  4505.   IFS="$ac_save_ifs"
  4506.   ;;
  4507. esac
  4508. fi
  4509. IMAKE="$ac_cv_path_IMAKE"
  4510. if test -n "$IMAKE"; then
  4511.   echo "$ac_t""$IMAKE" 1>&6
  4512. else
  4513.   echo "$ac_t""no" 1>&6
  4514. fi
  4515.  
  4516. test -n "$IMAKE" && break
  4517. done
  4518.  
  4519. case $IMAKE in # (vi
  4520. */imake)
  4521.     cf_imake_opts="-DUseInstalled=YES" # (vi
  4522.     ;;
  4523. *)
  4524.     cf_imake_opts=
  4525.     ;;
  4526. esac
  4527.  
  4528. # If it's installed properly, imake (or its wrapper, xmkmf) will point to the
  4529. # config directory.
  4530. if mkdir conftestdir; then
  4531.     cd conftestdir
  4532.     echo >./Imakefile
  4533.     test -f ../Imakefile && cat ../Imakefile >>./Imakefile
  4534.     cat >> ./Imakefile <<'CF_EOF'
  4535. findstddefs:
  4536.     @echo 'IMAKE_CFLAGS="${ALLDEFINES} "'
  4537.     @echo 'IMAKE_LOADFLAGS="${EXTRA_LOAD_FLAGS} "'
  4538. CF_EOF
  4539.     if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
  4540.     then
  4541.         test -n "$verbose" && echo "    Using $IMAKE" 1>&6
  4542.  
  4543.     else
  4544.         # sometimes imake doesn't have the config path compiled in.  Find it.
  4545.         cf_config=
  4546.         for cf_libpath in $X_LIBS $LIBS ; do
  4547.             case $cf_libpath in # (vi
  4548.             -L*)
  4549.                 cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
  4550.                 cf_libpath=$cf_libpath/X11/config
  4551.                 if test -d $cf_libpath ; then
  4552.                     cf_config=$cf_libpath
  4553.                     break
  4554.                 fi
  4555.                 ;;
  4556.             esac
  4557.         done
  4558.         if test -z "$cf_config" ; then
  4559.             echo "configure: warning: Could not find imake config-directory" 1>&2
  4560.         else
  4561.             cf_imake_opts="$cf_imake_opts -I$cf_config"
  4562.             if ( $IMAKE -v $cf_imake_opts 2>&5)
  4563.             then
  4564.                 test -n "$verbose" && echo "    Using $IMAKE $cf_config" 1>&6
  4565.  
  4566.             else
  4567.                 echo "configure: warning: Cannot run $IMAKE" 1>&2
  4568.             fi
  4569.         fi
  4570.     fi
  4571.  
  4572.     # GNU make sometimes prints "make[1]: Entering...", which
  4573.     # would confuse us.
  4574.     eval `make findstddefs 2>/dev/null | grep -v make`
  4575.  
  4576.     cd ..
  4577.     rm -rf conftestdir
  4578.  
  4579.     # We use $(ALLDEFINES) rather than $(STD_DEFINES) because the former
  4580.     # declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
  4581.     # modified it to support site.cf, adding a kludge for the /usr/include
  4582.     # directory.  Try to filter that out, otherwise gcc won't find its
  4583.     # headers.
  4584.     if test -n "$GCC" ; then
  4585.         if test -n "$IMAKE_CFLAGS" ; then
  4586.         cf_nostdinc=""
  4587.         cf_std_incl=""
  4588.         cf_cpp_opts=""
  4589.         for cf_opt in $IMAKE_CFLAGS
  4590.         do
  4591.             case "$cf_opt" in
  4592.             -nostdinc) #(vi
  4593.             cf_nostdinc="$cf_opt"
  4594.             ;;
  4595.             -I/usr/include) #(vi
  4596.             cf_std_incl="$cf_opt"
  4597.             ;;
  4598.             *) #(vi
  4599.             cf_cpp_opts="$cf_cpp_opts $cf_opt"
  4600.             ;;
  4601.             esac
  4602.         done
  4603.         if test -z "$cf_nostdinc" ; then
  4604.             IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
  4605.         elif test -z "$cf_std_incl" ; then
  4606.             IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
  4607.         else
  4608.             test -n "$verbose" && echo "    suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
  4609.  
  4610.             IMAKE_CFLAGS="$cf_cpp_opts"
  4611.         fi
  4612.         fi
  4613.     fi
  4614. fi
  4615.  
  4616.  
  4617.  
  4618.         X_CFLAGS="$X_CFLAGS $IMAKE_CFLAGS"
  4619.         LDFLAGS="$LDFLAGS $X_LIBS"
  4620.         CFLAGS="$CFLAGS $X_CFLAGS"
  4621.         SCREEN=x11
  4622.         TARGET=xvile
  4623.         cat >> confdefs.h <<\EOF
  4624. #define DISP_X11 1
  4625. EOF
  4626.  
  4627.         cat >> confdefs.h <<\EOF
  4628. #define XTOOLKIT 1
  4629. EOF
  4630.  
  4631.         for ac_hdr in X11/IntrinsicI.h
  4632. do
  4633. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4634. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4635. echo "configure:4636: checking for $ac_hdr" >&5
  4636. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4637.   echo $ac_n "(cached) $ac_c" 1>&6
  4638. else
  4639.   cat > conftest.$ac_ext <<EOF
  4640. #line 4641 "configure"
  4641. #include "confdefs.h"
  4642. #include <$ac_hdr>
  4643. EOF
  4644. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4645. { (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4646. ac_err=`grep -v '^ *+' conftest.out`
  4647. if test -z "$ac_err"; then
  4648.   rm -rf conftest*
  4649.   eval "ac_cv_header_$ac_safe=yes"
  4650. else
  4651.   echo "$ac_err" >&5
  4652.   echo "configure: failed program was:" >&5
  4653.   cat conftest.$ac_ext >&5
  4654.   rm -rf conftest*
  4655.   eval "ac_cv_header_$ac_safe=no"
  4656. fi
  4657. rm -f conftest*
  4658. fi
  4659. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4660.   echo "$ac_t""yes" 1>&6
  4661.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4662.   cat >> confdefs.h <<EOF
  4663. #define $ac_tr_hdr 1
  4664. EOF
  4665.  
  4666. else
  4667.   echo "$ac_t""no" 1>&6
  4668. fi
  4669. done
  4670.  
  4671.     ;;
  4672. esac
  4673.  
  4674. : Find the libraries that apply to the selected screen-type:
  4675. case "$screen" in
  4676.     [Oo]pen* | [Xx]ol )
  4677.         cat >> confdefs.h <<\EOF
  4678. #define OL_WIDGETS 1
  4679. EOF
  4680.  
  4681.         if test -n "$OPENWINHOME"; then
  4682.     X_LIBS="$X_LIBS -L${OPENWINHOME}/lib"
  4683.     X_CFLAGS="$X_CFLAGS -I${OPENWINHOME}/include"
  4684. fi
  4685. LDFLAGS="$LDFLAGS $X_LIBS"
  4686. echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6
  4687. echo "configure:4688: checking for XmuClientWindow in -lXmu" >&5
  4688. ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'`
  4689. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4690.   echo $ac_n "(cached) $ac_c" 1>&6
  4691. else
  4692.   ac_save_LIBS="$LIBS"
  4693. LIBS="-lXmu  $LIBS"
  4694. cat > conftest.$ac_ext <<EOF
  4695. #line 4696 "configure"
  4696. #include "confdefs.h"
  4697. /* Override any gcc2 internal prototype to avoid an error.  */
  4698. /* We use char because int might match the return type of a gcc2
  4699.     builtin and then its argument prototype would still apply.  */
  4700. char XmuClientWindow();
  4701.  
  4702. int main() {
  4703. XmuClientWindow()
  4704. ; return 0; }
  4705. EOF
  4706. if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4707.   rm -rf conftest*
  4708.   eval "ac_cv_lib_$ac_lib_var=yes"
  4709. else
  4710.   echo "configure: failed program was:" >&5
  4711.   cat conftest.$ac_ext >&5
  4712.   rm -rf conftest*
  4713.   eval "ac_cv_lib_$ac_lib_var=no"
  4714. fi
  4715. rm -f conftest*
  4716. LIBS="$ac_save_LIBS"
  4717.  
  4718. fi
  4719. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4720.   echo "$ac_t""yes" 1>&6
  4721.     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4722.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4723.   cat >> confdefs.h <<EOF
  4724. #define $ac_tr_lib 1
  4725. EOF
  4726.  
  4727.   LIBS="-lXmu $LIBS"
  4728.  
  4729. else
  4730.   echo "$ac_t""no" 1>&6
  4731. fi
  4732.  
  4733. echo $ac_n "checking for OlToolkitInitialize in -lXol""... $ac_c" 1>&6
  4734. echo "configure:4735: checking for OlToolkitInitialize in -lXol" >&5
  4735. ac_lib_var=`echo Xol'_'OlToolkitInitialize | sed 'y%./+-%__p_%'`
  4736. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4737.   echo $ac_n "(cached) $ac_c" 1>&6
  4738. else
  4739.   ac_save_LIBS="$LIBS"
  4740. LIBS="-lXol  $LIBS"
  4741. cat > conftest.$ac_ext <<EOF
  4742. #line 4743 "configure"
  4743. #include "confdefs.h"
  4744. /* Override any gcc2 internal prototype to avoid an error.  */
  4745. /* We use char because int might match the return type of a gcc2
  4746.     builtin and then its argument prototype would still apply.  */
  4747. char OlToolkitInitialize();
  4748.  
  4749. int main() {
  4750. OlToolkitInitialize()
  4751. ; return 0; }
  4752. EOF
  4753. if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4754.   rm -rf conftest*
  4755.   eval "ac_cv_lib_$ac_lib_var=yes"
  4756. else
  4757.   echo "configure: failed program was:" >&5
  4758.   cat conftest.$ac_ext >&5
  4759.   rm -rf conftest*
  4760.   eval "ac_cv_lib_$ac_lib_var=no"
  4761. fi
  4762. rm -f conftest*
  4763. LIBS="$ac_save_LIBS"
  4764.  
  4765. fi
  4766. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4767.   echo "$ac_t""yes" 1>&6
  4768.   LIBS="-lXol -lm $LIBS"
  4769. else
  4770.   echo "$ac_t""no" 1>&6
  4771. { echo "configure: error: Unable to successfully link OpenLook library (-lXol) with test program" 1>&2; exit 1; }
  4772. fi
  4773.  
  4774.     ;;
  4775.     [mM]otif* | [Xx]m )
  4776.         cat >> confdefs.h <<\EOF
  4777. #define MOTIF_WIDGETS 1
  4778. EOF
  4779.  
  4780.         for ac_hdr in X11/IntrinsicI.h Xm/XmP.h
  4781. do
  4782. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4783. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4784. echo "configure:4785: checking for $ac_hdr" >&5
  4785. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4786.   echo $ac_n "(cached) $ac_c" 1>&6
  4787. else
  4788.   cat > conftest.$ac_ext <<EOF
  4789. #line 4790 "configure"
  4790. #include "confdefs.h"
  4791. #include <$ac_hdr>
  4792. EOF
  4793. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4794. { (eval echo configure:4795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4795. ac_err=`grep -v '^ *+' conftest.out`
  4796. if test -z "$ac_err"; then
  4797.   rm -rf conftest*
  4798.   eval "ac_cv_header_$ac_safe=yes"
  4799. else
  4800.   echo "$ac_err" >&5
  4801.   echo "configure: failed program was:" >&5
  4802.   cat conftest.$ac_ext >&5
  4803.   rm -rf conftest*
  4804.   eval "ac_cv_header_$ac_safe=no"
  4805. fi
  4806. rm -f conftest*
  4807. fi
  4808. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4809.   echo "$ac_t""yes" 1>&6
  4810.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4811.   cat >> confdefs.h <<EOF
  4812. #define $ac_tr_hdr 1
  4813. EOF
  4814.  
  4815. else
  4816.   echo "$ac_t""no" 1>&6
  4817. fi
  4818. done
  4819.  
  4820. echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
  4821. echo "configure:4822: checking for regcmp in -lgen" >&5
  4822. ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
  4823. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4824.   echo $ac_n "(cached) $ac_c" 1>&6
  4825. else
  4826.   ac_save_LIBS="$LIBS"
  4827. LIBS="-lgen  $LIBS"
  4828. cat > conftest.$ac_ext <<EOF
  4829. #line 4830 "configure"
  4830. #include "confdefs.h"
  4831. /* Override any gcc2 internal prototype to avoid an error.  */
  4832. /* We use char because int might match the return type of a gcc2
  4833.     builtin and then its argument prototype would still apply.  */
  4834. char regcmp();
  4835.  
  4836. int main() {
  4837. regcmp()
  4838. ; return 0; }
  4839. EOF
  4840. if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4841.   rm -rf conftest*
  4842.   eval "ac_cv_lib_$ac_lib_var=yes"
  4843. else
  4844.   echo "configure: failed program was:" >&5
  4845.   cat conftest.$ac_ext >&5
  4846.   rm -rf conftest*
  4847.   eval "ac_cv_lib_$ac_lib_var=no"
  4848. fi
  4849. rm -f conftest*
  4850. LIBS="$ac_save_LIBS"
  4851.  
  4852. fi
  4853. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4854.   echo "$ac_t""yes" 1>&6
  4855.     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4856.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4857.   cat >> confdefs.h <<EOF
  4858. #define $ac_tr_lib 1
  4859. EOF
  4860.  
  4861.   LIBS="-lgen $LIBS"
  4862.  
  4863. else
  4864.   echo "$ac_t""no" 1>&6
  4865. fi
  4866.  
  4867. echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6
  4868. echo "configure:4869: checking for XmuClientWindow in -lXmu" >&5
  4869. ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'`
  4870. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4871.   echo $ac_n "(cached) $ac_c" 1>&6
  4872. else
  4873.   ac_save_LIBS="$LIBS"
  4874. LIBS="-lXmu  $LIBS"
  4875. cat > conftest.$ac_ext <<EOF
  4876. #line 4877 "configure"
  4877. #include "confdefs.h"
  4878. /* Override any gcc2 internal prototype to avoid an error.  */
  4879. /* We use char because int might match the return type of a gcc2
  4880.     builtin and then its argument prototype would still apply.  */
  4881. char XmuClientWindow();
  4882.  
  4883. int main() {
  4884. XmuClientWindow()
  4885. ; return 0; }
  4886. EOF
  4887. if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4888.   rm -rf conftest*
  4889.   eval "ac_cv_lib_$ac_lib_var=yes"
  4890. else
  4891.   echo "configure: failed program was:" >&5
  4892.   cat conftest.$ac_ext >&5
  4893.   rm -rf conftest*
  4894.   eval "ac_cv_lib_$ac_lib_var=no"
  4895. fi
  4896. rm -f conftest*
  4897. LIBS="$ac_save_LIBS"
  4898.  
  4899. fi
  4900. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4901.   echo "$ac_t""yes" 1>&6
  4902.     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4903.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4904.   cat >> confdefs.h <<EOF
  4905. #define $ac_tr_lib 1
  4906. EOF
  4907.  
  4908.   LIBS="-lXmu $LIBS"
  4909.  
  4910. else
  4911.   echo "$ac_t""no" 1>&6
  4912. fi
  4913.  
  4914. echo $ac_n "checking for XpStartDoc in -lXp""... $ac_c" 1>&6
  4915. echo "configure:4916: checking for XpStartDoc in -lXp" >&5
  4916. ac_lib_var=`echo Xp'_'XpStartDoc | sed 'y%./+-%__p_%'`
  4917. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4918.   echo $ac_n "(cached) $ac_c" 1>&6
  4919. else
  4920.   ac_save_LIBS="$LIBS"
  4921. LIBS="-lXp $LIBS $X_EXTRA_LIBS $LIBS"
  4922. cat > conftest.$ac_ext <<EOF
  4923. #line 4924 "configure"
  4924. #include "confdefs.h"
  4925. /* Override any gcc2 internal prototype to avoid an error.  */
  4926. /* We use char because int might match the return type of a gcc2
  4927.     builtin and then its argument prototype would still apply.  */
  4928. char XpStartDoc();
  4929.  
  4930. int main() {
  4931. XpStartDoc()
  4932. ; return 0; }
  4933. EOF
  4934. if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4935.   rm -rf conftest*
  4936.   eval "ac_cv_lib_$ac_lib_var=yes"
  4937. else
  4938.   echo "configure: failed program was:" >&5
  4939.   cat conftest.$ac_ext >&5
  4940.   rm -rf conftest*
  4941.   eval "ac_cv_lib_$ac_lib_var=no"
  4942. fi
  4943. rm -f conftest*
  4944. LIBS="$ac_save_LIBS"
  4945.  
  4946. fi
  4947. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4948.   echo "$ac_t""yes" 1>&6
  4949.     ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4950.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4951.   cat >> confdefs.h <<EOF
  4952. #define $ac_tr_lib 1
  4953. EOF
  4954.  
  4955.   LIBS="-lXp $LIBS"
  4956.  
  4957. else
  4958.   echo "$ac_t""no" 1>&6
  4959. fi
  4960.  
  4961. echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
  4962. echo "configure:4963: checking for XextCreateExtension in -lXext" >&5
  4963. ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
  4964. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4965.   echo $ac_n "(cached) $ac_c" 1>&6
  4966. else
  4967.   ac_save_LIBS="$LIBS"
  4968. LIBS="-lXext  $LIBS"
  4969. cat > conftest.$ac_ext <<EOF
  4970. #line 4971 "configure"
  4971. #include "confdefs.h"
  4972. /* Override any gcc2 internal prototype to avoid an error.  */
  4973. /* We use char because int might match the return type of a gcc2
  4974.     builtin and then its argument prototype would still apply.  */
  4975. char XextCreateExtension();
  4976.  
  4977. int main() {
  4978. XextCreateExtension()
  4979. ; return 0; }
  4980. EOF
  4981. if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4982.   rm -rf conftest*
  4983.   eval "ac_cv_lib_$ac_lib_var=yes"
  4984. else
  4985.   echo "configure: failed program was:" >&5
  4986.   cat conftest.$ac_ext >&5
  4987.   rm -rf conftest*
  4988.   eval "ac_cv_lib_$ac_lib_var=no"
  4989. fi
  4990. rm -f conftest*
  4991. LIBS="$ac_save_LIBS"
  4992.  
  4993. fi
  4994. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4995.   echo "$ac_t""yes" 1>&6
  4996.   LIBS="-lXext $LIBS"
  4997. else
  4998.   echo "$ac_t""no" 1>&6
  4999. fi
  5000.  
  5001. echo $ac_n "checking for XpmCreatePixmapFromXpmImage in -lXpm""... $ac_c" 1>&6
  5002. echo "configure:5003: checking for XpmCreatePixmapFromXpmImage in -lXpm" >&5
  5003. ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromXpmImage | sed 'y%./+-%__p_%'`
  5004. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5005.   echo $ac_n "(cached) $ac_c" 1>&6
  5006. else
  5007.   ac_save_LIBS="$LIBS"
  5008. LIBS="-lXpm $LIBS $X_EXTRA_LIBS $LIBS"
  5009. cat > conftest.$ac_ext <<EOF
  5010. #line 5011 "configure"
  5011. #include "confdefs.h"
  5012. /* Override any gcc2 internal prototype to avoid an error.  */
  5013. /* We use char because int might match the return type of a gcc2
  5014.     builtin and then its argument prototype would still apply.  */
  5015. char XpmCreatePixmapFromXpmImage();
  5016.  
  5017. int main() {
  5018. XpmCreatePixmapFromXpmImage()
  5019. ; return 0; }
  5020. EOF
  5021. if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5022.   rm -rf conftest*
  5023.   eval "ac_cv_lib_$ac_lib_var=yes"
  5024. else
  5025.   echo "configure: failed program was:" >&5
  5026.   cat conftest.$ac_ext >&5
  5027.   rm -rf conftest*
  5028.   eval "ac_cv_lib_$ac_lib_var=no"
  5029. fi
  5030. rm -f conftest*
  5031. LIBS="$ac_save_LIBS"
  5032.  
  5033. fi
  5034. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5035.   echo "$ac_t""yes" 1>&6
  5036.   LIBS="-lXpm $LIBS"
  5037. else
  5038.   echo "$ac_t""no" 1>&6
  5039. fi
  5040.  
  5041. echo $ac_n "checking for XmbTextListToTextProperty in -lXIM""... $ac_c" 1>&6
  5042. echo "configure:5043: checking for XmbTextListToTextProperty in -lXIM" >&5
  5043. ac_lib_var=`echo XIM'_'XmbTextListToTextProperty | sed 'y%./+-%__p_%'`
  5044. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5045.   echo $ac_n "(cached) $ac_c" 1>&6
  5046. else
  5047.   ac_save_LIBS="$LIBS"
  5048. LIBS="-lXIM  $LIBS"
  5049. cat > conftest.$ac_ext <<EOF
  5050. #line 5051 "configure"
  5051. #include "confdefs.h"
  5052. /* Override any gcc2 internal prototype to avoid an error.  */
  5053. /* We use char because int might match the return type of a gcc2
  5054.     builtin and then its argument prototype would still apply.  */
  5055. char XmbTextListToTextProperty();
  5056.  
  5057. int main() {
  5058. XmbTextListToTextProperty()
  5059. ; return 0; }
  5060. EOF
  5061. if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5062.   rm -rf conftest*
  5063.   eval "ac_cv_lib_$ac_lib_var=yes"
  5064. else
  5065.   echo "configure: failed program was:" >&5
  5066.   cat conftest.$ac_ext >&5
  5067.   rm -rf conftest*
  5068.   eval "ac_cv_lib_$ac_lib_var=no"
  5069. fi
  5070. rm -f conftest*
  5071. LIBS="$ac_save_LIBS"
  5072.  
  5073. fi
  5074. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5075.   echo "$ac_t""yes" 1>&6
  5076.     ac_tr_lib=HAVE_LIB`echo XIM | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5077.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5078.   cat >> confdefs.h <<EOF
  5079. #define $ac_tr_lib 1
  5080. EOF
  5081.  
  5082.   LIBS="-lXIM $LIBS"
  5083.  
  5084. else
  5085.   echo "$ac_t""no" 1>&6
  5086. fi
  5087. echo $ac_n "checking for XmProcessTraversal in -lXm""... $ac_c" 1>&6
  5088. echo "configure:5089: checking for XmProcessTraversal in -lXm" >&5
  5089. ac_lib_var=`echo Xm'_'XmProcessTraversal | sed 'y%./+-%__p_%'`
  5090. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5091.   echo $ac_n "(cached) $ac_c" 1>&6
  5092. else
  5093.   ac_save_LIBS="$LIBS"
  5094. LIBS="-lXm $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  5095. cat > conftest.$ac_ext <<EOF
  5096. #line 5097 "configure"
  5097. #include "confdefs.h"
  5098. /* Override any gcc2 internal prototype to avoid an error.  */
  5099. /* We use char because int might match the return type of a gcc2
  5100.     builtin and then its argument prototype would still apply.  */
  5101. char XmProcessTraversal();
  5102.  
  5103. int main() {
  5104. XmProcessTraversal()
  5105. ; return 0; }
  5106. EOF
  5107. if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5108.   rm -rf conftest*
  5109.   eval "ac_cv_lib_$ac_lib_var=yes"
  5110. else
  5111.   echo "configure: failed program was:" >&5
  5112.   cat conftest.$ac_ext >&5
  5113.   rm -rf conftest*
  5114.   eval "ac_cv_lib_$ac_lib_var=no"
  5115. fi
  5116. rm -f conftest*
  5117. LIBS="$ac_save_LIBS"
  5118.  
  5119. fi
  5120. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5121.   echo "$ac_t""yes" 1>&6
  5122.   LIBS="-lXm $LIBS"
  5123. else
  5124.   echo "$ac_t""no" 1>&6
  5125. { echo "configure: error: Unable to successfully link Motif library (-lXm) with test program" 1>&2; exit 1; }
  5126. fi
  5127.  
  5128.          EXTRAOBJS="$EXTRAOBJS menu.o"
  5129.     ;;
  5130.     [Aa]thena* | [Xx]aw* | neXtaw )
  5131.         cat >> confdefs.h <<\EOF
  5132. #define ATHENA_WIDGETS 1
  5133. EOF
  5134.  
  5135.         case $screen in #(vi
  5136.         *aw*)
  5137.             cf_x_athena=`echo $screen | sed -e s/x/X/`
  5138.             ;;
  5139.         esac
  5140.         
  5141. cf_x_athena=${cf_x_athena-Xaw}
  5142.  
  5143.  
  5144. # Check whether --with-Xaw3d or --without-Xaw3d was given.
  5145. if test "${with_Xaw3d+set}" = set; then
  5146.   withval="$with_Xaw3d"
  5147.   cf_x_athena=Xaw3d
  5148. fi
  5149.  
  5150.  
  5151.  
  5152. # Check whether --with-neXtaw or --without-neXtaw was given.
  5153. if test "${with_neXtaw+set}" = set; then
  5154.   withval="$with_neXtaw"
  5155.   cf_x_athena=neXtaw
  5156. fi
  5157.  
  5158.  
  5159. for ac_hdr in X11/$cf_x_athena/SimpleMenu.h
  5160. do
  5161. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5162. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5163. echo "configure:5164: checking for $ac_hdr" >&5
  5164. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5165.   echo $ac_n "(cached) $ac_c" 1>&6
  5166. else
  5167.   cat > conftest.$ac_ext <<EOF
  5168. #line 5169 "configure"
  5169. #include "confdefs.h"
  5170. #include <$ac_hdr>
  5171. EOF
  5172. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5173. { (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5174. ac_err=`grep -v '^ *+' conftest.out`
  5175. if test -z "$ac_err"; then
  5176.   rm -rf conftest*
  5177.   eval "ac_cv_header_$ac_safe=yes"
  5178. else
  5179.   echo "$ac_err" >&5
  5180.   echo "configure: failed program was:" >&5
  5181.   cat conftest.$ac_ext >&5
  5182.   rm -rf conftest*
  5183.   eval "ac_cv_header_$ac_safe=no"
  5184. fi
  5185. rm -f conftest*
  5186. fi
  5187. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5188.   echo "$ac_t""yes" 1>&6
  5189.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5190.   cat >> confdefs.h <<EOF
  5191. #define $ac_tr_hdr 1
  5192. EOF
  5193.  
  5194. else
  5195.   echo "$ac_t""no" 1>&6
  5196. fi
  5197. done
  5198.  
  5199.  
  5200. echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6
  5201. echo "configure:5202: checking for XmuClientWindow in -lXmu" >&5
  5202. ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'`
  5203. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5204.   echo $ac_n "(cached) $ac_c" 1>&6
  5205. else
  5206.   ac_save_LIBS="$LIBS"
  5207. LIBS="-lXmu  $LIBS"
  5208. cat > conftest.$ac_ext <<EOF
  5209. #line 5210 "configure"
  5210. #include "confdefs.h"
  5211. /* Override any gcc2 internal prototype to avoid an error.  */
  5212. /* We use char because int might match the return type of a gcc2
  5213.     builtin and then its argument prototype would still apply.  */
  5214. char XmuClientWindow();
  5215.  
  5216. int main() {
  5217. XmuClientWindow()
  5218. ; return 0; }
  5219. EOF
  5220. if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5221.   rm -rf conftest*
  5222.   eval "ac_cv_lib_$ac_lib_var=yes"
  5223. else
  5224.   echo "configure: failed program was:" >&5
  5225.   cat conftest.$ac_ext >&5
  5226.   rm -rf conftest*
  5227.   eval "ac_cv_lib_$ac_lib_var=no"
  5228. fi
  5229. rm -f conftest*
  5230. LIBS="$ac_save_LIBS"
  5231.  
  5232. fi
  5233. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5234.   echo "$ac_t""yes" 1>&6
  5235.     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5236.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5237.   cat >> confdefs.h <<EOF
  5238. #define $ac_tr_lib 1
  5239. EOF
  5240.  
  5241.   LIBS="-lXmu $LIBS"
  5242.  
  5243. else
  5244.   echo "$ac_t""no" 1>&6
  5245.  
  5246. echo $ac_n "checking for XmuClientWindow in -lXmu_s""... $ac_c" 1>&6
  5247. echo "configure:5248: checking for XmuClientWindow in -lXmu_s" >&5
  5248. ac_lib_var=`echo Xmu_s'_'XmuClientWindow | sed 'y%./+-%__p_%'`
  5249. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5250.   echo $ac_n "(cached) $ac_c" 1>&6
  5251. else
  5252.   ac_save_LIBS="$LIBS"
  5253. LIBS="-lXmu_s  $LIBS"
  5254. cat > conftest.$ac_ext <<EOF
  5255. #line 5256 "configure"
  5256. #include "confdefs.h"
  5257. /* Override any gcc2 internal prototype to avoid an error.  */
  5258. /* We use char because int might match the return type of a gcc2
  5259.     builtin and then its argument prototype would still apply.  */
  5260. char XmuClientWindow();
  5261.  
  5262. int main() {
  5263. XmuClientWindow()
  5264. ; return 0; }
  5265. EOF
  5266. if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5267.   rm -rf conftest*
  5268.   eval "ac_cv_lib_$ac_lib_var=yes"
  5269. else
  5270.   echo "configure: failed program was:" >&5
  5271.   cat conftest.$ac_ext >&5
  5272.   rm -rf conftest*
  5273.   eval "ac_cv_lib_$ac_lib_var=no"
  5274. fi
  5275. rm -f conftest*
  5276. LIBS="$ac_save_LIBS"
  5277.  
  5278. fi
  5279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5280.   echo "$ac_t""yes" 1>&6
  5281.     ac_tr_lib=HAVE_LIB`echo Xmu_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5282.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5283.   cat >> confdefs.h <<EOF
  5284. #define $ac_tr_lib 1
  5285. EOF
  5286.  
  5287.   LIBS="-lXmu_s $LIBS"
  5288.  
  5289. else
  5290.   echo "$ac_t""no" 1>&6
  5291. fi
  5292.  
  5293. fi
  5294.  
  5295.  
  5296. echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
  5297. echo "configure:5298: checking for XextCreateExtension in -lXext" >&5
  5298. ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
  5299. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5300.   echo $ac_n "(cached) $ac_c" 1>&6
  5301. else
  5302.   ac_save_LIBS="$LIBS"
  5303. LIBS="-lXext  $LIBS"
  5304. cat > conftest.$ac_ext <<EOF
  5305. #line 5306 "configure"
  5306. #include "confdefs.h"
  5307. /* Override any gcc2 internal prototype to avoid an error.  */
  5308. /* We use char because int might match the return type of a gcc2
  5309.     builtin and then its argument prototype would still apply.  */
  5310. char XextCreateExtension();
  5311.  
  5312. int main() {
  5313. XextCreateExtension()
  5314. ; return 0; }
  5315. EOF
  5316. if { (eval echo configure:5317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5317.   rm -rf conftest*
  5318.   eval "ac_cv_lib_$ac_lib_var=yes"
  5319. else
  5320.   echo "configure: failed program was:" >&5
  5321.   cat conftest.$ac_ext >&5
  5322.   rm -rf conftest*
  5323.   eval "ac_cv_lib_$ac_lib_var=no"
  5324. fi
  5325. rm -f conftest*
  5326. LIBS="$ac_save_LIBS"
  5327.  
  5328. fi
  5329. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5330.   echo "$ac_t""yes" 1>&6
  5331.   LIBS="-lXext $LIBS"
  5332. else
  5333.   echo "$ac_t""no" 1>&6
  5334. fi
  5335.  
  5336.  
  5337. echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -l$cf_x_athena""... $ac_c" 1>&6
  5338. echo "configure:5339: checking for XawSimpleMenuAddGlobalActions in -l$cf_x_athena" >&5
  5339. ac_lib_var=`echo $cf_x_athena'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'`
  5340. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5341.   echo $ac_n "(cached) $ac_c" 1>&6
  5342. else
  5343.   ac_save_LIBS="$LIBS"
  5344. LIBS="-l$cf_x_athena  $LIBS"
  5345. cat > conftest.$ac_ext <<EOF
  5346. #line 5347 "configure"
  5347. #include "confdefs.h"
  5348. /* Override any gcc2 internal prototype to avoid an error.  */
  5349. /* We use char because int might match the return type of a gcc2
  5350.     builtin and then its argument prototype would still apply.  */
  5351. char XawSimpleMenuAddGlobalActions();
  5352.  
  5353. int main() {
  5354. XawSimpleMenuAddGlobalActions()
  5355. ; return 0; }
  5356. EOF
  5357. if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5358.   rm -rf conftest*
  5359.   eval "ac_cv_lib_$ac_lib_var=yes"
  5360. else
  5361.   echo "configure: failed program was:" >&5
  5362.   cat conftest.$ac_ext >&5
  5363.   rm -rf conftest*
  5364.   eval "ac_cv_lib_$ac_lib_var=no"
  5365. fi
  5366. rm -f conftest*
  5367. LIBS="$ac_save_LIBS"
  5368.  
  5369. fi
  5370. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5371.   echo "$ac_t""yes" 1>&6
  5372.   LIBS="-l$cf_x_athena $LIBS"
  5373. else
  5374.   echo "$ac_t""no" 1>&6
  5375.  
  5376. echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -l${cf_x_athena}_s""... $ac_c" 1>&6
  5377. echo "configure:5378: checking for XawSimpleMenuAddGlobalActions in -l${cf_x_athena}_s" >&5
  5378. ac_lib_var=`echo ${cf_x_athena}_s'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'`
  5379. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5380.   echo $ac_n "(cached) $ac_c" 1>&6
  5381. else
  5382.   ac_save_LIBS="$LIBS"
  5383. LIBS="-l${cf_x_athena}_s $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  5384. cat > conftest.$ac_ext <<EOF
  5385. #line 5386 "configure"
  5386. #include "confdefs.h"
  5387. /* Override any gcc2 internal prototype to avoid an error.  */
  5388. /* We use char because int might match the return type of a gcc2
  5389.     builtin and then its argument prototype would still apply.  */
  5390. char XawSimpleMenuAddGlobalActions();
  5391.  
  5392. int main() {
  5393. XawSimpleMenuAddGlobalActions()
  5394. ; return 0; }
  5395. EOF
  5396. if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5397.   rm -rf conftest*
  5398.   eval "ac_cv_lib_$ac_lib_var=yes"
  5399. else
  5400.   echo "configure: failed program was:" >&5
  5401.   cat conftest.$ac_ext >&5
  5402.   rm -rf conftest*
  5403.   eval "ac_cv_lib_$ac_lib_var=no"
  5404. fi
  5405. rm -f conftest*
  5406. LIBS="$ac_save_LIBS"
  5407.  
  5408. fi
  5409. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5410.   echo "$ac_t""yes" 1>&6
  5411.   LIBS="-l${cf_x_athena}_s $LIBS"
  5412. else
  5413.   echo "$ac_t""no" 1>&6
  5414. { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena) with test program" 1>&2; exit 1; }
  5415. fi
  5416.  
  5417. fi
  5418.  
  5419.  
  5420. CF_X_ATHENA_LIBS=`echo HAVE_LIB_$cf_x_athena | tr '[a-z]' '[A-Z]'`
  5421.  
  5422. cat >> confdefs.h <<EOF
  5423. #define $CF_X_ATHENA_LIBS 1
  5424. EOF
  5425.  
  5426.  
  5427.          EXTRAOBJS="$EXTRAOBJS menu.o"
  5428.     ;;
  5429.     x | X | [Xx][Tt]* | [Xx]11 )
  5430.         cat >> confdefs.h <<\EOF
  5431. #define NO_WIDGETS 1
  5432. EOF
  5433.  
  5434.     ;;
  5435.     ansi)
  5436.         SCREEN=ansi
  5437.         TARGET=vile
  5438.         cat >> confdefs.h <<\EOF
  5439. #define DISP_ANSI 1
  5440. EOF
  5441.  
  5442.     ;;
  5443.     * )
  5444.         SCREEN=tcap
  5445.         TARGET=vile
  5446.         cat >> confdefs.h <<\EOF
  5447. #define DISP_TERMCAP 1
  5448. EOF
  5449.  
  5450.         
  5451. if eval "test \"`echo '$''{'cf_cv_lib_termcap'+set}'`\" = set"; then
  5452.   echo $ac_n "(cached) $ac_c" 1>&6
  5453. else
  5454.   
  5455. cf_cv_lib_termcap=none
  5456. cat > conftest.$ac_ext <<EOF
  5457. #line 5458 "configure"
  5458. #include "confdefs.h"
  5459.  
  5460. int main() {
  5461. char *x=(char*)tgoto("",0,0)
  5462. ; return 0; }
  5463. EOF
  5464. if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5465.   rm -rf conftest*
  5466.   cat > conftest.$ac_ext <<EOF
  5467. #line 5468 "configure"
  5468. #include "confdefs.h"
  5469.  
  5470. int main() {
  5471. int x=tigetstr("")
  5472. ; return 0; }
  5473. EOF
  5474. if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5475.   rm -rf conftest*
  5476.   cf_cv_termlib=terminfo
  5477. else
  5478.   echo "configure: failed program was:" >&5
  5479.   cat conftest.$ac_ext >&5
  5480.   rm -rf conftest*
  5481.   cf_cv_termlib=termcap
  5482. fi
  5483. rm -f conftest*
  5484.     test -n "$verbose" && echo "    using functions in predefined $cf_cv_termlib LIBS" 1>&6
  5485.  
  5486.  
  5487. else
  5488.   echo "configure: failed program was:" >&5
  5489.   cat conftest.$ac_ext >&5
  5490.   rm -rf conftest*
  5491.   
  5492.  
  5493. if test "$screen" = ncurses; then
  5494.     
  5495. echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6
  5496. echo "configure:5497: checking for ncurses header file" >&5
  5497. if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
  5498.   echo $ac_n "(cached) $ac_c" 1>&6
  5499. else
  5500.   
  5501.     cat > conftest.$ac_ext <<EOF
  5502. #line 5503 "configure"
  5503. #include "confdefs.h"
  5504. #include <curses.h>
  5505. int main() {
  5506.  
  5507. #ifdef NCURSES_VERSION
  5508. printf("%s\n", NCURSES_VERSION);
  5509. #else
  5510. #ifdef __NCURSES_H
  5511. printf("old\n");
  5512. #else
  5513. make an error
  5514. #endif
  5515. #endif
  5516.     
  5517. ; return 0; }
  5518. EOF
  5519. if { (eval echo configure:5520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5520.   rm -rf conftest*
  5521.   cf_cv_ncurses_header=predefined
  5522. else
  5523.   echo "configure: failed program was:" >&5
  5524.   cat conftest.$ac_ext >&5
  5525.   rm -rf conftest*
  5526.   
  5527.     cf_search=""
  5528. if test -d "$includedir"  ; then
  5529. test "$includedir" != NONE       && cf_search="$cf_search $includedir $includedir/ncurses"
  5530. fi
  5531. if test -d "$oldincludedir"  ; then
  5532. test "$oldincludedir" != NONE    && cf_search="$cf_search $oldincludedir $oldincludedir/ncurses"
  5533. fi
  5534. if test -d "$prefix"; then
  5535. test "$prefix" != NONE           && cf_search="$cf_search $prefix/include $prefix/include/ncurses"
  5536. fi
  5537. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/include /usr/local/include/ncurses"
  5538. test "$prefix" != /usr           && cf_search="$cf_search /usr/include /usr/include/ncurses"
  5539.  
  5540.     test -n "$verbose" && echo
  5541.     for cf_incdir in $cf_search
  5542.     do
  5543.         for cf_header in \
  5544.             curses.h \
  5545.             ncurses.h
  5546.         do
  5547.             if egrep "NCURSES_[VH]" $cf_incdir/$cf_header 1>&5 2>&1; then
  5548.                 cf_cv_ncurses_header=$cf_incdir/$cf_header
  5549.                 test -n "$verbose" && echo $ac_n "    ... found $ac_c" 1>&6
  5550.                 break
  5551.             fi
  5552.             test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
  5553.         done
  5554.         test -n "$cf_cv_ncurses_header" && break
  5555.     done
  5556.     test -z "$cf_cv_ncurses_header" && { echo "configure: error: not found" 1>&2; exit 1; }
  5557.     
  5558. fi
  5559. rm -f conftest*
  5560. fi
  5561.  
  5562. echo "$ac_t""$cf_cv_ncurses_header" 1>&6
  5563. cat >> confdefs.h <<\EOF
  5564. #define NCURSES 1
  5565. EOF
  5566.  
  5567.  
  5568. cf_incdir=`echo $cf_cv_ncurses_header | sed -e 's:/[^/]*$::'`
  5569.  
  5570. case $cf_cv_ncurses_header in # (vi
  5571. */ncurses.h)
  5572.     cat >> confdefs.h <<\EOF
  5573. #define HAVE_NCURSES_H 1
  5574. EOF
  5575.  
  5576.     ;;
  5577. esac
  5578.  
  5579. case $cf_cv_ncurses_header in # (vi
  5580. predefined) # (vi
  5581.     cf_cv_ncurses_header=curses.h
  5582.     ;;
  5583. *)
  5584.     
  5585. for cf_add_incdir in $cf_incdir
  5586. do
  5587.     while true
  5588.     do
  5589.         case $cf_add_incdir in
  5590.         /usr/include) # (vi
  5591.             ;;
  5592.         *) # (vi
  5593.             CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  5594.             ;;
  5595.         esac
  5596.         cf_top_incdir=`echo $cf_add_incdir | sed -e 's:/include/.*$:/include:'`
  5597.         test "$cf_top_incdir" = "$cf_add_incdir" && break
  5598.         cf_add_incdir="$cf_top_incdir"
  5599.     done
  5600. done
  5601.  
  5602.     ;;
  5603. esac
  5604. echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  5605. echo "configure:5606: checking for ncurses version" >&5
  5606. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  5607.   echo $ac_n "(cached) $ac_c" 1>&6
  5608. else
  5609.   
  5610.     cf_cv_ncurses_version=no
  5611.     cf_tempfile=out$$
  5612.     if test "$cross_compiling" = yes; then
  5613.   
  5614.  
  5615.     # This will not work if the preprocessor splits the line after the
  5616.     # Autoconf token.  The 'unproto' program does that.
  5617.     cat > conftest.$ac_ext <<EOF
  5618. #include <${cf_cv_ncurses_header-curses.h}>
  5619. #undef Autoconf
  5620. #ifdef NCURSES_VERSION
  5621. Autoconf NCURSES_VERSION
  5622. #else
  5623. #ifdef __NCURSES_H
  5624. Autoconf "old"
  5625. #endif
  5626. ;
  5627. #endif
  5628. EOF
  5629.     cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  5630.     { (eval echo configure:5631: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  5631.     if test -f conftest.out ; then
  5632.         cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
  5633.         test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  5634.         rm -f conftest.out
  5635.     fi
  5636.  
  5637. else
  5638.   cat > conftest.$ac_ext <<EOF
  5639. #line 5640 "configure"
  5640. #include "confdefs.h"
  5641.  
  5642. #include <${cf_cv_ncurses_header-curses.h}>
  5643. int main()
  5644. {
  5645.     FILE *fp = fopen("$cf_tempfile", "w");
  5646. #ifdef NCURSES_VERSION
  5647. # ifdef NCURSES_VERSION_PATCH
  5648.     fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  5649. # else
  5650.     fprintf(fp, "%s\n", NCURSES_VERSION);
  5651. # endif
  5652. #else
  5653. # ifdef __NCURSES_H
  5654.     fprintf(fp, "old\n");
  5655. # else
  5656.     make an error
  5657. # endif
  5658. #endif
  5659.     exit(0);
  5660. }
  5661. EOF
  5662. if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5663. then
  5664.   
  5665.     cf_cv_ncurses_version=`cat $cf_tempfile`
  5666.     rm -f $cf_tempfile
  5667. else
  5668.   echo "configure: failed program was:" >&5
  5669.   cat conftest.$ac_ext >&5
  5670. fi
  5671. rm -fr conftest*
  5672. fi
  5673.  
  5674. fi
  5675.  
  5676. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  5677.  
  5678.  
  5679.     
  5680.  
  5681.     # This works, except for the special case where we find gpm, but
  5682.     # ncurses is in a nonstandard location via $LIBS, and we really want
  5683.     # to link gpm.
  5684. cf_ncurses_LIBS=""
  5685. cf_ncurses_SAVE="$LIBS"
  5686. echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  5687. echo "configure:5688: checking for Gpm_Open in -lgpm" >&5
  5688. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  5689. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5690.   echo $ac_n "(cached) $ac_c" 1>&6
  5691. else
  5692.   ac_save_LIBS="$LIBS"
  5693. LIBS="-lgpm  $LIBS"
  5694. cat > conftest.$ac_ext <<EOF
  5695. #line 5696 "configure"
  5696. #include "confdefs.h"
  5697. /* Override any gcc2 internal prototype to avoid an error.  */
  5698. /* We use char because int might match the return type of a gcc2
  5699.     builtin and then its argument prototype would still apply.  */
  5700. char Gpm_Open();
  5701.  
  5702. int main() {
  5703. Gpm_Open()
  5704. ; return 0; }
  5705. EOF
  5706. if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5707.   rm -rf conftest*
  5708.   eval "ac_cv_lib_$ac_lib_var=yes"
  5709. else
  5710.   echo "configure: failed program was:" >&5
  5711.   cat conftest.$ac_ext >&5
  5712.   rm -rf conftest*
  5713.   eval "ac_cv_lib_$ac_lib_var=no"
  5714. fi
  5715. rm -f conftest*
  5716. LIBS="$ac_save_LIBS"
  5717.  
  5718. fi
  5719. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5720.   echo "$ac_t""yes" 1>&6
  5721.   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
  5722. echo "configure:5723: checking for initscr in -lgpm" >&5
  5723. ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
  5724. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5725.   echo $ac_n "(cached) $ac_c" 1>&6
  5726. else
  5727.   ac_save_LIBS="$LIBS"
  5728. LIBS="-lgpm  $LIBS"
  5729. cat > conftest.$ac_ext <<EOF
  5730. #line 5731 "configure"
  5731. #include "confdefs.h"
  5732. /* Override any gcc2 internal prototype to avoid an error.  */
  5733. /* We use char because int might match the return type of a gcc2
  5734.     builtin and then its argument prototype would still apply.  */
  5735. char initscr();
  5736.  
  5737. int main() {
  5738. initscr()
  5739. ; return 0; }
  5740. EOF
  5741. if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5742.   rm -rf conftest*
  5743.   eval "ac_cv_lib_$ac_lib_var=yes"
  5744. else
  5745.   echo "configure: failed program was:" >&5
  5746.   cat conftest.$ac_ext >&5
  5747.   rm -rf conftest*
  5748.   eval "ac_cv_lib_$ac_lib_var=no"
  5749. fi
  5750. rm -f conftest*
  5751. LIBS="$ac_save_LIBS"
  5752.  
  5753. fi
  5754. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5755.   echo "$ac_t""yes" 1>&6
  5756.   LIBS="$cf_ncurses_SAVE"
  5757. else
  5758.   echo "$ac_t""no" 1>&6
  5759. cf_ncurses_LIBS="-lgpm"
  5760. fi
  5761.  
  5762. else
  5763.   echo "$ac_t""no" 1>&6
  5764. fi
  5765.  
  5766.  
  5767. case $host_os in #(vi
  5768. freebsd*)
  5769.     # This is only necessary if you are linking against an obsolete
  5770.     # version of ncurses (but it should do no harm, since it's static).
  5771.     echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  5772. echo "configure:5773: checking for tgoto in -lmytinfo" >&5
  5773. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  5774. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5775.   echo $ac_n "(cached) $ac_c" 1>&6
  5776. else
  5777.   ac_save_LIBS="$LIBS"
  5778. LIBS="-lmytinfo  $LIBS"
  5779. cat > conftest.$ac_ext <<EOF
  5780. #line 5781 "configure"
  5781. #include "confdefs.h"
  5782. /* Override any gcc2 internal prototype to avoid an error.  */
  5783. /* We use char because int might match the return type of a gcc2
  5784.     builtin and then its argument prototype would still apply.  */
  5785. char tgoto();
  5786.  
  5787. int main() {
  5788. tgoto()
  5789. ; return 0; }
  5790. EOF
  5791. if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5792.   rm -rf conftest*
  5793.   eval "ac_cv_lib_$ac_lib_var=yes"
  5794. else
  5795.   echo "configure: failed program was:" >&5
  5796.   cat conftest.$ac_ext >&5
  5797.   rm -rf conftest*
  5798.   eval "ac_cv_lib_$ac_lib_var=no"
  5799. fi
  5800. rm -f conftest*
  5801. LIBS="$ac_save_LIBS"
  5802.  
  5803. fi
  5804. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5805.   echo "$ac_t""yes" 1>&6
  5806.   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
  5807. else
  5808.   echo "$ac_t""no" 1>&6
  5809. fi
  5810.  
  5811.     ;;
  5812. esac
  5813.  
  5814. LIBS="$cf_ncurses_LIBS $LIBS"
  5815.  
  5816.     cf_cv_have_lib_ncurses=no
  5817.     cf_libdir=""
  5818.     echo $ac_n "checking for initscr""... $ac_c" 1>&6
  5819. echo "configure:5820: checking for initscr" >&5
  5820. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  5821.   echo $ac_n "(cached) $ac_c" 1>&6
  5822. else
  5823.   cat > conftest.$ac_ext <<EOF
  5824. #line 5825 "configure"
  5825. #include "confdefs.h"
  5826. /* System header to define __stub macros and hopefully few prototypes,
  5827.     which can conflict with char initscr(); below.  */
  5828. #include <assert.h>
  5829. /* Override any gcc2 internal prototype to avoid an error.  */
  5830. /* We use char because int might match the return type of a gcc2
  5831.     builtin and then its argument prototype would still apply.  */
  5832. char initscr();
  5833.  
  5834. int main() {
  5835.  
  5836. /* The GNU C library defines this for functions which it implements
  5837.     to always fail with ENOSYS.  Some functions are actually named
  5838.     something starting with __ and the normal name is an alias.  */
  5839. #if defined (__stub_initscr) || defined (__stub___initscr)
  5840. choke me
  5841. #else
  5842. initscr();
  5843. #endif
  5844.  
  5845. ; return 0; }
  5846. EOF
  5847. if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5848.   rm -rf conftest*
  5849.   eval "ac_cv_func_initscr=yes"
  5850. else
  5851.   echo "configure: failed program was:" >&5
  5852.   cat conftest.$ac_ext >&5
  5853.   rm -rf conftest*
  5854.   eval "ac_cv_func_initscr=no"
  5855. fi
  5856. rm -f conftest*
  5857. fi
  5858.  
  5859. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  5860.   echo "$ac_t""yes" 1>&6
  5861.   cf_cv_have_lib_ncurses=yes
  5862. else
  5863.   echo "$ac_t""no" 1>&6
  5864.  
  5865.         cf_save_LIBS="$LIBS"
  5866.         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
  5867. echo "configure:5868: checking for initscr in -lncurses" >&5
  5868.         LIBS="-lncurses $LIBS"
  5869.         cat > conftest.$ac_ext <<EOF
  5870. #line 5871 "configure"
  5871. #include "confdefs.h"
  5872. #include <${cf_cv_ncurses_header-curses.h}>
  5873. int main() {
  5874. initscr()
  5875. ; return 0; }
  5876. EOF
  5877. if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5878.   rm -rf conftest*
  5879.   echo "$ac_t""yes" 1>&6
  5880.              cf_cv_have_lib_ncurses=yes
  5881.             
  5882. else
  5883.   echo "configure: failed program was:" >&5
  5884.   cat conftest.$ac_ext >&5
  5885.   rm -rf conftest*
  5886.   echo "$ac_t""no" 1>&6
  5887.             cf_search=""
  5888. if test -d "$libdir"  ; then
  5889. test "$libdir" != NONE           && cf_search="$cf_search $libdir $libdir/ncurses"
  5890. fi
  5891. if test -d "$exec_prefix"; then
  5892. test "$exec_prefix" != NONE      && cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/ncurses"
  5893. fi
  5894. if test -d "$prefix"; then
  5895. test "$prefix" != NONE           && \
  5896. test "$prefix" != "$exec_prefix" && cf_search="$cf_search $prefix/lib $prefix/lib/ncurses"
  5897. fi
  5898. test "$prefix" != /usr/local     && cf_search="$cf_search /usr/local/lib /usr/local/lib/ncurses"
  5899. test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/ncurses"
  5900.  
  5901.             for cf_libdir in $cf_search
  5902.             do
  5903.                 echo $ac_n "checking for -lncurses in $cf_libdir""... $ac_c" 1>&6
  5904. echo "configure:5905: checking for -lncurses in $cf_libdir" >&5
  5905.                 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS"
  5906.                 cat > conftest.$ac_ext <<EOF
  5907. #line 5908 "configure"
  5908. #include "confdefs.h"
  5909. #include <${cf_cv_ncurses_header-curses.h}>
  5910. int main() {
  5911. initscr()
  5912. ; return 0; }
  5913. EOF
  5914. if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5915.   rm -rf conftest*
  5916.   echo "$ac_t""yes" 1>&6
  5917.                       cf_cv_have_lib_ncurses=yes
  5918.                      break
  5919. else
  5920.   echo "configure: failed program was:" >&5
  5921.   cat conftest.$ac_ext >&5
  5922.   rm -rf conftest*
  5923.   echo "$ac_t""no" 1>&6
  5924.                      LIBS="$cf_save_LIBS"
  5925. fi
  5926. rm -f conftest*
  5927.             done
  5928.             
  5929. fi
  5930. rm -f conftest*
  5931.         
  5932. fi
  5933.  
  5934. if test $cf_cv_have_lib_ncurses = no ; then
  5935.     { echo "configure: error: Cannot link ncurses library" 1>&2; exit 1; }
  5936. fi
  5937. case $host_os in #(vi
  5938. linux*) # Suse Linux does not follow /usr/lib convention
  5939.     ncurses="$ncurses /lib"
  5940.     ;;
  5941. esac
  5942.  
  5943.  
  5944. if test -n "$cf_ncurses_LIBS" ; then
  5945.     echo $ac_n "checking if we can link ncurses without $cf_ncurses_LIBS""... $ac_c" 1>&6
  5946. echo "configure:5947: checking if we can link ncurses without $cf_ncurses_LIBS" >&5
  5947.     cf_ncurses_SAVE="$LIBS"
  5948.     for p in $cf_ncurses_LIBS ; do
  5949.         q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'`
  5950.         if test "$q" != "$LIBS" ; then
  5951.             LIBS="$q"
  5952.         fi
  5953.     done
  5954.     cat > conftest.$ac_ext <<EOF
  5955. #line 5956 "configure"
  5956. #include "confdefs.h"
  5957. #include <${cf_cv_ncurses_header-curses.h}>
  5958. int main() {
  5959. initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  5960. ; return 0; }
  5961. EOF
  5962. if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5963.   rm -rf conftest*
  5964.   echo "$ac_t""yes" 1>&6
  5965. else
  5966.   echo "configure: failed program was:" >&5
  5967.   cat conftest.$ac_ext >&5
  5968.   rm -rf conftest*
  5969.   echo "$ac_t""no" 1>&6
  5970.          LIBS="$cf_ncurses_SAVE"
  5971. fi
  5972. rm -f conftest*
  5973. fi
  5974.  
  5975.     cf_cv_termlib=terminfo
  5976. fi
  5977.  
  5978. # HP-UX 9.x terminfo has setupterm, but no tigetstr.
  5979. if test "$termlib" = none; then
  5980.     echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6
  5981. echo "configure:5982: checking for tigetstr in -ltermlib" >&5
  5982. ac_lib_var=`echo termlib'_'tigetstr | sed 'y%./+-%__p_%'`
  5983. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5984.   echo $ac_n "(cached) $ac_c" 1>&6
  5985. else
  5986.   ac_save_LIBS="$LIBS"
  5987. LIBS="-ltermlib  $LIBS"
  5988. cat > conftest.$ac_ext <<EOF
  5989. #line 5990 "configure"
  5990. #include "confdefs.h"
  5991. /* Override any gcc2 internal prototype to avoid an error.  */
  5992. /* We use char because int might match the return type of a gcc2
  5993.     builtin and then its argument prototype would still apply.  */
  5994. char tigetstr();
  5995.  
  5996. int main() {
  5997. tigetstr()
  5998. ; return 0; }
  5999. EOF
  6000. if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6001.   rm -rf conftest*
  6002.   eval "ac_cv_lib_$ac_lib_var=yes"
  6003. else
  6004.   echo "configure: failed program was:" >&5
  6005.   cat conftest.$ac_ext >&5
  6006.   rm -rf conftest*
  6007.   eval "ac_cv_lib_$ac_lib_var=no"
  6008. fi
  6009. rm -f conftest*
  6010. LIBS="$ac_save_LIBS"
  6011.  
  6012. fi
  6013. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6014.   echo "$ac_t""yes" 1>&6
  6015.   LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=terminfo
  6016. else
  6017.   echo "$ac_t""no" 1>&6
  6018. fi
  6019.  
  6020. fi
  6021. if test "$cf_cv_lib_termcap" = none; then
  6022.     echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6
  6023. echo "configure:6024: checking for tgoto in -ltermlib" >&5
  6024. ac_lib_var=`echo termlib'_'tgoto | sed 'y%./+-%__p_%'`
  6025. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6026.   echo $ac_n "(cached) $ac_c" 1>&6
  6027. else
  6028.   ac_save_LIBS="$LIBS"
  6029. LIBS="-ltermlib  $LIBS"
  6030. cat > conftest.$ac_ext <<EOF
  6031. #line 6032 "configure"
  6032. #include "confdefs.h"
  6033. /* Override any gcc2 internal prototype to avoid an error.  */
  6034. /* We use char because int might match the return type of a gcc2
  6035.     builtin and then its argument prototype would still apply.  */
  6036. char tgoto();
  6037.  
  6038. int main() {
  6039. tgoto()
  6040. ; return 0; }
  6041. EOF
  6042. if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6043.   rm -rf conftest*
  6044.   eval "ac_cv_lib_$ac_lib_var=yes"
  6045. else
  6046.   echo "configure: failed program was:" >&5
  6047.   cat conftest.$ac_ext >&5
  6048.   rm -rf conftest*
  6049.   eval "ac_cv_lib_$ac_lib_var=no"
  6050. fi
  6051. rm -f conftest*
  6052. LIBS="$ac_save_LIBS"
  6053.  
  6054. fi
  6055. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6056.   echo "$ac_t""yes" 1>&6
  6057.   LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=termcap
  6058. else
  6059.   echo "$ac_t""no" 1>&6
  6060. fi
  6061.  
  6062. fi
  6063. if test "$cf_cv_lib_termcap" = none; then
  6064.     # allow curses library for broken AIX system.
  6065.     echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
  6066. echo "configure:6067: checking for initscr in -lcurses" >&5
  6067. ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
  6068. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6069.   echo $ac_n "(cached) $ac_c" 1>&6
  6070. else
  6071.   ac_save_LIBS="$LIBS"
  6072. LIBS="-lcurses  $LIBS"
  6073. cat > conftest.$ac_ext <<EOF
  6074. #line 6075 "configure"
  6075. #include "confdefs.h"
  6076. /* Override any gcc2 internal prototype to avoid an error.  */
  6077. /* We use char because int might match the return type of a gcc2
  6078.     builtin and then its argument prototype would still apply.  */
  6079. char initscr();
  6080.  
  6081. int main() {
  6082. initscr()
  6083. ; return 0; }
  6084. EOF
  6085. if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6086.   rm -rf conftest*
  6087.   eval "ac_cv_lib_$ac_lib_var=yes"
  6088. else
  6089.   echo "configure: failed program was:" >&5
  6090.   cat conftest.$ac_ext >&5
  6091.   rm -rf conftest*
  6092.   eval "ac_cv_lib_$ac_lib_var=no"
  6093. fi
  6094. rm -f conftest*
  6095. LIBS="$ac_save_LIBS"
  6096.  
  6097. fi
  6098. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6099.   echo "$ac_t""yes" 1>&6
  6100.   LIBS="$LIBS -lcurses" cf_cv_lib_termcap=termcap
  6101. else
  6102.   echo "$ac_t""no" 1>&6
  6103. fi
  6104.  
  6105.     echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
  6106. echo "configure:6107: checking for tgoto in -ltermcap" >&5
  6107. ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
  6108. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6109.   echo $ac_n "(cached) $ac_c" 1>&6
  6110. else
  6111.   ac_save_LIBS="$LIBS"
  6112. LIBS="-ltermcap  $LIBS"
  6113. cat > conftest.$ac_ext <<EOF
  6114. #line 6115 "configure"
  6115. #include "confdefs.h"
  6116. /* Override any gcc2 internal prototype to avoid an error.  */
  6117. /* We use char because int might match the return type of a gcc2
  6118.     builtin and then its argument prototype would still apply.  */
  6119. char tgoto();
  6120.  
  6121. int main() {
  6122. tgoto()
  6123. ; return 0; }
  6124. EOF
  6125. if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6126.   rm -rf conftest*
  6127.   eval "ac_cv_lib_$ac_lib_var=yes"
  6128. else
  6129.   echo "configure: failed program was:" >&5
  6130.   cat conftest.$ac_ext >&5
  6131.   rm -rf conftest*
  6132.   eval "ac_cv_lib_$ac_lib_var=no"
  6133. fi
  6134. rm -f conftest*
  6135. LIBS="$ac_save_LIBS"
  6136.  
  6137. fi
  6138. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6139.   echo "$ac_t""yes" 1>&6
  6140.   LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
  6141. else
  6142.   echo "$ac_t""no" 1>&6
  6143. fi
  6144.  
  6145. fi
  6146. if test "$cf_cv_lib_termcap" = none; then
  6147.     echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
  6148. echo "configure:6149: checking for tgoto in -ltermcap" >&5
  6149. ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
  6150. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6151.   echo $ac_n "(cached) $ac_c" 1>&6
  6152. else
  6153.   ac_save_LIBS="$LIBS"
  6154. LIBS="-ltermcap  $LIBS"
  6155. cat > conftest.$ac_ext <<EOF
  6156. #line 6157 "configure"
  6157. #include "confdefs.h"
  6158. /* Override any gcc2 internal prototype to avoid an error.  */
  6159. /* We use char because int might match the return type of a gcc2
  6160.     builtin and then its argument prototype would still apply.  */
  6161. char tgoto();
  6162.  
  6163. int main() {
  6164. tgoto()
  6165. ; return 0; }
  6166. EOF
  6167. if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6168.   rm -rf conftest*
  6169.   eval "ac_cv_lib_$ac_lib_var=yes"
  6170. else
  6171.   echo "configure: failed program was:" >&5
  6172.   cat conftest.$ac_ext >&5
  6173.   rm -rf conftest*
  6174.   eval "ac_cv_lib_$ac_lib_var=no"
  6175. fi
  6176. rm -f conftest*
  6177. LIBS="$ac_save_LIBS"
  6178.  
  6179. fi
  6180. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6181.   echo "$ac_t""yes" 1>&6
  6182.   LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
  6183. else
  6184.   echo "$ac_t""no" 1>&6
  6185. fi
  6186.  
  6187. fi
  6188. if test "$cf_cv_lib_termcap" = none; then
  6189.     echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6
  6190. echo "configure:6191: checking for tgoto in -lncurses" >&5
  6191. ac_lib_var=`echo ncurses'_'tgoto | sed 'y%./+-%__p_%'`
  6192. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6193.   echo $ac_n "(cached) $ac_c" 1>&6
  6194. else
  6195.   ac_save_LIBS="$LIBS"
  6196. LIBS="-lncurses  $LIBS"
  6197. cat > conftest.$ac_ext <<EOF
  6198. #line 6199 "configure"
  6199. #include "confdefs.h"
  6200. /* Override any gcc2 internal prototype to avoid an error.  */
  6201. /* We use char because int might match the return type of a gcc2
  6202.     builtin and then its argument prototype would still apply.  */
  6203. char tgoto();
  6204.  
  6205. int main() {
  6206. tgoto()
  6207. ; return 0; }
  6208. EOF
  6209. if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6210.   rm -rf conftest*
  6211.   eval "ac_cv_lib_$ac_lib_var=yes"
  6212. else
  6213.   echo "configure: failed program was:" >&5
  6214.   cat conftest.$ac_ext >&5
  6215.   rm -rf conftest*
  6216.   eval "ac_cv_lib_$ac_lib_var=no"
  6217. fi
  6218. rm -f conftest*
  6219. LIBS="$ac_save_LIBS"
  6220.  
  6221. fi
  6222. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6223.   echo "$ac_t""yes" 1>&6
  6224.   LIBS="$LIBS -lncurses" cf_cv_lib_termcap=ncurses
  6225. else
  6226.   echo "$ac_t""no" 1>&6
  6227. fi
  6228.  
  6229. fi
  6230.  
  6231. fi
  6232. rm -f conftest*
  6233. if test "$cf_cv_lib_termcap" = none; then
  6234.     { echo "configure: error: Can't find -ltermlib, -lcurses, or -ltermcap" 1>&2; exit 1; }
  6235. fi
  6236.  
  6237. fi
  6238.  
  6239.     ;;
  6240. esac
  6241.  
  6242. : Check for termcap vs terminfo:
  6243. cf_tc_funcs=""
  6244. cf_tc_externs=""
  6245. if test ".$cf_cv_lib_termcap" = .terminfo ; then
  6246.     cat >> confdefs.h <<\EOF
  6247. #define USE_TERMINFO 1
  6248. EOF
  6249.  
  6250.     cf_tc_funcs="tigetint tigetnum tparam tparm"
  6251.     cf_tc_externs="$cf_tc_funcs tgoto tigetstr tputs tigetflag"
  6252. elif test ".$cf_cv_lib_termcap" = .termcap ; then
  6253.     # BSD 'tputs()' may need 'PC' to be set.
  6254.     cat > conftest.$ac_ext <<EOF
  6255. #line 6256 "configure"
  6256. #include "confdefs.h"
  6257.  
  6258. int main() {
  6259. extern char PC; PC = 0
  6260. ; return 0; }
  6261. EOF
  6262. if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6263.   rm -rf conftest*
  6264.   cat >> confdefs.h <<\EOF
  6265. #define HAVE_EXTERN_TCAP_PC 1
  6266. EOF
  6267.  
  6268. else
  6269.   echo "configure: failed program was:" >&5
  6270.   cat conftest.$ac_ext >&5
  6271. fi
  6272. rm -f conftest*
  6273.     cf_tc_funcs="tgetint tgetnum tparam tparm"
  6274.     cf_tc_externs="$cf_tc_funcs tgoto tgetstr tputs tgetent tgetflag"
  6275. fi
  6276.  
  6277. LIBS="$LIBS $X_EXTRA_LIBS"
  6278.  
  6279. for ac_func in \
  6280. access \
  6281. alarm \
  6282. getcwd \
  6283. gethostname \
  6284. getpass \
  6285. getwd \
  6286. killpg \
  6287. link \
  6288. mkdir \
  6289. poll \
  6290. putenv \
  6291. select \
  6292. setitimer \
  6293. setsid \
  6294. setvbuf \
  6295. sigaction \
  6296. sigprocmask \
  6297. strchr \
  6298. strrchr \
  6299. symlink \
  6300. tcgetattr \
  6301. ttyname \
  6302. utime \
  6303. utimes \
  6304. $cf_tc_funcs \
  6305.  
  6306. do
  6307. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  6308. echo "configure:6309: checking for $ac_func" >&5
  6309. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  6310.   echo $ac_n "(cached) $ac_c" 1>&6
  6311. else
  6312.   cat > conftest.$ac_ext <<EOF
  6313. #line 6314 "configure"
  6314. #include "confdefs.h"
  6315. /* System header to define __stub macros and hopefully few prototypes,
  6316.     which can conflict with char $ac_func(); below.  */
  6317. #include <assert.h>
  6318. /* Override any gcc2 internal prototype to avoid an error.  */
  6319. /* We use char because int might match the return type of a gcc2
  6320.     builtin and then its argument prototype would still apply.  */
  6321. char $ac_func();
  6322.  
  6323. int main() {
  6324.  
  6325. /* The GNU C library defines this for functions which it implements
  6326.     to always fail with ENOSYS.  Some functions are actually named
  6327.     something starting with __ and the normal name is an alias.  */
  6328. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  6329. choke me
  6330. #else
  6331. $ac_func();
  6332. #endif
  6333.  
  6334. ; return 0; }
  6335. EOF
  6336. if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6337.   rm -rf conftest*
  6338.   eval "ac_cv_func_$ac_func=yes"
  6339. else
  6340.   echo "configure: failed program was:" >&5
  6341.   cat conftest.$ac_ext >&5
  6342.   rm -rf conftest*
  6343.   eval "ac_cv_func_$ac_func=no"
  6344. fi
  6345. rm -f conftest*
  6346. fi
  6347.  
  6348. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  6349.   echo "$ac_t""yes" 1>&6
  6350.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  6351.   cat >> confdefs.h <<EOF
  6352. #define $ac_tr_func 1
  6353. EOF
  6354.  
  6355. else
  6356.   echo "$ac_t""no" 1>&6
  6357. fi
  6358. done
  6359.  
  6360.  
  6361.  
  6362. echo $ac_n "checking for standard qsort""... $ac_c" 1>&6
  6363. echo "configure:6364: checking for standard qsort" >&5
  6364. if eval "test \"`echo '$''{'cf_cv_ansi_qsort'+set}'`\" = set"; then
  6365.   echo $ac_n "(cached) $ac_c" 1>&6
  6366. else
  6367.   
  6368.     cat > conftest.$ac_ext <<EOF
  6369. #line 6370 "configure"
  6370. #include "confdefs.h"
  6371.  
  6372. #if HAVE_STDLIB_H
  6373. #include <stdlib.h>
  6374. #endif
  6375.     int compare(const void *a, const void *b)
  6376.     { return (*(int *)a - *(int *)b); } 
  6377. int main() {
  6378.  extern long *vector;
  6379.       qsort(vector, 1, 1, compare); 
  6380. ; return 0; }
  6381. EOF
  6382. if { (eval echo configure:6383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6383.   rm -rf conftest*
  6384.   cf_cv_ansi_qsort=yes
  6385. else
  6386.   echo "configure: failed program was:" >&5
  6387.   cat conftest.$ac_ext >&5
  6388.   rm -rf conftest*
  6389.   cf_cv_ansi_qsort=no
  6390. fi
  6391. rm -f conftest*
  6392.  
  6393. fi
  6394.  
  6395. echo "$ac_t""$cf_cv_ansi_qsort" 1>&6
  6396. if test $cf_cv_ansi_qsort = yes; then
  6397.     cat >> confdefs.h <<\EOF
  6398. #define ANSI_QSORT 1
  6399. EOF
  6400.  
  6401. else
  6402.     cat >> confdefs.h <<\EOF
  6403. #define ANSI_QSORT 0
  6404. EOF
  6405.  
  6406. fi
  6407.  
  6408.  
  6409. ###    Miscellaneous options
  6410. if test -n "$cf_x_athena" ; then
  6411.     echo $ac_n "checking if you want to use Xaw scrollbars rather than our own""... $ac_c" 1>&6
  6412. echo "configure:6413: checking if you want to use Xaw scrollbars rather than our own" >&5
  6413.     
  6414. # Check whether --with-Xaw-scrollbars or --without-Xaw-scrollbars was given.
  6415. if test "${with_Xaw_scrollbars+set}" = set; then
  6416.   withval="$with_Xaw_scrollbars"
  6417.   cf_Xaw_scrollbars=$withval
  6418. else
  6419.   cf_Xaw_scrollbars=no
  6420. fi
  6421.  
  6422.     echo "$ac_t""$cf_Xaw_scrollbars" 1>&6
  6423.  
  6424.     if test "$cf_Xaw_scrollbars" = no ; then
  6425.     cat >> confdefs.h <<\EOF
  6426. #define OPT_KEV_SCROLLBARS 1
  6427. EOF
  6428.  
  6429.     cat >> confdefs.h <<\EOF
  6430. #define OPT_KEV_DRAGGING 1
  6431. EOF
  6432.  
  6433.     else
  6434.     cat >> confdefs.h <<\EOF
  6435. #define OPT_XAW_SCROLLBARS 1
  6436. EOF
  6437.  
  6438.     echo $ac_n "checking if you want to use the drag/scrolling extension with Xaw""... $ac_c" 1>&6
  6439. echo "configure:6440: checking if you want to use the drag/scrolling extension with Xaw" >&5
  6440.     
  6441. # Check whether --with-drag-extension or --without-drag-extension was given.
  6442. if test "${with_drag_extension+set}" = set; then
  6443.   withval="$with_drag_extension"
  6444.   cf_drag_extension=$withval
  6445. else
  6446.   cf_drag_extension=no
  6447. fi
  6448.  
  6449.     echo "$ac_t""$cf_drag_extension" 1>&6
  6450.     if test "$cf_drag_extension" != "no" ; then
  6451.         cat >> confdefs.h <<\EOF
  6452. #define OPT_KEV_DRAGGING 1
  6453. EOF
  6454.  
  6455.     fi
  6456.     fi
  6457. fi
  6458.  
  6459. echo $ac_n "checking if you want to change the number of exec-macros""... $ac_c" 1>&6
  6460. echo "configure:6461: checking if you want to change the number of exec-macros" >&5
  6461.  
  6462. # Check whether --with-exec-macros or --without-exec-macros was given.
  6463. if test "${with_exec_macros+set}" = set; then
  6464.   withval="$with_exec_macros"
  6465.   cf_exec_macros=$withval
  6466. else
  6467.   cf_exec_macros=no
  6468. fi
  6469.  
  6470. echo "$ac_t""$cf_exec_macros" 1>&6
  6471. test "$cf_exec_macros" != no && cat >> confdefs.h <<\EOF
  6472. #define OPT_EXEC_MACROS $cf_exec_macros
  6473. EOF
  6474.  
  6475.  
  6476. # I don't know of a reliable test for working locale, but we can at least check
  6477. # that it is available before offering it as an option.
  6478. echo $ac_n "checking for setlocale""... $ac_c" 1>&6
  6479. echo "configure:6480: checking for setlocale" >&5
  6480. if eval "test \"`echo '$''{'ac_cv_func_setlocale'+set}'`\" = set"; then
  6481.   echo $ac_n "(cached) $ac_c" 1>&6
  6482. else
  6483.   cat > conftest.$ac_ext <<EOF
  6484. #line 6485 "configure"
  6485. #include "confdefs.h"
  6486. /* System header to define __stub macros and hopefully few prototypes,
  6487.     which can conflict with char setlocale(); below.  */
  6488. #include <assert.h>
  6489. /* Override any gcc2 internal prototype to avoid an error.  */
  6490. /* We use char because int might match the return type of a gcc2
  6491.     builtin and then its argument prototype would still apply.  */
  6492. char setlocale();
  6493.  
  6494. int main() {
  6495.  
  6496. /* The GNU C library defines this for functions which it implements
  6497.     to always fail with ENOSYS.  Some functions are actually named
  6498.     something starting with __ and the normal name is an alias.  */
  6499. #if defined (__stub_setlocale) || defined (__stub___setlocale)
  6500. choke me
  6501. #else
  6502. setlocale();
  6503. #endif
  6504.  
  6505. ; return 0; }
  6506. EOF
  6507. if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6508.   rm -rf conftest*
  6509.   eval "ac_cv_func_setlocale=yes"
  6510. else
  6511.   echo "configure: failed program was:" >&5
  6512.   cat conftest.$ac_ext >&5
  6513.   rm -rf conftest*
  6514.   eval "ac_cv_func_setlocale=no"
  6515. fi
  6516. rm -f conftest*
  6517. fi
  6518.  
  6519. if eval "test \"`echo '$ac_cv_func_'setlocale`\" = yes"; then
  6520.   echo "$ac_t""yes" 1>&6
  6521.   
  6522. ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
  6523. echo $ac_n "checking for locale.h""... $ac_c" 1>&6
  6524. echo "configure:6525: checking for locale.h" >&5
  6525. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  6526.   echo $ac_n "(cached) $ac_c" 1>&6
  6527. else
  6528.   cat > conftest.$ac_ext <<EOF
  6529. #line 6530 "configure"
  6530. #include "confdefs.h"
  6531. #include <locale.h>
  6532. EOF
  6533. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6534. { (eval echo configure:6535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6535. ac_err=`grep -v '^ *+' conftest.out`
  6536. if test -z "$ac_err"; then
  6537.   rm -rf conftest*
  6538.   eval "ac_cv_header_$ac_safe=yes"
  6539. else
  6540.   echo "$ac_err" >&5
  6541.   echo "configure: failed program was:" >&5
  6542.   cat conftest.$ac_ext >&5
  6543.   rm -rf conftest*
  6544.   eval "ac_cv_header_$ac_safe=no"
  6545. fi
  6546. rm -f conftest*
  6547. fi
  6548. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6549.   echo "$ac_t""yes" 1>&6
  6550.   
  6551. echo $ac_n "checking if you want to use i18n locale support""... $ac_c" 1>&6
  6552. echo "configure:6553: checking if you want to use i18n locale support" >&5
  6553.  
  6554. # Check whether --with-locale or --without-locale was given.
  6555. if test "${with_locale+set}" = set; then
  6556.   withval="$with_locale"
  6557.   cf_locale=$withval
  6558. else
  6559.   cf_locale=no
  6560. fi
  6561.  
  6562. echo "$ac_t""$cf_locale" 1>&6
  6563. test "$cf_locale" != no && cat >> confdefs.h <<\EOF
  6564. #define OPT_LOCALE 1
  6565. EOF
  6566.  
  6567.  
  6568. else
  6569.   echo "$ac_t""no" 1>&6
  6570. fi
  6571.  
  6572. else
  6573.   echo "$ac_t""no" 1>&6
  6574. fi
  6575.  
  6576.  
  6577. ###    Debugging/development options
  6578.  
  6579. # Check whether --with-dbmalloc or --without-dbmalloc was given.
  6580. if test "${with_dbmalloc+set}" = set; then
  6581.   withval="$with_dbmalloc"
  6582.   cat >> confdefs.h <<\EOF
  6583. #define USE_DBMALLOC 1
  6584. EOF
  6585.  
  6586.      LIBS="$LIBS -ldbmalloc"
  6587. fi
  6588.  
  6589.  
  6590.  
  6591. # Check whether --with-dmalloc or --without-dmalloc was given.
  6592. if test "${with_dmalloc+set}" = set; then
  6593.   withval="$with_dmalloc"
  6594.   cat >> confdefs.h <<\EOF
  6595. #define USE_DMALLOC 1
  6596. EOF
  6597.  
  6598.      LIBS="$LIBS -ldmalloc"
  6599. fi
  6600.  
  6601.  
  6602.  
  6603. # Check whether --with-no-leaks or --without-no-leaks was given.
  6604. if test "${with_no_leaks+set}" = set; then
  6605.   withval="$with_no_leaks"
  6606.   cat >> confdefs.h <<\EOF
  6607. #define NO_LEAKS 1
  6608. EOF
  6609.  
  6610. fi
  6611.  
  6612.  
  6613.  
  6614. # Check whether --with-trace or --without-trace was given.
  6615. if test "${with_trace+set}" = set; then
  6616.   withval="$with_trace"
  6617.   cat >> confdefs.h <<\EOF
  6618. #define OPT_TRACE 1
  6619. EOF
  6620.  
  6621.      EXTRAOBJS="$EXTRAOBJS trace.o"
  6622. fi
  6623.  
  6624.  
  6625. CFLAGS="$saved_CFLAGS"
  6626.  
  6627. # Check whether --with-warnings or --without-warnings was given.
  6628. if test "${with_warnings+set}" = set; then
  6629.   withval="$with_warnings"
  6630.   with_warnings=$withval
  6631. fi
  6632.  
  6633. if test -n "$with_warnings"
  6634. then
  6635.     
  6636. if test -n "$GCC"
  6637. then
  6638. cat > conftest.i <<EOF
  6639. #ifndef GCC_PRINTF
  6640. #define GCC_PRINTF 0
  6641. #endif
  6642. #ifndef GCC_SCANF
  6643. #define GCC_SCANF 0
  6644. #endif
  6645. #ifndef GCC_NORETURN
  6646. #define GCC_NORETURN /* nothing */
  6647. #endif
  6648. #ifndef GCC_UNUSED
  6649. #define GCC_UNUSED /* nothing */
  6650. #endif
  6651. EOF
  6652. if test -n "$GCC"
  6653. then
  6654.     echo "checking for gcc __attribute__ directives" 1>&6
  6655. echo "configure:6656: checking for gcc __attribute__ directives" >&5
  6656.     cat > conftest.$ac_ext <<EOF
  6657. #line 6658 "configure"
  6658. #include "confdefs.h"
  6659. #include "conftest.h"
  6660. #include "conftest.i"
  6661. #if    GCC_PRINTF
  6662. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
  6663. #else
  6664. #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
  6665. #endif
  6666. #if    GCC_SCANF
  6667. #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
  6668. #else
  6669. #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
  6670. #endif
  6671. extern void wow(char *,...) GCC_SCANFLIKE(1,2);
  6672. extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
  6673. extern void foo(void) GCC_NORETURN;
  6674. int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
  6675. EOF
  6676.         for cf_attribute in scanf printf unused noreturn
  6677.     do
  6678.         
  6679. CF_ATTRIBUTE=`echo $cf_attribute | tr '[a-z]' '[A-Z]'`
  6680.  
  6681.         cf_directive="__attribute__(($cf_attribute))"
  6682.         echo "checking for gcc $cf_directive" 1>&5
  6683.         case $cf_attribute in
  6684.         scanf|printf)
  6685.         cat >conftest.h <<EOF
  6686. #define GCC_$CF_ATTRIBUTE 1
  6687. EOF
  6688.             ;;
  6689.         *)
  6690.         cat >conftest.h <<EOF
  6691. #define GCC_$CF_ATTRIBUTE $cf_directive
  6692. EOF
  6693.             ;;
  6694.         esac
  6695.         if { (eval echo configure:6696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6696.             test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
  6697.             cat conftest.h >>confdefs.h
  6698. #        else
  6699. #            sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
  6700.         fi
  6701.     done
  6702. else
  6703.     fgrep define conftest.i >>confdefs.h
  6704. fi
  6705. rm -rf conftest*
  6706. fi
  6707.  
  6708.     
  6709. if test -n "$GCC"
  6710. then
  6711.         cat > conftest.$ac_ext <<EOF
  6712. #line 6713 "configure"
  6713. int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
  6714. EOF
  6715.         echo "checking for gcc warning options" 1>&6
  6716. echo "configure:6717: checking for gcc warning options" >&5
  6717.     cf_save_CFLAGS="$CFLAGS"
  6718.     EXTRA_CFLAGS="-W -Wall"
  6719.     cf_warn_CONST=""
  6720.     test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
  6721.     for cf_opt in \
  6722.         Wbad-function-cast \
  6723.         Wcast-align \
  6724.         Wcast-qual \
  6725.         Winline \
  6726.         Wmissing-declarations \
  6727.         Wmissing-prototypes \
  6728.         Wnested-externs \
  6729.         Wpointer-arith \
  6730.         Wshadow \
  6731.         Wstrict-prototypes $cf_warn_CONST
  6732.     do
  6733.         CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  6734.         if { (eval echo configure:6735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6735.             test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
  6736.             EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  6737.             test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
  6738.         fi
  6739.     done
  6740.     rm -f conftest*
  6741.     CFLAGS="$cf_save_CFLAGS"
  6742. fi
  6743.  
  6744.  
  6745. fi
  6746.  
  6747. ###    Do these last, since they rely on a properly constructed config.h
  6748.  
  6749. ###    Mandatory checks for missing prototypes:
  6750. CHECK_DECL_FLAG="-I. -I$srcdir -Dscrn_chosen"
  6751. VILE_CHECK_HDRS='
  6752. #define CHECK_PROTOTYPES 1
  6753. #include <estruct.h>
  6754. '
  6755. CHECK_DECL_HDRS="$VILE_CHECK_HDRS"
  6756.  
  6757. for ac_func in \
  6758. environ \
  6759. getenv \
  6760. getpass \
  6761. getwd \
  6762. malloc \
  6763. realloc \
  6764. rindex \
  6765. strerror \
  6766. strtol \
  6767.  
  6768. do
  6769.  
  6770. ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`
  6771.  
  6772.  
  6773. echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
  6774. echo "configure:6775: checking for missing "${ac_func}" extern" >&5
  6775. if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  6776.   echo $ac_n "(cached) $ac_c" 1>&6
  6777. else
  6778.   
  6779. cf_save_CFLAGS="$CFLAGS"
  6780. CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
  6781. cat > conftest.$ac_ext <<EOF
  6782. #line 6783 "configure"
  6783. #include "confdefs.h"
  6784.  
  6785. $CHECK_DECL_HDRS
  6786.  
  6787. #undef ${ac_func}
  6788. struct zowie { int a; double b; struct zowie *c; char d; };
  6789. extern struct zowie *${ac_func}();
  6790.  
  6791. int main() {
  6792.  
  6793. #if HAVE_LIBXT        /* needed for SunOS 4.0.3 or 4.1 */
  6794. XtToolkitInitialize();
  6795. #endif
  6796.  
  6797. ; return 0; }
  6798. EOF
  6799. if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6800.   rm -rf conftest*
  6801.   eval 'cf_cv_func_'${ac_func}'=yes'
  6802. else
  6803.   echo "configure: failed program was:" >&5
  6804.   cat conftest.$ac_ext >&5
  6805.   rm -rf conftest*
  6806.   eval 'cf_cv_func_'${ac_func}'=no'
  6807. fi
  6808. rm -f conftest*
  6809. CFLAGS="$cf_save_CFLAGS"
  6810.  
  6811. fi
  6812.  
  6813. eval 'cf_result=$cf_cv_func_'${ac_func}
  6814. echo "$ac_t""$cf_result" 1>&6
  6815. test $cf_result = yes && cat >> confdefs.h <<EOF
  6816. #define MISSING_EXTERN_${ac_tr_func} 1
  6817. EOF
  6818.  
  6819. done
  6820.  
  6821.  
  6822. if test -n "$cf_tc_externs"
  6823. then
  6824. CHECK_DECL_HDRS="$VILE_CHECK_HDRS
  6825. #include <tcap.h>
  6826. "
  6827.  
  6828. if test ".$cf_cv_lib_termcap" != ".none" ; then
  6829.     
  6830. echo $ac_n "checking for term.h""... $ac_c" 1>&6
  6831. echo "configure:6832: checking for term.h" >&5
  6832. if eval "test \"`echo '$''{'cf_cv_have_term_h'+set}'`\" = set"; then
  6833.   echo $ac_n "(cached) $ac_c" 1>&6
  6834. else
  6835.   
  6836.     cat > conftest.$ac_ext <<EOF
  6837. #line 6838 "configure"
  6838. #include "confdefs.h"
  6839.  
  6840. #include <curses.h>
  6841. #include <term.h>
  6842. int main() {
  6843. WINDOW *x
  6844. ; return 0; }
  6845. EOF
  6846. if { (eval echo configure:6847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6847.   rm -rf conftest*
  6848.   cf_cv_have_term_h=yes
  6849. else
  6850.   echo "configure: failed program was:" >&5
  6851.   cat conftest.$ac_ext >&5
  6852.   rm -rf conftest*
  6853.   cf_cv_have_term_h=no
  6854. fi
  6855. rm -f conftest*
  6856.     
  6857. fi
  6858.  
  6859. echo "$ac_t""$cf_cv_have_term_h" 1>&6
  6860. test $cf_cv_have_term_h = yes && cat >> confdefs.h <<\EOF
  6861. #define HAVE_TERM_H 1
  6862. EOF
  6863.  
  6864.  
  6865.  
  6866.  
  6867. echo $ac_n "checking if we should include curses.h or termcap.h""... $ac_c" 1>&6
  6868. echo "configure:6869: checking if we should include curses.h or termcap.h" >&5
  6869. if eval "test \"`echo '$''{'cf_cv_need_curses_h'+set}'`\" = set"; then
  6870.   echo $ac_n "(cached) $ac_c" 1>&6
  6871. else
  6872.   
  6873. cf_save_CFLAGS="$CFLAGS"
  6874. cf_cv_need_curses_h=no
  6875.  
  6876. for cf_t_opts in "" "NEED_TERMCAP_H"
  6877. do
  6878. for cf_c_opts in "" "NEED_CURSES_H"
  6879. do
  6880.  
  6881.     CFLAGS="$cf_save_CFLAGS $CHECK_DECL_FLAG"
  6882.     test -n "$cf_c_opts" && CFLAGS="$CFLAGS -D$cf_c_opts"
  6883.     test -n "$cf_t_opts" && CFLAGS="$CFLAGS -D$cf_t_opts"
  6884.  
  6885.     cat > conftest.$ac_ext <<EOF
  6886. #line 6887 "configure"
  6887. #include "confdefs.h"
  6888. /* $cf_c_opts $cf_t_opts */
  6889. $CHECK_DECL_HDRS
  6890. int main() {
  6891. char *x = (char *)tgoto("")
  6892. ; return 0; }
  6893. EOF
  6894. if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6895.   rm -rf conftest*
  6896.   test "$cf_cv_need_curses_h" = no && {
  6897.          cf_cv_need_curses_h=maybe
  6898.          cf_ok_c_opts=$cf_c_opts
  6899.          cf_ok_t_opts=$cf_t_opts
  6900.     }
  6901. else
  6902.   echo "configure: failed program was:" >&5
  6903.   cat conftest.$ac_ext >&5
  6904.   rm -rf conftest*
  6905.   echo "Recompiling with corrected call (C:$cf_c_opts, T:$cf_t_opts)" >&5
  6906.     cat > conftest.$ac_ext <<EOF
  6907. #line 6908 "configure"
  6908. #include "confdefs.h"
  6909.  
  6910. $CHECK_DECL_HDRS
  6911. int main() {
  6912. char *x = (char *)tgoto("",0,0)
  6913. ; return 0; }
  6914. EOF
  6915. if { (eval echo configure:6916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6916.   rm -rf conftest*
  6917.   cf_cv_need_curses_h=yes
  6918.      cf_ok_c_opts=$cf_c_opts
  6919.      cf_ok_t_opts=$cf_t_opts
  6920. else
  6921.   echo "configure: failed program was:" >&5
  6922.   cat conftest.$ac_ext >&5
  6923. fi
  6924. rm -f conftest*
  6925. fi
  6926. rm -f conftest*
  6927.  
  6928.     CFLAGS="$cf_save_CFLAGS"
  6929.     test "$cf_cv_need_curses_h" = yes && break
  6930. done
  6931.     test "$cf_cv_need_curses_h" = yes && break
  6932. done
  6933.  
  6934. if test "$cf_cv_need_curses_h" != no ; then
  6935.     echo "Curses/termcap test = $cf_cv_need_curses_h (C:$cf_ok_c_opts, T:$cf_ok_t_opts)" >&5
  6936.     if test -n "$cf_ok_c_opts" ; then
  6937.         if test -n "$cf_ok_t_opts" ; then
  6938.             cf_cv_need_curses_h=both
  6939.         else
  6940.             cf_cv_need_curses_h=curses.h
  6941.         fi
  6942.     elif test -n "$cf_ok_t_opts" ; then
  6943.         cf_cv_need_curses_h=termcap.h
  6944.     elif test "$cf_cv_have_term_h" = yes ; then
  6945.         cf_cv_need_curses_h=term.h
  6946.     else
  6947.         cf_cv_need_curses_h=no
  6948.     fi
  6949. fi
  6950.  
  6951. fi
  6952.  
  6953. echo "$ac_t""$cf_cv_need_curses_h" 1>&6
  6954.  
  6955. case $cf_cv_need_curses_h in
  6956. both) #(vi
  6957.     cat >> confdefs.h <<EOF
  6958. #define NEED_CURSES_H 1
  6959. EOF
  6960.  
  6961.     cat >> confdefs.h <<EOF
  6962. #define NEED_TERMCAP_H 1
  6963. EOF
  6964.  
  6965.     ;;
  6966. curses.h) #(vi
  6967.     cat >> confdefs.h <<EOF
  6968. #define NEED_CURSES_H 1
  6969. EOF
  6970.  
  6971.     ;;
  6972. termcap.h) #(vi
  6973.     cat >> confdefs.h <<EOF
  6974. #define NEED_TERMCAP_H 1
  6975. EOF
  6976.  
  6977.     ;;
  6978. esac
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984. echo $ac_n "checking declaration of tputs 3rd param""... $ac_c" 1>&6
  6985. echo "configure:6986: checking declaration of tputs 3rd param" >&5
  6986. if eval "test \"`echo '$''{'cf_cv_type_outchar'+set}'`\" = set"; then
  6987.   echo $ac_n "(cached) $ac_c" 1>&6
  6988. else
  6989.   
  6990.  
  6991. cf_cv_type_outchar="int OutChar(int)"
  6992. cf_cv_found=no
  6993. cf_save_CFLAGS="$CFLAGS"
  6994. CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
  6995.  
  6996. for P in int void; do
  6997. for Q in int void; do
  6998. for R in int char; do
  6999. for S in "" const; do
  7000.  
  7001.     cat > conftest.$ac_ext <<EOF
  7002. #line 7003 "configure"
  7003. #include "confdefs.h"
  7004. $CHECK_DECL_HDRS
  7005. int main() {
  7006. extern $Q OutChar($R);
  7007.     extern $P tputs ($S char *string, int nlines, $Q (*_f)($R));
  7008.     tputs("", 1, OutChar)
  7009. ; return 0; }
  7010. EOF
  7011. if { (eval echo configure:7012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  7012.   rm -rf conftest*
  7013.   cf_cv_type_outchar="$Q OutChar($R)"
  7014.      cf_cv_found=yes
  7015.      break
  7016. else
  7017.   echo "configure: failed program was:" >&5
  7018.   cat conftest.$ac_ext >&5
  7019. fi
  7020. rm -f conftest*
  7021. done
  7022.     test $cf_cv_found = yes && break
  7023. done
  7024.     test $cf_cv_found = yes && break
  7025. done
  7026.     test $cf_cv_found = yes && break
  7027. done
  7028.     
  7029. fi
  7030.  
  7031. echo "$ac_t""$cf_cv_type_outchar" 1>&6
  7032. case $cf_cv_type_outchar in
  7033. int*)
  7034.     cat >> confdefs.h <<\EOF
  7035. #define OUTC_RETURN 1
  7036. EOF
  7037.  
  7038.     ;;
  7039. esac
  7040. case $cf_cv_type_outchar in
  7041. *char*)
  7042.     cat >> confdefs.h <<\EOF
  7043. #define OUTC_ARGS char c
  7044. EOF
  7045.  
  7046.     ;;
  7047. esac
  7048.  
  7049. CFLAGS="$cf_save_CFLAGS"
  7050.  
  7051. fi
  7052. for ac_func in \
  7053. $cf_tc_externs \
  7054.  
  7055. do
  7056.  
  7057. ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`
  7058.  
  7059.  
  7060. echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
  7061. echo "configure:7062: checking for missing "${ac_func}" extern" >&5
  7062. if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  7063.   echo $ac_n "(cached) $ac_c" 1>&6
  7064. else
  7065.   
  7066. cf_save_CFLAGS="$CFLAGS"
  7067. CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
  7068. cat > conftest.$ac_ext <<EOF
  7069. #line 7070 "configure"
  7070. #include "confdefs.h"
  7071.  
  7072. $CHECK_DECL_HDRS
  7073.  
  7074. #undef ${ac_func}
  7075. struct zowie { int a; double b; struct zowie *c; char d; };
  7076. extern struct zowie *${ac_func}();
  7077.  
  7078. int main() {
  7079.  
  7080. #if HAVE_LIBXT        /* needed for SunOS 4.0.3 or 4.1 */
  7081. XtToolkitInitialize();
  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 'cf_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 'cf_cv_func_'${ac_func}'=no'
  7094. fi
  7095. rm -f conftest*
  7096. CFLAGS="$cf_save_CFLAGS"
  7097.  
  7098. fi
  7099.  
  7100. eval 'cf_result=$cf_cv_func_'${ac_func}
  7101. echo "$ac_t""$cf_result" 1>&6
  7102. test $cf_result = yes && cat >> confdefs.h <<EOF
  7103. #define MISSING_EXTERN_${ac_tr_func} 1
  7104. EOF
  7105.  
  7106. done
  7107.  
  7108. fi
  7109.  
  7110. ###    Optional checks for missing functions (enabled with --with-warnings)
  7111. if test -n "$with_warnings"
  7112. then
  7113. CHECK_DECL_HDRS="$VILE_CHECK_HDRS"
  7114. for ac_func in \
  7115. _filbuf \
  7116. _flsbuf \
  7117. access \
  7118. alarm \
  7119. atoi \
  7120. bzero \
  7121. chdir \
  7122. close \
  7123. dup \
  7124. execlp \
  7125. fclose \
  7126. fflush \
  7127. fgetc \
  7128. fileno \
  7129. fork \
  7130. fprintf \
  7131. fputc \
  7132. fputs \
  7133. fread \
  7134. free \
  7135. fseek \
  7136. fwrite \
  7137. gethostname \
  7138. getpgrp \
  7139. getpid \
  7140. getuid \
  7141. isatty \
  7142. kill \
  7143. killpg \
  7144. link \
  7145. longjmp \
  7146. lstat \
  7147. memset \
  7148. mkdir \
  7149. mktemp \
  7150. open \
  7151. perror \
  7152. pipe \
  7153. printf \
  7154. puts \
  7155. qsort \
  7156. read \
  7157. readlink \
  7158. select \
  7159. setbuf \
  7160. setbuffer \
  7161. setitimer \
  7162. setjmp \
  7163. setpgrp \
  7164. setsid \
  7165. setvbuf \
  7166. sleep \
  7167. sscanf \
  7168. system \
  7169. time \
  7170. unlink \
  7171. utime \
  7172. utimes \
  7173. wait \
  7174. write \
  7175.  
  7176. do
  7177.  
  7178. ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`
  7179.  
  7180.  
  7181. echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
  7182. echo "configure:7183: checking for missing "${ac_func}" extern" >&5
  7183. if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  7184.   echo $ac_n "(cached) $ac_c" 1>&6
  7185. else
  7186.   
  7187. cf_save_CFLAGS="$CFLAGS"
  7188. CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
  7189. cat > conftest.$ac_ext <<EOF
  7190. #line 7191 "configure"
  7191. #include "confdefs.h"
  7192.  
  7193. $CHECK_DECL_HDRS
  7194.  
  7195. #undef ${ac_func}
  7196. struct zowie { int a; double b; struct zowie *c; char d; };
  7197. extern struct zowie *${ac_func}();
  7198.  
  7199. int main() {
  7200.  
  7201. #if HAVE_LIBXT        /* needed for SunOS 4.0.3 or 4.1 */
  7202. XtToolkitInitialize();
  7203. #endif
  7204.  
  7205. ; return 0; }
  7206. EOF
  7207. if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7208.   rm -rf conftest*
  7209.   eval 'cf_cv_func_'${ac_func}'=yes'
  7210. else
  7211.   echo "configure: failed program was:" >&5
  7212.   cat conftest.$ac_ext >&5
  7213.   rm -rf conftest*
  7214.   eval 'cf_cv_func_'${ac_func}'=no'
  7215. fi
  7216. rm -f conftest*
  7217. CFLAGS="$cf_save_CFLAGS"
  7218.  
  7219. fi
  7220.  
  7221. eval 'cf_result=$cf_cv_func_'${ac_func}
  7222. echo "$ac_t""$cf_result" 1>&6
  7223. test $cf_result = yes && cat >> confdefs.h <<EOF
  7224. #define MISSING_EXTERN_${ac_tr_func} 1
  7225. EOF
  7226.  
  7227. done
  7228.  
  7229.  
  7230. CHECK_DECL_HDRS="$VILE_CHECK_HDRS
  7231. #if HAVE_SYS_IOCTL_H
  7232. #include    <sys/ioctl.h>
  7233. #endif
  7234. "
  7235. for ac_func in \
  7236. ioctl \
  7237.  
  7238. do
  7239.  
  7240. ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`
  7241.  
  7242.  
  7243. echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
  7244. echo "configure:7245: checking for missing "${ac_func}" extern" >&5
  7245. if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  7246.   echo $ac_n "(cached) $ac_c" 1>&6
  7247. else
  7248.   
  7249. cf_save_CFLAGS="$CFLAGS"
  7250. CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
  7251. cat > conftest.$ac_ext <<EOF
  7252. #line 7253 "configure"
  7253. #include "confdefs.h"
  7254.  
  7255. $CHECK_DECL_HDRS
  7256.  
  7257. #undef ${ac_func}
  7258. struct zowie { int a; double b; struct zowie *c; char d; };
  7259. extern struct zowie *${ac_func}();
  7260.  
  7261. int main() {
  7262.  
  7263. #if HAVE_LIBXT        /* needed for SunOS 4.0.3 or 4.1 */
  7264. XtToolkitInitialize();
  7265. #endif
  7266.  
  7267. ; return 0; }
  7268. EOF
  7269. if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  7270.   rm -rf conftest*
  7271.   eval 'cf_cv_func_'${ac_func}'=yes'
  7272. else
  7273.   echo "configure: failed program was:" >&5
  7274.   cat conftest.$ac_ext >&5
  7275.   rm -rf conftest*
  7276.   eval 'cf_cv_func_'${ac_func}'=no'
  7277. fi
  7278. rm -f conftest*
  7279. CFLAGS="$cf_save_CFLAGS"
  7280.  
  7281. fi
  7282.  
  7283. eval 'cf_result=$cf_cv_func_'${ac_func}
  7284. echo "$ac_t""$cf_result" 1>&6
  7285. test $cf_result = yes && cat >> confdefs.h <<EOF
  7286. #define MISSING_EXTERN_${ac_tr_func} 1
  7287. EOF
  7288.  
  7289. done
  7290.  
  7291. fi
  7292.  
  7293.  
  7294.  
  7295. ###    output makefile and config.h
  7296. trap '' 1 2 15
  7297. cat > confcache <<\EOF
  7298. # This file is a shell script that caches the results of configure
  7299. # tests run on this system so they can be shared between configure
  7300. # scripts and configure runs.  It is not useful on other systems.
  7301. # If it contains results you don't want to keep, you may remove or edit it.
  7302. #
  7303. # By default, configure uses ./config.cache as the cache file,
  7304. # creating it if it does not exist already.  You can give configure
  7305. # the --cache-file=FILE option to use a different cache file; that is
  7306. # what configure does when it calls configure scripts in
  7307. # subdirectories, so they share the cache.
  7308. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  7309. # config.status only pays attention to the cache file if you give it the
  7310. # --recheck option to rerun configure.
  7311. #
  7312. EOF
  7313. # The following way of writing the cache mishandles newlines in values,
  7314. # but we know of no workaround that is simple, portable, and efficient.
  7315. # So, don't put newlines in cache variables' values.
  7316. # Ultrix sh set writes to stderr and can't be redirected directly,
  7317. # and sets the high bit in the cache file unless we assign to the vars.
  7318. (set) 2>&1 |
  7319.   case `(ac_space=' '; set) 2>&1 | grep '^ac_space='` in
  7320.   *ac_space=\ *)
  7321.     # `set' does not quote correctly, so add quotes (double-quote substitution
  7322.     # turns \\\\ into \\, and sed turns \\ into \).
  7323.     sed -n \
  7324.       -e "s/'/'\\\\''/g" \
  7325.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  7326.     ;;
  7327.   *)
  7328.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  7329.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  7330.     ;;
  7331.   esac >> confcache
  7332. if cmp -s $cache_file confcache; then
  7333.   :
  7334. else
  7335.   if test -w $cache_file; then
  7336.     echo "updating cache $cache_file"
  7337.     cat confcache > $cache_file
  7338.   else
  7339.     echo "not updating unwritable cache $cache_file"
  7340.   fi
  7341. fi
  7342. rm -f confcache
  7343.  
  7344. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  7345.  
  7346. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  7347. # Let make expand exec_prefix.
  7348. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  7349.  
  7350. # Any assignment to VPATH causes Sun make to only execute
  7351. # the first set of double-colon rules, so remove it if not needed.
  7352. # If there is a colon in the path, we need to keep it.
  7353. if test "x$srcdir" = x.; then
  7354.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  7355. fi
  7356.  
  7357. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  7358.  
  7359. DEFS=-DHAVE_CONFIG_H
  7360.  
  7361. # Without the "./", some shells look in PATH for config.status.
  7362. : ${CONFIG_STATUS=./config.status}
  7363.  
  7364. echo creating $CONFIG_STATUS
  7365. rm -f $CONFIG_STATUS
  7366. cat > $CONFIG_STATUS <<EOF
  7367. #! /bin/sh
  7368. # Generated automatically by configure.
  7369. # Run this file to recreate the current configuration.
  7370. # This directory was configured as follows,
  7371. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  7372. #
  7373. # $0 $ac_configure_args
  7374. #
  7375. # Compiler output produced by configure, useful for debugging
  7376. # configure, is in ./config.log if it exists.
  7377.  
  7378. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  7379. for ac_option
  7380. do
  7381.   case "\$ac_option" in
  7382.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  7383.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  7384.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  7385.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  7386.     echo "$CONFIG_STATUS generated by autoconf version 2.12.971230"
  7387.     exit 0 ;;
  7388.   -help | --help | --hel | --he | --h)
  7389.     echo "\$ac_cs_usage"; exit 0 ;;
  7390.   *) echo "\$ac_cs_usage"; exit 1 ;;
  7391.   esac
  7392. done
  7393.  
  7394. ac_given_srcdir=$srcdir
  7395. ac_given_INSTALL="$INSTALL"
  7396.  
  7397. trap 'rm -fr `echo "makefile config.h:config_h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  7398. EOF
  7399. cat >> $CONFIG_STATUS <<EOF
  7400.  
  7401. # Protect against being on the right side of a sed subst in config.status.
  7402. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  7403.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  7404. $ac_vpsub
  7405. $extrasub
  7406. s%@CFLAGS@%$CFLAGS%g
  7407. s%@CPPFLAGS@%$CPPFLAGS%g
  7408. s%@CXXFLAGS@%$CXXFLAGS%g
  7409. s%@DEFS@%$DEFS%g
  7410. s%@LDFLAGS@%$LDFLAGS%g
  7411. s%@LIBS@%$LIBS%g
  7412. s%@exec_prefix@%$exec_prefix%g
  7413. s%@prefix@%$prefix%g
  7414. s%@program_transform_name@%$program_transform_name%g
  7415. s%@bindir@%$bindir%g
  7416. s%@sbindir@%$sbindir%g
  7417. s%@libexecdir@%$libexecdir%g
  7418. s%@datadir@%$datadir%g
  7419. s%@sysconfdir@%$sysconfdir%g
  7420. s%@sharedstatedir@%$sharedstatedir%g
  7421. s%@localstatedir@%$localstatedir%g
  7422. s%@libdir@%$libdir%g
  7423. s%@includedir@%$includedir%g
  7424. s%@oldincludedir@%$oldincludedir%g
  7425. s%@infodir@%$infodir%g
  7426. s%@mandir@%$mandir%g
  7427. s%@host@%$host%g
  7428. s%@host_alias@%$host_alias%g
  7429. s%@host_cpu@%$host_cpu%g
  7430. s%@host_vendor@%$host_vendor%g
  7431. s%@host_os@%$host_os%g
  7432. s%@CC@%$CC%g
  7433. s%@CPP@%$CPP%g
  7434. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  7435. s%@INSTALL_DATA@%$INSTALL_DATA%g
  7436. s%@TD_CONFIG@%$TD_CONFIG%g
  7437. s%@ECHO_LD@%$ECHO_LD%g
  7438. s%@RULE_CC@%$RULE_CC%g
  7439. s%@SHOW_CC@%$SHOW_CC%g
  7440. s%@ECHO_CC@%$ECHO_CC%g
  7441. s%@PROG_EXT@%$PROG_EXT%g
  7442. s%@VILE_STARTUP_PATH@%$VILE_STARTUP_PATH%g
  7443. s%@PERL@%$PERL%g
  7444. s%@perl_lib_path@%$perl_lib_path%g
  7445. s%@EXTRA_INSTALL_DIRS@%$EXTRA_INSTALL_DIRS%g
  7446. s%@EXTRA_INSTALL_FILES@%$EXTRA_INSTALL_FILES%g
  7447. s%@COULD_BE_SCO@%$COULD_BE_SCO%g
  7448. s%@LINT@%$LINT%g
  7449. s%@LIBOBJS@%$LIBOBJS%g
  7450. s%@X_CFLAGS@%$X_CFLAGS%g
  7451. s%@X_LIBS@%$X_LIBS%g
  7452. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  7453. s%@SCREEN@%$SCREEN%g
  7454. s%@TARGET@%$TARGET%g
  7455. s%@LINK_PREFIX@%$LINK_PREFIX%g
  7456. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  7457. s%@IMAKE@%$IMAKE%g
  7458. s%@IMAKE_CFLAGS@%$IMAKE_CFLAGS%g
  7459. s%@IMAKE_LOADFLAGS@%$IMAKE_LOADFLAGS%g
  7460. s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
  7461. s%@EXTRAOBJS@%$EXTRAOBJS%g
  7462.  
  7463. CEOF
  7464. EOF
  7465.  
  7466. cat >> $CONFIG_STATUS <<\EOF
  7467.  
  7468. # Split the substitutions into bite-sized pieces for seds with
  7469. # small command number limits, like on Digital OSF/1 and HP-UX.
  7470. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  7471. ac_file=1 # Number of current file.
  7472. ac_beg=1 # First line for current file.
  7473. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  7474. ac_more_lines=:
  7475. ac_sed_cmds=""
  7476. while $ac_more_lines; do
  7477.   if test $ac_beg -gt 1; then
  7478.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  7479.   else
  7480.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  7481.   fi
  7482.   if test ! -s conftest.s$ac_file; then
  7483.     ac_more_lines=false
  7484.     rm -f conftest.s$ac_file
  7485.   else
  7486.     if test -z "$ac_sed_cmds"; then
  7487.       ac_sed_cmds="sed -f conftest.s$ac_file"
  7488.     else
  7489.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  7490.     fi
  7491.     ac_file=`expr $ac_file + 1`
  7492.     ac_beg=$ac_end
  7493.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  7494.   fi
  7495. done
  7496. if test -z "$ac_sed_cmds"; then
  7497.   ac_sed_cmds=cat
  7498. fi
  7499. EOF
  7500.  
  7501. cat >> $CONFIG_STATUS <<EOF
  7502.  
  7503. CONFIG_FILES=\${CONFIG_FILES-"makefile"}
  7504. EOF
  7505. cat >> $CONFIG_STATUS <<\EOF
  7506. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  7507.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  7508.   case "$ac_file" in
  7509.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  7510.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  7511.   *) ac_file_in="${ac_file}.in" ;;
  7512.   esac
  7513.  
  7514.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  7515.  
  7516.   # Remove last slash and all that follows it.  Not all systems have dirname.
  7517.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  7518.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  7519.     # The file is in a subdirectory.
  7520.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  7521.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  7522.     # A "../" for each directory in $ac_dir_suffix.
  7523.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  7524.   else
  7525.     ac_dir_suffix= ac_dots=
  7526.   fi
  7527.  
  7528.   case "$ac_given_srcdir" in
  7529.   .)  srcdir=.
  7530.       if test -z "$ac_dots"; then top_srcdir=.
  7531.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  7532.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  7533.   *) # Relative path.
  7534.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  7535.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  7536.   esac
  7537.  
  7538.   case "$ac_given_INSTALL" in
  7539.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  7540.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  7541.   esac
  7542.  
  7543.   echo creating "$ac_file"
  7544.   rm -f "$ac_file"
  7545.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  7546.   case "$ac_file" in
  7547.   *Makefile*) ac_comsub="1i\\
  7548. # $configure_input" ;;
  7549.   *) ac_comsub= ;;
  7550.   esac
  7551.  
  7552.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  7553.   sed -e "$ac_comsub
  7554. s%@configure_input@%$configure_input%g
  7555. s%@srcdir@%$srcdir%g
  7556. s%@top_srcdir@%$top_srcdir%g
  7557. s%@INSTALL@%$INSTALL%g
  7558. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  7559. fi; done
  7560. rm -f conftest.s*
  7561.  
  7562. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  7563. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  7564. #
  7565. # ac_d sets the value in "#define NAME VALUE" lines.
  7566. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  7567. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  7568. ac_dC='\3'
  7569. ac_dD='%g'
  7570. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  7571. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  7572. ac_uB='\([     ]\)%\1#\2define\3'
  7573. ac_uC=' '
  7574. ac_uD='\4%g'
  7575. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  7576. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  7577. ac_eB='$%\1#\2define\3'
  7578. ac_eC=' '
  7579. ac_eD='%g'
  7580.  
  7581. if test "${CONFIG_HEADERS+set}" != set; then
  7582. EOF
  7583. cat >> $CONFIG_STATUS <<EOF
  7584.   CONFIG_HEADERS="config.h:config_h.in"
  7585. EOF
  7586. cat >> $CONFIG_STATUS <<\EOF
  7587. fi
  7588. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  7589.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  7590.   case "$ac_file" in
  7591.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  7592.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  7593.   *) ac_file_in="${ac_file}.in" ;;
  7594.   esac
  7595.  
  7596.   echo creating $ac_file
  7597.  
  7598.   rm -f conftest.frag conftest.in conftest.out
  7599.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  7600.   cat $ac_file_inputs > conftest.in
  7601.  
  7602. EOF
  7603.  
  7604.  
  7605. # Transform confdefs.h into a list of #define's.  We won't use it as a sed
  7606. # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
  7607. # be either 'cat' or 'sort'.
  7608. sort confdefs.h >conftest.vals
  7609.  
  7610. # Break up conftest.vals because some shells have a limit on
  7611. # the size of here documents, and old seds have small limits too.
  7612.  
  7613. rm -f conftest.tail
  7614. echo '  rm -f conftest.frag' >> $CONFIG_STATUS
  7615. while :
  7616. do
  7617.   ac_lines=`grep -c . conftest.vals`
  7618.   # grep -c gives empty output for an empty file on some AIX systems.
  7619.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  7620.   # Write chunks of a limited-size here document to conftest.frag.
  7621.   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
  7622.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  7623.   echo 'CEOF' >> $CONFIG_STATUS
  7624.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  7625.   rm -f conftest.vals
  7626.   mv conftest.tail conftest.vals
  7627. done
  7628. rm -f conftest.vals
  7629.  
  7630. # Run sed to substitute the contents of conftest.frag into conftest.in at the
  7631. # marker @DEFS@.
  7632. echo '  cat >> conftest.edit <<CEOF
  7633. /@DEFS@/r conftest.frag
  7634. /@DEFS@/d
  7635. CEOF
  7636. sed -f conftest.edit conftest.in > conftest.out
  7637. rm -f conftest.in
  7638. mv conftest.out conftest.in
  7639. rm -f conftest.edit conftest.frag
  7640. ' >> $CONFIG_STATUS
  7641.  
  7642.  
  7643. cat >> $CONFIG_STATUS <<\EOF
  7644.   rm -f conftest.frag conftest.h
  7645.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  7646.   cat conftest.in >> conftest.h
  7647.   rm -f conftest.in
  7648.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  7649.     echo "$ac_file is unchanged"
  7650.     rm -f conftest.h
  7651.   else
  7652.     # Remove last slash and all that follows it.  Not all systems have dirname.
  7653.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  7654.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  7655.       # The file is in a subdirectory.
  7656.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  7657.     fi
  7658.     rm -f $ac_file
  7659.     mv conftest.h $ac_file
  7660.   fi
  7661. fi; done
  7662.  
  7663. EOF
  7664. cat >> $CONFIG_STATUS <<EOF
  7665. # Extra initialization commands, if any
  7666.  
  7667. EOF
  7668. cat >> $CONFIG_STATUS <<\EOF
  7669. # Extra commands, if any
  7670.  
  7671. exit 0
  7672. EOF
  7673. chmod +x $CONFIG_STATUS
  7674. rm -fr confdefs* $ac_clean_files
  7675. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  7676.  
  7677.