]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/groff/configure
This commit was generated by cvs2svn to compensate for changes in r53660,
[FreeBSD/FreeBSD.git] / contrib / groff / configure
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:
11 ac_help=
12 ac_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.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36
37 # Initialize some other variables.
38 subdirs=
39
40 ac_prev=
41 for ac_option
42 do
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
111 Usage: configure [options] [host]
112 Options: [defaults in brackets after descriptions]
113 Configuration:
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
119 Directory 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
128 Host 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]
132 Features 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
140 EOF
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
276 done
277
278 if test -n "$ac_prev"; then
279   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280 fi
281
282 trap '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
292 if test "$silent" = yes; then
293   exec 6>/dev/null
294 else
295   exec 6>&1
296 fi
297 exec 5>./config.log
298
299 echo "\
300 This file contains any messages produced by compilers while
301 running 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.
306 ac_configure_args=
307 for ac_arg
308 do
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
318 done
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).
324 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
325 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
326
327 # confdefs.h avoids OS command line length limits that DEFS can exceed.
328 rm -rf conftest* confdefs.h
329 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
330 echo > 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.
334 ac_unique_file=groff/groff.cc
335
336 # Find the source files, if location was not specified.
337 if 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
347 else
348   ac_srcdir_defaulted=no
349 fi
350 if 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
356 fi
357 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
358
359 # Prefer explicitly selected file to automatically selected ones.
360 if 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
366 fi
367 for 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
372 done
373
374 if test -r "$cache_file"; then
375   echo "loading cache $cache_file"
376   . $cache_file
377 else
378   echo "creating cache $cache_file"
379   > $cache_file
380 fi
381
382 ac_ext=c
383 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
384 ac_cpp='$CPP $CPPFLAGS'
385 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
386 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
387
388 if (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
396 else
397   ac_n= ac_c='\c' ac_t=
398 fi
399
400
401 if test "x$prefix" = xNONE; then
402 echo $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.
404 set dummy grops; ac_word=$2
405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
406 if eval "test \"`echo '$''{'ac_cv_path_GROPS'+set}'`\" = set"; then
407   echo $ac_n "(cached) $ac_c" 1>&6
408 else
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   ;;
424 esac
425 fi
426 GROPS="$ac_cv_path_GROPS"
427 if test -n "$GROPS"; then
428   echo "$ac_t""$GROPS" 1>&6
429 else
430   echo "$ac_t""no" 1>&6
431 fi
432
433   if test -n "$ac_cv_path_GROPS"; then
434     prefix=`echo $ac_cv_path_GROPS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
435   fi
436 fi
437
438 # Extract the first word of "gcc", so it can be a program name with args.
439 set dummy gcc; ac_word=$2
440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
441 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
442   echo $ac_n "(cached) $ac_c" 1>&6
443 else
444   if test -n "$CC"; then
445   ac_cv_prog_CC="$CC" # Let the user override the test.
446 else
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"
457 fi
458 fi
459 CC="$ac_cv_prog_CC"
460 if test -n "$CC"; then
461   echo "$ac_t""$CC" 1>&6
462 else
463   echo "$ac_t""no" 1>&6
464 fi
465
466
467 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
468 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
469   echo $ac_n "(cached) $ac_c" 1>&6
470 else
471   cat > conftest.c <<EOF
472 #ifdef __GNUC__
473   yes;
474 #endif
475 EOF
476 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
477   ac_cv_prog_gcc=yes
478 else
479   ac_cv_prog_gcc=no
480 fi
481 fi
482 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
483 if 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
487 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
488   echo $ac_n "(cached) $ac_c" 1>&6
489 else
490   echo 'void f(){}' > conftest.c
491 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
492   ac_cv_prog_gcc_g=yes
493 else
494   ac_cv_prog_gcc_g=no
495 fi
496 rm -f conftest*
497
498 fi
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
506 else
507   GCC=
508   test "${CFLAGS+set}" = set || CFLAGS="-g"
509 fi
510
511 for ac_prog in $CCC c++ g++ gcc CC cxx
512 do
513 # Extract the first word of "$ac_prog", so it can be a program name with args.
514 set dummy $ac_prog; ac_word=$2
515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
516 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
517   echo $ac_n "(cached) $ac_c" 1>&6
518 else
519   if test -n "$CXX"; then
520   ac_cv_prog_CXX="$CXX" # Let the user override the test.
521 else
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"
531 fi
532 fi
533 CXX="$ac_cv_prog_CXX"
534 if test -n "$CXX"; then
535   echo "$ac_t""$CXX" 1>&6
536 else
537   echo "$ac_t""no" 1>&6
538 fi
539
540 test -n "$CXX" && break
541 done
542 test -n "$CXX" || CXX="gcc"
543
544
545 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
546 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
547   echo $ac_n "(cached) $ac_c" 1>&6
548 else
549   cat > conftest.C <<EOF
550 #ifdef __GNUC__
551   yes;
552 #endif
553 EOF
554 if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
555   ac_cv_prog_gxx=yes
556 else
557   ac_cv_prog_gxx=no
558 fi
559 fi
560 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
561 if 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
565 if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
566   echo $ac_n "(cached) $ac_c" 1>&6
567 else
568   echo 'void f(){}' > conftest.cc
569 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
570   ac_cv_prog_gxx_g=yes
571 else
572   ac_cv_prog_gxx_g=no
573 fi
574 rm -f conftest*
575
576 fi
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
584 else
585   GXX=
586   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
587 fi
588
589 # If we cannot run a trivial program, we must be cross compiling.
590 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
591 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
592   echo $ac_n "(cached) $ac_c" 1>&6
593 else
594   if test "$cross_compiling" = yes; then
595   ac_cv_c_cross=yes
596 else
597 cat > conftest.$ac_ext <<EOF
598 #line 599 "configure"
599 #include "confdefs.h"
600 main(){return(0);}
601 EOF
602 eval $ac_link
603 if test -s conftest && (./conftest; exit) 2>/dev/null; then
604   ac_cv_c_cross=no
605 else
606   ac_cv_c_cross=yes
607 fi
608 fi
609 rm -fr conftest*
610 fi
611 cross_compiling=$ac_cv_c_cross
612 echo "$ac_t""$ac_cv_c_cross" 1>&6
613
614
615
616
617 ac_ext=C
618 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
619 ac_cpp='$CXXCPP $CPPFLAGS'
620 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
621 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
622
623 if test "$cross_compiling" = no; then
624 echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6
625 fi
626 if test "$cross_compiling" = yes; then
627   :
628 else
629 cat > conftest.$ac_ext <<EOF
630 #line 631 "configure"
631 #include "confdefs.h"
632 #ifdef __cplusplus
633 extern "C" void exit(int);
634 #endif
635 int main() { return 0; }
636 EOF
637 eval $ac_link
638 if test -s conftest && (./conftest; exit) 2>/dev/null; then
639   echo "$ac_t""yes" 1>&6
640 else
641   echo "$ac_t""no" 1>&6
642 { echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
643 fi
644 fi
645 rm -fr conftest*
646 if test "$cross_compiling" = no; then
647 echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6
648 fi
649 if test "$cross_compiling" = yes; then
650   :
651 else
652 cat > conftest.$ac_ext <<EOF
653 #line 654 "configure"
654 #include "confdefs.h"
655 #ifdef __cplusplus
656 extern "C" void exit(int);
657 #endif
658
659 extern "C" {
660   void _exit(int);
661 }
662 int i;
663 struct A {
664   char dummy;
665   A() { i = 1; }
666   ~A() { if (i == 1) _exit(0); }
667 };
668 A a;
669 int main() { return 1; }
670
671 EOF
672 eval $ac_link
673 if test -s conftest && (./conftest; exit) 2>/dev/null; then
674   echo "$ac_t""yes" 1>&6
675 else
676   echo "$ac_t""no" 1>&6
677 { echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
678 fi
679 fi
680 rm -fr conftest*
681 echo $ac_n "checking that header files support C++""... $ac_c" 1>&6
682 cat > conftest.$ac_ext <<EOF
683 #line 684 "configure"
684 #include "confdefs.h"
685 #include <stdio.h>
686 int main() { return 0; }
687 int t() {
688 fopen(0, 0);
689 ; return 0; }
690 EOF
691 if eval $ac_link; then
692   rm -rf conftest*
693   echo "$ac_t""yes" 1>&6
694 else
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; }
698 fi
699 rm -f conftest*
700
701 ac_ext=c
702 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
703 ac_cpp='$CPP $CPPFLAGS'
704 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
705 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
706
707
708 if test -z "$PSPRINT"
709 then
710         for ac_prog in lpr
711 do
712 # Extract the first word of "$ac_prog", so it can be a program name with args.
713 set dummy $ac_prog; ac_word=$2
714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715 if eval "test \"`echo '$''{'ac_cv_prog_LPR'+set}'`\" = set"; then
716   echo $ac_n "(cached) $ac_c" 1>&6
717 else
718   if test -n "$LPR"; then
719   ac_cv_prog_LPR="$LPR" # Let the user override the test.
720 else
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"
730 fi
731 fi
732 LPR="$ac_cv_prog_LPR"
733 if test -n "$LPR"; then
734   echo "$ac_t""$LPR" 1>&6
735 else
736   echo "$ac_t""no" 1>&6
737 fi
738
739 test -n "$LPR" && break
740 done
741
742         for ac_prog in lp
743 do
744 # Extract the first word of "$ac_prog", so it can be a program name with args.
745 set dummy $ac_prog; ac_word=$2
746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
747 if eval "test \"`echo '$''{'ac_cv_prog_LP'+set}'`\" = set"; then
748   echo $ac_n "(cached) $ac_c" 1>&6
749 else
750   if test -n "$LP"; then
751   ac_cv_prog_LP="$LP" # Let the user override the test.
752 else
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"
762 fi
763 fi
764 LP="$ac_cv_prog_LP"
765 if test -n "$LP"; then
766   echo "$ac_t""$LP" 1>&6
767 else
768   echo "$ac_t""no" 1>&6
769 fi
770
771 test -n "$LP" && break
772 done
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
780 do
781 # Extract the first word of "$ac_prog", so it can be a program name with args.
782 set dummy $ac_prog; ac_word=$2
783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
784 if eval "test \"`echo '$''{'ac_cv_prog_LPQ'+set}'`\" = set"; then
785   echo $ac_n "(cached) $ac_c" 1>&6
786 else
787   if test -n "$LPQ"; then
788   ac_cv_prog_LPQ="$LPQ" # Let the user override the test.
789 else
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"
799 fi
800 fi
801 LPQ="$ac_cv_prog_LPQ"
802 if test -n "$LPQ"; then
803   echo "$ac_t""$LPQ" 1>&6
804 else
805   echo "$ac_t""no" 1>&6
806 fi
807
808 test -n "$LPQ" && break
809 done
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
820 fi
821
822 echo $ac_n "checking for command to use for printing PostScript files""... $ac_c" 1>&6
823 echo "$ac_t""$PSPRINT" 1>&6
824 # Figure out DVIPRINT from PSPRINT.
825 echo $ac_n "checking for command to use for printing dvi files""... $ac_c" 1>&6
826 if test -n "$PSPRINT" && test -z "$DVIPRINT"
827 then
828         if test "X$PSPRINT" = "Xlpr"
829         then
830                 DVIPRINT="lpr -d"
831         else
832                 DVIPRINT="$PSPRINT"
833         fi
834 fi
835
836 echo "$ac_t""$DVIPRINT" 1>&6
837 # Extract the first word of "perl", so it can be a program name with args.
838 set dummy perl; ac_word=$2
839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
840 if eval "test \"`echo '$''{'ac_cv_path_PERLPATH'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
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   ;;
859 esac
860 fi
861 PERLPATH="$ac_cv_path_PERLPATH"
862 if test -n "$PERLPATH"; then
863   echo "$ac_t""$PERLPATH" 1>&6
864 else
865   echo "$ac_t""no" 1>&6
866 fi
867
868 for ac_prog in byacc 'bison -y'
869 do
870 # Extract the first word of "$ac_prog", so it can be a program name with args.
871 set dummy $ac_prog; ac_word=$2
872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
873 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
874   echo $ac_n "(cached) $ac_c" 1>&6
875 else
876   if test -n "$YACC"; then
877   ac_cv_prog_YACC="$YACC" # Let the user override the test.
878 else
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"
888 fi
889 fi
890 YACC="$ac_cv_prog_YACC"
891 if test -n "$YACC"; then
892   echo "$ac_t""$YACC" 1>&6
893 else
894   echo "$ac_t""no" 1>&6
895 fi
896
897 test -n "$YACC" && break
898 done
899 test -n "$YACC" || YACC="yacc"
900
901 # Extract the first word of "ranlib", so it can be a program name with args.
902 set dummy ranlib; ac_word=$2
903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
904 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
905   echo $ac_n "(cached) $ac_c" 1>&6
906 else
907   if test -n "$RANLIB"; then
908   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
909 else
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=":"
920 fi
921 fi
922 RANLIB="$ac_cv_prog_RANLIB"
923 if test -n "$RANLIB"; then
924   echo "$ac_t""$RANLIB" 1>&6
925 else
926   echo "$ac_t""no" 1>&6
927 fi
928
929 ac_aux_dir=
930 for 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
940 done
941 if 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; }
943 fi
944 ac_config_guess=$ac_aux_dir/config.guess
945 ac_config_sub=$ac_aux_dir/config.sub
946 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
947
948 ac_dir=`cd $ac_aux_dir; pwd`
949 ac_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.
961 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
962 if test -z "$INSTALL"; then
963 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
964   echo $ac_n "(cached) $ac_c" 1>&6
965 else
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"
992 fi
993   INSTALL="$ac_cv_path_install"
994 fi
995 echo "$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.
999 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1000
1001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1002
1003 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1004 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1005   echo $ac_n "(cached) $ac_c" 1>&6
1006 else
1007   rm -f conftestdata
1008 if ln -s X conftestdata 2>/dev/null
1009 then
1010   rm -f conftestdata
1011   ac_cv_prog_LN_S="ln -s"
1012 else
1013   ac_cv_prog_LN_S=ln
1014 fi
1015 fi
1016 LN_S="$ac_cv_prog_LN_S"
1017 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1018   echo "$ac_t""yes" 1>&6
1019 else
1020   echo "$ac_t""no" 1>&6
1021 fi
1022
1023 echo $ac_n "checking for csh hash hack""... $ac_c" 1>&6
1024 cat <<EOF >conftest.sh
1025 #!/bin/sh
1026 true || exit 0
1027 export PATH || exit 0
1028 exit 1
1029 EOF
1030 chmod +x conftest.sh
1031 if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1
1032 then
1033         echo "$ac_t""yes" 1>&6; SH_SCRIPT_SED_CMD='1s/.*/:/'
1034 else
1035         echo "$ac_t""no" 1>&6; SH_SCRIPT_SED_CMD=''
1036 fi
1037 rm -f conftest.sh
1038
1039
1040 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1041 # On Suns, sometimes $CPP names a directory.
1042 if test -n "$CPP" && test -d "$CPP"; then
1043   CPP=
1044 fi
1045 if test -z "$CPP"; then
1046 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1047   echo $ac_n "(cached) $ac_c" 1>&6
1048 else
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>
1058 Syntax Error
1059 EOF
1060 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1061 ac_err=`grep -v '^ *+' conftest.out`
1062 if test -z "$ac_err"; then
1063   :
1064 else
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>
1072 Syntax Error
1073 EOF
1074 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1075 ac_err=`grep -v '^ *+' conftest.out`
1076 if test -z "$ac_err"; then
1077   :
1078 else
1079   echo "$ac_err" >&5
1080   rm -rf conftest*
1081   CPP=/lib/cpp
1082 fi
1083 rm -f conftest*
1084 fi
1085 rm -f conftest*
1086   ac_cv_prog_CPP="$CPP"
1087 fi
1088   CPP="$ac_cv_prog_CPP"
1089 else
1090   ac_cv_prog_CPP="$CPP"
1091 fi
1092 echo "$ac_t""$CPP" 1>&6
1093
1094 for ac_hdr in unistd.h dirent.h limits.h sys/dir.h stdlib.h
1095 do
1096 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1098 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   cat > conftest.$ac_ext <<EOF
1102 #line 1103 "configure"
1103 #include "confdefs.h"
1104 #include <$ac_hdr>
1105 EOF
1106 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1107 ac_err=`grep -v '^ *+' conftest.out`
1108 if test -z "$ac_err"; then
1109   rm -rf conftest*
1110   eval "ac_cv_header_$ac_safe=yes"
1111 else
1112   echo "$ac_err" >&5
1113   rm -rf conftest*
1114   eval "ac_cv_header_$ac_safe=no"
1115 fi
1116 rm -f conftest*
1117 fi
1118 if 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
1123 EOF
1124  
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128 done
1129
1130 echo $ac_n "checking for ISC 3.x or 4.x""... $ac_c" 1>&6
1131 if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1
1132 then
1133         echo "$ac_t""yes" 1>&6
1134         cat >> confdefs.h <<\EOF
1135 #define _SYSV3 1
1136 EOF
1137
1138 else
1139         echo "$ac_t""no" 1>&6
1140 fi
1141 echo $ac_n "checking whether -D_POSIX_SOURCE is necessary""... $ac_c" 1>&6
1142
1143 ac_ext=C
1144 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1145 ac_cpp='$CXXCPP $CPPFLAGS'
1146 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1147 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1148
1149 cat > conftest.$ac_ext <<EOF
1150 #line 1151 "configure"
1151 #include "confdefs.h"
1152 #include <stdio.h>
1153 extern "C" { void fileno(int); }
1154 int main() { return 0; }
1155 int t() {
1156
1157 ; return 0; }
1158 EOF
1159 if eval $ac_compile; then
1160   rm -rf conftest*
1161   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1162 #define _POSIX_SOURCE 1
1163 EOF
1164
1165 else
1166   rm -rf conftest*
1167   echo "$ac_t""no" 1>&6
1168 fi
1169 rm -f conftest*
1170
1171 ac_ext=c
1172 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1173 ac_cpp='$CPP $CPPFLAGS'
1174 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1175 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1176
1177
1178 ac_ext=C
1179 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1180 ac_cpp='$CXXCPP $CPPFLAGS'
1181 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1182 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1183
1184 echo $ac_n "checking declaration of getopt in stdlib.h""... $ac_c" 1>&6
1185 cat > conftest.$ac_ext <<EOF
1186 #line 1187 "configure"
1187 #include "confdefs.h"
1188 #include <stdlib.h>
1189 extern "C" { void getopt(int); }
1190 int main() { return 0; }
1191 int t() {
1192
1193 ; return 0; }
1194 EOF
1195 if eval $ac_compile; then
1196   rm -rf conftest*
1197   echo "$ac_t""no" 1>&6
1198 else
1199   rm -rf conftest*
1200   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1201 #define STDLIB_H_DECLARES_GETOPT 1
1202 EOF
1203
1204 fi
1205 rm -f conftest*
1206
1207 echo $ac_n "checking declaration of getopt in unistd.h""... $ac_c" 1>&6
1208 cat > conftest.$ac_ext <<EOF
1209 #line 1210 "configure"
1210 #include "confdefs.h"
1211 #include <sys/types.h>
1212 #include <unistd.h>
1213 extern "C" { void getopt(int); }
1214 int main() { return 0; }
1215 int t() {
1216
1217 ; return 0; }
1218 EOF
1219 if eval $ac_compile; then
1220   rm -rf conftest*
1221   echo "$ac_t""no" 1>&6
1222 else
1223   rm -rf conftest*
1224   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1225 #define UNISTD_H_DECLARES_GETOPT 1
1226 EOF
1227
1228 fi
1229 rm -f conftest*
1230
1231 ac_ext=c
1232 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1233 ac_cpp='$CPP $CPPFLAGS'
1234 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1235 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1236
1237
1238 ac_ext=C
1239 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1240 ac_cpp='$CXXCPP $CPPFLAGS'
1241 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1242 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1243
1244 echo $ac_n "checking declaration of putenv""... $ac_c" 1>&6
1245 cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 #include <stdlib.h>
1249 extern "C" { void putenv(int); }
1250 int main() { return 0; }
1251 int t() {
1252
1253 ; return 0; }
1254 EOF
1255 if eval $ac_compile; then
1256   rm -rf conftest*
1257   echo "$ac_t""no" 1>&6
1258 else
1259   rm -rf conftest*
1260   echo "$ac_t""yes" 1>&6
1261 cat >> confdefs.h <<\EOF
1262 #define STDLIB_H_DECLARES_PUTENV 1
1263 EOF
1264
1265 fi
1266 rm -f conftest*
1267
1268 ac_ext=c
1269 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1270 ac_cpp='$CPP $CPPFLAGS'
1271 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1272 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1273
1274
1275 ac_ext=C
1276 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1277 ac_cpp='$CXXCPP $CPPFLAGS'
1278 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1279 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1280
1281 echo $ac_n "checking declaration of popen""... $ac_c" 1>&6
1282 cat > conftest.$ac_ext <<EOF
1283 #line 1284 "configure"
1284 #include "confdefs.h"
1285 #include <stdio.h>
1286 extern "C" { void popen(int); }
1287 int main() { return 0; }
1288 int t() {
1289
1290 ; return 0; }
1291 EOF
1292 if eval $ac_compile; then
1293   rm -rf conftest*
1294   echo "$ac_t""no" 1>&6
1295 else
1296   rm -rf conftest*
1297   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1298 #define STDIO_H_DECLARES_POPEN 1
1299 EOF
1300
1301 fi
1302 rm -f conftest*
1303
1304 ac_ext=c
1305 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1306 ac_cpp='$CPP $CPPFLAGS'
1307 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1308 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1309
1310
1311 ac_ext=C
1312 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1313 ac_cpp='$CXXCPP $CPPFLAGS'
1314 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1315 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1316
1317 echo $ac_n "checking declaration of pclose""... $ac_c" 1>&6
1318 cat > conftest.$ac_ext <<EOF
1319 #line 1320 "configure"
1320 #include "confdefs.h"
1321 #include <stdio.h>
1322 extern "C" { void pclose(int); }
1323 int main() { return 0; }
1324 int t() {
1325
1326 ; return 0; }
1327 EOF
1328 if eval $ac_compile; then
1329   rm -rf conftest*
1330   echo "$ac_t""no" 1>&6
1331 else
1332   rm -rf conftest*
1333   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1334 #define STDIO_H_DECLARES_PCLOSE 1
1335 EOF
1336
1337 fi
1338 rm -f conftest*
1339
1340 ac_ext=c
1341 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1342 ac_cpp='$CPP $CPPFLAGS'
1343 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1344 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1345
1346
1347 ac_ext=C
1348 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1349 ac_cpp='$CXXCPP $CPPFLAGS'
1350 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1351 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1352
1353 echo $ac_n "checking C++ <osfcn.h>""... $ac_c" 1>&6
1354 cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1357 #include <osfcn.h>
1358 int main() { return 0; }
1359 int t() {
1360 read(0, 0, 0); open(0, 0);
1361 ; return 0; }
1362 EOF
1363 if 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
1367 EOF
1368
1369 else
1370   rm -rf conftest*
1371   echo "$ac_t""no" 1>&6
1372 fi
1373 rm -f conftest*
1374
1375 ac_ext=c
1376 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1377 ac_cpp='$CPP $CPPFLAGS'
1378 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1379 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1380
1381
1382 ac_ext=C
1383 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1384 ac_cpp='$CXXCPP $CPPFLAGS'
1385 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1386 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1387
1388 echo $ac_n "checking C++ <limits.h>""... $ac_c" 1>&6
1389 cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392 #include <limits.h>
1393 int main() { return 0; }
1394 int t() {
1395 int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX;
1396 ; return 0; }
1397 EOF
1398 if 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
1402 EOF
1403
1404 else
1405   rm -rf conftest*
1406   echo "$ac_t""no" 1>&6
1407 fi
1408 rm -f conftest*
1409
1410 ac_ext=c
1411 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1412 ac_cpp='$CPP $CPPFLAGS'
1413 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1414 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1415
1416
1417 ac_ext=C
1418 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1419 ac_cpp='$CXXCPP $CPPFLAGS'
1420 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1421 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1422
1423 echo $ac_n "checking for declaration of time_t""... $ac_c" 1>&6
1424 cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427 #include <time.h>
1428 int main() { return 0; }
1429 int t() {
1430 time_t t = time(0); struct tm *p = localtime(&t);
1431 ; return 0; }
1432 EOF
1433 if eval $ac_compile; then
1434   rm -rf conftest*
1435   echo "$ac_t""yes" 1>&6
1436 else
1437   rm -rf conftest*
1438   echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF
1439 #define LONG_FOR_TIME_T 1
1440 EOF
1441
1442 fi
1443 rm -f conftest*
1444
1445 ac_ext=c
1446 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1447 ac_cpp='$CPP $CPPFLAGS'
1448 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1449 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1450
1451 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1452 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1453   echo $ac_n "(cached) $ac_c" 1>&6
1454 else
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
1464 extern "C"
1465 #endif
1466 void (*signal ()) ();
1467 int main() { return 0; }
1468 int t() {
1469 int i;
1470 ; return 0; }
1471 EOF
1472 if eval $ac_compile; then
1473   rm -rf conftest*
1474   ac_cv_type_signal=void
1475 else
1476   rm -rf conftest*
1477   ac_cv_type_signal=int
1478 fi
1479 rm -f conftest*
1480
1481 fi
1482 echo "$ac_t""$ac_cv_type_signal" 1>&6
1483 cat >> confdefs.h <<EOF
1484 #define RETSIGTYPE $ac_cv_type_signal
1485 EOF
1486
1487
1488 echo $ac_n "checking struct exception""... $ac_c" 1>&6
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492 #include <math.h>
1493 int main() { return 0; }
1494 int t() {
1495 struct exception e;
1496 ; return 0; }
1497 EOF
1498 if 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
1502 EOF
1503
1504 else
1505   rm -rf conftest*
1506   echo "$ac_t""no" 1>&6
1507 fi
1508 rm -f conftest*
1509
1510 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1511 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1512   echo $ac_n "(cached) $ac_c" 1>&6
1513 else
1514   if test "$cross_compiling" = yes; then
1515   ac_cv_func_mmap=no
1516 else
1517 cat > 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
1557 extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1558 #else
1559 char *valloc(), *malloc();
1560 #endif
1561
1562 int
1563 main()
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
1592 EOF
1593 eval $ac_link
1594 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1595   ac_cv_func_mmap=yes
1596 else
1597   ac_cv_func_mmap=no
1598 fi
1599 fi
1600 rm -fr conftest*
1601 fi
1602 echo "$ac_t""$ac_cv_func_mmap" 1>&6
1603 if test $ac_cv_func_mmap = yes; then
1604   cat >> confdefs.h <<\EOF
1605 #define HAVE_MMAP 1
1606 EOF
1607
1608 fi
1609
1610 saved_libs="$LIBS"
1611 LIBS="$LIBS -lm"
1612 for ac_func in fmod strtol getcwd strerror putenv
1613 do
1614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1616   echo $ac_n "(cached) $ac_c" 1>&6
1617 else
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.  */
1625 char $ac_func(); 
1626
1627 int main() { return 0; }
1628 int 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)
1634 choke me
1635 #else
1636 $ac_func();
1637 #endif
1638
1639 ; return 0; }
1640 EOF
1641 if eval $ac_link; then
1642   rm -rf conftest*
1643   eval "ac_cv_func_$ac_func=yes"
1644 else
1645   rm -rf conftest*
1646   eval "ac_cv_func_$ac_func=no"
1647 fi
1648 rm -f conftest*
1649
1650 fi
1651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1652   echo "$ac_t""yes" 1>&6
1653   :
1654 else
1655   echo "$ac_t""no" 1>&6
1656 LIBOBJS="$LIBOBJS ${ac_func}.o"
1657 fi
1658
1659 done
1660
1661 LIBS="$saved_libs"
1662 for ac_func in rename mkstemp
1663 do
1664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1665 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1666   echo $ac_n "(cached) $ac_c" 1>&6
1667 else
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.  */
1675 char $ac_func(); 
1676
1677 int main() { return 0; }
1678 int 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)
1684 choke me
1685 #else
1686 $ac_func();
1687 #endif
1688
1689 ; return 0; }
1690 EOF
1691 if eval $ac_link; then
1692   rm -rf conftest*
1693   eval "ac_cv_func_$ac_func=yes"
1694 else
1695   rm -rf conftest*
1696   eval "ac_cv_func_$ac_func=no"
1697 fi
1698 rm -f conftest*
1699
1700 fi
1701 if 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
1706 EOF
1707  
1708 else
1709   echo "$ac_t""no" 1>&6
1710 fi
1711 done
1712
1713 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
1714 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
1715   echo $ac_n "(cached) $ac_c" 1>&6
1716 else
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
1726 int main() { return 0; }
1727 int t() {
1728 char *msg = *(sys_siglist + 1);
1729 ; return 0; }
1730 EOF
1731 if eval $ac_compile; then
1732   rm -rf conftest*
1733   ac_cv_decl_sys_siglist=yes
1734 else
1735   rm -rf conftest*
1736   ac_cv_decl_sys_siglist=no
1737 fi
1738 rm -f conftest*
1739
1740 fi
1741 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
1742 if test $ac_cv_decl_sys_siglist = yes; then
1743   cat >> confdefs.h <<\EOF
1744 #define SYS_SIGLIST_DECLARED 1
1745 EOF
1746
1747 fi
1748
1749
1750 ac_ext=C
1751 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1752 ac_cpp='$CXXCPP $CPPFLAGS'
1753 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1754 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1755
1756 echo $ac_n "checking whether ANSI array delete syntax supported""... $ac_c" 1>&6
1757 cat > conftest.$ac_ext <<EOF
1758 #line 1759 "configure"
1759 #include "confdefs.h"
1760
1761 int main() { return 0; }
1762 int t() {
1763 char *p = new char[5]; delete [] p;
1764 ; return 0; }
1765 EOF
1766 if eval $ac_compile; then
1767   rm -rf conftest*
1768   echo "$ac_t""yes" 1>&6
1769 else
1770   rm -rf conftest*
1771   echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF
1772 #define ARRAY_DELETE_NEEDS_SIZE 1
1773 EOF
1774
1775 fi
1776 rm -f conftest*
1777
1778 ac_ext=c
1779 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1780 ac_cpp='$CPP $CPPFLAGS'
1781 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1782 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1783
1784
1785 ac_ext=C
1786 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1787 ac_cpp='$CXXCPP $CPPFLAGS'
1788 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1789 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1790
1791 echo $ac_n "checking traditional preprocessor""... $ac_c" 1>&6
1792 cat > conftest.$ac_ext <<EOF
1793 #line 1794 "configure"
1794 #include "confdefs.h"
1795 #define name2(a,b) a/**/b
1796 int main() { return 0; }
1797 int t() {
1798 int name2(foo,bar);
1799 ; return 0; }
1800 EOF
1801 if eval $ac_compile; then
1802   rm -rf conftest*
1803   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1804 #define TRADITIONAL_CPP 1
1805 EOF
1806
1807 else
1808   rm -rf conftest*
1809   echo "$ac_t""no" 1>&6
1810 fi
1811 rm -f conftest*
1812
1813 ac_ext=c
1814 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1815 ac_cpp='$CPP $CPPFLAGS'
1816 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
1817 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
1818
1819 echo $ac_n "checking w_coredump""... $ac_c" 1>&6
1820 if test "$cross_compiling" = yes; then
1821   echo "$ac_t""no" 1>&6
1822 else
1823 cat > conftest.$ac_ext <<EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1826
1827 #include <sys/types.h>
1828 #include <sys/wait.h>
1829 main()
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
1840 EOF
1841 eval $ac_link
1842 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1843   echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
1844 #define WCOREFLAG 0200
1845 EOF
1846
1847 else
1848   echo "$ac_t""no" 1>&6
1849 fi
1850 fi
1851 rm -fr conftest*
1852 echo $ac_n "checking default value for grops -b option""... $ac_c" 1>&6
1853 test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7
1854 echo "$ac_t""$BROKEN_SPOOLER_FLAGS" 1>&6
1855
1856 echo $ac_n "checking default paper size""... $ac_c" 1>&6
1857 if test -z "$PAGE"
1858 then
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
1874 fi
1875 if test -z "$PAGE"
1876 then
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
1895 fi
1896 test -n "$PAGE" || PAGE=letter
1897 echo "$ac_t""$PAGE" 1>&6
1898
1899 echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6
1900 if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" \
1901   = x0
1902 then
1903         echo "$ac_t""yes" 1>&6
1904         g=g
1905 else
1906         echo "$ac_t""no" 1>&6
1907         g=
1908 fi
1909
1910
1911
1912 echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6
1913 sys_tmac_prefix=
1914 sys_tmac_file_prefix=
1915 for d in /usr/share/lib/tmac /usr/lib/tmac
1916 do
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
1931 done
1932 echo "$ac_t""$sys_tmac_prefix" 1>&6
1933
1934 tmac_wrap=
1935 echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6
1936 if test "x$sys_tmac_file_prefix" = "xtmac."
1937 then
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
1949 elif test -n "$sys_tmac_prefix"
1950 then
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
1975 fi
1976 echo "$ac_t""$tmac_wrap" 1>&6
1977
1978
1979 trap '' 1 2 15
1980 cat > 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 #
1995 EOF
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
2001 if cmp -s $cache_file confcache; then
2002   :
2003 else
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
2010 fi
2011 rm -f confcache
2012
2013 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2014
2015 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2016 # Let make expand exec_prefix.
2017 test "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.
2022 if test "x$srcdir" = x.; then
2023   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2024 fi
2025
2026 trap '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.
2031 cat > conftest.defs <<\EOF
2032 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2033 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2034 s%\[%\\&%g
2035 s%\]%\\&%g
2036 s%\$%$$%g
2037 EOF
2038 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2039 rm -f conftest.defs
2040
2041
2042 # Without the "./", some shells look in PATH for config.status.
2043 : ${CONFIG_STATUS=./config.status}
2044
2045 echo creating $CONFIG_STATUS
2046 rm -f $CONFIG_STATUS
2047 cat > $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
2059 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2060 for ac_option
2061 do
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
2073 done
2074
2075 ac_given_srcdir=$srcdir
2076 ac_given_INSTALL="$INSTALL"
2077
2078 trap '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. 
2081 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
2082  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2083 $ac_vpsub
2084 $extrasub
2085 s%@CFLAGS@%$CFLAGS%g
2086 s%@CPPFLAGS@%$CPPFLAGS%g
2087 s%@CXXFLAGS@%$CXXFLAGS%g
2088 s%@DEFS@%$DEFS%g
2089 s%@LDFLAGS@%$LDFLAGS%g
2090 s%@LIBS@%$LIBS%g
2091 s%@exec_prefix@%$exec_prefix%g
2092 s%@prefix@%$prefix%g
2093 s%@program_transform_name@%$program_transform_name%g
2094 s%@GROPS@%$GROPS%g
2095 s%@CC@%$CC%g
2096 s%@CXX@%$CXX%g
2097 s%@LPR@%$LPR%g
2098 s%@LP@%$LP%g
2099 s%@LPQ@%$LPQ%g
2100 s%@PSPRINT@%$PSPRINT%g
2101 s%@DVIPRINT@%$DVIPRINT%g
2102 s%@PERLPATH@%$PERLPATH%g
2103 s%@YACC@%$YACC%g
2104 s%@RANLIB@%$RANLIB%g
2105 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2106 s%@INSTALL_DATA@%$INSTALL_DATA%g
2107 s%@LN_S@%$LN_S%g
2108 s%@SH_SCRIPT_SED_CMD@%$SH_SCRIPT_SED_CMD%g
2109 s%@CPP@%$CPP%g
2110 s%@LIBOBJS@%$LIBOBJS%g
2111 s%@BROKEN_SPOOLER_FLAGS@%$BROKEN_SPOOLER_FLAGS%g
2112 s%@PAGE@%$PAGE%g
2113 s%@g@%$g%g
2114 s%@sys_tmac_prefix@%$sys_tmac_prefix%g
2115 s%@tmac_wrap@%$tmac_wrap%g
2116
2117 CEOF
2118 EOF
2119 cat >> $CONFIG_STATUS <<EOF
2120
2121 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2122 EOF
2123 cat >> $CONFIG_STATUS <<\EOF
2124 for 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
2169 s%@configure_input@%$configure_input%g
2170 s%@srcdir@%$srcdir%g
2171 s%@top_srcdir@%$top_srcdir%g
2172 s%@INSTALL@%$INSTALL%g
2173 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2174 fi; done
2175 rm -f conftest.subs
2176
2177
2178
2179 exit 0
2180 EOF
2181 chmod +x $CONFIG_STATUS
2182 rm -fr confdefs* $ac_clean_files
2183 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2184