home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / the25.zip / thesrc251.zip / configure < prev    next >
Text File  |  1998-07-29  |  102KB  |  3,740 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  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-xcurses          link with XCurses"
  16. ac_help="$ac_help
  17.   --with-ncurses          link with ncurses"
  18. ac_help="$ac_help
  19.   --with-extcurses        link with AIX Extended curses"
  20. ac_help="$ac_help
  21.   --with-cursesincdir=DIR specify where curses header file is"
  22. ac_help="$ac_help
  23.   --with-curseslibdir=DIR specify where curses library file is"
  24. ac_help="$ac_help
  25.   --with-regina           link with Regina"
  26. ac_help="$ac_help
  27.   --with-rexximc          link with REXX/imc"
  28. ac_help="$ac_help
  29.   --with-rexx6000         link with AIX REXX/6000"
  30. ac_help="$ac_help
  31.   --with-orexx            link with IBM Object Rexx"
  32. ac_help="$ac_help
  33.   --with-unirexx          link with uni-REXX"
  34. ac_help="$ac_help
  35.   --with-rexxincdir=DIR   specify where REXX header file is"
  36. ac_help="$ac_help
  37.   --with-rexxlibdir=DIR   specify where REXX library file is"
  38. ac_help="$ac_help
  39.   --enable-debug          turn on debugging"
  40. ac_help="$ac_help
  41.   --enable-trace          turn on tracing"
  42. ac_help="$ac_help
  43.   --enable-purify         link with Purify (TM)"
  44. ac_help="$ac_help
  45.   --with-xaw3d            link with Xaw3d"
  46.  
  47. # Initialize some variables set by options.
  48. # The variables have the same names as the options, with
  49. # dashes changed to underlines.
  50. build=NONE
  51. cache_file=./config.cache
  52. exec_prefix=NONE
  53. host=NONE
  54. no_create=
  55. nonopt=NONE
  56. no_recursion=
  57. prefix=NONE
  58. program_prefix=NONE
  59. program_suffix=NONE
  60. program_transform_name=s,x,x,
  61. silent=
  62. site=
  63. srcdir=
  64. target=NONE
  65. verbose=
  66. x_includes=NONE
  67. x_libraries=NONE
  68. bindir='${exec_prefix}/bin'
  69. sbindir='${exec_prefix}/sbin'
  70. libexecdir='${exec_prefix}/libexec'
  71. datadir='${prefix}/share'
  72. sysconfdir='${prefix}/etc'
  73. sharedstatedir='${prefix}/com'
  74. localstatedir='${prefix}/var'
  75. libdir='${exec_prefix}/lib'
  76. includedir='${prefix}/include'
  77. oldincludedir='/usr/include'
  78. infodir='${prefix}/info'
  79. mandir='${prefix}/man'
  80.  
  81. # Initialize some other variables.
  82. subdirs=
  83. MFLAGS= MAKEFLAGS=
  84. # Maximum number of lines to put in a shell here document.
  85. ac_max_here_lines=12
  86.  
  87. ac_prev=
  88. for ac_option
  89. do
  90.  
  91.   # If the previous option needs an argument, assign it.
  92.   if test -n "$ac_prev"; then
  93.     eval "$ac_prev=\$ac_option"
  94.     ac_prev=
  95.     continue
  96.   fi
  97.  
  98.   case "$ac_option" in
  99.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  100.   *) ac_optarg= ;;
  101.   esac
  102.  
  103.   # Accept the important Cygnus configure options, so we can diagnose typos.
  104.  
  105.   case "$ac_option" in
  106.  
  107.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  108.     ac_prev=bindir ;;
  109.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  110.     bindir="$ac_optarg" ;;
  111.  
  112.   -build | --build | --buil | --bui | --bu)
  113.     ac_prev=build ;;
  114.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  115.     build="$ac_optarg" ;;
  116.  
  117.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  118.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  119.     ac_prev=cache_file ;;
  120.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  121.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  122.     cache_file="$ac_optarg" ;;
  123.  
  124.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  125.     ac_prev=datadir ;;
  126.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  127.   | --da=*)
  128.     datadir="$ac_optarg" ;;
  129.  
  130.   -disable-* | --disable-*)
  131.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  132.     # Reject names that are not valid shell variable names.
  133.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  134.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  135.     fi
  136.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  137.     eval "enable_${ac_feature}=no" ;;
  138.  
  139.   -enable-* | --enable-*)
  140.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  141.     # Reject names that are not valid shell variable names.
  142.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  143.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  144.     fi
  145.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  146.     case "$ac_option" in
  147.       *=*) ;;
  148.       *) ac_optarg=yes ;;
  149.     esac
  150.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  151.  
  152.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  153.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  154.   | --exec | --exe | --ex)
  155.     ac_prev=exec_prefix ;;
  156.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  157.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  158.   | --exec=* | --exe=* | --ex=*)
  159.     exec_prefix="$ac_optarg" ;;
  160.  
  161.   -gas | --gas | --ga | --g)
  162.     # Obsolete; use --with-gas.
  163.     with_gas=yes ;;
  164.  
  165.   -help | --help | --hel | --he)
  166.     # Omit some internal or obsolete options to make the list less imposing.
  167.     # This message is too long to be a string in the A/UX 3.1 sh.
  168.     cat << EOF
  169. Usage: configure [options] [host]
  170. Options: [defaults in brackets after descriptions]
  171. Configuration:
  172.   --cache-file=FILE       cache test results in FILE
  173.   --help                  print this message
  174.   --no-create             do not create output files
  175.   --quiet, --silent       do not print \`checking...' messages
  176.   --version               print the version of autoconf that created configure
  177. Directory and file names:
  178.   --prefix=PREFIX         install architecture-independent files in PREFIX
  179.                           [$ac_default_prefix]
  180.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  181.                           [same as prefix]
  182.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  183.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  184.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  185.   --datadir=DIR           read-only architecture-independent data in DIR
  186.                           [PREFIX/share]
  187.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  188.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  189.                           [PREFIX/com]
  190.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  191.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  192.   --includedir=DIR        C header files in DIR [PREFIX/include]
  193.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  194.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  195.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  196.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  197.   --program-prefix=PREFIX prepend PREFIX to installed program names
  198.   --program-suffix=SUFFIX append SUFFIX to installed program names
  199.   --program-transform-name=PROGRAM
  200.                           run sed PROGRAM on installed program names
  201. EOF
  202.     cat << EOF
  203. Host type:
  204.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  205.   --host=HOST             configure for HOST [guessed]
  206.   --target=TARGET         configure for TARGET [TARGET=HOST]
  207. Features and packages:
  208.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  209.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  210.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  211.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  212.   --x-includes=DIR        X include files are in DIR
  213.   --x-libraries=DIR       X library files are in DIR
  214. EOF
  215.     if test -n "$ac_help"; then
  216.       echo "--enable and --with options recognized:$ac_help"
  217.     fi
  218.     exit 0 ;;
  219.  
  220.   -host | --host | --hos | --ho)
  221.     ac_prev=host ;;
  222.   -host=* | --host=* | --hos=* | --ho=*)
  223.     host="$ac_optarg" ;;
  224.  
  225.   -includedir | --includedir | --includedi | --included | --include \
  226.   | --includ | --inclu | --incl | --inc)
  227.     ac_prev=includedir ;;
  228.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  229.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  230.     includedir="$ac_optarg" ;;
  231.  
  232.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  233.     ac_prev=infodir ;;
  234.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  235.     infodir="$ac_optarg" ;;
  236.  
  237.   -libdir | --libdir | --libdi | --libd)
  238.     ac_prev=libdir ;;
  239.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  240.     libdir="$ac_optarg" ;;
  241.  
  242.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  243.   | --libexe | --libex | --libe)
  244.     ac_prev=libexecdir ;;
  245.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  246.   | --libexe=* | --libex=* | --libe=*)
  247.     libexecdir="$ac_optarg" ;;
  248.  
  249.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  250.   | --localstate | --localstat | --localsta | --localst \
  251.   | --locals | --local | --loca | --loc | --lo)
  252.     ac_prev=localstatedir ;;
  253.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  254.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  255.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  256.     localstatedir="$ac_optarg" ;;
  257.  
  258.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  259.     ac_prev=mandir ;;
  260.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  261.     mandir="$ac_optarg" ;;
  262.  
  263.   -nfp | --nfp | --nf)
  264.     # Obsolete; use --without-fp.
  265.     with_fp=no ;;
  266.  
  267.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  268.   | --no-cr | --no-c)
  269.     no_create=yes ;;
  270.  
  271.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  272.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  273.     no_recursion=yes ;;
  274.  
  275.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  276.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  277.   | --oldin | --oldi | --old | --ol | --o)
  278.     ac_prev=oldincludedir ;;
  279.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  280.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  281.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  282.     oldincludedir="$ac_optarg" ;;
  283.  
  284.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  285.     ac_prev=prefix ;;
  286.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  287.     prefix="$ac_optarg" ;;
  288.  
  289.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  290.   | --program-pre | --program-pr | --program-p)
  291.     ac_prev=program_prefix ;;
  292.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  293.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  294.     program_prefix="$ac_optarg" ;;
  295.  
  296.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  297.   | --program-suf | --program-su | --program-s)
  298.     ac_prev=program_suffix ;;
  299.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  300.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  301.     program_suffix="$ac_optarg" ;;
  302.  
  303.   -program-transform-name | --program-transform-name \
  304.   | --program-transform-nam | --program-transform-na \
  305.   | --program-transform-n | --program-transform- \
  306.   | --program-transform | --program-transfor \
  307.   | --program-transfo | --program-transf \
  308.   | --program-trans | --program-tran \
  309.   | --progr-tra | --program-tr | --program-t)
  310.     ac_prev=program_transform_name ;;
  311.   -program-transform-name=* | --program-transform-name=* \
  312.   | --program-transform-nam=* | --program-transform-na=* \
  313.   | --program-transform-n=* | --program-transform-=* \
  314.   | --program-transform=* | --program-transfor=* \
  315.   | --program-transfo=* | --program-transf=* \
  316.   | --program-trans=* | --program-tran=* \
  317.   | --progr-tra=* | --program-tr=* | --program-t=*)
  318.     program_transform_name="$ac_optarg" ;;
  319.  
  320.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  321.   | -silent | --silent | --silen | --sile | --sil)
  322.     silent=yes ;;
  323.  
  324.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  325.     ac_prev=sbindir ;;
  326.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  327.   | --sbi=* | --sb=*)
  328.     sbindir="$ac_optarg" ;;
  329.  
  330.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  331.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  332.   | --sharedst | --shareds | --shared | --share | --shar \
  333.   | --sha | --sh)
  334.     ac_prev=sharedstatedir ;;
  335.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  336.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  337.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  338.   | --sha=* | --sh=*)
  339.     sharedstatedir="$ac_optarg" ;;
  340.  
  341.   -site | --site | --sit)
  342.     ac_prev=site ;;
  343.   -site=* | --site=* | --sit=*)
  344.     site="$ac_optarg" ;;
  345.  
  346.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  347.     ac_prev=srcdir ;;
  348.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  349.     srcdir="$ac_optarg" ;;
  350.  
  351.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  352.   | --syscon | --sysco | --sysc | --sys | --sy)
  353.     ac_prev=sysconfdir ;;
  354.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  355.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  356.     sysconfdir="$ac_optarg" ;;
  357.  
  358.   -target | --target | --targe | --targ | --tar | --ta | --t)
  359.     ac_prev=target ;;
  360.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  361.     target="$ac_optarg" ;;
  362.  
  363.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  364.     verbose=yes ;;
  365.  
  366.   -version | --version | --versio | --versi | --vers)
  367.     echo "configure generated by autoconf version 2.12"
  368.     exit 0 ;;
  369.  
  370.   -with-* | --with-*)
  371.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  372.     # Reject names that are not valid shell variable names.
  373.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  374.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  375.     fi
  376.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  377.     case "$ac_option" in
  378.       *=*) ;;
  379.       *) ac_optarg=yes ;;
  380.     esac
  381.     eval "with_${ac_package}='$ac_optarg'" ;;
  382.  
  383.   -without-* | --without-*)
  384.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  385.     # Reject names that are not valid shell variable names.
  386.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  387.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  388.     fi
  389.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  390.     eval "with_${ac_package}=no" ;;
  391.  
  392.   --x)
  393.     # Obsolete; use --with-x.
  394.     with_x=yes ;;
  395.  
  396.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  397.   | --x-incl | --x-inc | --x-in | --x-i)
  398.     ac_prev=x_includes ;;
  399.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  400.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  401.     x_includes="$ac_optarg" ;;
  402.  
  403.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  404.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  405.     ac_prev=x_libraries ;;
  406.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  407.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  408.     x_libraries="$ac_optarg" ;;
  409.  
  410.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  411.     ;;
  412.  
  413.   *)
  414.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  415.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  416.     fi
  417.     if test "x$nonopt" != xNONE; then
  418.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  419.     fi
  420.     nonopt="$ac_option"
  421.     ;;
  422.  
  423.   esac
  424. done
  425.  
  426. if test -n "$ac_prev"; then
  427.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  428. fi
  429.  
  430. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  431.  
  432. # File descriptor usage:
  433. # 0 standard input
  434. # 1 file creation
  435. # 2 errors and warnings
  436. # 3 some systems may open it to /dev/tty
  437. # 4 used on the Kubota Titan
  438. # 6 checking for... messages and results
  439. # 5 compiler messages saved in config.log
  440. if test "$silent" = yes; then
  441.   exec 6>/dev/null
  442. else
  443.   exec 6>&1
  444. fi
  445. exec 5>./config.log
  446.  
  447. echo "\
  448. This file contains any messages produced by compilers while
  449. running configure, to aid debugging if configure makes a mistake.
  450. " 1>&5
  451.  
  452. # Strip out --no-create and --no-recursion so they do not pile up.
  453. # Also quote any args containing shell metacharacters.
  454. ac_configure_args=
  455. for ac_arg
  456. do
  457.   case "$ac_arg" in
  458.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  459.   | --no-cr | --no-c) ;;
  460.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  461.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  462.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  463.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  464.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  465.   esac
  466. done
  467.  
  468. # NLS nuisances.
  469. # Only set these to C if already set.  These must not be set unconditionally
  470. # because not all systems understand e.g. LANG=C (notably SCO).
  471. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  472. # Non-C LC_CTYPE values break the ctype check.
  473. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  474. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  475. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  476. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  477.  
  478. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  479. rm -rf conftest* confdefs.h
  480. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  481. echo > confdefs.h
  482.  
  483. # A filename unique to this package, relative to the directory that
  484. # configure is in, which we can look for to find out if srcdir is correct.
  485. ac_unique_file=./the.c
  486.  
  487. # Find the source files, if location was not specified.
  488. if test -z "$srcdir"; then
  489.   ac_srcdir_defaulted=yes
  490.   # Try the directory containing this script, then its parent.
  491.   ac_prog=$0
  492.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  493.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  494.   srcdir=$ac_confdir
  495.   if test ! -r $srcdir/$ac_unique_file; then
  496.     srcdir=..
  497.   fi
  498. else
  499.   ac_srcdir_defaulted=no
  500. fi
  501. if test ! -r $srcdir/$ac_unique_file; then
  502.   if test "$ac_srcdir_defaulted" = yes; then
  503.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  504.   else
  505.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  506.   fi
  507. fi
  508. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  509.  
  510. # Prefer explicitly selected file to automatically selected ones.
  511. if test -z "$CONFIG_SITE"; then
  512.   if test "x$prefix" != xNONE; then
  513.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  514.   else
  515.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  516.   fi
  517. fi
  518. for ac_site_file in $CONFIG_SITE; do
  519.   if test -r "$ac_site_file"; then
  520.     echo "loading site script $ac_site_file"
  521.     . "$ac_site_file"
  522.   fi
  523. done
  524.  
  525. if test -r "$cache_file"; then
  526.   echo "loading cache $cache_file"
  527.   . $cache_file
  528. else
  529.   echo "creating cache $cache_file"
  530.   > $cache_file
  531. fi
  532.  
  533. ac_ext=c
  534. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  535. ac_cpp='$CPP $CPPFLAGS'
  536. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  537. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  538. cross_compiling=$ac_cv_prog_cc_cross
  539.  
  540. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  541.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  542.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  543.     ac_n= ac_c='
  544. ' ac_t='    '
  545.   else
  546.     ac_n=-n ac_c= ac_t=
  547.   fi
  548. else
  549.   ac_n= ac_c='\c' ac_t=
  550. fi
  551.  
  552.  
  553.  
  554. CC_LIST="c89 acc gcc cc"
  555.  
  556. mh_sysv_incdir=""
  557. mh_sysv_libdir=""
  558. all_words="$CC_LIST"
  559. ac_dir=""
  560. echo $ac_n "checking for one of the following C compilers: $all_words""... $ac_c" 1>&6
  561. echo "configure:562: checking for one of the following C compilers: $all_words" >&5
  562. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  563.   echo $ac_n "(cached) $ac_c" 1>&6
  564. else
  565.   
  566. if test -n "$CC"; then
  567.   ac_cv_prog_CC="$CC" # Let the user override the test.
  568. else
  569.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  570.   for mh_cc in $all_words; do
  571.     for ac_dir in $PATH; do
  572.       test -z "$ac_dir" && ac_dir=.
  573.       if test -f $ac_dir/$mh_cc; then
  574.         ac_cv_prog_CC="$mh_cc"
  575.         if test "$ac_dir" = "/usr/5bin"; then
  576.           mh_sysv_incdir="/usr/5include"
  577.           mh_sysv_libdir="/usr/5lib"
  578.         fi
  579.         break 2
  580.       fi
  581.     done
  582.   done
  583.   IFS="$ac_save_ifs"
  584.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  585. fi
  586. CC="$ac_cv_prog_CC"
  587.  
  588. fi
  589.  
  590.  
  591. if test "$ac_dir" = ""; then
  592.    echo "$ac_t""using $ac_cv_prog_CC specified in CC env variable" 1>&6
  593. else
  594.    echo "$ac_t""using $ac_dir/$ac_cv_prog_CC" 1>&6
  595. fi
  596.  
  597.  
  598.  
  599. # Extract the first word of "gcc", so it can be a program name with args.
  600. set dummy gcc; ac_word=$2
  601. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  602. echo "configure:603: checking for $ac_word" >&5
  603. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  604.   echo $ac_n "(cached) $ac_c" 1>&6
  605. else
  606.   if test -n "$CC"; then
  607.   ac_cv_prog_CC="$CC" # Let the user override the test.
  608. else
  609.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  610.   for ac_dir in $PATH; do
  611.     test -z "$ac_dir" && ac_dir=.
  612.     if test -f $ac_dir/$ac_word; then
  613.       ac_cv_prog_CC="gcc"
  614.       break
  615.     fi
  616.   done
  617.   IFS="$ac_save_ifs"
  618. fi
  619. fi
  620. CC="$ac_cv_prog_CC"
  621. if test -n "$CC"; then
  622.   echo "$ac_t""$CC" 1>&6
  623. else
  624.   echo "$ac_t""no" 1>&6
  625. fi
  626.  
  627. if test -z "$CC"; then
  628.   # Extract the first word of "cc", so it can be a program name with args.
  629. set dummy cc; ac_word=$2
  630. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  631. echo "configure:632: checking for $ac_word" >&5
  632. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  633.   echo $ac_n "(cached) $ac_c" 1>&6
  634. else
  635.   if test -n "$CC"; then
  636.   ac_cv_prog_CC="$CC" # Let the user override the test.
  637. else
  638.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  639.   ac_prog_rejected=no
  640.   for ac_dir in $PATH; do
  641.     test -z "$ac_dir" && ac_dir=.
  642.     if test -f $ac_dir/$ac_word; then
  643.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  644.         ac_prog_rejected=yes
  645.     continue
  646.       fi
  647.       ac_cv_prog_CC="cc"
  648.       break
  649.     fi
  650.   done
  651.   IFS="$ac_save_ifs"
  652. if test $ac_prog_rejected = yes; then
  653.   # We found a bogon in the path, so make sure we never use it.
  654.   set dummy $ac_cv_prog_CC
  655.   shift
  656.   if test $# -gt 0; then
  657.     # We chose a different compiler from the bogus one.
  658.     # However, it has the same basename, so the bogon will be chosen
  659.     # first if we set CC to just the basename; use the full file name.
  660.     shift
  661.     set dummy "$ac_dir/$ac_word" "$@"
  662.     shift
  663.     ac_cv_prog_CC="$@"
  664.   fi
  665. fi
  666. fi
  667. fi
  668. CC="$ac_cv_prog_CC"
  669. if test -n "$CC"; then
  670.   echo "$ac_t""$CC" 1>&6
  671. else
  672.   echo "$ac_t""no" 1>&6
  673. fi
  674.  
  675.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  676. fi
  677.  
  678. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  679. echo "configure:680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  680.  
  681. ac_ext=c
  682. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  683. ac_cpp='$CPP $CPPFLAGS'
  684. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  685. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  686. cross_compiling=$ac_cv_prog_cc_cross
  687.  
  688. cat > conftest.$ac_ext <<EOF
  689. #line 690 "configure"
  690. #include "confdefs.h"
  691. main(){return(0);}
  692. EOF
  693. if { (eval echo configure:694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  694.   ac_cv_prog_cc_works=yes
  695.   # If we can't run a trivial program, we are probably using a cross compiler.
  696.   if (./conftest; exit) 2>/dev/null; then
  697.     ac_cv_prog_cc_cross=no
  698.   else
  699.     ac_cv_prog_cc_cross=yes
  700.   fi
  701. else
  702.   echo "configure: failed program was:" >&5
  703.   cat conftest.$ac_ext >&5
  704.   ac_cv_prog_cc_works=no
  705. fi
  706. rm -fr conftest*
  707.  
  708. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  709. if test $ac_cv_prog_cc_works = no; then
  710.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  711. fi
  712. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  713. echo "configure:714: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  714. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  715. cross_compiling=$ac_cv_prog_cc_cross
  716.  
  717. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  718. echo "configure:719: checking whether we are using GNU C" >&5
  719. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  720.   echo $ac_n "(cached) $ac_c" 1>&6
  721. else
  722.   cat > conftest.c <<EOF
  723. #ifdef __GNUC__
  724.   yes;
  725. #endif
  726. EOF
  727. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  728.   ac_cv_prog_gcc=yes
  729. else
  730.   ac_cv_prog_gcc=no
  731. fi
  732. fi
  733.  
  734. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  735.  
  736. if test $ac_cv_prog_gcc = yes; then
  737.   GCC=yes
  738.   ac_test_CFLAGS="${CFLAGS+set}"
  739.   ac_save_CFLAGS="$CFLAGS"
  740.   CFLAGS=
  741.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  742. echo "configure:743: checking whether ${CC-cc} accepts -g" >&5
  743. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  744.   echo $ac_n "(cached) $ac_c" 1>&6
  745. else
  746.   echo 'void f(){}' > conftest.c
  747. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  748.   ac_cv_prog_cc_g=yes
  749. else
  750.   ac_cv_prog_cc_g=no
  751. fi
  752. rm -f conftest*
  753.  
  754. fi
  755.  
  756. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  757.   if test "$ac_test_CFLAGS" = set; then
  758.     CFLAGS="$ac_save_CFLAGS"
  759.   elif test $ac_cv_prog_cc_g = yes; then
  760.     CFLAGS="-g -O2"
  761.   else
  762.     CFLAGS="-O2"
  763.   fi
  764. else
  765.   GCC=
  766.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  767. fi
  768.  
  769. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  770. echo "configure:771: checking for POSIXized ISC" >&5
  771. if test -d /etc/conf/kconfig.d &&
  772.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  773. then
  774.   echo "$ac_t""yes" 1>&6
  775.   ISC=yes # If later tests want to check for ISC.
  776.   cat >> confdefs.h <<\EOF
  777. #define _POSIX_SOURCE 1
  778. EOF
  779.  
  780.   if test "$GCC" = yes; then
  781.     CC="$CC -posix"
  782.   else
  783.     CC="$CC -Xp"
  784.   fi
  785. else
  786.   echo "$ac_t""no" 1>&6
  787.   ISC=
  788. fi
  789.  
  790.  
  791. ac_aux_dir=
  792. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  793.   if test -f $ac_dir/install-sh; then
  794.     ac_aux_dir=$ac_dir
  795.     ac_install_sh="$ac_aux_dir/install-sh -c"
  796.     break
  797.   elif test -f $ac_dir/install.sh; then
  798.     ac_aux_dir=$ac_dir
  799.     ac_install_sh="$ac_aux_dir/install.sh -c"
  800.     break
  801.   fi
  802. done
  803. if test -z "$ac_aux_dir"; then
  804.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  805. fi
  806. ac_config_guess=$ac_aux_dir/config.guess
  807. ac_config_sub=$ac_aux_dir/config.sub
  808. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  809.  
  810.  
  811. # Do some error checking and defaulting for the host and target type.
  812. # The inputs are:
  813. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  814. #
  815. # The rules are:
  816. # 1. You are not allowed to specify --host, --target, and nonopt at the
  817. #    same time.
  818. # 2. Host defaults to nonopt.
  819. # 3. If nonopt is not specified, then host defaults to the current host,
  820. #    as determined by config.guess.
  821. # 4. Target and build default to nonopt.
  822. # 5. If nonopt is not specified, then target and build default to host.
  823.  
  824. # The aliases save the names the user supplied, while $host etc.
  825. # will get canonicalized.
  826. case $host---$target---$nonopt in
  827. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  828. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  829. esac
  830.  
  831.  
  832. # Make sure we can run config.sub.
  833. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  834. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  835. fi
  836.  
  837. echo $ac_n "checking host system type""... $ac_c" 1>&6
  838. echo "configure:839: checking host system type" >&5
  839.  
  840. host_alias=$host
  841. case "$host_alias" in
  842. NONE)
  843.   case $nonopt in
  844.   NONE)
  845.     if host_alias=`$ac_config_guess`; then :
  846.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  847.     fi ;;
  848.   *) host_alias=$nonopt ;;
  849.   esac ;;
  850. esac
  851.  
  852. host=`$ac_config_sub $host_alias`
  853. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  854. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  855. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  856. echo "$ac_t""$host" 1>&6
  857.  
  858. echo $ac_n "checking target system type""... $ac_c" 1>&6
  859. echo "configure:860: checking target system type" >&5
  860.  
  861. target_alias=$target
  862. case "$target_alias" in
  863. NONE)
  864.   case $nonopt in
  865.   NONE) target_alias=$host_alias ;;
  866.   *) target_alias=$nonopt ;;
  867.   esac ;;
  868. esac
  869.  
  870. target=`$ac_config_sub $target_alias`
  871. target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  872. target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  873. target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  874. echo "$ac_t""$target" 1>&6
  875.  
  876. echo $ac_n "checking build system type""... $ac_c" 1>&6
  877. echo "configure:878: checking build system type" >&5
  878.  
  879. build_alias=$build
  880. case "$build_alias" in
  881. NONE)
  882.   case $nonopt in
  883.   NONE) build_alias=$host_alias ;;
  884.   *) build_alias=$nonopt ;;
  885.   esac ;;
  886. esac
  887.  
  888. build=`$ac_config_sub $build_alias`
  889. build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  890. build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  891. build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  892. echo "$ac_t""$build" 1>&6
  893.  
  894. test "$host_alias" != "$target_alias" &&
  895.   test "$program_prefix$program_suffix$program_transform_name" = \
  896.     NONENONEs,x,x, &&
  897.   program_prefix=${target_alias}-
  898.  
  899. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  900. echo "configure:901: checking how to run the C preprocessor" >&5
  901. # On Suns, sometimes $CPP names a directory.
  902. if test -n "$CPP" && test -d "$CPP"; then
  903.   CPP=
  904. fi
  905. if test -z "$CPP"; then
  906. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  907.   echo $ac_n "(cached) $ac_c" 1>&6
  908. else
  909.     # This must be in double quotes, not single quotes, because CPP may get
  910.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  911.   CPP="${CC-cc} -E"
  912.   # On the NeXT, cc -E runs the code through the compiler's parser,
  913.   # not just through cpp.
  914.   cat > conftest.$ac_ext <<EOF
  915. #line 916 "configure"
  916. #include "confdefs.h"
  917. #include <assert.h>
  918. Syntax Error
  919. EOF
  920. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  921. { (eval echo configure:922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  922. ac_err=`grep -v '^ *+' conftest.out`
  923. if test -z "$ac_err"; then
  924.   :
  925. else
  926.   echo "$ac_err" >&5
  927.   echo "configure: failed program was:" >&5
  928.   cat conftest.$ac_ext >&5
  929.   rm -rf conftest*
  930.   CPP="${CC-cc} -E -traditional-cpp"
  931.   cat > conftest.$ac_ext <<EOF
  932. #line 933 "configure"
  933. #include "confdefs.h"
  934. #include <assert.h>
  935. Syntax Error
  936. EOF
  937. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  938. { (eval echo configure:939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  939. ac_err=`grep -v '^ *+' conftest.out`
  940. if test -z "$ac_err"; then
  941.   :
  942. else
  943.   echo "$ac_err" >&5
  944.   echo "configure: failed program was:" >&5
  945.   cat conftest.$ac_ext >&5
  946.   rm -rf conftest*
  947.   CPP=/lib/cpp
  948. fi
  949. rm -f conftest*
  950. fi
  951. rm -f conftest*
  952.   ac_cv_prog_CPP="$CPP"
  953. fi
  954.   CPP="$ac_cv_prog_CPP"
  955. else
  956.   ac_cv_prog_CPP="$CPP"
  957. fi
  958. echo "$ac_t""$CPP" 1>&6
  959.  
  960. if test $ac_cv_prog_gcc = yes; then
  961.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  962. echo "configure:963: checking whether ${CC-cc} needs -traditional" >&5
  963. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  964.   echo $ac_n "(cached) $ac_c" 1>&6
  965. else
  966.     ac_pattern="Autoconf.*'x'"
  967.   cat > conftest.$ac_ext <<EOF
  968. #line 969 "configure"
  969. #include "confdefs.h"
  970. #include <sgtty.h>
  971. Autoconf TIOCGETP
  972. EOF
  973. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  974.   egrep "$ac_pattern" >/dev/null 2>&1; then
  975.   rm -rf conftest*
  976.   ac_cv_prog_gcc_traditional=yes
  977. else
  978.   rm -rf conftest*
  979.   ac_cv_prog_gcc_traditional=no
  980. fi
  981. rm -f conftest*
  982.  
  983.  
  984.   if test $ac_cv_prog_gcc_traditional = no; then
  985.     cat > conftest.$ac_ext <<EOF
  986. #line 987 "configure"
  987. #include "confdefs.h"
  988. #include <termio.h>
  989. Autoconf TCGETA
  990. EOF
  991. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  992.   egrep "$ac_pattern" >/dev/null 2>&1; then
  993.   rm -rf conftest*
  994.   ac_cv_prog_gcc_traditional=yes
  995. fi
  996. rm -f conftest*
  997.  
  998.   fi
  999. fi
  1000.  
  1001. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1002.   if test $ac_cv_prog_gcc_traditional = yes; then
  1003.     CC="$CC -traditional"
  1004.   fi
  1005. fi
  1006.  
  1007.  
  1008.  
  1009. case "$target" in
  1010.     *hp-hpux*) 
  1011.         SYS_DEFS="-D_HPUX_SOURCE"
  1012.         ;;
  1013.     *ibm-aix*)
  1014.         SYS_DEFS="-D_ALL_SOURCE"
  1015.         ;;
  1016.     *dec-osf4*)
  1017.         cat >> confdefs.h <<\EOF
  1018. #define HAVE_BROKEN_SYS_ACL_H 1
  1019. EOF
  1020.  
  1021.         ;;
  1022.     *dec-osf*)
  1023.         ;;
  1024.     *sequent-dynix*)
  1025.         ;;
  1026.     *solaris*)
  1027.         ;;
  1028.     sparc*sunos*)
  1029.         ;;
  1030.     *linux*)
  1031.         ;;
  1032. esac
  1033.  
  1034.  
  1035. # Check whether --with-xcurses or --without-xcurses was given.
  1036. if test "${with_xcurses+set}" = set; then
  1037.   withval="$with_xcurses"
  1038.   with_xcurses=$withval
  1039. else
  1040.   with_xcurses=no
  1041. fi
  1042.  
  1043. # Check whether --with-ncurses or --without-ncurses was given.
  1044. if test "${with_ncurses+set}" = set; then
  1045.   withval="$with_ncurses"
  1046.   with_ncurses=$withval
  1047. else
  1048.   with_ncurses=no
  1049. fi
  1050.  
  1051. # Check whether --with-extcurses or --without-extcurses was given.
  1052. if test "${with_extcurses+set}" = set; then
  1053.   withval="$with_extcurses"
  1054.   with_extcurses=$withval
  1055. else
  1056.   with_extcurses=no
  1057. fi
  1058.  
  1059. # Check whether --with-cursesincdir or --without-cursesincdir was given.
  1060. if test "${with_cursesincdir+set}" = set; then
  1061.   withval="$with_cursesincdir"
  1062.   with_cursesincdir=$withval
  1063. else
  1064.   with_cursesincdir=no
  1065. fi
  1066.  
  1067. # Check whether --with-curseslibdir or --without-curseslibdir was given.
  1068. if test "${with_curseslibdir+set}" = set; then
  1069.   withval="$with_curseslibdir"
  1070.   with_curseslibdir=$withval
  1071. else
  1072.   with_curseslibdir=no
  1073. fi
  1074.  
  1075.  
  1076. # Check whether --with-regina or --without-regina was given.
  1077. if test "${with_regina+set}" = set; then
  1078.   withval="$with_regina"
  1079.   with_regina=$withval
  1080. else
  1081.   with_regina=no
  1082. fi
  1083.  
  1084. # Check whether --with-rexximc or --without-rexximc was given.
  1085. if test "${with_rexximc+set}" = set; then
  1086.   withval="$with_rexximc"
  1087.   with_rexximc=$withval
  1088. else
  1089.   with_rexximc=no
  1090. fi
  1091.  
  1092. # Check whether --with-rexx6000 or --without-rexx6000 was given.
  1093. if test "${with_rexx6000+set}" = set; then
  1094.   withval="$with_rexx6000"
  1095.   with_rexx6000=$withval
  1096. else
  1097.   with_rexx6000=no
  1098. fi
  1099.  
  1100. # Check whether --with-orexx or --without-orexx was given.
  1101. if test "${with_orexx+set}" = set; then
  1102.   withval="$with_orexx"
  1103.   with_orexx=$withval
  1104. else
  1105.   with_orexx=no
  1106. fi
  1107.  
  1108. # Check whether --with-unirexx or --without-unirexx was given.
  1109. if test "${with_unirexx+set}" = set; then
  1110.   withval="$with_unirexx"
  1111.   with_unirexx=$withval
  1112. else
  1113.   with_unirexx=no
  1114. fi
  1115.  
  1116. # Check whether --with-rexxincdir or --without-rexxincdir was given.
  1117. if test "${with_rexxincdir+set}" = set; then
  1118.   withval="$with_rexxincdir"
  1119.   with_rexxincdir=$withval
  1120. else
  1121.   with_rexxincdir=no
  1122. fi
  1123.  
  1124. # Check whether --with-rexxlibdir or --without-rexxlibdir was given.
  1125. if test "${with_rexxlibdir+set}" = set; then
  1126.   withval="$with_rexxlibdir"
  1127.   with_rexxlibdir=$withval
  1128. else
  1129.   with_rexxlibdir=no
  1130. fi
  1131.  
  1132.  
  1133. MH_XLIBS=""
  1134. MH_XINC_DIR=""
  1135. if test "$with_xcurses" = yes; then
  1136.     
  1137. mh_solaris_flag=no
  1138. mh_hpux9_flag=no
  1139.  
  1140. case "$target" in
  1141.     *solaris*)
  1142.         extra_libs="-lsocket -lnsl"
  1143.         mh_solaris_flag=yes
  1144.         ;;
  1145.     sparc*sunos*)
  1146.         extra_x_libs="Xext"
  1147.         if test "$ac_cv_prog_CC" = "gcc" ; then
  1148.             extra_ld_flags="-Wl,-Bstatic"
  1149.             extra_ld_flags2="-Wl,-Bdynamic"
  1150.         else
  1151.             extra_ld_flags="-Bstatic"
  1152.             extra_ld_flags2="-Bdynamic"
  1153.         fi
  1154.         ;;
  1155.     *hpux9*)
  1156.         mh_hpux9_flag=yes
  1157.         ;;
  1158. esac
  1159.  
  1160. echo $ac_n "checking for location of X libraries""... $ac_c" 1>&6
  1161. echo "configure:1162: checking for location of X libraries" >&5
  1162. if test "$with_xaw3d" = yes; then
  1163.     MH_X11_LIBS="Xaw3d Xmu Xt X11"
  1164. else
  1165.     MH_X11_LIBS="Xaw Xmu Xt X11"
  1166. fi
  1167. MH_X11R6_LIBS="SM ICE Xext"
  1168. mh_x11r6=no
  1169. mh_lib_dirs="\
  1170.     $HOME/lib             \
  1171.     /tmp/lib              \
  1172.     /usr/X11R6/lib        \
  1173.     /usr/lib/X11R6        \
  1174.     /usr/local/X11R6/lib  \
  1175.     /usr/local/lib/X11R6  \
  1176.  
  1177.     /usr/X11R5/lib        \
  1178.     /usr/lib/X11R5        \
  1179.     /usr/local/X11R5/lib  \
  1180.     /usr/local/lib/X11R5  \
  1181.     /usr/local/x11r5/lib  \
  1182.  
  1183.     /usr/X11R4/lib        \
  1184.     /usr/lib/X11R4        \
  1185.     /usr/local/X11R4/lib  \
  1186.     /usr/local/lib/X11R4  \
  1187.                           \
  1188.     /usr/X11/lib          \
  1189.     /usr/lib/X11          \
  1190.     /usr/local/X11/lib    \
  1191.     /usr/local/lib/X11    \
  1192.                           \
  1193.     /usr/X386/lib         \
  1194.     /usr/x386/lib         \
  1195.     /usr/XFree86/lib/X11  \
  1196.                           \
  1197.     /usr/lib              \
  1198.     /usr/local/lib        \
  1199.     /usr/unsupported/lib  \
  1200.     /usr/athena/lib       \
  1201.     /usr/lpp/Xamples/lib  \
  1202.                           \
  1203.     /usr/openwin/lib      \
  1204.     /usr/openwin/share/lib"
  1205. if test "x$x_libraries" != xNONE ; then
  1206.     mh_lib_dirs="$x_libraries $mh_lib_dirs"
  1207. fi
  1208.  
  1209. for ac_dir in $mh_lib_dirs ; do
  1210.     for mh_xsm in libSM.a libSM.so libSM.sl; do
  1211.       if test -r $ac_dir/$mh_xsm; then
  1212.      mh_x11r6=yes
  1213.         break 2
  1214.       fi
  1215.     done
  1216. done
  1217.  
  1218. if test "$mh_x11r6" = yes ; then
  1219.     mh_libs="$MH_X11_LIBS $MH_X11R6_LIBS"
  1220. else
  1221.     mh_libs="$MH_X11_LIBS $extra_x_libs"
  1222. fi
  1223.  
  1224. mh_prev_dir=""
  1225. mh_where_found=""
  1226. mh_where_found_dirs=""
  1227. mh_solaris_path=""
  1228. for mh_lib in $mh_libs; do
  1229.   mh_lib_found=no
  1230.   for ac_dir in $mh_lib_dirs ; do
  1231.     for mh_ext in a so sl; do
  1232.       if test -r $ac_dir/lib$mh_lib.$mh_ext; then
  1233.         if test "x$mh_prev_dir" != "x$ac_dir" ; then
  1234.           if test "x$mh_prev_dir" = "x" ; then
  1235.              mh_where_found="$mh_where_found found in $ac_dir"
  1236.           else
  1237.              mh_where_found="$mh_where_found and in $ac_dir"
  1238.           fi
  1239.           mh_prev_dir=$ac_dir
  1240.           mh_where_found_dirs="$mh_where_found_dirs $ac_dir"
  1241.           MH_XLIBS="$MH_XLIBS -L$ac_dir"
  1242.           mh_solaris_path="${mh_solaris_path}:$ac_dir"
  1243.         fi
  1244.         MH_XLIBS="$MH_XLIBS -l$mh_lib"
  1245.         mh_lib_found=yes
  1246.         break 2
  1247.       fi
  1248.     done
  1249.   done
  1250.   if test "$mh_lib_found" = no; then
  1251.     { echo "configure: error: Cannot find required X library; lib$mh_lib. XCurses cannot be configured" 1>&2; exit 1; }
  1252.   fi
  1253. done
  1254. echo "$ac_t""$mh_where_found" 1>&6
  1255. mh_solaris_path=`echo $mh_solaris_path | sed 's/^://'`
  1256. if test "$mh_solaris_flag" = yes ; then
  1257.     MH_XLIBS="-R$mh_solaris_path $extra_ld_flags $MH_XLIBS $extra_libs $extra_ld_flags2"
  1258. else
  1259.     MH_XLIBS="$extra_ld_flags $MH_XLIBS $extra_libs $extra_ld_flags2"
  1260. fi
  1261. if test "$mh_hpux9_flag" = yes ; then
  1262.   grep -q XtSetLanguageProc $mh_x11_dir/Intrinsic.h
  1263.   if test $? -eq 0 ; then
  1264.     mh_found_xtshellstrings=no
  1265.     for mh_acdir in $mh_where_found_dirs ; do
  1266.       for mh_xaw in `ls $mh_acdir/libXaw.*` ; do
  1267.         nm $mh_xaw | grep XtShellStrings | grep -qv extern
  1268.         if test $? -eq 0 ; then
  1269.           mh_found_xtshellstrings=yes
  1270.         fi
  1271.       done
  1272.     done
  1273.     if test "$mh_found_xtshellstrings" = no ; then
  1274.       echo "configure: warning: The X11 development environment has not been installed correctly." 1>&2
  1275.       echo "configure: warning: The header file; Intrinsic.h" 1>&2
  1276.       echo "configure: warning: Set library; libXaw is for X11R4.  This is a common problem with" 1>&2
  1277.       echo "configure: warning: HP-UX 9.x." 1>&2
  1278.       echo "configure: warning: A set of required X11R5 library files can be obtained from the" 1>&2
  1279.       echo "configure: warning: anonymous ftp sites listed on the PDCurses WWW home page:" 1>&2
  1280.       echo "configure: warning: http://www.lightlink.com/hessling/" 1>&2
  1281.       echo "configure: warning: The file is called HPUX-9.x-libXaw-libXmu.tar.Z" 1>&2
  1282.       { echo "configure: error: X11 installation incomplete; cannot continue" 1>&2; exit 1; }
  1283.     fi
  1284.   fi
  1285. fi
  1286.     
  1287.  
  1288. fi
  1289.  
  1290.  
  1291. case "$target" in
  1292.     *hpux*10*)
  1293.             mh_curses_colr=yes
  1294.             mh_pre_curses_h_include="stdarg"
  1295.         ;;
  1296.     *aix*4.2*)
  1297.             mh_curses_colr=no
  1298.             mh_pre_curses_h_include="stdarg"
  1299.         ;;
  1300.     *)
  1301.             mh_curses_colr=no
  1302.             mh_pre_curses_h_include=""
  1303. esac
  1304.  
  1305. if test "$with_xcurses" = yes; then
  1306.     cat >> confdefs.h <<\EOF
  1307. #define USE_XCURSES 1
  1308. EOF
  1309.  
  1310.     curses_h="xcurses.h"
  1311.     curses_l="XCurses"
  1312. else
  1313.     if test "$with_ncurses" = yes; then
  1314.         cat >> confdefs.h <<\EOF
  1315. #define USE_NCURSES 1
  1316. EOF
  1317.  
  1318.         curses_h="ncurses.h"
  1319.         curses_l="ncurses"
  1320.     else
  1321.         if test "$with_extcurses" = yes; then
  1322.             cat >> confdefs.h <<\EOF
  1323. #define USE_EXTCURSES 1
  1324. EOF
  1325.  
  1326.             curses_h="cur00.h"
  1327.             curses_l="cur"
  1328.         else
  1329.             if test "$mh_curses_colr" = yes; then
  1330.                 curses_h="curses.h"
  1331.                 curses_l="cur_colr"
  1332.             else
  1333.                 curses_h="curses.h"
  1334.                 curses_l="curses"
  1335.             fi
  1336.         fi
  1337.     fi
  1338. fi
  1339.  
  1340. echo $ac_n "checking for location of $curses_h header file""... $ac_c" 1>&6
  1341. echo "configure:1342: checking for location of $curses_h header file" >&5
  1342. mh_curses_inc_dir=""
  1343. mh_inc_dirs="\
  1344.     ${mh_sysv_incdir}         \
  1345.     ${exec_prefix}/include    \
  1346.     ${HOME}/include           \
  1347.     /usr/local/include        \
  1348.     /usr/contrib/include      \
  1349.     /usr/include/curses_colr  \
  1350.     /opt/include              \
  1351.     /usr/include              \
  1352.     /usr/ucbinclude           \
  1353.     /usr/ucbinc               \
  1354.     /usr/unsupported/include"
  1355. if test "$with_cursesincdir" != no ; then
  1356.     mh_inc_dirs="$with_cursesincdir $mh_inc_dirs"
  1357. fi
  1358. for ac_dir in $mh_inc_dirs ; do
  1359.   if test -r $ac_dir/$curses_h; then
  1360.     mh_curses_inc_dir=$ac_dir
  1361.     break
  1362.   fi
  1363. done
  1364. if test "x$mh_curses_inc_dir" != "x" ; then
  1365.     echo "$ac_t""found in $mh_curses_inc_dir" 1>&6
  1366.     MH_CURSES_INC="-I$mh_curses_inc_dir"
  1367. case "$target" in
  1368.     *solaris*)
  1369.         if test "$ac_cv_prog_gcc" = yes ; then
  1370.             if test "x$mh_curses_inc_dir" = "x/usr/include" ; then
  1371.             MH_CURSES_INC=""
  1372.             fi
  1373.         fi
  1374.         ;;
  1375. esac
  1376.     
  1377. else
  1378.     { echo "configure: error: Cannot find curses header file: $curses_h; THE cannot be configured" 1>&2; exit 1; }
  1379. fi
  1380.  
  1381. echo $ac_n "checking for location of $curses_l library file""... $ac_c" 1>&6
  1382. echo "configure:1383: checking for location of $curses_l library file" >&5
  1383. mh_curses_lib_dir=""
  1384. mh_lib_dirs="\
  1385.     ${mh_sysv_libdir}         \
  1386.     ${exec_prefix}/lib        \
  1387.     ${HOME}/lib               \
  1388.     /usr/local/lib            \
  1389.     /usr/contrib/lib          \
  1390.     /opt/lib                  \
  1391.     /usr/lib                  \
  1392.     /usr/ccs/lib              \
  1393.     /usr/ucblib               \
  1394.     /usr/unsupported/lib"
  1395. if test "$with_curseslibdir" != no ; then
  1396.     mh_lib_dirs="$with_curseslibdir $mh_lib_dirs"
  1397. fi
  1398. for ac_dir in $mh_lib_dirs ; do
  1399.     for mh_ext in lib${curses_l}.a lib${curses_l}.so lib${curses_l}.sl; do
  1400.       if test -r $ac_dir/$mh_ext; then
  1401.          mh_curses_lib_dir=$ac_dir
  1402.          break 2
  1403.       fi
  1404.     done
  1405. done
  1406. if test "x$mh_curses_lib_dir" != "x" ; then
  1407.     MH_CURSES_LIB="-L$mh_curses_lib_dir -l$curses_l"
  1408.     echo "$ac_t""found in $mh_curses_lib_dir" 1>&6
  1409.     
  1410. else
  1411.     { echo "configure: error: Cannot find curses library file: $curses_l; THE cannot be configured" 1>&2; exit 1; }
  1412. fi
  1413.  
  1414.  
  1415. if test "$with_regina" = yes; then
  1416.     cat >> confdefs.h <<\EOF
  1417. #define USE_REGINA 1
  1418. EOF
  1419.  
  1420.     rexx_h="rexxsaa.h"
  1421.     rexx_l="regina"
  1422.     extra_libs=""
  1423. else
  1424.     if test "$with_rexximc" = yes; then
  1425.         cat >> confdefs.h <<\EOF
  1426. #define USE_REXXIMC 1
  1427. EOF
  1428.  
  1429.         rexx_h="rexxsaa.h"
  1430.         rexx_l="rexx"
  1431.         extra_libs=""
  1432.     else
  1433.         if test "$with_rexx6000" = yes; then
  1434.             cat >> confdefs.h <<\EOF
  1435. #define USE_REXX6000 1
  1436. EOF
  1437.  
  1438.             rexx_h="rexxtype.h"
  1439.             rexx_l="rexx"
  1440.             extra_libs=""
  1441.         else
  1442.             if test "$with_orexx" = yes; then
  1443.                 cat >> confdefs.h <<\EOF
  1444. #define USE_OREXX 1
  1445. EOF
  1446.  
  1447.                 rexx_h="rexx.h"
  1448.                 rexx_l="rexx"
  1449.                 extra_libs="-lrexxapi -lpthreads"
  1450.             else
  1451.                 if test "$with_unirexx" = yes; then
  1452.                     cat >> confdefs.h <<\EOF
  1453. #define USE_UNIREXX 1
  1454. EOF
  1455.  
  1456.                     rexx_h="rexxsaa.h"
  1457.                     rexx_l="rx"
  1458.                     extra_libs=""
  1459.                 else
  1460.                     cat >> confdefs.h <<\EOF
  1461. #define NOREXX 1
  1462. EOF
  1463.  
  1464.                     rexx_h=""
  1465.                     rexx_l=""
  1466.                     extra_libs=""
  1467.                 fi
  1468.             fi
  1469.         fi
  1470.     fi
  1471. fi
  1472.  
  1473.  
  1474. if test "xx$rexx_h" = "xx" ; then
  1475.     MH_REXX_LIB=""
  1476.     MH_REXX_INC=""
  1477.     
  1478.     
  1479. else
  1480.     echo $ac_n "checking for location of REXX header file""... $ac_c" 1>&6
  1481. echo "configure:1482: checking for location of REXX header file" >&5
  1482.     mh_rexx_inc_dir=""
  1483.     mh_inc_dirs="\
  1484.         ${HOME}/include           \
  1485.         /usr/local/include        \
  1486.         /usr/contrib/include      \
  1487.         /opt/include              \
  1488.         /usr/include              \
  1489.         /usr/local/orexx          \
  1490.         /usr/unsupported/include"
  1491.     if test "$with_rexxincdir" != no ; then
  1492.         mh_inc_dirs="$with_rexxincdir $mh_inc_dirs"
  1493.     fi
  1494.     for ac_dir in $mh_inc_dirs ; do
  1495.       if test -r $ac_dir/$rexx_h; then
  1496.         mh_rexx_inc_dir=$ac_dir
  1497.         break
  1498.       fi
  1499.     done
  1500.     if test "x$mh_rexx_inc_dir" != "x" ; then
  1501.         MH_REXX_INC="-I$mh_rexx_inc_dir"
  1502.         echo "$ac_t""found in $mh_rexx_inc_dir" 1>&6
  1503.         
  1504.     else
  1505.         { echo "configure: error: Cannot find REXX header file: $rexx_h; THE cannot be configured" 1>&2; exit 1; }
  1506.     fi
  1507.     echo $ac_n "checking for location of REXX library file""... $ac_c" 1>&6
  1508. echo "configure:1509: checking for location of REXX library file" >&5
  1509.     mh_rexx_lib_dir=""
  1510.     mh_lib_dirs="\
  1511.         ${HOME}/lib               \
  1512.         /usr/local/lib            \
  1513.         /usr/contrib/lib          \
  1514.         /opt/lib                  \
  1515.         /usr/lib                  \
  1516.         /usr/local/orexx/lib      \
  1517.         /usr/unsupported/lib"
  1518.     if test "$with_rexxlibdir" != no ; then
  1519.         mh_lib_dirs="$with_rexxlibdir $mh_lib_dirs"
  1520.     fi
  1521.     for ac_dir in $mh_lib_dirs ; do
  1522.         for mh_ext in lib${rexx_l}.a lib${rexx_l}.so lib${rexx_l}.sl; do
  1523.           if test -r $ac_dir/$mh_ext; then
  1524.              mh_rexx_lib_dir=$ac_dir
  1525.              break 2
  1526.           fi
  1527.         done
  1528.     done
  1529.     if test "x$mh_rexx_lib_dir" != "x" ; then
  1530.         MH_REXX_LIB="-L$mh_rexx_lib_dir -l$rexx_l $extra_libs"
  1531.         echo "$ac_t""found in $mh_rexx_lib_dir" 1>&6
  1532.         
  1533.     else
  1534.         { echo "configure: error: Cannot find REXX library file: $rexx_l; THE cannot be configured" 1>&2; exit 1; }
  1535.     fi
  1536. fi
  1537.  
  1538.  
  1539. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  1540. echo "configure:1541: checking whether ln -s works" >&5
  1541. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  1542.   echo $ac_n "(cached) $ac_c" 1>&6
  1543. else
  1544.   rm -f conftestdata
  1545. if ln -s X conftestdata 2>/dev/null
  1546. then
  1547.   rm -f conftestdata
  1548.   ac_cv_prog_LN_S="ln -s"
  1549. else
  1550.   ac_cv_prog_LN_S=ln
  1551. fi
  1552. fi
  1553. LN_S="$ac_cv_prog_LN_S"
  1554. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  1555.   echo "$ac_t""yes" 1>&6
  1556. else
  1557.   echo "$ac_t""no" 1>&6
  1558. fi
  1559.  
  1560. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  1561. echo "configure:1562: checking whether ${MAKE-make} sets \${MAKE}" >&5
  1562. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  1563. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  1564.   echo $ac_n "(cached) $ac_c" 1>&6
  1565. else
  1566.   cat > conftestmake <<\EOF
  1567. all:
  1568.     @echo 'ac_maketemp="${MAKE}"'
  1569. EOF
  1570. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1571. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  1572. if test -n "$ac_maketemp"; then
  1573.   eval ac_cv_prog_make_${ac_make}_set=yes
  1574. else
  1575.   eval ac_cv_prog_make_${ac_make}_set=no
  1576. fi
  1577. rm -f conftestmake
  1578. fi
  1579. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  1580.   echo "$ac_t""yes" 1>&6
  1581.   SET_MAKE=
  1582. else
  1583.   echo "$ac_t""no" 1>&6
  1584.   SET_MAKE="MAKE=${MAKE-make}"
  1585. fi
  1586.  
  1587.  
  1588.  
  1589. MH_EXTRA_LIBS=""
  1590. for mh_lib in dld m dl s; do
  1591. #    AC_MSG_CHECKING(for library -l${mh_lib})
  1592.     echo $ac_n "checking for main in -l$mh_lib""... $ac_c" 1>&6
  1593. echo "configure:1594: checking for main in -l$mh_lib" >&5
  1594. ac_lib_var=`echo $mh_lib'_'main | sed 'y%./+-%__p_%'`
  1595. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1596.   echo $ac_n "(cached) $ac_c" 1>&6
  1597. else
  1598.   ac_save_LIBS="$LIBS"
  1599. LIBS="-l$mh_lib  $LIBS"
  1600. cat > conftest.$ac_ext <<EOF
  1601. #line 1602 "configure"
  1602. #include "confdefs.h"
  1603.  
  1604. int main() {
  1605. main()
  1606. ; return 0; }
  1607. EOF
  1608. if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1609.   rm -rf conftest*
  1610.   eval "ac_cv_lib_$ac_lib_var=yes"
  1611. else
  1612.   echo "configure: failed program was:" >&5
  1613.   cat conftest.$ac_ext >&5
  1614.   rm -rf conftest*
  1615.   eval "ac_cv_lib_$ac_lib_var=no"
  1616. fi
  1617. rm -f conftest*
  1618. LIBS="$ac_save_LIBS"
  1619.  
  1620. fi
  1621. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1622.   echo "$ac_t""yes" 1>&6
  1623.   mh_lib_found=yes
  1624. else
  1625.   echo "$ac_t""no" 1>&6
  1626. mh_lib_found=no
  1627. fi
  1628.  
  1629.     if test "$mh_lib_found" = yes; then
  1630. #        AC_MSG_RESULT(found)
  1631.         MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}"
  1632. #    else
  1633. #        AC_MSG_RESULT(not found)
  1634.     fi
  1635. done
  1636.  
  1637. if test "$with_regina" = yes; then
  1638.     
  1639. MHLEXLIB=""
  1640. for mh_lib in fl l; do
  1641.     echo $ac_n "checking for yywrap in -l$mh_lib""... $ac_c" 1>&6
  1642. echo "configure:1643: checking for yywrap in -l$mh_lib" >&5
  1643. ac_lib_var=`echo $mh_lib'_'yywrap | sed 'y%./+-%__p_%'`
  1644. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1645.   echo $ac_n "(cached) $ac_c" 1>&6
  1646. else
  1647.   ac_save_LIBS="$LIBS"
  1648. LIBS="-l$mh_lib  $LIBS"
  1649. cat > conftest.$ac_ext <<EOF
  1650. #line 1651 "configure"
  1651. #include "confdefs.h"
  1652. /* Override any gcc2 internal prototype to avoid an error.  */
  1653. /* We use char because int might match the return type of a gcc2
  1654.     builtin and then its argument prototype would still apply.  */
  1655. char yywrap();
  1656.  
  1657. int main() {
  1658. yywrap()
  1659. ; return 0; }
  1660. EOF
  1661. if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1662.   rm -rf conftest*
  1663.   eval "ac_cv_lib_$ac_lib_var=yes"
  1664. else
  1665.   echo "configure: failed program was:" >&5
  1666.   cat conftest.$ac_ext >&5
  1667.   rm -rf conftest*
  1668.   eval "ac_cv_lib_$ac_lib_var=no"
  1669. fi
  1670. rm -f conftest*
  1671. LIBS="$ac_save_LIBS"
  1672.  
  1673. fi
  1674. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1675.   echo "$ac_t""yes" 1>&6
  1676.   mh_lib_found=yes
  1677. else
  1678.   echo "$ac_t""no" 1>&6
  1679. mh_lib_found=no
  1680. fi
  1681.  
  1682.     if test "$mh_lib_found" = yes; then
  1683.         MHLEXLIB="-l$mh_lib"
  1684.         break
  1685.     fi
  1686. done
  1687. if test "$MHLEXLIB" = ""; then
  1688.     { echo "configure: error: Cannot find a library that contains yywrap; unable to build THE with Regina" 1>&2; exit 1; }
  1689. fi
  1690.  
  1691.     MH_EXTRA_LIBS="${MH_EXTRA_LIBS} ${MHLEXLIB}"
  1692. fi
  1693.  
  1694.  
  1695. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1696. echo "configure:1697: checking for ANSI C header files" >&5
  1697. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1698.   echo $ac_n "(cached) $ac_c" 1>&6
  1699. else
  1700.   cat > conftest.$ac_ext <<EOF
  1701. #line 1702 "configure"
  1702. #include "confdefs.h"
  1703. #include <stdlib.h>
  1704. #include <stdarg.h>
  1705. #include <string.h>
  1706. #include <float.h>
  1707. EOF
  1708. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1709. { (eval echo configure:1710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1710. ac_err=`grep -v '^ *+' conftest.out`
  1711. if test -z "$ac_err"; then
  1712.   rm -rf conftest*
  1713.   ac_cv_header_stdc=yes
  1714. else
  1715.   echo "$ac_err" >&5
  1716.   echo "configure: failed program was:" >&5
  1717.   cat conftest.$ac_ext >&5
  1718.   rm -rf conftest*
  1719.   ac_cv_header_stdc=no
  1720. fi
  1721. rm -f conftest*
  1722.  
  1723. if test $ac_cv_header_stdc = yes; then
  1724.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1725. cat > conftest.$ac_ext <<EOF
  1726. #line 1727 "configure"
  1727. #include "confdefs.h"
  1728. #include <string.h>
  1729. EOF
  1730. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1731.   egrep "memchr" >/dev/null 2>&1; then
  1732.   :
  1733. else
  1734.   rm -rf conftest*
  1735.   ac_cv_header_stdc=no
  1736. fi
  1737. rm -f conftest*
  1738.  
  1739. fi
  1740.  
  1741. if test $ac_cv_header_stdc = yes; then
  1742.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1743. cat > conftest.$ac_ext <<EOF
  1744. #line 1745 "configure"
  1745. #include "confdefs.h"
  1746. #include <stdlib.h>
  1747. EOF
  1748. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1749.   egrep "free" >/dev/null 2>&1; then
  1750.   :
  1751. else
  1752.   rm -rf conftest*
  1753.   ac_cv_header_stdc=no
  1754. fi
  1755. rm -f conftest*
  1756.  
  1757. fi
  1758.  
  1759. if test $ac_cv_header_stdc = yes; then
  1760.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1761. if test "$cross_compiling" = yes; then
  1762.   :
  1763. else
  1764.   cat > conftest.$ac_ext <<EOF
  1765. #line 1766 "configure"
  1766. #include "confdefs.h"
  1767. #include <ctype.h>
  1768. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1769. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1770. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1771. int main () { int i; for (i = 0; i < 256; i++)
  1772. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1773. exit (0); }
  1774.  
  1775. EOF
  1776. if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1777. then
  1778.   :
  1779. else
  1780.   echo "configure: failed program was:" >&5
  1781.   cat conftest.$ac_ext >&5
  1782.   rm -fr conftest*
  1783.   ac_cv_header_stdc=no
  1784. fi
  1785. rm -fr conftest*
  1786. fi
  1787.  
  1788. fi
  1789. fi
  1790.  
  1791. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1792. if test $ac_cv_header_stdc = yes; then
  1793.   cat >> confdefs.h <<\EOF
  1794. #define STDC_HEADERS 1
  1795. EOF
  1796.  
  1797. fi
  1798.  
  1799. for ac_hdr in \
  1800.     ctype.h \
  1801.     sys/types.h \
  1802.     sys/mode.h \
  1803.     sys/stat.h \
  1804.     sys/file.h \
  1805.     sys/wait.h \
  1806.     sys/acl.h \
  1807.     unistd.h \
  1808.     stdlib.h \
  1809.     memory.h \
  1810.     fcntl.h \
  1811.     string.h \
  1812.     stdarg.h \
  1813.     stat.h \
  1814.     dirent.h \
  1815.     time.h \
  1816.     linux/stat.h \
  1817.     
  1818. do
  1819. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1820. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1821. echo "configure:1822: checking for $ac_hdr" >&5
  1822. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1823.   echo $ac_n "(cached) $ac_c" 1>&6
  1824. else
  1825.   cat > conftest.$ac_ext <<EOF
  1826. #line 1827 "configure"
  1827. #include "confdefs.h"
  1828. #include <$ac_hdr>
  1829. EOF
  1830. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1831. { (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1832. ac_err=`grep -v '^ *+' conftest.out`
  1833. if test -z "$ac_err"; then
  1834.   rm -rf conftest*
  1835.   eval "ac_cv_header_$ac_safe=yes"
  1836. else
  1837.   echo "$ac_err" >&5
  1838.   echo "configure: failed program was:" >&5
  1839.   cat conftest.$ac_ext >&5
  1840.   rm -rf conftest*
  1841.   eval "ac_cv_header_$ac_safe=no"
  1842. fi
  1843. rm -f conftest*
  1844. fi
  1845. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1846.   echo "$ac_t""yes" 1>&6
  1847.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1848.   cat >> confdefs.h <<EOF
  1849. #define $ac_tr_hdr 1
  1850. EOF
  1851.  
  1852. else
  1853.   echo "$ac_t""no" 1>&6
  1854. fi
  1855. done
  1856.  
  1857.  
  1858.  
  1859. echo $ac_n "checking if compiler supports ANSI prototypes""... $ac_c" 1>&6
  1860. echo "configure:1861: checking if compiler supports ANSI prototypes" >&5
  1861. ac_compile='$ac_cv_prog_CC conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
  1862. cat > conftest.$ac_ext <<EOF
  1863. #line 1864 "configure"
  1864. #include "confdefs.h"
  1865. #include <stdio.h>
  1866. int main() {
  1867. extern int xxx(int, char *);
  1868. ; return 0; }
  1869. EOF
  1870. if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1871.   rm -rf conftest*
  1872.   mh_have_proto=yes; cat >> confdefs.h <<\EOF
  1873. #define HAVE_PROTO 1
  1874. EOF
  1875.  
  1876. else
  1877.   echo "configure: failed program was:" >&5
  1878.   cat conftest.$ac_ext >&5
  1879.   rm -rf conftest*
  1880.   mh_have_proto=no 
  1881. fi
  1882. rm -f conftest*
  1883. echo "$ac_t""$mh_have_proto" 1>&6
  1884.  
  1885.  
  1886. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1887. echo "configure:1888: checking for working const" >&5
  1888. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1889.   echo $ac_n "(cached) $ac_c" 1>&6
  1890. else
  1891.   cat > conftest.$ac_ext <<EOF
  1892. #line 1893 "configure"
  1893. #include "confdefs.h"
  1894.  
  1895. int main() {
  1896.  
  1897. /* Ultrix mips cc rejects this.  */
  1898. typedef int charset[2]; const charset x;
  1899. /* SunOS 4.1.1 cc rejects this.  */
  1900. char const *const *ccp;
  1901. char **p;
  1902. /* NEC SVR4.0.2 mips cc rejects this.  */
  1903. struct point {int x, y;};
  1904. static struct point const zero = {0,0};
  1905. /* AIX XL C 1.02.0.0 rejects this.
  1906.    It does not let you subtract one const X* pointer from another in an arm
  1907.    of an if-expression whose if-part is not a constant expression */
  1908. const char *g = "string";
  1909. ccp = &g + (g ? g-g : 0);
  1910. /* HPUX 7.0 cc rejects these. */
  1911. ++ccp;
  1912. p = (char**) ccp;
  1913. ccp = (char const *const *) p;
  1914. { /* SCO 3.2v4 cc rejects this.  */
  1915.   char *t;
  1916.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1917.  
  1918.   *t++ = 0;
  1919. }
  1920. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1921.   int x[] = {25, 17};
  1922.   const int *foo = &x[0];
  1923.   ++foo;
  1924. }
  1925. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1926.   typedef const int *iptr;
  1927.   iptr p = 0;
  1928.   ++p;
  1929. }
  1930. { /* AIX XL C 1.02.0.0 rejects this saying
  1931.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1932.   struct s { int j; const int *ap[3]; };
  1933.   struct s *b; b->j = 5;
  1934. }
  1935. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1936.   const int foo = 10;
  1937. }
  1938.  
  1939. ; return 0; }
  1940. EOF
  1941. if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1942.   rm -rf conftest*
  1943.   ac_cv_c_const=yes
  1944. else
  1945.   echo "configure: failed program was:" >&5
  1946.   cat conftest.$ac_ext >&5
  1947.   rm -rf conftest*
  1948.   ac_cv_c_const=no
  1949. fi
  1950. rm -f conftest*
  1951. fi
  1952.  
  1953. echo "$ac_t""$ac_cv_c_const" 1>&6
  1954. if test $ac_cv_c_const = no; then
  1955.   cat >> confdefs.h <<\EOF
  1956. #define const 
  1957. EOF
  1958.  
  1959. fi
  1960.  
  1961. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1962. echo "configure:1963: checking for size_t" >&5
  1963. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1964.   echo $ac_n "(cached) $ac_c" 1>&6
  1965. else
  1966.   cat > conftest.$ac_ext <<EOF
  1967. #line 1968 "configure"
  1968. #include "confdefs.h"
  1969. #include <sys/types.h>
  1970. #if STDC_HEADERS
  1971. #include <stdlib.h>
  1972. #include <stddef.h>
  1973. #endif
  1974. EOF
  1975. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1976.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1977.   rm -rf conftest*
  1978.   ac_cv_type_size_t=yes
  1979. else
  1980.   rm -rf conftest*
  1981.   ac_cv_type_size_t=no
  1982. fi
  1983. rm -f conftest*
  1984.  
  1985. fi
  1986. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1987. if test $ac_cv_type_size_t = no; then
  1988.   cat >> confdefs.h <<\EOF
  1989. #define size_t unsigned
  1990. EOF
  1991.  
  1992. fi
  1993.  
  1994. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1995. echo "configure:1996: checking whether time.h and sys/time.h may both be included" >&5
  1996. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1997.   echo $ac_n "(cached) $ac_c" 1>&6
  1998. else
  1999.   cat > conftest.$ac_ext <<EOF
  2000. #line 2001 "configure"
  2001. #include "confdefs.h"
  2002. #include <sys/types.h>
  2003. #include <sys/time.h>
  2004. #include <time.h>
  2005. int main() {
  2006. struct tm *tp;
  2007. ; return 0; }
  2008. EOF
  2009. if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2010.   rm -rf conftest*
  2011.   ac_cv_header_time=yes
  2012. else
  2013.   echo "configure: failed program was:" >&5
  2014.   cat conftest.$ac_ext >&5
  2015.   rm -rf conftest*
  2016.   ac_cv_header_time=no
  2017. fi
  2018. rm -f conftest*
  2019. fi
  2020.  
  2021. echo "$ac_t""$ac_cv_header_time" 1>&6
  2022. if test $ac_cv_header_time = yes; then
  2023.   cat >> confdefs.h <<\EOF
  2024. #define TIME_WITH_SYS_TIME 1
  2025. EOF
  2026.  
  2027. fi
  2028.  
  2029. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2030. echo "configure:2031: checking whether struct tm is in sys/time.h or time.h" >&5
  2031. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2032.   echo $ac_n "(cached) $ac_c" 1>&6
  2033. else
  2034.   cat > conftest.$ac_ext <<EOF
  2035. #line 2036 "configure"
  2036. #include "confdefs.h"
  2037. #include <sys/types.h>
  2038. #include <time.h>
  2039. int main() {
  2040. struct tm *tp; tp->tm_sec;
  2041. ; return 0; }
  2042. EOF
  2043. if { (eval echo configure:2044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2044.   rm -rf conftest*
  2045.   ac_cv_struct_tm=time.h
  2046. else
  2047.   echo "configure: failed program was:" >&5
  2048.   cat conftest.$ac_ext >&5
  2049.   rm -rf conftest*
  2050.   ac_cv_struct_tm=sys/time.h
  2051. fi
  2052. rm -f conftest*
  2053. fi
  2054.  
  2055. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2056. if test $ac_cv_struct_tm = sys/time.h; then
  2057.   cat >> confdefs.h <<\EOF
  2058. #define TM_IN_SYS_TIME 1
  2059. EOF
  2060.  
  2061. fi
  2062.  
  2063.  
  2064. echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  2065. echo "configure:2066: checking for 8-bit clean memcmp" >&5
  2066. if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  2067.   echo $ac_n "(cached) $ac_c" 1>&6
  2068. else
  2069.   if test "$cross_compiling" = yes; then
  2070.   ac_cv_func_memcmp_clean=no
  2071. else
  2072.   cat > conftest.$ac_ext <<EOF
  2073. #line 2074 "configure"
  2074. #include "confdefs.h"
  2075.  
  2076. main()
  2077. {
  2078.   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  2079.   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  2080. }
  2081.  
  2082. EOF
  2083. if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2084. then
  2085.   ac_cv_func_memcmp_clean=yes
  2086. else
  2087.   echo "configure: failed program was:" >&5
  2088.   cat conftest.$ac_ext >&5
  2089.   rm -fr conftest*
  2090.   ac_cv_func_memcmp_clean=no
  2091. fi
  2092. rm -fr conftest*
  2093. fi
  2094.  
  2095. fi
  2096.  
  2097. echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  2098. test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
  2099.  
  2100. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2101. echo "configure:2102: checking return type of signal handlers" >&5
  2102. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2103.   echo $ac_n "(cached) $ac_c" 1>&6
  2104. else
  2105.   cat > conftest.$ac_ext <<EOF
  2106. #line 2107 "configure"
  2107. #include "confdefs.h"
  2108. #include <sys/types.h>
  2109. #include <signal.h>
  2110. #ifdef signal
  2111. #undef signal
  2112. #endif
  2113. #ifdef __cplusplus
  2114. extern "C" void (*signal (int, void (*)(int)))(int);
  2115. #else
  2116. void (*signal ()) ();
  2117. #endif
  2118.  
  2119. int main() {
  2120. int i;
  2121. ; return 0; }
  2122. EOF
  2123. if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2124.   rm -rf conftest*
  2125.   ac_cv_type_signal=void
  2126. else
  2127.   echo "configure: failed program was:" >&5
  2128.   cat conftest.$ac_ext >&5
  2129.   rm -rf conftest*
  2130.   ac_cv_type_signal=int
  2131. fi
  2132. rm -f conftest*
  2133. fi
  2134.  
  2135. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2136. cat >> confdefs.h <<EOF
  2137. #define RETSIGTYPE $ac_cv_type_signal
  2138. EOF
  2139.  
  2140.  
  2141.  
  2142. mh_save_libs="$LIBS"
  2143. LIBS="$LIBS -ls"
  2144. mh_save_cflags="$CFLAGS"
  2145. CFLAGS="$CFLAGS -D_ALL_SOURCE"
  2146. echo $ac_n "checking for function acl_get""... $ac_c" 1>&6
  2147. echo "configure:2148: checking for function acl_get" >&5
  2148. if eval "test \"`echo '$''{'mh_cv_func_acl_get'+set}'`\" = set"; then
  2149.   echo $ac_n "(cached) $ac_c" 1>&6
  2150. else
  2151.   
  2152.     cat > conftest.$ac_ext <<EOF
  2153. #line 2154 "configure"
  2154. #include "confdefs.h"
  2155. #include <sys/acl.h>
  2156. int main() {
  2157. char *ptr=(char *)acl_get("XXX")
  2158. ; return 0; }
  2159. EOF
  2160. if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2161.   rm -rf conftest*
  2162.   mh_cv_func_acl_get=yes
  2163. else
  2164.   echo "configure: failed program was:" >&5
  2165.   cat conftest.$ac_ext >&5
  2166.   rm -rf conftest*
  2167.   mh_cv_func_acl_get=no
  2168.     
  2169. fi
  2170. rm -f conftest*
  2171.  
  2172. fi
  2173. LIBS="$mh_save_libs"
  2174. CFLAGS="$mh_save_cflags"
  2175. echo "$ac_t""$mh_cv_func_acl_get" 1>&6
  2176. if test "$mh_cv_func_acl_get" = yes ; then
  2177.     cat >> confdefs.h <<\EOF
  2178. #define HAVE_ACL_GET 1
  2179. EOF
  2180.  
  2181. #    MH_EXTRA_LIBS="-ls"
  2182. #    AC_SUBST(MH_EXTRA_LIBS)
  2183. fi
  2184.  
  2185. for ac_func in rename getopt lstat readlink getacl chown
  2186. do
  2187. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2188. echo "configure:2189: checking for $ac_func" >&5
  2189. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2190.   echo $ac_n "(cached) $ac_c" 1>&6
  2191. else
  2192.   cat > conftest.$ac_ext <<EOF
  2193. #line 2194 "configure"
  2194. #include "confdefs.h"
  2195. /* System header to define __stub macros and hopefully few prototypes,
  2196.     which can conflict with char $ac_func(); below.  */
  2197. #include <assert.h>
  2198. /* Override any gcc2 internal prototype to avoid an error.  */
  2199. /* We use char because int might match the return type of a gcc2
  2200.     builtin and then its argument prototype would still apply.  */
  2201. char $ac_func();
  2202.  
  2203. int main() {
  2204.  
  2205. /* The GNU C library defines this for functions which it implements
  2206.     to always fail with ENOSYS.  Some functions are actually named
  2207.     something starting with __ and the normal name is an alias.  */
  2208. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2209. choke me
  2210. #else
  2211. $ac_func();
  2212. #endif
  2213.  
  2214. ; return 0; }
  2215. EOF
  2216. if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2217.   rm -rf conftest*
  2218.   eval "ac_cv_func_$ac_func=yes"
  2219. else
  2220.   echo "configure: failed program was:" >&5
  2221.   cat conftest.$ac_ext >&5
  2222.   rm -rf conftest*
  2223.   eval "ac_cv_func_$ac_func=no"
  2224. fi
  2225. rm -f conftest*
  2226. fi
  2227.  
  2228. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2229.   echo "$ac_t""yes" 1>&6
  2230.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2231.   cat >> confdefs.h <<EOF
  2232. #define $ac_tr_func 1
  2233. EOF
  2234.  
  2235. else
  2236.   echo "$ac_t""no" 1>&6
  2237. fi
  2238. done
  2239.  
  2240. if test "$ac_cv_func_getopt_func" = no; then
  2241.     MH_XTRA_OBJS="$MH_XTRA_OBJS getopt.o"
  2242. fi
  2243.  
  2244.  
  2245. mh_save_libs="$LIBS"
  2246. mh_save_cflags="$CFLAGS"
  2247.  
  2248. cat > xxxxx.h <<EOF
  2249. #ifdef XCURSES
  2250.     char *XCursesProgramName="test";
  2251. #endif
  2252. EOF
  2253. for incfile in $mh_pre_curses_h_include ; do
  2254.     echo "#include <$incfile.h>" >> xxxxx.h
  2255. done
  2256.  
  2257. if test "$curses_l" = "xcurses"; then
  2258.     CFLAGS="-DXCURSES $MH_CURSES_INC"
  2259.     LIBS="$LIBS $MH_CURSES_LIB $MH_XLIBS"
  2260. else
  2261.     CFLAGS="$MH_CURSES_INC"
  2262.     LIBS="$LIBS $MH_CURSES_LIB"
  2263. fi
  2264.  
  2265. echo $ac_n "checking if $curses_h defines "chtype"""... $ac_c" 1>&6
  2266. echo "configure:2267: checking if $curses_h defines "chtype"" >&5
  2267. cat > conftest.$ac_ext <<EOF
  2268. #line 2269 "configure"
  2269. #include "confdefs.h"
  2270. #include "xxxxx.h"
  2271. #include <$curses_h>
  2272. int main() {
  2273. chtype xxx
  2274. ; return 0; }
  2275. EOF
  2276. if { (eval echo configure:2277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2277.   rm -rf conftest*
  2278.   mh_have_chtype=yes
  2279. else
  2280.   echo "configure: failed program was:" >&5
  2281.   cat conftest.$ac_ext >&5
  2282.   rm -rf conftest*
  2283.   mh_have_chtype=no;cat >> confdefs.h <<\EOF
  2284. #define chtype int
  2285. EOF
  2286.  
  2287.  
  2288. fi
  2289. rm -f conftest*
  2290. rm -f xxxxx.h
  2291. echo "$ac_t""$mh_have_chtype" 1>&6
  2292. LIBS="$mh_save_libs"
  2293. CFLAGS="$mh_save_cflags"
  2294.  
  2295.  
  2296. echo $ac_n "checking if $curses_l is a broken SYSVR4 curses""... $ac_c" 1>&6
  2297. echo "configure:2298: checking if $curses_l is a broken SYSVR4 curses" >&5
  2298. case "$target" in
  2299.     *solaris2.5*)
  2300.         if test "$curses_l" = "curses" ; then
  2301.             mh_broken_sysvr4_curses=yes
  2302.         else
  2303.             mh_broken_sysvr4_curses=no
  2304.         fi
  2305.         ;;
  2306.     *solaris2.6*)
  2307.         if test "$curses_l" = "curses" ; then
  2308.             mh_broken_sysvr4_curses=yes
  2309.         else
  2310.             mh_broken_sysvr4_curses=no
  2311.         fi
  2312.         ;;
  2313.     *)mh_broken_sysvr4_curses=no
  2314. esac
  2315. if test "$mh_broken_sysvr4_curses" = yes ; then
  2316.     cat >> confdefs.h <<\EOF
  2317. #define HAVE_BROKEN_SYSVR4_CURSES 1
  2318. EOF
  2319.  
  2320. fi
  2321. echo "$ac_t""$mh_broken_sysvr4_curses" 1>&6
  2322.  
  2323.  
  2324. cat > xxxxx.h <<EOF
  2325. #ifdef XCURSES
  2326.     char *XCursesProgramName="test";
  2327. #endif
  2328. EOF
  2329. for incfile in $mh_pre_curses_h_include ; do
  2330.     echo "#include <$incfile.h>" >> xxxxx.h
  2331. done
  2332.  
  2333. mh_save_libs="$LIBS"
  2334. mh_save_cflags="$CFLAGS"
  2335.  
  2336. if test "$curses_l" = "XCurses"; then
  2337.     CFLAGS="-DXCURSES $MH_CURSES_INC"
  2338.     LIBS="$LIBS $MH_CURSES_LIB $MH_XLIBS"
  2339. else
  2340.     CFLAGS="$MH_CURSES_INC"
  2341.     LIBS="$LIBS $MH_CURSES_LIB"
  2342. fi
  2343.  
  2344. echo $ac_n "checking for System V curses""... $ac_c" 1>&6
  2345. echo "configure:2346: checking for System V curses" >&5
  2346. if eval "test \"`echo '$''{'mh_cv_sysv_curses'+set}'`\" = set"; then
  2347.   echo $ac_n "(cached) $ac_c" 1>&6
  2348. else
  2349.   
  2350. cat > conftest.$ac_ext <<EOF
  2351. #line 2352 "configure"
  2352. #include "confdefs.h"
  2353. #include "xxxxx.h"
  2354. #include <$curses_h>
  2355. int main() {
  2356. long xxx=(long)A_NORMAL
  2357. ; return 0; }
  2358. EOF
  2359. if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2360.   rm -rf conftest*
  2361.   mh_cv_sysv_curses=yes
  2362. else
  2363.   echo "configure: failed program was:" >&5
  2364.   cat conftest.$ac_ext >&5
  2365.   rm -rf conftest*
  2366.   mh_cv_sysv_curses=no
  2367.  
  2368. fi
  2369. rm -f conftest*
  2370.  
  2371. fi
  2372. echo "$ac_t""$mh_cv_sysv_curses" 1>&6
  2373. if test "$mh_cv_sysv_curses" = no ; then
  2374.     cat >> confdefs.h <<\EOF
  2375. #define HAVE_BSD_CURSES 1
  2376. EOF
  2377.  
  2378. fi
  2379.  
  2380. if test "$mh_cv_sysv_curses" = no ; then
  2381.     if test "$with_extcurses" = no ; then
  2382.         MH_CURSES_LIB="$MH_CURSES_LIB -ltermcap"
  2383.         LIBS="$LIBS -ltermcap"
  2384.     fi
  2385. fi
  2386.  
  2387. if test "$mh_cv_sysv_curses" = no ; then
  2388.     bsd_standouts="_STANDOUT __WSTANDOUT __STANDOUT"
  2389.     for sout in $bsd_standouts ; do
  2390. cat > conftest.$ac_ext <<EOF
  2391. #line 2392 "configure"
  2392. #include "confdefs.h"
  2393. #include <$curses_h>
  2394. int main() {
  2395. int xxx=$sout
  2396. ; return 0; }
  2397. EOF
  2398. if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2399.   rm -rf conftest*
  2400.   mh_bsd_sout=yes
  2401. else
  2402.   echo "configure: failed program was:" >&5
  2403.   cat conftest.$ac_ext >&5
  2404.   rm -rf conftest*
  2405.   mh_bsd_sout=no
  2406.     
  2407. fi
  2408. rm -f conftest*
  2409.         if test "$mh_bsd_sout" = yes ; then
  2410.             cat >> confdefs.h <<EOF
  2411. #define BSD_STANDOUT $sout
  2412. EOF
  2413.  
  2414.             break 2
  2415.         fi
  2416.     done
  2417. fi
  2418.  
  2419. echo $ac_n "checking for wattrset in $curses_l library""... $ac_c" 1>&6
  2420. echo "configure:2421: checking for wattrset in $curses_l library" >&5
  2421. if eval "test \"`echo '$''{'mh_cv_func_wattrset'+set}'`\" = set"; then
  2422.   echo $ac_n "(cached) $ac_c" 1>&6
  2423. else
  2424.   
  2425.     cat > conftest.$ac_ext <<EOF
  2426. #line 2427 "configure"
  2427. #include "confdefs.h"
  2428. #include "xxxxx.h"
  2429. #include <$curses_h>
  2430. int main() {
  2431. wattrset(stdscr,0)
  2432. ; return 0; }
  2433. EOF
  2434. if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2435.   rm -rf conftest*
  2436.   mh_cv_func_wattrset=yes
  2437. else
  2438.   echo "configure: failed program was:" >&5
  2439.   cat conftest.$ac_ext >&5
  2440.   rm -rf conftest*
  2441.   mh_cv_func_wattrset=no
  2442.     
  2443. fi
  2444. rm -f conftest*
  2445.  
  2446. fi
  2447. echo "$ac_t""$mh_cv_func_wattrset" 1>&6
  2448. if test "$mh_cv_func_wattrset" = yes ; then
  2449.     cat >> confdefs.h <<\EOF
  2450. #define HAVE_WATTRSET 1
  2451. EOF
  2452.  
  2453. fi
  2454.  
  2455. echo $ac_n "checking for keypad in $curses_l library""... $ac_c" 1>&6
  2456. echo "configure:2457: checking for keypad in $curses_l library" >&5
  2457. if eval "test \"`echo '$''{'mh_cv_func_keypad'+set}'`\" = set"; then
  2458.   echo $ac_n "(cached) $ac_c" 1>&6
  2459. else
  2460.   
  2461.     cat > conftest.$ac_ext <<EOF
  2462. #line 2463 "configure"
  2463. #include "confdefs.h"
  2464. #include "xxxxx.h"
  2465. #include <$curses_h>
  2466. int main() {
  2467. keypad(stdscr,TRUE)
  2468. ; return 0; }
  2469. EOF
  2470. if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2471.   rm -rf conftest*
  2472.   mh_cv_func_keypad=yes
  2473. else
  2474.   echo "configure: failed program was:" >&5
  2475.   cat conftest.$ac_ext >&5
  2476.   rm -rf conftest*
  2477.   mh_cv_func_keypad=no
  2478.     
  2479. fi
  2480. rm -f conftest*
  2481.  
  2482. fi
  2483. echo "$ac_t""$mh_cv_func_keypad" 1>&6
  2484. if test "$mh_cv_func_keypad" = yes ; then
  2485.     cat >> confdefs.h <<\EOF
  2486. #define HAVE_KEYPAD 1
  2487. EOF
  2488.  
  2489. fi
  2490.  
  2491. echo $ac_n "checking for beep in $curses_l library""... $ac_c" 1>&6
  2492. echo "configure:2493: checking for beep in $curses_l library" >&5
  2493. if eval "test \"`echo '$''{'mh_cv_func_beep'+set}'`\" = set"; then
  2494.   echo $ac_n "(cached) $ac_c" 1>&6
  2495. else
  2496.   
  2497.     cat > conftest.$ac_ext <<EOF
  2498. #line 2499 "configure"
  2499. #include "confdefs.h"
  2500. #include "xxxxx.h"
  2501. #include <$curses_h>
  2502. int main() {
  2503. beep()
  2504. ; return 0; }
  2505. EOF
  2506. if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2507.   rm -rf conftest*
  2508.   mh_cv_func_beep=yes
  2509. else
  2510.   echo "configure: failed program was:" >&5
  2511.   cat conftest.$ac_ext >&5
  2512.   rm -rf conftest*
  2513.   mh_cv_func_beep=no
  2514.     
  2515. fi
  2516. rm -f conftest*
  2517.  
  2518. fi
  2519. echo "$ac_t""$mh_cv_func_beep" 1>&6
  2520. if test "$mh_cv_func_beep" = yes ; then
  2521.     cat >> confdefs.h <<\EOF
  2522. #define HAVE_BEEP 1
  2523. EOF
  2524.  
  2525. fi
  2526.  
  2527. echo $ac_n "checking for curs_set in $curses_l library""... $ac_c" 1>&6
  2528. echo "configure:2529: checking for curs_set in $curses_l library" >&5
  2529. if eval "test \"`echo '$''{'mh_cv_func_curs_set'+set}'`\" = set"; then
  2530.   echo $ac_n "(cached) $ac_c" 1>&6
  2531. else
  2532.   
  2533.     cat > conftest.$ac_ext <<EOF
  2534. #line 2535 "configure"
  2535. #include "confdefs.h"
  2536. #include "xxxxx.h"
  2537. #include <$curses_h>
  2538. int main() {
  2539. curs_set(0)
  2540. ; return 0; }
  2541. EOF
  2542. if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2543.   rm -rf conftest*
  2544.   mh_cv_func_curs_set=yes
  2545. else
  2546.   echo "configure: failed program was:" >&5
  2547.   cat conftest.$ac_ext >&5
  2548.   rm -rf conftest*
  2549.   mh_cv_func_curs_set=no
  2550.     
  2551. fi
  2552. rm -f conftest*
  2553.  
  2554. fi
  2555. echo "$ac_t""$mh_cv_func_curs_set" 1>&6
  2556. if test "$mh_cv_func_curs_set" = yes ; then
  2557.     cat >> confdefs.h <<\EOF
  2558. #define HAVE_CURS_SET 1
  2559. EOF
  2560.  
  2561. fi
  2562.  
  2563. echo $ac_n "checking for touchline in $curses_l library""... $ac_c" 1>&6
  2564. echo "configure:2565: checking for touchline in $curses_l library" >&5
  2565. if eval "test \"`echo '$''{'mh_cv_func_touchline'+set}'`\" = set"; then
  2566.   echo $ac_n "(cached) $ac_c" 1>&6
  2567. else
  2568.   
  2569.     cat > conftest.$ac_ext <<EOF
  2570. #line 2571 "configure"
  2571. #include "confdefs.h"
  2572. #include "xxxxx.h"
  2573. #include <$curses_h>
  2574. int main() {
  2575. touchline(stdscr,1,1)
  2576. ; return 0; }
  2577. EOF
  2578. if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2579.   rm -rf conftest*
  2580.   mh_cv_func_touchline=yes
  2581. else
  2582.   echo "configure: failed program was:" >&5
  2583.   cat conftest.$ac_ext >&5
  2584.   rm -rf conftest*
  2585.   mh_cv_func_touchline=no
  2586.     
  2587. fi
  2588. rm -f conftest*
  2589.  
  2590. fi
  2591. echo "$ac_t""$mh_cv_func_touchline" 1>&6
  2592. if test "$mh_cv_func_touchline" = yes ; then
  2593.     cat >> confdefs.h <<\EOF
  2594. #define HAVE_TOUCHLINE 1
  2595. EOF
  2596.  
  2597. fi
  2598.  
  2599. echo $ac_n "checking for typeahead in $curses_l library""... $ac_c" 1>&6
  2600. echo "configure:2601: checking for typeahead in $curses_l library" >&5
  2601. if eval "test \"`echo '$''{'mh_cv_func_typeahead'+set}'`\" = set"; then
  2602.   echo $ac_n "(cached) $ac_c" 1>&6
  2603. else
  2604.   
  2605.     cat > conftest.$ac_ext <<EOF
  2606. #line 2607 "configure"
  2607. #include "confdefs.h"
  2608. #include "xxxxx.h"
  2609. #include <$curses_h>
  2610. int main() {
  2611. typeahead(1)
  2612. ; return 0; }
  2613. EOF
  2614. if { (eval echo configure:2615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2615.   rm -rf conftest*
  2616.   mh_cv_func_typeahead=yes
  2617. else
  2618.   echo "configure: failed program was:" >&5
  2619.   cat conftest.$ac_ext >&5
  2620.   rm -rf conftest*
  2621.   mh_cv_func_typeahead=no
  2622.     
  2623. fi
  2624. rm -f conftest*
  2625.  
  2626. fi
  2627. echo "$ac_t""$mh_cv_func_typeahead" 1>&6
  2628. if test "$mh_cv_func_typeahead" = yes ; then
  2629.     cat >> confdefs.h <<\EOF
  2630. #define HAVE_TYPEAHEAD 1
  2631. EOF
  2632.  
  2633. fi
  2634.  
  2635. echo $ac_n "checking for notimeout in $curses_l library""... $ac_c" 1>&6
  2636. echo "configure:2637: checking for notimeout in $curses_l library" >&5
  2637. if eval "test \"`echo '$''{'mh_cv_func_notimeout'+set}'`\" = set"; then
  2638.   echo $ac_n "(cached) $ac_c" 1>&6
  2639. else
  2640.   
  2641.     cat > conftest.$ac_ext <<EOF
  2642. #line 2643 "configure"
  2643. #include "confdefs.h"
  2644. #include "xxxxx.h"
  2645. #include <$curses_h>
  2646. int main() {
  2647. notimeout(stdscr,TRUE)
  2648. ; return 0; }
  2649. EOF
  2650. if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2651.   rm -rf conftest*
  2652.   mh_cv_func_notimeout=yes
  2653. else
  2654.   echo "configure: failed program was:" >&5
  2655.   cat conftest.$ac_ext >&5
  2656.   rm -rf conftest*
  2657.   mh_cv_func_notimeout=no
  2658.     
  2659. fi
  2660. rm -f conftest*
  2661.  
  2662. fi
  2663. echo "$ac_t""$mh_cv_func_notimeout" 1>&6
  2664. if test "$mh_cv_func_notimeout" = yes ; then
  2665.     cat >> confdefs.h <<\EOF
  2666. #define HAVE_NOTIMEOUT 1
  2667. EOF
  2668.  
  2669. fi
  2670.  
  2671. echo $ac_n "checking for ungetch in $curses_l library""... $ac_c" 1>&6
  2672. echo "configure:2673: checking for ungetch in $curses_l library" >&5
  2673. if eval "test \"`echo '$''{'mh_cv_func_ungetch'+set}'`\" = set"; then
  2674.   echo $ac_n "(cached) $ac_c" 1>&6
  2675. else
  2676.   
  2677.     cat > conftest.$ac_ext <<EOF
  2678. #line 2679 "configure"
  2679. #include "confdefs.h"
  2680. #include "xxxxx.h"
  2681. #include <$curses_h>
  2682. int main() {
  2683. ungetch(10)
  2684. ; return 0; }
  2685. EOF
  2686. if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2687.   rm -rf conftest*
  2688.   mh_cv_func_ungetch=yes
  2689. else
  2690.   echo "configure: failed program was:" >&5
  2691.   cat conftest.$ac_ext >&5
  2692.   rm -rf conftest*
  2693.   mh_cv_func_ungetch=no
  2694.     
  2695. fi
  2696. rm -f conftest*
  2697.  
  2698. fi
  2699. echo "$ac_t""$mh_cv_func_ungetch" 1>&6
  2700. if test "$mh_cv_func_ungetch" = yes ; then
  2701.     cat >> confdefs.h <<\EOF
  2702. #define HAVE_UNGETCH 1
  2703. EOF
  2704.  
  2705. fi
  2706.  
  2707. echo $ac_n "checking for nodelay in $curses_l library""... $ac_c" 1>&6
  2708. echo "configure:2709: checking for nodelay in $curses_l library" >&5
  2709. if eval "test \"`echo '$''{'mh_cv_func_nodelay'+set}'`\" = set"; then
  2710.   echo $ac_n "(cached) $ac_c" 1>&6
  2711. else
  2712.   
  2713.     cat > conftest.$ac_ext <<EOF
  2714. #line 2715 "configure"
  2715. #include "confdefs.h"
  2716. #include "xxxxx.h"
  2717. #include <$curses_h>
  2718. int main() {
  2719. nodelay(stdscr,TRUE)
  2720. ; return 0; }
  2721. EOF
  2722. if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2723.   rm -rf conftest*
  2724.   mh_cv_func_nodelay=yes
  2725. else
  2726.   echo "configure: failed program was:" >&5
  2727.   cat conftest.$ac_ext >&5
  2728.   rm -rf conftest*
  2729.   mh_cv_func_nodelay=no
  2730.     
  2731. fi
  2732. rm -f conftest*
  2733.  
  2734. fi
  2735. echo "$ac_t""$mh_cv_func_nodelay" 1>&6
  2736. if test "$mh_cv_func_nodelay" = yes ; then
  2737.     cat >> confdefs.h <<\EOF
  2738. #define HAVE_NODELAY 1
  2739. EOF
  2740.  
  2741. fi
  2742.  
  2743. echo $ac_n "checking for raw in $curses_l library""... $ac_c" 1>&6
  2744. echo "configure:2745: checking for raw in $curses_l library" >&5
  2745. if eval "test \"`echo '$''{'mh_cv_func_raw'+set}'`\" = set"; then
  2746.   echo $ac_n "(cached) $ac_c" 1>&6
  2747. else
  2748.   
  2749.     cat > conftest.$ac_ext <<EOF
  2750. #line 2751 "configure"
  2751. #include "confdefs.h"
  2752. #include "xxxxx.h"
  2753. #include <$curses_h>
  2754. int main() {
  2755. raw()
  2756. ; return 0; }
  2757. EOF
  2758. if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2759.   rm -rf conftest*
  2760.   mh_cv_func_raw=yes
  2761. else
  2762.   echo "configure: failed program was:" >&5
  2763.   cat conftest.$ac_ext >&5
  2764.   rm -rf conftest*
  2765.   mh_cv_func_raw=no
  2766.     
  2767. fi
  2768. rm -f conftest*
  2769.  
  2770. fi
  2771. echo "$ac_t""$mh_cv_func_raw" 1>&6
  2772. if test "$mh_cv_func_raw" = yes ; then
  2773.     cat >> confdefs.h <<\EOF
  2774. #define HAVE_RAW 1
  2775. EOF
  2776.  
  2777. fi
  2778.  
  2779. echo $ac_n "checking for cbreak in $curses_l library""... $ac_c" 1>&6
  2780. echo "configure:2781: checking for cbreak in $curses_l library" >&5
  2781. if eval "test \"`echo '$''{'mh_cv_func_cbreak'+set}'`\" = set"; then
  2782.   echo $ac_n "(cached) $ac_c" 1>&6
  2783. else
  2784.   
  2785.     cat > conftest.$ac_ext <<EOF
  2786. #line 2787 "configure"
  2787. #include "confdefs.h"
  2788. #include "xxxxx.h"
  2789. #include <$curses_h>
  2790. int main() {
  2791. cbreak()
  2792. ; return 0; }
  2793. EOF
  2794. if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2795.   rm -rf conftest*
  2796.   mh_cv_func_cbreak=yes
  2797. else
  2798.   echo "configure: failed program was:" >&5
  2799.   cat conftest.$ac_ext >&5
  2800.   rm -rf conftest*
  2801.   mh_cv_func_cbreak=no
  2802.     
  2803. fi
  2804. rm -f conftest*
  2805.  
  2806. fi
  2807. echo "$ac_t""$mh_cv_func_cbreak" 1>&6
  2808. if test "$mh_cv_func_cbreak" = yes ; then
  2809.     cat >> confdefs.h <<\EOF
  2810. #define HAVE_CBREAK 1
  2811. EOF
  2812.  
  2813. fi
  2814.  
  2815. echo $ac_n "checking for nocbreak in $curses_l library""... $ac_c" 1>&6
  2816. echo "configure:2817: checking for nocbreak in $curses_l library" >&5
  2817. if eval "test \"`echo '$''{'mh_cv_func_nocbreak'+set}'`\" = set"; then
  2818.   echo $ac_n "(cached) $ac_c" 1>&6
  2819. else
  2820.   
  2821.     cat > conftest.$ac_ext <<EOF
  2822. #line 2823 "configure"
  2823. #include "confdefs.h"
  2824. #include "xxxxx.h"
  2825. #include <$curses_h>
  2826. int main() {
  2827. nocbreak()
  2828. ; return 0; }
  2829. EOF
  2830. if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2831.   rm -rf conftest*
  2832.   mh_cv_func_nocbreak=yes
  2833. else
  2834.   echo "configure: failed program was:" >&5
  2835.   cat conftest.$ac_ext >&5
  2836.   rm -rf conftest*
  2837.   mh_cv_func_nocbreak=no
  2838.     
  2839. fi
  2840. rm -f conftest*
  2841.  
  2842. fi
  2843. echo "$ac_t""$mh_cv_func_nocbreak" 1>&6
  2844. if test "$mh_cv_func_nocbreak" = yes ; then
  2845.     cat >> confdefs.h <<\EOF
  2846. #define HAVE_NOCBREAK 1
  2847. EOF
  2848.  
  2849. fi
  2850.  
  2851. echo $ac_n "checking for wnoutrefresh in $curses_l library""... $ac_c" 1>&6
  2852. echo "configure:2853: checking for wnoutrefresh in $curses_l library" >&5
  2853. if eval "test \"`echo '$''{'mh_cv_func_wnoutrefresh'+set}'`\" = set"; then
  2854.   echo $ac_n "(cached) $ac_c" 1>&6
  2855. else
  2856.   
  2857.     cat > conftest.$ac_ext <<EOF
  2858. #line 2859 "configure"
  2859. #include "confdefs.h"
  2860. #include "xxxxx.h"
  2861. #include <$curses_h>
  2862. int main() {
  2863. wnoutrefresh(stdscr)
  2864. ; return 0; }
  2865. EOF
  2866. if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2867.   rm -rf conftest*
  2868.   mh_cv_func_wnoutrefresh=yes
  2869. else
  2870.   echo "configure: failed program was:" >&5
  2871.   cat conftest.$ac_ext >&5
  2872.   rm -rf conftest*
  2873.   mh_cv_func_wnoutrefresh=no
  2874.     
  2875. fi
  2876. rm -f conftest*
  2877.  
  2878. fi
  2879. echo "$ac_t""$mh_cv_func_wnoutrefresh" 1>&6
  2880. if test "$mh_cv_func_wnoutrefresh" = yes ; then
  2881.     cat >> confdefs.h <<\EOF
  2882. #define HAVE_WNOUTREFRESH 1
  2883. EOF
  2884.  
  2885. fi
  2886.  
  2887. echo $ac_n "checking for doupdate in $curses_l library""... $ac_c" 1>&6
  2888. echo "configure:2889: checking for doupdate in $curses_l library" >&5
  2889. if eval "test \"`echo '$''{'mh_cv_func_doupdate'+set}'`\" = set"; then
  2890.   echo $ac_n "(cached) $ac_c" 1>&6
  2891. else
  2892.   
  2893.     cat > conftest.$ac_ext <<EOF
  2894. #line 2895 "configure"
  2895. #include "confdefs.h"
  2896. #include "xxxxx.h"
  2897. #include <$curses_h>
  2898. int main() {
  2899. doupdate()
  2900. ; return 0; }
  2901. EOF
  2902. if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2903.   rm -rf conftest*
  2904.   mh_cv_func_doupdate=yes
  2905. else
  2906.   echo "configure: failed program was:" >&5
  2907.   cat conftest.$ac_ext >&5
  2908.   rm -rf conftest*
  2909.   mh_cv_func_doupdate=no
  2910.     
  2911. fi
  2912. rm -f conftest*
  2913.  
  2914. fi
  2915. echo "$ac_t""$mh_cv_func_doupdate" 1>&6
  2916. if test "$mh_cv_func_doupdate" = yes ; then
  2917.     cat >> confdefs.h <<\EOF
  2918. #define HAVE_DOUPDATE 1
  2919. EOF
  2920.  
  2921. fi
  2922.  
  2923. echo $ac_n "checking for reset_shell_mode in $curses_l library""... $ac_c" 1>&6
  2924. echo "configure:2925: checking for reset_shell_mode in $curses_l library" >&5
  2925. if eval "test \"`echo '$''{'mh_cv_func_reset_shell_mode'+set}'`\" = set"; then
  2926.   echo $ac_n "(cached) $ac_c" 1>&6
  2927. else
  2928.   
  2929.     cat > conftest.$ac_ext <<EOF
  2930. #line 2931 "configure"
  2931. #include "confdefs.h"
  2932. #include "xxxxx.h"
  2933. #include <$curses_h>
  2934. int main() {
  2935. reset_shell_mode()
  2936. ; return 0; }
  2937. EOF
  2938. if { (eval echo configure:2939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2939.   rm -rf conftest*
  2940.   mh_cv_func_reset_shell_mode=yes
  2941. else
  2942.   echo "configure: failed program was:" >&5
  2943.   cat conftest.$ac_ext >&5
  2944.   rm -rf conftest*
  2945.   mh_cv_func_reset_shell_mode=no
  2946.     
  2947. fi
  2948. rm -f conftest*
  2949.  
  2950. fi
  2951. echo "$ac_t""$mh_cv_func_reset_shell_mode" 1>&6
  2952. if test "$mh_cv_func_reset_shell_mode" = yes ; then
  2953.     cat >> confdefs.h <<\EOF
  2954. #define HAVE_RESET_SHELL_MODE 1
  2955. EOF
  2956.  
  2957. fi
  2958.  
  2959. echo $ac_n "checking for reset_prog_mode in $curses_l library""... $ac_c" 1>&6
  2960. echo "configure:2961: checking for reset_prog_mode in $curses_l library" >&5
  2961. if eval "test \"`echo '$''{'mh_cv_func_reset_prog_mode'+set}'`\" = set"; then
  2962.   echo $ac_n "(cached) $ac_c" 1>&6
  2963. else
  2964.   
  2965.     cat > conftest.$ac_ext <<EOF
  2966. #line 2967 "configure"
  2967. #include "confdefs.h"
  2968. #include "xxxxx.h"
  2969. #include <$curses_h>
  2970. int main() {
  2971. reset_prog_mode()
  2972. ; return 0; }
  2973. EOF
  2974. if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2975.   rm -rf conftest*
  2976.   mh_cv_func_reset_prog_mode=yes
  2977. else
  2978.   echo "configure: failed program was:" >&5
  2979.   cat conftest.$ac_ext >&5
  2980.   rm -rf conftest*
  2981.   mh_cv_func_reset_prog_mode=no
  2982.     
  2983. fi
  2984. rm -f conftest*
  2985.  
  2986. fi
  2987. echo "$ac_t""$mh_cv_func_reset_prog_mode" 1>&6
  2988. if test "$mh_cv_func_reset_prog_mode" = yes ; then
  2989.     cat >> confdefs.h <<\EOF
  2990. #define HAVE_RESET_PROG_MODE 1
  2991. EOF
  2992.  
  2993. fi
  2994.  
  2995. echo $ac_n "checking for slk_init in $curses_l library""... $ac_c" 1>&6
  2996. echo "configure:2997: checking for slk_init in $curses_l library" >&5
  2997. if eval "test \"`echo '$''{'mh_cv_func_slk_init'+set}'`\" = set"; then
  2998.   echo $ac_n "(cached) $ac_c" 1>&6
  2999. else
  3000.   
  3001.     cat > conftest.$ac_ext <<EOF
  3002. #line 3003 "configure"
  3003. #include "confdefs.h"
  3004. #include "xxxxx.h"
  3005. #include <$curses_h>
  3006. int main() {
  3007. slk_init(0)
  3008. ; return 0; }
  3009. EOF
  3010. if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3011.   rm -rf conftest*
  3012.   mh_cv_func_slk_init=yes
  3013. else
  3014.   echo "configure: failed program was:" >&5
  3015.   cat conftest.$ac_ext >&5
  3016.   rm -rf conftest*
  3017.   mh_cv_func_slk_init=no
  3018.     
  3019. fi
  3020. rm -f conftest*
  3021.  
  3022. fi
  3023. echo "$ac_t""$mh_cv_func_slk_init" 1>&6
  3024. if test "$mh_cv_func_slk_init" = yes ; then
  3025.     cat >> confdefs.h <<\EOF
  3026. #define HAVE_SLK_INIT 1
  3027. EOF
  3028.  
  3029. fi
  3030.  
  3031. echo $ac_n "checking for slk_attrset in $curses_l library""... $ac_c" 1>&6
  3032. echo "configure:3033: checking for slk_attrset in $curses_l library" >&5
  3033. if eval "test \"`echo '$''{'mh_cv_func_slk_attrset'+set}'`\" = set"; then
  3034.   echo $ac_n "(cached) $ac_c" 1>&6
  3035. else
  3036.   
  3037.     cat > conftest.$ac_ext <<EOF
  3038. #line 3039 "configure"
  3039. #include "confdefs.h"
  3040. #include "xxxxx.h"
  3041. #include <$curses_h>
  3042. int main() {
  3043. slk_attrset(0)
  3044. ; return 0; }
  3045. EOF
  3046. if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3047.   rm -rf conftest*
  3048.   mh_cv_func_slk_attrset=yes
  3049. else
  3050.   echo "configure: failed program was:" >&5
  3051.   cat conftest.$ac_ext >&5
  3052.   rm -rf conftest*
  3053.   mh_cv_func_slk_attrset=no
  3054.     
  3055. fi
  3056. rm -f conftest*
  3057.  
  3058. fi
  3059. echo "$ac_t""$mh_cv_func_slk_attrset" 1>&6
  3060. if test "$mh_cv_func_slk_attrset" = yes ; then
  3061.     cat >> confdefs.h <<\EOF
  3062. #define HAVE_SLK_INIT 1
  3063. EOF
  3064.  
  3065. fi
  3066.  
  3067. echo $ac_n "checking for sb_init in $curses_l library""... $ac_c" 1>&6
  3068. echo "configure:3069: checking for sb_init in $curses_l library" >&5
  3069. if eval "test \"`echo '$''{'mh_cv_func_sb_init'+set}'`\" = set"; then
  3070.   echo $ac_n "(cached) $ac_c" 1>&6
  3071. else
  3072.   
  3073.     cat > conftest.$ac_ext <<EOF
  3074. #line 3075 "configure"
  3075. #include "confdefs.h"
  3076. #include "xxxxx.h"
  3077. #include <$curses_h>
  3078. int main() {
  3079. sb_init()
  3080. ; return 0; }
  3081. EOF
  3082. if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3083.   rm -rf conftest*
  3084.   mh_cv_func_sb_init=yes
  3085. else
  3086.   echo "configure: failed program was:" >&5
  3087.   cat conftest.$ac_ext >&5
  3088.   rm -rf conftest*
  3089.   mh_cv_func_sb_init=no
  3090.     
  3091. fi
  3092. rm -f conftest*
  3093.  
  3094. fi
  3095. echo "$ac_t""$mh_cv_func_sb_init" 1>&6
  3096. if test "$mh_cv_func_sb_init" = yes ; then
  3097.     cat >> confdefs.h <<\EOF
  3098. #define HAVE_SB_INIT 1
  3099. EOF
  3100.  
  3101. fi
  3102.  
  3103. echo $ac_n "checking for resize_term in $curses_l library""... $ac_c" 1>&6
  3104. echo "configure:3105: checking for resize_term in $curses_l library" >&5
  3105. if eval "test \"`echo '$''{'mh_cv_func_resize_term'+set}'`\" = set"; then
  3106.   echo $ac_n "(cached) $ac_c" 1>&6
  3107. else
  3108.   
  3109.     cat > conftest.$ac_ext <<EOF
  3110. #line 3111 "configure"
  3111. #include "confdefs.h"
  3112. #include "xxxxx.h"
  3113. #include <$curses_h>
  3114. int main() {
  3115. resize_term(0,0)
  3116. ; return 0; }
  3117. EOF
  3118. if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3119.   rm -rf conftest*
  3120.   mh_cv_func_resize_term=yes
  3121. else
  3122.   echo "configure: failed program was:" >&5
  3123.   cat conftest.$ac_ext >&5
  3124.   rm -rf conftest*
  3125.   mh_cv_func_resize_term=no
  3126.     
  3127. fi
  3128. rm -f conftest*
  3129.  
  3130. fi
  3131. echo "$ac_t""$mh_cv_func_resize_term" 1>&6
  3132. if test "$mh_cv_func_resize_term" = yes ; then
  3133.     cat >> confdefs.h <<\EOF
  3134. #define HAVE_RESIZE_TERM 1
  3135. EOF
  3136.  
  3137. fi
  3138.  
  3139. echo $ac_n "checking for wvline in $curses_l library""... $ac_c" 1>&6
  3140. echo "configure:3141: checking for wvline in $curses_l library" >&5
  3141. if eval "test \"`echo '$''{'mh_cv_func_wvline'+set}'`\" = set"; then
  3142.   echo $ac_n "(cached) $ac_c" 1>&6
  3143. else
  3144.   
  3145.     cat > conftest.$ac_ext <<EOF
  3146. #line 3147 "configure"
  3147. #include "confdefs.h"
  3148. #include "xxxxx.h"
  3149. #include <$curses_h>
  3150. int main() {
  3151. wvline(stdscr,0,1)
  3152. ; return 0; }
  3153. EOF
  3154. if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3155.   rm -rf conftest*
  3156.   mh_cv_func_wvline=yes
  3157. else
  3158.   echo "configure: failed program was:" >&5
  3159.   cat conftest.$ac_ext >&5
  3160.   rm -rf conftest*
  3161.   mh_cv_func_wvline=no
  3162.     
  3163. fi
  3164. rm -f conftest*
  3165.  
  3166. fi
  3167. echo "$ac_t""$mh_cv_func_wvline" 1>&6
  3168. if test "$mh_cv_func_wvline" = yes ; then
  3169.     cat >> confdefs.h <<\EOF
  3170. #define HAVE_WVLINE 1
  3171. EOF
  3172.  
  3173. fi
  3174.  
  3175. rm -f xxxxx.h
  3176. LIBS="$mh_save_libs"
  3177. CFLAGS="$mh_save_cflags"
  3178.  
  3179.  
  3180. # Check whether --enable-debug or --disable-debug was given.
  3181. if test "${enable_debug+set}" = set; then
  3182.   enableval="$enable_debug"
  3183.   with_debug=$enableval
  3184. else
  3185.   with_debug=no
  3186. fi
  3187.  
  3188. cflags_g="`echo $CFLAGS | grep -c '\-g'`"
  3189. cflags_O="`echo $CFLAGS | grep -c '\-O'`"
  3190.  
  3191. if test "$with_debug" = yes; then
  3192.     if test "$cflags_g" = "0"; then
  3193.         CFLAGS="${CFLAGS} -g"
  3194.     fi
  3195.     if test "$cflags_O" != "0"; then
  3196.         CFLAGS="`echo ${CFLAGS} | sed -e s/-O.//`"
  3197.     fi
  3198. else
  3199.     if test "$cflags_O" = "0"; then
  3200.         CFLAGS="${CFLAGS} -O"
  3201.     fi
  3202.     if test "$cflags_g" != "0"; then
  3203.         CFLAGS="`echo ${CFLAGS} | sed -e s/-g//`"
  3204.     fi
  3205. fi
  3206.  
  3207. # Check whether --enable-trace or --disable-trace was given.
  3208. if test "${enable_trace+set}" = set; then
  3209.   enableval="$enable_trace"
  3210.   with_trace=$enableval;cat >> confdefs.h <<\EOF
  3211. #define TRACE 1
  3212. EOF
  3213.  
  3214. else
  3215.   with_trace=no
  3216.  
  3217. fi
  3218.  
  3219. if test "$with_trace" = yes; then
  3220.     MH_XTRA_OBJS="$MH_XTRA_OBJS trace.o"
  3221. fi
  3222.  
  3223.  
  3224. # Check whether --enable-purify or --disable-purify was given.
  3225. if test "${enable_purify+set}" = set; then
  3226.   enableval="$enable_purify"
  3227.   with_purify=$enableval
  3228. else
  3229.   with_purify=no
  3230. fi
  3231.  
  3232. if test "$with_purify" = yes; then
  3233.     PURIFY="purify"
  3234. else
  3235.     PURIFY=""
  3236. fi
  3237.  
  3238.  
  3239. # Check whether --with-xaw3d or --without-xaw3d was given.
  3240. if test "${with_xaw3d+set}" = set; then
  3241.   withval="$with_xaw3d"
  3242.   with_xaw3d=$withval
  3243. else
  3244.   with_xaw3d=no
  3245. fi
  3246.  
  3247.  
  3248. cat >> confdefs.h <<\EOF
  3249. #define UNIX 1
  3250. EOF
  3251.  
  3252.  
  3253. cat >> confdefs.h <<\EOF
  3254. #define BUILD2502 1
  3255. EOF
  3256.  
  3257.  
  3258.  
  3259. if test "$with_xcurses" = yes; then
  3260.     mh_xterm_found=no
  3261.     echo $ac_n "checking for location of xterm""... $ac_c" 1>&6
  3262. echo "configure:3263: checking for location of xterm" >&5
  3263.     mh_xterms="\
  3264.         /usr/X11R6/bin/xterm      \
  3265.         /usr/bin/X11R6/xterm      \
  3266.         /usr/X11R5/bin/xterm      \
  3267.         /usr/bin/X11R5/xterm      \
  3268.         /usr/X11/bin/xterm        \
  3269.         /usr/openwin/bin/xterm    \
  3270.         /usr/bin/X11/xterm        \
  3271.         /usr/local/bin/xterm      \
  3272.         /usr/contrib/bin/xterm"
  3273.     for sout in $mh_xterms ; do
  3274.         if test -x $sout ; then
  3275.                 mh_xterm_found=yes
  3276.             cat >> confdefs.h <<EOF
  3277. #define XTERM_PROGRAM "$sout"
  3278. EOF
  3279.  
  3280.             echo "$ac_t""found in $sout" 1>&6
  3281.             break 2
  3282.         fi
  3283.     done
  3284.     if test "$mh_xterm_found" = no ; then
  3285.         cat >> confdefs.h <<EOF
  3286. #define XTERM_PROGRAM "N/A"
  3287. EOF
  3288.  
  3289.         echo "$ac_t""not found. You will need to run SET XTERMINAL before invoking a shell command within THE" 1>&6
  3290.     fi
  3291. fi
  3292.  
  3293.  
  3294. # Find a good install program.  We prefer a C program (faster),
  3295. # so one script is as good as another.  But avoid the broken or
  3296. # incompatible versions:
  3297. # SysV /etc/install, /usr/sbin/install
  3298. # SunOS /usr/etc/install
  3299. # IRIX /sbin/install
  3300. # AIX /bin/install
  3301. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  3302. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  3303. # ./install, which can be erroneously created by make from ./install.sh.
  3304. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  3305. echo "configure:3306: checking for a BSD compatible install" >&5
  3306. if test -z "$INSTALL"; then
  3307. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  3308.   echo $ac_n "(cached) $ac_c" 1>&6
  3309. else
  3310.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  3311.   for ac_dir in $PATH; do
  3312.     # Account for people who put trailing slashes in PATH elements.
  3313.     case "$ac_dir/" in
  3314.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  3315.     *)
  3316.       # OSF1 and SCO ODT 3.0 have their own names for install.
  3317.       for ac_prog in ginstall installbsd scoinst install; do
  3318.         if test -f $ac_dir/$ac_prog; then
  3319.       if test $ac_prog = install &&
  3320.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  3321.         # AIX install.  It has an incompatible calling convention.
  3322.         # OSF/1 installbsd also uses dspmsg, but is usable.
  3323.         :
  3324.       else
  3325.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  3326.         break 2
  3327.       fi
  3328.     fi
  3329.       done
  3330.       ;;
  3331.     esac
  3332.   done
  3333.   IFS="$ac_save_IFS"
  3334.  
  3335. fi
  3336.   if test "${ac_cv_path_install+set}" = set; then
  3337.     INSTALL="$ac_cv_path_install"
  3338.   else
  3339.     # As a last resort, use the slow shell script.  We don't cache a
  3340.     # path for INSTALL within a source directory, because that will
  3341.     # break other packages using the cache if that directory is
  3342.     # removed, or if the path is relative.
  3343.     INSTALL="$ac_install_sh"
  3344.   fi
  3345. fi
  3346. echo "$ac_t""$INSTALL" 1>&6
  3347.  
  3348. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  3349. # It thinks the first close brace ends the variable substitution.
  3350. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  3351.  
  3352. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  3353.  
  3354.  
  3355. thisdir="`pwd`"
  3356.  
  3357.  
  3358. trap '' 1 2 15
  3359. cat > confcache <<\EOF
  3360. # This file is a shell script that caches the results of configure
  3361. # tests run on this system so they can be shared between configure
  3362. # scripts and configure runs.  It is not useful on other systems.
  3363. # If it contains results you don't want to keep, you may remove or edit it.
  3364. #
  3365. # By default, configure uses ./config.cache as the cache file,
  3366. # creating it if it does not exist already.  You can give configure
  3367. # the --cache-file=FILE option to use a different cache file; that is
  3368. # what configure does when it calls configure scripts in
  3369. # subdirectories, so they share the cache.
  3370. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3371. # config.status only pays attention to the cache file if you give it the
  3372. # --recheck option to rerun configure.
  3373. #
  3374. EOF
  3375. # The following way of writing the cache mishandles newlines in values,
  3376. # but we know of no workaround that is simple, portable, and efficient.
  3377. # So, don't put newlines in cache variables' values.
  3378. # Ultrix sh set writes to stderr and can't be redirected directly,
  3379. # and sets the high bit in the cache file unless we assign to the vars.
  3380. (set) 2>&1 |
  3381.   case `(ac_space=' '; set) 2>&1` in
  3382.   *ac_space=\ *)
  3383.     # `set' does not quote correctly, so add quotes (double-quote substitution
  3384.     # turns \\\\ into \\, and sed turns \\ into \).
  3385.     sed -n \
  3386.       -e "s/'/'\\\\''/g" \
  3387.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  3388.     ;;
  3389.   *)
  3390.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  3391.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  3392.     ;;
  3393.   esac >> confcache
  3394. if cmp -s $cache_file confcache; then
  3395.   :
  3396. else
  3397.   if test -w $cache_file; then
  3398.     echo "updating cache $cache_file"
  3399.     cat confcache > $cache_file
  3400.   else
  3401.     echo "not updating unwritable cache $cache_file"
  3402.   fi
  3403. fi
  3404. rm -f confcache
  3405.  
  3406. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3407.  
  3408. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3409. # Let make expand exec_prefix.
  3410. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3411.  
  3412. # Any assignment to VPATH causes Sun make to only execute
  3413. # the first set of double-colon rules, so remove it if not needed.
  3414. # If there is a colon in the path, we need to keep it.
  3415. if test "x$srcdir" = x.; then
  3416.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3417. fi
  3418.  
  3419. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3420.  
  3421. DEFS=-DHAVE_CONFIG_H
  3422.  
  3423. # Without the "./", some shells look in PATH for config.status.
  3424. : ${CONFIG_STATUS=./config.status}
  3425.  
  3426. echo creating $CONFIG_STATUS
  3427. rm -f $CONFIG_STATUS
  3428. cat > $CONFIG_STATUS <<EOF
  3429. #! /bin/sh
  3430. # Generated automatically by configure.
  3431. # Run this file to recreate the current configuration.
  3432. # This directory was configured as follows,
  3433. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3434. #
  3435. # $0 $ac_configure_args
  3436. #
  3437. # Compiler output produced by configure, useful for debugging
  3438. # configure, is in ./config.log if it exists.
  3439.  
  3440. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3441. for ac_option
  3442. do
  3443.   case "\$ac_option" in
  3444.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3445.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3446.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3447.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3448.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  3449.     exit 0 ;;
  3450.   -help | --help | --hel | --he | --h)
  3451.     echo "\$ac_cs_usage"; exit 0 ;;
  3452.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3453.   esac
  3454. done
  3455.  
  3456. ac_given_srcdir=$srcdir
  3457. ac_given_INSTALL="$INSTALL"
  3458.  
  3459. trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3460. EOF
  3461. cat >> $CONFIG_STATUS <<EOF
  3462.  
  3463. # Protect against being on the right side of a sed subst in config.status.
  3464. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3465.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3466. $ac_vpsub
  3467. $extrasub
  3468. s%@CFLAGS@%$CFLAGS%g
  3469. s%@CPPFLAGS@%$CPPFLAGS%g
  3470. s%@CXXFLAGS@%$CXXFLAGS%g
  3471. s%@DEFS@%$DEFS%g
  3472. s%@LDFLAGS@%$LDFLAGS%g
  3473. s%@LIBS@%$LIBS%g
  3474. s%@exec_prefix@%$exec_prefix%g
  3475. s%@prefix@%$prefix%g
  3476. s%@program_transform_name@%$program_transform_name%g
  3477. s%@bindir@%$bindir%g
  3478. s%@sbindir@%$sbindir%g
  3479. s%@libexecdir@%$libexecdir%g
  3480. s%@datadir@%$datadir%g
  3481. s%@sysconfdir@%$sysconfdir%g
  3482. s%@sharedstatedir@%$sharedstatedir%g
  3483. s%@localstatedir@%$localstatedir%g
  3484. s%@libdir@%$libdir%g
  3485. s%@includedir@%$includedir%g
  3486. s%@oldincludedir@%$oldincludedir%g
  3487. s%@infodir@%$infodir%g
  3488. s%@mandir@%$mandir%g
  3489. s%@CC@%$CC%g
  3490. s%@host@%$host%g
  3491. s%@host_alias@%$host_alias%g
  3492. s%@host_cpu@%$host_cpu%g
  3493. s%@host_vendor@%$host_vendor%g
  3494. s%@host_os@%$host_os%g
  3495. s%@target@%$target%g
  3496. s%@target_alias@%$target_alias%g
  3497. s%@target_cpu@%$target_cpu%g
  3498. s%@target_vendor@%$target_vendor%g
  3499. s%@target_os@%$target_os%g
  3500. s%@build@%$build%g
  3501. s%@build_alias@%$build_alias%g
  3502. s%@build_cpu@%$build_cpu%g
  3503. s%@build_vendor@%$build_vendor%g
  3504. s%@build_os@%$build_os%g
  3505. s%@CPP@%$CPP%g
  3506. s%@SYS_DEFS@%$SYS_DEFS%g
  3507. s%@MH_XLIBS@%$MH_XLIBS%g
  3508. s%@MH_CURSES_INC@%$MH_CURSES_INC%g
  3509. s%@MH_CURSES_LIB@%$MH_CURSES_LIB%g
  3510. s%@MH_REXX_INC@%$MH_REXX_INC%g
  3511. s%@MH_REXX_LIB@%$MH_REXX_LIB%g
  3512. s%@LN_S@%$LN_S%g
  3513. s%@SET_MAKE@%$SET_MAKE%g
  3514. s%@MH_EXTRA_LIBS@%$MH_EXTRA_LIBS%g
  3515. s%@LIBOBJS@%$LIBOBJS%g
  3516. s%@MH_XTRA_OBJS@%$MH_XTRA_OBJS%g
  3517. s%@PURIFY@%$PURIFY%g
  3518. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3519. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3520. s%@thisdir@%$thisdir%g
  3521.  
  3522. CEOF
  3523. EOF
  3524.  
  3525. cat >> $CONFIG_STATUS <<\EOF
  3526.  
  3527. # Split the substitutions into bite-sized pieces for seds with
  3528. # small command number limits, like on Digital OSF/1 and HP-UX.
  3529. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3530. ac_file=1 # Number of current file.
  3531. ac_beg=1 # First line for current file.
  3532. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3533. ac_more_lines=:
  3534. ac_sed_cmds=""
  3535. while $ac_more_lines; do
  3536.   if test $ac_beg -gt 1; then
  3537.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3538.   else
  3539.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3540.   fi
  3541.   if test ! -s conftest.s$ac_file; then
  3542.     ac_more_lines=false
  3543.     rm -f conftest.s$ac_file
  3544.   else
  3545.     if test -z "$ac_sed_cmds"; then
  3546.       ac_sed_cmds="sed -f conftest.s$ac_file"
  3547.     else
  3548.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3549.     fi
  3550.     ac_file=`expr $ac_file + 1`
  3551.     ac_beg=$ac_end
  3552.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3553.   fi
  3554. done
  3555. if test -z "$ac_sed_cmds"; then
  3556.   ac_sed_cmds=cat
  3557. fi
  3558. EOF
  3559.  
  3560. cat >> $CONFIG_STATUS <<EOF
  3561.  
  3562. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  3563. EOF
  3564. cat >> $CONFIG_STATUS <<\EOF
  3565. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3566.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3567.   case "$ac_file" in
  3568.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3569.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3570.   *) ac_file_in="${ac_file}.in" ;;
  3571.   esac
  3572.  
  3573.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3574.  
  3575.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3576.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3577.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3578.     # The file is in a subdirectory.
  3579.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3580.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3581.     # A "../" for each directory in $ac_dir_suffix.
  3582.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3583.   else
  3584.     ac_dir_suffix= ac_dots=
  3585.   fi
  3586.  
  3587.   case "$ac_given_srcdir" in
  3588.   .)  srcdir=.
  3589.       if test -z "$ac_dots"; then top_srcdir=.
  3590.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3591.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3592.   *) # Relative path.
  3593.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3594.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3595.   esac
  3596.  
  3597.   case "$ac_given_INSTALL" in
  3598.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3599.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3600.   esac
  3601.  
  3602.   echo creating "$ac_file"
  3603.   rm -f "$ac_file"
  3604.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3605.   case "$ac_file" in
  3606.   *Makefile*) ac_comsub="1i\\
  3607. # $configure_input" ;;
  3608.   *) ac_comsub= ;;
  3609.   esac
  3610.  
  3611.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3612.   sed -e "$ac_comsub
  3613. s%@configure_input@%$configure_input%g
  3614. s%@srcdir@%$srcdir%g
  3615. s%@top_srcdir@%$top_srcdir%g
  3616. s%@INSTALL@%$INSTALL%g
  3617. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3618. fi; done
  3619. rm -f conftest.s*
  3620.  
  3621. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3622. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3623. #
  3624. # ac_d sets the value in "#define NAME VALUE" lines.
  3625. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3626. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3627. ac_dC='\3'
  3628. ac_dD='%g'
  3629. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3630. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3631. ac_uB='\([     ]\)%\1#\2define\3'
  3632. ac_uC=' '
  3633. ac_uD='\4%g'
  3634. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3635. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3636. ac_eB='$%\1#\2define\3'
  3637. ac_eC=' '
  3638. ac_eD='%g'
  3639.  
  3640. if test "${CONFIG_HEADERS+set}" != set; then
  3641. EOF
  3642. cat >> $CONFIG_STATUS <<EOF
  3643.   CONFIG_HEADERS="config.h"
  3644. EOF
  3645. cat >> $CONFIG_STATUS <<\EOF
  3646. fi
  3647. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3648.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3649.   case "$ac_file" in
  3650.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3651.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3652.   *) ac_file_in="${ac_file}.in" ;;
  3653.   esac
  3654.  
  3655.   echo creating $ac_file
  3656.  
  3657.   rm -f conftest.frag conftest.in conftest.out
  3658.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3659.   cat $ac_file_inputs > conftest.in
  3660.  
  3661. EOF
  3662.  
  3663. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3664. # the proper values into config.h.in to produce config.h.  And first:
  3665. # Protect against being on the right side of a sed subst in config.status.
  3666. # Protect against being in an unquoted here document in config.status.
  3667. rm -f conftest.vals
  3668. cat > conftest.hdr <<\EOF
  3669. s/[\\&%]/\\&/g
  3670. s%[\\$`]%\\&%g
  3671. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3672. s%ac_d%ac_u%gp
  3673. s%ac_u%ac_e%gp
  3674. EOF
  3675. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3676. rm -f conftest.hdr
  3677.  
  3678. # This sed command replaces #undef with comments.  This is necessary, for
  3679. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3680. # on some systems where configure will not decide to define it.
  3681. cat >> conftest.vals <<\EOF
  3682. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3683. EOF
  3684.  
  3685. # Break up conftest.vals because some shells have a limit on
  3686. # the size of here documents, and old seds have small limits too.
  3687.  
  3688. rm -f conftest.tail
  3689. while :
  3690. do
  3691.   ac_lines=`grep -c . conftest.vals`
  3692.   # grep -c gives empty output for an empty file on some AIX systems.
  3693.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3694.   # Write a limited-size here document to conftest.frag.
  3695.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3696.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3697.   echo 'CEOF
  3698.   sed -f conftest.frag conftest.in > conftest.out
  3699.   rm -f conftest.in
  3700.   mv conftest.out conftest.in
  3701. ' >> $CONFIG_STATUS
  3702.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3703.   rm -f conftest.vals
  3704.   mv conftest.tail conftest.vals
  3705. done
  3706. rm -f conftest.vals
  3707.  
  3708. cat >> $CONFIG_STATUS <<\EOF
  3709.   rm -f conftest.frag conftest.h
  3710.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3711.   cat conftest.in >> conftest.h
  3712.   rm -f conftest.in
  3713.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3714.     echo "$ac_file is unchanged"
  3715.     rm -f conftest.h
  3716.   else
  3717.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3718.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3719.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3720.       # The file is in a subdirectory.
  3721.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3722.     fi
  3723.     rm -f $ac_file
  3724.     mv conftest.h $ac_file
  3725.   fi
  3726. fi; done
  3727.  
  3728. EOF
  3729. cat >> $CONFIG_STATUS <<EOF
  3730.  
  3731. EOF
  3732. cat >> $CONFIG_STATUS <<\EOF
  3733.  
  3734. exit 0
  3735. EOF
  3736. chmod +x $CONFIG_STATUS
  3737. rm -fr confdefs* $ac_clean_files
  3738. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3739.  
  3740.