configure revision 18099
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.4 
5# Copyright (C) 1992, 1993, 1994 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:
14
15# Initialize some variables set by options.
16# The variables have the same names as the options, with
17# dashes changed to underlines.
18build=NONE
19cache_file=./config.cache
20exec_prefix=NONE
21host=NONE
22no_create=
23nonopt=NONE
24no_recursion=
25prefix=NONE
26program_prefix=NONE
27program_suffix=NONE
28program_transform_name=s,x,x,
29silent=
30site=
31srcdir=
32target=NONE
33verbose=
34x_includes=NONE
35x_libraries=NONE
36
37# Initialize some other variables.
38subdirs=
39
40ac_prev=
41for ac_option
42do
43
44  # If the previous option needs an argument, assign it.
45  if test -n "$ac_prev"; then
46    eval "$ac_prev=\$ac_option"
47    ac_prev=
48    continue
49  fi
50
51  case "$ac_option" in
52  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53  *) ac_optarg= ;;
54  esac
55
56  # Accept the important Cygnus configure options, so we can diagnose typos.
57
58  case "$ac_option" in
59
60  -build | --build | --buil | --bui | --bu | --b)
61    ac_prev=build ;;
62  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
63    build="$ac_optarg" ;;
64
65  -cache-file | --cache-file | --cache-fil | --cache-fi \
66  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
67    ac_prev=cache_file ;;
68  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
69  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
70    cache_file="$ac_optarg" ;;
71
72  -disable-* | --disable-*)
73    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
74    # Reject names that are not valid shell variable names.
75    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
76      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
77    fi
78    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
79    eval "enable_${ac_feature}=no" ;;
80
81  -enable-* | --enable-*)
82    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
83    # Reject names that are not valid shell variable names.
84    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
85      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
86    fi
87    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
88    case "$ac_option" in
89      *=*) ;;
90      *) ac_optarg=yes ;;
91    esac
92    eval "enable_${ac_feature}='$ac_optarg'" ;;
93
94  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
96  | --exec | --exe | --ex)
97    ac_prev=exec_prefix ;;
98  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
99  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
100  | --exec=* | --exe=* | --ex=*)
101    exec_prefix="$ac_optarg" ;;
102
103  -gas | --gas | --ga | --g)
104    # Obsolete; use --with-gas.
105    with_gas=yes ;;
106
107  -help | --help | --hel | --he)
108    # Omit some internal or obsolete options to make the list less imposing.
109    # This message is too long to be a string in the A/UX 3.1 sh.
110    cat << EOF
111Usage: configure [options] [host]
112Options: [defaults in brackets after descriptions]
113Configuration:
114  --cache-file=FILE       cache test results in FILE
115  --help                  print this message
116  --no-create             do not create output files
117  --quiet, --silent       do not print \`checking...' messages
118  --version               print the version of autoconf that created configure
119Directory and file names:
120  --prefix=PREFIX         install architecture-independent files in PREFIX
121                          [$ac_default_prefix]
122  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
123                          [same as prefix]
124  --srcdir=DIR            find the sources in DIR [configure dir or ..]
125  --program-prefix=PREFIX prepend PREFIX to installed program names
126  --program-suffix=SUFFIX append SUFFIX to installed program names
127  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
128Host type:
129  --build=BUILD           configure for building on BUILD [BUILD=HOST]
130  --host=HOST             configure for HOST [guessed]
131  --target=TARGET         configure for TARGET [TARGET=HOST]
132Features and packages:
133  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
134  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
135  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
136  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
137  --x-includes=DIR        X include files are in DIR
138  --x-libraries=DIR       X library files are in DIR
139--enable and --with options recognized:$ac_help
140EOF
141    exit 0 ;;
142
143  -host | --host | --hos | --ho)
144    ac_prev=host ;;
145  -host=* | --host=* | --hos=* | --ho=*)
146    host="$ac_optarg" ;;
147
148  -nfp | --nfp | --nf)
149    # Obsolete; use --without-fp.
150    with_fp=no ;;
151
152  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
153  | --no-cr | --no-c)
154    no_create=yes ;;
155
156  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
157  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
158    no_recursion=yes ;;
159
160  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
161    ac_prev=prefix ;;
162  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
163    prefix="$ac_optarg" ;;
164
165  -program-prefix | --program-prefix | --program-prefi | --program-pref \
166  | --program-pre | --program-pr | --program-p)
167    ac_prev=program_prefix ;;
168  -program-prefix=* | --program-prefix=* | --program-prefi=* \
169  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
170    program_prefix="$ac_optarg" ;;
171
172  -program-suffix | --program-suffix | --program-suffi | --program-suff \
173  | --program-suf | --program-su | --program-s)
174    ac_prev=program_suffix ;;
175  -program-suffix=* | --program-suffix=* | --program-suffi=* \
176  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
177    program_suffix="$ac_optarg" ;;
178
179  -program-transform-name | --program-transform-name \
180  | --program-transform-nam | --program-transform-na \
181  | --program-transform-n | --program-transform- \
182  | --program-transform | --program-transfor \
183  | --program-transfo | --program-transf \
184  | --program-trans | --program-tran \
185  | --progr-tra | --program-tr | --program-t)
186    ac_prev=program_transform_name ;;
187  -program-transform-name=* | --program-transform-name=* \
188  | --program-transform-nam=* | --program-transform-na=* \
189  | --program-transform-n=* | --program-transform-=* \
190  | --program-transform=* | --program-transfor=* \
191  | --program-transfo=* | --program-transf=* \
192  | --program-trans=* | --program-tran=* \
193  | --progr-tra=* | --program-tr=* | --program-t=*)
194    program_transform_name="$ac_optarg" ;;
195
196  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
197  | -silent | --silent | --silen | --sile | --sil)
198    silent=yes ;;
199
200  -site | --site | --sit)
201    ac_prev=site ;;
202  -site=* | --site=* | --sit=*)
203    site="$ac_optarg" ;;
204
205  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
206    ac_prev=srcdir ;;
207  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
208    srcdir="$ac_optarg" ;;
209
210  -target | --target | --targe | --targ | --tar | --ta | --t)
211    ac_prev=target ;;
212  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
213    target="$ac_optarg" ;;
214
215  -v | -verbose | --verbose | --verbos | --verbo | --verb)
216    verbose=yes ;;
217
218  -version | --version | --versio | --versi | --vers)
219    echo "configure generated by autoconf version 2.4"
220    exit 0 ;;
221
222  -with-* | --with-*)
223    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
224    # Reject names that are not valid shell variable names.
225    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
226      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
227    fi
228    ac_package=`echo $ac_package| sed 's/-/_/g'`
229    case "$ac_option" in
230      *=*) ;;
231      *) ac_optarg=yes ;;
232    esac
233    eval "with_${ac_package}='$ac_optarg'" ;;
234
235  -without-* | --without-*)
236    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
237    # Reject names that are not valid shell variable names.
238    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
239      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
240    fi
241    ac_package=`echo $ac_package| sed 's/-/_/g'`
242    eval "with_${ac_package}=no" ;;
243
244  --x)
245    # Obsolete; use --with-x.
246    with_x=yes ;;
247
248  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
249  | --x-incl | --x-inc | --x-in | --x-i)
250    ac_prev=x_includes ;;
251  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
252  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
253    x_includes="$ac_optarg" ;;
254
255  -x-libraries | --x-libraries | --x-librarie | --x-librari \
256  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
257    ac_prev=x_libraries ;;
258  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
259  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
260    x_libraries="$ac_optarg" ;;
261
262  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
263    ;;
264
265  *) 
266    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
267      echo "configure: warning: $ac_option: invalid host type" 1>&2
268    fi
269    if test "x$nonopt" != xNONE; then
270      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
271    fi
272    nonopt="$ac_option"
273    ;;
274
275  esac
276done
277
278if test -n "$ac_prev"; then
279  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280fi
281
282trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
283
284# File descriptor usage:
285# 0 standard input
286# 1 file creation
287# 2 errors and warnings
288# 3 some systems may open it to /dev/tty
289# 4 used on the Kubota Titan
290# 6 checking for... messages and results
291# 5 compiler messages saved in config.log
292if test "$silent" = yes; then
293  exec 6>/dev/null
294else
295  exec 6>&1
296fi
297exec 5>./config.log
298
299echo "\
300This file contains any messages produced by compilers while
301running configure, to aid debugging if configure makes a mistake.
302" 1>&5
303
304# Strip out --no-create and --no-recursion so they do not pile up.
305# Also quote any args containing shell metacharacters.
306ac_configure_args=
307for ac_arg
308do
309  case "$ac_arg" in
310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311  | --no-cr | --no-c) ;;
312  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
314  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
315  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
316  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
317  esac
318done
319
320# NLS nuisances.
321# Only set LANG and LC_ALL to C if already set.
322# These must not be set unconditionally because not all systems understand
323# e.g. LANG=C (notably SCO).
324if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
325if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
326
327# confdefs.h avoids OS command line length limits that DEFS can exceed.
328rm -rf conftest* confdefs.h
329# AIX cpp loses on an empty file, so make sure it contains at least a newline.
330echo > confdefs.h
331
332# A filename unique to this package, relative to the directory that
333# configure is in, which we can look for to find out if srcdir is correct.
334ac_unique_file=groff/groff.cc
335
336# Find the source files, if location was not specified.
337if test -z "$srcdir"; then
338  ac_srcdir_defaulted=yes
339  # Try the directory containing this script, then its parent.
340  ac_prog=$0
341  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
342  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
343  srcdir=$ac_confdir
344  if test ! -r $srcdir/$ac_unique_file; then
345    srcdir=..
346  fi
347else
348  ac_srcdir_defaulted=no
349fi
350if test ! -r $srcdir/$ac_unique_file; then
351  if test "$ac_srcdir_defaulted" = yes; then
352    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
353  else
354    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
355  fi
356fi
357srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
358
359# Prefer explicitly selected file to automatically selected ones.
360if test -z "$CONFIG_SITE"; then
361  if test "x$prefix" != xNONE; then
362    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
363  else
364    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
365  fi
366fi
367for ac_site_file in $CONFIG_SITE; do
368  if test -r "$ac_site_file"; then
369    echo "loading site script $ac_site_file"
370    . "$ac_site_file"
371  fi
372done
373
374if test -r "$cache_file"; then
375  echo "loading cache $cache_file"
376  . $cache_file
377else
378  echo "creating cache $cache_file"
379  > $cache_file
380fi
381
382ac_ext=c
383# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
384ac_cpp='$CPP $CPPFLAGS'
385ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
386ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
387
388if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
389  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
390  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
391    ac_n= ac_c='
392' ac_t='	'
393  else
394    ac_n=-n ac_c= ac_t=
395  fi
396else
397  ac_n= ac_c='\c' ac_t=
398fi
399
400
401if test "x$prefix" = xNONE; then
402echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
403# Extract the first word of "grops", so it can be a program name with args.
404set dummy grops; ac_word=$2
405echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
406if eval "test \"`echo '$''{'ac_cv_path_GROPS'+set}'`\" = set"; then
407  echo $ac_n "(cached) $ac_c" 1>&6
408else
409  case "$GROPS" in
410  /*)
411  ac_cv_path_GROPS="$GROPS" # Let the user override the test with a path.
412  ;;
413  *)
414  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
415  for ac_dir in $PATH; do
416    test -z "$ac_dir" && ac_dir=.
417    if test -f $ac_dir/$ac_word; then
418      ac_cv_path_GROPS="$ac_dir/$ac_word"
419      break
420    fi
421  done
422  IFS="$ac_save_ifs"
423  ;;
424esac
425fi
426GROPS="$ac_cv_path_GROPS"
427if test -n "$GROPS"; then
428  echo "$ac_t""$GROPS" 1>&6
429else
430  echo "$ac_t""no" 1>&6
431fi
432
433  if test -n "$ac_cv_path_GROPS"; then
434    prefix=`echo $ac_cv_path_GROPS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
435  fi
436fi
437
438# Extract the first word of "gcc", so it can be a program name with args.
439set dummy gcc; ac_word=$2
440echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
441if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
442  echo $ac_n "(cached) $ac_c" 1>&6
443else
444  if test -n "$CC"; then
445  ac_cv_prog_CC="$CC" # Let the user override the test.
446else
447  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
448  for ac_dir in $PATH; do
449    test -z "$ac_dir" && ac_dir=.
450    if test -f $ac_dir/$ac_word; then
451      ac_cv_prog_CC="gcc"
452      break
453    fi
454  done
455  IFS="$ac_save_ifs"
456  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
457fi
458fi
459CC="$ac_cv_prog_CC"
460if test -n "$CC"; then
461  echo "$ac_t""$CC" 1>&6
462else
463  echo "$ac_t""no" 1>&6
464fi
465
466
467echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
468if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
469  echo $ac_n "(cached) $ac_c" 1>&6
470else
471  cat > conftest.c <<EOF
472#ifdef __GNUC__
473  yes;
474#endif
475EOF
476if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
477  ac_cv_prog_gcc=yes
478else
479  ac_cv_prog_gcc=no
480fi
481fi
482echo "$ac_t""$ac_cv_prog_gcc" 1>&6
483if test $ac_cv_prog_gcc = yes; then
484  GCC=yes
485  if test "${CFLAGS+set}" != set; then
486    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
487if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
488  echo $ac_n "(cached) $ac_c" 1>&6
489else
490  echo 'void f(){}' > conftest.c
491if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
492  ac_cv_prog_gcc_g=yes
493else
494  ac_cv_prog_gcc_g=no
495fi
496rm -f conftest*
497
498fi
499    echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
500    if test $ac_cv_prog_gcc_g = yes; then
501      CFLAGS="-g -O"
502    else
503      CFLAGS="-O"
504    fi
505  fi
506else
507  GCC=
508  test "${CFLAGS+set}" = set || CFLAGS="-g"
509fi
510
511for ac_prog in $CCC c++ g++ gcc CC cxx
512do
513# Extract the first word of "$ac_prog", so it can be a program name with args.
514set dummy $ac_prog; ac_word=$2
515echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
516if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
517  echo $ac_n "(cached) $ac_c" 1>&6
518else
519  if test -n "$CXX"; then
520  ac_cv_prog_CXX="$CXX" # Let the user override the test.
521else
522  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
523  for ac_dir in $PATH; do
524    test -z "$ac_dir" && ac_dir=.
525    if test -f $ac_dir/$ac_word; then
526      ac_cv_prog_CXX="$ac_prog"
527      break
528    fi
529  done
530  IFS="$ac_save_ifs"
531fi
532fi
533CXX="$ac_cv_prog_CXX"
534if test -n "$CXX"; then
535  echo "$ac_t""$CXX" 1>&6
536else
537  echo "$ac_t""no" 1>&6
538fi
539
540test -n "$CXX" && break
541done
542test -n "$CXX" || CXX="gcc"
543
544
545echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
546if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
547  echo $ac_n "(cached) $ac_c" 1>&6
548else
549  cat > conftest.C <<EOF
550#ifdef __GNUC__
551  yes;
552#endif
553EOF
554if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
555  ac_cv_prog_gxx=yes
556else
557  ac_cv_prog_gxx=no
558fi
559fi
560echo "$ac_t""$ac_cv_prog_gxx" 1>&6
561if test $ac_cv_prog_gxx = yes; then
562  GXX=yes
563  if test "${CXXFLAGS+set}" != set; then
564    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
565if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
566  echo $ac_n "(cached) $ac_c" 1>&6
567else
568  echo 'void f(){}' > conftest.cc
569if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
570  ac_cv_prog_gxx_g=yes
571else
572  ac_cv_prog_gxx_g=no
573fi
574rm -f conftest*
575
576fi
577    echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
578    if test $ac_cv_prog_gxx_g = yes; then
579      CXXFLAGS="-g -O"
580    else
581      CXXFLAGS="-O"
582    fi
583  fi
584else
585  GXX=
586  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
587fi
588
589# If we cannot run a trivial program, we must be cross compiling.
590echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
591if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
592  echo $ac_n "(cached) $ac_c" 1>&6
593else
594  if test "$cross_compiling" = yes; then
595  ac_cv_c_cross=yes
596else
597cat > conftest.$ac_ext <<EOF
598#line 599 "configure"
599#include "confdefs.h"
600main(){return(0);}
601EOF
602eval $ac_link
603if test -s conftest && (./conftest; exit) 2>/dev/null; then
604  ac_cv_c_cross=no
605else
606  ac_cv_c_cross=yes
607fi
608fi
609rm -fr conftest*
610fi
611cross_compiling=$ac_cv_c_cross
612echo "$ac_t""$ac_cv_c_cross" 1>&6
613
614
615
616
617ac_ext=C
618# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
619ac_cpp='$CXXCPP $CPPFLAGS'
620ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
621ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
622
623if test "$cross_compiling" = no; then
624echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6
625fi
626if test "$cross_compiling" = yes; then
627  :
628else
629cat > conftest.$ac_ext <<EOF
630#line 631 "configure"
631#include "confdefs.h"
632#ifdef __cplusplus
633extern "C" void exit(int);
634#endif
635int main() { return 0; }
636EOF
637eval $ac_link
638if test -s conftest && (./conftest; exit) 2>/dev/null; then
639  echo "$ac_t""yes" 1>&6
640else
641  echo "$ac_t""no" 1>&6
642{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
643fi
644fi
645rm -fr conftest*
646if test "$cross_compiling" = no; then
647echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6
648fi
649if test "$cross_compiling" = yes; then
650  :
651else
652cat > conftest.$ac_ext <<EOF
653#line 654 "configure"
654#include "confdefs.h"
655#ifdef __cplusplus
656extern "C" void exit(int);
657#endif
658
659extern "C" {
660  void _exit(int);
661}
662int i;
663struct A {
664  char dummy;
665  A() { i = 1; }
666  ~A() { if (i == 1) _exit(0); }
667};
668A a;
669int main() { return 1; }
670
671EOF
672eval $ac_link
673if test -s conftest && (./conftest; exit) 2>/dev/null; then
674  echo "$ac_t""yes" 1>&6
675else
676  echo "$ac_t""no" 1>&6
677{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
678fi
679fi
680rm -fr conftest*
681echo $ac_n "checking that header files support C++""... $ac_c" 1>&6
682cat > conftest.$ac_ext <<EOF
683#line 684 "configure"
684#include "confdefs.h"
685#include <stdio.h>
686int main() { return 0; }
687int t() {
688fopen(0, 0);
689; return 0; }
690EOF
691if eval $ac_link; then
692  rm -rf conftest*
693  echo "$ac_t""yes" 1>&6
694else
695  rm -rf conftest*
696  echo "$ac_t""no" 1>&6
697{ echo "configure: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" 1>&2; exit 1; }
698fi
699rm -f conftest*
700
701ac_ext=c
702# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
703ac_cpp='$CPP $CPPFLAGS'
704ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
705ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
706
707
708if test -z "$PSPRINT"
709then
710	for ac_prog in lpr
711do
712# Extract the first word of "$ac_prog", so it can be a program name with args.
713set dummy $ac_prog; ac_word=$2
714echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715if eval "test \"`echo '$''{'ac_cv_prog_LPR'+set}'`\" = set"; then
716  echo $ac_n "(cached) $ac_c" 1>&6
717else
718  if test -n "$LPR"; then
719  ac_cv_prog_LPR="$LPR" # Let the user override the test.
720else
721  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
722  for ac_dir in $PATH; do
723    test -z "$ac_dir" && ac_dir=.
724    if test -f $ac_dir/$ac_word; then
725      ac_cv_prog_LPR="$ac_prog"
726      break
727    fi
728  done
729  IFS="$ac_save_ifs"
730fi
731fi
732LPR="$ac_cv_prog_LPR"
733if test -n "$LPR"; then
734  echo "$ac_t""$LPR" 1>&6
735else
736  echo "$ac_t""no" 1>&6
737fi
738
739test -n "$LPR" && break
740done
741
742	for ac_prog in lp
743do
744# Extract the first word of "$ac_prog", so it can be a program name with args.
745set dummy $ac_prog; ac_word=$2
746echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
747if eval "test \"`echo '$''{'ac_cv_prog_LP'+set}'`\" = set"; then
748  echo $ac_n "(cached) $ac_c" 1>&6
749else
750  if test -n "$LP"; then
751  ac_cv_prog_LP="$LP" # Let the user override the test.
752else
753  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
754  for ac_dir in $PATH; do
755    test -z "$ac_dir" && ac_dir=.
756    if test -f $ac_dir/$ac_word; then
757      ac_cv_prog_LP="$ac_prog"
758      break
759    fi
760  done
761  IFS="$ac_save_ifs"
762fi
763fi
764LP="$ac_cv_prog_LP"
765if test -n "$LP"; then
766  echo "$ac_t""$LP" 1>&6
767else
768  echo "$ac_t""no" 1>&6
769fi
770
771test -n "$LP" && break
772done
773
774	if test -n "$LPR" && test -n "$LP"
775	then
776		# HP-UX provides an lpr command that emulates lpr using lp,
777		# but it doesn't have lpq; in this case we want to use lp
778		# rather than lpr.
779		for ac_prog in lpq
780do
781# Extract the first word of "$ac_prog", so it can be a program name with args.
782set dummy $ac_prog; ac_word=$2
783echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
784if eval "test \"`echo '$''{'ac_cv_prog_LPQ'+set}'`\" = set"; then
785  echo $ac_n "(cached) $ac_c" 1>&6
786else
787  if test -n "$LPQ"; then
788  ac_cv_prog_LPQ="$LPQ" # Let the user override the test.
789else
790  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
791  for ac_dir in $PATH; do
792    test -z "$ac_dir" && ac_dir=.
793    if test -f $ac_dir/$ac_word; then
794      ac_cv_prog_LPQ="$ac_prog"
795      break
796    fi
797  done
798  IFS="$ac_save_ifs"
799fi
800fi
801LPQ="$ac_cv_prog_LPQ"
802if test -n "$LPQ"; then
803  echo "$ac_t""$LPQ" 1>&6
804else
805  echo "$ac_t""no" 1>&6
806fi
807
808test -n "$LPQ" && break
809done
810
811		test -n "$LPQ" || LPR=
812	fi
813	if test -n "$LPR"
814	then
815		PSPRINT="$LPR"
816	elif test -n "$LP"
817	then
818		PSPRINT="$LP"
819	fi
820fi
821
822echo $ac_n "checking for command to use for printing PostScript files""... $ac_c" 1>&6
823echo "$ac_t""$PSPRINT" 1>&6
824# Figure out DVIPRINT from PSPRINT.
825echo $ac_n "checking for command to use for printing dvi files""... $ac_c" 1>&6
826if test -n "$PSPRINT" && test -z "$DVIPRINT"
827then
828	if test "X$PSPRINT" = "Xlpr"
829	then
830		DVIPRINT="lpr -d"
831	else
832		DVIPRINT="$PSPRINT"
833	fi
834fi
835
836echo "$ac_t""$DVIPRINT" 1>&6
837# Extract the first word of "perl", so it can be a program name with args.
838set dummy perl; ac_word=$2
839echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
840if eval "test \"`echo '$''{'ac_cv_path_PERLPATH'+set}'`\" = set"; then
841  echo $ac_n "(cached) $ac_c" 1>&6
842else
843  case "$PERLPATH" in
844  /*)
845  ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path.
846  ;;
847  *)
848  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
849  for ac_dir in $PATH; do
850    test -z "$ac_dir" && ac_dir=.
851    if test -f $ac_dir/$ac_word; then
852      ac_cv_path_PERLPATH="$ac_dir/$ac_word"
853      break
854    fi
855  done
856  IFS="$ac_save_ifs"
857  test -z "$ac_cv_path_PERLPATH" && ac_cv_path_PERLPATH="/usr/bin/perl"
858  ;;
859esac
860fi
861PERLPATH="$ac_cv_path_PERLPATH"
862if test -n "$PERLPATH"; then
863  echo "$ac_t""$PERLPATH" 1>&6
864else
865  echo "$ac_t""no" 1>&6
866fi
867
868for ac_prog in byacc 'bison -y'
869do
870# Extract the first word of "$ac_prog", so it can be a program name with args.
871set dummy $ac_prog; ac_word=$2
872echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
873if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
874  echo $ac_n "(cached) $ac_c" 1>&6
875else
876  if test -n "$YACC"; then
877  ac_cv_prog_YACC="$YACC" # Let the user override the test.
878else
879  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
880  for ac_dir in $PATH; do
881    test -z "$ac_dir" && ac_dir=.
882    if test -f $ac_dir/$ac_word; then
883      ac_cv_prog_YACC="$ac_prog"
884      break
885    fi
886  done
887  IFS="$ac_save_ifs"
888fi
889fi
890YACC="$ac_cv_prog_YACC"
891if test -n "$YACC"; then
892  echo "$ac_t""$YACC" 1>&6
893else
894  echo "$ac_t""no" 1>&6
895fi
896
897test -n "$YACC" && break
898done
899test -n "$YACC" || YACC="yacc"
900
901# Extract the first word of "ranlib", so it can be a program name with args.
902set dummy ranlib; ac_word=$2
903echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
904if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
905  echo $ac_n "(cached) $ac_c" 1>&6
906else
907  if test -n "$RANLIB"; then
908  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
909else
910  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
911  for ac_dir in $PATH; do
912    test -z "$ac_dir" && ac_dir=.
913    if test -f $ac_dir/$ac_word; then
914      ac_cv_prog_RANLIB="ranlib"
915      break
916    fi
917  done
918  IFS="$ac_save_ifs"
919  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
920fi
921fi
922RANLIB="$ac_cv_prog_RANLIB"
923if test -n "$RANLIB"; then
924  echo "$ac_t""$RANLIB" 1>&6
925else
926  echo "$ac_t""no" 1>&6
927fi
928
929ac_aux_dir=
930for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
931  if test -f $ac_dir/install-sh; then
932    ac_aux_dir=$ac_dir
933    ac_install_sh="$ac_aux_dir/install-sh -c"
934    break
935  elif test -f $ac_dir/install.sh; then
936    ac_aux_dir=$ac_dir
937    ac_install_sh="$ac_aux_dir/install.sh -c"
938    break
939  fi
940done
941if test -z "$ac_aux_dir"; then
942  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
943fi
944ac_config_guess=$ac_aux_dir/config.guess
945ac_config_sub=$ac_aux_dir/config.sub
946ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
947
948ac_dir=`cd $ac_aux_dir; pwd`
949ac_install_sh="$ac_dir/install-sh -c"
950
951# Find a good install program.  We prefer a C program (faster),
952# so one script is as good as another.  But avoid the broken or
953# incompatible versions:
954# SysV /etc/install, /usr/sbin/install
955# SunOS /usr/etc/install
956# IRIX /sbin/install
957# AIX /bin/install
958# AFS /usr/afsws/bin/install, which mishandles nonexistent args
959# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
960# ./install, which can be erroneously created by make from ./install.sh.
961echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
962if test -z "$INSTALL"; then
963if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
964  echo $ac_n "(cached) $ac_c" 1>&6
965else
966    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
967  for ac_dir in $PATH; do
968    # Account for people who put trailing slashes in PATH elements.
969    case "$ac_dir/" in
970    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
971    *)
972      # OSF1 and SCO ODT 3.0 have their own names for install.
973      for ac_prog in ginstall installbsd scoinst install; do
974        if test -f $ac_dir/$ac_prog; then
975	  if test $ac_prog = install &&
976            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
977	    # AIX install.  It has an incompatible calling convention.
978	    # OSF/1 installbsd also uses dspmsg, but is usable.
979	    :
980	  else
981	    ac_cv_path_install="$ac_dir/$ac_prog -c"
982	    break 2
983	  fi
984	fi
985      done
986      ;;
987    esac
988  done
989  IFS="$ac_save_ifs"
990  # As a last resort, use the slow shell script.
991  test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
992fi
993  INSTALL="$ac_cv_path_install"
994fi
995echo "$ac_t""$INSTALL" 1>&6
996
997# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
998# It thinks the first close brace ends the variable substitution.
999test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1000
1001test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1002
1003echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1004if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1005  echo $ac_n "(cached) $ac_c" 1>&6
1006else
1007  rm -f conftestdata
1008if ln -s X conftestdata 2>/dev/null
1009then
1010  rm -f conftestdata
1011  ac_cv_prog_LN_S="ln -s"
1012else
1013  ac_cv_prog_LN_S=ln
1014fi
1015fi
1016LN_S="$ac_cv_prog_LN_S"
1017if test "$ac_cv_prog_LN_S" = "ln -s"; then
1018  echo "$ac_t""yes" 1>&6
1019else
1020  echo "$ac_t""no" 1>&6
1021fi
1022
1023echo $ac_n "checking for csh hash hack""... $ac_c" 1>&6
1024cat <<EOF >conftest.sh
1025#!/bin/sh
1026true || exit 0
1027export PATH || exit 0
1028exit 1
1029EOF
1030chmod +x conftest.sh
1031if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1
1032then
1033	echo "$ac_t""yes" 1>&6; SH_SCRIPT_SED_CMD='1s/.*/:/'
1034else
1035	echo "$ac_t""no" 1>&6; SH_SCRIPT_SED_CMD=''
1036fi
1037rm -f conftest.sh
1038
1039
1040echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1041# On Suns, sometimes $CPP names a directory.
1042if test -n "$CPP" && test -d "$CPP"; then
1043  CPP=
1044fi
1045if test -z "$CPP"; then
1046if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1047  echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049    # This must be in double quotes, not single quotes, because CPP may get
1050  # substituted into the Makefile and "${CC-cc}" will confuse make.
1051  CPP="${CC-cc} -E"
1052  # On the NeXT, cc -E runs the code through the compiler's parser,
1053  # not just through cpp.
1054  cat > conftest.$ac_ext <<EOF
1055#line 1056 "configure"
1056#include "confdefs.h"
1057#include <assert.h>
1058Syntax Error
1059EOF
1060eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1061ac_err=`grep -v '^ *+' conftest.out`
1062if test -z "$ac_err"; then
1063  :
1064else
1065  echo "$ac_err" >&5
1066  rm -rf conftest*
1067  CPP="${CC-cc} -E -traditional-cpp"
1068  cat > conftest.$ac_ext <<EOF
1069#line 1070 "configure"
1070#include "confdefs.h"
1071#include <assert.h>
1072Syntax Error
1073EOF
1074eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1075ac_err=`grep -v '^ *+' conftest.out`
1076if test -z "$ac_err"; then
1077  :
1078else
1079  echo "$ac_err" >&5
1080  rm -rf conftest*
1081  CPP=/lib/cpp
1082fi
1083rm -f conftest*
1084fi
1085rm -f conftest*
1086  ac_cv_prog_CPP="$CPP"
1087fi
1088  CPP="$ac_cv_prog_CPP"
1089else
1090  ac_cv_prog_CPP="$CPP"
1091fi
1092echo "$ac_t""$CPP" 1>&6
1093
1094for ac_hdr in unistd.h dirent.h limits.h sys/dir.h stdlib.h
1095do
1096ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1097echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1098if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1099  echo $ac_n "(cached) $ac_c" 1>&6
1100else
1101  cat > conftest.$ac_ext <<EOF
1102#line 1103 "configure"
1103#include "confdefs.h"
1104#include <$ac_hdr>
1105EOF
1106eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1107ac_err=`grep -v '^ *+' conftest.out`
1108if test -z "$ac_err"; then
1109  rm -rf conftest*
1110  eval "ac_cv_header_$ac_safe=yes"
1111else
1112  echo "$ac_err" >&5
1113  rm -rf conftest*
1114  eval "ac_cv_header_$ac_safe=no"
1115fi
1116rm -f conftest*
1117fi
1118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1119  echo "$ac_t""yes" 1>&6
1120    ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1121  cat >> confdefs.h <<EOF
1122#define $ac_tr_hdr 1
1123EOF
1124 
1125else
1126  echo "$ac_t""no" 1>&6
1127fi
1128done
1129
1130echo $ac_n "checking for ISC 3.x or 4.x""... $ac_c" 1>&6
1131if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1
1132then
1133	echo "$ac_t""yes" 1>&6
1134	cat >> confdefs.h <<\EOF
1135#define _SYSV3 1
1136EOF
1137
1138else
1139	echo "$ac_t""no" 1>&6
1140fi
1141echo $ac_n "checking whether -D_POSIX_SOURCE is necessary""... $ac_c" 1>&6
1142
1143ac_ext=C
1144# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1145ac_cpp='$CXXCPP $CPPFLAGS'
1146ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1147ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1148
1149cat > conftest.$ac_ext <<EOF
1150#line 1151 "configure"
1151#include "confdefs.h"
1152#include <stdio.h>
1153extern "C" { void fileno(int); }
1154int main() { return 0; }
1155int t() {
1156
1157; return 0; }
1158EOF
1159if eval $ac_compile; then
1160  rm -rf conftest*
1161  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1162#define _POSIX_SOURCE 1
1163EOF
1164
1165else
1166  rm -rf conftest*
1167  echo "$ac_t""no" 1>&6
1168fi
1169rm -f conftest*
1170
1171ac_ext=c
1172# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1173ac_cpp='$CPP $CPPFLAGS'
1174ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1175ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1176
1177
1178ac_ext=C
1179# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1180ac_cpp='$CXXCPP $CPPFLAGS'
1181ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1182ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1183
1184echo $ac_n "checking declaration of getopt in stdlib.h""... $ac_c" 1>&6
1185cat > conftest.$ac_ext <<EOF
1186#line 1187 "configure"
1187#include "confdefs.h"
1188#include <stdlib.h>
1189extern "C" { void getopt(int); }
1190int main() { return 0; }
1191int t() {
1192
1193; return 0; }
1194EOF
1195if eval $ac_compile; then
1196  rm -rf conftest*
1197  echo "$ac_t""no" 1>&6
1198else
1199  rm -rf conftest*
1200  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1201#define STDLIB_H_DECLARES_GETOPT 1
1202EOF
1203
1204fi
1205rm -f conftest*
1206
1207echo $ac_n "checking declaration of getopt in unistd.h""... $ac_c" 1>&6
1208cat > conftest.$ac_ext <<EOF
1209#line 1210 "configure"
1210#include "confdefs.h"
1211#include <sys/types.h>
1212#include <unistd.h>
1213extern "C" { void getopt(int); }
1214int main() { return 0; }
1215int t() {
1216
1217; return 0; }
1218EOF
1219if eval $ac_compile; then
1220  rm -rf conftest*
1221  echo "$ac_t""no" 1>&6
1222else
1223  rm -rf conftest*
1224  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1225#define UNISTD_H_DECLARES_GETOPT 1
1226EOF
1227
1228fi
1229rm -f conftest*
1230
1231ac_ext=c
1232# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1233ac_cpp='$CPP $CPPFLAGS'
1234ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1235ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1236
1237
1238ac_ext=C
1239# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1240ac_cpp='$CXXCPP $CPPFLAGS'
1241ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1242ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1243
1244echo $ac_n "checking declaration of putenv""... $ac_c" 1>&6
1245cat > conftest.$ac_ext <<EOF
1246#line 1247 "configure"
1247#include "confdefs.h"
1248#include <stdlib.h>
1249extern "C" { void putenv(int); }
1250int main() { return 0; }
1251int t() {
1252
1253; return 0; }
1254EOF
1255if eval $ac_compile; then
1256  rm -rf conftest*
1257  echo "$ac_t""no" 1>&6
1258else
1259  rm -rf conftest*
1260  echo "$ac_t""yes" 1>&6
1261cat >> confdefs.h <<\EOF
1262#define STDLIB_H_DECLARES_PUTENV 1
1263EOF
1264
1265fi
1266rm -f conftest*
1267
1268ac_ext=c
1269# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1270ac_cpp='$CPP $CPPFLAGS'
1271ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1272ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1273
1274
1275ac_ext=C
1276# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1277ac_cpp='$CXXCPP $CPPFLAGS'
1278ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1279ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1280
1281echo $ac_n "checking declaration of popen""... $ac_c" 1>&6
1282cat > conftest.$ac_ext <<EOF
1283#line 1284 "configure"
1284#include "confdefs.h"
1285#include <stdio.h>
1286extern "C" { void popen(int); }
1287int main() { return 0; }
1288int t() {
1289
1290; return 0; }
1291EOF
1292if eval $ac_compile; then
1293  rm -rf conftest*
1294  echo "$ac_t""no" 1>&6
1295else
1296  rm -rf conftest*
1297  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1298#define STDIO_H_DECLARES_POPEN 1
1299EOF
1300
1301fi
1302rm -f conftest*
1303
1304ac_ext=c
1305# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1306ac_cpp='$CPP $CPPFLAGS'
1307ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1308ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1309
1310
1311ac_ext=C
1312# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1313ac_cpp='$CXXCPP $CPPFLAGS'
1314ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1315ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1316
1317echo $ac_n "checking declaration of pclose""... $ac_c" 1>&6
1318cat > conftest.$ac_ext <<EOF
1319#line 1320 "configure"
1320#include "confdefs.h"
1321#include <stdio.h>
1322extern "C" { void pclose(int); }
1323int main() { return 0; }
1324int t() {
1325
1326; return 0; }
1327EOF
1328if eval $ac_compile; then
1329  rm -rf conftest*
1330  echo "$ac_t""no" 1>&6
1331else
1332  rm -rf conftest*
1333  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1334#define STDIO_H_DECLARES_PCLOSE 1
1335EOF
1336
1337fi
1338rm -f conftest*
1339
1340ac_ext=c
1341# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1342ac_cpp='$CPP $CPPFLAGS'
1343ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1344ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1345
1346
1347ac_ext=C
1348# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1349ac_cpp='$CXXCPP $CPPFLAGS'
1350ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1351ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1352
1353echo $ac_n "checking C++ <osfcn.h>""... $ac_c" 1>&6
1354cat > conftest.$ac_ext <<EOF
1355#line 1356 "configure"
1356#include "confdefs.h"
1357#include <osfcn.h>
1358int main() { return 0; }
1359int t() {
1360read(0, 0, 0); open(0, 0);
1361; return 0; }
1362EOF
1363if eval $ac_compile; then
1364  rm -rf conftest*
1365  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1366#define HAVE_CC_OSFCN_H 1
1367EOF
1368
1369else
1370  rm -rf conftest*
1371  echo "$ac_t""no" 1>&6
1372fi
1373rm -f conftest*
1374
1375ac_ext=c
1376# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1377ac_cpp='$CPP $CPPFLAGS'
1378ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1379ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1380
1381
1382ac_ext=C
1383# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1384ac_cpp='$CXXCPP $CPPFLAGS'
1385ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1386ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1387
1388echo $ac_n "checking C++ <limits.h>""... $ac_c" 1>&6
1389cat > conftest.$ac_ext <<EOF
1390#line 1391 "configure"
1391#include "confdefs.h"
1392#include <limits.h>
1393int main() { return 0; }
1394int t() {
1395int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX;
1396; return 0; }
1397EOF
1398if eval $ac_compile; then
1399  rm -rf conftest*
1400  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1401#define HAVE_CC_LIMITS_H 1
1402EOF
1403
1404else
1405  rm -rf conftest*
1406  echo "$ac_t""no" 1>&6
1407fi
1408rm -f conftest*
1409
1410ac_ext=c
1411# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1412ac_cpp='$CPP $CPPFLAGS'
1413ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1414ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1415
1416
1417ac_ext=C
1418# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1419ac_cpp='$CXXCPP $CPPFLAGS'
1420ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1421ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1422
1423echo $ac_n "checking for declaration of time_t""... $ac_c" 1>&6
1424cat > conftest.$ac_ext <<EOF
1425#line 1426 "configure"
1426#include "confdefs.h"
1427#include <time.h>
1428int main() { return 0; }
1429int t() {
1430time_t t = time(0); struct tm *p = localtime(&t);
1431; return 0; }
1432EOF
1433if eval $ac_compile; then
1434  rm -rf conftest*
1435  echo "$ac_t""yes" 1>&6
1436else
1437  rm -rf conftest*
1438  echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF
1439#define LONG_FOR_TIME_T 1
1440EOF
1441
1442fi
1443rm -f conftest*
1444
1445ac_ext=c
1446# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1447ac_cpp='$CPP $CPPFLAGS'
1448ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1449ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1450
1451echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1452if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1453  echo $ac_n "(cached) $ac_c" 1>&6
1454else
1455  cat > conftest.$ac_ext <<EOF
1456#line 1457 "configure"
1457#include "confdefs.h"
1458#include <sys/types.h>
1459#include <signal.h>
1460#ifdef signal
1461#undef signal
1462#endif
1463#ifdef __cplusplus
1464extern "C"
1465#endif
1466void (*signal ()) ();
1467int main() { return 0; }
1468int t() {
1469int i;
1470; return 0; }
1471EOF
1472if eval $ac_compile; then
1473  rm -rf conftest*
1474  ac_cv_type_signal=void
1475else
1476  rm -rf conftest*
1477  ac_cv_type_signal=int
1478fi
1479rm -f conftest*
1480
1481fi
1482echo "$ac_t""$ac_cv_type_signal" 1>&6
1483cat >> confdefs.h <<EOF
1484#define RETSIGTYPE $ac_cv_type_signal
1485EOF
1486
1487
1488echo $ac_n "checking struct exception""... $ac_c" 1>&6
1489cat > conftest.$ac_ext <<EOF
1490#line 1491 "configure"
1491#include "confdefs.h"
1492#include <math.h>
1493int main() { return 0; }
1494int t() {
1495struct exception e;
1496; return 0; }
1497EOF
1498if eval $ac_compile; then
1499  rm -rf conftest*
1500  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1501#define HAVE_STRUCT_EXCEPTION 1
1502EOF
1503
1504else
1505  rm -rf conftest*
1506  echo "$ac_t""no" 1>&6
1507fi
1508rm -f conftest*
1509
1510echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1511if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1512  echo $ac_n "(cached) $ac_c" 1>&6
1513else
1514  if test "$cross_compiling" = yes; then
1515  ac_cv_func_mmap=no
1516else
1517cat > conftest.$ac_ext <<EOF
1518#line 1519 "configure"
1519#include "confdefs.h"
1520
1521/* Thanks to Mike Haertel and Jim Avera for this test. */
1522#include <sys/types.h>
1523#include <fcntl.h>
1524#include <sys/mman.h>
1525
1526#ifdef BSD
1527# ifndef BSD4_1
1528#  define HAVE_GETPAGESIZE
1529# endif
1530#endif
1531
1532#ifndef HAVE_GETPAGESIZE
1533# include <sys/param.h>
1534# ifdef EXEC_PAGESIZE
1535#  define getpagesize() EXEC_PAGESIZE
1536# else
1537#  ifdef NBPG
1538#   define getpagesize() NBPG * CLSIZE
1539#   ifndef CLSIZE
1540#    define CLSIZE 1
1541#   endif
1542#  else
1543#   ifdef NBPC
1544#    define getpagesize() NBPC
1545#   else
1546#    define getpagesize() PAGESIZE /* SVR4 */
1547#   endif
1548#  endif
1549# endif
1550#endif
1551
1552#ifdef __osf__
1553# define valloc malloc
1554#endif
1555
1556#ifdef __cplusplus
1557extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1558#else
1559char *valloc(), *malloc();
1560#endif
1561
1562int
1563main()
1564{
1565  char *buf1, *buf2, *buf3;
1566  int i = getpagesize(), j;
1567  int i2 = getpagesize()*2;
1568  int fd;
1569
1570  buf1 = (char *)valloc(i2);
1571  buf2 = (char *)valloc(i);
1572  buf3 = (char *)malloc(i2);
1573  for (j = 0; j < i2; ++j)
1574    *(buf1 + j) = rand();
1575  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1576  write(fd, buf1, i2);
1577  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1578  for (j = 0; j < i; ++j)
1579    if (*(buf1 + j) != *(buf2 + j))
1580      exit(1);
1581  lseek(fd, (long)i, 0);
1582  read(fd, buf2, i); /* read into mapped memory -- file should not change */
1583  /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1584  lseek(fd, (long)0, 0);
1585  read(fd, buf3, i2);
1586  for (j = 0; j < i2; ++j)
1587    if (*(buf1 + j) != *(buf3 + j))
1588      exit(1);
1589  exit(0);
1590}
1591
1592EOF
1593eval $ac_link
1594if test -s conftest && (./conftest; exit) 2>/dev/null; then
1595  ac_cv_func_mmap=yes
1596else
1597  ac_cv_func_mmap=no
1598fi
1599fi
1600rm -fr conftest*
1601fi
1602echo "$ac_t""$ac_cv_func_mmap" 1>&6
1603if test $ac_cv_func_mmap = yes; then
1604  cat >> confdefs.h <<\EOF
1605#define HAVE_MMAP 1
1606EOF
1607
1608fi
1609
1610saved_libs="$LIBS"
1611LIBS="$LIBS -lm"
1612for ac_func in fmod strtol getcwd strerror putenv
1613do
1614echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1615if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1616  echo $ac_n "(cached) $ac_c" 1>&6
1617else
1618  cat > conftest.$ac_ext <<EOF
1619#line 1620 "configure"
1620#include "confdefs.h"
1621/* System header to define __stub macros and hopefully few prototypes,
1622    which can conflict with char $ac_func(); below.  */
1623#include <assert.h>
1624/* Override any gcc2 internal prototype to avoid an error.  */
1625char $ac_func(); 
1626
1627int main() { return 0; }
1628int t() {
1629
1630/* The GNU C library defines this for functions which it implements
1631    to always fail with ENOSYS.  Some functions are actually named
1632    something starting with __ and the normal name is an alias.  */
1633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1634choke me
1635#else
1636$ac_func();
1637#endif
1638
1639; return 0; }
1640EOF
1641if eval $ac_link; then
1642  rm -rf conftest*
1643  eval "ac_cv_func_$ac_func=yes"
1644else
1645  rm -rf conftest*
1646  eval "ac_cv_func_$ac_func=no"
1647fi
1648rm -f conftest*
1649
1650fi
1651if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1652  echo "$ac_t""yes" 1>&6
1653  :
1654else
1655  echo "$ac_t""no" 1>&6
1656LIBOBJS="$LIBOBJS ${ac_func}.o"
1657fi
1658
1659done
1660
1661LIBS="$saved_libs"
1662for ac_func in rename mkstemp
1663do
1664echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1665if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1666  echo $ac_n "(cached) $ac_c" 1>&6
1667else
1668  cat > conftest.$ac_ext <<EOF
1669#line 1670 "configure"
1670#include "confdefs.h"
1671/* System header to define __stub macros and hopefully few prototypes,
1672    which can conflict with char $ac_func(); below.  */
1673#include <assert.h>
1674/* Override any gcc2 internal prototype to avoid an error.  */
1675char $ac_func(); 
1676
1677int main() { return 0; }
1678int t() {
1679
1680/* The GNU C library defines this for functions which it implements
1681    to always fail with ENOSYS.  Some functions are actually named
1682    something starting with __ and the normal name is an alias.  */
1683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1684choke me
1685#else
1686$ac_func();
1687#endif
1688
1689; return 0; }
1690EOF
1691if eval $ac_link; then
1692  rm -rf conftest*
1693  eval "ac_cv_func_$ac_func=yes"
1694else
1695  rm -rf conftest*
1696  eval "ac_cv_func_$ac_func=no"
1697fi
1698rm -f conftest*
1699
1700fi
1701if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1702  echo "$ac_t""yes" 1>&6
1703    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1704  cat >> confdefs.h <<EOF
1705#define $ac_tr_func 1
1706EOF
1707 
1708else
1709  echo "$ac_t""no" 1>&6
1710fi
1711done
1712
1713echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
1714if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
1715  echo $ac_n "(cached) $ac_c" 1>&6
1716else
1717  cat > conftest.$ac_ext <<EOF
1718#line 1719 "configure"
1719#include "confdefs.h"
1720#include <sys/types.h>
1721#include <signal.h>
1722/* NetBSD declares sys_siglist in unistd.h.  */
1723#ifdef HAVE_UNISTD_H
1724#include <unistd.h>
1725#endif
1726int main() { return 0; }
1727int t() {
1728char *msg = *(sys_siglist + 1);
1729; return 0; }
1730EOF
1731if eval $ac_compile; then
1732  rm -rf conftest*
1733  ac_cv_decl_sys_siglist=yes
1734else
1735  rm -rf conftest*
1736  ac_cv_decl_sys_siglist=no
1737fi
1738rm -f conftest*
1739
1740fi
1741echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
1742if test $ac_cv_decl_sys_siglist = yes; then
1743  cat >> confdefs.h <<\EOF
1744#define SYS_SIGLIST_DECLARED 1
1745EOF
1746
1747fi
1748
1749
1750ac_ext=C
1751# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1752ac_cpp='$CXXCPP $CPPFLAGS'
1753ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1754ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1755
1756echo $ac_n "checking whether ANSI array delete syntax supported""... $ac_c" 1>&6
1757cat > conftest.$ac_ext <<EOF
1758#line 1759 "configure"
1759#include "confdefs.h"
1760
1761int main() { return 0; }
1762int t() {
1763char *p = new char[5]; delete [] p;
1764; return 0; }
1765EOF
1766if eval $ac_compile; then
1767  rm -rf conftest*
1768  echo "$ac_t""yes" 1>&6
1769else
1770  rm -rf conftest*
1771  echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF
1772#define ARRAY_DELETE_NEEDS_SIZE 1
1773EOF
1774
1775fi
1776rm -f conftest*
1777
1778ac_ext=c
1779# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1780ac_cpp='$CPP $CPPFLAGS'
1781ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1782ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1783
1784
1785ac_ext=C
1786# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1787ac_cpp='$CXXCPP $CPPFLAGS'
1788ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1789ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1790
1791echo $ac_n "checking traditional preprocessor""... $ac_c" 1>&6
1792cat > conftest.$ac_ext <<EOF
1793#line 1794 "configure"
1794#include "confdefs.h"
1795#define name2(a,b) a/**/b
1796int main() { return 0; }
1797int t() {
1798int name2(foo,bar);
1799; return 0; }
1800EOF
1801if eval $ac_compile; then
1802  rm -rf conftest*
1803  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1804#define TRADITIONAL_CPP 1
1805EOF
1806
1807else
1808  rm -rf conftest*
1809  echo "$ac_t""no" 1>&6
1810fi
1811rm -f conftest*
1812
1813ac_ext=c
1814# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1815ac_cpp='$CPP $CPPFLAGS'
1816ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1817ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1818
1819echo $ac_n "checking w_coredump""... $ac_c" 1>&6
1820if test "$cross_compiling" = yes; then
1821  echo "$ac_t""no" 1>&6
1822else
1823cat > conftest.$ac_ext <<EOF
1824#line 1825 "configure"
1825#include "confdefs.h"
1826
1827#include <sys/types.h>
1828#include <sys/wait.h>
1829main()
1830{
1831#ifdef WCOREFLAG
1832  exit(1);
1833#else
1834  int i = 0;
1835  ((union wait *)&i)->w_coredump = 1;
1836  exit(i != 0200);
1837#endif
1838}
1839
1840EOF
1841eval $ac_link
1842if test -s conftest && (./conftest; exit) 2>/dev/null; then
1843  echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1844#define WCOREFLAG 0200
1845EOF
1846
1847else
1848  echo "$ac_t""no" 1>&6
1849fi
1850fi
1851rm -fr conftest*
1852echo $ac_n "checking default value for grops -b option""... $ac_c" 1>&6
1853test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7
1854echo "$ac_t""$BROKEN_SPOOLER_FLAGS" 1>&6
1855
1856echo $ac_n "checking default paper size""... $ac_c" 1>&6
1857if test -z "$PAGE"
1858then
1859	descfile=
1860	if test -r $prefix/share/groff/font/devps/DESC
1861	then
1862		descfile=$prefix/share/groff/font/devps/DESC
1863	elif test -r $prefix/lib/groff/font/devps/DESC
1864	then
1865		descfile=$prefix/lib/groff/font/devps/DESC
1866	fi
1867	if test -n "$descfile" \
1868	  && grep "^paperlength 841890" $descfile >/dev/null 2>&1
1869	then
1870		PAGE=A4
1871	else
1872		PAGE=letter
1873	fi
1874fi
1875if test -z "$PAGE"
1876then
1877	dom=`awk '($1 == "dom" || $1 == "search") { print $2; exit}' \
1878	    /etc/resolv.conf 2>/dev/null`
1879
1880	if test -z "$dom"
1881	then
1882		dom=`(domainname) 2>/dev/null | tr -d '+'`
1883		if test -z "$dom"
1884		then
1885			dom=`(hostname) 2>/dev/null | grep '\.'`
1886		fi
1887	fi
1888
1889	# If the top-level domain is two letters and it's not `us' or `ca'
1890	# then they probably use A4 paper.
1891	case "$dom" in
1892	*.[Uu][Ss]|*.[Cc][Aa]) ;;
1893	*.[A-Za-z][A-Za-z]) PAGE=A4 ;;
1894	esac
1895fi
1896test -n "$PAGE" || PAGE=letter
1897echo "$ac_t""$PAGE" 1>&6
1898
1899echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6
1900if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" \
1901  = x0
1902then
1903	echo "$ac_t""yes" 1>&6
1904	g=g
1905else
1906	echo "$ac_t""no" 1>&6
1907	g=
1908fi
1909
1910
1911
1912echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6
1913sys_tmac_prefix=
1914sys_tmac_file_prefix=
1915for d in /usr/share/lib/tmac /usr/lib/tmac
1916do
1917	for t in "" tmac.
1918	do
1919		for m in an s m
1920		do
1921			f=$d/$t$m
1922			if test -z "$sys_tmac_prefix" \
1923			  && test -f $f \
1924			  && grep '^\.if' $f >/dev/null 2>&1
1925			then
1926				sys_tmac_prefix=$d/$t
1927				sys_tmac_file_prefix=$t
1928			fi
1929		done
1930	done
1931done
1932echo "$ac_t""$sys_tmac_prefix" 1>&6
1933
1934tmac_wrap=
1935echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6
1936if test "x$sys_tmac_file_prefix" = "xtmac."
1937then
1938	for f in $sys_tmac_prefix*
1939	do
1940		suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
1941		case "$suff" in
1942		e);;
1943		*)
1944		grep "Copyright.*Free Software Foundation" $f >/dev/null \
1945		  || tmac_wrap="$tmac_wrap $suff"
1946		;;
1947		esac 
1948	done
1949elif test -n "$sys_tmac_prefix"
1950then
1951	files=`echo $sys_tmac_prefix*`
1952	grep "\\.so" $files >conftest.sol
1953	for f in $files
1954	do
1955		case "$f" in
1956		${sys_tmac_prefix}e) ;;
1957		*.me) ;;
1958		*/ms.*) ;;
1959		*)
1960		b=`basename $f`
1961		if grep "\\.so.*/$b\$" conftest.sol >/dev/null \
1962		  || grep -l "Copyright.*Free Software Foundation" $f >/dev/null
1963		then
1964			:
1965		else
1966			suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
1967			case "$suff" in
1968			tmac.*);;
1969			*) tmac_wrap="$tmac_wrap $suff" ;;
1970			esac
1971		fi
1972		esac
1973	done
1974	rm -f conftest.sol
1975fi
1976echo "$ac_t""$tmac_wrap" 1>&6
1977
1978
1979trap '' 1 2 15
1980cat > confcache <<\EOF
1981# This file is a shell script that caches the results of configure
1982# tests run on this system so they can be shared between configure
1983# scripts and configure runs.  It is not useful on other systems.
1984# If it contains results you don't want to keep, you may remove or edit it.
1985#
1986# By default, configure uses ./config.cache as the cache file,
1987# creating it if it does not exist already.  You can give configure
1988# the --cache-file=FILE option to use a different cache file; that is
1989# what configure does when it calls configure scripts in
1990# subdirectories, so they share the cache.
1991# Giving --cache-file=/dev/null disables caching, for debugging configure.
1992# config.status only pays attention to the cache file if you give it the
1993# --recheck option to rerun configure.
1994#
1995EOF
1996# Ultrix sh set writes to stderr and can't be redirected directly,
1997# and sets the high bit in the cache file unless we assign to the vars.
1998(set) 2>&1 |
1999  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2000  >> confcache
2001if cmp -s $cache_file confcache; then
2002  :
2003else
2004  if test -w $cache_file; then
2005    echo "updating cache $cache_file"
2006    cat confcache > $cache_file
2007  else
2008    echo "not updating unwritable cache $cache_file"
2009  fi
2010fi
2011rm -f confcache
2012
2013trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2014
2015test "x$prefix" = xNONE && prefix=$ac_default_prefix
2016# Let make expand exec_prefix.
2017test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2018
2019# Any assignment to VPATH causes Sun make to only execute
2020# the first set of double-colon rules, so remove it if not needed.
2021# If there is a colon in the path, we need to keep it.
2022if test "x$srcdir" = x.; then
2023  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2024fi
2025
2026trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2027
2028# Transform confdefs.h into DEFS.
2029# Protect against shell expansion while executing Makefile rules.
2030# Protect against Makefile macro expansion.
2031cat > conftest.defs <<\EOF
2032s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2033s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
2034s%\[%\\&%g
2035s%\]%\\&%g
2036s%\$%$$%g
2037EOF
2038DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2039rm -f conftest.defs
2040
2041
2042# Without the "./", some shells look in PATH for config.status.
2043: ${CONFIG_STATUS=./config.status}
2044
2045echo creating $CONFIG_STATUS
2046rm -f $CONFIG_STATUS
2047cat > $CONFIG_STATUS <<EOF
2048#! /bin/sh
2049# Generated automatically by configure.
2050# Run this file to recreate the current configuration.
2051# This directory was configured as follows,
2052# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2053#
2054# $0 $ac_configure_args
2055#
2056# Compiler output produced by configure, useful for debugging
2057# configure, is in ./config.log if it exists.
2058
2059ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2060for ac_option
2061do
2062  case "\$ac_option" in
2063  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2064    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2065    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2066  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2067    echo "$CONFIG_STATUS generated by autoconf version 2.4"
2068    exit 0 ;;
2069  -help | --help | --hel | --he | --h)
2070    echo "\$ac_cs_usage"; exit 0 ;;
2071  *) echo "\$ac_cs_usage"; exit 1 ;;
2072  esac
2073done
2074
2075ac_given_srcdir=$srcdir
2076ac_given_INSTALL="$INSTALL"
2077
2078trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2079
2080# Protect against being on the right side of a sed subst in config.status. 
2081sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
2082 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2083$ac_vpsub
2084$extrasub
2085s%@CFLAGS@%$CFLAGS%g
2086s%@CPPFLAGS@%$CPPFLAGS%g
2087s%@CXXFLAGS@%$CXXFLAGS%g
2088s%@DEFS@%$DEFS%g
2089s%@LDFLAGS@%$LDFLAGS%g
2090s%@LIBS@%$LIBS%g
2091s%@exec_prefix@%$exec_prefix%g
2092s%@prefix@%$prefix%g
2093s%@program_transform_name@%$program_transform_name%g
2094s%@GROPS@%$GROPS%g
2095s%@CC@%$CC%g
2096s%@CXX@%$CXX%g
2097s%@LPR@%$LPR%g
2098s%@LP@%$LP%g
2099s%@LPQ@%$LPQ%g
2100s%@PSPRINT@%$PSPRINT%g
2101s%@DVIPRINT@%$DVIPRINT%g
2102s%@PERLPATH@%$PERLPATH%g
2103s%@YACC@%$YACC%g
2104s%@RANLIB@%$RANLIB%g
2105s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2106s%@INSTALL_DATA@%$INSTALL_DATA%g
2107s%@LN_S@%$LN_S%g
2108s%@SH_SCRIPT_SED_CMD@%$SH_SCRIPT_SED_CMD%g
2109s%@CPP@%$CPP%g
2110s%@LIBOBJS@%$LIBOBJS%g
2111s%@BROKEN_SPOOLER_FLAGS@%$BROKEN_SPOOLER_FLAGS%g
2112s%@PAGE@%$PAGE%g
2113s%@g@%$g%g
2114s%@sys_tmac_prefix@%$sys_tmac_prefix%g
2115s%@tmac_wrap@%$tmac_wrap%g
2116
2117CEOF
2118EOF
2119cat >> $CONFIG_STATUS <<EOF
2120
2121CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2122EOF
2123cat >> $CONFIG_STATUS <<\EOF
2124for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2125  # Support "outfile[:infile]", defaulting infile="outfile.in".
2126  case "$ac_file" in
2127  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2128       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2129  *) ac_file_in="${ac_file}.in" ;;
2130  esac
2131
2132  # Adjust relative srcdir, etc. for subdirectories.
2133
2134  # Remove last slash and all that follows it.  Not all systems have dirname.
2135  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2136  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2137    # The file is in a subdirectory.
2138    test ! -d "$ac_dir" && mkdir "$ac_dir"
2139    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2140    # A "../" for each directory in $ac_dir_suffix.
2141    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2142  else
2143    ac_dir_suffix= ac_dots=
2144  fi
2145
2146  case "$ac_given_srcdir" in
2147  .)  srcdir=.
2148      if test -z "$ac_dots"; then top_srcdir=.
2149      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2150  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2151  *) # Relative path.
2152    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2153    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2154  esac
2155
2156  case "$ac_given_INSTALL" in
2157  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2158  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2159  esac
2160  echo creating "$ac_file"
2161  rm -f "$ac_file"
2162  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2163  case "$ac_file" in
2164  *Makefile*) ac_comsub="1i\\
2165# $configure_input" ;;
2166  *) ac_comsub= ;;
2167  esac
2168  sed -e "$ac_comsub
2169s%@configure_input@%$configure_input%g
2170s%@srcdir@%$srcdir%g
2171s%@top_srcdir@%$top_srcdir%g
2172s%@INSTALL@%$INSTALL%g
2173" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2174fi; done
2175rm -f conftest.subs
2176
2177
2178
2179exit 0
2180EOF
2181chmod +x $CONFIG_STATUS
2182rm -fr confdefs* $ac_clean_files
2183test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2184
2185