configure revision 89019
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13 
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local}  Select a regular expression library  [auto]"
16ac_help="$ac_help
17  --with-editor=PROGRAM   use PROGRAM as the default editor [vi]"
18
19# Initialize some variables set by options.
20# The variables have the same names as the options, with
21# dashes changed to underlines.
22build=NONE
23cache_file=./config.cache
24exec_prefix=NONE
25host=NONE
26no_create=
27nonopt=NONE
28no_recursion=
29prefix=NONE
30program_prefix=NONE
31program_suffix=NONE
32program_transform_name=s,x,x,
33silent=
34site=
35srcdir=
36target=NONE
37verbose=
38x_includes=NONE
39x_libraries=NONE
40bindir='${exec_prefix}/bin'
41sbindir='${exec_prefix}/sbin'
42libexecdir='${exec_prefix}/libexec'
43datadir='${prefix}/share'
44sysconfdir='${prefix}/etc'
45sharedstatedir='${prefix}/com'
46localstatedir='${prefix}/var'
47libdir='${exec_prefix}/lib'
48includedir='${prefix}/include'
49oldincludedir='/usr/include'
50infodir='${prefix}/info'
51mandir='${prefix}/man'
52
53# Initialize some other variables.
54subdirs=
55MFLAGS= MAKEFLAGS=
56SHELL=${CONFIG_SHELL-/bin/sh}
57# Maximum number of lines to put in a shell here document.
58ac_max_here_lines=12
59
60ac_prev=
61for ac_option
62do
63
64  # If the previous option needs an argument, assign it.
65  if test -n "$ac_prev"; then
66    eval "$ac_prev=\$ac_option"
67    ac_prev=
68    continue
69  fi
70
71  case "$ac_option" in
72  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73  *) ac_optarg= ;;
74  esac
75
76  # Accept the important Cygnus configure options, so we can diagnose typos.
77
78  case "$ac_option" in
79
80  -bindir | --bindir | --bindi | --bind | --bin | --bi)
81    ac_prev=bindir ;;
82  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83    bindir="$ac_optarg" ;;
84
85  -build | --build | --buil | --bui | --bu)
86    ac_prev=build ;;
87  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
88    build="$ac_optarg" ;;
89
90  -cache-file | --cache-file | --cache-fil | --cache-fi \
91  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92    ac_prev=cache_file ;;
93  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95    cache_file="$ac_optarg" ;;
96
97  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
98    ac_prev=datadir ;;
99  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100  | --da=*)
101    datadir="$ac_optarg" ;;
102
103  -disable-* | --disable-*)
104    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105    # Reject names that are not valid shell variable names.
106    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108    fi
109    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110    eval "enable_${ac_feature}=no" ;;
111
112  -enable-* | --enable-*)
113    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114    # Reject names that are not valid shell variable names.
115    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117    fi
118    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119    case "$ac_option" in
120      *=*) ;;
121      *) ac_optarg=yes ;;
122    esac
123    eval "enable_${ac_feature}='$ac_optarg'" ;;
124
125  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127  | --exec | --exe | --ex)
128    ac_prev=exec_prefix ;;
129  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131  | --exec=* | --exe=* | --ex=*)
132    exec_prefix="$ac_optarg" ;;
133
134  -gas | --gas | --ga | --g)
135    # Obsolete; use --with-gas.
136    with_gas=yes ;;
137
138  -help | --help | --hel | --he)
139    # Omit some internal or obsolete options to make the list less imposing.
140    # This message is too long to be a string in the A/UX 3.1 sh.
141    cat << EOF
142Usage: configure [options] [host]
143Options: [defaults in brackets after descriptions]
144Configuration:
145  --cache-file=FILE       cache test results in FILE
146  --help                  print this message
147  --no-create             do not create output files
148  --quiet, --silent       do not print \`checking...' messages
149  --version               print the version of autoconf that created configure
150Directory and file names:
151  --prefix=PREFIX         install architecture-independent files in PREFIX
152                          [$ac_default_prefix]
153  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
154                          [same as prefix]
155  --bindir=DIR            user executables in DIR [EPREFIX/bin]
156  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
157  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
158  --datadir=DIR           read-only architecture-independent data in DIR
159                          [PREFIX/share]
160  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
161  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
162                          [PREFIX/com]
163  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
164  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
165  --includedir=DIR        C header files in DIR [PREFIX/include]
166  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
167  --infodir=DIR           info documentation in DIR [PREFIX/info]
168  --mandir=DIR            man documentation in DIR [PREFIX/man]
169  --srcdir=DIR            find the sources in DIR [configure dir or ..]
170  --program-prefix=PREFIX prepend PREFIX to installed program names
171  --program-suffix=SUFFIX append SUFFIX to installed program names
172  --program-transform-name=PROGRAM
173                          run sed PROGRAM on installed program names
174EOF
175    cat << EOF
176Host type:
177  --build=BUILD           configure for building on BUILD [BUILD=HOST]
178  --host=HOST             configure for HOST [guessed]
179  --target=TARGET         configure for TARGET [TARGET=HOST]
180Features and packages:
181  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
182  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
183  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
184  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
185  --x-includes=DIR        X include files are in DIR
186  --x-libraries=DIR       X library files are in DIR
187EOF
188    if test -n "$ac_help"; then
189      echo "--enable and --with options recognized:$ac_help"
190    fi
191    exit 0 ;;
192
193  -host | --host | --hos | --ho)
194    ac_prev=host ;;
195  -host=* | --host=* | --hos=* | --ho=*)
196    host="$ac_optarg" ;;
197
198  -includedir | --includedir | --includedi | --included | --include \
199  | --includ | --inclu | --incl | --inc)
200    ac_prev=includedir ;;
201  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202  | --includ=* | --inclu=* | --incl=* | --inc=*)
203    includedir="$ac_optarg" ;;
204
205  -infodir | --infodir | --infodi | --infod | --info | --inf)
206    ac_prev=infodir ;;
207  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208    infodir="$ac_optarg" ;;
209
210  -libdir | --libdir | --libdi | --libd)
211    ac_prev=libdir ;;
212  -libdir=* | --libdir=* | --libdi=* | --libd=*)
213    libdir="$ac_optarg" ;;
214
215  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216  | --libexe | --libex | --libe)
217    ac_prev=libexecdir ;;
218  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219  | --libexe=* | --libex=* | --libe=*)
220    libexecdir="$ac_optarg" ;;
221
222  -localstatedir | --localstatedir | --localstatedi | --localstated \
223  | --localstate | --localstat | --localsta | --localst \
224  | --locals | --local | --loca | --loc | --lo)
225    ac_prev=localstatedir ;;
226  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229    localstatedir="$ac_optarg" ;;
230
231  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
232    ac_prev=mandir ;;
233  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234    mandir="$ac_optarg" ;;
235
236  -nfp | --nfp | --nf)
237    # Obsolete; use --without-fp.
238    with_fp=no ;;
239
240  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241  | --no-cr | --no-c)
242    no_create=yes ;;
243
244  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
246    no_recursion=yes ;;
247
248  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250  | --oldin | --oldi | --old | --ol | --o)
251    ac_prev=oldincludedir ;;
252  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255    oldincludedir="$ac_optarg" ;;
256
257  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
258    ac_prev=prefix ;;
259  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260    prefix="$ac_optarg" ;;
261
262  -program-prefix | --program-prefix | --program-prefi | --program-pref \
263  | --program-pre | --program-pr | --program-p)
264    ac_prev=program_prefix ;;
265  -program-prefix=* | --program-prefix=* | --program-prefi=* \
266  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267    program_prefix="$ac_optarg" ;;
268
269  -program-suffix | --program-suffix | --program-suffi | --program-suff \
270  | --program-suf | --program-su | --program-s)
271    ac_prev=program_suffix ;;
272  -program-suffix=* | --program-suffix=* | --program-suffi=* \
273  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274    program_suffix="$ac_optarg" ;;
275
276  -program-transform-name | --program-transform-name \
277  | --program-transform-nam | --program-transform-na \
278  | --program-transform-n | --program-transform- \
279  | --program-transform | --program-transfor \
280  | --program-transfo | --program-transf \
281  | --program-trans | --program-tran \
282  | --progr-tra | --program-tr | --program-t)
283    ac_prev=program_transform_name ;;
284  -program-transform-name=* | --program-transform-name=* \
285  | --program-transform-nam=* | --program-transform-na=* \
286  | --program-transform-n=* | --program-transform-=* \
287  | --program-transform=* | --program-transfor=* \
288  | --program-transfo=* | --program-transf=* \
289  | --program-trans=* | --program-tran=* \
290  | --progr-tra=* | --program-tr=* | --program-t=*)
291    program_transform_name="$ac_optarg" ;;
292
293  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294  | -silent | --silent | --silen | --sile | --sil)
295    silent=yes ;;
296
297  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
298    ac_prev=sbindir ;;
299  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
300  | --sbi=* | --sb=*)
301    sbindir="$ac_optarg" ;;
302
303  -sharedstatedir | --sharedstatedir | --sharedstatedi \
304  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305  | --sharedst | --shareds | --shared | --share | --shar \
306  | --sha | --sh)
307    ac_prev=sharedstatedir ;;
308  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
311  | --sha=* | --sh=*)
312    sharedstatedir="$ac_optarg" ;;
313
314  -site | --site | --sit)
315    ac_prev=site ;;
316  -site=* | --site=* | --sit=*)
317    site="$ac_optarg" ;;
318
319  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
320    ac_prev=srcdir ;;
321  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322    srcdir="$ac_optarg" ;;
323
324  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325  | --syscon | --sysco | --sysc | --sys | --sy)
326    ac_prev=sysconfdir ;;
327  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329    sysconfdir="$ac_optarg" ;;
330
331  -target | --target | --targe | --targ | --tar | --ta | --t)
332    ac_prev=target ;;
333  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334    target="$ac_optarg" ;;
335
336  -v | -verbose | --verbose | --verbos | --verbo | --verb)
337    verbose=yes ;;
338
339  -version | --version | --versio | --versi | --vers)
340    echo "configure generated by autoconf version 2.13"
341    exit 0 ;;
342
343  -with-* | --with-*)
344    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345    # Reject names that are not valid shell variable names.
346    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
348    fi
349    ac_package=`echo $ac_package| sed 's/-/_/g'`
350    case "$ac_option" in
351      *=*) ;;
352      *) ac_optarg=yes ;;
353    esac
354    eval "with_${ac_package}='$ac_optarg'" ;;
355
356  -without-* | --without-*)
357    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358    # Reject names that are not valid shell variable names.
359    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361    fi
362    ac_package=`echo $ac_package| sed 's/-/_/g'`
363    eval "with_${ac_package}=no" ;;
364
365  --x)
366    # Obsolete; use --with-x.
367    with_x=yes ;;
368
369  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370  | --x-incl | --x-inc | --x-in | --x-i)
371    ac_prev=x_includes ;;
372  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374    x_includes="$ac_optarg" ;;
375
376  -x-libraries | --x-libraries | --x-librarie | --x-librari \
377  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378    ac_prev=x_libraries ;;
379  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381    x_libraries="$ac_optarg" ;;
382
383  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
384    ;;
385
386  *)
387    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388      echo "configure: warning: $ac_option: invalid host type" 1>&2
389    fi
390    if test "x$nonopt" != xNONE; then
391      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
392    fi
393    nonopt="$ac_option"
394    ;;
395
396  esac
397done
398
399if test -n "$ac_prev"; then
400  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
401fi
402
403trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
404
405# File descriptor usage:
406# 0 standard input
407# 1 file creation
408# 2 errors and warnings
409# 3 some systems may open it to /dev/tty
410# 4 used on the Kubota Titan
411# 6 checking for... messages and results
412# 5 compiler messages saved in config.log
413if test "$silent" = yes; then
414  exec 6>/dev/null
415else
416  exec 6>&1
417fi
418exec 5>./config.log
419
420echo "\
421This file contains any messages produced by compilers while
422running configure, to aid debugging if configure makes a mistake.
423" 1>&5
424
425# Strip out --no-create and --no-recursion so they do not pile up.
426# Also quote any args containing shell metacharacters.
427ac_configure_args=
428for ac_arg
429do
430  case "$ac_arg" in
431  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432  | --no-cr | --no-c) ;;
433  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
438  esac
439done
440
441# NLS nuisances.
442# Only set these to C if already set.  These must not be set unconditionally
443# because not all systems understand e.g. LANG=C (notably SCO).
444# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445# Non-C LC_CTYPE values break the ctype check.
446if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
447if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
450
451# confdefs.h avoids OS command line length limits that DEFS can exceed.
452rm -rf conftest* confdefs.h
453# AIX cpp loses on an empty file, so make sure it contains at least a newline.
454echo > confdefs.h
455
456# A filename unique to this package, relative to the directory that
457# configure is in, which we can look for to find out if srcdir is correct.
458ac_unique_file=forwback.c
459
460# Find the source files, if location was not specified.
461if test -z "$srcdir"; then
462  ac_srcdir_defaulted=yes
463  # Try the directory containing this script, then its parent.
464  ac_prog=$0
465  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467  srcdir=$ac_confdir
468  if test ! -r $srcdir/$ac_unique_file; then
469    srcdir=..
470  fi
471else
472  ac_srcdir_defaulted=no
473fi
474if test ! -r $srcdir/$ac_unique_file; then
475  if test "$ac_srcdir_defaulted" = yes; then
476    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
477  else
478    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
479  fi
480fi
481srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
482
483# Prefer explicitly selected file to automatically selected ones.
484if test -z "$CONFIG_SITE"; then
485  if test "x$prefix" != xNONE; then
486    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
487  else
488    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
489  fi
490fi
491for ac_site_file in $CONFIG_SITE; do
492  if test -r "$ac_site_file"; then
493    echo "loading site script $ac_site_file"
494    . "$ac_site_file"
495  fi
496done
497
498if test -r "$cache_file"; then
499  echo "loading cache $cache_file"
500  . $cache_file
501else
502  echo "creating cache $cache_file"
503  > $cache_file
504fi
505
506ac_ext=c
507# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508ac_cpp='$CPP $CPPFLAGS'
509ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511cross_compiling=$ac_cv_prog_cc_cross
512
513ac_exeext=
514ac_objext=o
515if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
518    ac_n= ac_c='
519' ac_t='	'
520  else
521    ac_n=-n ac_c= ac_t=
522  fi
523else
524  ac_n= ac_c='\c' ac_t=
525fi
526
527
528
529
530# Extract the first word of "gcc", so it can be a program name with args.
531set dummy gcc; ac_word=$2
532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
533echo "configure:534: checking for $ac_word" >&5
534if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
535  echo $ac_n "(cached) $ac_c" 1>&6
536else
537  if test -n "$CC"; then
538  ac_cv_prog_CC="$CC" # Let the user override the test.
539else
540  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
541  ac_dummy="$PATH"
542  for ac_dir in $ac_dummy; do
543    test -z "$ac_dir" && ac_dir=.
544    if test -f $ac_dir/$ac_word; then
545      ac_cv_prog_CC="gcc"
546      break
547    fi
548  done
549  IFS="$ac_save_ifs"
550fi
551fi
552CC="$ac_cv_prog_CC"
553if test -n "$CC"; then
554  echo "$ac_t""$CC" 1>&6
555else
556  echo "$ac_t""no" 1>&6
557fi
558
559if test -z "$CC"; then
560  # Extract the first word of "cc", so it can be a program name with args.
561set dummy cc; ac_word=$2
562echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
563echo "configure:564: checking for $ac_word" >&5
564if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
565  echo $ac_n "(cached) $ac_c" 1>&6
566else
567  if test -n "$CC"; then
568  ac_cv_prog_CC="$CC" # Let the user override the test.
569else
570  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
571  ac_prog_rejected=no
572  ac_dummy="$PATH"
573  for ac_dir in $ac_dummy; do
574    test -z "$ac_dir" && ac_dir=.
575    if test -f $ac_dir/$ac_word; then
576      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
577        ac_prog_rejected=yes
578	continue
579      fi
580      ac_cv_prog_CC="cc"
581      break
582    fi
583  done
584  IFS="$ac_save_ifs"
585if test $ac_prog_rejected = yes; then
586  # We found a bogon in the path, so make sure we never use it.
587  set dummy $ac_cv_prog_CC
588  shift
589  if test $# -gt 0; then
590    # We chose a different compiler from the bogus one.
591    # However, it has the same basename, so the bogon will be chosen
592    # first if we set CC to just the basename; use the full file name.
593    shift
594    set dummy "$ac_dir/$ac_word" "$@"
595    shift
596    ac_cv_prog_CC="$@"
597  fi
598fi
599fi
600fi
601CC="$ac_cv_prog_CC"
602if test -n "$CC"; then
603  echo "$ac_t""$CC" 1>&6
604else
605  echo "$ac_t""no" 1>&6
606fi
607
608  if test -z "$CC"; then
609    case "`uname -s`" in
610    *win32* | *WIN32*)
611      # Extract the first word of "cl", so it can be a program name with args.
612set dummy cl; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614echo "configure:615: checking for $ac_word" >&5
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616  echo $ac_n "(cached) $ac_c" 1>&6
617else
618  if test -n "$CC"; then
619  ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
622  ac_dummy="$PATH"
623  for ac_dir in $ac_dummy; do
624    test -z "$ac_dir" && ac_dir=.
625    if test -f $ac_dir/$ac_word; then
626      ac_cv_prog_CC="cl"
627      break
628    fi
629  done
630  IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635  echo "$ac_t""$CC" 1>&6
636else
637  echo "$ac_t""no" 1>&6
638fi
639 ;;
640    esac
641  fi
642  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
643fi
644
645echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
646echo "configure:647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
647
648ac_ext=c
649# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
650ac_cpp='$CPP $CPPFLAGS'
651ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
652ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
653cross_compiling=$ac_cv_prog_cc_cross
654
655cat > conftest.$ac_ext << EOF
656
657#line 658 "configure"
658#include "confdefs.h"
659
660main(){return(0);}
661EOF
662if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
663  ac_cv_prog_cc_works=yes
664  # If we can't run a trivial program, we are probably using a cross compiler.
665  if (./conftest; exit) 2>/dev/null; then
666    ac_cv_prog_cc_cross=no
667  else
668    ac_cv_prog_cc_cross=yes
669  fi
670else
671  echo "configure: failed program was:" >&5
672  cat conftest.$ac_ext >&5
673  ac_cv_prog_cc_works=no
674fi
675rm -fr conftest*
676ac_ext=c
677# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
678ac_cpp='$CPP $CPPFLAGS'
679ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
680ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
681cross_compiling=$ac_cv_prog_cc_cross
682
683echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
684if test $ac_cv_prog_cc_works = no; then
685  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
686fi
687echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
688echo "configure:689: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
689echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
690cross_compiling=$ac_cv_prog_cc_cross
691
692echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
693echo "configure:694: checking whether we are using GNU C" >&5
694if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
695  echo $ac_n "(cached) $ac_c" 1>&6
696else
697  cat > conftest.c <<EOF
698#ifdef __GNUC__
699  yes;
700#endif
701EOF
702if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
703  ac_cv_prog_gcc=yes
704else
705  ac_cv_prog_gcc=no
706fi
707fi
708
709echo "$ac_t""$ac_cv_prog_gcc" 1>&6
710
711if test $ac_cv_prog_gcc = yes; then
712  GCC=yes
713else
714  GCC=
715fi
716
717ac_test_CFLAGS="${CFLAGS+set}"
718ac_save_CFLAGS="$CFLAGS"
719CFLAGS=
720echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
721echo "configure:722: checking whether ${CC-cc} accepts -g" >&5
722if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
723  echo $ac_n "(cached) $ac_c" 1>&6
724else
725  echo 'void f(){}' > conftest.c
726if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
727  ac_cv_prog_cc_g=yes
728else
729  ac_cv_prog_cc_g=no
730fi
731rm -f conftest*
732
733fi
734
735echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
736if test "$ac_test_CFLAGS" = set; then
737  CFLAGS="$ac_save_CFLAGS"
738elif test $ac_cv_prog_cc_g = yes; then
739  if test "$GCC" = yes; then
740    CFLAGS="-g -O2"
741  else
742    CFLAGS="-g"
743  fi
744else
745  if test "$GCC" = yes; then
746    CFLAGS="-O2"
747  else
748    CFLAGS=
749  fi
750fi
751
752echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
753echo "configure:754: checking for POSIXized ISC" >&5
754if test -d /etc/conf/kconfig.d &&
755  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
756then
757  echo "$ac_t""yes" 1>&6
758  ISC=yes # If later tests want to check for ISC.
759  cat >> confdefs.h <<\EOF
760#define _POSIX_SOURCE 1
761EOF
762
763  if test "$GCC" = yes; then
764    CC="$CC -posix"
765  else
766    CC="$CC -Xp"
767  fi
768else
769  echo "$ac_t""no" 1>&6
770  ISC=
771fi
772
773echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
774echo "configure:775: checking how to run the C preprocessor" >&5
775# On Suns, sometimes $CPP names a directory.
776if test -n "$CPP" && test -d "$CPP"; then
777  CPP=
778fi
779if test -z "$CPP"; then
780if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
781  echo $ac_n "(cached) $ac_c" 1>&6
782else
783    # This must be in double quotes, not single quotes, because CPP may get
784  # substituted into the Makefile and "${CC-cc}" will confuse make.
785  CPP="${CC-cc} -E"
786  # On the NeXT, cc -E runs the code through the compiler's parser,
787  # not just through cpp.
788  cat > conftest.$ac_ext <<EOF
789#line 790 "configure"
790#include "confdefs.h"
791#include <assert.h>
792Syntax Error
793EOF
794ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
795{ (eval echo configure:796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
796ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
797if test -z "$ac_err"; then
798  :
799else
800  echo "$ac_err" >&5
801  echo "configure: failed program was:" >&5
802  cat conftest.$ac_ext >&5
803  rm -rf conftest*
804  CPP="${CC-cc} -E -traditional-cpp"
805  cat > conftest.$ac_ext <<EOF
806#line 807 "configure"
807#include "confdefs.h"
808#include <assert.h>
809Syntax Error
810EOF
811ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
812{ (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
813ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
814if test -z "$ac_err"; then
815  :
816else
817  echo "$ac_err" >&5
818  echo "configure: failed program was:" >&5
819  cat conftest.$ac_ext >&5
820  rm -rf conftest*
821  CPP="${CC-cc} -nologo -E"
822  cat > conftest.$ac_ext <<EOF
823#line 824 "configure"
824#include "confdefs.h"
825#include <assert.h>
826Syntax Error
827EOF
828ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
829{ (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
830ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
831if test -z "$ac_err"; then
832  :
833else
834  echo "$ac_err" >&5
835  echo "configure: failed program was:" >&5
836  cat conftest.$ac_ext >&5
837  rm -rf conftest*
838  CPP=/lib/cpp
839fi
840rm -f conftest*
841fi
842rm -f conftest*
843fi
844rm -f conftest*
845  ac_cv_prog_CPP="$CPP"
846fi
847  CPP="$ac_cv_prog_CPP"
848else
849  ac_cv_prog_CPP="$CPP"
850fi
851echo "$ac_t""$CPP" 1>&6
852
853if test $ac_cv_prog_gcc = yes; then
854    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
855echo "configure:856: checking whether ${CC-cc} needs -traditional" >&5
856if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
857  echo $ac_n "(cached) $ac_c" 1>&6
858else
859    ac_pattern="Autoconf.*'x'"
860  cat > conftest.$ac_ext <<EOF
861#line 862 "configure"
862#include "confdefs.h"
863#include <sgtty.h>
864Autoconf TIOCGETP
865EOF
866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
867  egrep "$ac_pattern" >/dev/null 2>&1; then
868  rm -rf conftest*
869  ac_cv_prog_gcc_traditional=yes
870else
871  rm -rf conftest*
872  ac_cv_prog_gcc_traditional=no
873fi
874rm -f conftest*
875
876
877  if test $ac_cv_prog_gcc_traditional = no; then
878    cat > conftest.$ac_ext <<EOF
879#line 880 "configure"
880#include "confdefs.h"
881#include <termio.h>
882Autoconf TCGETA
883EOF
884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
885  egrep "$ac_pattern" >/dev/null 2>&1; then
886  rm -rf conftest*
887  ac_cv_prog_gcc_traditional=yes
888fi
889rm -f conftest*
890
891  fi
892fi
893
894echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
895  if test $ac_cv_prog_gcc_traditional = yes; then
896    CC="$CC -traditional"
897  fi
898fi
899
900ac_aux_dir=
901for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
902  if test -f $ac_dir/install-sh; then
903    ac_aux_dir=$ac_dir
904    ac_install_sh="$ac_aux_dir/install-sh -c"
905    break
906  elif test -f $ac_dir/install.sh; then
907    ac_aux_dir=$ac_dir
908    ac_install_sh="$ac_aux_dir/install.sh -c"
909    break
910  fi
911done
912if test -z "$ac_aux_dir"; then
913  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
914fi
915ac_config_guess=$ac_aux_dir/config.guess
916ac_config_sub=$ac_aux_dir/config.sub
917ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
918
919# Find a good install program.  We prefer a C program (faster),
920# so one script is as good as another.  But avoid the broken or
921# incompatible versions:
922# SysV /etc/install, /usr/sbin/install
923# SunOS /usr/etc/install
924# IRIX /sbin/install
925# AIX /bin/install
926# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
927# AFS /usr/afsws/bin/install, which mishandles nonexistent args
928# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
929# ./install, which can be erroneously created by make from ./install.sh.
930echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
931echo "configure:932: checking for a BSD compatible install" >&5
932if test -z "$INSTALL"; then
933if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
934  echo $ac_n "(cached) $ac_c" 1>&6
935else
936    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
937  for ac_dir in $PATH; do
938    # Account for people who put trailing slashes in PATH elements.
939    case "$ac_dir/" in
940    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
941    *)
942      # OSF1 and SCO ODT 3.0 have their own names for install.
943      # Don't use installbsd from OSF since it installs stuff as root
944      # by default.
945      for ac_prog in ginstall scoinst install; do
946        if test -f $ac_dir/$ac_prog; then
947	  if test $ac_prog = install &&
948            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
949	    # AIX install.  It has an incompatible calling convention.
950	    :
951	  else
952	    ac_cv_path_install="$ac_dir/$ac_prog -c"
953	    break 2
954	  fi
955	fi
956      done
957      ;;
958    esac
959  done
960  IFS="$ac_save_IFS"
961
962fi
963  if test "${ac_cv_path_install+set}" = set; then
964    INSTALL="$ac_cv_path_install"
965  else
966    # As a last resort, use the slow shell script.  We don't cache a
967    # path for INSTALL within a source directory, because that will
968    # break other packages using the cache if that directory is
969    # removed, or if the path is relative.
970    INSTALL="$ac_install_sh"
971  fi
972fi
973echo "$ac_t""$INSTALL" 1>&6
974
975# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
976# It thinks the first close brace ends the variable substitution.
977test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
978
979test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
980
981test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
982
983
984
985echo $ac_n "checking for initscr in -lxcurses""... $ac_c" 1>&6
986echo "configure:987: checking for initscr in -lxcurses" >&5
987ac_lib_var=`echo xcurses'_'initscr | sed 'y%./+-%__p_%'`
988if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
989  echo $ac_n "(cached) $ac_c" 1>&6
990else
991  ac_save_LIBS="$LIBS"
992LIBS="-lxcurses  $LIBS"
993cat > conftest.$ac_ext <<EOF
994#line 995 "configure"
995#include "confdefs.h"
996/* Override any gcc2 internal prototype to avoid an error.  */
997/* We use char because int might match the return type of a gcc2
998    builtin and then its argument prototype would still apply.  */
999char initscr();
1000
1001int main() {
1002initscr()
1003; return 0; }
1004EOF
1005if { (eval echo configure:1006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1006  rm -rf conftest*
1007  eval "ac_cv_lib_$ac_lib_var=yes"
1008else
1009  echo "configure: failed program was:" >&5
1010  cat conftest.$ac_ext >&5
1011  rm -rf conftest*
1012  eval "ac_cv_lib_$ac_lib_var=no"
1013fi
1014rm -f conftest*
1015LIBS="$ac_save_LIBS"
1016
1017fi
1018if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1019  echo "$ac_t""yes" 1>&6
1020  have_xcurses=yes
1021else
1022  echo "$ac_t""no" 1>&6
1023have_xcurses=no
1024fi
1025
1026echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
1027echo "configure:1028: checking for initscr in -lncurses" >&5
1028ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
1029if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1030  echo $ac_n "(cached) $ac_c" 1>&6
1031else
1032  ac_save_LIBS="$LIBS"
1033LIBS="-lncurses  $LIBS"
1034cat > conftest.$ac_ext <<EOF
1035#line 1036 "configure"
1036#include "confdefs.h"
1037/* Override any gcc2 internal prototype to avoid an error.  */
1038/* We use char because int might match the return type of a gcc2
1039    builtin and then its argument prototype would still apply.  */
1040char initscr();
1041
1042int main() {
1043initscr()
1044; return 0; }
1045EOF
1046if { (eval echo configure:1047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1047  rm -rf conftest*
1048  eval "ac_cv_lib_$ac_lib_var=yes"
1049else
1050  echo "configure: failed program was:" >&5
1051  cat conftest.$ac_ext >&5
1052  rm -rf conftest*
1053  eval "ac_cv_lib_$ac_lib_var=no"
1054fi
1055rm -f conftest*
1056LIBS="$ac_save_LIBS"
1057
1058fi
1059if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1060  echo "$ac_t""yes" 1>&6
1061  have_ncurses=yes
1062else
1063  echo "$ac_t""no" 1>&6
1064have_ncurses=no
1065fi
1066
1067echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
1068echo "configure:1069: checking for initscr in -lcurses" >&5
1069ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
1070if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1071  echo $ac_n "(cached) $ac_c" 1>&6
1072else
1073  ac_save_LIBS="$LIBS"
1074LIBS="-lcurses  $LIBS"
1075cat > conftest.$ac_ext <<EOF
1076#line 1077 "configure"
1077#include "confdefs.h"
1078/* Override any gcc2 internal prototype to avoid an error.  */
1079/* We use char because int might match the return type of a gcc2
1080    builtin and then its argument prototype would still apply.  */
1081char initscr();
1082
1083int main() {
1084initscr()
1085; return 0; }
1086EOF
1087if { (eval echo configure:1088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1088  rm -rf conftest*
1089  eval "ac_cv_lib_$ac_lib_var=yes"
1090else
1091  echo "configure: failed program was:" >&5
1092  cat conftest.$ac_ext >&5
1093  rm -rf conftest*
1094  eval "ac_cv_lib_$ac_lib_var=no"
1095fi
1096rm -f conftest*
1097LIBS="$ac_save_LIBS"
1098
1099fi
1100if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1101  echo "$ac_t""yes" 1>&6
1102  have_curses=yes
1103else
1104  echo "$ac_t""no" 1>&6
1105have_curses=no
1106fi
1107
1108echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
1109echo "configure:1110: checking for tgetent in -ltermcap" >&5
1110ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1111if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1112  echo $ac_n "(cached) $ac_c" 1>&6
1113else
1114  ac_save_LIBS="$LIBS"
1115LIBS="-ltermcap  $LIBS"
1116cat > conftest.$ac_ext <<EOF
1117#line 1118 "configure"
1118#include "confdefs.h"
1119/* Override any gcc2 internal prototype to avoid an error.  */
1120/* We use char because int might match the return type of a gcc2
1121    builtin and then its argument prototype would still apply.  */
1122char tgetent();
1123
1124int main() {
1125tgetent()
1126; return 0; }
1127EOF
1128if { (eval echo configure:1129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1129  rm -rf conftest*
1130  eval "ac_cv_lib_$ac_lib_var=yes"
1131else
1132  echo "configure: failed program was:" >&5
1133  cat conftest.$ac_ext >&5
1134  rm -rf conftest*
1135  eval "ac_cv_lib_$ac_lib_var=no"
1136fi
1137rm -f conftest*
1138LIBS="$ac_save_LIBS"
1139
1140fi
1141if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1142  echo "$ac_t""yes" 1>&6
1143  have_termcap=yes
1144else
1145  echo "$ac_t""no" 1>&6
1146have_termcap=no
1147fi
1148
1149echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
1150echo "configure:1151: checking for tgetent in -ltermlib" >&5
1151ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
1152if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1153  echo $ac_n "(cached) $ac_c" 1>&6
1154else
1155  ac_save_LIBS="$LIBS"
1156LIBS="-ltermlib  $LIBS"
1157cat > conftest.$ac_ext <<EOF
1158#line 1159 "configure"
1159#include "confdefs.h"
1160/* Override any gcc2 internal prototype to avoid an error.  */
1161/* We use char because int might match the return type of a gcc2
1162    builtin and then its argument prototype would still apply.  */
1163char tgetent();
1164
1165int main() {
1166tgetent()
1167; return 0; }
1168EOF
1169if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1170  rm -rf conftest*
1171  eval "ac_cv_lib_$ac_lib_var=yes"
1172else
1173  echo "configure: failed program was:" >&5
1174  cat conftest.$ac_ext >&5
1175  rm -rf conftest*
1176  eval "ac_cv_lib_$ac_lib_var=no"
1177fi
1178rm -f conftest*
1179LIBS="$ac_save_LIBS"
1180
1181fi
1182if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1183  echo "$ac_t""yes" 1>&6
1184  have_termlib=yes
1185else
1186  echo "$ac_t""no" 1>&6
1187have_termlib=no
1188fi
1189
1190echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
1191echo "configure:1192: checking for regcmp in -lgen" >&5
1192ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
1193if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1194  echo $ac_n "(cached) $ac_c" 1>&6
1195else
1196  ac_save_LIBS="$LIBS"
1197LIBS="-lgen  $LIBS"
1198cat > conftest.$ac_ext <<EOF
1199#line 1200 "configure"
1200#include "confdefs.h"
1201/* Override any gcc2 internal prototype to avoid an error.  */
1202/* We use char because int might match the return type of a gcc2
1203    builtin and then its argument prototype would still apply.  */
1204char regcmp();
1205
1206int main() {
1207regcmp()
1208; return 0; }
1209EOF
1210if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1211  rm -rf conftest*
1212  eval "ac_cv_lib_$ac_lib_var=yes"
1213else
1214  echo "configure: failed program was:" >&5
1215  cat conftest.$ac_ext >&5
1216  rm -rf conftest*
1217  eval "ac_cv_lib_$ac_lib_var=no"
1218fi
1219rm -f conftest*
1220LIBS="$ac_save_LIBS"
1221
1222fi
1223if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1224  echo "$ac_t""yes" 1>&6
1225    ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1226    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1227  cat >> confdefs.h <<EOF
1228#define $ac_tr_lib 1
1229EOF
1230
1231  LIBS="-lgen $LIBS"
1232
1233else
1234  echo "$ac_t""no" 1>&6
1235fi
1236
1237echo $ac_n "checking for regcmp in -lintl""... $ac_c" 1>&6
1238echo "configure:1239: checking for regcmp in -lintl" >&5
1239ac_lib_var=`echo intl'_'regcmp | sed 'y%./+-%__p_%'`
1240if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1241  echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243  ac_save_LIBS="$LIBS"
1244LIBS="-lintl  $LIBS"
1245cat > conftest.$ac_ext <<EOF
1246#line 1247 "configure"
1247#include "confdefs.h"
1248/* Override any gcc2 internal prototype to avoid an error.  */
1249/* We use char because int might match the return type of a gcc2
1250    builtin and then its argument prototype would still apply.  */
1251char regcmp();
1252
1253int main() {
1254regcmp()
1255; return 0; }
1256EOF
1257if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1258  rm -rf conftest*
1259  eval "ac_cv_lib_$ac_lib_var=yes"
1260else
1261  echo "configure: failed program was:" >&5
1262  cat conftest.$ac_ext >&5
1263  rm -rf conftest*
1264  eval "ac_cv_lib_$ac_lib_var=no"
1265fi
1266rm -f conftest*
1267LIBS="$ac_save_LIBS"
1268
1269fi
1270if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1271  echo "$ac_t""yes" 1>&6
1272    ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1273    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1274  cat >> confdefs.h <<EOF
1275#define $ac_tr_lib 1
1276EOF
1277
1278  LIBS="-lintl $LIBS"
1279
1280else
1281  echo "$ac_t""no" 1>&6
1282fi
1283
1284echo $ac_n "checking for regcmp in -lPW""... $ac_c" 1>&6
1285echo "configure:1286: checking for regcmp in -lPW" >&5
1286ac_lib_var=`echo PW'_'regcmp | sed 'y%./+-%__p_%'`
1287if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1288  echo $ac_n "(cached) $ac_c" 1>&6
1289else
1290  ac_save_LIBS="$LIBS"
1291LIBS="-lPW  $LIBS"
1292cat > conftest.$ac_ext <<EOF
1293#line 1294 "configure"
1294#include "confdefs.h"
1295/* Override any gcc2 internal prototype to avoid an error.  */
1296/* We use char because int might match the return type of a gcc2
1297    builtin and then its argument prototype would still apply.  */
1298char regcmp();
1299
1300int main() {
1301regcmp()
1302; return 0; }
1303EOF
1304if { (eval echo configure:1305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1305  rm -rf conftest*
1306  eval "ac_cv_lib_$ac_lib_var=yes"
1307else
1308  echo "configure: failed program was:" >&5
1309  cat conftest.$ac_ext >&5
1310  rm -rf conftest*
1311  eval "ac_cv_lib_$ac_lib_var=no"
1312fi
1313rm -f conftest*
1314LIBS="$ac_save_LIBS"
1315
1316fi
1317if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1318  echo "$ac_t""yes" 1>&6
1319    ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1320    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1321  cat >> confdefs.h <<EOF
1322#define $ac_tr_lib 1
1323EOF
1324
1325  LIBS="-lPW $LIBS"
1326
1327else
1328  echo "$ac_t""no" 1>&6
1329fi
1330
1331
1332echo $ac_n "checking for working terminal libraries""... $ac_c" 1>&6
1333echo "configure:1334: checking for working terminal libraries" >&5
1334TERMLIBS=
1335
1336curses_broken=0
1337if test x`uname -s` = "xHP-UX" >/dev/null 2>&1; then
1338if test x`uname -r` = "xB.11.00" >/dev/null 2>&1; then
1339   curses_broken=1
1340fi
1341if test x`uname -r` = "xB.11.11" >/dev/null 2>&1; then
1342   curses_broken=1
1343fi
1344fi
1345
1346if test $curses_broken = 0; then
1347if test "x$TERMLIBS" = x; then
1348  if test $have_xcurses = yes; then
1349    TERMLIBS="-lxcurses"
1350    SAVE_LIBS=$LIBS
1351    LIBS="$LIBS $TERMLIBS"
1352    cat > conftest.$ac_ext <<EOF
1353#line 1354 "configure"
1354#include "confdefs.h"
1355
1356int main() {
1357tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1358; return 0; }
1359EOF
1360if { (eval echo configure:1361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1361  rm -rf conftest*
1362  termok=yes
1363else
1364  echo "configure: failed program was:" >&5
1365  cat conftest.$ac_ext >&5
1366  rm -rf conftest*
1367  termok=no
1368fi
1369rm -f conftest*
1370    LIBS=$SAVE_LIBS
1371    if test $termok = no; then TERMLIBS=""; fi
1372  fi
1373fi
1374
1375if test "x$TERMLIBS" = x; then
1376  if test $have_ncurses = yes; then
1377    TERMLIBS="-lncurses"
1378    SAVE_LIBS=$LIBS
1379    LIBS="$LIBS $TERMLIBS"
1380    cat > conftest.$ac_ext <<EOF
1381#line 1382 "configure"
1382#include "confdefs.h"
1383
1384int main() {
1385tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1386; return 0; }
1387EOF
1388if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1389  rm -rf conftest*
1390  termok=yes
1391else
1392  echo "configure: failed program was:" >&5
1393  cat conftest.$ac_ext >&5
1394  rm -rf conftest*
1395  termok=no
1396fi
1397rm -f conftest*
1398    LIBS=$SAVE_LIBS
1399    if test $termok = no; then TERMLIBS=""; fi
1400  fi
1401fi
1402
1403if test "x$TERMLIBS" = x; then
1404  if test $have_curses = yes; then
1405    TERMLIBS="-lcurses"
1406    SAVE_LIBS=$LIBS
1407    LIBS="$LIBS $TERMLIBS"
1408    cat > conftest.$ac_ext <<EOF
1409#line 1410 "configure"
1410#include "confdefs.h"
1411
1412int main() {
1413tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1414; return 0; }
1415EOF
1416if { (eval echo configure:1417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1417  rm -rf conftest*
1418  termok=yes
1419else
1420  echo "configure: failed program was:" >&5
1421  cat conftest.$ac_ext >&5
1422  rm -rf conftest*
1423  termok=no
1424fi
1425rm -f conftest*
1426    LIBS=$SAVE_LIBS
1427    if test $termok = no; then TERMLIBS=""; fi
1428  fi
1429fi
1430
1431if test "x$TERMLIBS" = x; then
1432  if test $have_curses = yes; then
1433  if test $have_termcap = yes; then
1434    TERMLIBS="-lcurses -ltermcap"
1435    SAVE_LIBS=$LIBS
1436    LIBS="$LIBS $TERMLIBS"
1437    cat > conftest.$ac_ext <<EOF
1438#line 1439 "configure"
1439#include "confdefs.h"
1440
1441int main() {
1442tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1443; return 0; }
1444EOF
1445if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1446  rm -rf conftest*
1447  termok=yes
1448else
1449  echo "configure: failed program was:" >&5
1450  cat conftest.$ac_ext >&5
1451  rm -rf conftest*
1452  termok=no
1453fi
1454rm -f conftest*
1455    LIBS=$SAVE_LIBS
1456    if test $termok = no; then TERMLIBS=""; fi
1457  fi
1458  fi
1459fi
1460fi
1461
1462if test "x$TERMLIBS" = x; then
1463  if test $have_termcap = yes; then
1464    TERMLIBS="-ltermcap"
1465    SAVE_LIBS=$LIBS
1466    LIBS="$LIBS $TERMLIBS"
1467    cat > conftest.$ac_ext <<EOF
1468#line 1469 "configure"
1469#include "confdefs.h"
1470
1471int main() {
1472tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1473; return 0; }
1474EOF
1475if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1476  rm -rf conftest*
1477  termok=yes
1478else
1479  echo "configure: failed program was:" >&5
1480  cat conftest.$ac_ext >&5
1481  rm -rf conftest*
1482  termok=no
1483fi
1484rm -f conftest*
1485    LIBS=$SAVE_LIBS
1486    if test $termok = no; then TERMLIBS=""; fi
1487  fi
1488fi
1489
1490if test "x$TERMLIBS" = x; then
1491  if test $have_termlib = yes; then
1492    TERMLIBS="-lcurses -ltermlib"
1493    SAVE_LIBS=$LIBS
1494    LIBS="$LIBS $TERMLIBS"
1495    cat > conftest.$ac_ext <<EOF
1496#line 1497 "configure"
1497#include "confdefs.h"
1498
1499int main() {
1500tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
1501; return 0; }
1502EOF
1503if { (eval echo configure:1504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1504  rm -rf conftest*
1505  termok=yes
1506else
1507  echo "configure: failed program was:" >&5
1508  cat conftest.$ac_ext >&5
1509  rm -rf conftest*
1510  termok=no
1511fi
1512rm -f conftest*
1513    LIBS=$SAVE_LIBS
1514    if test $termok = no; then TERMLIBS=""; fi
1515  fi
1516fi
1517
1518if test "x$TERMLIBS" = x; then
1519  echo "$ac_t""Cannot find terminal libraries - configure failed" 1>&6
1520  exit 1
1521fi
1522echo "$ac_t""using $TERMLIBS" 1>&6
1523LIBS="$LIBS $TERMLIBS"
1524
1525
1526for ac_hdr in ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h sys/ptem.h
1527do
1528ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1529echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1530echo "configure:1531: checking for $ac_hdr" >&5
1531if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1532  echo $ac_n "(cached) $ac_c" 1>&6
1533else
1534  cat > conftest.$ac_ext <<EOF
1535#line 1536 "configure"
1536#include "confdefs.h"
1537#include <$ac_hdr>
1538EOF
1539ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1540{ (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1541ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1542if test -z "$ac_err"; then
1543  rm -rf conftest*
1544  eval "ac_cv_header_$ac_safe=yes"
1545else
1546  echo "$ac_err" >&5
1547  echo "configure: failed program was:" >&5
1548  cat conftest.$ac_ext >&5
1549  rm -rf conftest*
1550  eval "ac_cv_header_$ac_safe=no"
1551fi
1552rm -f conftest*
1553fi
1554if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1555  echo "$ac_t""yes" 1>&6
1556    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1557  cat >> confdefs.h <<EOF
1558#define $ac_tr_hdr 1
1559EOF
1560 
1561else
1562  echo "$ac_t""no" 1>&6
1563fi
1564done
1565
1566
1567echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1568echo "configure:1569: checking for ANSI C header files" >&5
1569if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1570  echo $ac_n "(cached) $ac_c" 1>&6
1571else
1572  cat > conftest.$ac_ext <<EOF
1573#line 1574 "configure"
1574#include "confdefs.h"
1575#include <stdlib.h>
1576#include <stdarg.h>
1577#include <string.h>
1578#include <float.h>
1579EOF
1580ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1581{ (eval echo configure:1582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1582ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1583if test -z "$ac_err"; then
1584  rm -rf conftest*
1585  ac_cv_header_stdc=yes
1586else
1587  echo "$ac_err" >&5
1588  echo "configure: failed program was:" >&5
1589  cat conftest.$ac_ext >&5
1590  rm -rf conftest*
1591  ac_cv_header_stdc=no
1592fi
1593rm -f conftest*
1594
1595if test $ac_cv_header_stdc = yes; then
1596  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1597cat > conftest.$ac_ext <<EOF
1598#line 1599 "configure"
1599#include "confdefs.h"
1600#include <string.h>
1601EOF
1602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1603  egrep "memchr" >/dev/null 2>&1; then
1604  :
1605else
1606  rm -rf conftest*
1607  ac_cv_header_stdc=no
1608fi
1609rm -f conftest*
1610
1611fi
1612
1613if test $ac_cv_header_stdc = yes; then
1614  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1615cat > conftest.$ac_ext <<EOF
1616#line 1617 "configure"
1617#include "confdefs.h"
1618#include <stdlib.h>
1619EOF
1620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1621  egrep "free" >/dev/null 2>&1; then
1622  :
1623else
1624  rm -rf conftest*
1625  ac_cv_header_stdc=no
1626fi
1627rm -f conftest*
1628
1629fi
1630
1631if test $ac_cv_header_stdc = yes; then
1632  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1633if test "$cross_compiling" = yes; then
1634  :
1635else
1636  cat > conftest.$ac_ext <<EOF
1637#line 1638 "configure"
1638#include "confdefs.h"
1639#include <ctype.h>
1640#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1641#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1642#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1643int main () { int i; for (i = 0; i < 256; i++)
1644if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1645exit (0); }
1646
1647EOF
1648if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1649then
1650  :
1651else
1652  echo "configure: failed program was:" >&5
1653  cat conftest.$ac_ext >&5
1654  rm -fr conftest*
1655  ac_cv_header_stdc=no
1656fi
1657rm -fr conftest*
1658fi
1659
1660fi
1661fi
1662
1663echo "$ac_t""$ac_cv_header_stdc" 1>&6
1664if test $ac_cv_header_stdc = yes; then
1665  cat >> confdefs.h <<\EOF
1666#define STDC_HEADERS 1
1667EOF
1668
1669fi
1670
1671echo $ac_n "checking for off_t""... $ac_c" 1>&6
1672echo "configure:1673: checking for off_t" >&5
1673if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1674  echo $ac_n "(cached) $ac_c" 1>&6
1675else
1676  cat > conftest.$ac_ext <<EOF
1677#line 1678 "configure"
1678#include "confdefs.h"
1679#include <sys/types.h>
1680#if STDC_HEADERS
1681#include <stdlib.h>
1682#include <stddef.h>
1683#endif
1684EOF
1685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1686  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1687  rm -rf conftest*
1688  ac_cv_type_off_t=yes
1689else
1690  rm -rf conftest*
1691  ac_cv_type_off_t=no
1692fi
1693rm -f conftest*
1694
1695fi
1696echo "$ac_t""$ac_cv_type_off_t" 1>&6
1697if test $ac_cv_type_off_t = no; then
1698  cat >> confdefs.h <<\EOF
1699#define off_t long
1700EOF
1701
1702fi
1703
1704echo $ac_n "checking for void""... $ac_c" 1>&6
1705echo "configure:1706: checking for void" >&5
1706cat > conftest.$ac_ext <<EOF
1707#line 1708 "configure"
1708#include "confdefs.h"
1709
1710int main() {
1711void *foo = 0;
1712; return 0; }
1713EOF
1714if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1715  rm -rf conftest*
1716  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1717#define HAVE_VOID 1
1718EOF
1719
1720else
1721  echo "configure: failed program was:" >&5
1722  cat conftest.$ac_ext >&5
1723  rm -rf conftest*
1724  echo "$ac_t""no" 1>&6
1725fi
1726rm -f conftest*
1727echo $ac_n "checking for const""... $ac_c" 1>&6
1728echo "configure:1729: checking for const" >&5
1729cat > conftest.$ac_ext <<EOF
1730#line 1731 "configure"
1731#include "confdefs.h"
1732
1733int main() {
1734const int foo = 0;
1735; return 0; }
1736EOF
1737if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1738  rm -rf conftest*
1739  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1740#define HAVE_CONST 1
1741EOF
1742
1743else
1744  echo "configure: failed program was:" >&5
1745  cat conftest.$ac_ext >&5
1746  rm -rf conftest*
1747  echo "$ac_t""no" 1>&6
1748fi
1749rm -f conftest*
1750echo $ac_n "checking for time_t""... $ac_c" 1>&6
1751echo "configure:1752: checking for time_t" >&5
1752cat > conftest.$ac_ext <<EOF
1753#line 1754 "configure"
1754#include "confdefs.h"
1755#include <time.h>
1756int main() {
1757time_t t = 0;
1758; return 0; }
1759EOF
1760if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1761  rm -rf conftest*
1762  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1763#define HAVE_TIME_T 1
1764EOF
1765
1766else
1767  echo "configure: failed program was:" >&5
1768  cat conftest.$ac_ext >&5
1769  rm -rf conftest*
1770  echo "$ac_t""no" 1>&6
1771fi
1772rm -f conftest*
1773
1774echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1775echo "configure:1776: checking return type of signal handlers" >&5
1776if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1777  echo $ac_n "(cached) $ac_c" 1>&6
1778else
1779  cat > conftest.$ac_ext <<EOF
1780#line 1781 "configure"
1781#include "confdefs.h"
1782#include <sys/types.h>
1783#include <signal.h>
1784#ifdef signal
1785#undef signal
1786#endif
1787#ifdef __cplusplus
1788extern "C" void (*signal (int, void (*)(int)))(int);
1789#else
1790void (*signal ()) ();
1791#endif
1792
1793int main() {
1794int i;
1795; return 0; }
1796EOF
1797if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1798  rm -rf conftest*
1799  ac_cv_type_signal=void
1800else
1801  echo "configure: failed program was:" >&5
1802  cat conftest.$ac_ext >&5
1803  rm -rf conftest*
1804  ac_cv_type_signal=int
1805fi
1806rm -f conftest*
1807fi
1808
1809echo "$ac_t""$ac_cv_type_signal" 1>&6
1810cat >> confdefs.h <<EOF
1811#define RETSIGTYPE $ac_cv_type_signal
1812EOF
1813
1814
1815for ac_func in fsync memcpy popen _setjmp sigprocmask sigsetmask stat strchr strstr system
1816do
1817echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1818echo "configure:1819: checking for $ac_func" >&5
1819if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1820  echo $ac_n "(cached) $ac_c" 1>&6
1821else
1822  cat > conftest.$ac_ext <<EOF
1823#line 1824 "configure"
1824#include "confdefs.h"
1825/* System header to define __stub macros and hopefully few prototypes,
1826    which can conflict with char $ac_func(); below.  */
1827#include <assert.h>
1828/* Override any gcc2 internal prototype to avoid an error.  */
1829/* We use char because int might match the return type of a gcc2
1830    builtin and then its argument prototype would still apply.  */
1831char $ac_func();
1832
1833int main() {
1834
1835/* The GNU C library defines this for functions which it implements
1836    to always fail with ENOSYS.  Some functions are actually named
1837    something starting with __ and the normal name is an alias.  */
1838#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1839choke me
1840#else
1841$ac_func();
1842#endif
1843
1844; return 0; }
1845EOF
1846if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1847  rm -rf conftest*
1848  eval "ac_cv_func_$ac_func=yes"
1849else
1850  echo "configure: failed program was:" >&5
1851  cat conftest.$ac_ext >&5
1852  rm -rf conftest*
1853  eval "ac_cv_func_$ac_func=no"
1854fi
1855rm -f conftest*
1856fi
1857
1858if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1859  echo "$ac_t""yes" 1>&6
1860    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1861  cat >> confdefs.h <<EOF
1862#define $ac_tr_func 1
1863EOF
1864 
1865else
1866  echo "$ac_t""no" 1>&6
1867fi
1868done
1869
1870
1871echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
1872echo "configure:1873: checking for tcgetattr" >&5
1873if eval "test \"`echo '$''{'ac_cv_func_tcgetattr'+set}'`\" = set"; then
1874  echo $ac_n "(cached) $ac_c" 1>&6
1875else
1876  cat > conftest.$ac_ext <<EOF
1877#line 1878 "configure"
1878#include "confdefs.h"
1879/* System header to define __stub macros and hopefully few prototypes,
1880    which can conflict with char tcgetattr(); below.  */
1881#include <assert.h>
1882/* Override any gcc2 internal prototype to avoid an error.  */
1883/* We use char because int might match the return type of a gcc2
1884    builtin and then its argument prototype would still apply.  */
1885char tcgetattr();
1886
1887int main() {
1888
1889/* The GNU C library defines this for functions which it implements
1890    to always fail with ENOSYS.  Some functions are actually named
1891    something starting with __ and the normal name is an alias.  */
1892#if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
1893choke me
1894#else
1895tcgetattr();
1896#endif
1897
1898; return 0; }
1899EOF
1900if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1901  rm -rf conftest*
1902  eval "ac_cv_func_tcgetattr=yes"
1903else
1904  echo "configure: failed program was:" >&5
1905  cat conftest.$ac_ext >&5
1906  rm -rf conftest*
1907  eval "ac_cv_func_tcgetattr=no"
1908fi
1909rm -f conftest*
1910fi
1911
1912if eval "test \"`echo '$ac_cv_func_'tcgetattr`\" = yes"; then
1913  echo "$ac_t""yes" 1>&6
1914  cat >> confdefs.h <<\EOF
1915#define HAVE_TERMIOS_FUNCS 1
1916EOF
1917
1918else
1919  echo "$ac_t""no" 1>&6
1920fi
1921
1922
1923echo $ac_n "checking for fileno""... $ac_c" 1>&6
1924echo "configure:1925: checking for fileno" >&5
1925cat > conftest.$ac_ext <<EOF
1926#line 1927 "configure"
1927#include "confdefs.h"
1928
1929#if HAVE_STDIO_H
1930#include <stdio.h>
1931#endif
1932int main() {
1933static int x; x = fileno(stdin);
1934; return 0; }
1935EOF
1936if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1937  rm -rf conftest*
1938  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1939#define HAVE_FILENO 1
1940EOF
1941
1942else
1943  echo "configure: failed program was:" >&5
1944  cat conftest.$ac_ext >&5
1945  rm -rf conftest*
1946  echo "$ac_t""no" 1>&6
1947fi
1948rm -f conftest*
1949
1950echo $ac_n "checking for strerror""... $ac_c" 1>&6
1951echo "configure:1952: checking for strerror" >&5
1952cat > conftest.$ac_ext <<EOF
1953#line 1954 "configure"
1954#include "confdefs.h"
1955
1956#if HAVE_STDIO_H
1957#include <stdio.h>
1958#endif
1959#if HAVE_STRING_H
1960#include <string.h>
1961#endif
1962#if HAVE_ERRNO_H
1963#include <errno.h>
1964#endif
1965int main() {
1966static char *x; x = strerror(0);
1967; return 0; }
1968EOF
1969if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1970  rm -rf conftest*
1971  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1972#define HAVE_STRERROR 1
1973EOF
1974
1975else
1976  echo "configure: failed program was:" >&5
1977  cat conftest.$ac_ext >&5
1978  rm -rf conftest*
1979  echo "$ac_t""no" 1>&6
1980fi
1981rm -f conftest*
1982
1983echo $ac_n "checking for sys_errlist""... $ac_c" 1>&6
1984echo "configure:1985: checking for sys_errlist" >&5
1985cat > conftest.$ac_ext <<EOF
1986#line 1987 "configure"
1987#include "confdefs.h"
1988
1989int main() {
1990extern char *sys_errlist[]; static char **x; x = sys_errlist;
1991; return 0; }
1992EOF
1993if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1994  rm -rf conftest*
1995  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1996#define HAVE_SYS_ERRLIST 1
1997EOF
1998
1999else
2000  echo "configure: failed program was:" >&5
2001  cat conftest.$ac_ext >&5
2002  rm -rf conftest*
2003  echo "$ac_t""no" 1>&6
2004fi
2005rm -f conftest*
2006
2007echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
2008echo "configure:2009: checking for sigset_t" >&5
2009cat > conftest.$ac_ext <<EOF
2010#line 2011 "configure"
2011#include "confdefs.h"
2012
2013#include <signal.h>
2014
2015int main() {
2016sigset_t s; s = 0;
2017; return 0; }
2018EOF
2019if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2020  rm -rf conftest*
2021  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2022#define HAVE_SIGSET_T 1
2023EOF
2024
2025else
2026  echo "configure: failed program was:" >&5
2027  cat conftest.$ac_ext >&5
2028  rm -rf conftest*
2029  echo "$ac_t""no" 1>&6
2030fi
2031rm -f conftest*
2032
2033echo $ac_n "checking for sigemptyset""... $ac_c" 1>&6
2034echo "configure:2035: checking for sigemptyset" >&5
2035cat > conftest.$ac_ext <<EOF
2036#line 2037 "configure"
2037#include "confdefs.h"
2038
2039#include <signal.h>
2040
2041int main() {
2042sigset_t s; sigemptyset(&s);
2043; return 0; }
2044EOF
2045if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2046  rm -rf conftest*
2047  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2048#define HAVE_SIGEMPTYSET 1
2049EOF
2050
2051else
2052  echo "configure: failed program was:" >&5
2053  cat conftest.$ac_ext >&5
2054  rm -rf conftest*
2055  echo "$ac_t""no" 1>&6
2056fi
2057rm -f conftest*
2058
2059have_errno=no
2060echo $ac_n "checking for errno""... $ac_c" 1>&6
2061echo "configure:2062: checking for errno" >&5
2062cat > conftest.$ac_ext <<EOF
2063#line 2064 "configure"
2064#include "confdefs.h"
2065
2066#if HAVE_ERRNO_H
2067#include <errno.h>
2068#endif
2069int main() {
2070static int x; x = errno;
2071; return 0; }
2072EOF
2073if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2074  rm -rf conftest*
2075  echo "$ac_t""yes - in errno.h" 1>&6; cat >> confdefs.h <<\EOF
2076#define HAVE_ERRNO 1
2077EOF
2078 have_errno=yes
2079else
2080  echo "configure: failed program was:" >&5
2081  cat conftest.$ac_ext >&5
2082fi
2083rm -f conftest*
2084if test $have_errno = no; then
2085cat > conftest.$ac_ext <<EOF
2086#line 2087 "configure"
2087#include "confdefs.h"
2088
2089#if HAVE_ERRNO_H
2090#include <errno.h>
2091#endif
2092int main() {
2093extern int errno; static int x; x = errno;
2094; return 0; }
2095EOF
2096if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2097  rm -rf conftest*
2098  echo "$ac_t""yes - must define" 1>&6; cat >> confdefs.h <<\EOF
2099#define HAVE_ERRNO 1
2100EOF
2101 cat >> confdefs.h <<\EOF
2102#define MUST_DEFINE_ERRNO 1
2103EOF
2104
2105else
2106  echo "configure: failed program was:" >&5
2107  cat conftest.$ac_ext >&5
2108  rm -rf conftest*
2109  echo "$ac_t""no" 1>&6
2110fi
2111rm -f conftest*
2112fi
2113
2114echo $ac_n "checking for locale""... $ac_c" 1>&6
2115echo "configure:2116: checking for locale" >&5
2116cat > conftest.$ac_ext <<EOF
2117#line 2118 "configure"
2118#include "confdefs.h"
2119#include <locale.h>
2120#include <ctype.h>
2121int main() {
2122setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);
2123; return 0; }
2124EOF
2125if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2126  rm -rf conftest*
2127  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2128#define HAVE_LOCALE 1
2129EOF
2130
2131else
2132  echo "configure: failed program was:" >&5
2133  cat conftest.$ac_ext >&5
2134  rm -rf conftest*
2135  echo "$ac_t""no" 1>&6
2136fi
2137rm -f conftest*
2138echo $ac_n "checking for ctype functions""... $ac_c" 1>&6
2139echo "configure:2140: checking for ctype functions" >&5
2140cat > conftest.$ac_ext <<EOF
2141#line 2142 "configure"
2142#include "confdefs.h"
2143
2144#if HAVE_CTYPE_H
2145#include <ctype.h>
2146#endif
2147int main() {
2148static int x; x = isupper(x); x = tolower(x); x = toupper(x);
2149; return 0; }
2150EOF
2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2152  rm -rf conftest*
2153  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2154#define HAVE_UPPER_LOWER 1
2155EOF
2156
2157else
2158  echo "configure: failed program was:" >&5
2159  cat conftest.$ac_ext >&5
2160  rm -rf conftest*
2161  echo "$ac_t""no" 1>&6
2162fi
2163rm -f conftest*
2164
2165have_ospeed=no
2166echo $ac_n "checking termcap for ospeed""... $ac_c" 1>&6
2167echo "configure:2168: checking termcap for ospeed" >&5
2168cat > conftest.$ac_ext <<EOF
2169#line 2170 "configure"
2170#include "confdefs.h"
2171
2172#include <sys/types.h>
2173#if HAVE_TERMIOS_H
2174#include <termios.h>
2175#endif
2176#if HAVE_TERMCAP_H
2177#include <termcap.h>
2178#endif
2179int main() {
2180ospeed = 0;
2181; return 0; }
2182EOF
2183if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2184  rm -rf conftest*
2185  echo "$ac_t""yes - in termcap.h" 1>&6; cat >> confdefs.h <<\EOF
2186#define HAVE_OSPEED 1
2187EOF
2188 have_ospeed=yes
2189else
2190  echo "configure: failed program was:" >&5
2191  cat conftest.$ac_ext >&5
2192fi
2193rm -f conftest*
2194if test $have_ospeed = no; then
2195cat > conftest.$ac_ext <<EOF
2196#line 2197 "configure"
2197#include "confdefs.h"
2198
2199int main() {
2200extern short ospeed; ospeed = 0;
2201; return 0; }
2202EOF
2203if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204  rm -rf conftest*
2205  echo "$ac_t""yes - must define" 1>&6; cat >> confdefs.h <<\EOF
2206#define HAVE_OSPEED 1
2207EOF
2208 cat >> confdefs.h <<\EOF
2209#define MUST_DEFINE_OSPEED 1
2210EOF
2211
2212else
2213  echo "configure: failed program was:" >&5
2214  cat conftest.$ac_ext >&5
2215  rm -rf conftest*
2216  echo "$ac_t""no" 1>&6
2217fi
2218rm -f conftest*
2219fi
2220
2221have_regex=no
2222have_posix_regex=unknown
2223echo $ac_n "checking for regcomp""... $ac_c" 1>&6
2224echo "configure:2225: checking for regcomp" >&5
2225
2226WANT_REGEX=auto
2227# Check whether --with-regex or --without-regex was given.
2228if test "${with_regex+set}" = set; then
2229  withval="$with_regex"
2230  WANT_REGEX="$withval"
2231fi
2232
2233
2234if test $have_regex = no; then
2235if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
2236if test "$cross_compiling" = yes; then
2237  have_posix_regex=unknown
2238else
2239  cat > conftest.$ac_ext <<EOF
2240#line 2241 "configure"
2241#include "confdefs.h"
2242
2243#include <sys/types.h>
2244#include <regex.h>
2245main() { regex_t r; regmatch_t rm; char *text = "xabcy";
2246if (regcomp(&r, "abc", 0)) exit(1);
2247if (regexec(&r, text, 1, &rm, 0)) exit(1);
2248#ifndef __WATCOMC__
2249if (rm.rm_so != 1) exit(1); /* check for correct offset */
2250#else
2251if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
2252#endif
2253exit(0); }
2254EOF
2255if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2256then
2257  have_posix_regex=yes
2258else
2259  echo "configure: failed program was:" >&5
2260  cat conftest.$ac_ext >&5
2261  rm -fr conftest*
2262  have_posix_regex=no
2263fi
2264rm -fr conftest*
2265fi
2266
2267if test $have_posix_regex = yes; then
2268  echo "$ac_t""using POSIX regcomp" 1>&6
2269  cat >> confdefs.h <<\EOF
2270#define HAVE_POSIX_REGCOMP 1
2271EOF
2272
2273  have_regex=yes
2274elif test $have_posix_regex = unknown; then
2275  cat > conftest.$ac_ext <<EOF
2276#line 2277 "configure"
2277#include "confdefs.h"
2278
2279#include <sys/types.h>
2280#include <regex.h>
2281int main() {
2282regex_t *r; regfree(r);
2283; return 0; }
2284EOF
2285if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2286  rm -rf conftest*
2287  echo "$ac_t""using POSIX regcomp" 1>&6
2288  cat >> confdefs.h <<\EOF
2289#define HAVE_POSIX_REGCOMP 1
2290EOF
2291 have_regex=yes
2292else
2293  echo "configure: failed program was:" >&5
2294  cat conftest.$ac_ext >&5
2295fi
2296rm -f conftest*
2297else
2298  echo "$ac_t""no" 1>&6
2299fi
2300fi
2301fi
2302
2303if test $have_regex = no; then
2304if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
2305echo $ac_n "checking for pcre_compile in -lpcre""... $ac_c" 1>&6
2306echo "configure:2307: checking for pcre_compile in -lpcre" >&5
2307ac_lib_var=`echo pcre'_'pcre_compile | sed 'y%./+-%__p_%'`
2308if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2309  echo $ac_n "(cached) $ac_c" 1>&6
2310else
2311  ac_save_LIBS="$LIBS"
2312LIBS="-lpcre  $LIBS"
2313cat > conftest.$ac_ext <<EOF
2314#line 2315 "configure"
2315#include "confdefs.h"
2316/* Override any gcc2 internal prototype to avoid an error.  */
2317/* We use char because int might match the return type of a gcc2
2318    builtin and then its argument prototype would still apply.  */
2319char pcre_compile();
2320
2321int main() {
2322pcre_compile()
2323; return 0; }
2324EOF
2325if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326  rm -rf conftest*
2327  eval "ac_cv_lib_$ac_lib_var=yes"
2328else
2329  echo "configure: failed program was:" >&5
2330  cat conftest.$ac_ext >&5
2331  rm -rf conftest*
2332  eval "ac_cv_lib_$ac_lib_var=no"
2333fi
2334rm -f conftest*
2335LIBS="$ac_save_LIBS"
2336
2337fi
2338if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2339  echo "$ac_t""yes" 1>&6
2340  echo "$ac_t""using pcre" 1>&6; cat >> confdefs.h <<\EOF
2341#define HAVE_PCRE 1
2342EOF
2343 LIBS="$LIBS -lpcre" have_regex=yes
2344else
2345  echo "$ac_t""no" 1>&6
2346fi
2347
2348fi
2349fi
2350
2351if test $have_regex = no; then
2352if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
2353echo $ac_n "checking for regcmp""... $ac_c" 1>&6
2354echo "configure:2355: checking for regcmp" >&5
2355if eval "test \"`echo '$''{'ac_cv_func_regcmp'+set}'`\" = set"; then
2356  echo $ac_n "(cached) $ac_c" 1>&6
2357else
2358  cat > conftest.$ac_ext <<EOF
2359#line 2360 "configure"
2360#include "confdefs.h"
2361/* System header to define __stub macros and hopefully few prototypes,
2362    which can conflict with char regcmp(); below.  */
2363#include <assert.h>
2364/* Override any gcc2 internal prototype to avoid an error.  */
2365/* We use char because int might match the return type of a gcc2
2366    builtin and then its argument prototype would still apply.  */
2367char regcmp();
2368
2369int main() {
2370
2371/* The GNU C library defines this for functions which it implements
2372    to always fail with ENOSYS.  Some functions are actually named
2373    something starting with __ and the normal name is an alias.  */
2374#if defined (__stub_regcmp) || defined (__stub___regcmp)
2375choke me
2376#else
2377regcmp();
2378#endif
2379
2380; return 0; }
2381EOF
2382if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2383  rm -rf conftest*
2384  eval "ac_cv_func_regcmp=yes"
2385else
2386  echo "configure: failed program was:" >&5
2387  cat conftest.$ac_ext >&5
2388  rm -rf conftest*
2389  eval "ac_cv_func_regcmp=no"
2390fi
2391rm -f conftest*
2392fi
2393
2394if eval "test \"`echo '$ac_cv_func_'regcmp`\" = yes"; then
2395  echo "$ac_t""yes" 1>&6
2396  echo "$ac_t""using regcmp" 1>&6; cat >> confdefs.h <<\EOF
2397#define HAVE_REGCMP 1
2398EOF
2399 have_regex=yes
2400else
2401  echo "$ac_t""no" 1>&6
2402fi
2403
2404fi
2405fi
2406
2407if test $have_regex = no; then
2408if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
2409cat > conftest.$ac_ext <<EOF
2410#line 2411 "configure"
2411#include "confdefs.h"
2412
2413#include "regexp.h"
2414int main() {
2415regcomp("");
2416; return 0; }
2417EOF
2418if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2419  rm -rf conftest*
2420  echo "$ac_t""using V8 regcomp" 1>&6; cat >> confdefs.h <<\EOF
2421#define HAVE_V8_REGCOMP 1
2422EOF
2423 have_regex=yes
2424else
2425  echo "configure: failed program was:" >&5
2426  cat conftest.$ac_ext >&5
2427fi
2428rm -f conftest*
2429fi
2430fi
2431
2432if test $have_regex = no && test -f ${srcdir}/regexp.c; then
2433if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
2434echo "$ac_t""using V8 regcomp -- local source" 1>&6; cat >> confdefs.h <<\EOF
2435#define HAVE_V8_REGCOMP 1
2436EOF
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_REGEXEC2 1
2439EOF
2440 REGEX_O='regexp.$(O)'  have_regex=yes
2441fi
2442fi
2443
2444if test $have_regex = no; then
2445if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
2446echo "$ac_t""using re_comp" 1>&6; echo $ac_n "checking for re_comp""... $ac_c" 1>&6
2447echo "configure:2448: checking for re_comp" >&5
2448if eval "test \"`echo '$''{'ac_cv_func_re_comp'+set}'`\" = set"; then
2449  echo $ac_n "(cached) $ac_c" 1>&6
2450else
2451  cat > conftest.$ac_ext <<EOF
2452#line 2453 "configure"
2453#include "confdefs.h"
2454/* System header to define __stub macros and hopefully few prototypes,
2455    which can conflict with char re_comp(); below.  */
2456#include <assert.h>
2457/* Override any gcc2 internal prototype to avoid an error.  */
2458/* We use char because int might match the return type of a gcc2
2459    builtin and then its argument prototype would still apply.  */
2460char re_comp();
2461
2462int main() {
2463
2464/* The GNU C library defines this for functions which it implements
2465    to always fail with ENOSYS.  Some functions are actually named
2466    something starting with __ and the normal name is an alias.  */
2467#if defined (__stub_re_comp) || defined (__stub___re_comp)
2468choke me
2469#else
2470re_comp();
2471#endif
2472
2473; return 0; }
2474EOF
2475if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2476  rm -rf conftest*
2477  eval "ac_cv_func_re_comp=yes"
2478else
2479  echo "configure: failed program was:" >&5
2480  cat conftest.$ac_ext >&5
2481  rm -rf conftest*
2482  eval "ac_cv_func_re_comp=no"
2483fi
2484rm -f conftest*
2485fi
2486
2487if eval "test \"`echo '$ac_cv_func_'re_comp`\" = yes"; then
2488  echo "$ac_t""yes" 1>&6
2489  cat >> confdefs.h <<\EOF
2490#define HAVE_RE_COMP 1
2491EOF
2492 have_regex=yes
2493else
2494  echo "$ac_t""no" 1>&6
2495fi
2496
2497fi
2498fi
2499
2500if test $have_regex = no; then
2501echo "$ac_t""cannot find regular expression library" 1>&6; cat >> confdefs.h <<\EOF
2502#define NO_REGEX 1
2503EOF
2504
2505fi
2506
2507# Check whether --with-editor or --without-editor was given.
2508if test "${with_editor+set}" = set; then
2509  withval="$with_editor"
2510  cat >> confdefs.h <<EOF
2511#define EDIT_PGM "$withval"
2512EOF
2513
2514fi
2515
2516
2517trap '' 1 2 15
2518cat > confcache <<\EOF
2519# This file is a shell script that caches the results of configure
2520# tests run on this system so they can be shared between configure
2521# scripts and configure runs.  It is not useful on other systems.
2522# If it contains results you don't want to keep, you may remove or edit it.
2523#
2524# By default, configure uses ./config.cache as the cache file,
2525# creating it if it does not exist already.  You can give configure
2526# the --cache-file=FILE option to use a different cache file; that is
2527# what configure does when it calls configure scripts in
2528# subdirectories, so they share the cache.
2529# Giving --cache-file=/dev/null disables caching, for debugging configure.
2530# config.status only pays attention to the cache file if you give it the
2531# --recheck option to rerun configure.
2532#
2533EOF
2534# The following way of writing the cache mishandles newlines in values,
2535# but we know of no workaround that is simple, portable, and efficient.
2536# So, don't put newlines in cache variables' values.
2537# Ultrix sh set writes to stderr and can't be redirected directly,
2538# and sets the high bit in the cache file unless we assign to the vars.
2539(set) 2>&1 |
2540  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2541  *ac_space=\ *)
2542    # `set' does not quote correctly, so add quotes (double-quote substitution
2543    # turns \\\\ into \\, and sed turns \\ into \).
2544    sed -n \
2545      -e "s/'/'\\\\''/g" \
2546      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2547    ;;
2548  *)
2549    # `set' quotes correctly as required by POSIX, so do not add quotes.
2550    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2551    ;;
2552  esac >> confcache
2553if cmp -s $cache_file confcache; then
2554  :
2555else
2556  if test -w $cache_file; then
2557    echo "updating cache $cache_file"
2558    cat confcache > $cache_file
2559  else
2560    echo "not updating unwritable cache $cache_file"
2561  fi
2562fi
2563rm -f confcache
2564
2565trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2566
2567test "x$prefix" = xNONE && prefix=$ac_default_prefix
2568# Let make expand exec_prefix.
2569test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2570
2571# Any assignment to VPATH causes Sun make to only execute
2572# the first set of double-colon rules, so remove it if not needed.
2573# If there is a colon in the path, we need to keep it.
2574if test "x$srcdir" = x.; then
2575  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2576fi
2577
2578trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2579
2580DEFS=-DHAVE_CONFIG_H
2581
2582# Without the "./", some shells look in PATH for config.status.
2583: ${CONFIG_STATUS=./config.status}
2584
2585echo creating $CONFIG_STATUS
2586rm -f $CONFIG_STATUS
2587cat > $CONFIG_STATUS <<EOF
2588#! /bin/sh
2589# Generated automatically by configure.
2590# Run this file to recreate the current configuration.
2591# This directory was configured as follows,
2592# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2593#
2594# $0 $ac_configure_args
2595#
2596# Compiler output produced by configure, useful for debugging
2597# configure, is in ./config.log if it exists.
2598
2599ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2600for ac_option
2601do
2602  case "\$ac_option" in
2603  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2604    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2605    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2606  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2607    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2608    exit 0 ;;
2609  -help | --help | --hel | --he | --h)
2610    echo "\$ac_cs_usage"; exit 0 ;;
2611  *) echo "\$ac_cs_usage"; exit 1 ;;
2612  esac
2613done
2614
2615ac_given_srcdir=$srcdir
2616ac_given_INSTALL="$INSTALL"
2617
2618trap 'rm -fr `echo "Makefile defines.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2619EOF
2620cat >> $CONFIG_STATUS <<EOF
2621
2622# Protect against being on the right side of a sed subst in config.status.
2623sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2624 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2625$ac_vpsub
2626$extrasub
2627s%@SHELL@%$SHELL%g
2628s%@CFLAGS@%$CFLAGS%g
2629s%@CPPFLAGS@%$CPPFLAGS%g
2630s%@CXXFLAGS@%$CXXFLAGS%g
2631s%@FFLAGS@%$FFLAGS%g
2632s%@DEFS@%$DEFS%g
2633s%@LDFLAGS@%$LDFLAGS%g
2634s%@LIBS@%$LIBS%g
2635s%@exec_prefix@%$exec_prefix%g
2636s%@prefix@%$prefix%g
2637s%@program_transform_name@%$program_transform_name%g
2638s%@bindir@%$bindir%g
2639s%@sbindir@%$sbindir%g
2640s%@libexecdir@%$libexecdir%g
2641s%@datadir@%$datadir%g
2642s%@sysconfdir@%$sysconfdir%g
2643s%@sharedstatedir@%$sharedstatedir%g
2644s%@localstatedir@%$localstatedir%g
2645s%@libdir@%$libdir%g
2646s%@includedir@%$includedir%g
2647s%@oldincludedir@%$oldincludedir%g
2648s%@infodir@%$infodir%g
2649s%@mandir@%$mandir%g
2650s%@CC@%$CC%g
2651s%@CPP@%$CPP%g
2652s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2653s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2654s%@INSTALL_DATA@%$INSTALL_DATA%g
2655s%@REGEX_O@%$REGEX_O%g
2656
2657CEOF
2658EOF
2659
2660cat >> $CONFIG_STATUS <<\EOF
2661
2662# Split the substitutions into bite-sized pieces for seds with
2663# small command number limits, like on Digital OSF/1 and HP-UX.
2664ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2665ac_file=1 # Number of current file.
2666ac_beg=1 # First line for current file.
2667ac_end=$ac_max_sed_cmds # Line after last line for current file.
2668ac_more_lines=:
2669ac_sed_cmds=""
2670while $ac_more_lines; do
2671  if test $ac_beg -gt 1; then
2672    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2673  else
2674    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2675  fi
2676  if test ! -s conftest.s$ac_file; then
2677    ac_more_lines=false
2678    rm -f conftest.s$ac_file
2679  else
2680    if test -z "$ac_sed_cmds"; then
2681      ac_sed_cmds="sed -f conftest.s$ac_file"
2682    else
2683      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2684    fi
2685    ac_file=`expr $ac_file + 1`
2686    ac_beg=$ac_end
2687    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2688  fi
2689done
2690if test -z "$ac_sed_cmds"; then
2691  ac_sed_cmds=cat
2692fi
2693EOF
2694
2695cat >> $CONFIG_STATUS <<EOF
2696
2697CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2698EOF
2699cat >> $CONFIG_STATUS <<\EOF
2700for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2701  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2702  case "$ac_file" in
2703  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2704       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2705  *) ac_file_in="${ac_file}.in" ;;
2706  esac
2707
2708  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2709
2710  # Remove last slash and all that follows it.  Not all systems have dirname.
2711  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2712  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2713    # The file is in a subdirectory.
2714    test ! -d "$ac_dir" && mkdir "$ac_dir"
2715    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2716    # A "../" for each directory in $ac_dir_suffix.
2717    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2718  else
2719    ac_dir_suffix= ac_dots=
2720  fi
2721
2722  case "$ac_given_srcdir" in
2723  .)  srcdir=.
2724      if test -z "$ac_dots"; then top_srcdir=.
2725      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2726  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2727  *) # Relative path.
2728    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2729    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2730  esac
2731
2732  case "$ac_given_INSTALL" in
2733  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2734  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2735  esac
2736
2737  echo creating "$ac_file"
2738  rm -f "$ac_file"
2739  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2740  case "$ac_file" in
2741  *Makefile*) ac_comsub="1i\\
2742# $configure_input" ;;
2743  *) ac_comsub= ;;
2744  esac
2745
2746  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2747  sed -e "$ac_comsub
2748s%@configure_input@%$configure_input%g
2749s%@srcdir@%$srcdir%g
2750s%@top_srcdir@%$top_srcdir%g
2751s%@INSTALL@%$INSTALL%g
2752" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2753fi; done
2754rm -f conftest.s*
2755
2756# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2757# NAME is the cpp macro being defined and VALUE is the value it is being given.
2758#
2759# ac_d sets the value in "#define NAME VALUE" lines.
2760ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
2761ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
2762ac_dC='\3'
2763ac_dD='%g'
2764# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2765ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2766ac_uB='\([ 	]\)%\1#\2define\3'
2767ac_uC=' '
2768ac_uD='\4%g'
2769# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2770ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2771ac_eB='$%\1#\2define\3'
2772ac_eC=' '
2773ac_eD='%g'
2774
2775if test "${CONFIG_HEADERS+set}" != set; then
2776EOF
2777cat >> $CONFIG_STATUS <<EOF
2778  CONFIG_HEADERS="defines.h"
2779EOF
2780cat >> $CONFIG_STATUS <<\EOF
2781fi
2782for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2783  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2784  case "$ac_file" in
2785  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2786       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2787  *) ac_file_in="${ac_file}.in" ;;
2788  esac
2789
2790  echo creating $ac_file
2791
2792  rm -f conftest.frag conftest.in conftest.out
2793  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2794  cat $ac_file_inputs > conftest.in
2795
2796EOF
2797
2798# Transform confdefs.h into a sed script conftest.vals that substitutes
2799# the proper values into config.h.in to produce config.h.  And first:
2800# Protect against being on the right side of a sed subst in config.status.
2801# Protect against being in an unquoted here document in config.status.
2802rm -f conftest.vals
2803cat > conftest.hdr <<\EOF
2804s/[\\&%]/\\&/g
2805s%[\\$`]%\\&%g
2806s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2807s%ac_d%ac_u%gp
2808s%ac_u%ac_e%gp
2809EOF
2810sed -n -f conftest.hdr confdefs.h > conftest.vals
2811rm -f conftest.hdr
2812
2813# This sed command replaces #undef with comments.  This is necessary, for
2814# example, in the case of _POSIX_SOURCE, which is predefined and required
2815# on some systems where configure will not decide to define it.
2816cat >> conftest.vals <<\EOF
2817s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2818EOF
2819
2820# Break up conftest.vals because some shells have a limit on
2821# the size of here documents, and old seds have small limits too.
2822
2823rm -f conftest.tail
2824while :
2825do
2826  ac_lines=`grep -c . conftest.vals`
2827  # grep -c gives empty output for an empty file on some AIX systems.
2828  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2829  # Write a limited-size here document to conftest.frag.
2830  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2831  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2832  echo 'CEOF
2833  sed -f conftest.frag conftest.in > conftest.out
2834  rm -f conftest.in
2835  mv conftest.out conftest.in
2836' >> $CONFIG_STATUS
2837  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2838  rm -f conftest.vals
2839  mv conftest.tail conftest.vals
2840done
2841rm -f conftest.vals
2842
2843cat >> $CONFIG_STATUS <<\EOF
2844  rm -f conftest.frag conftest.h
2845  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2846  cat conftest.in >> conftest.h
2847  rm -f conftest.in
2848  if cmp -s $ac_file conftest.h 2>/dev/null; then
2849    echo "$ac_file is unchanged"
2850    rm -f conftest.h
2851  else
2852    # Remove last slash and all that follows it.  Not all systems have dirname.
2853      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2854      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2855      # The file is in a subdirectory.
2856      test ! -d "$ac_dir" && mkdir "$ac_dir"
2857    fi
2858    rm -f $ac_file
2859    mv conftest.h $ac_file
2860  fi
2861fi; done
2862
2863EOF
2864cat >> $CONFIG_STATUS <<EOF
2865
2866EOF
2867cat >> $CONFIG_STATUS <<\EOF
2868
2869exit 0
2870EOF
2871chmod +x $CONFIG_STATUS
2872rm -fr confdefs* $ac_clean_files
2873test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2874
2875