home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / xdvik / configure < prev    next >
Text File  |  1996-10-01  |  76KB  |  2,509 lines

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