home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / configure < prev    next >
Text File  |  1996-10-01  |  81KB  |  2,806 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. guidedir='${prefix}/guide'
  50. psdir='${prefix}/ps'
  51. dvidir='${prefix}/dvi'
  52. mandir='${prefix}/man'
  53.  
  54. # Initialize some other variables.
  55. subdirs=
  56. MFLAGS= MAKEFLAGS=
  57.  
  58. ac_prev=
  59. for ac_option
  60. do
  61.  
  62.   # If the previous option needs an argument, assign it.
  63.   if test -n "$ac_prev"; then
  64.     eval "$ac_prev=\$ac_option"
  65.     ac_prev=
  66.     continue
  67.   fi
  68.  
  69.   case "$ac_option" in
  70.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  71.   *) ac_optarg= ;;
  72.   esac
  73.  
  74.   # Accept the important Cygnus configure options, so we can diagnose typos.
  75.  
  76.   case "$ac_option" in
  77.  
  78.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  79.     ac_prev=bindir ;;
  80.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  81.     bindir="$ac_optarg" ;;
  82.  
  83.   -build | --build | --buil | --bui | --bu)
  84.     ac_prev=build ;;
  85.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  86.     build="$ac_optarg" ;;
  87.  
  88.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  89.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  90.     ac_prev=cache_file ;;
  91.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  92.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  93.     cache_file="$ac_optarg" ;;
  94.  
  95.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  96.     ac_prev=datadir ;;
  97.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  98.   | --da=*)
  99.     datadir="$ac_optarg" ;;
  100.  
  101.   -disable-* | --disable-*)
  102.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  103.     # Reject names that are not valid shell variable names.
  104.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  105.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  106.     fi
  107.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  108.     eval "enable_${ac_feature}=no" ;;
  109.  
  110.   -enable-* | --enable-*)
  111.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  112.     # Reject names that are not valid shell variable names.
  113.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  114.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  115.     fi
  116.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  117.     case "$ac_option" in
  118.       *=*) ;;
  119.       *) ac_optarg=yes ;;
  120.     esac
  121.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  122.  
  123.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  124.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  125.   | --exec | --exe | --ex)
  126.     ac_prev=exec_prefix ;;
  127.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  128.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  129.   | --exec=* | --exe=* | --ex=*)
  130.     exec_prefix="$ac_optarg" ;;
  131.  
  132.   -gas | --gas | --ga | --g)
  133.     # Obsolete; use --with-gas.
  134.     with_gas=yes ;;
  135.  
  136.   -help | --help | --hel | --he)
  137.     # Omit some internal or obsolete options to make the list less imposing.
  138.     # This message is too long to be a string in the A/UX 3.1 sh.
  139.     cat << EOF
  140. Usage: configure [options] [host]
  141. Options: [defaults in brackets after descriptions]
  142. Configuration:
  143.   --cache-file=FILE       cache test results in FILE
  144.   --help                  print this message
  145.   --no-create             do not create output files
  146.   --quiet, --silent       do not print \`checking...' messages
  147.   --version               print the version of autoconf that created configure
  148. Directory and file names:
  149.   --prefix=PREFIX         install architecture-independent files in PREFIX
  150.                           [$ac_default_prefix]
  151.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  152.                           [same as prefix]
  153.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  154.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  155.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  156.   --datadir=DIR           read-only architecture-independent data in DIR
  157.                           [PREFIX/share]
  158.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  159.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  160.                           [PREFIX/com]
  161.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  162.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  163.   --includedir=DIR        C header files in DIR [PREFIX/include]
  164.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  165.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  166.   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  167.   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  168.   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  169.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  170.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  171.   --program-prefix=PREFIX prepend PREFIX to installed program names
  172.   --program-suffix=SUFFIX append SUFFIX to installed program names
  173.   --program-transform-name=PROGRAM
  174.                           run sed PROGRAM on installed program names
  175. EOF
  176.     cat << EOF
  177. Host type:
  178.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  179.   --host=HOST             configure for HOST [guessed]
  180.   --target=TARGET         configure for TARGET [TARGET=HOST]
  181. Features and packages:
  182.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  183.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  184.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  185.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  186.   --x-includes=DIR        X include files are in DIR
  187.   --x-libraries=DIR       X library files are in DIR
  188. EOF
  189.     if test -n "$ac_help"; then
  190.       echo "--enable and --with options recognized:$ac_help"
  191.     fi
  192.     exit 0 ;;
  193.  
  194.   -host | --host | --hos | --ho)
  195.     ac_prev=host ;;
  196.   -host=* | --host=* | --hos=* | --ho=*)
  197.     host="$ac_optarg" ;;
  198.  
  199.   -includedir | --includedir | --includedi | --included | --include \
  200.   | --includ | --inclu | --incl | --inc)
  201.     ac_prev=includedir ;;
  202.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  203.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  204.     includedir="$ac_optarg" ;;
  205.  
  206.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  207.     ac_prev=infodir ;;
  208.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  209.     infodir="$ac_optarg" ;;
  210.  
  211.  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  212.    ac_prev=guidedir ;;
  213.  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  214.  
  215.  -psdir | --psdir | --psdi | --psd | --ps)
  216.    ac_prev=psdir ;;
  217.  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  218.  
  219.  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  220.    ac_prev=dvidir ;;
  221.  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  222.  
  223.   -libdir | --libdir | --libdi | --libd)
  224.     ac_prev=libdir ;;
  225.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  226.     libdir="$ac_optarg" ;;
  227.  
  228.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  229.   | --libexe | --libex | --libe)
  230.     ac_prev=libexecdir ;;
  231.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  232.   | --libexe=* | --libex=* | --libe=*)
  233.     libexecdir="$ac_optarg" ;;
  234.  
  235.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  236.   | --localstate | --localstat | --localsta | --localst \
  237.   | --locals | --local | --loca | --loc | --lo)
  238.     ac_prev=localstatedir ;;
  239.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  240.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  241.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  242.     localstatedir="$ac_optarg" ;;
  243.  
  244.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  245.     ac_prev=mandir ;;
  246.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  247.     mandir="$ac_optarg" ;;
  248.  
  249.   -nfp | --nfp | --nf)
  250.     # Obsolete; use --without-fp.
  251.     with_fp=no ;;
  252.  
  253.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  254.   | --no-cr | --no-c)
  255.     no_create=yes ;;
  256.  
  257.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  258.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  259.     no_recursion=yes ;;
  260.  
  261.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  262.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  263.   | --oldin | --oldi | --old | --ol | --o)
  264.     ac_prev=oldincludedir ;;
  265.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  266.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  267.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  268.     oldincludedir="$ac_optarg" ;;
  269.  
  270.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  271.     ac_prev=prefix ;;
  272.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  273.     prefix="$ac_optarg" ;;
  274.  
  275.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  276.   | --program-pre | --program-pr | --program-p)
  277.     ac_prev=program_prefix ;;
  278.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  279.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  280.     program_prefix="$ac_optarg" ;;
  281.  
  282.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  283.   | --program-suf | --program-su | --program-s)
  284.     ac_prev=program_suffix ;;
  285.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  286.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  287.     program_suffix="$ac_optarg" ;;
  288.  
  289.   -program-transform-name | --program-transform-name \
  290.   | --program-transform-nam | --program-transform-na \
  291.   | --program-transform-n | --program-transform- \
  292.   | --program-transform | --program-transfor \
  293.   | --program-transfo | --program-transf \
  294.   | --program-trans | --program-tran \
  295.   | --progr-tra | --program-tr | --program-t)
  296.     ac_prev=program_transform_name ;;
  297.   -program-transform-name=* | --program-transform-name=* \
  298.   | --program-transform-nam=* | --program-transform-na=* \
  299.   | --program-transform-n=* | --program-transform-=* \
  300.   | --program-transform=* | --program-transfor=* \
  301.   | --program-transfo=* | --program-transf=* \
  302.   | --program-trans=* | --program-tran=* \
  303.   | --progr-tra=* | --program-tr=* | --program-t=*)
  304.     program_transform_name="$ac_optarg" ;;
  305.  
  306.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  307.   | -silent | --silent | --silen | --sile | --sil)
  308.     silent=yes ;;
  309.  
  310.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  311.     ac_prev=sbindir ;;
  312.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  313.   | --sbi=* | --sb=*)
  314.     sbindir="$ac_optarg" ;;
  315.  
  316.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  317.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  318.   | --sharedst | --shareds | --shared | --share | --shar \
  319.   | --sha | --sh)
  320.     ac_prev=sharedstatedir ;;
  321.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  322.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  323.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  324.   | --sha=* | --sh=*)
  325.     sharedstatedir="$ac_optarg" ;;
  326.  
  327.   -site | --site | --sit)
  328.     ac_prev=site ;;
  329.   -site=* | --site=* | --sit=*)
  330.     site="$ac_optarg" ;;
  331.  
  332.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  333.     ac_prev=srcdir ;;
  334.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  335.     srcdir="$ac_optarg" ;;
  336.  
  337.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  338.   | --syscon | --sysco | --sysc | --sys | --sy)
  339.     ac_prev=sysconfdir ;;
  340.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  341.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  342.     sysconfdir="$ac_optarg" ;;
  343.  
  344.   -target | --target | --targe | --targ | --tar | --ta | --t)
  345.     ac_prev=target ;;
  346.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  347.     target="$ac_optarg" ;;
  348.  
  349.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  350.     verbose=yes ;;
  351.  
  352.   -version | --version | --versio | --versi | --vers)
  353.     echo "configure generated by autoconf version 2.10"
  354.     exit 0 ;;
  355.  
  356.   -with-* | --with-*)
  357.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  358.     # Reject names that are not valid shell variable names.
  359.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  360.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  361.     fi
  362.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  363.     case "$ac_option" in
  364.       *=*) ;;
  365.       *) ac_optarg=yes ;;
  366.     esac
  367.     eval "with_${ac_package}='$ac_optarg'" ;;
  368.  
  369.   -without-* | --without-*)
  370.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  371.     # Reject names that are not valid shell variable names.
  372.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  373.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  374.     fi
  375.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  376.     eval "with_${ac_package}=no" ;;
  377.  
  378.   --x)
  379.     # Obsolete; use --with-x.
  380.     with_x=yes ;;
  381.  
  382.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  383.   | --x-incl | --x-inc | --x-in | --x-i)
  384.     ac_prev=x_includes ;;
  385.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  386.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  387.     x_includes="$ac_optarg" ;;
  388.  
  389.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  390.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  391.     ac_prev=x_libraries ;;
  392.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  393.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  394.     x_libraries="$ac_optarg" ;;
  395.  
  396.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  397.     ;;
  398.  
  399.   *)
  400.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  401.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  402.     fi
  403.     if test "x$nonopt" != xNONE; then
  404.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  405.     fi
  406.     nonopt="$ac_option"
  407.     ;;
  408.  
  409.   esac
  410. done
  411.  
  412. if test -n "$ac_prev"; then
  413.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  414. fi
  415.  
  416. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  417.  
  418. # File descriptor usage:
  419. # 0 standard input
  420. # 1 file creation
  421. # 2 errors and warnings
  422. # 3 some systems may open it to /dev/tty
  423. # 4 used on the Kubota Titan
  424. # 6 checking for... messages and results
  425. # 5 compiler messages saved in config.log
  426. if test "$silent" = yes; then
  427.   exec 6>/dev/null
  428. else
  429.   exec 6>&1
  430. fi
  431. exec 5>./config.log
  432.  
  433. echo "\
  434. This file contains any messages produced by compilers while
  435. running configure, to aid debugging if configure makes a mistake.
  436. " 1>&5
  437.  
  438. # Strip out --no-create and --no-recursion so they do not pile up.
  439. # Also quote any args containing shell metacharacters.
  440. ac_configure_args=
  441. for ac_arg
  442. do
  443.   case "$ac_arg" in
  444.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  445.   | --no-cr | --no-c) ;;
  446.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  447.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  448.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  449.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  450.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  451.   esac
  452. done
  453.  
  454. # NLS nuisances.
  455. # Only set LANG and LC_ALL to C if already set.
  456. # These must not be set unconditionally because not all systems understand
  457. # e.g. LANG=C (notably SCO).
  458. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  459. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  460.  
  461. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  462. rm -rf conftest* confdefs.h
  463. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  464. echo > confdefs.h
  465.  
  466. # A filename unique to this package, relative to the directory that
  467. # configure is in, which we can look for to find out if srcdir is correct.
  468. ac_unique_file=web2c/web2c.c
  469.  
  470. # Find the source files, if location was not specified.
  471. if test -z "$srcdir"; then
  472.   ac_srcdir_defaulted=yes
  473.   # Try the directory containing this script, then its parent.
  474.   ac_prog=$0
  475.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  476.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  477.   srcdir=$ac_confdir
  478.   if test ! -r $srcdir/$ac_unique_file; then
  479.     srcdir=..
  480.   fi
  481. else
  482.   ac_srcdir_defaulted=no
  483. fi
  484. if test ! -r $srcdir/$ac_unique_file; then
  485.   if test "$ac_srcdir_defaulted" = yes; then
  486.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  487.   else
  488.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  489.   fi
  490. fi
  491. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  492.  
  493. # Prefer explicitly selected file to automatically selected ones.
  494. if test -z "$CONFIG_SITE"; then
  495.   if test "x$prefix" != xNONE; then
  496.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  497.   else
  498.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  499.   fi
  500. fi
  501. for ac_site_file in $CONFIG_SITE; do
  502.   if test -r "$ac_site_file"; then
  503.     echo "loading site script $ac_site_file"
  504.     . "$ac_site_file"
  505.   fi
  506. done
  507.  
  508. if test -r "$cache_file"; then
  509.   echo "loading cache $cache_file"
  510.   . $cache_file
  511. else
  512.   echo "creating cache $cache_file"
  513.   > $cache_file
  514. fi
  515.  
  516. ac_ext=c
  517. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  518. ac_cpp='$CPP $CPPFLAGS'
  519. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  520. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  521.  
  522. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  523.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  524.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  525.     ac_n= ac_c='
  526. ' ac_t='    '
  527.   else
  528.     ac_n=-n ac_c= ac_t=
  529.   fi
  530. else
  531.   ac_n= ac_c='\c' ac_t=
  532. fi
  533.  
  534.  
  535.  
  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. for ac_prog in 'bison -y' byacc
  1438. do
  1439. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1440. set dummy $ac_prog; ac_word=$2
  1441. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1442. if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  1443.   echo $ac_n "(cached) $ac_c" 1>&6
  1444. else
  1445.   if test -n "$YACC"; then
  1446.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  1447. else
  1448.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1449.   for ac_dir in $PATH; do
  1450.     test -z "$ac_dir" && ac_dir=.
  1451.     if test -f $ac_dir/$ac_word; then
  1452.       ac_cv_prog_YACC="$ac_prog"
  1453.       break
  1454.     fi
  1455.   done
  1456.   IFS="$ac_save_ifs"
  1457. fi
  1458. fi
  1459. YACC="$ac_cv_prog_YACC"
  1460. if test -n "$YACC"; then
  1461.   echo "$ac_t""$YACC" 1>&6
  1462. else
  1463.   echo "$ac_t""no" 1>&6
  1464. fi
  1465.  
  1466. test -n "$YACC" && break
  1467. done
  1468. test -n "$YACC" || YACC="yacc"
  1469.  
  1470. # Extract the first word of "flex", so it can be a program name with args.
  1471. set dummy flex; ac_word=$2
  1472. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1473. if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  1474.   echo $ac_n "(cached) $ac_c" 1>&6
  1475. else
  1476.   if test -n "$LEX"; then
  1477.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1478. else
  1479.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1480.   for ac_dir in $PATH; do
  1481.     test -z "$ac_dir" && ac_dir=.
  1482.     if test -f $ac_dir/$ac_word; then
  1483.       ac_cv_prog_LEX="flex"
  1484.       break
  1485.     fi
  1486.   done
  1487.   IFS="$ac_save_ifs"
  1488.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  1489. fi
  1490. fi
  1491. LEX="$ac_cv_prog_LEX"
  1492. if test -n "$LEX"; then
  1493.   echo "$ac_t""$LEX" 1>&6
  1494. else
  1495.   echo "$ac_t""no" 1>&6
  1496. fi
  1497.  
  1498. if test -z "$LEXLIB"
  1499. then
  1500.   case "$LEX" in
  1501.   flex*) ac_lib=fl ;;
  1502.   *) ac_lib=l ;;
  1503.   esac
  1504.   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
  1505. ac_lib_var=`echo $ac_lib'_'yywrap | tr './+\055' '__p_'`
  1506. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1507.   echo $ac_n "(cached) $ac_c" 1>&6
  1508. else
  1509.   ac_save_LIBS="$LIBS"
  1510. LIBS="-l$ac_lib  $LIBS"
  1511. cat > conftest.$ac_ext <<EOF
  1512. #line 1513 "configure"
  1513. #include "confdefs.h"
  1514. /* Override any gcc2 internal prototype to avoid an error.  */
  1515. /* We use char because int might match the return type of a gcc2
  1516.     builtin and then its argument prototype would still apply.  */
  1517. char yywrap();
  1518.  
  1519. int main() { t(); return 0; }
  1520. int t() {
  1521. yywrap()
  1522. ; return 0; }
  1523. EOF
  1524. if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1525.   rm -rf conftest*
  1526.   eval "ac_cv_lib_$ac_lib_var=yes"
  1527. else
  1528.   rm -rf conftest*
  1529.   eval "ac_cv_lib_$ac_lib_var=no"
  1530. fi
  1531. rm -f conftest*
  1532. LIBS="$ac_save_LIBS"
  1533.  
  1534. fi
  1535. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1536.   echo "$ac_t""yes" 1>&6
  1537.   LEXLIB="-l$ac_lib"
  1538. else
  1539.   echo "$ac_t""no" 1>&6
  1540. fi
  1541.  
  1542. fi
  1543.  
  1544. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  1545. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  1546.   echo $ac_n "(cached) $ac_c" 1>&6
  1547. else
  1548.   rm -f conftestdata
  1549. if ln -s X conftestdata 2>/dev/null
  1550. then
  1551.   rm -f conftestdata
  1552.   ac_cv_prog_LN_S="ln -s"
  1553. else
  1554.   ac_cv_prog_LN_S=ln
  1555. fi
  1556. fi
  1557. LN_S="$ac_cv_prog_LN_S"
  1558. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  1559.   echo "$ac_t""yes" 1>&6
  1560. else
  1561.   echo "$ac_t""no" 1>&6
  1562. fi
  1563.  
  1564.  
  1565. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1566. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1567.   echo $ac_n "(cached) $ac_c" 1>&6
  1568. else
  1569.   cat > conftest.$ac_ext <<EOF
  1570. #line 1571 "configure"
  1571. #include "confdefs.h"
  1572. #include <sys/types.h>
  1573. #include <signal.h>
  1574. #ifdef signal
  1575. #undef signal
  1576. #endif
  1577. #ifdef __cplusplus
  1578. extern "C" void (*signal (int, void (*)(int)))(int);
  1579. #else
  1580. void (*signal ()) ();
  1581. #endif
  1582.  
  1583. int main() { return 0; }
  1584. int t() {
  1585. int i;
  1586. ; return 0; }
  1587. EOF
  1588. if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1589.   rm -rf conftest*
  1590.   ac_cv_type_signal=void
  1591. else
  1592.   rm -rf conftest*
  1593.   ac_cv_type_signal=int
  1594. fi
  1595. rm -f conftest*
  1596.  
  1597. fi
  1598.  
  1599. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1600. cat >> confdefs.h <<EOF
  1601. #define RETSIGTYPE $ac_cv_type_signal
  1602. EOF
  1603.  
  1604.  
  1605.  
  1606. echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  1607. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  1608.   echo $ac_n "(cached) $ac_c" 1>&6
  1609. else
  1610.   if test "$GCC" = yes; then
  1611.   # GCC predefines this symbol on systems where it applies.
  1612. cat > conftest.$ac_ext <<EOF
  1613. #line 1614 "configure"
  1614. #include "confdefs.h"
  1615. #ifdef __CHAR_UNSIGNED__
  1616.   yes
  1617. #endif
  1618.  
  1619. EOF
  1620. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1621.   egrep "yes" >/dev/null 2>&1; then
  1622.   rm -rf conftest*
  1623.   ac_cv_c_char_unsigned=yes
  1624. else
  1625.   rm -rf conftest*
  1626.   ac_cv_c_char_unsigned=no
  1627. fi
  1628. rm -f conftest*
  1629.  
  1630. else
  1631. if test "$cross_compiling" = yes; then
  1632.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1633. else
  1634. cat > conftest.$ac_ext <<EOF
  1635. #line 1636 "configure"
  1636. #include "confdefs.h"
  1637. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  1638. #if !defined(__STDC__) || __STDC__ != 1
  1639. #define volatile
  1640. #endif
  1641. main() {
  1642.   volatile char c = 255; exit(c < 0);
  1643. }
  1644. EOF
  1645. { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1646. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1647.   ac_cv_c_char_unsigned=yes
  1648. else
  1649.   ac_cv_c_char_unsigned=no
  1650. fi
  1651. fi
  1652. rm -fr conftest*
  1653. fi
  1654. fi
  1655.  
  1656. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  1657. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  1658.   cat >> confdefs.h <<\EOF
  1659. #define __CHAR_UNSIGNED__ 1
  1660. EOF
  1661.  
  1662. fi
  1663.  
  1664. echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6
  1665. if test "$cross_compiling" = yes; then
  1666.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1667. else
  1668. cat > conftest.$ac_ext <<EOF
  1669. #line 1670 "configure"
  1670. #include "confdefs.h"
  1671. main() { exit(sizeof(long int) != 8); }
  1672. EOF
  1673. { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1674. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1675.   echo "$ac_t""yes" 1>&6
  1676.  cat >> confdefs.h <<\EOF
  1677. #define LONG_64_BITS 1
  1678. EOF
  1679.  
  1680. else
  1681.   echo "$ac_t""no" 1>&6
  1682. fi
  1683. fi
  1684. rm -fr conftest*
  1685.  
  1686. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1687. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1688.   echo $ac_n "(cached) $ac_c" 1>&6
  1689. else
  1690.   ac_cv_c_bigendian=unknown
  1691. # See if sys/param.h defines the BYTE_ORDER macro.
  1692. cat > conftest.$ac_ext <<EOF
  1693. #line 1694 "configure"
  1694. #include "confdefs.h"
  1695. #include <sys/types.h>
  1696. #include <sys/param.h>
  1697. int main() { return 0; }
  1698. int t() {
  1699.  
  1700. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1701.  bogus endian macros
  1702. #endif
  1703. ; return 0; }
  1704. EOF
  1705. if { (eval echo configure:1706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1706.   rm -rf conftest*
  1707.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1708. cat > conftest.$ac_ext <<EOF
  1709. #line 1710 "configure"
  1710. #include "confdefs.h"
  1711. #include <sys/types.h>
  1712. #include <sys/param.h>
  1713. int main() { return 0; }
  1714. int t() {
  1715.  
  1716. #if BYTE_ORDER != BIG_ENDIAN
  1717.  not big endian
  1718. #endif
  1719. ; return 0; }
  1720. EOF
  1721. if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1722.   rm -rf conftest*
  1723.   ac_cv_c_bigendian=yes
  1724. else
  1725.   rm -rf conftest*
  1726.   ac_cv_c_bigendian=no
  1727. fi
  1728. rm -f conftest*
  1729.  
  1730. fi
  1731. rm -f conftest*
  1732.  
  1733. if test $ac_cv_c_bigendian = unknown; then
  1734. if test "$cross_compiling" = yes; then
  1735.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1736. else
  1737. cat > conftest.$ac_ext <<EOF
  1738. #line 1739 "configure"
  1739. #include "confdefs.h"
  1740. main () {
  1741.   /* Are we little or big endian?  From Harbison&Steele.  */
  1742.   union
  1743.   {
  1744.     long l;
  1745.     char c[sizeof (long)];
  1746.   } u;
  1747.   u.l = 1;
  1748.   exit (u.c[sizeof (long) - 1] == 1);
  1749. }
  1750. EOF
  1751. { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1752. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1753.   ac_cv_c_bigendian=no
  1754. else
  1755.   ac_cv_c_bigendian=yes
  1756. fi
  1757. fi
  1758. rm -fr conftest*
  1759. fi
  1760. fi
  1761.  
  1762. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  1763. if test $ac_cv_c_bigendian = yes; then
  1764.   cat >> confdefs.h <<\EOF
  1765. #define WORDS_BIGENDIAN 1
  1766. EOF
  1767.  
  1768. fi
  1769.  
  1770.  
  1771. echo $ac_n "checking lex output file root""... $ac_c" 1>&6
  1772. if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
  1773.   echo $ac_n "(cached) $ac_c" 1>&6
  1774. else
  1775.   # The minimal lex program is just a single line: %%.  But some broken lexes
  1776. # (Solaris, I think it was) want two %% lines, so accommodate them.
  1777. echo '%%
  1778. %%' | $LEX
  1779. if test -f lex.yy.c; then
  1780.   ac_cv_prog_lex_root=lex.yy
  1781. elif test -f lexyy.c; then
  1782.   ac_cv_prog_lex_root=lexyy
  1783. else
  1784.   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
  1785. fi
  1786. fi
  1787.  
  1788. echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
  1789. LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
  1790.  
  1791. echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
  1792. if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
  1793.   echo $ac_n "(cached) $ac_c" 1>&6
  1794. else
  1795.   # POSIX says lex can declare yytext either as a pointer or an array; the
  1796. # default is implementation-dependent. Figure out which it is, since
  1797. # not all implementations provide the %pointer and %array declarations.
  1798. ac_cv_prog_lex_yytext_pointer=no
  1799. echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
  1800. ac_save_LIBS="$LIBS"
  1801. LIBS="$LIBS $LEXLIB"
  1802. cat > conftest.$ac_ext <<EOF
  1803. #line 1804 "configure"
  1804. #include "confdefs.h"
  1805. `cat $LEX_OUTPUT_ROOT.c`
  1806. int main() { t(); return 0; }
  1807. int t() {
  1808.  
  1809. ; return 0; }
  1810. EOF
  1811. if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1812.   rm -rf conftest*
  1813.   ac_cv_prog_lex_yytext_pointer=yes
  1814. fi
  1815. rm -f conftest*
  1816.  
  1817. LIBS="$ac_save_LIBS"
  1818. rm -f "${LEX_OUTPUT_ROOT}.c"
  1819. fi
  1820.  
  1821. echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
  1822. if test $ac_cv_prog_lex_yytext_pointer = yes; then
  1823.   cat >> confdefs.h <<\EOF
  1824. #define YYTEXT_POINTER 1
  1825. EOF
  1826.  
  1827. fi
  1828.  
  1829.  
  1830.  
  1831.  
  1832. echo $ac_n "checking for sunwindow libraries""... $ac_c" 1>&6
  1833. cat > conftest.$ac_ext <<EOF
  1834. #line 1835 "configure"
  1835. #include "confdefs.h"
  1836. #include "$srcdir/lib/c-auto.h.in"
  1837. #ifdef SUNWIN
  1838.   yes
  1839. #endif
  1840.  
  1841. EOF
  1842. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1843.   egrep "yes" >/dev/null 2>&1; then
  1844.   rm -rf conftest*
  1845.   SUNWIN=yes
  1846. else
  1847.   rm -rf conftest*
  1848.   SUNWIN=no
  1849. fi
  1850. rm -f conftest*
  1851.  
  1852. echo "$ac_t""$SUNWIN" 1>&6
  1853.  
  1854. echo $ac_n "checking for xview libraries""... $ac_c" 1>&6
  1855. cat > conftest.$ac_ext <<EOF
  1856. #line 1857 "configure"
  1857. #include "confdefs.h"
  1858. #include "$srcdir/lib/c-auto.h.in"
  1859. #ifdef XVIEWWIN
  1860.   yes
  1861. #endif
  1862.  
  1863. EOF
  1864. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1865.   egrep "yes" >/dev/null 2>&1; then
  1866.   rm -rf conftest*
  1867.   XVIEWWIN=yes
  1868. else
  1869.   rm -rf conftest*
  1870.   XVIEWWIN=no
  1871. fi
  1872. rm -f conftest*
  1873.  
  1874. echo "$ac_t""$XVIEWWIN" 1>&6
  1875.  
  1876. echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
  1877. cat > conftest.$ac_ext <<EOF
  1878. #line 1879 "configure"
  1879. #include "confdefs.h"
  1880. #include "$srcdir/lib/c-auto.h.in"
  1881. #ifdef X11WIN
  1882.   yes
  1883. #endif
  1884.  
  1885. EOF
  1886. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1887.   egrep "yes" >/dev/null 2>&1; then
  1888.   rm -rf conftest*
  1889.   X11WIN=yes
  1890. else
  1891.   rm -rf conftest*
  1892.   X11WIN=no
  1893. fi
  1894. rm -f conftest*
  1895.  
  1896. echo "$ac_t""$X11WIN" 1>&6
  1897.  
  1898. echo $ac_n "checking for X10 libraries""... $ac_c" 1>&6
  1899. cat > conftest.$ac_ext <<EOF
  1900. #line 1901 "configure"
  1901. #include "confdefs.h"
  1902. #include "$srcdir/lib/c-auto.h.in"
  1903. #ifdef X10WIN
  1904.   yes
  1905. #endif
  1906.  
  1907. EOF
  1908. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1909.   egrep "yes" >/dev/null 2>&1; then
  1910.   rm -rf conftest*
  1911.   X10WIN=yes
  1912. else
  1913.   rm -rf conftest*
  1914.   X10WIN=no
  1915. fi
  1916. rm -f conftest*
  1917.  
  1918. echo "$ac_t""$X10WIN" 1>&6
  1919.  
  1920. if test $XVIEWWIN = yes; then
  1921.   wlibs="-lxview -lolgx -lX11 $wlibs"
  1922.   (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  1923. fi
  1924. if test $X11WIN = yes; then
  1925.   # If we find X, set shell vars x_includes and x_libraries to the
  1926. # paths, otherwise set no_x=yes.
  1927. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1928. # --without-x overrides everything else, but does not touch the cache.
  1929. echo $ac_n "checking for X""... $ac_c" 1>&6
  1930.  
  1931. # Check whether --with-x or --without-x was given.
  1932. if test "${with_x+set}" = set; then
  1933.   withval="$with_x"
  1934.   :
  1935. fi
  1936.  
  1937. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1938. if test "x$with_x" = xno; then
  1939.   # The user explicitly disabled X.
  1940.   have_x=disabled
  1941. else
  1942.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1943.     # Both variables are already set.
  1944.     have_x=yes
  1945.   else
  1946. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1947.   echo $ac_n "(cached) $ac_c" 1>&6
  1948. else
  1949.   # One or both of the vars are not set, and there is no cached value.
  1950. ac_x_includes=NO ac_x_libraries=NO
  1951. rm -fr conftestdir
  1952. if mkdir conftestdir; then
  1953.   cd conftestdir
  1954.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1955.   cat > Imakefile <<'EOF'
  1956. acfindx:
  1957.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1958. EOF
  1959.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1960.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1961.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1962.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1963.     for ac_extension in a so sl; do
  1964.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1965.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1966.         ac_im_usrlibdir=$ac_im_libdir; break
  1967.       fi
  1968.     done
  1969.     # Screen out bogus values from the imake configuration.
  1970.     case "$ac_im_incroot" in
  1971.     /ade/include) ;;
  1972.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1973.     esac
  1974.     case "$ac_im_usrlibdir" in
  1975.     /ade/lib) ;;
  1976.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1977.     esac
  1978.   fi
  1979.   cd ..
  1980.   # AmigaOS hack - give lock on conftestdir time to expire before rm -fr.
  1981.   sleep 2
  1982.   rm -fr conftestdir
  1983. fi
  1984.  
  1985. if test "$ac_x_includes" = NO; then
  1986.   # Guess where to find include files, by looking for this one X11 .h file.
  1987.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1988.  
  1989.   # First, try using that file with no special directory specified.
  1990. cat > conftest.$ac_ext <<EOF
  1991. #line 1992 "configure"
  1992. #include "confdefs.h"
  1993. #include <$x_direct_test_include>
  1994. EOF
  1995. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1996. { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1997. ac_err=`grep -v '^ *+' conftest.out`
  1998. if test -z "$ac_err"; then
  1999.   rm -rf conftest*
  2000.   # We can compile using X headers with no special include directory.
  2001. ac_x_includes=
  2002. else
  2003.   echo "$ac_err" >&5
  2004.   rm -rf conftest*
  2005.   # Look for the header file in a standard set of common directories.
  2006.   for ac_dir in               \
  2007.     /ade/X11R6/include        \
  2008.     /ade/X11R5/include        \
  2009.     /ade/X11R4/include        \
  2010.                               \
  2011.     /ade/include/X11R6        \
  2012.     /ade/include/X11R5        \
  2013.     /ade/include/X11R4        \
  2014.                               \
  2015.     /local/X11R6/include  \
  2016.     /local/X11R5/include  \
  2017.     /local/X11R4/include  \
  2018.                               \
  2019.     /local/include/X11R6  \
  2020.     /local/include/X11R5  \
  2021.     /local/include/X11R4  \
  2022.                               \
  2023.     /ade/X11/include          \
  2024.     /ade/include/X11          \
  2025.     /local/X11/include    \
  2026.     /local/include/X11    \
  2027.                               \
  2028.     /ade/X386/include         \
  2029.     /ade/x386/include         \
  2030.     /ade/XFree86/include/X11  \
  2031.                               \
  2032.     /ade/include              \
  2033.     /local/include        \
  2034.     /ade/unsupported/include  \
  2035.     /ade/athena/include       \
  2036.     /local/x11r5/include  \
  2037.     /ade/lpp/Xamples/include  \
  2038.                               \
  2039.     /ade/openwin/include      \
  2040.     /ade/openwin/share/include \
  2041.     ; \
  2042.   do
  2043.     if test -r "$ac_dir/$x_direct_test_include"; then
  2044.       ac_x_includes=$ac_dir
  2045.       break
  2046.     fi
  2047.   done
  2048. fi
  2049. rm -f conftest*
  2050. fi # $ac_x_includes = NO
  2051.  
  2052. if test "$ac_x_libraries" = NO; then
  2053.   # Check for the libraries.
  2054.  
  2055.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  2056.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  2057.  
  2058.   # See if we find them without any special options.
  2059.   # Don't add to $LIBS permanently.
  2060.   ac_save_LIBS="$LIBS"
  2061.   LIBS="-l$x_direct_test_library $LIBS"
  2062. cat > conftest.$ac_ext <<EOF
  2063. #line 2064 "configure"
  2064. #include "confdefs.h"
  2065.  
  2066. int main() { t(); return 0; }
  2067. int t() {
  2068. ${x_direct_test_function}()
  2069. ; return 0; }
  2070. EOF
  2071. if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2072.   rm -rf conftest*
  2073.   LIBS="$ac_save_LIBS"
  2074. # We can link X programs with no special library path.
  2075. ac_x_libraries=
  2076. else
  2077.   rm -rf conftest*
  2078.   LIBS="$ac_save_LIBS"
  2079. # First see if replacing the include by lib works.
  2080. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  2081.     /ade/X11R6/lib        \
  2082.     /ade/X11R5/lib        \
  2083.     /ade/X11R4/lib        \
  2084.                           \
  2085.     /ade/lib/X11R6        \
  2086.     /ade/lib/X11R5        \
  2087.     /ade/lib/X11R4        \
  2088.                           \
  2089.     /local/X11R6/lib  \
  2090.     /local/X11R5/lib  \
  2091.     /local/X11R4/lib  \
  2092.                           \
  2093.     /local/lib/X11R6  \
  2094.     /local/lib/X11R5  \
  2095.     /local/lib/X11R4  \
  2096.                           \
  2097.     /ade/X11/lib          \
  2098.     /ade/lib/X11          \
  2099.     /local/X11/lib    \
  2100.     /local/lib/X11    \
  2101.                           \
  2102.     /ade/X386/lib         \
  2103.     /ade/x386/lib         \
  2104.     /ade/XFree86/lib/X11  \
  2105.                           \
  2106.     /ade/lib              \
  2107.     /local/lib        \
  2108.     /ade/unsupported/lib  \
  2109.     /ade/athena/lib       \
  2110.     /local/x11r5/lib  \
  2111.     /ade/lpp/Xamples/lib  \
  2112.                           \
  2113.     /ade/openwin/lib      \
  2114.     /ade/openwin/share/lib \
  2115.     ; \
  2116. do
  2117.   for ac_extension in a so sl; do
  2118.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  2119.       ac_x_libraries=$ac_dir
  2120.       break 2
  2121.     fi
  2122.   done
  2123. done
  2124. fi
  2125. rm -f conftest*
  2126.  
  2127. fi # $ac_x_libraries = NO
  2128.  
  2129. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  2130.   # Didn't find X anywhere.  Cache the known absence of X.
  2131.   ac_cv_have_x="have_x=no"
  2132. else
  2133.   # Record where we found X for the cache.
  2134.   ac_cv_have_x="have_x=yes \
  2135.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  2136. fi
  2137. fi
  2138.   fi
  2139.   eval "$ac_cv_have_x"
  2140. fi # $with_x != no
  2141.  
  2142. if test "$have_x" != yes; then
  2143.   echo "$ac_t""$have_x" 1>&6
  2144.   no_x=yes
  2145. else
  2146.   # If each of the values was on the command line, it overrides each guess.
  2147.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  2148.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  2149.   # Update the cache value to reflect the command line values.
  2150.   ac_cv_have_x="have_x=yes \
  2151.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  2152.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  2153. fi
  2154.  
  2155.   if test "$no_x" = yes; then
  2156.   # Not all programs may use this symbol, but it does not hurt to define it.
  2157.   X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
  2158. else
  2159.   if test -n "$x_includes"; then
  2160.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  2161.   fi
  2162.  
  2163.   # It would be nice to have a more robust check for the -R ld option than
  2164.   # just checking for Solaris.
  2165.   # It would also be nice to do this for all -L options, not just this one.
  2166.   if test -n "$x_libraries"; then
  2167.     X_LIBS="$X_LIBS -L$x_libraries"
  2168.     if test "`(uname) 2>/dev/null`" = SunOS &&
  2169.       uname -r | grep '^5' >/dev/null; then
  2170.       X_LIBS="$X_LIBS -R $x_libraries"
  2171.     fi
  2172.   fi
  2173.  
  2174.   # Check for libraries that X11R6 Xt/Xaw programs need.
  2175.  
  2176.   ac_save_LDFLAGS="$LDFLAGS"
  2177.   LDFLAGS="$LDFLAGS -L$x_libraries"
  2178.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  2179.   # check for ICE first), but we must link in the order -lSM -lICE or
  2180.   # we get undefined symbols.  So assume we have SM if we have ICE.
  2181.   # These have to be linked with before -lX11, unlike the other
  2182.   # libraries we check for below, so use a different variable.
  2183.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  2184.   echo $ac_n "checking for -lICE""... $ac_c" 1>&6
  2185. ac_lib_var=`echo ICE'_'IceConnectionNumber | tr './+\055' '__p_'`
  2186. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2187.   echo $ac_n "(cached) $ac_c" 1>&6
  2188. else
  2189.   ac_save_LIBS="$LIBS"
  2190. LIBS="-lICE  $LIBS"
  2191. cat > conftest.$ac_ext <<EOF
  2192. #line 2193 "configure"
  2193. #include "confdefs.h"
  2194. /* Override any gcc2 internal prototype to avoid an error.  */
  2195. /* We use char because int might match the return type of a gcc2
  2196.     builtin and then its argument prototype would still apply.  */
  2197. char IceConnectionNumber();
  2198.  
  2199. int main() { t(); return 0; }
  2200. int t() {
  2201. IceConnectionNumber()
  2202. ; return 0; }
  2203. EOF
  2204. if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2205.   rm -rf conftest*
  2206.   eval "ac_cv_lib_$ac_lib_var=yes"
  2207. else
  2208.   rm -rf conftest*
  2209.   eval "ac_cv_lib_$ac_lib_var=no"
  2210. fi
  2211. rm -f conftest*
  2212. LIBS="$ac_save_LIBS"
  2213.  
  2214. fi
  2215. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2216.   echo "$ac_t""yes" 1>&6
  2217.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2218. else
  2219.   echo "$ac_t""no" 1>&6
  2220. fi
  2221.  
  2222.   LDFLAGS="$ac_save_LDFLAGS"
  2223.  
  2224.   # Check for system-dependent libraries X programs must link with.
  2225.  
  2226.   if test "$ISC" = yes; then
  2227.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  2228.   else
  2229.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  2230.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  2231.     # the Alpha needs dnet_stub (dnet does not exist).
  2232.     echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
  2233. ac_lib_var=`echo dnet'_'dnet_ntoa | tr './+\055' '__p_'`
  2234. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2235.   echo $ac_n "(cached) $ac_c" 1>&6
  2236. else
  2237.   ac_save_LIBS="$LIBS"
  2238. LIBS="-ldnet  $LIBS"
  2239. cat > conftest.$ac_ext <<EOF
  2240. #line 2241 "configure"
  2241. #include "confdefs.h"
  2242. /* Override any gcc2 internal prototype to avoid an error.  */
  2243. /* We use char because int might match the return type of a gcc2
  2244.     builtin and then its argument prototype would still apply.  */
  2245. char dnet_ntoa();
  2246.  
  2247. int main() { t(); return 0; }
  2248. int t() {
  2249. dnet_ntoa()
  2250. ; return 0; }
  2251. EOF
  2252. if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2253.   rm -rf conftest*
  2254.   eval "ac_cv_lib_$ac_lib_var=yes"
  2255. else
  2256.   rm -rf conftest*
  2257.   eval "ac_cv_lib_$ac_lib_var=no"
  2258. fi
  2259. rm -f conftest*
  2260. LIBS="$ac_save_LIBS"
  2261.  
  2262. fi
  2263. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2264.   echo "$ac_t""yes" 1>&6
  2265.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  2266. else
  2267.   echo "$ac_t""no" 1>&6
  2268. fi
  2269.  
  2270.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2271.       echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
  2272. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | tr './+\055' '__p_'`
  2273. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2274.   echo $ac_n "(cached) $ac_c" 1>&6
  2275. else
  2276.   ac_save_LIBS="$LIBS"
  2277. LIBS="-ldnet_stub  $LIBS"
  2278. cat > conftest.$ac_ext <<EOF
  2279. #line 2280 "configure"
  2280. #include "confdefs.h"
  2281. /* Override any gcc2 internal prototype to avoid an error.  */
  2282. /* We use char because int might match the return type of a gcc2
  2283.     builtin and then its argument prototype would still apply.  */
  2284. char dnet_ntoa();
  2285.  
  2286. int main() { t(); return 0; }
  2287. int t() {
  2288. dnet_ntoa()
  2289. ; return 0; }
  2290. EOF
  2291. if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2292.   rm -rf conftest*
  2293.   eval "ac_cv_lib_$ac_lib_var=yes"
  2294. else
  2295.   rm -rf conftest*
  2296.   eval "ac_cv_lib_$ac_lib_var=no"
  2297. fi
  2298. rm -f conftest*
  2299. LIBS="$ac_save_LIBS"
  2300.  
  2301. fi
  2302. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2303.   echo "$ac_t""yes" 1>&6
  2304.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  2305. else
  2306.   echo "$ac_t""no" 1>&6
  2307. fi
  2308.  
  2309.     fi
  2310.  
  2311.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  2312.     # to get the SysV transport functions.
  2313.     # Not sure which flavor of 386 UNIX this is, but it seems harmless to
  2314.     # check for it.
  2315.     echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  2316. ac_lib_var=`echo nsl'_'t_accept | tr './+\055' '__p_'`
  2317. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2318.   echo $ac_n "(cached) $ac_c" 1>&6
  2319. else
  2320.   ac_save_LIBS="$LIBS"
  2321. LIBS="-lnsl  $LIBS"
  2322. cat > conftest.$ac_ext <<EOF
  2323. #line 2324 "configure"
  2324. #include "confdefs.h"
  2325. /* Override any gcc2 internal prototype to avoid an error.  */
  2326. /* We use char because int might match the return type of a gcc2
  2327.     builtin and then its argument prototype would still apply.  */
  2328. char t_accept();
  2329.  
  2330. int main() { t(); return 0; }
  2331. int t() {
  2332. t_accept()
  2333. ; return 0; }
  2334. EOF
  2335. if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2336.   rm -rf conftest*
  2337.   eval "ac_cv_lib_$ac_lib_var=yes"
  2338. else
  2339.   rm -rf conftest*
  2340.   eval "ac_cv_lib_$ac_lib_var=no"
  2341. fi
  2342. rm -f conftest*
  2343. LIBS="$ac_save_LIBS"
  2344.  
  2345. fi
  2346. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2347.   echo "$ac_t""yes" 1>&6
  2348.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  2349. else
  2350.   echo "$ac_t""no" 1>&6
  2351. fi
  2352.  
  2353.  
  2354.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  2355.     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
  2356.     # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
  2357.     if test "`(uname) 2>/dev/null`" != IRIX; then
  2358.       echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  2359. ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
  2360. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2361.   echo $ac_n "(cached) $ac_c" 1>&6
  2362. else
  2363.   ac_save_LIBS="$LIBS"
  2364. LIBS="-lsocket  $LIBS"
  2365. cat > conftest.$ac_ext <<EOF
  2366. #line 2367 "configure"
  2367. #include "confdefs.h"
  2368. /* Override any gcc2 internal prototype to avoid an error.  */
  2369. /* We use char because int might match the return type of a gcc2
  2370.     builtin and then its argument prototype would still apply.  */
  2371. char socket();
  2372.  
  2373. int main() { t(); return 0; }
  2374. int t() {
  2375. socket()
  2376. ; return 0; }
  2377. EOF
  2378. if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2379.   rm -rf conftest*
  2380.   eval "ac_cv_lib_$ac_lib_var=yes"
  2381. else
  2382.   rm -rf conftest*
  2383.   eval "ac_cv_lib_$ac_lib_var=no"
  2384. fi
  2385. rm -f conftest*
  2386. LIBS="$ac_save_LIBS"
  2387.  
  2388. fi
  2389. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2390.   echo "$ac_t""yes" 1>&6
  2391.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  2392. else
  2393.   echo "$ac_t""no" 1>&6
  2394. fi
  2395.  
  2396.     fi
  2397.   fi
  2398. fi
  2399.  
  2400.   wlibs="-lXt $X_PRE_LIBS -lX11 $wlibs"
  2401.   (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  2402. fi
  2403. if test $X10WIN = yes; then
  2404.   wlibs="-lX $wlibs"
  2405. fi
  2406. if test $SUNWIN = yes; then
  2407.   wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  2408.   (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  2409. fi
  2410.  
  2411.  
  2412. echo $ac_n "checking for small TeX""... $ac_c" 1>&6
  2413. cat > conftest.$ac_ext <<EOF
  2414. #line 2415 "configure"
  2415. #include "confdefs.h"
  2416. #include "$srcdir/lib/c-auto.h.in"
  2417. #ifdef SMALLTeX
  2418.   yes
  2419. #endif
  2420.  
  2421. EOF
  2422. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2423.   egrep "yes" >/dev/null 2>&1; then
  2424.   rm -rf conftest*
  2425.   SMALLTeX=yes
  2426. else
  2427.   rm -rf conftest*
  2428.   SMALLTeX=no
  2429. fi
  2430. rm -f conftest*
  2431.  
  2432. echo "$ac_t""$SMALLTeX" 1>&6
  2433. if test $SMALLTeX = yes; then
  2434.   (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  2435.   cat >> confdefs.h <<\EOF
  2436. #define GLUERATIO_TYPE float
  2437. EOF
  2438.  
  2439. fi
  2440.  
  2441. echo $ac_n "checking for small MF""... $ac_c" 1>&6
  2442. cat > conftest.$ac_ext <<EOF
  2443. #line 2444 "configure"
  2444. #include "confdefs.h"
  2445. #include "$srcdir/lib/c-auto.h.in"
  2446. #ifdef SMALLMF
  2447.   yes
  2448. #endif
  2449.  
  2450. EOF
  2451. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2452.   egrep "yes" >/dev/null 2>&1; then
  2453.   rm -rf conftest*
  2454.   SMALLMF=yes
  2455. else
  2456.   rm -rf conftest*
  2457.   SMALLMF=no
  2458. fi
  2459. rm -f conftest*
  2460.  
  2461. echo "$ac_t""$SMALLMF" 1>&6
  2462. if test $SMALLMF = yes; then
  2463.   (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  2464. fi
  2465.  
  2466. echo $ac_n "checking for small BibTeX""... $ac_c" 1>&6
  2467. cat > conftest.$ac_ext <<EOF
  2468. #line 2469 "configure"
  2469. #include "confdefs.h"
  2470. #include "$srcdir/lib/c-auto.h.in"
  2471. #ifdef SMALLBibTeX
  2472.   yes
  2473. #endif
  2474.  
  2475. EOF
  2476. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2477.   egrep "yes" >/dev/null 2>&1; then
  2478.   rm -rf conftest*
  2479.   SMALLBibTeX=yes
  2480. else
  2481.   rm -rf conftest*
  2482.   SMALLBibTeX=no
  2483. fi
  2484. rm -f conftest*
  2485.  
  2486. echo "$ac_t""$SMALLBibTeX" 1>&6
  2487. if test $SMALLBibTeX = yes; then
  2488.   (cd $srcdir/bibtex \
  2489.    && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  2490. fi
  2491.  
  2492. trap '' 1 2 15
  2493. cat > confcache <<\EOF
  2494. # This file is a shell script that caches the results of configure
  2495. # tests run on this system so they can be shared between configure
  2496. # scripts and configure runs.  It is not useful on other systems.
  2497. # If it contains results you don't want to keep, you may remove or edit it.
  2498. #
  2499. # By default, configure uses ./config.cache as the cache file,
  2500. # creating it if it does not exist already.  You can give configure
  2501. # the --cache-file=FILE option to use a different cache file; that is
  2502. # what configure does when it calls configure scripts in
  2503. # subdirectories, so they share the cache.
  2504. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2505. # config.status only pays attention to the cache file if you give it the
  2506. # --recheck option to rerun configure.
  2507. #
  2508. EOF
  2509. # Ultrix sh set writes to stderr and can't be redirected directly,
  2510. # and sets the high bit in the cache file unless we assign to the vars.
  2511. (set) 2>&1 |
  2512.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2513.   >> confcache
  2514. if cmp -s $cache_file confcache; then
  2515.   :
  2516. else
  2517.   if test -w $cache_file; then
  2518.     echo "updating cache $cache_file"
  2519.     cat confcache > $cache_file
  2520.   else
  2521.     echo "not updating unwritable cache $cache_file"
  2522.   fi
  2523. fi
  2524. rm -f confcache
  2525.  
  2526. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2527.  
  2528. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2529. # Let make expand exec_prefix.
  2530. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2531.  
  2532. # Any assignment to VPATH causes Sun make to only execute
  2533. # the first set of double-colon rules, so remove it if not needed.
  2534. # If there is a colon in the path, we need to keep it.
  2535. if test "x$srcdir" = x.; then
  2536.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2537. fi
  2538.  
  2539. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2540.  
  2541. DEFS=-DHAVE_CONFIG_H
  2542.  
  2543. # Without the "./", some shells look in PATH for config.status.
  2544. : ${CONFIG_STATUS=./config.status}
  2545.  
  2546. echo creating $CONFIG_STATUS
  2547. # Some systems, like AmigaOS, won't allow you to remove a script that is
  2548. # being executed, so just move it out of the way instead.
  2549. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  2550. cat > $CONFIG_STATUS <<EOF
  2551. #! /bin/sh
  2552. # Generated automatically by configure.
  2553. # Run this file to recreate the current configuration.
  2554. # This directory was configured as follows,
  2555. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2556. #
  2557. # $0 $ac_configure_args
  2558. #
  2559. # Compiler output produced by configure, useful for debugging
  2560. # configure, is in ./config.log if it exists.
  2561.  
  2562. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2563. for ac_option
  2564. do
  2565.   case "\$ac_option" in
  2566.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2567.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2568.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2569.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2570.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  2571.     exit 0 ;;
  2572.   -help | --help | --hel | --he | --h)
  2573.     echo "\$ac_cs_usage"; exit 0 ;;
  2574.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2575.   esac
  2576. done
  2577.  
  2578. ac_given_srcdir=$srcdir
  2579. ac_given_INSTALL="$INSTALL"
  2580.  
  2581. trap 'rm -fr `echo "Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  2582. lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  2583. tex/Makefile web/Makefile web2c/Makefile lib/c-auto.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2584. EOF
  2585. cat >> $CONFIG_STATUS <<EOF
  2586.  
  2587. # Protect against being on the right side of a sed subst in config.status.
  2588. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2589.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2590. $ac_vpsub
  2591. $extrasub
  2592. s%@CFLAGS@%$CFLAGS%g
  2593. s%@CPPFLAGS@%$CPPFLAGS%g
  2594. s%@CXXFLAGS@%$CXXFLAGS%g
  2595. s%@DEFS@%$DEFS%g
  2596. s%@LDFLAGS@%$LDFLAGS%g
  2597. s%@LIBS@%$LIBS%g
  2598. s%@exec_prefix@%$exec_prefix%g
  2599. s%@prefix@%$prefix%g
  2600. s%@program_transform_name@%$program_transform_name%g
  2601. s%@bindir@%$bindir%g
  2602. s%@sbindir@%$sbindir%g
  2603. s%@libexecdir@%$libexecdir%g
  2604. s%@datadir@%$datadir%g
  2605. s%@sysconfdir@%$sysconfdir%g
  2606. s%@sharedstatedir@%$sharedstatedir%g
  2607. s%@localstatedir@%$localstatedir%g
  2608. s%@libdir@%$libdir%g
  2609. s%@includedir@%$includedir%g
  2610. s%@oldincludedir@%$oldincludedir%g
  2611. s%@infodir@%$infodir%g
  2612. s%@guidedir@%$guidedir%g
  2613. s%@psdir@%$psdir%g
  2614. s%@dvidir@%$dvidir%g
  2615. s%@mandir@%$mandir%g
  2616. s%@SET_MAKE@%$SET_MAKE%g
  2617. s%@CC@%$CC%g
  2618. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2619. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2620. s%@RANLIB@%$RANLIB%g
  2621. s%@CPP@%$CPP%g
  2622. s%@YACC@%$YACC%g
  2623. s%@LEX@%$LEX%g
  2624. s%@LEXLIB@%$LEXLIB%g
  2625. s%@LN_S@%$LN_S%g
  2626. s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
  2627. s%@X_CFLAGS@%$X_CFLAGS%g
  2628. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  2629. s%@X_LIBS@%$X_LIBS%g
  2630. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  2631. s%@wlibs@%$wlibs%g
  2632.  
  2633. CEOF
  2634. EOF
  2635. cat >> $CONFIG_STATUS <<EOF
  2636.  
  2637. CONFIG_FILES=\${CONFIG_FILES-"Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  2638. lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  2639. tex/Makefile web/Makefile web2c/Makefile"}
  2640. EOF
  2641. cat >> $CONFIG_STATUS <<\EOF
  2642. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2643.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2644.   case "$ac_file" in
  2645.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2646.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2647.   *) ac_file_in="${ac_file}.in" ;;
  2648.   esac
  2649.  
  2650.   # Adjust relative srcdir, etc. for subdirectories.
  2651.  
  2652.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2653.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2654.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2655.     # The file is in a subdirectory.
  2656.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2657.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2658.     # A "../" for each directory in $ac_dir_suffix.
  2659.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2660.   else
  2661.     ac_dir_suffix= ac_dots=
  2662.   fi
  2663.  
  2664.   case "$ac_given_srcdir" in
  2665.   .)  srcdir=.
  2666.       if test -z "$ac_dots"; then top_srcdir=.
  2667.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2668.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2669.   *) # Relative path.
  2670.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2671.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2672.   esac
  2673.  
  2674.   case "$ac_given_INSTALL" in
  2675.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2676.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2677.   esac
  2678.   echo creating "$ac_file"
  2679.   rm -f "$ac_file"
  2680.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2681.   case "$ac_file" in
  2682.   *Makefile*) ac_comsub="1i\\
  2683. # $configure_input" ;;
  2684.   *) ac_comsub= ;;
  2685.   esac
  2686.   sed -e "$ac_comsub
  2687. s%@configure_input@%$configure_input%g
  2688. s%@srcdir@%$srcdir%g
  2689. s%@top_srcdir@%$top_srcdir%g
  2690. s%@INSTALL@%$INSTALL%g
  2691. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2692. fi; done
  2693. rm -f conftest.subs
  2694.  
  2695. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2696. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2697. #
  2698. # ac_d sets the value in "#define NAME VALUE" lines.
  2699. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2700. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2701. ac_dC='\3'
  2702. ac_dD='%g'
  2703. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2704. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2705. ac_uB='\([     ]\)%\1#\2define\3'
  2706. ac_uC=' '
  2707. ac_uD='\4%g'
  2708. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2709. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2710. ac_eB='$%\1#\2define\3'
  2711. ac_eC=' '
  2712. ac_eD='%g'
  2713.  
  2714. CONFIG_HEADERS=${CONFIG_HEADERS-"lib/c-auto.h"}
  2715. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2716.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2717.   case "$ac_file" in
  2718.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2719.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2720.   *) ac_file_in="${ac_file}.in" ;;
  2721.   esac
  2722.  
  2723.   echo creating $ac_file
  2724.  
  2725.   rm -f conftest.frag conftest.in conftest.out
  2726.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2727.  
  2728. EOF
  2729.  
  2730. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2731. # the proper values into config.h.in to produce config.h.  And first:
  2732. # Protect against being on the right side of a sed subst in config.status.
  2733. # Protect against being in an unquoted here document in config.status.
  2734. rm -f conftest.vals
  2735. cat > conftest.hdr <<\EOF
  2736. s/[\\&%]/\\&/g
  2737. s%[\\$`]%\\&%g
  2738. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2739. s%ac_d%ac_u%gp
  2740. s%ac_u%ac_e%gp
  2741. EOF
  2742. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2743. rm -f conftest.hdr
  2744.  
  2745. # This sed command replaces #undef with comments.  This is necessary, for
  2746. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2747. # on some systems where configure will not decide to define it.
  2748. cat >> conftest.vals <<\EOF
  2749. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2750. EOF
  2751.  
  2752. # Break up conftest.vals because some shells have a limit on
  2753. # the size of here documents, and old seds have small limits too.
  2754. # Maximum number of lines to put in a single here document.
  2755. ac_max_here_lines=12
  2756.  
  2757. rm -f conftest.tail
  2758. while :
  2759. do
  2760.   ac_lines=`grep -c . conftest.vals`
  2761.   # grep -c gives empty output for an empty file on some AIX systems.
  2762.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2763.   # Write a limited-size here document to conftest.frag.
  2764.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2765.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2766.   echo 'CEOF
  2767.   sed -f conftest.frag conftest.in > conftest.out
  2768.   rm -f conftest.in
  2769.   mv conftest.out conftest.in
  2770. ' >> $CONFIG_STATUS
  2771.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2772.   rm -f conftest.vals
  2773.   mv conftest.tail conftest.vals
  2774. done
  2775. rm -f conftest.vals
  2776.  
  2777. cat >> $CONFIG_STATUS <<\EOF
  2778.   rm -f conftest.frag conftest.h
  2779.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2780.   cat conftest.in >> conftest.h
  2781.   rm -f conftest.in
  2782.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2783.     echo "$ac_file is unchanged"
  2784.     rm -f conftest.h
  2785.   else
  2786.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2787.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2788.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2789.       # The file is in a subdirectory.
  2790.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2791.     fi
  2792.     rm -f $ac_file
  2793.     mv conftest.h $ac_file
  2794.   fi
  2795. fi; done
  2796.  
  2797.  
  2798.  
  2799. exit 0
  2800. EOF
  2801. chmod +x $CONFIG_STATUS
  2802. rm -f CONFIG.STATUS.old
  2803. rm -fr confdefs* $ac_clean_files
  2804. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2805.  
  2806.