home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ucb_logoppc / source / configure < prev    next >
Encoding:
Text File  |  1997-02-02  |  60.3 KB  |  2,081 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.  
  17. # Initialize some variables set by options.
  18. # The variables have the same names as the options, with
  19. # dashes changed to underlines.
  20. build=NONE
  21. cache_file=./config.cache
  22. exec_prefix=NONE
  23. host=NONE
  24. no_create=
  25. nonopt=NONE
  26. no_recursion=
  27. prefix=NONE
  28. program_prefix=NONE
  29. program_suffix=NONE
  30. program_transform_name=s,x,x,
  31. silent=
  32. site=
  33. srcdir=
  34. target=NONE
  35. verbose=
  36. x_includes=NONE
  37. x_libraries=NONE
  38. bindir='${exec_prefix}/bin'
  39. sbindir='${exec_prefix}/sbin'
  40. libexecdir='${exec_prefix}/libexec'
  41. datadir='${prefix}/share'
  42. sysconfdir='${prefix}/etc'
  43. sharedstatedir='${prefix}/com'
  44. localstatedir='${prefix}/var'
  45. libdir='${exec_prefix}/lib'
  46. includedir='${prefix}/include'
  47. oldincludedir='/usr/include'
  48. infodir='${prefix}/info'
  49. mandir='${prefix}/man'
  50.  
  51. # Initialize some other variables.
  52. subdirs=
  53. MFLAGS= MAKEFLAGS=
  54.  
  55. ac_prev=
  56. for ac_option
  57. do
  58.  
  59.   # If the previous option needs an argument, assign it.
  60.   if test -n "$ac_prev"; then
  61.     eval "$ac_prev=\$ac_option"
  62.     ac_prev=
  63.     continue
  64.   fi
  65.  
  66.   case "$ac_option" in
  67.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  68.   *) ac_optarg= ;;
  69.   esac
  70.  
  71.   # Accept the important Cygnus configure options, so we can diagnose typos.
  72.  
  73.   case "$ac_option" in
  74.  
  75.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  76.     ac_prev=bindir ;;
  77.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  78.     bindir="$ac_optarg" ;;
  79.  
  80.   -build | --build | --buil | --bui | --bu)
  81.     ac_prev=build ;;
  82.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  83.     build="$ac_optarg" ;;
  84.  
  85.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  86.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  87.     ac_prev=cache_file ;;
  88.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  89.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  90.     cache_file="$ac_optarg" ;;
  91.  
  92.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  93.     ac_prev=datadir ;;
  94.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  95.   | --da=*)
  96.     datadir="$ac_optarg" ;;
  97.  
  98.   -disable-* | --disable-*)
  99.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  100.     # Reject names that are not valid shell variable names.
  101.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  102.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  103.     fi
  104.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  105.     eval "enable_${ac_feature}=no" ;;
  106.  
  107.   -enable-* | --enable-*)
  108.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  109.     # Reject names that are not valid shell variable names.
  110.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  111.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  112.     fi
  113.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  114.     case "$ac_option" in
  115.       *=*) ;;
  116.       *) ac_optarg=yes ;;
  117.     esac
  118.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  119.  
  120.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  121.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  122.   | --exec | --exe | --ex)
  123.     ac_prev=exec_prefix ;;
  124.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  125.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  126.   | --exec=* | --exe=* | --ex=*)
  127.     exec_prefix="$ac_optarg" ;;
  128.  
  129.   -gas | --gas | --ga | --g)
  130.     # Obsolete; use --with-gas.
  131.     with_gas=yes ;;
  132.  
  133.   -help | --help | --hel | --he)
  134.     # Omit some internal or obsolete options to make the list less imposing.
  135.     # This message is too long to be a string in the A/UX 3.1 sh.
  136.     cat << EOF
  137. Usage: configure [options] [host]
  138. Options: [defaults in brackets after descriptions]
  139. Configuration:
  140.   --cache-file=FILE       cache test results in FILE
  141.   --help                  print this message
  142.   --no-create             do not create output files
  143.   --quiet, --silent       do not print \`checking...' messages
  144.   --version               print the version of autoconf that created configure
  145. Directory and file names:
  146.   --prefix=PREFIX         install architecture-independent files in PREFIX
  147.                           [$ac_default_prefix]
  148.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  149.                           [same as prefix]
  150.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  151.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  152.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  153.   --datadir=DIR           read-only architecture-independent data in DIR
  154.                           [PREFIX/share]
  155.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  156.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  157.                           [PREFIX/com]
  158.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  159.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  160.   --includedir=DIR        C header files in DIR [PREFIX/include]
  161.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  162.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  163.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  164.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  165.   --program-prefix=PREFIX prepend PREFIX to installed program names
  166.   --program-suffix=SUFFIX append SUFFIX to installed program names
  167.   --program-transform-name=PROGRAM
  168.                           run sed PROGRAM on installed program names
  169. EOF
  170.     cat << EOF
  171. Host type:
  172.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  173.   --host=HOST             configure for HOST [guessed]
  174.   --target=TARGET         configure for TARGET [TARGET=HOST]
  175. Features and packages:
  176.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  177.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  178.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  179.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  180.   --x-includes=DIR        X include files are in DIR
  181.   --x-libraries=DIR       X library files are in DIR
  182. EOF
  183.     if test -n "$ac_help"; then
  184.       echo "--enable and --with options recognized:$ac_help"
  185.     fi
  186.     exit 0 ;;
  187.  
  188.   -host | --host | --hos | --ho)
  189.     ac_prev=host ;;
  190.   -host=* | --host=* | --hos=* | --ho=*)
  191.     host="$ac_optarg" ;;
  192.  
  193.   -includedir | --includedir | --includedi | --included | --include \
  194.   | --includ | --inclu | --incl | --inc)
  195.     ac_prev=includedir ;;
  196.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  197.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  198.     includedir="$ac_optarg" ;;
  199.  
  200.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  201.     ac_prev=infodir ;;
  202.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  203.     infodir="$ac_optarg" ;;
  204.  
  205.   -libdir | --libdir | --libdi | --libd)
  206.     ac_prev=libdir ;;
  207.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  208.     libdir="$ac_optarg" ;;
  209.  
  210.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  211.   | --libexe | --libex | --libe)
  212.     ac_prev=libexecdir ;;
  213.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  214.   | --libexe=* | --libex=* | --libe=*)
  215.     libexecdir="$ac_optarg" ;;
  216.  
  217.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  218.   | --localstate | --localstat | --localsta | --localst \
  219.   | --locals | --local | --loca | --loc | --lo)
  220.     ac_prev=localstatedir ;;
  221.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  222.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  223.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  224.     localstatedir="$ac_optarg" ;;
  225.  
  226.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  227.     ac_prev=mandir ;;
  228.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  229.     mandir="$ac_optarg" ;;
  230.  
  231.   -nfp | --nfp | --nf)
  232.     # Obsolete; use --without-fp.
  233.     with_fp=no ;;
  234.  
  235.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  236.   | --no-cr | --no-c)
  237.     no_create=yes ;;
  238.  
  239.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  240.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  241.     no_recursion=yes ;;
  242.  
  243.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  244.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  245.   | --oldin | --oldi | --old | --ol | --o)
  246.     ac_prev=oldincludedir ;;
  247.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  248.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  249.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  250.     oldincludedir="$ac_optarg" ;;
  251.  
  252.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  253.     ac_prev=prefix ;;
  254.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  255.     prefix="$ac_optarg" ;;
  256.  
  257.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  258.   | --program-pre | --program-pr | --program-p)
  259.     ac_prev=program_prefix ;;
  260.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  261.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  262.     program_prefix="$ac_optarg" ;;
  263.  
  264.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  265.   | --program-suf | --program-su | --program-s)
  266.     ac_prev=program_suffix ;;
  267.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  268.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  269.     program_suffix="$ac_optarg" ;;
  270.  
  271.   -program-transform-name | --program-transform-name \
  272.   | --program-transform-nam | --program-transform-na \
  273.   | --program-transform-n | --program-transform- \
  274.   | --program-transform | --program-transfor \
  275.   | --program-transfo | --program-transf \
  276.   | --program-trans | --program-tran \
  277.   | --progr-tra | --program-tr | --program-t)
  278.     ac_prev=program_transform_name ;;
  279.   -program-transform-name=* | --program-transform-name=* \
  280.   | --program-transform-nam=* | --program-transform-na=* \
  281.   | --program-transform-n=* | --program-transform-=* \
  282.   | --program-transform=* | --program-transfor=* \
  283.   | --program-transfo=* | --program-transf=* \
  284.   | --program-trans=* | --program-tran=* \
  285.   | --progr-tra=* | --program-tr=* | --program-t=*)
  286.     program_transform_name="$ac_optarg" ;;
  287.  
  288.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  289.   | -silent | --silent | --silen | --sile | --sil)
  290.     silent=yes ;;
  291.  
  292.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  293.     ac_prev=sbindir ;;
  294.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  295.   | --sbi=* | --sb=*)
  296.     sbindir="$ac_optarg" ;;
  297.  
  298.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  299.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  300.   | --sharedst | --shareds | --shared | --share | --shar \
  301.   | --sha | --sh)
  302.     ac_prev=sharedstatedir ;;
  303.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  304.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  305.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  306.   | --sha=* | --sh=*)
  307.     sharedstatedir="$ac_optarg" ;;
  308.  
  309.   -site | --site | --sit)
  310.     ac_prev=site ;;
  311.   -site=* | --site=* | --sit=*)
  312.     site="$ac_optarg" ;;
  313.  
  314.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  315.     ac_prev=srcdir ;;
  316.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  317.     srcdir="$ac_optarg" ;;
  318.  
  319.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  320.   | --syscon | --sysco | --sysc | --sys | --sy)
  321.     ac_prev=sysconfdir ;;
  322.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  323.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  324.     sysconfdir="$ac_optarg" ;;
  325.  
  326.   -target | --target | --targe | --targ | --tar | --ta | --t)
  327.     ac_prev=target ;;
  328.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  329.     target="$ac_optarg" ;;
  330.  
  331.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  332.     verbose=yes ;;
  333.  
  334.   -version | --version | --versio | --versi | --vers)
  335.     echo "configure generated by autoconf version 2.10"
  336.     exit 0 ;;
  337.  
  338.   -with-* | --with-*)
  339.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  340.     # Reject names that are not valid shell variable names.
  341.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  342.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  343.     fi
  344.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  345.     case "$ac_option" in
  346.       *=*) ;;
  347.       *) ac_optarg=yes ;;
  348.     esac
  349.     eval "with_${ac_package}='$ac_optarg'" ;;
  350.  
  351.   -without-* | --without-*)
  352.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  353.     # Reject names that are not valid shell variable names.
  354.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  355.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  356.     fi
  357.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  358.     eval "with_${ac_package}=no" ;;
  359.  
  360.   --x)
  361.     # Obsolete; use --with-x.
  362.     with_x=yes ;;
  363.  
  364.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  365.   | --x-incl | --x-inc | --x-in | --x-i)
  366.     ac_prev=x_includes ;;
  367.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  368.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  369.     x_includes="$ac_optarg" ;;
  370.  
  371.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  372.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  373.     ac_prev=x_libraries ;;
  374.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  375.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  376.     x_libraries="$ac_optarg" ;;
  377.  
  378.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  379.     ;;
  380.  
  381.   *)
  382.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  383.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  384.     fi
  385.     if test "x$nonopt" != xNONE; then
  386.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  387.     fi
  388.     nonopt="$ac_option"
  389.     ;;
  390.  
  391.   esac
  392. done
  393.  
  394. if test -n "$ac_prev"; then
  395.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  396. fi
  397.  
  398. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  399.  
  400. # File descriptor usage:
  401. # 0 standard input
  402. # 1 file creation
  403. # 2 errors and warnings
  404. # 3 some systems may open it to /dev/tty
  405. # 4 used on the Kubota Titan
  406. # 6 checking for... messages and results
  407. # 5 compiler messages saved in config.log
  408. if test "$silent" = yes; then
  409.   exec 6>/dev/null
  410. else
  411.   exec 6>&1
  412. fi
  413. exec 5>./config.log
  414.  
  415. echo "\
  416. This file contains any messages produced by compilers while
  417. running configure, to aid debugging if configure makes a mistake.
  418. " 1>&5
  419.  
  420. # Strip out --no-create and --no-recursion so they do not pile up.
  421. # Also quote any args containing shell metacharacters.
  422. ac_configure_args=
  423. for ac_arg
  424. do
  425.   case "$ac_arg" in
  426.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  427.   | --no-cr | --no-c) ;;
  428.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  429.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  430.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  431.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  432.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  433.   esac
  434. done
  435.  
  436. # NLS nuisances.
  437. # Only set LANG and LC_ALL to C if already set.
  438. # These must not be set unconditionally because not all systems understand
  439. # e.g. LANG=C (notably SCO).
  440. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  441. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  442.  
  443. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  444. rm -rf conftest* confdefs.h
  445. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  446. echo > confdefs.h
  447.  
  448. # A filename unique to this package, relative to the directory that
  449. # configure is in, which we can look for to find out if srcdir is correct.
  450. ac_unique_file=coms.c
  451.  
  452. # Find the source files, if location was not specified.
  453. if test -z "$srcdir"; then
  454.   ac_srcdir_defaulted=yes
  455.   # Try the directory containing this script, then its parent.
  456.   ac_prog=$0
  457.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  458.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  459.   srcdir=$ac_confdir
  460.   if test ! -r $srcdir/$ac_unique_file; then
  461.     srcdir=..
  462.   fi
  463. else
  464.   ac_srcdir_defaulted=no
  465. fi
  466. if test ! -r $srcdir/$ac_unique_file; then
  467.   if test "$ac_srcdir_defaulted" = yes; then
  468.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  469.   else
  470.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  471.   fi
  472. fi
  473. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  474.  
  475. # Prefer explicitly selected file to automatically selected ones.
  476. if test -z "$CONFIG_SITE"; then
  477.   if test "x$prefix" != xNONE; then
  478.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  479.   else
  480.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  481.   fi
  482. fi
  483. for ac_site_file in $CONFIG_SITE; do
  484.   if test -r "$ac_site_file"; then
  485.     echo "loading site script $ac_site_file"
  486.     . "$ac_site_file"
  487.   fi
  488. done
  489.  
  490. if test -r "$cache_file"; then
  491.   echo "loading cache $cache_file"
  492.   . $cache_file
  493. else
  494.   echo "creating cache $cache_file"
  495.   > $cache_file
  496. fi
  497.  
  498. ac_ext=c
  499. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  500. ac_cpp='$CPP $CPPFLAGS'
  501. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  502. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  503.  
  504. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  505.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  506.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  507.     ac_n= ac_c='
  508. ' ac_t='    '
  509.   else
  510.     ac_n=-n ac_c= ac_t=
  511.   fi
  512. else
  513.   ac_n= ac_c='\c' ac_t=
  514. fi
  515.  
  516.  
  517.  
  518.  
  519.  
  520. # Extract the first word of "gcc", so it can be a program name with args.
  521. set dummy gcc; ac_word=$2
  522. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  523. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  524.   echo $ac_n "(cached) $ac_c" 1>&6
  525. else
  526.   if test -n "$CC"; then
  527.   ac_cv_prog_CC="$CC" # Let the user override the test.
  528. else
  529.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  530.   for ac_dir in $PATH; do
  531.     test -z "$ac_dir" && ac_dir=.
  532.     if test -f $ac_dir/$ac_word; then
  533.       ac_cv_prog_CC="gcc"
  534.       break
  535.     fi
  536.   done
  537.   IFS="$ac_save_ifs"
  538. fi
  539. fi
  540. CC="$ac_cv_prog_CC"
  541. if test -n "$CC"; then
  542.   echo "$ac_t""$CC" 1>&6
  543. else
  544.   echo "$ac_t""no" 1>&6
  545. fi
  546.  
  547. if test -z "$CC"; then
  548.   # Extract the first word of "cc", so it can be a program name with args.
  549. set dummy cc; ac_word=$2
  550. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  551. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  552.   echo $ac_n "(cached) $ac_c" 1>&6
  553. else
  554.   if test -n "$CC"; then
  555.   ac_cv_prog_CC="$CC" # Let the user override the test.
  556. else
  557.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  558.   ac_prog_rejected=no
  559.   for ac_dir in $PATH; do
  560.     test -z "$ac_dir" && ac_dir=.
  561.     if test -f $ac_dir/$ac_word; then
  562.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  563.         ac_prog_rejected=yes
  564.     continue
  565.       fi
  566.       ac_cv_prog_CC="cc"
  567.       break
  568.     fi
  569.   done
  570.   IFS="$ac_save_ifs"
  571. if test $ac_prog_rejected = yes; then
  572.   # We found a bogon in the path, so make sure we never use it.
  573.   set dummy $ac_cv_prog_CC
  574.   shift
  575.   if test $# -gt 0; then
  576.     # We chose a different compiler from the bogus one.
  577.     # However, it has the same basename, so the bogon will be chosen
  578.     # first if we set CC to just the basename; use the full file name.
  579.     shift
  580.     set dummy "$ac_dir/$ac_word" "$@"
  581.     shift
  582.     ac_cv_prog_CC="$@"
  583.   fi
  584. fi
  585. fi
  586. fi
  587. CC="$ac_cv_prog_CC"
  588. if test -n "$CC"; then
  589.   echo "$ac_t""$CC" 1>&6
  590. else
  591.   echo "$ac_t""no" 1>&6
  592. fi
  593.  
  594.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  595. fi
  596.  
  597. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  598. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  599.   echo $ac_n "(cached) $ac_c" 1>&6
  600. else
  601.   cat > conftest.c <<EOF
  602. #ifdef __GNUC__
  603.   yes;
  604. #endif
  605. EOF
  606. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  607.   ac_cv_prog_gcc=yes
  608. else
  609.   ac_cv_prog_gcc=no
  610. fi
  611. fi
  612.  
  613. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  614. if test $ac_cv_prog_gcc = yes; then
  615.   GCC=yes
  616.   if test "${CFLAGS+set}" != set; then
  617.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  618. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  619.   echo $ac_n "(cached) $ac_c" 1>&6
  620. else
  621.   echo 'void f(){}' > conftest.c
  622. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  623.   ac_cv_prog_gcc_g=yes
  624. else
  625.   ac_cv_prog_gcc_g=no
  626. fi
  627. rm -f conftest*
  628.  
  629. fi
  630.  
  631. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  632.     if test $ac_cv_prog_gcc_g = yes; then
  633.       CFLAGS="-g -O"
  634.     else
  635.       CFLAGS="-O"
  636.     fi
  637.   fi
  638. else
  639.   GCC=
  640.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  641. fi
  642.  
  643.  
  644.  
  645. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  646. # On Suns, sometimes $CPP names a directory.
  647. if test -n "$CPP" && test -d "$CPP"; then
  648.   CPP=
  649. fi
  650. if test -z "$CPP"; then
  651. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  652.   echo $ac_n "(cached) $ac_c" 1>&6
  653. else
  654.     # This must be in double quotes, not single quotes, because CPP may get
  655.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  656.   CPP="${CC-cc} -E"
  657.   # On the NeXT, cc -E runs the code through the compiler's parser,
  658.   # not just through cpp.
  659.   cat > conftest.$ac_ext <<EOF
  660. #line 661 "configure"
  661. #include "confdefs.h"
  662. #include <assert.h>
  663. Syntax Error
  664. EOF
  665. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  666. { (eval echo configure:667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  667. ac_err=`grep -v '^ *+' conftest.out`
  668. if test -z "$ac_err"; then
  669.   :
  670. else
  671.   echo "$ac_err" >&5
  672.   rm -rf conftest*
  673.   CPP="${CC-cc} -E -traditional-cpp"
  674.   cat > conftest.$ac_ext <<EOF
  675. #line 676 "configure"
  676. #include "confdefs.h"
  677. #include <assert.h>
  678. Syntax Error
  679. EOF
  680. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  681. { (eval echo configure:682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  682. ac_err=`grep -v '^ *+' conftest.out`
  683. if test -z "$ac_err"; then
  684.   :
  685. else
  686.   echo "$ac_err" >&5
  687.   rm -rf conftest*
  688.   CPP=/lib/cpp
  689. fi
  690. rm -f conftest*
  691. fi
  692. rm -f conftest*
  693.   ac_cv_prog_CPP="$CPP"
  694. fi
  695.   CPP="$ac_cv_prog_CPP"
  696. else
  697.   ac_cv_prog_CPP="$CPP"
  698. fi
  699. echo "$ac_t""$CPP" 1>&6
  700.  
  701. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  702. if test -d /etc/conf/kconfig.d &&
  703.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  704. then
  705.   echo "$ac_t""yes" 1>&6
  706.   ISC=yes # If later tests want to check for ISC.
  707.   cat >> confdefs.h <<\EOF
  708. #define _POSIX_SOURCE 1
  709. EOF
  710.  
  711.   if test "$GCC" = yes; then
  712.     CC="$CC -posix"
  713.   else
  714.     CC="$CC -Xp"
  715.   fi
  716. else
  717.   echo "$ac_t""no" 1>&6
  718.   ISC=
  719. fi
  720.  
  721. # If we find X, set shell vars x_includes and x_libraries to the
  722. # paths, otherwise set no_x=yes.
  723. # Uses ac_ vars as temps to allow command line to override cache and checks.
  724. # --without-x overrides everything else, but does not touch the cache.
  725. echo $ac_n "checking for X""... $ac_c" 1>&6
  726.  
  727. # Check whether --with-x or --without-x was given.
  728. if test "${with_x+set}" = set; then
  729.   withval="$with_x"
  730.   :
  731. fi
  732.  
  733. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  734. if test "x$with_x" = xno; then
  735.   # The user explicitly disabled X.
  736.   have_x=disabled
  737. else
  738.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  739.     # Both variables are already set.
  740.     have_x=yes
  741.   else
  742. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  743.   echo $ac_n "(cached) $ac_c" 1>&6
  744. else
  745.   # One or both of the vars are not set, and there is no cached value.
  746. ac_x_includes=NO ac_x_libraries=NO
  747. rm -fr conftestdir
  748. if mkdir conftestdir; then
  749.   cd conftestdir
  750.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  751.   cat > Imakefile <<'EOF'
  752. acfindx:
  753.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  754. EOF
  755.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  756.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  757.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  758.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  759.     for ac_extension in a so sl; do
  760.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  761.         test -f $ac_im_libdir/libX11.$ac_extension; then
  762.         ac_im_usrlibdir=$ac_im_libdir; break
  763.       fi
  764.     done
  765.     # Screen out bogus values from the imake configuration.
  766.     case "$ac_im_incroot" in
  767.     /usr/include) ;;
  768.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  769.     esac
  770.     case "$ac_im_usrlibdir" in
  771.     /usr/lib | /lib) ;;
  772.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  773.     esac
  774.   fi
  775.   cd ..
  776.   rm -fr conftestdir
  777. fi
  778.  
  779. if test "$ac_x_includes" = NO; then
  780.   # Guess where to find include files, by looking for this one X11 .h file.
  781.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  782.  
  783.   # First, try using that file with no special directory specified.
  784. cat > conftest.$ac_ext <<EOF
  785. #line 786 "configure"
  786. #include "confdefs.h"
  787. #include <$x_direct_test_include>
  788. EOF
  789. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  790. { (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  791. ac_err=`grep -v '^ *+' conftest.out`
  792. if test -z "$ac_err"; then
  793.   rm -rf conftest*
  794.   # We can compile using X headers with no special include directory.
  795. ac_x_includes=
  796. else
  797.   echo "$ac_err" >&5
  798.   rm -rf conftest*
  799.   # Look for the header file in a standard set of common directories.
  800.   for ac_dir in               \
  801.     /usr/X11R6/include        \
  802.     /usr/X11R5/include        \
  803.     /usr/X11R4/include        \
  804.                               \
  805.     /usr/include/X11R6        \
  806.     /usr/include/X11R5        \
  807.     /usr/include/X11R4        \
  808.                               \
  809.     /usr/local/X11R6/include  \
  810.     /usr/local/X11R5/include  \
  811.     /usr/local/X11R4/include  \
  812.                               \
  813.     /usr/local/include/X11R6  \
  814.     /usr/local/include/X11R5  \
  815.     /usr/local/include/X11R4  \
  816.                               \
  817.     /usr/X11/include          \
  818.     /usr/include/X11          \
  819.     /usr/local/X11/include    \
  820.     /usr/local/include/X11    \
  821.                               \
  822.     /usr/X386/include         \
  823.     /usr/x386/include         \
  824.     /usr/XFree86/include/X11  \
  825.                               \
  826.     /usr/include              \
  827.     /usr/local/include        \
  828.     /usr/unsupported/include  \
  829.     /usr/athena/include       \
  830.     /usr/local/x11r5/include  \
  831.     /usr/lpp/Xamples/include  \
  832.                               \
  833.     /usr/openwin/include      \
  834.     /usr/openwin/share/include \
  835.     ; \
  836.   do
  837.     if test -r "$ac_dir/$x_direct_test_include"; then
  838.       ac_x_includes=$ac_dir
  839.       break
  840.     fi
  841.   done
  842. fi
  843. rm -f conftest*
  844. fi # $ac_x_includes = NO
  845.  
  846. if test "$ac_x_libraries" = NO; then
  847.   # Check for the libraries.
  848.  
  849.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  850.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  851.  
  852.   # See if we find them without any special options.
  853.   # Don't add to $LIBS permanently.
  854.   ac_save_LIBS="$LIBS"
  855.   LIBS="-l$x_direct_test_library $LIBS"
  856. cat > conftest.$ac_ext <<EOF
  857. #line 858 "configure"
  858. #include "confdefs.h"
  859.  
  860. int main() { return 0; }
  861. int t() {
  862. ${x_direct_test_function}()
  863. ; return 0; }
  864. EOF
  865. if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  866.   rm -rf conftest*
  867.   LIBS="$ac_save_LIBS"
  868. # We can link X programs with no special library path.
  869. ac_x_libraries=
  870. else
  871.   rm -rf conftest*
  872.   LIBS="$ac_save_LIBS"
  873. # First see if replacing the include by lib works.
  874. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  875.     /usr/X11R6/lib        \
  876.     /usr/X11R5/lib        \
  877.     /usr/X11R4/lib        \
  878.                           \
  879.     /usr/lib/X11R6        \
  880.     /usr/lib/X11R5        \
  881.     /usr/lib/X11R4        \
  882.                           \
  883.     /usr/local/X11R6/lib  \
  884.     /usr/local/X11R5/lib  \
  885.     /usr/local/X11R4/lib  \
  886.                           \
  887.     /usr/local/lib/X11R6  \
  888.     /usr/local/lib/X11R5  \
  889.     /usr/local/lib/X11R4  \
  890.                           \
  891.     /usr/X11/lib          \
  892.     /usr/lib/X11          \
  893.     /usr/local/X11/lib    \
  894.     /usr/local/lib/X11    \
  895.                           \
  896.     /usr/X386/lib         \
  897.     /usr/x386/lib         \
  898.     /usr/XFree86/lib/X11  \
  899.                           \
  900.     /usr/lib              \
  901.     /usr/local/lib        \
  902.     /usr/unsupported/lib  \
  903.     /usr/athena/lib       \
  904.     /usr/local/x11r5/lib  \
  905.     /usr/lpp/Xamples/lib  \
  906.                           \
  907.     /usr/openwin/lib      \
  908.     /usr/openwin/share/lib \
  909.     ; \
  910. do
  911.   for ac_extension in a so sl; do
  912.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  913.       ac_x_libraries=$ac_dir
  914.       break 2
  915.     fi
  916.   done
  917. done
  918. fi
  919. rm -f conftest*
  920.  
  921. fi # $ac_x_libraries = NO
  922.  
  923. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  924.   # Didn't find X anywhere.  Cache the known absence of X.
  925.   ac_cv_have_x="have_x=no"
  926. else
  927.   # Record where we found X for the cache.
  928.   ac_cv_have_x="have_x=yes \
  929.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  930. fi
  931. fi
  932.   fi
  933.   eval "$ac_cv_have_x"
  934. fi # $with_x != no
  935.  
  936. if test "$have_x" != yes; then
  937.   echo "$ac_t""$have_x" 1>&6
  938.   no_x=yes
  939. else
  940.   # If each of the values was on the command line, it overrides each guess.
  941.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  942.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  943.   # Update the cache value to reflect the command line values.
  944.   ac_cv_have_x="have_x=yes \
  945.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  946.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  947. fi
  948.  
  949. if test "$no_x" = yes; then
  950.   # Not all programs may use this symbol, but it does not hurt to define it.
  951.   X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
  952. else
  953.   if test -n "$x_includes"; then
  954.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  955.   fi
  956.  
  957.   # It would be nice to have a more robust check for the -R ld option than
  958.   # just checking for Solaris.
  959.   # It would also be nice to do this for all -L options, not just this one.
  960.   if test -n "$x_libraries"; then
  961.     X_LIBS="$X_LIBS -L$x_libraries"
  962.     if test "`(uname) 2>/dev/null`" = SunOS &&
  963.       uname -r | grep '^5' >/dev/null; then
  964.       X_LIBS="$X_LIBS -R $x_libraries"
  965.     fi
  966.   fi
  967.  
  968.   # Check for libraries that X11R6 Xt/Xaw programs need.
  969.  
  970.   ac_save_LDFLAGS="$LDFLAGS"
  971.   LDFLAGS="$LDFLAGS -L$x_libraries"
  972.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  973.   # check for ICE first), but we must link in the order -lSM -lICE or
  974.   # we get undefined symbols.  So assume we have SM if we have ICE.
  975.   # These have to be linked with before -lX11, unlike the other
  976.   # libraries we check for below, so use a different variable.
  977.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  978.   echo $ac_n "checking for -lICE""... $ac_c" 1>&6
  979. ac_lib_var=`echo ICE'_'IceConnectionNumber | tr './+\055' '__p_'`
  980. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  981.   echo $ac_n "(cached) $ac_c" 1>&6
  982. else
  983.   ac_save_LIBS="$LIBS"
  984. LIBS="-lICE  $LIBS"
  985. cat > conftest.$ac_ext <<EOF
  986. #line 987 "configure"
  987. #include "confdefs.h"
  988. /* Override any gcc2 internal prototype to avoid an error.  */
  989. /* We use char because int might match the return type of a gcc2
  990.     builtin and then its argument prototype would still apply.  */
  991. char IceConnectionNumber();
  992.  
  993. int main() { return 0; }
  994. int t() {
  995. IceConnectionNumber()
  996. ; return 0; }
  997. EOF
  998. if { (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  999.   rm -rf conftest*
  1000.   eval "ac_cv_lib_$ac_lib_var=yes"
  1001. else
  1002.   rm -rf conftest*
  1003.   eval "ac_cv_lib_$ac_lib_var=no"
  1004. fi
  1005. rm -f conftest*
  1006. LIBS="$ac_save_LIBS"
  1007.  
  1008. fi
  1009. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1010.   echo "$ac_t""yes" 1>&6
  1011.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  1012. else
  1013.   echo "$ac_t""no" 1>&6
  1014. fi
  1015.  
  1016.   LDFLAGS="$ac_save_LDFLAGS"
  1017.  
  1018.   # Check for system-dependent libraries X programs must link with.
  1019.  
  1020.   if test "$ISC" = yes; then
  1021.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1022.   else
  1023.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  1024.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  1025.     # the Alpha needs dnet_stub (dnet does not exist).
  1026.     echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
  1027. ac_lib_var=`echo dnet'_'dnet_ntoa | tr './+\055' '__p_'`
  1028. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1029.   echo $ac_n "(cached) $ac_c" 1>&6
  1030. else
  1031.   ac_save_LIBS="$LIBS"
  1032. LIBS="-ldnet  $LIBS"
  1033. cat > conftest.$ac_ext <<EOF
  1034. #line 1035 "configure"
  1035. #include "confdefs.h"
  1036. /* Override any gcc2 internal prototype to avoid an error.  */
  1037. /* We use char because int might match the return type of a gcc2
  1038.     builtin and then its argument prototype would still apply.  */
  1039. char dnet_ntoa();
  1040.  
  1041. int main() { return 0; }
  1042. int t() {
  1043. dnet_ntoa()
  1044. ; return 0; }
  1045. EOF
  1046. if { (eval echo configure:1047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1047.   rm -rf conftest*
  1048.   eval "ac_cv_lib_$ac_lib_var=yes"
  1049. else
  1050.   rm -rf conftest*
  1051.   eval "ac_cv_lib_$ac_lib_var=no"
  1052. fi
  1053. rm -f conftest*
  1054. LIBS="$ac_save_LIBS"
  1055.  
  1056. fi
  1057. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1058.   echo "$ac_t""yes" 1>&6
  1059.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  1060. else
  1061.   echo "$ac_t""no" 1>&6
  1062. fi
  1063.  
  1064.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  1065.       echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
  1066. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | tr './+\055' '__p_'`
  1067. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1068.   echo $ac_n "(cached) $ac_c" 1>&6
  1069. else
  1070.   ac_save_LIBS="$LIBS"
  1071. LIBS="-ldnet_stub  $LIBS"
  1072. cat > conftest.$ac_ext <<EOF
  1073. #line 1074 "configure"
  1074. #include "confdefs.h"
  1075. /* Override any gcc2 internal prototype to avoid an error.  */
  1076. /* We use char because int might match the return type of a gcc2
  1077.     builtin and then its argument prototype would still apply.  */
  1078. char dnet_ntoa();
  1079.  
  1080. int main() { return 0; }
  1081. int t() {
  1082. dnet_ntoa()
  1083. ; return 0; }
  1084. EOF
  1085. if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1086.   rm -rf conftest*
  1087.   eval "ac_cv_lib_$ac_lib_var=yes"
  1088. else
  1089.   rm -rf conftest*
  1090.   eval "ac_cv_lib_$ac_lib_var=no"
  1091. fi
  1092. rm -f conftest*
  1093. LIBS="$ac_save_LIBS"
  1094.  
  1095. fi
  1096. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1097.   echo "$ac_t""yes" 1>&6
  1098.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  1099. else
  1100.   echo "$ac_t""no" 1>&6
  1101. fi
  1102.  
  1103.     fi
  1104.  
  1105.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  1106.     # to get the SysV transport functions.
  1107.     # Not sure which flavor of 386 UNIX this is, but it seems harmless to
  1108.     # check for it.
  1109.     echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  1110. ac_lib_var=`echo nsl'_'t_accept | tr './+\055' '__p_'`
  1111. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1112.   echo $ac_n "(cached) $ac_c" 1>&6
  1113. else
  1114.   ac_save_LIBS="$LIBS"
  1115. LIBS="-lnsl  $LIBS"
  1116. cat > conftest.$ac_ext <<EOF
  1117. #line 1118 "configure"
  1118. #include "confdefs.h"
  1119. /* Override any gcc2 internal prototype to avoid an error.  */
  1120. /* We use char because int might match the return type of a gcc2
  1121.     builtin and then its argument prototype would still apply.  */
  1122. char t_accept();
  1123.  
  1124. int main() { return 0; }
  1125. int t() {
  1126. t_accept()
  1127. ; return 0; }
  1128. EOF
  1129. if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1130.   rm -rf conftest*
  1131.   eval "ac_cv_lib_$ac_lib_var=yes"
  1132. else
  1133.   rm -rf conftest*
  1134.   eval "ac_cv_lib_$ac_lib_var=no"
  1135. fi
  1136. rm -f conftest*
  1137. LIBS="$ac_save_LIBS"
  1138.  
  1139. fi
  1140. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1141.   echo "$ac_t""yes" 1>&6
  1142.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  1143. else
  1144.   echo "$ac_t""no" 1>&6
  1145. fi
  1146.  
  1147.  
  1148.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  1149.     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
  1150.     # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
  1151.     if test "`(uname) 2>/dev/null`" != IRIX; then
  1152.       echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1153. ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
  1154. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1155.   echo $ac_n "(cached) $ac_c" 1>&6
  1156. else
  1157.   ac_save_LIBS="$LIBS"
  1158. LIBS="-lsocket  $LIBS"
  1159. cat > conftest.$ac_ext <<EOF
  1160. #line 1161 "configure"
  1161. #include "confdefs.h"
  1162. /* Override any gcc2 internal prototype to avoid an error.  */
  1163. /* We use char because int might match the return type of a gcc2
  1164.     builtin and then its argument prototype would still apply.  */
  1165. char socket();
  1166.  
  1167. int main() { return 0; }
  1168. int t() {
  1169. socket()
  1170. ; return 0; }
  1171. EOF
  1172. if { (eval echo configure:1173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1173.   rm -rf conftest*
  1174.   eval "ac_cv_lib_$ac_lib_var=yes"
  1175. else
  1176.   rm -rf conftest*
  1177.   eval "ac_cv_lib_$ac_lib_var=no"
  1178. fi
  1179. rm -f conftest*
  1180. LIBS="$ac_save_LIBS"
  1181.  
  1182. fi
  1183. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1184.   echo "$ac_t""yes" 1>&6
  1185.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  1186. else
  1187.   echo "$ac_t""no" 1>&6
  1188. fi
  1189.  
  1190.     fi
  1191.   fi
  1192. fi
  1193.  
  1194. echo $ac_n "checking for -lm""... $ac_c" 1>&6
  1195. ac_lib_var=`echo m'_'atan | tr './+\055' '__p_'`
  1196. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1197.   echo $ac_n "(cached) $ac_c" 1>&6
  1198. else
  1199.   ac_save_LIBS="$LIBS"
  1200. LIBS="-lm  $LIBS"
  1201. cat > conftest.$ac_ext <<EOF
  1202. #line 1203 "configure"
  1203. #include "confdefs.h"
  1204. /* Override any gcc2 internal prototype to avoid an error.  */
  1205. /* We use char because int might match the return type of a gcc2
  1206.     builtin and then its argument prototype would still apply.  */
  1207. char atan();
  1208.  
  1209. int main() { return 0; }
  1210. int t() {
  1211. atan()
  1212. ; return 0; }
  1213. EOF
  1214. if { (eval echo configure:1215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1215.   rm -rf conftest*
  1216.   eval "ac_cv_lib_$ac_lib_var=yes"
  1217. else
  1218.   rm -rf conftest*
  1219.   eval "ac_cv_lib_$ac_lib_var=no"
  1220. fi
  1221. rm -f conftest*
  1222. LIBS="$ac_save_LIBS"
  1223.  
  1224. fi
  1225. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1226.   echo "$ac_t""yes" 1>&6
  1227.     ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1228.   cat >> confdefs.h <<EOF
  1229. #define $ac_tr_lib 1
  1230. EOF
  1231.  
  1232.   LIBS="-lm $LIBS"
  1233.  
  1234. else
  1235.   echo "$ac_t""no" 1>&6
  1236. fi
  1237.  
  1238. echo $ac_n "checking for -lBSD""... $ac_c" 1>&6
  1239. ac_lib_var=`echo BSD'_'signal | tr './+\055' '__p_'`
  1240. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1241.   echo $ac_n "(cached) $ac_c" 1>&6
  1242. else
  1243.   ac_save_LIBS="$LIBS"
  1244. LIBS="-lBSD  $LIBS"
  1245. cat > conftest.$ac_ext <<EOF
  1246. #line 1247 "configure"
  1247. #include "confdefs.h"
  1248. /* Override any gcc2 internal prototype to avoid an error.  */
  1249. /* We use char because int might match the return type of a gcc2
  1250.     builtin and then its argument prototype would still apply.  */
  1251. char signal();
  1252.  
  1253. int main() { return 0; }
  1254. int t() {
  1255. signal()
  1256. ; return 0; }
  1257. EOF
  1258. if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1259.   rm -rf conftest*
  1260.   eval "ac_cv_lib_$ac_lib_var=yes"
  1261. else
  1262.   rm -rf conftest*
  1263.   eval "ac_cv_lib_$ac_lib_var=no"
  1264. fi
  1265. rm -f conftest*
  1266. LIBS="$ac_save_LIBS"
  1267.  
  1268. fi
  1269. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1270.   echo "$ac_t""yes" 1>&6
  1271.     ac_tr_lib=HAVE_LIB`echo BSD | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1272.   cat >> confdefs.h <<EOF
  1273. #define $ac_tr_lib 1
  1274. EOF
  1275.  
  1276.   LIBS="-lBSD $LIBS"
  1277.  
  1278. else
  1279.   echo "$ac_t""no" 1>&6
  1280. fi
  1281.  
  1282. echo $ac_n "checking for -lbsd""... $ac_c" 1>&6
  1283. ac_lib_var=`echo bsd'_'signal | tr './+\055' '__p_'`
  1284. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1285.   echo $ac_n "(cached) $ac_c" 1>&6
  1286. else
  1287.   ac_save_LIBS="$LIBS"
  1288. LIBS="-lbsd  $LIBS"
  1289. cat > conftest.$ac_ext <<EOF
  1290. #line 1291 "configure"
  1291. #include "confdefs.h"
  1292. /* Override any gcc2 internal prototype to avoid an error.  */
  1293. /* We use char because int might match the return type of a gcc2
  1294.     builtin and then its argument prototype would still apply.  */
  1295. char signal();
  1296.  
  1297. int main() { return 0; }
  1298. int t() {
  1299. signal()
  1300. ; return 0; }
  1301. EOF
  1302. if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1303.   rm -rf conftest*
  1304.   eval "ac_cv_lib_$ac_lib_var=yes"
  1305. else
  1306.   rm -rf conftest*
  1307.   eval "ac_cv_lib_$ac_lib_var=no"
  1308. fi
  1309. rm -f conftest*
  1310. LIBS="$ac_save_LIBS"
  1311.  
  1312. fi
  1313. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1314.   echo "$ac_t""yes" 1>&6
  1315.     ac_tr_lib=HAVE_LIB`echo bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1316.   cat >> confdefs.h <<EOF
  1317. #define $ac_tr_lib 1
  1318. EOF
  1319.  
  1320.   LIBS="-lbsd $LIBS"
  1321.  
  1322. else
  1323.   echo "$ac_t""no" 1>&6
  1324. fi
  1325.  
  1326.  
  1327. tcap=no
  1328. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1329. ac_lib_var=`echo termcap'_'tgetstr | tr './+\055' '__p_'`
  1330. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1331.   echo $ac_n "(cached) $ac_c" 1>&6
  1332. else
  1333.   ac_save_LIBS="$LIBS"
  1334. LIBS="-ltermcap  $LIBS"
  1335. cat > conftest.$ac_ext <<EOF
  1336. #line 1337 "configure"
  1337. #include "confdefs.h"
  1338. /* Override any gcc2 internal prototype to avoid an error.  */
  1339. /* We use char because int might match the return type of a gcc2
  1340.     builtin and then its argument prototype would still apply.  */
  1341. char tgetstr();
  1342.  
  1343. int main() { return 0; }
  1344. int t() {
  1345. tgetstr()
  1346. ; return 0; }
  1347. EOF
  1348. if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1349.   rm -rf conftest*
  1350.   eval "ac_cv_lib_$ac_lib_var=yes"
  1351. else
  1352.   rm -rf conftest*
  1353.   eval "ac_cv_lib_$ac_lib_var=no"
  1354. fi
  1355. rm -f conftest*
  1356. LIBS="$ac_save_LIBS"
  1357.  
  1358. fi
  1359. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1360.   echo "$ac_t""yes" 1>&6
  1361.   cat >> confdefs.h <<\EOF
  1362. #define HAVE_LIBTERMCAP 1
  1363. EOF
  1364.  LIBS="$LIBS -ltermcap" tcap=yes
  1365. else
  1366.   echo "$ac_t""no" 1>&6
  1367. fi
  1368.  
  1369. if test $tcap = no; then
  1370.    echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  1371. ac_lib_var=`echo termlib'_'tgetstr | tr './+\055' '__p_'`
  1372. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1373.   echo $ac_n "(cached) $ac_c" 1>&6
  1374. else
  1375.   ac_save_LIBS="$LIBS"
  1376. LIBS="-ltermlib  $LIBS"
  1377. cat > conftest.$ac_ext <<EOF
  1378. #line 1379 "configure"
  1379. #include "confdefs.h"
  1380. /* Override any gcc2 internal prototype to avoid an error.  */
  1381. /* We use char because int might match the return type of a gcc2
  1382.     builtin and then its argument prototype would still apply.  */
  1383. char tgetstr();
  1384.  
  1385. int main() { return 0; }
  1386. int t() {
  1387. tgetstr()
  1388. ; return 0; }
  1389. EOF
  1390. if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1391.   rm -rf conftest*
  1392.   eval "ac_cv_lib_$ac_lib_var=yes"
  1393. else
  1394.   rm -rf conftest*
  1395.   eval "ac_cv_lib_$ac_lib_var=no"
  1396. fi
  1397. rm -f conftest*
  1398. LIBS="$ac_save_LIBS"
  1399.  
  1400. fi
  1401. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1402.   echo "$ac_t""yes" 1>&6
  1403.   cat >> confdefs.h <<\EOF
  1404. #define HAVE_LIBTERMLIB 1
  1405. EOF
  1406.  LIBS="$LIBS -ltermlib" tcap=yes
  1407. else
  1408.   echo "$ac_t""no" 1>&6
  1409. fi
  1410.  
  1411. fi
  1412. if test $tcap = no; then
  1413.    echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  1414. ac_lib_var=`echo curses'_'tgetstr | tr './+\055' '__p_'`
  1415. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1416.   echo $ac_n "(cached) $ac_c" 1>&6
  1417. else
  1418.   ac_save_LIBS="$LIBS"
  1419. LIBS="-lcurses  $LIBS"
  1420. cat > conftest.$ac_ext <<EOF
  1421. #line 1422 "configure"
  1422. #include "confdefs.h"
  1423. /* Override any gcc2 internal prototype to avoid an error.  */
  1424. /* We use char because int might match the return type of a gcc2
  1425.     builtin and then its argument prototype would still apply.  */
  1426. char tgetstr();
  1427.  
  1428. int main() { return 0; }
  1429. int t() {
  1430. tgetstr()
  1431. ; return 0; }
  1432. EOF
  1433. if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1434.   rm -rf conftest*
  1435.   eval "ac_cv_lib_$ac_lib_var=yes"
  1436. else
  1437.   rm -rf conftest*
  1438.   eval "ac_cv_lib_$ac_lib_var=no"
  1439. fi
  1440. rm -f conftest*
  1441. LIBS="$ac_save_LIBS"
  1442.  
  1443. fi
  1444. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1445.   echo "$ac_t""yes" 1>&6
  1446.   cat >> confdefs.h <<\EOF
  1447. #define HAVE_LIBCURSES 1
  1448. EOF
  1449.  LIBS="$LIBS -lcurses" tcap=yes
  1450. else
  1451.   echo "$ac_t""no" 1>&6
  1452. fi
  1453.  
  1454. fi
  1455.  
  1456. # If we cannot run a trivial program, we must be cross compiling.
  1457. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1458. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1459.   echo $ac_n "(cached) $ac_c" 1>&6
  1460. else
  1461.   if test "$cross_compiling" = yes; then
  1462.   ac_cv_c_cross=yes
  1463. else
  1464. cat > conftest.$ac_ext <<EOF
  1465. #line 1466 "configure"
  1466. #include "confdefs.h"
  1467. main(){return(0);}
  1468. EOF
  1469. { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1470. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1471.   ac_cv_c_cross=no
  1472. else
  1473.   ac_cv_c_cross=yes
  1474. fi
  1475. fi
  1476. rm -fr conftest*
  1477. fi
  1478.  
  1479. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1480. cross_compiling=$ac_cv_c_cross
  1481.  
  1482. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1483. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1484.   echo $ac_n "(cached) $ac_c" 1>&6
  1485. else
  1486.   cat > conftest.$ac_ext <<EOF
  1487. #line 1488 "configure"
  1488. #include "confdefs.h"
  1489. #include <stdlib.h>
  1490. #include <stdarg.h>
  1491. #include <string.h>
  1492. #include <float.h>
  1493. EOF
  1494. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1495. { (eval echo configure:1496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1496. ac_err=`grep -v '^ *+' conftest.out`
  1497. if test -z "$ac_err"; then
  1498.   rm -rf conftest*
  1499.   ac_cv_header_stdc=yes
  1500. else
  1501.   echo "$ac_err" >&5
  1502.   rm -rf conftest*
  1503.   ac_cv_header_stdc=no
  1504. fi
  1505. rm -f conftest*
  1506.  
  1507. if test $ac_cv_header_stdc = yes; then
  1508.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1509. cat > conftest.$ac_ext <<EOF
  1510. #line 1511 "configure"
  1511. #include "confdefs.h"
  1512. #include <string.h>
  1513. EOF
  1514. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1515.   egrep "memchr" >/dev/null 2>&1; then
  1516.   :
  1517. else
  1518.   rm -rf conftest*
  1519.   ac_cv_header_stdc=no
  1520. fi
  1521. rm -f conftest*
  1522.  
  1523. fi
  1524.  
  1525. if test $ac_cv_header_stdc = yes; then
  1526.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1527. cat > conftest.$ac_ext <<EOF
  1528. #line 1529 "configure"
  1529. #include "confdefs.h"
  1530. #include <stdlib.h>
  1531. EOF
  1532. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1533.   egrep "free" >/dev/null 2>&1; then
  1534.   :
  1535. else
  1536.   rm -rf conftest*
  1537.   ac_cv_header_stdc=no
  1538. fi
  1539. rm -f conftest*
  1540.  
  1541. fi
  1542.  
  1543. if test $ac_cv_header_stdc = yes; then
  1544.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1545. if test "$cross_compiling" = yes; then
  1546.   :
  1547. else
  1548. cat > conftest.$ac_ext <<EOF
  1549. #line 1550 "configure"
  1550. #include "confdefs.h"
  1551. #include <ctype.h>
  1552. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1553. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1554. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1555. int main () { int i; for (i = 0; i < 256; i++)
  1556. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1557. exit (0); }
  1558.  
  1559. EOF
  1560. { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1561. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1562.   :
  1563. else
  1564.   ac_cv_header_stdc=no
  1565. fi
  1566. fi
  1567. rm -fr conftest*
  1568. fi
  1569. fi
  1570.  
  1571. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1572. if test $ac_cv_header_stdc = yes; then
  1573.   cat >> confdefs.h <<\EOF
  1574. #define STDC_HEADERS 1
  1575. EOF
  1576.  
  1577. fi
  1578.  
  1579. for ac_hdr in sgtty.h termio.h unistd.h string.h
  1580. do
  1581. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1582. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1583. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1584.   echo $ac_n "(cached) $ac_c" 1>&6
  1585. else
  1586.   cat > conftest.$ac_ext <<EOF
  1587. #line 1588 "configure"
  1588. #include "confdefs.h"
  1589. #include <$ac_hdr>
  1590. EOF
  1591. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1592. { (eval echo configure:1593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1593. ac_err=`grep -v '^ *+' conftest.out`
  1594. if test -z "$ac_err"; then
  1595.   rm -rf conftest*
  1596.   eval "ac_cv_header_$ac_safe=yes"
  1597. else
  1598.   echo "$ac_err" >&5
  1599.   rm -rf conftest*
  1600.   eval "ac_cv_header_$ac_safe=no"
  1601. fi
  1602. rm -f conftest*
  1603. fi
  1604. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1605.   echo "$ac_t""yes" 1>&6
  1606.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1607.   cat >> confdefs.h <<EOF
  1608. #define $ac_tr_hdr 1
  1609. EOF
  1610.  
  1611. else
  1612.   echo "$ac_t""no" 1>&6
  1613. fi
  1614. done
  1615.  
  1616.  
  1617. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1618. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1619.   echo $ac_n "(cached) $ac_c" 1>&6
  1620. else
  1621.   cat > conftest.$ac_ext <<EOF
  1622. #line 1623 "configure"
  1623. #include "confdefs.h"
  1624. #include <sys/types.h>
  1625. #if STDC_HEADERS
  1626. #include <stdlib.h>
  1627. #endif
  1628. EOF
  1629. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1630.   egrep "size_t" >/dev/null 2>&1; then
  1631.   rm -rf conftest*
  1632.   ac_cv_type_size_t=yes
  1633. else
  1634.   rm -rf conftest*
  1635.   ac_cv_type_size_t=no
  1636. fi
  1637. rm -f conftest*
  1638.  
  1639. fi
  1640. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1641. if test $ac_cv_type_size_t = no; then
  1642.   cat >> confdefs.h <<\EOF
  1643. #define size_t unsigned
  1644. EOF
  1645.  
  1646. fi
  1647.  
  1648. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1649. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1650.   echo $ac_n "(cached) $ac_c" 1>&6
  1651. else
  1652.   cat > conftest.$ac_ext <<EOF
  1653. #line 1654 "configure"
  1654. #include "confdefs.h"
  1655. #include <sys/types.h>
  1656. #include <signal.h>
  1657. #ifdef signal
  1658. #undef signal
  1659. #endif
  1660. #ifdef __cplusplus
  1661. extern "C" void (*signal (int, void (*)(int)))(int);
  1662. #else
  1663. void (*signal ()) ();
  1664. #endif
  1665.  
  1666. int main() { return 0; }
  1667. int t() {
  1668. int i;
  1669. ; return 0; }
  1670. EOF
  1671. if { (eval echo configure:1672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1672.   rm -rf conftest*
  1673.   ac_cv_type_signal=void
  1674. else
  1675.   rm -rf conftest*
  1676.   ac_cv_type_signal=int
  1677. fi
  1678. rm -f conftest*
  1679.  
  1680. fi
  1681.  
  1682. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1683. cat >> confdefs.h <<EOF
  1684. #define RETSIGTYPE $ac_cv_type_signal
  1685. EOF
  1686.  
  1687.  
  1688.  
  1689. for ac_func in usleep srandom sigvec sigsetmask matherr drem irint bcopy memcpy
  1690. do
  1691. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1692. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1693.   echo $ac_n "(cached) $ac_c" 1>&6
  1694. else
  1695.   cat > conftest.$ac_ext <<EOF
  1696. #line 1697 "configure"
  1697. #include "confdefs.h"
  1698. /* System header to define __stub macros and hopefully few prototypes,
  1699.     which can conflict with char $ac_func(); below.  */
  1700. #include <assert.h>
  1701. /* Override any gcc2 internal prototype to avoid an error.  */
  1702. /* We use char because int might match the return type of a gcc2
  1703.     builtin and then its argument prototype would still apply.  */
  1704. char $ac_func();
  1705.  
  1706. int main() { return 0; }
  1707. int t() {
  1708.  
  1709. /* The GNU C library defines this for functions which it implements
  1710.     to always fail with ENOSYS.  Some functions are actually named
  1711.     something starting with __ and the normal name is an alias.  */
  1712. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1713. choke me
  1714. #else
  1715. $ac_func();
  1716. #endif
  1717.  
  1718. ; return 0; }
  1719. EOF
  1720. if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1721.   rm -rf conftest*
  1722.   eval "ac_cv_func_$ac_func=yes"
  1723. else
  1724.   rm -rf conftest*
  1725.   eval "ac_cv_func_$ac_func=no"
  1726. fi
  1727. rm -f conftest*
  1728.  
  1729. fi
  1730. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1731.   echo "$ac_t""yes" 1>&6
  1732.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1733.   cat >> confdefs.h <<EOF
  1734. #define $ac_tr_func 1
  1735. EOF
  1736.  
  1737. else
  1738.   echo "$ac_t""no" 1>&6
  1739. fi
  1740. done
  1741.  
  1742. if test $ac_cv_prog_gcc = yes; then
  1743.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  1744. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  1745.   echo $ac_n "(cached) $ac_c" 1>&6
  1746. else
  1747.     ac_pattern="Autoconf.*'x'"
  1748.   cat > conftest.$ac_ext <<EOF
  1749. #line 1750 "configure"
  1750. #include "confdefs.h"
  1751. #include <sgtty.h>
  1752. Autoconf TIOCGETP
  1753. EOF
  1754. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1755.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1756.   rm -rf conftest*
  1757.   ac_cv_prog_gcc_traditional=yes
  1758. else
  1759.   rm -rf conftest*
  1760.   ac_cv_prog_gcc_traditional=no
  1761. fi
  1762. rm -f conftest*
  1763.  
  1764.  
  1765.   if test $ac_cv_prog_gcc_traditional = no; then
  1766.     cat > conftest.$ac_ext <<EOF
  1767. #line 1768 "configure"
  1768. #include "confdefs.h"
  1769. #include <termio.h>
  1770. Autoconf TCGETA
  1771. EOF
  1772. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1773.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1774.   rm -rf conftest*
  1775.   ac_cv_prog_gcc_traditional=yes
  1776. fi
  1777. rm -f conftest*
  1778.  
  1779.   fi
  1780. fi
  1781.  
  1782. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1783.   if test $ac_cv_prog_gcc_traditional = yes; then
  1784.     CC="$CC -traditional"
  1785.   fi
  1786. fi
  1787.  
  1788.  
  1789. if test "$no_x" != yes; then
  1790.    LIBS="$LIBS -lX11"
  1791. fi
  1792.  
  1793. trap '' 1 2 15
  1794. cat > confcache <<\EOF
  1795. # This file is a shell script that caches the results of configure
  1796. # tests run on this system so they can be shared between configure
  1797. # scripts and configure runs.  It is not useful on other systems.
  1798. # If it contains results you don't want to keep, you may remove or edit it.
  1799. #
  1800. # By default, configure uses ./config.cache as the cache file,
  1801. # creating it if it does not exist already.  You can give configure
  1802. # the --cache-file=FILE option to use a different cache file; that is
  1803. # what configure does when it calls configure scripts in
  1804. # subdirectories, so they share the cache.
  1805. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1806. # config.status only pays attention to the cache file if you give it the
  1807. # --recheck option to rerun configure.
  1808. #
  1809. EOF
  1810. # Ultrix sh set writes to stderr and can't be redirected directly,
  1811. # and sets the high bit in the cache file unless we assign to the vars.
  1812. (set) 2>&1 |
  1813.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1814.   >> confcache
  1815. if cmp -s $cache_file confcache; then
  1816.   :
  1817. else
  1818.   if test -w $cache_file; then
  1819.     echo "updating cache $cache_file"
  1820.     cat confcache > $cache_file
  1821.   else
  1822.     echo "not updating unwritable cache $cache_file"
  1823.   fi
  1824. fi
  1825. rm -f confcache
  1826.  
  1827. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1828.  
  1829. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1830. # Let make expand exec_prefix.
  1831. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1832.  
  1833. # Any assignment to VPATH causes Sun make to only execute
  1834. # the first set of double-colon rules, so remove it if not needed.
  1835. # If there is a colon in the path, we need to keep it.
  1836. if test "x$srcdir" = x.; then
  1837.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1838. fi
  1839.  
  1840. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1841.  
  1842. DEFS=-DHAVE_CONFIG_H
  1843.  
  1844. # Without the "./", some shells look in PATH for config.status.
  1845. : ${CONFIG_STATUS=./config.status}
  1846.  
  1847. echo creating $CONFIG_STATUS
  1848. rm -f $CONFIG_STATUS
  1849. cat > $CONFIG_STATUS <<EOF
  1850. #! /bin/sh
  1851. # Generated automatically by configure.
  1852. # Run this file to recreate the current configuration.
  1853. # This directory was configured as follows,
  1854. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1855. #
  1856. # $0 $ac_configure_args
  1857. #
  1858. # Compiler output produced by configure, useful for debugging
  1859. # configure, is in ./config.log if it exists.
  1860.  
  1861. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1862. for ac_option
  1863. do
  1864.   case "\$ac_option" in
  1865.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1866.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1867.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1868.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1869.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  1870.     exit 0 ;;
  1871.   -help | --help | --hel | --he | --h)
  1872.     echo "\$ac_cs_usage"; exit 0 ;;
  1873.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1874.   esac
  1875. done
  1876.  
  1877. ac_given_srcdir=$srcdir
  1878.  
  1879. trap 'rm -fr `echo "makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1880. EOF
  1881. cat >> $CONFIG_STATUS <<EOF
  1882.  
  1883. # Protect against being on the right side of a sed subst in config.status.
  1884. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1885.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1886. $ac_vpsub
  1887. $extrasub
  1888. s%@CFLAGS@%$CFLAGS%g
  1889. s%@CPPFLAGS@%$CPPFLAGS%g
  1890. s%@CXXFLAGS@%$CXXFLAGS%g
  1891. s%@DEFS@%$DEFS%g
  1892. s%@LDFLAGS@%$LDFLAGS%g
  1893. s%@LIBS@%$LIBS%g
  1894. s%@exec_prefix@%$exec_prefix%g
  1895. s%@prefix@%$prefix%g
  1896. s%@program_transform_name@%$program_transform_name%g
  1897. s%@bindir@%$bindir%g
  1898. s%@sbindir@%$sbindir%g
  1899. s%@libexecdir@%$libexecdir%g
  1900. s%@datadir@%$datadir%g
  1901. s%@sysconfdir@%$sysconfdir%g
  1902. s%@sharedstatedir@%$sharedstatedir%g
  1903. s%@localstatedir@%$localstatedir%g
  1904. s%@libdir@%$libdir%g
  1905. s%@includedir@%$includedir%g
  1906. s%@oldincludedir@%$oldincludedir%g
  1907. s%@infodir@%$infodir%g
  1908. s%@mandir@%$mandir%g
  1909. s%@CC@%$CC%g
  1910. s%@CPP@%$CPP%g
  1911. s%@X_CFLAGS@%$X_CFLAGS%g
  1912. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  1913. s%@X_LIBS@%$X_LIBS%g
  1914. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  1915.  
  1916. CEOF
  1917. EOF
  1918. cat >> $CONFIG_STATUS <<EOF
  1919.  
  1920. CONFIG_FILES=\${CONFIG_FILES-"makefile"}
  1921. EOF
  1922. cat >> $CONFIG_STATUS <<\EOF
  1923. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1924.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1925.   case "$ac_file" in
  1926.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1927.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1928.   *) ac_file_in="${ac_file}.in" ;;
  1929.   esac
  1930.  
  1931.   # Adjust relative srcdir, etc. for subdirectories.
  1932.  
  1933.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1934.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1935.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1936.     # The file is in a subdirectory.
  1937.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1938.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1939.     # A "../" for each directory in $ac_dir_suffix.
  1940.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1941.   else
  1942.     ac_dir_suffix= ac_dots=
  1943.   fi
  1944.  
  1945.   case "$ac_given_srcdir" in
  1946.   .)  srcdir=.
  1947.       if test -z "$ac_dots"; then top_srcdir=.
  1948.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1949.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1950.   *) # Relative path.
  1951.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1952.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1953.   esac
  1954.  
  1955.   echo creating "$ac_file"
  1956.   rm -f "$ac_file"
  1957.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1958.   case "$ac_file" in
  1959.   *Makefile*) ac_comsub="1i\\
  1960. # $configure_input" ;;
  1961.   *) ac_comsub= ;;
  1962.   esac
  1963.   sed -e "$ac_comsub
  1964. s%@configure_input@%$configure_input%g
  1965. s%@srcdir@%$srcdir%g
  1966. s%@top_srcdir@%$top_srcdir%g
  1967. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1968. fi; done
  1969. rm -f conftest.subs
  1970.  
  1971. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1972. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1973. #
  1974. # ac_d sets the value in "#define NAME VALUE" lines.
  1975. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1976. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1977. ac_dC='\3'
  1978. ac_dD='%g'
  1979. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1980. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1981. ac_uB='\([     ]\)%\1#\2define\3'
  1982. ac_uC=' '
  1983. ac_uD='\4%g'
  1984. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1985. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1986. ac_eB='$%\1#\2define\3'
  1987. ac_eC=' '
  1988. ac_eD='%g'
  1989.  
  1990. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1991. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1992.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1993.   case "$ac_file" in
  1994.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1995.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1996.   *) ac_file_in="${ac_file}.in" ;;
  1997.   esac
  1998.  
  1999.   echo creating $ac_file
  2000.  
  2001.   rm -f conftest.frag conftest.in conftest.out
  2002.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2003.  
  2004. EOF
  2005.  
  2006. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2007. # the proper values into config.h.in to produce config.h.  And first:
  2008. # Protect against being on the right side of a sed subst in config.status.
  2009. # Protect against being in an unquoted here document in config.status.
  2010. rm -f conftest.vals
  2011. cat > conftest.hdr <<\EOF
  2012. s/[\\&%]/\\&/g
  2013. s%[\\$`]%\\&%g
  2014. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2015. s%ac_d%ac_u%gp
  2016. s%ac_u%ac_e%gp
  2017. EOF
  2018. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2019. rm -f conftest.hdr
  2020.  
  2021. # This sed command replaces #undef with comments.  This is necessary, for
  2022. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2023. # on some systems where configure will not decide to define it.
  2024. cat >> conftest.vals <<\EOF
  2025. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2026. EOF
  2027.  
  2028. # Break up conftest.vals because some shells have a limit on
  2029. # the size of here documents, and old seds have small limits too.
  2030. # Maximum number of lines to put in a single here document.
  2031. ac_max_here_lines=12
  2032.  
  2033. rm -f conftest.tail
  2034. while :
  2035. do
  2036.   ac_lines=`grep -c . conftest.vals`
  2037.   # grep -c gives empty output for an empty file on some AIX systems.
  2038.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2039.   # Write a limited-size here document to conftest.frag.
  2040.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2041.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2042.   echo 'CEOF
  2043.   sed -f conftest.frag conftest.in > conftest.out
  2044.   rm -f conftest.in
  2045.   mv conftest.out conftest.in
  2046. ' >> $CONFIG_STATUS
  2047.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2048.   rm -f conftest.vals
  2049.   mv conftest.tail conftest.vals
  2050. done
  2051. rm -f conftest.vals
  2052.  
  2053. cat >> $CONFIG_STATUS <<\EOF
  2054.   rm -f conftest.frag conftest.h
  2055.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2056.   cat conftest.in >> conftest.h
  2057.   rm -f conftest.in
  2058.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2059.     echo "$ac_file is unchanged"
  2060.     rm -f conftest.h
  2061.   else
  2062.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2063.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2064.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2065.       # The file is in a subdirectory.
  2066.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2067.     fi
  2068.     rm -f $ac_file
  2069.     mv conftest.h $ac_file
  2070.   fi
  2071. fi; done
  2072.  
  2073.  
  2074.  
  2075. exit 0
  2076. EOF
  2077. chmod +x $CONFIG_STATUS
  2078. rm -fr confdefs* $ac_clean_files
  2079. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2080.  
  2081.