]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
59118506c7860e9d6715f197a8e7ad0b290456d2
[bacula/bacula] / bacula / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-everything     enable standard non-multichoice features: marked *"
16 ac_help="$ac_help
17   --enable-gnome        enable build of gnome-console GUI                     *"
18 ac_help="$ac_help
19   --with-gnome-includes   Specify location of GNOME headers"
20 ac_help="$ac_help
21   --with-gnome-libs       Specify location of GNOME libs"
22 ac_help="$ac_help
23   --with-gnome            Specify prefix for GNOME files"
24 ac_help="$ac_help
25   --enable-smartalloc     enable smartalloc debugging support              *"
26 ac_help="$ac_help
27   --enable-static-tools    enable static tape tools                        *"
28 ac_help="$ac_help
29   --disable-readline      disable readline support "
30 ac_help="$ac_help
31         --with-readline[=DIR]   Specify readline library directory"
32 ac_help="$ac_help
33   --with-gmp[=DIR]      Specify gmp library directory"
34 ac_help="$ac_help
35   --with-cweb[=DIR]      Specify cweb library directory"
36 ac_help="$ac_help
37   --with-tcp-wrappers=DIR Enable tcpwrappers support"
38 ac_help="$ac_help
39   --with-working-dir=PATH Specify location of Bacula working files"
40 ac_help="$ac_help
41   --with-dump-email=Dump email address"
42 ac_help="$ac_help
43   --with-job-email=Job output email address"
44 ac_help="$ac_help
45   --with-smtp-host=SMTP mail host address"
46 ac_help="$ac_help
47   --with-pid-dir=PATH    Specify location of Bacula pid files"
48 ac_help="$ac_help
49   --with-subsys-dir=PATH         Specify location of Bacula subsys file"
50 ac_help="$ac_help
51   --with-baseport=PORT    Specify base port address for daemons"
52 ac_help="$ac_help
53   --with-dir-password=PASSWORD Specify Director's password"
54 ac_help="$ac_help
55   --with-fd-password=PASSWORD Specify Client's password"
56 ac_help="$ac_help
57   --with-sd-password=PASSWORD Specify Storage daemon's password"
58 ac_help="$ac_help
59
60 Which one DBMS do you want to use (please select only one):
61   --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
62                           install directory, default is to search through
63                           a number of common places for the MySQL files."
64 ac_help="$ac_help
65
66 Which one DBMS do you want to use (please select only one):
67   --with-embedded-mysql[=DIR] Include MySQL support.  DIR is the MySQL base
68                           install directory, default is to search through
69                           a number of common places for the MySQL files."
70 ac_help="$ac_help
71
72 Which one DBMS do you want to use (please select only one):
73   --with-sqlite[=DIR]     Include SQLite support.  DIR is the SQLite base
74                           install directory, default is to search through
75                           a number of common places for the SQLite files."
76 ac_help="$ac_help
77   --disable-largefile     omit support for large files"
78 ac_help="$ac_help
79   --with-x                use the X Window System"
80
81 # Initialize some variables set by options.
82 # The variables have the same names as the options, with
83 # dashes changed to underlines.
84 build=NONE
85 cache_file=./config.cache
86 exec_prefix=NONE
87 host=NONE
88 no_create=
89 nonopt=NONE
90 no_recursion=
91 prefix=NONE
92 program_prefix=NONE
93 program_suffix=NONE
94 program_transform_name=s,x,x,
95 silent=
96 site=
97 srcdir=
98 target=NONE
99 verbose=
100 x_includes=NONE
101 x_libraries=NONE
102 bindir='${exec_prefix}/bin'
103 sbindir='${exec_prefix}/sbin'
104 libexecdir='${exec_prefix}/libexec'
105 datadir='${prefix}/share'
106 sysconfdir='${prefix}/etc'
107 sharedstatedir='${prefix}/com'
108 localstatedir='${prefix}/var'
109 libdir='${exec_prefix}/lib'
110 includedir='${prefix}/include'
111 oldincludedir='/usr/include'
112 infodir='${prefix}/info'
113 mandir='${prefix}/man'
114
115 # Initialize some other variables.
116 subdirs=
117 MFLAGS= MAKEFLAGS=
118 SHELL=${CONFIG_SHELL-/bin/sh}
119 # Maximum number of lines to put in a shell here document.
120 ac_max_here_lines=12
121
122 ac_prev=
123 for ac_option
124 do
125
126   # If the previous option needs an argument, assign it.
127   if test -n "$ac_prev"; then
128     eval "$ac_prev=\$ac_option"
129     ac_prev=
130     continue
131   fi
132
133   case "$ac_option" in
134   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
135   *) ac_optarg= ;;
136   esac
137
138   # Accept the important Cygnus configure options, so we can diagnose typos.
139
140   case "$ac_option" in
141
142   -bindir | --bindir | --bindi | --bind | --bin | --bi)
143     ac_prev=bindir ;;
144   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
145     bindir="$ac_optarg" ;;
146
147   -build | --build | --buil | --bui | --bu)
148     ac_prev=build ;;
149   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
150     build="$ac_optarg" ;;
151
152   -cache-file | --cache-file | --cache-fil | --cache-fi \
153   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
154     ac_prev=cache_file ;;
155   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
156   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
157     cache_file="$ac_optarg" ;;
158
159   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
160     ac_prev=datadir ;;
161   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
162   | --da=*)
163     datadir="$ac_optarg" ;;
164
165   -disable-* | --disable-*)
166     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
167     # Reject names that are not valid shell variable names.
168     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
169       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
170     fi
171     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
172     eval "enable_${ac_feature}=no" ;;
173
174   -enable-* | --enable-*)
175     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
176     # Reject names that are not valid shell variable names.
177     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
178       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179     fi
180     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181     case "$ac_option" in
182       *=*) ;;
183       *) ac_optarg=yes ;;
184     esac
185     eval "enable_${ac_feature}='$ac_optarg'" ;;
186
187   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
188   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
189   | --exec | --exe | --ex)
190     ac_prev=exec_prefix ;;
191   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
192   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
193   | --exec=* | --exe=* | --ex=*)
194     exec_prefix="$ac_optarg" ;;
195
196   -gas | --gas | --ga | --g)
197     # Obsolete; use --with-gas.
198     with_gas=yes ;;
199
200   -help | --help | --hel | --he)
201     # Omit some internal or obsolete options to make the list less imposing.
202     # This message is too long to be a string in the A/UX 3.1 sh.
203     cat << EOF
204 Usage: configure [options] [host]
205 Options: [defaults in brackets after descriptions]
206 Configuration:
207   --cache-file=FILE       cache test results in FILE
208   --help                  print this message
209   --no-create             do not create output files
210   --quiet, --silent       do not print \`checking...' messages
211   --version               print the version of autoconf that created configure
212 Directory and file names:
213   --prefix=PREFIX         install architecture-independent files in PREFIX
214                           [$ac_default_prefix]
215   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
216                           [same as prefix]
217   --bindir=DIR            user executables in DIR [EPREFIX/bin]
218   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
219   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
220   --datadir=DIR           read-only architecture-independent data in DIR
221                           [PREFIX/share]
222   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
223   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
224                           [PREFIX/com]
225   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
226   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
227   --includedir=DIR        C header files in DIR [PREFIX/include]
228   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
229   --infodir=DIR           info documentation in DIR [PREFIX/info]
230   --mandir=DIR            man documentation in DIR [PREFIX/man]
231   --srcdir=DIR            find the sources in DIR [configure dir or ..]
232   --program-prefix=PREFIX prepend PREFIX to installed program names
233   --program-suffix=SUFFIX append SUFFIX to installed program names
234   --program-transform-name=PROGRAM
235                           run sed PROGRAM on installed program names
236 EOF
237     cat << EOF
238 Host type:
239   --build=BUILD           configure for building on BUILD [BUILD=HOST]
240   --host=HOST             configure for HOST [guessed]
241   --target=TARGET         configure for TARGET [TARGET=HOST]
242 Features and packages:
243   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
244   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
245   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
246   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
247   --x-includes=DIR        X include files are in DIR
248   --x-libraries=DIR       X library files are in DIR
249 EOF
250     if test -n "$ac_help"; then
251       echo "--enable and --with options recognized:$ac_help"
252     fi
253     exit 0 ;;
254
255   -host | --host | --hos | --ho)
256     ac_prev=host ;;
257   -host=* | --host=* | --hos=* | --ho=*)
258     host="$ac_optarg" ;;
259
260   -includedir | --includedir | --includedi | --included | --include \
261   | --includ | --inclu | --incl | --inc)
262     ac_prev=includedir ;;
263   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
264   | --includ=* | --inclu=* | --incl=* | --inc=*)
265     includedir="$ac_optarg" ;;
266
267   -infodir | --infodir | --infodi | --infod | --info | --inf)
268     ac_prev=infodir ;;
269   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
270     infodir="$ac_optarg" ;;
271
272   -libdir | --libdir | --libdi | --libd)
273     ac_prev=libdir ;;
274   -libdir=* | --libdir=* | --libdi=* | --libd=*)
275     libdir="$ac_optarg" ;;
276
277   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
278   | --libexe | --libex | --libe)
279     ac_prev=libexecdir ;;
280   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
281   | --libexe=* | --libex=* | --libe=*)
282     libexecdir="$ac_optarg" ;;
283
284   -localstatedir | --localstatedir | --localstatedi | --localstated \
285   | --localstate | --localstat | --localsta | --localst \
286   | --locals | --local | --loca | --loc | --lo)
287     ac_prev=localstatedir ;;
288   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
289   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
290   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
291     localstatedir="$ac_optarg" ;;
292
293   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
294     ac_prev=mandir ;;
295   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
296     mandir="$ac_optarg" ;;
297
298   -nfp | --nfp | --nf)
299     # Obsolete; use --without-fp.
300     with_fp=no ;;
301
302   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
303   | --no-cr | --no-c)
304     no_create=yes ;;
305
306   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
307   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
308     no_recursion=yes ;;
309
310   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
311   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
312   | --oldin | --oldi | --old | --ol | --o)
313     ac_prev=oldincludedir ;;
314   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
315   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
316   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
317     oldincludedir="$ac_optarg" ;;
318
319   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
320     ac_prev=prefix ;;
321   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
322     prefix="$ac_optarg" ;;
323
324   -program-prefix | --program-prefix | --program-prefi | --program-pref \
325   | --program-pre | --program-pr | --program-p)
326     ac_prev=program_prefix ;;
327   -program-prefix=* | --program-prefix=* | --program-prefi=* \
328   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
329     program_prefix="$ac_optarg" ;;
330
331   -program-suffix | --program-suffix | --program-suffi | --program-suff \
332   | --program-suf | --program-su | --program-s)
333     ac_prev=program_suffix ;;
334   -program-suffix=* | --program-suffix=* | --program-suffi=* \
335   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
336     program_suffix="$ac_optarg" ;;
337
338   -program-transform-name | --program-transform-name \
339   | --program-transform-nam | --program-transform-na \
340   | --program-transform-n | --program-transform- \
341   | --program-transform | --program-transfor \
342   | --program-transfo | --program-transf \
343   | --program-trans | --program-tran \
344   | --progr-tra | --program-tr | --program-t)
345     ac_prev=program_transform_name ;;
346   -program-transform-name=* | --program-transform-name=* \
347   | --program-transform-nam=* | --program-transform-na=* \
348   | --program-transform-n=* | --program-transform-=* \
349   | --program-transform=* | --program-transfor=* \
350   | --program-transfo=* | --program-transf=* \
351   | --program-trans=* | --program-tran=* \
352   | --progr-tra=* | --program-tr=* | --program-t=*)
353     program_transform_name="$ac_optarg" ;;
354
355   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
356   | -silent | --silent | --silen | --sile | --sil)
357     silent=yes ;;
358
359   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
360     ac_prev=sbindir ;;
361   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
362   | --sbi=* | --sb=*)
363     sbindir="$ac_optarg" ;;
364
365   -sharedstatedir | --sharedstatedir | --sharedstatedi \
366   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
367   | --sharedst | --shareds | --shared | --share | --shar \
368   | --sha | --sh)
369     ac_prev=sharedstatedir ;;
370   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
371   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
372   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
373   | --sha=* | --sh=*)
374     sharedstatedir="$ac_optarg" ;;
375
376   -site | --site | --sit)
377     ac_prev=site ;;
378   -site=* | --site=* | --sit=*)
379     site="$ac_optarg" ;;
380
381   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
382     ac_prev=srcdir ;;
383   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
384     srcdir="$ac_optarg" ;;
385
386   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
387   | --syscon | --sysco | --sysc | --sys | --sy)
388     ac_prev=sysconfdir ;;
389   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
390   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
391     sysconfdir="$ac_optarg" ;;
392
393   -target | --target | --targe | --targ | --tar | --ta | --t)
394     ac_prev=target ;;
395   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
396     target="$ac_optarg" ;;
397
398   -v | -verbose | --verbose | --verbos | --verbo | --verb)
399     verbose=yes ;;
400
401   -version | --version | --versio | --versi | --vers)
402     echo "configure generated by autoconf version 2.13"
403     exit 0 ;;
404
405   -with-* | --with-*)
406     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
407     # Reject names that are not valid shell variable names.
408     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
409       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
410     fi
411     ac_package=`echo $ac_package| sed 's/-/_/g'`
412     case "$ac_option" in
413       *=*) ;;
414       *) ac_optarg=yes ;;
415     esac
416     eval "with_${ac_package}='$ac_optarg'" ;;
417
418   -without-* | --without-*)
419     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
422       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
423     fi
424     ac_package=`echo $ac_package| sed 's/-/_/g'`
425     eval "with_${ac_package}=no" ;;
426
427   --x)
428     # Obsolete; use --with-x.
429     with_x=yes ;;
430
431   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432   | --x-incl | --x-inc | --x-in | --x-i)
433     ac_prev=x_includes ;;
434   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436     x_includes="$ac_optarg" ;;
437
438   -x-libraries | --x-libraries | --x-librarie | --x-librari \
439   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440     ac_prev=x_libraries ;;
441   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443     x_libraries="$ac_optarg" ;;
444
445   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
446     ;;
447
448   *)
449     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
450       echo "configure: warning: $ac_option: invalid host type" 1>&2
451     fi
452     if test "x$nonopt" != xNONE; then
453       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
454     fi
455     nonopt="$ac_option"
456     ;;
457
458   esac
459 done
460
461 if test -n "$ac_prev"; then
462   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
463 fi
464
465 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
466
467 # File descriptor usage:
468 # 0 standard input
469 # 1 file creation
470 # 2 errors and warnings
471 # 3 some systems may open it to /dev/tty
472 # 4 used on the Kubota Titan
473 # 6 checking for... messages and results
474 # 5 compiler messages saved in config.log
475 if test "$silent" = yes; then
476   exec 6>/dev/null
477 else
478   exec 6>&1
479 fi
480 exec 5>./config.log
481
482 echo "\
483 This file contains any messages produced by compilers while
484 running configure, to aid debugging if configure makes a mistake.
485 " 1>&5
486
487 # Strip out --no-create and --no-recursion so they do not pile up.
488 # Also quote any args containing shell metacharacters.
489 ac_configure_args=
490 for ac_arg
491 do
492   case "$ac_arg" in
493   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
494   | --no-cr | --no-c) ;;
495   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
496   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
497   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
498   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
499   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
500   esac
501 done
502
503 # NLS nuisances.
504 # Only set these to C if already set.  These must not be set unconditionally
505 # because not all systems understand e.g. LANG=C (notably SCO).
506 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
507 # Non-C LC_CTYPE values break the ctype check.
508 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
509 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
510 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
511 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
512
513 # confdefs.h avoids OS command line length limits that DEFS can exceed.
514 rm -rf conftest* confdefs.h
515 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
516 echo > confdefs.h
517
518 # A filename unique to this package, relative to the directory that
519 # configure is in, which we can look for to find out if srcdir is correct.
520 ac_unique_file=src/version.h
521
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524   ac_srcdir_defaulted=yes
525   # Try the directory containing this script, then its parent.
526   ac_prog=$0
527   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
528   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
529   srcdir=$ac_confdir
530   if test ! -r $srcdir/$ac_unique_file; then
531     srcdir=..
532   fi
533 else
534   ac_srcdir_defaulted=no
535 fi
536 if test ! -r $srcdir/$ac_unique_file; then
537   if test "$ac_srcdir_defaulted" = yes; then
538     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
539   else
540     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
541   fi
542 fi
543 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
544
545 # Prefer explicitly selected file to automatically selected ones.
546 if test -z "$CONFIG_SITE"; then
547   if test "x$prefix" != xNONE; then
548     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
549   else
550     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
551   fi
552 fi
553 for ac_site_file in $CONFIG_SITE; do
554   if test -r "$ac_site_file"; then
555     echo "loading site script $ac_site_file"
556     . "$ac_site_file"
557   fi
558 done
559
560 if test -r "$cache_file"; then
561   echo "loading cache $cache_file"
562   . $cache_file
563 else
564   echo "creating cache $cache_file"
565   > $cache_file
566 fi
567
568 ac_ext=c
569 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
570 ac_cpp='$CPP $CPPFLAGS'
571 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
572 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
573 cross_compiling=$ac_cv_prog_cc_cross
574
575 ac_exeext=
576 ac_objext=o
577 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
578   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
579   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
580     ac_n= ac_c='
581 ' ac_t='        '
582   else
583     ac_n=-n ac_c= ac_t=
584   fi
585 else
586   ac_n= ac_c='\c' ac_t=
587 fi
588
589
590 BUILD_DIR=`pwd`
591 cd ..
592 TOP_DIR=`pwd`
593 cd ${BUILD_DIR}
594
595 ac_aux_dir=
596 for ac_dir in ${BUILD_DIR}/autoconf $srcdir/${BUILD_DIR}/autoconf; do
597   if test -f $ac_dir/install-sh; then
598     ac_aux_dir=$ac_dir
599     ac_install_sh="$ac_aux_dir/install-sh -c"
600     break
601   elif test -f $ac_dir/install.sh; then
602     ac_aux_dir=$ac_dir
603     ac_install_sh="$ac_aux_dir/install.sh -c"
604     break
605   fi
606 done
607 if test -z "$ac_aux_dir"; then
608   { echo "configure: error: can not find install-sh or install.sh in ${BUILD_DIR}/autoconf $srcdir/${BUILD_DIR}/autoconf" 1>&2; exit 1; }
609 fi
610 ac_config_guess=$ac_aux_dir/config.guess
611 ac_config_sub=$ac_aux_dir/config.sub
612 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
613
614
615
616
617
618
619 for ac_prog in true
620 do
621 # Extract the first word of "$ac_prog", so it can be a program name with args.
622 set dummy $ac_prog; ac_word=$2
623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
624 echo "configure:625: checking for $ac_word" >&5
625 if eval "test \"`echo '$''{'ac_cv_path_TRUEPRG'+set}'`\" = set"; then
626   echo $ac_n "(cached) $ac_c" 1>&6
627 else
628   case "$TRUEPRG" in
629   /*)
630   ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a path.
631   ;;
632   ?:/*)                  
633   ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a dos path.
634   ;;
635   *)
636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
637   ac_dummy="$PATH"
638   for ac_dir in $ac_dummy; do 
639     test -z "$ac_dir" && ac_dir=.
640     if test -f $ac_dir/$ac_word; then
641       ac_cv_path_TRUEPRG="$ac_dir/$ac_word"
642       break
643     fi
644   done
645   IFS="$ac_save_ifs"
646   ;;
647 esac
648 fi
649 TRUEPRG="$ac_cv_path_TRUEPRG"
650 if test -n "$TRUEPRG"; then
651   echo "$ac_t""$TRUEPRG" 1>&6
652 else
653   echo "$ac_t""no" 1>&6
654 fi
655
656 test -n "$TRUEPRG" && break
657 done
658 test -n "$TRUEPRG" || TRUEPRG=":"
659
660 for ac_prog in false
661 do
662 # Extract the first word of "$ac_prog", so it can be a program name with args.
663 set dummy $ac_prog; ac_word=$2
664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
665 echo "configure:666: checking for $ac_word" >&5
666 if eval "test \"`echo '$''{'ac_cv_path_FALSEPRG'+set}'`\" = set"; then
667   echo $ac_n "(cached) $ac_c" 1>&6
668 else
669   case "$FALSEPRG" in
670   /*)
671   ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a path.
672   ;;
673   ?:/*)                  
674   ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a dos path.
675   ;;
676   *)
677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
678   ac_dummy="$PATH"
679   for ac_dir in $ac_dummy; do 
680     test -z "$ac_dir" && ac_dir=.
681     if test -f $ac_dir/$ac_word; then
682       ac_cv_path_FALSEPRG="$ac_dir/$ac_word"
683       break
684     fi
685   done
686   IFS="$ac_save_ifs"
687   ;;
688 esac
689 fi
690 FALSEPRG="$ac_cv_path_FALSEPRG"
691 if test -n "$FALSEPRG"; then
692   echo "$ac_t""$FALSEPRG" 1>&6
693 else
694   echo "$ac_t""no" 1>&6
695 fi
696
697 test -n "$FALSEPRG" && break
698 done
699 test -n "$FALSEPRG" || FALSEPRG=":"
700
701
702
703 # Make sure we can run config.sub.
704 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
705 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
706 fi
707
708 echo $ac_n "checking host system type""... $ac_c" 1>&6
709 echo "configure:710: checking host system type" >&5
710
711 host_alias=$host
712 case "$host_alias" in
713 NONE)
714   case $nonopt in
715   NONE)
716     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
717     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
718     fi ;;
719   *) host_alias=$nonopt ;;
720   esac ;;
721 esac
722
723 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
724 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
725 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
726 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
727 echo "$ac_t""$host" 1>&6
728
729
730 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
731 DATE=`sed -n -e 's/^.* \t*DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
732 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
733 echo "configuring for bacula $VERSION ($DATE)"
734
735
736
737 # Extract the first word of "gcc", so it can be a program name with args.
738 set dummy gcc; ac_word=$2
739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
740 echo "configure:741: checking for $ac_word" >&5
741 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
742   echo $ac_n "(cached) $ac_c" 1>&6
743 else
744   if test -n "$CC"; then
745   ac_cv_prog_CC="$CC" # Let the user override the test.
746 else
747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
748   ac_dummy="$PATH"
749   for ac_dir in $ac_dummy; do
750     test -z "$ac_dir" && ac_dir=.
751     if test -f $ac_dir/$ac_word; then
752       ac_cv_prog_CC="gcc"
753       break
754     fi
755   done
756   IFS="$ac_save_ifs"
757 fi
758 fi
759 CC="$ac_cv_prog_CC"
760 if test -n "$CC"; then
761   echo "$ac_t""$CC" 1>&6
762 else
763   echo "$ac_t""no" 1>&6
764 fi
765
766 if test -z "$CC"; then
767   # Extract the first word of "cc", so it can be a program name with args.
768 set dummy cc; ac_word=$2
769 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
770 echo "configure:771: checking for $ac_word" >&5
771 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
772   echo $ac_n "(cached) $ac_c" 1>&6
773 else
774   if test -n "$CC"; then
775   ac_cv_prog_CC="$CC" # Let the user override the test.
776 else
777   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
778   ac_prog_rejected=no
779   ac_dummy="$PATH"
780   for ac_dir in $ac_dummy; do
781     test -z "$ac_dir" && ac_dir=.
782     if test -f $ac_dir/$ac_word; then
783       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
784         ac_prog_rejected=yes
785         continue
786       fi
787       ac_cv_prog_CC="cc"
788       break
789     fi
790   done
791   IFS="$ac_save_ifs"
792 if test $ac_prog_rejected = yes; then
793   # We found a bogon in the path, so make sure we never use it.
794   set dummy $ac_cv_prog_CC
795   shift
796   if test $# -gt 0; then
797     # We chose a different compiler from the bogus one.
798     # However, it has the same basename, so the bogon will be chosen
799     # first if we set CC to just the basename; use the full file name.
800     shift
801     set dummy "$ac_dir/$ac_word" "$@"
802     shift
803     ac_cv_prog_CC="$@"
804   fi
805 fi
806 fi
807 fi
808 CC="$ac_cv_prog_CC"
809 if test -n "$CC"; then
810   echo "$ac_t""$CC" 1>&6
811 else
812   echo "$ac_t""no" 1>&6
813 fi
814
815   if test -z "$CC"; then
816     case "`uname -s`" in
817     *win32* | *WIN32*)
818       # Extract the first word of "cl", so it can be a program name with args.
819 set dummy cl; ac_word=$2
820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
821 echo "configure:822: checking for $ac_word" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
823   echo $ac_n "(cached) $ac_c" 1>&6
824 else
825   if test -n "$CC"; then
826   ac_cv_prog_CC="$CC" # Let the user override the test.
827 else
828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
829   ac_dummy="$PATH"
830   for ac_dir in $ac_dummy; do
831     test -z "$ac_dir" && ac_dir=.
832     if test -f $ac_dir/$ac_word; then
833       ac_cv_prog_CC="cl"
834       break
835     fi
836   done
837   IFS="$ac_save_ifs"
838 fi
839 fi
840 CC="$ac_cv_prog_CC"
841 if test -n "$CC"; then
842   echo "$ac_t""$CC" 1>&6
843 else
844   echo "$ac_t""no" 1>&6
845 fi
846  ;;
847     esac
848   fi
849   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
850 fi
851
852 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
853 echo "configure:854: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
854
855 ac_ext=c
856 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
857 ac_cpp='$CPP $CPPFLAGS'
858 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
859 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
860 cross_compiling=$ac_cv_prog_cc_cross
861
862 cat > conftest.$ac_ext << EOF
863
864 #line 865 "configure"
865 #include "confdefs.h"
866
867 main(){return(0);}
868 EOF
869 if { (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
870   ac_cv_prog_cc_works=yes
871   # If we can't run a trivial program, we are probably using a cross compiler.
872   if (./conftest; exit) 2>/dev/null; then
873     ac_cv_prog_cc_cross=no
874   else
875     ac_cv_prog_cc_cross=yes
876   fi
877 else
878   echo "configure: failed program was:" >&5
879   cat conftest.$ac_ext >&5
880   ac_cv_prog_cc_works=no
881 fi
882 rm -fr conftest*
883 ac_ext=c
884 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
885 ac_cpp='$CPP $CPPFLAGS'
886 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
887 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
888 cross_compiling=$ac_cv_prog_cc_cross
889
890 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
891 if test $ac_cv_prog_cc_works = no; then
892   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
893 fi
894 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
895 echo "configure:896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
896 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
897 cross_compiling=$ac_cv_prog_cc_cross
898
899 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
900 echo "configure:901: checking whether we are using GNU C" >&5
901 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
902   echo $ac_n "(cached) $ac_c" 1>&6
903 else
904   cat > conftest.c <<EOF
905 #ifdef __GNUC__
906   yes;
907 #endif
908 EOF
909 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
910   ac_cv_prog_gcc=yes
911 else
912   ac_cv_prog_gcc=no
913 fi
914 fi
915
916 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
917
918 if test $ac_cv_prog_gcc = yes; then
919   GCC=yes
920 else
921   GCC=
922 fi
923
924 ac_test_CFLAGS="${CFLAGS+set}"
925 ac_save_CFLAGS="$CFLAGS"
926 CFLAGS=
927 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
928 echo "configure:929: checking whether ${CC-cc} accepts -g" >&5
929 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
930   echo $ac_n "(cached) $ac_c" 1>&6
931 else
932   echo 'void f(){}' > conftest.c
933 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
934   ac_cv_prog_cc_g=yes
935 else
936   ac_cv_prog_cc_g=no
937 fi
938 rm -f conftest*
939
940 fi
941
942 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
943 if test "$ac_test_CFLAGS" = set; then
944   CFLAGS="$ac_save_CFLAGS"
945 elif test $ac_cv_prog_cc_g = yes; then
946   if test "$GCC" = yes; then
947     CFLAGS="-g -O2"
948   else
949     CFLAGS="-g"
950   fi
951 else
952   if test "$GCC" = yes; then
953     CFLAGS="-O2"
954   else
955     CFLAGS=
956   fi
957 fi
958
959 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
960 do
961 # Extract the first word of "$ac_prog", so it can be a program name with args.
962 set dummy $ac_prog; ac_word=$2
963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
964 echo "configure:965: checking for $ac_word" >&5
965 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
966   echo $ac_n "(cached) $ac_c" 1>&6
967 else
968   if test -n "$CXX"; then
969   ac_cv_prog_CXX="$CXX" # Let the user override the test.
970 else
971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
972   ac_dummy="$PATH"
973   for ac_dir in $ac_dummy; do
974     test -z "$ac_dir" && ac_dir=.
975     if test -f $ac_dir/$ac_word; then
976       ac_cv_prog_CXX="$ac_prog"
977       break
978     fi
979   done
980   IFS="$ac_save_ifs"
981 fi
982 fi
983 CXX="$ac_cv_prog_CXX"
984 if test -n "$CXX"; then
985   echo "$ac_t""$CXX" 1>&6
986 else
987   echo "$ac_t""no" 1>&6
988 fi
989
990 test -n "$CXX" && break
991 done
992 test -n "$CXX" || CXX="gcc"
993
994
995 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
996 echo "configure:997: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
997
998 ac_ext=C
999 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1000 ac_cpp='$CXXCPP $CPPFLAGS'
1001 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1002 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1003 cross_compiling=$ac_cv_prog_cxx_cross
1004
1005 cat > conftest.$ac_ext << EOF
1006
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1009
1010 int main(){return(0);}
1011 EOF
1012 if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1013   ac_cv_prog_cxx_works=yes
1014   # If we can't run a trivial program, we are probably using a cross compiler.
1015   if (./conftest; exit) 2>/dev/null; then
1016     ac_cv_prog_cxx_cross=no
1017   else
1018     ac_cv_prog_cxx_cross=yes
1019   fi
1020 else
1021   echo "configure: failed program was:" >&5
1022   cat conftest.$ac_ext >&5
1023   ac_cv_prog_cxx_works=no
1024 fi
1025 rm -fr conftest*
1026 ac_ext=c
1027 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1028 ac_cpp='$CPP $CPPFLAGS'
1029 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1030 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1031 cross_compiling=$ac_cv_prog_cc_cross
1032
1033 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1034 if test $ac_cv_prog_cxx_works = no; then
1035   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1036 fi
1037 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1038 echo "configure:1039: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1039 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1040 cross_compiling=$ac_cv_prog_cxx_cross
1041
1042 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1043 echo "configure:1044: checking whether we are using GNU C++" >&5
1044 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047   cat > conftest.C <<EOF
1048 #ifdef __GNUC__
1049   yes;
1050 #endif
1051 EOF
1052 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1053   ac_cv_prog_gxx=yes
1054 else
1055   ac_cv_prog_gxx=no
1056 fi
1057 fi
1058
1059 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1060
1061 if test $ac_cv_prog_gxx = yes; then
1062   GXX=yes
1063 else
1064   GXX=
1065 fi
1066
1067 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1068 ac_save_CXXFLAGS="$CXXFLAGS"
1069 CXXFLAGS=
1070 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether ${CXX-g++} accepts -g" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   echo 'void f(){}' > conftest.cc
1076 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1077   ac_cv_prog_cxx_g=yes
1078 else
1079   ac_cv_prog_cxx_g=no
1080 fi
1081 rm -f conftest*
1082
1083 fi
1084
1085 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1086 if test "$ac_test_CXXFLAGS" = set; then
1087   CXXFLAGS="$ac_save_CXXFLAGS"
1088 elif test $ac_cv_prog_cxx_g = yes; then
1089   if test "$GXX" = yes; then
1090     CXXFLAGS="-g -O2"
1091   else
1092     CXXFLAGS="-g"
1093   fi
1094 else
1095   if test "$GXX" = yes; then
1096     CXXFLAGS="-O2"
1097   else
1098     CXXFLAGS=
1099   fi
1100 fi
1101
1102 for ac_declaration in \
1103    ''\
1104    '#include <stdlib.h>' \
1105    'extern "C" void std::exit (int) throw (); using std::exit;' \
1106    'extern "C" void std::exit (int); using std::exit;' \
1107    'extern "C" void exit (int) throw ();' \
1108    'extern "C" void exit (int);' \
1109    'void exit (int);'
1110 do
1111   cat > conftest.$ac_ext <<EOF
1112 #line 1113 "configure"
1113 #include "confdefs.h"
1114 #include <stdlib.h>
1115 $ac_declaration
1116 int main() {
1117 exit (42);
1118 ; return 0; }
1119 EOF
1120 if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1121   :
1122 else
1123   echo "configure: failed program was:" >&5
1124   cat conftest.$ac_ext >&5
1125   rm -rf conftest*
1126   continue
1127 fi
1128 rm -f conftest*
1129   cat > conftest.$ac_ext <<EOF
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1132 $ac_declaration
1133 int main() {
1134 exit (42);
1135 ; return 0; }
1136 EOF
1137 if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1138   rm -rf conftest*
1139   break
1140 else
1141   echo "configure: failed program was:" >&5
1142   cat conftest.$ac_ext >&5
1143 fi
1144 rm -f conftest*
1145 done
1146 if test -n "$ac_declaration"; then
1147   echo '#ifdef __cplusplus' >>confdefs.h
1148   echo $ac_declaration      >>confdefs.h
1149   echo '#endif'             >>confdefs.h
1150 fi
1151
1152
1153 if test "x$CC" != xcc; then
1154   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1155 echo "configure:1156: checking whether $CC and cc understand -c and -o together" >&5
1156 else
1157   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1158 echo "configure:1159: checking whether cc understands -c and -o together" >&5
1159 fi
1160 set dummy $CC; ac_cc="`echo $2 |
1161                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1162 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   echo 'foo(){}' > conftest.c
1166 # Make sure it works both with $CC and with simple cc.
1167 # We do the test twice because some compilers refuse to overwrite an
1168 # existing .o file with -o, though they will create one.
1169 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1170 if { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1171    test -f conftest.o && { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1172 then
1173   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1174   if test "x$CC" != xcc; then
1175     # Test first that cc exists at all.
1176     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1177       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1178       if { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1179          test -f conftest.o && { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1180       then
1181         # cc works too.
1182         :
1183       else
1184         # cc exists but doesn't like -o.
1185         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1186       fi
1187     fi
1188   fi
1189 else
1190   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1191 fi
1192 rm -f conftest*
1193
1194 fi
1195 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1196   echo "$ac_t""yes" 1>&6
1197 else
1198   echo "$ac_t""no" 1>&6
1199   cat >> confdefs.h <<\EOF
1200 #define NO_MINUS_C_MINUS_O 1
1201 EOF
1202
1203 fi
1204                         echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1205 echo "configure:1206: checking how to run the C preprocessor" >&5
1206 # On Suns, sometimes $CPP names a directory.
1207 if test -n "$CPP" && test -d "$CPP"; then
1208   CPP=
1209 fi
1210 if test -z "$CPP"; then
1211 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1212   echo $ac_n "(cached) $ac_c" 1>&6
1213 else
1214     # This must be in double quotes, not single quotes, because CPP may get
1215   # substituted into the Makefile and "${CC-cc}" will confuse make.
1216   CPP="${CC-cc} -E"
1217   # On the NeXT, cc -E runs the code through the compiler's parser,
1218   # not just through cpp.
1219   cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1222 #include <assert.h>
1223 Syntax Error
1224 EOF
1225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1226 { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1228 if test -z "$ac_err"; then
1229   :
1230 else
1231   echo "$ac_err" >&5
1232   echo "configure: failed program was:" >&5
1233   cat conftest.$ac_ext >&5
1234   rm -rf conftest*
1235   CPP="${CC-cc} -E -traditional-cpp"
1236   cat > conftest.$ac_ext <<EOF
1237 #line 1238 "configure"
1238 #include "confdefs.h"
1239 #include <assert.h>
1240 Syntax Error
1241 EOF
1242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1243 { (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1245 if test -z "$ac_err"; then
1246   :
1247 else
1248   echo "$ac_err" >&5
1249   echo "configure: failed program was:" >&5
1250   cat conftest.$ac_ext >&5
1251   rm -rf conftest*
1252   CPP="${CC-cc} -nologo -E"
1253   cat > conftest.$ac_ext <<EOF
1254 #line 1255 "configure"
1255 #include "confdefs.h"
1256 #include <assert.h>
1257 Syntax Error
1258 EOF
1259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1260 { (eval echo configure:1261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1262 if test -z "$ac_err"; then
1263   :
1264 else
1265   echo "$ac_err" >&5
1266   echo "configure: failed program was:" >&5
1267   cat conftest.$ac_ext >&5
1268   rm -rf conftest*
1269   CPP=/lib/cpp
1270 fi
1271 rm -f conftest*
1272 fi
1273 rm -f conftest*
1274 fi
1275 rm -f conftest*
1276   ac_cv_prog_CPP="$CPP"
1277 fi
1278   CPP="$ac_cv_prog_CPP"
1279 else
1280   ac_cv_prog_CPP="$CPP"
1281 fi
1282 echo "$ac_t""$CPP" 1>&6
1283
1284 if test $ac_cv_prog_gcc = yes; then
1285     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1286 echo "configure:1287: checking whether ${CC-cc} needs -traditional" >&5
1287 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1288   echo $ac_n "(cached) $ac_c" 1>&6
1289 else
1290     ac_pattern="Autoconf.*'x'"
1291   cat > conftest.$ac_ext <<EOF
1292 #line 1293 "configure"
1293 #include "confdefs.h"
1294 #include <sgtty.h>
1295 Autoconf TIOCGETP
1296 EOF
1297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1298   egrep "$ac_pattern" >/dev/null 2>&1; then
1299   rm -rf conftest*
1300   ac_cv_prog_gcc_traditional=yes
1301 else
1302   rm -rf conftest*
1303   ac_cv_prog_gcc_traditional=no
1304 fi
1305 rm -f conftest*
1306
1307
1308   if test $ac_cv_prog_gcc_traditional = no; then
1309     cat > conftest.$ac_ext <<EOF
1310 #line 1311 "configure"
1311 #include "confdefs.h"
1312 #include <termio.h>
1313 Autoconf TCGETA
1314 EOF
1315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1316   egrep "$ac_pattern" >/dev/null 2>&1; then
1317   rm -rf conftest*
1318   ac_cv_prog_gcc_traditional=yes
1319 fi
1320 rm -f conftest*
1321
1322   fi
1323 fi
1324
1325 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1326   if test $ac_cv_prog_gcc_traditional = yes; then
1327     CC="$CC -traditional"
1328   fi
1329 fi
1330         
1331 if test x$CC = xgcc
1332 then
1333    cat >> confdefs.h <<\EOF
1334 #define HAVE_GCC 1
1335 EOF
1336
1337 fi
1338
1339 # Find a good install program.  We prefer a C program (faster),
1340 # so one script is as good as another.  But avoid the broken or
1341 # incompatible versions:
1342 # SysV /etc/install, /usr/sbin/install
1343 # SunOS /usr/etc/install
1344 # IRIX /sbin/install
1345 # AIX /bin/install
1346 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1347 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1348 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1349 # ./install, which can be erroneously created by make from ./install.sh.
1350 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1351 echo "configure:1352: checking for a BSD compatible install" >&5
1352 if test -z "$INSTALL"; then
1353 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1354   echo $ac_n "(cached) $ac_c" 1>&6
1355 else
1356     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1357   for ac_dir in $PATH; do
1358     # Account for people who put trailing slashes in PATH elements.
1359     case "$ac_dir/" in
1360     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1361     *)
1362       # OSF1 and SCO ODT 3.0 have their own names for install.
1363       # Don't use installbsd from OSF since it installs stuff as root
1364       # by default.
1365       for ac_prog in ginstall scoinst install; do
1366         if test -f $ac_dir/$ac_prog; then
1367           if test $ac_prog = install &&
1368             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1369             # AIX install.  It has an incompatible calling convention.
1370             :
1371           else
1372             ac_cv_path_install="$ac_dir/$ac_prog -c"
1373             break 2
1374           fi
1375         fi
1376       done
1377       ;;
1378     esac
1379   done
1380   IFS="$ac_save_IFS"
1381
1382 fi
1383   if test "${ac_cv_path_install+set}" = set; then
1384     INSTALL="$ac_cv_path_install"
1385   else
1386     # As a last resort, use the slow shell script.  We don't cache a
1387     # path for INSTALL within a source directory, because that will
1388     # break other packages using the cache if that directory is
1389     # removed, or if the path is relative.
1390     INSTALL="$ac_install_sh"
1391   fi
1392 fi
1393 echo "$ac_t""$INSTALL" 1>&6
1394
1395 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1396 # It thinks the first close brace ends the variable substitution.
1397 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1398
1399 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1400
1401 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1402
1403 # Extract the first word of "ranlib", so it can be a program name with args.
1404 set dummy ranlib; ac_word=$2
1405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1406 echo "configure:1407: checking for $ac_word" >&5
1407 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1408   echo $ac_n "(cached) $ac_c" 1>&6
1409 else
1410   if test -n "$RANLIB"; then
1411   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1412 else
1413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1414   ac_dummy="$PATH"
1415   for ac_dir in $ac_dummy; do
1416     test -z "$ac_dir" && ac_dir=.
1417     if test -f $ac_dir/$ac_word; then
1418       ac_cv_prog_RANLIB="ranlib"
1419       break
1420     fi
1421   done
1422   IFS="$ac_save_ifs"
1423   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1424 fi
1425 fi
1426 RANLIB="$ac_cv_prog_RANLIB"
1427 if test -n "$RANLIB"; then
1428   echo "$ac_t""$RANLIB" 1>&6
1429 else
1430   echo "$ac_t""no" 1>&6
1431 fi
1432
1433 # Extract the first word of "mv", so it can be a program name with args.
1434 set dummy mv; ac_word=$2
1435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1436 echo "configure:1437: checking for $ac_word" >&5
1437 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
1438   echo $ac_n "(cached) $ac_c" 1>&6
1439 else
1440   case "$MV" in
1441   /*)
1442   ac_cv_path_MV="$MV" # Let the user override the test with a path.
1443   ;;
1444   ?:/*)                  
1445   ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
1446   ;;
1447   *)
1448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1449   ac_dummy="$PATH"
1450   for ac_dir in $ac_dummy; do 
1451     test -z "$ac_dir" && ac_dir=.
1452     if test -f $ac_dir/$ac_word; then
1453       ac_cv_path_MV="$ac_dir/$ac_word"
1454       break
1455     fi
1456   done
1457   IFS="$ac_save_ifs"
1458   test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
1459   ;;
1460 esac
1461 fi
1462 MV="$ac_cv_path_MV"
1463 if test -n "$MV"; then
1464   echo "$ac_t""$MV" 1>&6
1465 else
1466   echo "$ac_t""no" 1>&6
1467 fi
1468
1469 # Extract the first word of "rm", so it can be a program name with args.
1470 set dummy rm; ac_word=$2
1471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1472 echo "configure:1473: checking for $ac_word" >&5
1473 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
1474   echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476   case "$RM" in
1477   /*)
1478   ac_cv_path_RM="$RM" # Let the user override the test with a path.
1479   ;;
1480   ?:/*)                  
1481   ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
1482   ;;
1483   *)
1484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1485   ac_dummy="$PATH"
1486   for ac_dir in $ac_dummy; do 
1487     test -z "$ac_dir" && ac_dir=.
1488     if test -f $ac_dir/$ac_word; then
1489       ac_cv_path_RM="$ac_dir/$ac_word"
1490       break
1491     fi
1492   done
1493   IFS="$ac_save_ifs"
1494   test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
1495   ;;
1496 esac
1497 fi
1498 RM="$ac_cv_path_RM"
1499 if test -n "$RM"; then
1500   echo "$ac_t""$RM" 1>&6
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504
1505 # Extract the first word of "cp", so it can be a program name with args.
1506 set dummy cp; ac_word=$2
1507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1508 echo "configure:1509: checking for $ac_word" >&5
1509 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   case "$CP" in
1513   /*)
1514   ac_cv_path_CP="$CP" # Let the user override the test with a path.
1515   ;;
1516   ?:/*)                  
1517   ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
1518   ;;
1519   *)
1520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1521   ac_dummy="$PATH"
1522   for ac_dir in $ac_dummy; do 
1523     test -z "$ac_dir" && ac_dir=.
1524     if test -f $ac_dir/$ac_word; then
1525       ac_cv_path_CP="$ac_dir/$ac_word"
1526       break
1527     fi
1528   done
1529   IFS="$ac_save_ifs"
1530   test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
1531   ;;
1532 esac
1533 fi
1534 CP="$ac_cv_path_CP"
1535 if test -n "$CP"; then
1536   echo "$ac_t""$CP" 1>&6
1537 else
1538   echo "$ac_t""no" 1>&6
1539 fi
1540
1541 # Extract the first word of "sed", so it can be a program name with args.
1542 set dummy sed; ac_word=$2
1543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1544 echo "configure:1545: checking for $ac_word" >&5
1545 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
1546   echo $ac_n "(cached) $ac_c" 1>&6
1547 else
1548   case "$SED" in
1549   /*)
1550   ac_cv_path_SED="$SED" # Let the user override the test with a path.
1551   ;;
1552   ?:/*)                  
1553   ac_cv_path_SED="$SED" # Let the user override the test with a dos path.
1554   ;;
1555   *)
1556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1557   ac_dummy="$PATH"
1558   for ac_dir in $ac_dummy; do 
1559     test -z "$ac_dir" && ac_dir=.
1560     if test -f $ac_dir/$ac_word; then
1561       ac_cv_path_SED="$ac_dir/$ac_word"
1562       break
1563     fi
1564   done
1565   IFS="$ac_save_ifs"
1566   test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
1567   ;;
1568 esac
1569 fi
1570 SED="$ac_cv_path_SED"
1571 if test -n "$SED"; then
1572   echo "$ac_t""$SED" 1>&6
1573 else
1574   echo "$ac_t""no" 1>&6
1575 fi
1576
1577 # Extract the first word of "awk", so it can be a program name with args.
1578 set dummy awk; ac_word=$2
1579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1580 echo "configure:1581: checking for $ac_word" >&5
1581 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   case "$AWK" in
1585   /*)
1586   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
1587   ;;
1588   ?:/*)                  
1589   ac_cv_path_AWK="$AWK" # Let the user override the test with a dos path.
1590   ;;
1591   *)
1592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1593   ac_dummy="$PATH"
1594   for ac_dir in $ac_dummy; do 
1595     test -z "$ac_dir" && ac_dir=.
1596     if test -f $ac_dir/$ac_word; then
1597       ac_cv_path_AWK="$ac_dir/$ac_word"
1598       break
1599     fi
1600   done
1601   IFS="$ac_save_ifs"
1602   test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="awk"
1603   ;;
1604 esac
1605 fi
1606 AWK="$ac_cv_path_AWK"
1607 if test -n "$AWK"; then
1608   echo "$ac_t""$AWK" 1>&6
1609 else
1610   echo "$ac_t""no" 1>&6
1611 fi
1612
1613 # Extract the first word of "echo", so it can be a program name with args.
1614 set dummy echo; ac_word=$2
1615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1616 echo "configure:1617: checking for $ac_word" >&5
1617 if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then
1618   echo $ac_n "(cached) $ac_c" 1>&6
1619 else
1620   case "$ECHO" in
1621   /*)
1622   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
1623   ;;
1624   ?:/*)                  
1625   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a dos path.
1626   ;;
1627   *)
1628   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1629   ac_dummy="$PATH"
1630   for ac_dir in $ac_dummy; do 
1631     test -z "$ac_dir" && ac_dir=.
1632     if test -f $ac_dir/$ac_word; then
1633       ac_cv_path_ECHO="$ac_dir/$ac_word"
1634       break
1635     fi
1636   done
1637   IFS="$ac_save_ifs"
1638   test -z "$ac_cv_path_ECHO" && ac_cv_path_ECHO="echo"
1639   ;;
1640 esac
1641 fi
1642 ECHO="$ac_cv_path_ECHO"
1643 if test -n "$ECHO"; then
1644   echo "$ac_t""$ECHO" 1>&6
1645 else
1646   echo "$ac_t""no" 1>&6
1647 fi
1648
1649 # Extract the first word of "cmp", so it can be a program name with args.
1650 set dummy cmp; ac_word=$2
1651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1652 echo "configure:1653: checking for $ac_word" >&5
1653 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
1654   echo $ac_n "(cached) $ac_c" 1>&6
1655 else
1656   case "$CMP" in
1657   /*)
1658   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
1659   ;;
1660   ?:/*)                  
1661   ac_cv_path_CMP="$CMP" # Let the user override the test with a dos path.
1662   ;;
1663   *)
1664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1665   ac_dummy="$PATH"
1666   for ac_dir in $ac_dummy; do 
1667     test -z "$ac_dir" && ac_dir=.
1668     if test -f $ac_dir/$ac_word; then
1669       ac_cv_path_CMP="$ac_dir/$ac_word"
1670       break
1671     fi
1672   done
1673   IFS="$ac_save_ifs"
1674   test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp"
1675   ;;
1676 esac
1677 fi
1678 CMP="$ac_cv_path_CMP"
1679 if test -n "$CMP"; then
1680   echo "$ac_t""$CMP" 1>&6
1681 else
1682   echo "$ac_t""no" 1>&6
1683 fi
1684
1685 # Extract the first word of "tbl", so it can be a program name with args.
1686 set dummy tbl; ac_word=$2
1687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_word" >&5
1689 if eval "test \"`echo '$''{'ac_cv_path_TBL'+set}'`\" = set"; then
1690   echo $ac_n "(cached) $ac_c" 1>&6
1691 else
1692   case "$TBL" in
1693   /*)
1694   ac_cv_path_TBL="$TBL" # Let the user override the test with a path.
1695   ;;
1696   ?:/*)                  
1697   ac_cv_path_TBL="$TBL" # Let the user override the test with a dos path.
1698   ;;
1699   *)
1700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1701   ac_dummy="$PATH"
1702   for ac_dir in $ac_dummy; do 
1703     test -z "$ac_dir" && ac_dir=.
1704     if test -f $ac_dir/$ac_word; then
1705       ac_cv_path_TBL="$ac_dir/$ac_word"
1706       break
1707     fi
1708   done
1709   IFS="$ac_save_ifs"
1710   test -z "$ac_cv_path_TBL" && ac_cv_path_TBL="tbl"
1711   ;;
1712 esac
1713 fi
1714 TBL="$ac_cv_path_TBL"
1715 if test -n "$TBL"; then
1716   echo "$ac_t""$TBL" 1>&6
1717 else
1718   echo "$ac_t""no" 1>&6
1719 fi
1720
1721 # Extract the first word of "ar", so it can be a program name with args.
1722 set dummy ar; ac_word=$2
1723 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1724 echo "configure:1725: checking for $ac_word" >&5
1725 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
1726   echo $ac_n "(cached) $ac_c" 1>&6
1727 else
1728   case "$AR" in
1729   /*)
1730   ac_cv_path_AR="$AR" # Let the user override the test with a path.
1731   ;;
1732   ?:/*)                  
1733   ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
1734   ;;
1735   *)
1736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1737   ac_dummy="$PATH"
1738   for ac_dir in $ac_dummy; do 
1739     test -z "$ac_dir" && ac_dir=.
1740     if test -f $ac_dir/$ac_word; then
1741       ac_cv_path_AR="$ac_dir/$ac_word"
1742       break
1743     fi
1744   done
1745   IFS="$ac_save_ifs"
1746   test -z "$ac_cv_path_AR" && ac_cv_path_AR="ar"
1747   ;;
1748 esac
1749 fi
1750 AR="$ac_cv_path_AR"
1751 if test -n "$AR"; then
1752   echo "$ac_t""$AR" 1>&6
1753 else
1754   echo "$ac_t""no" 1>&6
1755 fi
1756
1757 # Extract the first word of "ranlib", so it can be a program name with args.
1758 set dummy ranlib; ac_word=$2
1759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1760 echo "configure:1761: checking for $ac_word" >&5
1761 if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   case "$RANLIB" in
1765   /*)
1766   ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path.
1767   ;;
1768   ?:/*)                  
1769   ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a dos path.
1770   ;;
1771   *)
1772   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1773   ac_dummy="$PATH"
1774   for ac_dir in $ac_dummy; do 
1775     test -z "$ac_dir" && ac_dir=.
1776     if test -f $ac_dir/$ac_word; then
1777       ac_cv_path_RANLIB="$ac_dir/$ac_word"
1778       break
1779     fi
1780   done
1781   IFS="$ac_save_ifs"
1782   test -z "$ac_cv_path_RANLIB" && ac_cv_path_RANLIB="ranlib"
1783   ;;
1784 esac
1785 fi
1786 RANLIB="$ac_cv_path_RANLIB"
1787 if test -n "$RANLIB"; then
1788   echo "$ac_t""$RANLIB" 1>&6
1789 else
1790   echo "$ac_t""no" 1>&6
1791 fi
1792
1793 # Extract the first word of "openssl", so it can be a program name with args.
1794 set dummy openssl; ac_word=$2
1795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1796 echo "configure:1797: checking for $ac_word" >&5
1797 if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
1798   echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800   case "$OPENSSL" in
1801   /*)
1802   ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
1803   ;;
1804   ?:/*)                  
1805   ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a dos path.
1806   ;;
1807   *)
1808   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1809   ac_dummy="$PATH"
1810   for ac_dir in $ac_dummy; do 
1811     test -z "$ac_dir" && ac_dir=.
1812     if test -f $ac_dir/$ac_word; then
1813       ac_cv_path_OPENSSL="$ac_dir/$ac_word"
1814       break
1815     fi
1816   done
1817   IFS="$ac_save_ifs"
1818   test -z "$ac_cv_path_OPENSSL" && ac_cv_path_OPENSSL="none"
1819   ;;
1820 esac
1821 fi
1822 OPENSSL="$ac_cv_path_OPENSSL"
1823 if test -n "$OPENSSL"; then
1824   echo "$ac_t""$OPENSSL" 1>&6
1825 else
1826   echo "$ac_t""no" 1>&6
1827 fi
1828
1829
1830 test -n "$ARFLAG" || ARFLAGS="cr"
1831
1832
1833 MAKE_SHELL=/bin/sh
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843 echo $ac_n "checking for Operating System""... $ac_c" 1>&6
1844 echo "configure:1845: checking for Operating System" >&5
1845 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1846 echo "configure:1847: checking for Cygwin environment" >&5
1847 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1848   echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850   cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853
1854 int main() {
1855
1856 #ifndef __CYGWIN__
1857 #define __CYGWIN__ __CYGWIN32__
1858 #endif
1859 return __CYGWIN__;
1860 ; return 0; }
1861 EOF
1862 if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1863   rm -rf conftest*
1864   ac_cv_cygwin=yes
1865 else
1866   echo "configure: failed program was:" >&5
1867   cat conftest.$ac_ext >&5
1868   rm -rf conftest*
1869   ac_cv_cygwin=no
1870 fi
1871 rm -f conftest*
1872 rm -f conftest*
1873 fi
1874
1875 echo "$ac_t""$ac_cv_cygwin" 1>&6
1876 CYGWIN=
1877 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1878 if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
1879 then
1880         
1881
1882 if $TRUEPRG; then
1883   HAVE_SUN_OS_TRUE=
1884   HAVE_SUN_OS_FALSE='#'
1885 else
1886   HAVE_SUN_OS_TRUE='#'
1887   HAVE_SUN_OS_FALSE=
1888 fi
1889         cat >> confdefs.h <<\EOF
1890 #define HAVE_SUN_OS 1
1891 EOF
1892
1893 else
1894         
1895
1896 if $FALSEPRG; then
1897   HAVE_SUN_OS_TRUE=
1898   HAVE_SUN_OS_FALSE='#'
1899 else
1900   HAVE_SUN_OS_TRUE='#'
1901   HAVE_SUN_OS_FALSE=
1902 fi
1903 fi
1904
1905 if test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
1906 then
1907         
1908
1909 if $TRUEPRG; then
1910   HAVE_OSF1_OS_TRUE=
1911   HAVE_OSF1_OS_FALSE='#'
1912 else
1913   HAVE_OSF1_OS_TRUE='#'
1914   HAVE_OSF1_OS_FALSE=
1915 fi
1916         cat >> confdefs.h <<\EOF
1917 #define HAVE_OSF1_OS 1
1918 EOF
1919
1920 else
1921         
1922
1923 if $FALSEPRG; then
1924   HAVE_OSF1_OS_TRUE=
1925   HAVE_OSF1_OS_FALSE='#'
1926 else
1927   HAVE_OSF1_OS_TRUE='#'
1928   HAVE_OSF1_OS_FALSE=
1929 fi
1930 fi
1931
1932 if test $HAVE_UNAME=yes -a x`uname -s` = xAIX
1933 then
1934         
1935
1936 if $TRUEPRG; then
1937   HAVE_AIX_OS_TRUE=
1938   HAVE_AIX_OS_FALSE='#'
1939 else
1940   HAVE_AIX_OS_TRUE='#'
1941   HAVE_AIX_OS_FALSE=
1942 fi
1943         cat >> confdefs.h <<\EOF
1944 #define HAVE_AIX_OS 1
1945 EOF
1946
1947 else
1948         
1949
1950 if $FALSEPRG; then
1951   HAVE_AIX_OS_TRUE=
1952   HAVE_AIX_OS_FALSE='#'
1953 else
1954   HAVE_AIX_OS_TRUE='#'
1955   HAVE_AIX_OS_FALSE=
1956 fi
1957 fi
1958
1959 if test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
1960 then
1961         
1962
1963 if $TRUEPRG; then
1964   HAVE_HPUX_OS_TRUE=
1965   HAVE_HPUX_OS_FALSE='#'
1966 else
1967   HAVE_HPUX_OS_TRUE='#'
1968   HAVE_HPUX_OS_FALSE=
1969 fi
1970         cat >> confdefs.h <<\EOF
1971 #define HAVE_HPUX_OS 1
1972 EOF
1973
1974 else
1975         
1976
1977 if $FALSEPRG; then
1978   HAVE_HPUX_OS_TRUE=
1979   HAVE_HPUX_OS_FALSE='#'
1980 else
1981   HAVE_HPUX_OS_TRUE='#'
1982   HAVE_HPUX_OS_FALSE=
1983 fi
1984 fi
1985
1986 if test $HAVE_UNAME=yes -a x`uname -s` = xLinux
1987 then
1988         
1989
1990 if $TRUEPRG; then
1991   HAVE_LINUX_OS_TRUE=
1992   HAVE_LINUX_OS_FALSE='#'
1993 else
1994   HAVE_LINUX_OS_TRUE='#'
1995   HAVE_LINUX_OS_FALSE=
1996 fi
1997         cat >> confdefs.h <<\EOF
1998 #define HAVE_LINUX_OS 1
1999 EOF
2000
2001 else
2002         
2003
2004 if $FALSEPRG; then
2005   HAVE_LINUX_OS_TRUE=
2006   HAVE_LINUX_OS_FALSE='#'
2007 else
2008   HAVE_LINUX_OS_TRUE='#'
2009   HAVE_LINUX_OS_FALSE=
2010 fi
2011 fi
2012
2013 if test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
2014 then
2015         
2016
2017 if $TRUEPRG; then
2018   HAVE_FREEBSD_OS_TRUE=
2019   HAVE_FREEBSD_OS_FALSE='#'
2020 else
2021   HAVE_FREEBSD_OS_TRUE='#'
2022   HAVE_FREEBSD_OS_FALSE=
2023 fi
2024         cat >> confdefs.h <<\EOF
2025 #define HAVE_FREEBSD_OS 1
2026 EOF
2027
2028 else
2029         
2030
2031 if $FALSEPRG; then
2032   HAVE_FREEBSD_OS_TRUE=
2033   HAVE_FREEBSD_OS_FALSE='#'
2034 else
2035   HAVE_FREEBSD_OS_TRUE='#'
2036   HAVE_FREEBSD_OS_FALSE=
2037 fi
2038 fi
2039
2040 if test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
2041 then
2042         
2043
2044 if $TRUEPRG; then
2045   HAVE_NETBSD_OS_TRUE=
2046   HAVE_NETBSD_OS_FALSE='#'
2047 else
2048   HAVE_NETBSD_OS_TRUE='#'
2049   HAVE_NETBSD_OS_FALSE=
2050 fi
2051         cat >> confdefs.h <<\EOF
2052 #define HAVE_NETBSD_OS 1
2053 EOF
2054
2055 else
2056         
2057
2058 if $FALSEPRG; then
2059   HAVE_NETBSD_OS_TRUE=
2060   HAVE_NETBSD_OS_FALSE='#'
2061 else
2062   HAVE_NETBSD_OS_TRUE='#'
2063   HAVE_NETBSD_OS_FALSE=
2064 fi
2065 fi
2066
2067 if test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
2068 then
2069         
2070
2071 if $TRUEPRG; then
2072   HAVE_OPENBSD_OS_TRUE=
2073   HAVE_OPENBSD_OS_FALSE='#'
2074 else
2075   HAVE_OPENBSD_OS_TRUE='#'
2076   HAVE_OPENBSD_OS_FALSE=
2077 fi
2078         cat >> confdefs.h <<\EOF
2079 #define HAVE_OPENBSD_OS 1
2080 EOF
2081
2082 else
2083         
2084
2085 if $FALSEPRG; then
2086   HAVE_OPENBSD_OS_TRUE=
2087   HAVE_OPENBSD_OS_FALSE='#'
2088 else
2089   HAVE_OPENBSD_OS_TRUE='#'
2090   HAVE_OPENBSD_OS_FALSE=
2091 fi
2092 fi
2093
2094 if test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
2095 then
2096         
2097
2098 if $TRUEPRG; then
2099   HAVE_BSDI_OS_TRUE=
2100   HAVE_BSDI_OS_FALSE='#'
2101 else
2102   HAVE_BSDI_OS_TRUE='#'
2103   HAVE_BSDI_OS_FALSE=
2104 fi
2105         cat >> confdefs.h <<\EOF
2106 #define HAVE_BSDI_OS 1
2107 EOF
2108
2109 else
2110         
2111
2112 if $FALSEPRG; then
2113   HAVE_BSDI_OS_TRUE=
2114   HAVE_BSDI_OS_FALSE='#'
2115 else
2116   HAVE_BSDI_OS_TRUE='#'
2117   HAVE_BSDI_OS_FALSE=
2118 fi
2119 fi
2120
2121 if test $HAVE_UNAME=yes -a x`uname -s` = xSGI
2122 then
2123         
2124
2125 if $TRUEPRG; then
2126   HAVE_SGI_OS_TRUE=
2127   HAVE_SGI_OS_FALSE='#'
2128 else
2129   HAVE_SGI_OS_TRUE='#'
2130   HAVE_SGI_OS_FALSE=
2131 fi
2132         cat >> confdefs.h <<\EOF
2133 #define HAVE_SGI_OS 1
2134 EOF
2135
2136 else
2137         
2138
2139 if $FALSEPRG; then
2140   HAVE_SGI_OS_TRUE=
2141   HAVE_SGI_OS_FALSE='#'
2142 else
2143   HAVE_SGI_OS_TRUE='#'
2144   HAVE_SGI_OS_FALSE=
2145 fi
2146 fi
2147
2148 if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
2149 then
2150         
2151
2152 if $TRUEPRG; then
2153   HAVE_IRIX_OS_TRUE=
2154   HAVE_IRIX_OS_FALSE='#'
2155 else
2156   HAVE_IRIX_OS_TRUE='#'
2157   HAVE_IRIX_OS_FALSE=
2158 fi
2159         cat >> confdefs.h <<\EOF
2160 #define HAVE_IRIX_OS 1
2161 EOF
2162
2163 else
2164         
2165
2166 if $FALSEPRG; then
2167   HAVE_IRIX_OS_TRUE=
2168   HAVE_IRIX_OS_FALSE='#'
2169 else
2170   HAVE_IRIX_OS_TRUE='#'
2171   HAVE_IRIX_OS_FALSE=
2172 fi
2173 fi
2174
2175 echo "$ac_t""" "" 1>&6
2176
2177
2178 # -----------------------------------------------------------
2179 # ----------------------------------------------------------
2180 echo $ac_n "checking for Operating System Distribution""... $ac_c" 1>&6
2181 echo "configure:2182: checking for Operating System Distribution" >&5
2182 if test "x$DISTNAME" != "x"
2183 then
2184         echo "distname set to $DISTNAME"
2185 elif test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
2186 then
2187         DISTNAME=alpha
2188 elif test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
2189 then
2190         DISTNAME=hpux
2191 elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
2192 then
2193         DISTNAME=solaris
2194 elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
2195 then
2196         DISTNAME=freebsd
2197 elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
2198 then
2199         DISTNAME=netbsd
2200 elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
2201 then
2202         DISTNAME=openbsd
2203 elif test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
2204 then
2205         DISTNAME=irix
2206 elif test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
2207 then
2208         DISTNAME=bsdi
2209 elif test -f /etc/SuSE-release
2210 then
2211         DISTNAME=suse
2212 elif test -d /etc/SuSEconfig
2213 then
2214         DISTNAME=suse5
2215 elif test -d /usr/src/OpenLinux
2216 then
2217         DISTNAME=caldera
2218 elif test -f /etc/redhat-release
2219 then
2220         DISTNAME=redhat
2221 elif test -f /etc/debian_version
2222 then
2223         DISTNAME=debian
2224 elif test -f /etc/slackware-version
2225 then
2226         DISTNAME=slackware
2227 elif test "$ac_cv_cygwin" = yes
2228 then
2229         DISTNAME=cygwin
2230         cat >> confdefs.h <<\EOF
2231 #define HAVE_CYGWIN 1
2232 EOF
2233
2234 else
2235         DISTNAME=unknown
2236 fi
2237 echo "$ac_t""" "" 1>&6
2238
2239
2240 # -----------------------------------------------------------
2241 # ----------------------------------------------------------
2242
2243         
2244
2245 if false; then
2246   INSIDE_GNOME_COMMON_TRUE=
2247   INSIDE_GNOME_COMMON_FALSE='#'
2248 else
2249   INSIDE_GNOME_COMMON_TRUE='#'
2250   INSIDE_GNOME_COMMON_FALSE=
2251 fi
2252
2253         test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
2254
2255         for k in gnome-macros ; do ACLOCAL="$ACLOCAL -I $k" ; done
2256
2257
2258 # ------------------------------------------------------------------
2259 #  If the user has not set --prefix, we set our default to nothing.
2260 #  In this case, if the user has not set --sysconfdir, we set it
2261 #  to the package default of /etc/bacula.  If either --prefix or
2262 #  --sysconfdir is set, we leave sysconfdir alone except to eval it.
2263 # ------------------------------------------------------------------
2264 if test x${prefix} = xNONE ; then
2265     if test `eval echo ${sysconfdir}` = NONE/etc ; then
2266         sysconfdir=/etc/bacula
2267     fi
2268     prefix=
2269 fi
2270 sysconfdir=`eval echo ${sysconfdir}`
2271
2272 # -------------------------------------------------------------------------
2273 #  If the user has not set --exec-prefix, we default to ${prefix}
2274 # -------------------------------------------------------------------------
2275 if test x${exec_prefix} = xNONE ; then
2276     exec_prefix=${prefix}
2277 fi
2278
2279 # ------------------------------------------------------------------
2280 # If the user has not set --sbindir, we set our default as /sbin
2281 # ------------------------------------------------------------------
2282 if test x$sbindir = x'${exec_prefix}/sbin' ; then
2283     sbindir=${exec_prefix}/sbin
2284 fi
2285 sbindir=`eval echo ${sbindir}`
2286                       
2287 # ------------------------------------------------------------------
2288 # All list of languages for which a translation exist. Each
2289 #  language is separated by a space.
2290 # ------------------------------------------------------------------
2291 ALL_LINGUAS=""
2292
2293 for ac_prog in msgfmt
2294 do
2295 # Extract the first word of "$ac_prog", so it can be a program name with args.
2296 set dummy $ac_prog; ac_word=$2
2297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2298 echo "configure:2299: checking for $ac_word" >&5
2299 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   case "$MSGFMT" in
2303   /*)
2304   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2305   ;;
2306   ?:/*)                  
2307   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
2308   ;;
2309   *)
2310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2311   ac_dummy="$PATH"
2312   for ac_dir in $ac_dummy; do 
2313     test -z "$ac_dir" && ac_dir=.
2314     if test -f $ac_dir/$ac_word; then
2315       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2316       break
2317     fi
2318   done
2319   IFS="$ac_save_ifs"
2320   ;;
2321 esac
2322 fi
2323 MSGFMT="$ac_cv_path_MSGFMT"
2324 if test -n "$MSGFMT"; then
2325   echo "$ac_t""$MSGFMT" 1>&6
2326 else
2327   echo "$ac_t""no" 1>&6
2328 fi
2329
2330 test -n "$MSGFMT" && break
2331 done
2332 test -n "$MSGFMT" || MSGFMT="no"
2333
2334 if test "$MSGFMT" = "no"
2335 then
2336    echo 'msgfmt program not found, disabling NLS !'
2337    USE_NLS=no
2338    USE_INCLUDED_LIBINTL=no
2339 #else
2340 #   AM_GNU_GETTEXT
2341 fi
2342
2343
2344 support_mysql=no
2345 support_sqlite=no
2346 support_smartalloc=yes
2347 support_readline=yes
2348 support_gnome=no
2349 support_static_tools=yes
2350 cats=
2351 db_name=Internal
2352 DB_NAME=bdb
2353
2354 # Check whether --enable-everything or --disable-everything was given.
2355 if test "${enable_everything+set}" = set; then
2356   enableval="$enable_everything"
2357   if test x$enableval = xyes; then
2358     support_smartalloc=yes
2359   fi
2360 fi
2361
2362
2363 # -------------------------------------------
2364 # gnome (default off)
2365 # -------------------------------------------
2366 # Check whether --enable-gnome or --disable-gnome was given.
2367 if test "${enable_gnome+set}" = set; then
2368   enableval="$enable_gnome"
2369   if test x$enableval = xyes; then
2370     support_gnome=yes
2371   fi
2372 fi
2373
2374
2375 GNOME_DIR=
2376 if test x$support_gnome = xyes; then
2377     
2378         
2379         
2380         
2381         
2382         
2383         
2384         
2385         
2386
2387         # Check whether --with-gnome-includes or --without-gnome-includes was given.
2388 if test "${with_gnome_includes+set}" = set; then
2389   withval="$with_gnome_includes"
2390   
2391         CFLAGS="$CFLAGS -I$withval"
2392         
2393 fi
2394
2395         
2396         # Check whether --with-gnome-libs or --without-gnome-libs was given.
2397 if test "${with_gnome_libs+set}" = set; then
2398   withval="$with_gnome_libs"
2399   
2400         LDFLAGS="$LDFLAGS -L$withval"
2401         gnome_prefix=$withval
2402         
2403 fi
2404
2405
2406         # Check whether --with-gnome or --without-gnome was given.
2407 if test "${with_gnome+set}" = set; then
2408   withval="$with_gnome"
2409   if test x$withval = xyes; then
2410                         want_gnome=yes
2411                                                                         :
2412                 else
2413                         if test "x$withval" = xno; then
2414                                 want_gnome=no
2415                         else
2416                                 want_gnome=yes
2417                                 LDFLAGS="$LDFLAGS -L$withval/lib"
2418                                 CFLAGS="$CFLAGS -I$withval/include"
2419                                 gnome_prefix=$withval/lib
2420                         fi
2421                 fi
2422 else
2423   want_gnome=yes
2424 fi
2425
2426
2427         if test "x$want_gnome" = xyes; then
2428
2429             # Extract the first word of "gnome-config", so it can be a program name with args.
2430 set dummy gnome-config; ac_word=$2
2431 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2432 echo "configure:2433: checking for $ac_word" >&5
2433 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
2434   echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436   case "$GNOME_CONFIG" in
2437   /*)
2438   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
2439   ;;
2440   ?:/*)                  
2441   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
2442   ;;
2443   *)
2444   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2445   ac_dummy="$PATH"
2446   for ac_dir in $ac_dummy; do 
2447     test -z "$ac_dir" && ac_dir=.
2448     if test -f $ac_dir/$ac_word; then
2449       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
2450       break
2451     fi
2452   done
2453   IFS="$ac_save_ifs"
2454   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
2455   ;;
2456 esac
2457 fi
2458 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
2459 if test -n "$GNOME_CONFIG"; then
2460   echo "$ac_t""$GNOME_CONFIG" 1>&6
2461 else
2462   echo "$ac_t""no" 1>&6
2463 fi
2464
2465             if test "$GNOME_CONFIG" = "no"; then
2466               no_gnome_config="yes"
2467             else
2468               echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
2469 echo "configure:2470: checking if $GNOME_CONFIG works" >&5
2470               if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
2471                 echo "$ac_t""yes" 1>&6
2472                 
2473         
2474         # Extract the first word of "orbit-config", so it can be a program name with args.
2475 set dummy orbit-config; ac_word=$2
2476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2477 echo "configure:2478: checking for $ac_word" >&5
2478 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
2479   echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481   case "$ORBIT_CONFIG" in
2482   /*)
2483   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
2484   ;;
2485   ?:/*)                  
2486   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path.
2487   ;;
2488   *)
2489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2490   ac_dummy="$PATH"
2491   for ac_dir in $ac_dummy; do 
2492     test -z "$ac_dir" && ac_dir=.
2493     if test -f $ac_dir/$ac_word; then
2494       ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word"
2495       break
2496     fi
2497   done
2498   IFS="$ac_save_ifs"
2499   test -z "$ac_cv_path_ORBIT_CONFIG" && ac_cv_path_ORBIT_CONFIG="no"
2500   ;;
2501 esac
2502 fi
2503 ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
2504 if test -n "$ORBIT_CONFIG"; then
2505   echo "$ac_t""$ORBIT_CONFIG" 1>&6
2506 else
2507   echo "$ac_t""no" 1>&6
2508 fi
2509
2510         # Extract the first word of "orbit-idl", so it can be a program name with args.
2511 set dummy orbit-idl; ac_word=$2
2512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2513 echo "configure:2514: checking for $ac_word" >&5
2514 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then
2515   echo $ac_n "(cached) $ac_c" 1>&6
2516 else
2517   case "$ORBIT_IDL" in
2518   /*)
2519   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a path.
2520   ;;
2521   ?:/*)                  
2522   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a dos path.
2523   ;;
2524   *)
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2526   ac_dummy="$PATH"
2527   for ac_dir in $ac_dummy; do 
2528     test -z "$ac_dir" && ac_dir=.
2529     if test -f $ac_dir/$ac_word; then
2530       ac_cv_path_ORBIT_IDL="$ac_dir/$ac_word"
2531       break
2532     fi
2533   done
2534   IFS="$ac_save_ifs"
2535   test -z "$ac_cv_path_ORBIT_IDL" && ac_cv_path_ORBIT_IDL="no"
2536   ;;
2537 esac
2538 fi
2539 ORBIT_IDL="$ac_cv_path_ORBIT_IDL"
2540 if test -n "$ORBIT_IDL"; then
2541   echo "$ac_t""$ORBIT_IDL" 1>&6
2542 else
2543   echo "$ac_t""no" 1>&6
2544 fi
2545
2546         echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6
2547 echo "configure:2548: checking for working ORBit environment" >&5
2548 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then
2549   echo $ac_n "(cached) $ac_c" 1>&6
2550 else
2551   
2552                 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
2553                         gnome_cv_orbit_found=no
2554                 else
2555                         gnome_cv_orbit_found=yes
2556                 fi
2557         
2558 fi
2559
2560 echo "$ac_t""$gnome_cv_orbit_found" 1>&6
2561         
2562
2563 if test x$gnome_cv_orbit_found = xyes; then
2564   HAVE_ORBIT_TRUE=
2565   HAVE_ORBIT_FALSE='#'
2566 else
2567   HAVE_ORBIT_TRUE='#'
2568   HAVE_ORBIT_FALSE=
2569 fi
2570         if test x$gnome_cv_orbit_found = xyes; then
2571                 
2572                 ORBIT_CFLAGS=`orbit-config --cflags client server`
2573                 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
2574                 
2575                 
2576         else
2577                 if test xfail = xfailure; then
2578                         { echo "configure: error: ORBit not installed or installation problem" 1>&2; exit 1; }
2579                 fi
2580         fi
2581
2582         echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6
2583 echo "configure:2584: checking for gnorba libraries" >&5
2584 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   
2588                 gnome_cv_gnorba_found=no
2589                 if test x$gnome_cv_orbit_found = xyes; then
2590                         GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2591                         GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2592                         if test -n "$GNORBA_LIBS"; then
2593                                 gnome_cv_gnorba_found=yes
2594                         fi
2595                 fi
2596         
2597 fi
2598
2599 echo "$ac_t""$gnome_cv_gnorba_found" 1>&6
2600         
2601
2602 if test x$gnome_cv_gnorba_found = xyes; then
2603   HAVE_GNORBA_TRUE=
2604   HAVE_GNORBA_FALSE='#'
2605 else
2606   HAVE_GNORBA_TRUE='#'
2607   HAVE_GNORBA_FALSE=
2608 fi
2609         if test x$gnome_cv_orbit_found = xyes; then
2610                 
2611                 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2612                 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2613                 
2614                 
2615         else
2616                 if test xfail = xfailure; then
2617                         { echo "configure: error: gnorba library not installed or installation problem" 1>&2; exit 1; }
2618                 fi
2619         fi
2620
2621                 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
2622                 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
2623                 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
2624                 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
2625                 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
2626                 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
2627                 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
2628                 
2629               else
2630                 echo "$ac_t""no" 1>&6
2631                 no_gnome_config="yes"
2632               fi
2633             fi
2634
2635             if test x$exec_prefix = xNONE; then
2636                 if test x$prefix = xNONE; then
2637                     gnome_prefix=$ac_default_prefix/lib
2638                 else
2639                     gnome_prefix=$prefix/lib
2640                 fi
2641             else
2642                 gnome_prefix=`eval echo \`echo $libdir\``
2643             fi
2644         
2645             if test "$no_gnome_config" = "yes"; then
2646               echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
2647 echo "configure:2648: checking for gnomeConf.sh file in $gnome_prefix" >&5
2648               if test -f $gnome_prefix/gnomeConf.sh; then
2649                 echo "$ac_t""found" 1>&6
2650                 echo "loading gnome configuration from" \
2651                      "$gnome_prefix/gnomeConf.sh"
2652                 . $gnome_prefix/gnomeConf.sh
2653                 
2654               else
2655                 echo "$ac_t""not found" 1>&6
2656                 if test xfail = xfail; then
2657                   { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
2658                 fi
2659               fi
2660             fi
2661         fi
2662
2663         if test -n ""; then
2664           n=""
2665           for i in $n; do
2666             echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6
2667 echo "configure:2668: checking extra library \"$i\"" >&5
2668             case $i in 
2669               applets)
2670                 
2671                 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
2672                 echo "$ac_t""$GNOME_APPLETS_LIBS" 1>&6;;
2673               docklets)
2674                 
2675                 GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
2676                 echo "$ac_t""$GNOME_DOCKLETS_LIBS" 1>&6;;
2677               capplet)
2678                 
2679                 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
2680                 echo "$ac_t""$GNOME_CAPPLET_LIBS" 1>&6;;
2681               *)
2682                 echo "$ac_t""unknown library" 1>&6
2683             esac
2684             EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i`
2685             GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR"
2686           done
2687         fi
2688
2689
2690     GNOME_DIR=src/gnome-console
2691 fi
2692
2693
2694
2695 # -------------------------------------------
2696 # smartalloc (default off)
2697 # -------------------------------------------
2698 # Check whether --enable-smartalloc or --disable-smartalloc was given.
2699 if test "${enable_smartalloc+set}" = set; then
2700   enableval="$enable_smartalloc"
2701   if test x$enableval = xno; then
2702     support_smartalloc=no
2703   fi
2704 fi
2705
2706
2707 if test x$support_smartalloc = xyes; then
2708    cat >> confdefs.h <<\EOF
2709 #define SMARTALLOC 1
2710 EOF
2711
2712 fi
2713
2714 # -------------------------------------------
2715 # static-tools (default on)
2716 # -------------------------------------------
2717 # Check whether --enable-static-tools or --disable-static-tools was given.
2718 if test "${enable_static_tools+set}" = set; then
2719   enableval="$enable_static_tools"
2720   if test x$enableval = xno; then
2721      support_static_tools=no
2722    fi
2723 fi
2724
2725
2726 TTOOL_LDFLAGS=
2727 if test x$support_static_tools = xyes; then
2728    TTOOL_LDFLAGS="-static"
2729 fi
2730
2731
2732
2733
2734
2735 # ---------------------------------------------------
2736 # Check for readline support/directory (default on)
2737 # ---------------------------------------------------
2738 # this allows you to turn it completely off
2739 # Check whether --enable-readline or --disable-readline was given.
2740 if test "${enable_readline+set}" = set; then
2741   enableval="$enable_readline"
2742   if test x$enableval = xno; then
2743     support_readline=no
2744   fi
2745 fi
2746
2747
2748 got_readline="no"
2749 READLINE_SRC=
2750 if test x$support_readline = xyes; then
2751    # Check whether --with-readline or --without-readline was given.
2752 if test "${with_readline+set}" = set; then
2753   withval="$with_readline"
2754   
2755         case "$with_readline" in
2756         no) : ;;
2757         yes|*)
2758           if test "$with_readline" != "yes"; then
2759             CONS_INC="-I$with_readline"
2760             CONS_LDFLAGS="-L$with_readline"
2761           else
2762              with_readline="/usr/include/readline" 
2763           fi
2764           ac_safe=`echo "$with_readline/readline.h" | sed 'y%./+-%__p_%'`
2765 echo $ac_n "checking for $with_readline/readline.h""... $ac_c" 1>&6
2766 echo "configure:2767: checking for $with_readline/readline.h" >&5
2767 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2768   echo $ac_n "(cached) $ac_c" 1>&6
2769 else
2770   cat > conftest.$ac_ext <<EOF
2771 #line 2772 "configure"
2772 #include "confdefs.h"
2773 #include <$with_readline/readline.h>
2774 EOF
2775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2776 { (eval echo configure:2777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2778 if test -z "$ac_err"; then
2779   rm -rf conftest*
2780   eval "ac_cv_header_$ac_safe=yes"
2781 else
2782   echo "$ac_err" >&5
2783   echo "configure: failed program was:" >&5
2784   cat conftest.$ac_ext >&5
2785   rm -rf conftest*
2786   eval "ac_cv_header_$ac_safe=no"
2787 fi
2788 rm -f conftest*
2789 fi
2790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2791   echo "$ac_t""yes" 1>&6
2792    echo "$ac_t""yes" 1>&6
2793                cat >> confdefs.h <<\EOF
2794 #define HAVE_READLINE 1
2795 EOF
2796  
2797                CONS_LIBS="-lreadline -ltermcap"
2798                got_readline="yes"   
2799              
2800 else
2801   echo "$ac_t""no" 1>&6
2802  { echo "configure: error: *** readline library missing" 1>&2; exit 1; } 
2803              
2804           
2805 fi
2806
2807           ;;
2808         esac
2809      
2810 else
2811   
2812        # check for standard readline library
2813        ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
2814 echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
2815 echo "configure:2816: checking for /usr/include/readline/readline.h" >&5
2816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 #include </usr/include/readline/readline.h>
2823 EOF
2824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2825 { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2827 if test -z "$ac_err"; then
2828   rm -rf conftest*
2829   eval "ac_cv_header_$ac_safe=yes"
2830 else
2831   echo "$ac_err" >&5
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   eval "ac_cv_header_$ac_safe=no"
2836 fi
2837 rm -f conftest*
2838 fi
2839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2840   echo "$ac_t""yes" 1>&6
2841    echo "$ac_t""yes" 1>&6
2842          cat >> confdefs.h <<\EOF
2843 #define HAVE_READLINE 1
2844 EOF
2845
2846          got_readline="yes"
2847          CONS_INC="-I/usr/include/readline"
2848          CONS_LIBS="-lreadline -ltermcap"
2849        
2850 else
2851   echo "$ac_t""no" 1>&6
2852
2853          # Did not find starndard library, so user our own
2854          echo "$ac_t""yes" 1>&6
2855          cat >> confdefs.h <<\EOF
2856 #define HAVE_READLINE 1
2857 EOF
2858
2859          got_readline="yes"
2860          CONS_INC="-I${TOP_DIR}/depkgs"
2861          CONS_LIBS="-lreadline -lhistory -ltermcap"
2862          CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
2863          PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
2864        
2865 fi
2866
2867          
2868    
2869 fi
2870
2871 fi
2872
2873
2874
2875
2876
2877 # Minimal stuff for readline Makefile configuration
2878 MAKE_SHELL=/bin/sh
2879
2880
2881 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2882 echo "configure:2883: checking whether stat file-mode macros are broken" >&5
2883 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 #include <sys/types.h>
2890 #include <sys/stat.h>
2891
2892 #if defined(S_ISBLK) && defined(S_IFDIR)
2893 # if S_ISBLK (S_IFDIR)
2894 You lose.
2895 # endif
2896 #endif
2897
2898 #if defined(S_ISBLK) && defined(S_IFCHR)
2899 # if S_ISBLK (S_IFCHR)
2900 You lose.
2901 # endif
2902 #endif
2903
2904 #if defined(S_ISLNK) && defined(S_IFREG)
2905 # if S_ISLNK (S_IFREG)
2906 You lose.
2907 # endif
2908 #endif
2909
2910 #if defined(S_ISSOCK) && defined(S_IFREG)
2911 # if S_ISSOCK (S_IFREG)
2912 You lose.
2913 # endif
2914 #endif
2915
2916 EOF
2917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2918   egrep "You lose" >/dev/null 2>&1; then
2919   rm -rf conftest*
2920   ac_cv_header_stat_broken=yes
2921 else
2922   rm -rf conftest*
2923   ac_cv_header_stat_broken=no
2924 fi
2925 rm -f conftest*
2926
2927 fi
2928
2929 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2930 if test $ac_cv_header_stat_broken = yes; then
2931   cat >> confdefs.h <<\EOF
2932 #define STAT_MACROS_BROKEN 1
2933 EOF
2934
2935 fi
2936
2937 ac_header_dirent=no
2938 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2939 do
2940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2941 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2942 echo "configure:2943: checking for $ac_hdr that defines DIR" >&5
2943 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 #include <sys/types.h>
2950 #include <$ac_hdr>
2951 int main() {
2952 DIR *dirp = 0;
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2956   rm -rf conftest*
2957   eval "ac_cv_header_dirent_$ac_safe=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_header_dirent_$ac_safe=no"
2963 fi
2964 rm -f conftest*
2965 fi
2966 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2967   echo "$ac_t""yes" 1>&6
2968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2969   cat >> confdefs.h <<EOF
2970 #define $ac_tr_hdr 1
2971 EOF
2972  ac_header_dirent=$ac_hdr; break
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976 done
2977 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2978 if test $ac_header_dirent = dirent.h; then
2979 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2980 echo "configure:2981: checking for opendir in -ldir" >&5
2981 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   ac_save_LIBS="$LIBS"
2986 LIBS="-ldir  $LIBS"
2987 cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 /* Override any gcc2 internal prototype to avoid an error.  */
2991 /* We use char because int might match the return type of a gcc2
2992     builtin and then its argument prototype would still apply.  */
2993 char opendir();
2994
2995 int main() {
2996 opendir()
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3000   rm -rf conftest*
3001   eval "ac_cv_lib_$ac_lib_var=yes"
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -rf conftest*
3006   eval "ac_cv_lib_$ac_lib_var=no"
3007 fi
3008 rm -f conftest*
3009 LIBS="$ac_save_LIBS"
3010
3011 fi
3012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3013   echo "$ac_t""yes" 1>&6
3014   LIBS="$LIBS -ldir"
3015 else
3016   echo "$ac_t""no" 1>&6
3017 fi
3018
3019 else
3020 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3021 echo "configure:3022: checking for opendir in -lx" >&5
3022 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   ac_save_LIBS="$LIBS"
3027 LIBS="-lx  $LIBS"
3028 cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031 /* Override any gcc2 internal prototype to avoid an error.  */
3032 /* We use char because int might match the return type of a gcc2
3033     builtin and then its argument prototype would still apply.  */
3034 char opendir();
3035
3036 int main() {
3037 opendir()
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041   rm -rf conftest*
3042   eval "ac_cv_lib_$ac_lib_var=yes"
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -rf conftest*
3047   eval "ac_cv_lib_$ac_lib_var=no"
3048 fi
3049 rm -f conftest*
3050 LIBS="$ac_save_LIBS"
3051
3052 fi
3053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3054   echo "$ac_t""yes" 1>&6
3055   LIBS="$LIBS -lx"
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060 fi
3061
3062
3063 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
3064 do
3065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3066 echo "configure:3067: checking for $ac_func" >&5
3067 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 /* System header to define __stub macros and hopefully few prototypes,
3074     which can conflict with char $ac_func(); below.  */
3075 #include <assert.h>
3076 /* Override any gcc2 internal prototype to avoid an error.  */
3077 /* We use char because int might match the return type of a gcc2
3078     builtin and then its argument prototype would still apply.  */
3079 char $ac_func();
3080
3081 int main() {
3082
3083 /* The GNU C library defines this for functions which it implements
3084     to always fail with ENOSYS.  Some functions are actually named
3085     something starting with __ and the normal name is an alias.  */
3086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3087 choke me
3088 #else
3089 $ac_func();
3090 #endif
3091
3092 ; return 0; }
3093 EOF
3094 if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3095   rm -rf conftest*
3096   eval "ac_cv_func_$ac_func=yes"
3097 else
3098   echo "configure: failed program was:" >&5
3099   cat conftest.$ac_ext >&5
3100   rm -rf conftest*
3101   eval "ac_cv_func_$ac_func=no"
3102 fi
3103 rm -f conftest*
3104 fi
3105
3106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3107   echo "$ac_t""yes" 1>&6
3108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3109   cat >> confdefs.h <<EOF
3110 #define $ac_tr_func 1
3111 EOF
3112  
3113 else
3114   echo "$ac_t""no" 1>&6
3115 fi
3116 done
3117
3118
3119 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
3120 #   [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
3121 #    EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
3122
3123 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
3124 echo "configure:3125: checking for getopt_long" >&5
3125 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
3126   echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128   cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131 /* System header to define __stub macros and hopefully few prototypes,
3132     which can conflict with char getopt_long(); below.  */
3133 #include <assert.h>
3134 /* Override any gcc2 internal prototype to avoid an error.  */
3135 /* We use char because int might match the return type of a gcc2
3136     builtin and then its argument prototype would still apply.  */
3137 char getopt_long();
3138
3139 int main() {
3140
3141 /* The GNU C library defines this for functions which it implements
3142     to always fail with ENOSYS.  Some functions are actually named
3143     something starting with __ and the normal name is an alias.  */
3144 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
3145 choke me
3146 #else
3147 getopt_long();
3148 #endif
3149
3150 ; return 0; }
3151 EOF
3152 if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3153   rm -rf conftest*
3154   eval "ac_cv_func_getopt_long=yes"
3155 else
3156   echo "configure: failed program was:" >&5
3157   cat conftest.$ac_ext >&5
3158   rm -rf conftest*
3159   eval "ac_cv_func_getopt_long=no"
3160 fi
3161 rm -f conftest*
3162 fi
3163
3164 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
3165   echo "$ac_t""yes" 1>&6
3166   cat >> confdefs.h <<\EOF
3167 #define HAVE_GETOPT_LONG 1
3168 EOF
3169
3170 else
3171   echo "$ac_t""no" 1>&6
3172 fi
3173
3174
3175
3176 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
3177 echo "configure:3178: checking for working strcoll" >&5
3178 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   if test "$cross_compiling" = yes; then
3182   ac_cv_func_strcoll_works=no
3183 else
3184   cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187 #include <string.h>
3188 main ()
3189 {
3190   exit (strcoll ("abc", "def") >= 0 ||
3191         strcoll ("ABC", "DEF") >= 0 ||
3192         strcoll ("123", "456") >= 0);
3193 }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3196 then
3197   ac_cv_func_strcoll_works=yes
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -fr conftest*
3202   ac_cv_func_strcoll_works=no
3203 fi
3204 rm -fr conftest*
3205 fi
3206
3207 fi
3208
3209 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
3210 if test $ac_cv_func_strcoll_works = yes; then
3211   cat >> confdefs.h <<\EOF
3212 #define HAVE_STRCOLL 1
3213 EOF
3214
3215 fi
3216
3217
3218 for ac_hdr in varargs.h \
3219                 sys/ptem.h sys/pte.h sys/stream.h
3220 do
3221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3223 echo "configure:3224: checking for $ac_hdr" >&5
3224 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   cat > conftest.$ac_ext <<EOF
3228 #line 3229 "configure"
3229 #include "confdefs.h"
3230 #include <$ac_hdr>
3231 EOF
3232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3233 { (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3235 if test -z "$ac_err"; then
3236   rm -rf conftest*
3237   eval "ac_cv_header_$ac_safe=yes"
3238 else
3239   echo "$ac_err" >&5
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   eval "ac_cv_header_$ac_safe=no"
3244 fi
3245 rm -f conftest*
3246 fi
3247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3248   echo "$ac_t""yes" 1>&6
3249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3250   cat >> confdefs.h <<EOF
3251 #define $ac_tr_hdr 1
3252 EOF
3253  
3254 else
3255   echo "$ac_t""no" 1>&6
3256 fi
3257 done
3258         
3259
3260 # End of readline stuff
3261 # -----------------------------------------------------------------------
3262
3263
3264 # ---------------------------------------------------
3265 # Check for GMP support/directory
3266 # ---------------------------------------------------
3267 GMP_SRC=
3268 local_gmp="no"
3269 # Check whether --with-gmp or --without-gmp was given.
3270 if test "${with_gmp+set}" = set; then
3271   withval="$with_gmp"
3272   
3273      case "$with_gmp" in
3274      no) : ;;
3275      yes|*)
3276        if test "$with_gmp" != "yes"; then
3277          GMP_INC="-I$with_gmp"
3278          GMP_LIBS="-lgmp"
3279          GMP_LDFLAGS="-L$with_gmp"
3280        else
3281           with_gmp="/usr/include" 
3282        fi
3283        ac_safe=`echo "$with_gmp/gmp.h" | sed 'y%./+-%__p_%'`
3284 echo $ac_n "checking for $with_gmp/gmp.h""... $ac_c" 1>&6
3285 echo "configure:3286: checking for $with_gmp/gmp.h" >&5
3286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 #include <$with_gmp/gmp.h>
3293 EOF
3294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3295 { (eval echo configure:3296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3297 if test -z "$ac_err"; then
3298   rm -rf conftest*
3299   eval "ac_cv_header_$ac_safe=yes"
3300 else
3301   echo "$ac_err" >&5
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   eval "ac_cv_header_$ac_safe=no"
3306 fi
3307 rm -f conftest*
3308 fi
3309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3310   echo "$ac_t""yes" 1>&6
3311    echo "$ac_t""yes" 1>&6
3312             cat >> confdefs.h <<\EOF
3313 #define HAVE_GMP 1
3314 EOF
3315  
3316             GMP_LIBS="-lgmp"
3317             got_gmp="yes"   
3318           
3319 else
3320   echo "$ac_t""no" 1>&6
3321  { echo "configure: error: *** gmp library missing" 1>&2; exit 1; } 
3322           
3323        
3324 fi
3325
3326        ;;
3327      esac
3328   
3329 else
3330   
3331     # check for standard gmp library
3332     ac_safe=`echo "/usr/include/gmp.h" | sed 'y%./+-%__p_%'`
3333 echo $ac_n "checking for /usr/include/gmp.h""... $ac_c" 1>&6
3334 echo "configure:3335: checking for /usr/include/gmp.h" >&5
3335 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 #include </usr/include/gmp.h>
3342 EOF
3343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3344 { (eval echo configure:3345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3346 if test -z "$ac_err"; then
3347   rm -rf conftest*
3348   eval "ac_cv_header_$ac_safe=yes"
3349 else
3350   echo "$ac_err" >&5
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -rf conftest*
3354   eval "ac_cv_header_$ac_safe=no"
3355 fi
3356 rm -f conftest*
3357 fi
3358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3359   echo "$ac_t""yes" 1>&6
3360    echo "$ac_t""yes" 1>&6
3361       cat >> confdefs.h <<\EOF
3362 #define HAVE_GMP 1
3363 EOF
3364
3365       got_gmp="yes"
3366       GMP_INC=
3367       GMP_LIBS="-lgmp"
3368     
3369 else
3370   echo "$ac_t""no" 1>&6
3371
3372       # Did not find standard library, so use our own
3373       echo "$ac_t""yes" 1>&6
3374       cat >> confdefs.h <<\EOF
3375 #define HAVE_GMP 1
3376 EOF
3377
3378       got_gmp="yes"
3379       local_gmp="yes"
3380       GMP_INC="-I${TOP_DIR}/depkgs/gmp"
3381       GMP_LIBS="-lgmp"
3382       GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
3383       GMP_SRC="${TOP_DIR}/depkgs/gmp"
3384     
3385 fi
3386
3387      
3388
3389 fi
3390
3391
3392
3393
3394
3395
3396 # End of GMP stuff
3397 # -----------------------------------------------------------------------
3398
3399
3400 # ---------------------------------------------------
3401 # Check for CWEB support/directory
3402 # ---------------------------------------------------
3403 CWEB_SRC=
3404 CWEB=/bin
3405 local_cweb="no"
3406 # Check whether --with-cweb or --without-cweb was given.
3407 if test "${with_cweb+set}" = set; then
3408   withval="$with_cweb"
3409   
3410      case "$with_cweb" in
3411      no) : ;;
3412      yes|*)
3413        if test "$with_cweb" != "yes"; then
3414          CWEB_INC="-I$with_cweb"
3415          CWEB_LIBS="-lcweb"
3416          CWEB_LDFLAGS="-L$with_cweb"
3417        else
3418           with_cweb="/usr/include" 
3419        fi
3420        ac_safe=`echo "$with_cweb/cweb.h" | sed 'y%./+-%__p_%'`
3421 echo $ac_n "checking for $with_cweb/cweb.h""... $ac_c" 1>&6
3422 echo "configure:3423: checking for $with_cweb/cweb.h" >&5
3423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 #include <$with_cweb/cweb.h>
3430 EOF
3431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3432 { (eval echo configure:3433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3434 if test -z "$ac_err"; then
3435   rm -rf conftest*
3436   eval "ac_cv_header_$ac_safe=yes"
3437 else
3438   echo "$ac_err" >&5
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -rf conftest*
3442   eval "ac_cv_header_$ac_safe=no"
3443 fi
3444 rm -f conftest*
3445 fi
3446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448    echo "$ac_t""yes" 1>&6
3449             cat >> confdefs.h <<\EOF
3450 #define HAVE_CWEB 1
3451 EOF
3452  
3453             CWEB_LIBS="-lcweb"
3454             got_cweb="yes"   
3455           
3456 else
3457   echo "$ac_t""no" 1>&6
3458  { echo "configure: error: *** cweb library missing" 1>&2; exit 1; } 
3459           
3460        
3461 fi
3462
3463        ;;
3464      esac
3465   
3466 else
3467   
3468     # check for standard cweb library
3469     ac_safe=`echo "/usr/include/cweb.h" | sed 'y%./+-%__p_%'`
3470 echo $ac_n "checking for /usr/include/cweb.h""... $ac_c" 1>&6
3471 echo "configure:3472: checking for /usr/include/cweb.h" >&5
3472 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478 #include </usr/include/cweb.h>
3479 EOF
3480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3481 { (eval echo configure:3482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3483 if test -z "$ac_err"; then
3484   rm -rf conftest*
3485   eval "ac_cv_header_$ac_safe=yes"
3486 else
3487   echo "$ac_err" >&5
3488   echo "configure: failed program was:" >&5
3489   cat conftest.$ac_ext >&5
3490   rm -rf conftest*
3491   eval "ac_cv_header_$ac_safe=no"
3492 fi
3493 rm -f conftest*
3494 fi
3495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3496   echo "$ac_t""yes" 1>&6
3497    echo "$ac_t""yes" 1>&6
3498       cat >> confdefs.h <<\EOF
3499 #define HAVE_CWEB 1
3500 EOF
3501
3502       got_cweb="yes"
3503       CWEB_INC=
3504       CWEB_LIBS="-lcweb"
3505     
3506 else
3507   echo "$ac_t""no" 1>&6
3508
3509       # Did not find starndard library, so use our own
3510       echo "$ac_t""yes" 1>&6
3511       cat >> confdefs.h <<\EOF
3512 #define HAVE_CWEB 1
3513 EOF
3514
3515       got_cweb="yes"
3516       local_cweb="yes"
3517       CWEB=${TOP_DIR}/depkgs/cweb
3518       CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
3519       CWEB_LIBS="-lcweb"
3520       CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
3521       CWEB_SRC="${TOP_DIR}/depkgs/cweb"
3522     
3523 fi
3524
3525      
3526
3527 fi
3528
3529
3530
3531
3532
3533
3534
3535 # End of CWEB stuff
3536 # -----------------------------------------------------------------------
3537
3538
3539
3540 # -----------------------------------------------------------
3541 # Check whether user wants TCP wrappers support (default off)
3542 # -----------------------------------------------------------
3543 TCPW_MSG="no" 
3544 # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
3545 if test "${with_tcp_wrappers+set}" = set; then
3546   withval="$with_tcp_wrappers"
3547   
3548     if test "x$withval" != "xno" ; then
3549        saved_LIBS="$LIBS"
3550        LIBS="$LIBS -lwrap -lnsl"
3551        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
3552 echo "configure:3553: checking for libwrap" >&5
3553        cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556  #include <tcpd.h>
3557              int deny_severity = 0;
3558              int allow_severity = 0;
3559              struct request_info *req; 
3560 int main() {
3561  hosts_access(req); 
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3565   rm -rf conftest*
3566   
3567             echo "$ac_t""yes" 1>&6
3568             cat >> confdefs.h <<\EOF
3569 #define HAVE_LIBWRAP 1
3570 EOF
3571
3572             TCPW_MSG="yes" 
3573           
3574 else
3575   echo "configure: failed program was:" >&5
3576   cat conftest.$ac_ext >&5
3577   rm -rf conftest*
3578   { echo "configure: error: *** libwrap missing" 1>&2; exit 1; } 
3579        
3580 fi
3581 rm -f conftest*
3582     fi
3583   
3584
3585 fi
3586
3587
3588 # ------------------------------------------
3589 # Where to place working dir
3590 # ------------------------------------------
3591 working_dir=`eval echo ${sysconfdir}/working`
3592 # Check whether --with-working-dir or --without-working-dir was given.
3593 if test "${with_working_dir+set}" = set; then
3594   withval="$with_working_dir"
3595   
3596        if test "x$withval" != "xno" ; then     
3597               working_dir=$withval
3598        fi
3599    
3600
3601 fi
3602
3603
3604
3605
3606 # ------------------------------------------
3607 # Where to send dump email
3608 # ------------------------------------------
3609 dump_email=root@localhost
3610 # Check whether --with-dump-email or --without-dump-email was given.
3611 if test "${with_dump_email+set}" = set; then
3612   withval="$with_dump_email"
3613   
3614        if test "x$withval" != "xno" ; then     
3615               dump_email=$withval
3616        fi
3617    
3618
3619 fi
3620
3621
3622
3623
3624 # ------------------------------------------
3625 # Where to send job email
3626 # ------------------------------------------
3627 job_email=root@localhost
3628 # Check whether --with-job-email or --without-job-email was given.
3629 if test "${with_job_email+set}" = set; then
3630   withval="$with_job_email"
3631   
3632        if test "x$withval" != "xno" ; then     
3633               job_email=$withval
3634        fi
3635    
3636
3637 fi
3638
3639
3640
3641
3642 # ------------------------------------------
3643 # Where to find smtp host
3644 # ------------------------------------------
3645 smtp_host=localhost
3646 # Check whether --with-smtp_host or --without-smtp_host was given.
3647 if test "${with_smtp_host+set}" = set; then
3648   withval="$with_smtp_host"
3649   
3650        if test "x$withval" != "xno" ; then     
3651               smtp_host=$withval
3652        fi
3653    
3654
3655 fi
3656
3657
3658
3659
3660
3661 # ------------------------------------
3662 # Where to place pid files
3663 # ------------------------------------
3664 piddir=/var/run
3665 # Check whether --with-pid-dir or --without-pid-dir was given.
3666 if test "${with_pid_dir+set}" = set; then
3667   withval="$with_pid_dir"
3668   
3669         if test "x$withval" != "xno" ; then     
3670             piddir=$withval
3671         fi
3672     
3673
3674 fi
3675
3676
3677 # make sure the pid directory exists
3678 if test ! -d $piddir ; then     
3679     piddir=`eval echo ${sysconfdir}`
3680     case $piddir in
3681           NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
3682     esac
3683 fi
3684
3685 cat >> confdefs.h <<EOF
3686 #define _PATH_BACULA_PIDDIR "$piddir"
3687 EOF
3688
3689
3690
3691
3692 # ------------------------------------
3693 # Where to place subsys "lock file"
3694 # ------------------------------------
3695 subsysdir=/var/run/subsys
3696 # Check whether --with-subsys-dir or --without-subsys-dir was given.
3697 if test "${with_subsys_dir+set}" = set; then
3698   withval="$with_subsys_dir"
3699   
3700         if test "x$withval" != "xno" ; then     
3701             subsysdir=$withval
3702         fi
3703     
3704
3705 fi
3706
3707
3708 # make sure the pid directory exists
3709 if test ! -d $subsysdir ; then     
3710     subsysdir=`eval echo ${sysconfdir}`
3711     case $subsysdir in
3712         NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
3713     esac
3714 fi
3715
3716
3717
3718
3719
3720 # ------------------------------------
3721 # Where to start assigning ports
3722 # ------------------------------------
3723 baseport=9101
3724 # Check whether --with-baseport or --without-baseport was given.
3725 if test "${with_baseport+set}" = set; then
3726   withval="$with_baseport"
3727   
3728         if test "x$withval" != "xno" ; then     
3729              baseport=$withval
3730         fi
3731     
3732
3733 fi
3734
3735
3736
3737 dir_port=`expr $baseport`
3738 fd_port=`expr $baseport + 1`
3739 sd_port=`expr $fd_port + 1`
3740
3741
3742
3743
3744
3745
3746 # ------------------------------------------
3747 # Generate passwords
3748 # ------------------------------------------
3749 dir_password=
3750 # Check whether --with-dir-password or --without-dir-password was given.
3751 if test "${with_dir_password+set}" = set; then
3752   withval="$with_dir_password"
3753   
3754        if test "x$withval" != "xno" ; then     
3755            dir_password=$withval
3756        fi
3757    
3758
3759 fi
3760
3761
3762 if test "x$dir_password" = "x" ; then
3763    if test "x$OPENSSL" = "xnone" ; then
3764 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
3765       key=`./randpass 33`
3766    else
3767       key=`openssl rand -base64 33`
3768    fi
3769    dir_password=$key
3770 fi
3771
3772 fd_password=
3773 # Check whether --with-fd-password or --without-fd-password was given.
3774 if test "${with_fd_password+set}" = set; then
3775   withval="$with_fd_password"
3776   
3777        if test "x$withval" != "xno" ; then     
3778            fd_password=$withval
3779        fi
3780    
3781
3782 fi
3783
3784
3785 if test "x$fd_password" = "x" ; then
3786    if test "x$OPENSSL" = "xnone" ; then
3787 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
3788       key=`./randpass 37`
3789    else
3790       key=`openssl rand -base64 33`
3791    fi
3792    fd_password=$key
3793 fi
3794
3795 sd_password=
3796 # Check whether --with-sd-password or --without-sd-password was given.
3797 if test "${with_sd_password+set}" = set; then
3798   withval="$with_sd_password"
3799   
3800        if test "x$withval" != "xno" ; then     
3801            sd_password=$withval
3802        fi
3803    
3804
3805 fi
3806
3807
3808 if test "x$sd_password" = "x" ; then
3809    if test "x$OPENSSL" = "xnone" ; then
3810 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
3811       key=`./randpass 41`
3812    else
3813       key=`openssl rand -base64 33`
3814    fi
3815    sd_password=$key
3816 fi
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826 # ------------------------------------------------
3827 # Bacula check for various SQL database engines
3828 # ------------------------------------------------
3829
3830 have_db=no
3831 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
3832 echo "configure:3833: checking for MySQL support" >&5
3833 # Check whether --with-mysql or --without-mysql was given.
3834 if test "${with_mysql+set}" = set; then
3835   withval="$with_mysql"
3836   
3837   if test "$withval" != "no"; then
3838         if test "$withval" = "yes"; then
3839                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
3840                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
3841                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
3842                         MYSQL_BINDIR=/usr/local/mysql/bin
3843                 elif test -f /usr/include/mysql/mysql.h; then
3844                         MYSQL_INCDIR=/usr/include/mysql
3845                         MYSQL_LIBDIR=/usr/lib/mysql
3846                         MYSQL_BINDIR=/usr/bin      
3847                 elif test -f /usr/include/mysql.h; then
3848                         MYSQL_INCDIR=/usr/include
3849                         MYSQL_LIBDIR=/usr/lib
3850                         MYSQL_BINDIR=/usr/bin
3851                 elif test -f /usr/local/include/mysql/mysql.h; then
3852                         MYSQL_INCDIR=/usr/local/include/mysql
3853                         MYSQL_LIBDIR=/usr/local/lib/mysql
3854                         MYSQL_BINDIR=/usr/local/bin
3855                 elif test -f /usr/local/include/mysql.h; then
3856                         MYSQL_INCDIR=/usr/local/include
3857                         MYSQL_LIBDIR=/usr/local/lib
3858                         MYSQL_BINDIR=/usr/local/bin
3859                 else
3860                    echo "$ac_t""no" 1>&6
3861                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
3862                 fi
3863         else
3864                 if test -f $withval/include/mysql/mysql.h; then
3865                         MYSQL_INCDIR=$withval/include/mysql
3866                         MYSQL_LIBDIR=$withval/lib/mysql
3867                         MYSQL_BINDIR=$withval/bin
3868                 elif test -f $withval/include/mysql.h; then
3869                         MYSQL_INCDIR=$withval/include
3870                         MYSQL_LIBDIR=$withval/lib
3871                         MYSQL_BINDIR=$withval/bin
3872                 else
3873                    echo "$ac_t""no" 1>&6
3874                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
3875                 fi
3876         fi
3877     SQL_INCLUDE=-I$MYSQL_INCDIR
3878     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
3879     SQL_BINDIR=$MYSQL_BINDIR
3880
3881     cat >> confdefs.h <<\EOF
3882 #define HAVE_MYSQL 1
3883 EOF
3884
3885     echo "$ac_t""yes" 1>&6
3886     have_db=yes
3887     support_mysql=yes
3888     db_name=MySQL
3889     DB_NAME=mysql
3890
3891   else
3892         echo "$ac_t""no" 1>&6
3893   fi
3894
3895 else
3896   
3897   echo "$ac_t""no" 1>&6
3898
3899 fi
3900
3901
3902 # Check whether --with-embedded-mysql or --without-embedded-mysql was given.
3903 if test "${with_embedded_mysql+set}" = set; then
3904   withval="$with_embedded_mysql"
3905   
3906   if test "$withval" != "no"; then
3907         if test "$withval" = "yes"; then
3908                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
3909                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
3910                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
3911                         MYSQL_BINDIR=/usr/local/mysql/bin
3912                 elif test -f /usr/include/mysql/mysql.h; then
3913                         MYSQL_INCDIR=/usr/include/mysql
3914                         MYSQL_LIBDIR=/usr/lib/mysql
3915                         MYSQL_BINDIR=/usr/bin      
3916                 elif test -f /usr/include/mysql.h; then
3917                         MYSQL_INCDIR=/usr/include
3918                         MYSQL_LIBDIR=/usr/lib
3919                         MYSQL_BINDIR=/usr/bin
3920                 elif test -f /usr/local/include/mysql/mysql.h; then
3921                         MYSQL_INCDIR=/usr/local/include/mysql
3922                         MYSQL_LIBDIR=/usr/local/lib/mysql
3923                         MYSQL_BINDIR=/usr/local/bin
3924                 elif test -f /usr/local/include/mysql.h; then
3925                         MYSQL_INCDIR=/usr/local/include
3926                         MYSQL_LIBDIR=/usr/local/lib
3927                         MYSQL_BINDIR=/usr/local/bin
3928                 else
3929                    echo "$ac_t""no" 1>&6
3930                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
3931                 fi
3932         else
3933                 if test -f $withval/include/mysql/mysql.h; then
3934                         MYSQL_INCDIR=$withval/include/mysql
3935                         MYSQL_LIBDIR=$withval/lib/mysql
3936                         MYSQL_BINDIR=$withval/bin
3937                 elif test -f $withval/include/mysql.h; then
3938                         MYSQL_INCDIR=$withval/include
3939                         MYSQL_LIBDIR=$withval/lib
3940                         MYSQL_BINDIR=$withval/bin
3941                 else
3942                    echo "$ac_t""no" 1>&6
3943                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
3944                 fi
3945         fi
3946     SQL_INCLUDE=-I$MYSQL_INCDIR
3947     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
3948     SQL_BINDIR=$MYSQL_BINDIR
3949
3950     cat >> confdefs.h <<\EOF
3951 #define HAVE_MYSQL 1
3952 EOF
3953
3954     cat >> confdefs.h <<\EOF
3955 #define HAVE_EMBEDDED_MYSQL 1
3956 EOF
3957
3958     echo "$ac_t""yes" 1>&6
3959     have_db=yes
3960     support_mysql=yes
3961     db_name=MySQL
3962     DB_NAME=mysql
3963
3964   else
3965         echo "$ac_t""no" 1>&6
3966   fi
3967
3968 else
3969   
3970   echo "$ac_t""no" 1>&6
3971
3972 fi
3973
3974
3975
3976
3977
3978
3979   
3980
3981
3982
3983 # ------------------------------------------------
3984 # Bacula check for various SQL database engines
3985 # ------------------------------------------------
3986
3987 have_db=no
3988 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
3989 echo "configure:3990: checking for SQLite support" >&5
3990 # Check whether --with-sqlite or --without-sqlite was given.
3991 if test "${with_sqlite+set}" = set; then
3992   withval="$with_sqlite"
3993   
3994   if test "$withval" != "no"; then
3995         if test "$withval" = "yes"; then
3996                 if test -f /usr/local/include/sqlite.h; then
3997                         SQLITE_INCDIR=/usr/local/include
3998                         SQLITE_LIBDIR=/usr/local/lib
3999                         SQLITE_BINDIR=/usr/local/bin
4000                 elif test -f /usr/include/sqlite.h; then
4001                         SQLITE_INCDIR=/usr/include
4002                         SQLITE_LIBDIR=/usr/lib
4003                         SQLITE_BINDIR=/usr/bin      
4004                 else
4005                    echo "$ac_t""no" 1>&6
4006                    { echo "configure: error: Unable to find sqlite.h in standard locations" 1>&2; exit 1; }
4007                 fi
4008         else
4009                 if test -f $withval/sqlite.h; then
4010                         SQLITE_INCDIR=$withval
4011                         SQLITE_LIBDIR=$withval
4012                         SQLITE_BINDIR=$withval
4013                 else
4014                    echo "$ac_t""no" 1>&6
4015                    { echo "configure: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" 1>&2; exit 1; }
4016                 fi
4017         fi
4018     SQL_INCLUDE=-I$SQLITE_INCDIR
4019     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
4020     SQL_BINDIR=$SQLITE_BINDIR
4021
4022     cat >> confdefs.h <<\EOF
4023 #define HAVE_SQLITE 1
4024 EOF
4025
4026     echo "$ac_t""yes" 1>&6
4027     have_db=yes
4028     support_sqlite=yes
4029     db_name=SQLite
4030     DB_NAME=sqlite
4031
4032   else
4033         echo "$ac_t""no" 1>&6
4034   fi
4035
4036 else
4037   
4038   echo "$ac_t""no" 1>&6
4039
4040 fi
4041
4042
4043
4044
4045   
4046
4047
4048
4049
4050
4051 cat >> confdefs.h <<\EOF
4052 #define PROTOTYPES 1
4053 EOF
4054
4055
4056 if test -z "$CFLAGS"; then
4057     if test -z "$CCOPTS"; then
4058         CCOPTS='-g -O2'
4059     fi
4060     CFLAGS="$CCOPTS"
4061 fi
4062
4063
4064 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4065 echo "configure:4066: checking for mingw32 environment" >&5
4066 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4067   echo $ac_n "(cached) $ac_c" 1>&6
4068 else
4069   cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072
4073 int main() {
4074 return __MINGW32__;
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078   rm -rf conftest*
4079   ac_cv_mingw32=yes
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   ac_cv_mingw32=no
4085 fi
4086 rm -f conftest*
4087 rm -f conftest*
4088 fi
4089
4090 echo "$ac_t""$ac_cv_mingw32" 1>&6
4091 MINGW32=
4092 test "$ac_cv_mingw32" = yes && MINGW32=yes
4093
4094
4095 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4096 echo "configure:4097: checking for executable suffix" >&5
4097 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4098   echo $ac_n "(cached) $ac_c" 1>&6
4099 else
4100   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4101   ac_cv_exeext=.exe
4102 else
4103   rm -f conftest*
4104   echo 'int main () { return 0; }' > conftest.$ac_ext
4105   ac_cv_exeext=
4106   if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4107     for file in conftest.*; do
4108       case $file in
4109       *.c | *.o | *.obj) ;;
4110       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4111       esac
4112     done
4113   else
4114     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4115   fi
4116   rm -f conftest*
4117   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4118 fi
4119 fi
4120
4121 EXEEXT=""
4122 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4123 echo "$ac_t""${ac_cv_exeext}" 1>&6
4124 ac_exeext=$EXEEXT
4125
4126
4127 echo $ac_n "checking build system type""... $ac_c" 1>&6
4128 echo "configure:4129: checking build system type" >&5
4129
4130 build_alias=$build
4131 case "$build_alias" in
4132 NONE)
4133   case $nonopt in
4134   NONE) build_alias=$host_alias ;;
4135   *) build_alias=$nonopt ;;
4136   esac ;;
4137 esac
4138
4139 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
4140 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4141 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4142 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4143 echo "$ac_t""$build" 1>&6
4144
4145 if test $host != $build; then
4146   ac_tool_prefix=${host_alias}-
4147 else
4148   ac_tool_prefix=
4149 fi
4150
4151
4152    # Check whether --enable-largefile or --disable-largefile was given.
4153 if test "${enable_largefile+set}" = set; then
4154   enableval="$enable_largefile"
4155   :
4156 fi
4157
4158    if test "$enable_largefile" != no; then
4159      # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
4160 set dummy ${ac_tool_prefix}getconf; ac_word=$2
4161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4162 echo "configure:4163: checking for $ac_word" >&5
4163 if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   if test -n "$GETCONF"; then
4167   ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
4168 else
4169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4170   ac_dummy="$PATH"
4171   for ac_dir in $ac_dummy; do
4172     test -z "$ac_dir" && ac_dir=.
4173     if test -f $ac_dir/$ac_word; then
4174       ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
4175       break
4176     fi
4177   done
4178   IFS="$ac_save_ifs"
4179   test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
4180 fi
4181 fi
4182 GETCONF="$ac_cv_prog_GETCONF"
4183 if test -n "$GETCONF"; then
4184   echo "$ac_t""$GETCONF" 1>&6
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188
4189
4190
4191      echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
4192 echo "configure:4193: checking for CFLAGS value to request large file support" >&5
4193 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
4197         ac_cv_sys_largefile_CFLAGS=no
4198         case "$host_os" in
4199            # IRIX 6.2 and later require cc -n32.
4200            irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
4201              if test "$GCC" != yes; then
4202                ac_cv_sys_largefile_CFLAGS=-n32
4203              fi
4204              ac_save_CC="$CC"
4205              CC="$CC $ac_cv_sys_largefile_CFLAGS"
4206              cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209
4210 int main() {
4211
4212 ; return 0; }
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4215   :
4216 else
4217   echo "configure: failed program was:" >&5
4218   cat conftest.$ac_ext >&5
4219   rm -rf conftest*
4220   ac_cv_sys_largefile_CFLAGS=no
4221 fi
4222 rm -f conftest*
4223              CC="$ac_save_CC"
4224            esac
4225       }
4226 fi
4227
4228 echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
4229      echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
4230 echo "configure:4231: checking for LDFLAGS value to request large file support" >&5
4231 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
4232   echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234   ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
4235         ac_cv_sys_largefile_LDFLAGS=no
4236         
4237       }
4238 fi
4239
4240 echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
4241      echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
4242 echo "configure:4243: checking for LIBS value to request large file support" >&5
4243 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
4247         ac_cv_sys_largefile_LIBS=no
4248         
4249       }
4250 fi
4251
4252 echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
4253
4254      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4255        case "$ac_flag" in
4256        no) ;;
4257        -D_FILE_OFFSET_BITS=*) ;;
4258        -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
4259        -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
4260        -D?* | -I?*)
4261          case "$ac_flag" in
4262    no) ;;
4263    ?*)
4264      case "$CPPFLAGS" in
4265      '') CPPFLAGS="$ac_flag" ;;
4266      *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
4267      esac ;;
4268    esac ;;
4269        *)
4270          case "$ac_flag" in
4271    no) ;;
4272    ?*)
4273      case "$CFLAGS" in
4274      '') CFLAGS="$ac_flag" ;;
4275      *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
4276      esac ;;
4277    esac ;;
4278        esac
4279      done
4280      case "$ac_cv_sys_largefile_LDFLAGS" in
4281    no) ;;
4282    ?*)
4283      case "$LDFLAGS" in
4284      '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
4285      *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
4286      esac ;;
4287    esac
4288      case "$ac_cv_sys_largefile_LIBS" in
4289    no) ;;
4290    ?*)
4291      case "$LIBS" in
4292      '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
4293      *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
4294      esac ;;
4295    esac
4296      echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
4297 echo "configure:4298: checking for _FILE_OFFSET_BITS" >&5
4298 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   ac_cv_sys_file_offset_bits=no
4302       case "$host_os" in
4303         # HP-UX 10.20 and later
4304         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4305           ac_cv_sys_file_offset_bits=64 ;;
4306         esac
4307       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4308         case "$ac_flag" in
4309         -D_FILE_OFFSET_BITS)
4310           ac_cv_sys_file_offset_bits=1 ;;
4311         -D_FILE_OFFSET_BITS=*)
4312           ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4313         esac
4314       done
4315       
4316 fi
4317
4318 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
4319    if test "$ac_cv_sys_file_offset_bits" != no; then
4320      cat >> confdefs.h <<EOF
4321 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4322 EOF
4323
4324    fi
4325      echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
4326 echo "configure:4327: checking for _LARGEFILE_SOURCE" >&5
4327 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   ac_cv_sys_largefile_source=no
4331       case "$host_os" in
4332         # HP-UX 10.20 and later
4333         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4334           ac_cv_sys_largefile_source=1 ;;
4335         esac
4336       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4337         case "$ac_flag" in
4338         -D_LARGEFILE_SOURCE)
4339           ac_cv_sys_largefile_source=1 ;;
4340         -D_LARGEFILE_SOURCE=*)
4341           ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4342         esac
4343       done
4344       
4345 fi
4346
4347 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
4348    if test "$ac_cv_sys_largefile_source" != no; then
4349      cat >> confdefs.h <<EOF
4350 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4351 EOF
4352
4353    fi
4354      echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
4355 echo "configure:4356: checking for _LARGE_FILES" >&5
4356 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   ac_cv_sys_large_files=no
4360       case "$host_os" in
4361         # AIX 4.2 and later
4362         aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
4363           ac_cv_sys_large_files=1 ;;
4364         esac
4365       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4366         case "$ac_flag" in
4367         -D_LARGE_FILES)
4368           ac_cv_sys_large_files=1 ;;
4369         -D_LARGE_FILES=*)
4370           ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4371         esac
4372       done
4373       
4374 fi
4375
4376 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
4377    if test "$ac_cv_sys_large_files" != no; then
4378      cat >> confdefs.h <<EOF
4379 #define _LARGE_FILES $ac_cv_sys_large_files
4380 EOF
4381
4382    fi
4383    fi
4384   
4385
4386
4387 # If we find X, set shell vars x_includes and x_libraries to the
4388 # paths, otherwise set no_x=yes.
4389 # Uses ac_ vars as temps to allow command line to override cache and checks.
4390 # --without-x overrides everything else, but does not touch the cache.
4391 echo $ac_n "checking for X""... $ac_c" 1>&6
4392 echo "configure:4393: checking for X" >&5
4393
4394 # Check whether --with-x or --without-x was given.
4395 if test "${with_x+set}" = set; then
4396   withval="$with_x"
4397   :
4398 fi
4399
4400 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4401 if test "x$with_x" = xno; then
4402   # The user explicitly disabled X.
4403   have_x=disabled
4404 else
4405   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4406     # Both variables are already set.
4407     have_x=yes
4408   else
4409 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4410   echo $ac_n "(cached) $ac_c" 1>&6
4411 else
4412   # One or both of the vars are not set, and there is no cached value.
4413 ac_x_includes=NO ac_x_libraries=NO
4414 rm -fr conftestdir
4415 if mkdir conftestdir; then
4416   cd conftestdir
4417   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4418   cat > Imakefile <<'EOF'
4419 acfindx:
4420         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4421 EOF
4422   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4423     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4424     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4425     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4426     for ac_extension in a so sl; do
4427       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4428         test -f $ac_im_libdir/libX11.$ac_extension; then
4429         ac_im_usrlibdir=$ac_im_libdir; break
4430       fi
4431     done
4432     # Screen out bogus values from the imake configuration.  They are
4433     # bogus both because they are the default anyway, and because
4434     # using them would break gcc on systems where it needs fixed includes.
4435     case "$ac_im_incroot" in
4436         /usr/include) ;;
4437         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4438     esac
4439     case "$ac_im_usrlibdir" in
4440         /usr/lib | /lib) ;;
4441         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4442     esac
4443   fi
4444   cd ..
4445   rm -fr conftestdir
4446 fi
4447
4448 if test "$ac_x_includes" = NO; then
4449   # Guess where to find include files, by looking for this one X11 .h file.
4450   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4451
4452   # First, try using that file with no special directory specified.
4453 cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456 #include <$x_direct_test_include>
4457 EOF
4458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4459 { (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4461 if test -z "$ac_err"; then
4462   rm -rf conftest*
4463   # We can compile using X headers with no special include directory.
4464 ac_x_includes=
4465 else
4466   echo "$ac_err" >&5
4467   echo "configure: failed program was:" >&5
4468   cat conftest.$ac_ext >&5
4469   rm -rf conftest*
4470   # Look for the header file in a standard set of common directories.
4471 # Check X11 before X11Rn because it is often a symlink to the current release.
4472   for ac_dir in               \
4473     /usr/X11/include          \
4474     /usr/X11R6/include        \
4475     /usr/X11R5/include        \
4476     /usr/X11R4/include        \
4477                               \
4478     /usr/include/X11          \
4479     /usr/include/X11R6        \
4480     /usr/include/X11R5        \
4481     /usr/include/X11R4        \
4482                               \
4483     /usr/local/X11/include    \
4484     /usr/local/X11R6/include  \
4485     /usr/local/X11R5/include  \
4486     /usr/local/X11R4/include  \
4487                               \
4488     /usr/local/include/X11    \
4489     /usr/local/include/X11R6  \
4490     /usr/local/include/X11R5  \
4491     /usr/local/include/X11R4  \
4492                               \
4493     /usr/X386/include         \
4494     /usr/x386/include         \
4495     /usr/XFree86/include/X11  \
4496                               \
4497     /usr/include              \
4498     /usr/local/include        \
4499     /usr/unsupported/include  \
4500     /usr/athena/include       \
4501     /usr/local/x11r5/include  \
4502     /usr/lpp/Xamples/include  \
4503                               \
4504     /usr/openwin/include      \
4505     /usr/openwin/share/include \
4506     ; \
4507   do
4508     if test -r "$ac_dir/$x_direct_test_include"; then
4509       ac_x_includes=$ac_dir
4510       break
4511     fi
4512   done
4513 fi
4514 rm -f conftest*
4515 fi # $ac_x_includes = NO
4516
4517 if test "$ac_x_libraries" = NO; then
4518   # Check for the libraries.
4519
4520   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4521   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4522
4523   # See if we find them without any special options.
4524   # Don't add to $LIBS permanently.
4525   ac_save_LIBS="$LIBS"
4526   LIBS="-l$x_direct_test_library $LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530
4531 int main() {
4532 ${x_direct_test_function}()
4533 ; return 0; }
4534 EOF
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536   rm -rf conftest*
4537   LIBS="$ac_save_LIBS"
4538 # We can link X programs with no special library path.
4539 ac_x_libraries=
4540 else
4541   echo "configure: failed program was:" >&5
4542   cat conftest.$ac_ext >&5
4543   rm -rf conftest*
4544   LIBS="$ac_save_LIBS"
4545 # First see if replacing the include by lib works.
4546 # Check X11 before X11Rn because it is often a symlink to the current release.
4547 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4548     /usr/X11/lib          \
4549     /usr/X11R6/lib        \
4550     /usr/X11R5/lib        \
4551     /usr/X11R4/lib        \
4552                           \
4553     /usr/lib/X11          \
4554     /usr/lib/X11R6        \
4555     /usr/lib/X11R5        \
4556     /usr/lib/X11R4        \
4557                           \
4558     /usr/local/X11/lib    \
4559     /usr/local/X11R6/lib  \
4560     /usr/local/X11R5/lib  \
4561     /usr/local/X11R4/lib  \
4562                           \
4563     /usr/local/lib/X11    \
4564     /usr/local/lib/X11R6  \
4565     /usr/local/lib/X11R5  \
4566     /usr/local/lib/X11R4  \
4567                           \
4568     /usr/X386/lib         \
4569     /usr/x386/lib         \
4570     /usr/XFree86/lib/X11  \
4571                           \
4572     /usr/lib              \
4573     /usr/local/lib        \
4574     /usr/unsupported/lib  \
4575     /usr/athena/lib       \
4576     /usr/local/x11r5/lib  \
4577     /usr/lpp/Xamples/lib  \
4578     /lib/usr/lib/X11      \
4579                           \
4580     /usr/openwin/lib      \
4581     /usr/openwin/share/lib \
4582     ; \
4583 do
4584   for ac_extension in a so sl; do
4585     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4586       ac_x_libraries=$ac_dir
4587       break 2
4588     fi
4589   done
4590 done
4591 fi
4592 rm -f conftest*
4593 fi # $ac_x_libraries = NO
4594
4595 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4596   # Didn't find X anywhere.  Cache the known absence of X.
4597   ac_cv_have_x="have_x=no"
4598 else
4599   # Record where we found X for the cache.
4600   ac_cv_have_x="have_x=yes \
4601                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4602 fi
4603 fi
4604   fi
4605   eval "$ac_cv_have_x"
4606 fi # $with_x != no
4607
4608 if test "$have_x" != yes; then
4609   echo "$ac_t""$have_x" 1>&6
4610   no_x=yes
4611 else
4612   # If each of the values was on the command line, it overrides each guess.
4613   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4614   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4615   # Update the cache value to reflect the command line values.
4616   ac_cv_have_x="have_x=yes \
4617                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4618   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4619 fi
4620
4621 if test "$no_x" = yes; then
4622   # Not all programs may use this symbol, but it does not hurt to define it.
4623   cat >> confdefs.h <<\EOF
4624 #define X_DISPLAY_MISSING 1
4625 EOF
4626
4627   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4628 else
4629   if test -n "$x_includes"; then
4630     X_CFLAGS="$X_CFLAGS -I$x_includes"
4631   fi
4632
4633   # It would also be nice to do this for all -L options, not just this one.
4634   if test -n "$x_libraries"; then
4635     X_LIBS="$X_LIBS -L$x_libraries"
4636     # For Solaris; some versions of Sun CC require a space after -R and
4637     # others require no space.  Words are not sufficient . . . .
4638     case "`(uname -sr) 2>/dev/null`" in
4639     "SunOS 5"*)
4640       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4641 echo "configure:4642: checking whether -R must be followed by a space" >&5
4642       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4643       cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646
4647 int main() {
4648
4649 ; return 0; }
4650 EOF
4651 if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4652   rm -rf conftest*
4653   ac_R_nospace=yes
4654 else
4655   echo "configure: failed program was:" >&5
4656   cat conftest.$ac_ext >&5
4657   rm -rf conftest*
4658   ac_R_nospace=no
4659 fi
4660 rm -f conftest*
4661       if test $ac_R_nospace = yes; then
4662         echo "$ac_t""no" 1>&6
4663         X_LIBS="$X_LIBS -R$x_libraries"
4664       else
4665         LIBS="$ac_xsave_LIBS -R $x_libraries"
4666         cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669
4670 int main() {
4671
4672 ; return 0; }
4673 EOF
4674 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4675   rm -rf conftest*
4676   ac_R_space=yes
4677 else
4678   echo "configure: failed program was:" >&5
4679   cat conftest.$ac_ext >&5
4680   rm -rf conftest*
4681   ac_R_space=no
4682 fi
4683 rm -f conftest*
4684         if test $ac_R_space = yes; then
4685           echo "$ac_t""yes" 1>&6
4686           X_LIBS="$X_LIBS -R $x_libraries"
4687         else
4688           echo "$ac_t""neither works" 1>&6
4689         fi
4690       fi
4691       LIBS="$ac_xsave_LIBS"
4692     esac
4693   fi
4694
4695   # Check for system-dependent libraries X programs must link with.
4696   # Do this before checking for the system-independent R6 libraries
4697   # (-lICE), since we may need -lsocket or whatever for X linking.
4698
4699   if test "$ISC" = yes; then
4700     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4701   else
4702     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4703     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4704     # the Alpha needs dnet_stub (dnet does not exist).
4705     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4706 echo "configure:4707: checking for dnet_ntoa in -ldnet" >&5
4707 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4708 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   ac_save_LIBS="$LIBS"
4712 LIBS="-ldnet  $LIBS"
4713 cat > conftest.$ac_ext <<EOF
4714 #line 4715 "configure"
4715 #include "confdefs.h"
4716 /* Override any gcc2 internal prototype to avoid an error.  */
4717 /* We use char because int might match the return type of a gcc2
4718     builtin and then its argument prototype would still apply.  */
4719 char dnet_ntoa();
4720
4721 int main() {
4722 dnet_ntoa()
4723 ; return 0; }
4724 EOF
4725 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726   rm -rf conftest*
4727   eval "ac_cv_lib_$ac_lib_var=yes"
4728 else
4729   echo "configure: failed program was:" >&5
4730   cat conftest.$ac_ext >&5
4731   rm -rf conftest*
4732   eval "ac_cv_lib_$ac_lib_var=no"
4733 fi
4734 rm -f conftest*
4735 LIBS="$ac_save_LIBS"
4736
4737 fi
4738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4739   echo "$ac_t""yes" 1>&6
4740   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4741 else
4742   echo "$ac_t""no" 1>&6
4743 fi
4744
4745     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4746       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4747 echo "configure:4748: checking for dnet_ntoa in -ldnet_stub" >&5
4748 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   ac_save_LIBS="$LIBS"
4753 LIBS="-ldnet_stub  $LIBS"
4754 cat > conftest.$ac_ext <<EOF
4755 #line 4756 "configure"
4756 #include "confdefs.h"
4757 /* Override any gcc2 internal prototype to avoid an error.  */
4758 /* We use char because int might match the return type of a gcc2
4759     builtin and then its argument prototype would still apply.  */
4760 char dnet_ntoa();
4761
4762 int main() {
4763 dnet_ntoa()
4764 ; return 0; }
4765 EOF
4766 if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4767   rm -rf conftest*
4768   eval "ac_cv_lib_$ac_lib_var=yes"
4769 else
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   eval "ac_cv_lib_$ac_lib_var=no"
4774 fi
4775 rm -f conftest*
4776 LIBS="$ac_save_LIBS"
4777
4778 fi
4779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4780   echo "$ac_t""yes" 1>&6
4781   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4782 else
4783   echo "$ac_t""no" 1>&6
4784 fi
4785
4786     fi
4787
4788     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4789     # to get the SysV transport functions.
4790     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4791     # needs -lnsl.
4792     # The nsl library prevents programs from opening the X display
4793     # on Irix 5.2, according to dickey@clark.net.
4794     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4795 echo "configure:4796: checking for gethostbyname" >&5
4796 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4797   echo $ac_n "(cached) $ac_c" 1>&6
4798 else
4799   cat > conftest.$ac_ext <<EOF
4800 #line 4801 "configure"
4801 #include "confdefs.h"
4802 /* System header to define __stub macros and hopefully few prototypes,
4803     which can conflict with char gethostbyname(); below.  */
4804 #include <assert.h>
4805 /* Override any gcc2 internal prototype to avoid an error.  */
4806 /* We use char because int might match the return type of a gcc2
4807     builtin and then its argument prototype would still apply.  */
4808 char gethostbyname();
4809
4810 int main() {
4811
4812 /* The GNU C library defines this for functions which it implements
4813     to always fail with ENOSYS.  Some functions are actually named
4814     something starting with __ and the normal name is an alias.  */
4815 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4816 choke me
4817 #else
4818 gethostbyname();
4819 #endif
4820
4821 ; return 0; }
4822 EOF
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4824   rm -rf conftest*
4825   eval "ac_cv_func_gethostbyname=yes"
4826 else
4827   echo "configure: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   rm -rf conftest*
4830   eval "ac_cv_func_gethostbyname=no"
4831 fi
4832 rm -f conftest*
4833 fi
4834
4835 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837   :
4838 else
4839   echo "$ac_t""no" 1>&6
4840 fi
4841
4842     if test $ac_cv_func_gethostbyname = no; then
4843       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4844 echo "configure:4845: checking for gethostbyname in -lnsl" >&5
4845 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   ac_save_LIBS="$LIBS"
4850 LIBS="-lnsl  $LIBS"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 /* Override any gcc2 internal prototype to avoid an error.  */
4855 /* We use char because int might match the return type of a gcc2
4856     builtin and then its argument prototype would still apply.  */
4857 char gethostbyname();
4858
4859 int main() {
4860 gethostbyname()
4861 ; return 0; }
4862 EOF
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4864   rm -rf conftest*
4865   eval "ac_cv_lib_$ac_lib_var=yes"
4866 else
4867   echo "configure: failed program was:" >&5
4868   cat conftest.$ac_ext >&5
4869   rm -rf conftest*
4870   eval "ac_cv_lib_$ac_lib_var=no"
4871 fi
4872 rm -f conftest*
4873 LIBS="$ac_save_LIBS"
4874
4875 fi
4876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4877   echo "$ac_t""yes" 1>&6
4878   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4879 else
4880   echo "$ac_t""no" 1>&6
4881 fi
4882
4883     fi
4884
4885     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4886     # socket/setsockopt and other routines are undefined under SCO ODT
4887     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4888     # on later versions), says simon@lia.di.epfl.ch: it contains
4889     # gethostby* variants that don't use the nameserver (or something).
4890     # -lsocket must be given before -lnsl if both are needed.
4891     # We assume that if connect needs -lnsl, so does gethostbyname.
4892     echo $ac_n "checking for connect""... $ac_c" 1>&6
4893 echo "configure:4894: checking for connect" >&5
4894 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   cat > conftest.$ac_ext <<EOF
4898 #line 4899 "configure"
4899 #include "confdefs.h"
4900 /* System header to define __stub macros and hopefully few prototypes,
4901     which can conflict with char connect(); below.  */
4902 #include <assert.h>
4903 /* Override any gcc2 internal prototype to avoid an error.  */
4904 /* We use char because int might match the return type of a gcc2
4905     builtin and then its argument prototype would still apply.  */
4906 char connect();
4907
4908 int main() {
4909
4910 /* The GNU C library defines this for functions which it implements
4911     to always fail with ENOSYS.  Some functions are actually named
4912     something starting with __ and the normal name is an alias.  */
4913 #if defined (__stub_connect) || defined (__stub___connect)
4914 choke me
4915 #else
4916 connect();
4917 #endif
4918
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_func_connect=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_func_connect=no"
4929 fi
4930 rm -f conftest*
4931 fi
4932
4933 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935   :
4936 else
4937   echo "$ac_t""no" 1>&6
4938 fi
4939
4940     if test $ac_cv_func_connect = no; then
4941       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4942 echo "configure:4943: checking for connect in -lsocket" >&5
4943 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4944 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4945   echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4947   ac_save_LIBS="$LIBS"
4948 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 /* Override any gcc2 internal prototype to avoid an error.  */
4953 /* We use char because int might match the return type of a gcc2
4954     builtin and then its argument prototype would still apply.  */
4955 char connect();
4956
4957 int main() {
4958 connect()
4959 ; return 0; }
4960 EOF
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962   rm -rf conftest*
4963   eval "ac_cv_lib_$ac_lib_var=yes"
4964 else
4965   echo "configure: failed program was:" >&5
4966   cat conftest.$ac_ext >&5
4967   rm -rf conftest*
4968   eval "ac_cv_lib_$ac_lib_var=no"
4969 fi
4970 rm -f conftest*
4971 LIBS="$ac_save_LIBS"
4972
4973 fi
4974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4975   echo "$ac_t""yes" 1>&6
4976   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4977 else
4978   echo "$ac_t""no" 1>&6
4979 fi
4980
4981     fi
4982
4983     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4984     echo $ac_n "checking for remove""... $ac_c" 1>&6
4985 echo "configure:4986: checking for remove" >&5
4986 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4987   echo $ac_n "(cached) $ac_c" 1>&6
4988 else
4989   cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 /* System header to define __stub macros and hopefully few prototypes,
4993     which can conflict with char remove(); below.  */
4994 #include <assert.h>
4995 /* Override any gcc2 internal prototype to avoid an error.  */
4996 /* We use char because int might match the return type of a gcc2
4997     builtin and then its argument prototype would still apply.  */
4998 char remove();
4999
5000 int main() {
5001
5002 /* The GNU C library defines this for functions which it implements
5003     to always fail with ENOSYS.  Some functions are actually named
5004     something starting with __ and the normal name is an alias.  */
5005 #if defined (__stub_remove) || defined (__stub___remove)
5006 choke me
5007 #else
5008 remove();
5009 #endif
5010
5011 ; return 0; }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5014   rm -rf conftest*
5015   eval "ac_cv_func_remove=yes"
5016 else
5017   echo "configure: failed program was:" >&5
5018   cat conftest.$ac_ext >&5
5019   rm -rf conftest*
5020   eval "ac_cv_func_remove=no"
5021 fi
5022 rm -f conftest*
5023 fi
5024
5025 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5026   echo "$ac_t""yes" 1>&6
5027   :
5028 else
5029   echo "$ac_t""no" 1>&6
5030 fi
5031
5032     if test $ac_cv_func_remove = no; then
5033       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5034 echo "configure:5035: checking for remove in -lposix" >&5
5035 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5036 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5037   echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039   ac_save_LIBS="$LIBS"
5040 LIBS="-lposix  $LIBS"
5041 cat > conftest.$ac_ext <<EOF
5042 #line 5043 "configure"
5043 #include "confdefs.h"
5044 /* Override any gcc2 internal prototype to avoid an error.  */
5045 /* We use char because int might match the return type of a gcc2
5046     builtin and then its argument prototype would still apply.  */
5047 char remove();
5048
5049 int main() {
5050 remove()
5051 ; return 0; }
5052 EOF
5053 if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5054   rm -rf conftest*
5055   eval "ac_cv_lib_$ac_lib_var=yes"
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060   eval "ac_cv_lib_$ac_lib_var=no"
5061 fi
5062 rm -f conftest*
5063 LIBS="$ac_save_LIBS"
5064
5065 fi
5066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5067   echo "$ac_t""yes" 1>&6
5068   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5069 else
5070   echo "$ac_t""no" 1>&6
5071 fi
5072
5073     fi
5074
5075     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5076     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5077 echo "configure:5078: checking for shmat" >&5
5078 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5079   echo $ac_n "(cached) $ac_c" 1>&6
5080 else
5081   cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084 /* System header to define __stub macros and hopefully few prototypes,
5085     which can conflict with char shmat(); below.  */
5086 #include <assert.h>
5087 /* Override any gcc2 internal prototype to avoid an error.  */
5088 /* We use char because int might match the return type of a gcc2
5089     builtin and then its argument prototype would still apply.  */
5090 char shmat();
5091
5092 int main() {
5093
5094 /* The GNU C library defines this for functions which it implements
5095     to always fail with ENOSYS.  Some functions are actually named
5096     something starting with __ and the normal name is an alias.  */
5097 #if defined (__stub_shmat) || defined (__stub___shmat)
5098 choke me
5099 #else
5100 shmat();
5101 #endif
5102
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   eval "ac_cv_func_shmat=yes"
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   eval "ac_cv_func_shmat=no"
5113 fi
5114 rm -f conftest*
5115 fi
5116
5117 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119   :
5120 else
5121   echo "$ac_t""no" 1>&6
5122 fi
5123
5124     if test $ac_cv_func_shmat = no; then
5125       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5126 echo "configure:5127: checking for shmat in -lipc" >&5
5127 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5129   echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131   ac_save_LIBS="$LIBS"
5132 LIBS="-lipc  $LIBS"
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 /* Override any gcc2 internal prototype to avoid an error.  */
5137 /* We use char because int might match the return type of a gcc2
5138     builtin and then its argument prototype would still apply.  */
5139 char shmat();
5140
5141 int main() {
5142 shmat()
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_lib_$ac_lib_var=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=no"
5153 fi
5154 rm -f conftest*
5155 LIBS="$ac_save_LIBS"
5156
5157 fi
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5161 else
5162   echo "$ac_t""no" 1>&6
5163 fi
5164
5165     fi
5166   fi
5167
5168   # Check for libraries that X11R6 Xt/Xaw programs need.
5169   ac_save_LDFLAGS="$LDFLAGS"
5170   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5171   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5172   # check for ICE first), but we must link in the order -lSM -lICE or
5173   # we get undefined symbols.  So assume we have SM if we have ICE.
5174   # These have to be linked with before -lX11, unlike the other
5175   # libraries we check for below, so use a different variable.
5176   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5177   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5178 echo "configure:5179: checking for IceConnectionNumber in -lICE" >&5
5179 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5181   echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183   ac_save_LIBS="$LIBS"
5184 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5185 cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 /* Override any gcc2 internal prototype to avoid an error.  */
5189 /* We use char because int might match the return type of a gcc2
5190     builtin and then its argument prototype would still apply.  */
5191 char IceConnectionNumber();
5192
5193 int main() {
5194 IceConnectionNumber()
5195 ; return 0; }
5196 EOF
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=yes"
5200 else
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=no"
5205 fi
5206 rm -f conftest*
5207 LIBS="$ac_save_LIBS"
5208
5209 fi
5210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5211   echo "$ac_t""yes" 1>&6
5212   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5213 else
5214   echo "$ac_t""no" 1>&6
5215 fi
5216
5217   LDFLAGS="$ac_save_LDFLAGS"
5218
5219 fi
5220
5221
5222 for ac_hdr in \
5223         assert.h \
5224         fcntl.h \
5225         grp.h \
5226         libc.h \
5227         limits.h \
5228         stdarg.h \
5229         stdlib.h \
5230         string.h \
5231         termios.h \
5232         unistd.h \
5233         sys/byteorder.h \
5234         sys/ioctl.h \
5235         sys/select.h \
5236         sys/sockio.h \
5237         sys/time.h \
5238
5239 do
5240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5242 echo "configure:5243: checking for $ac_hdr" >&5
5243 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5244   echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246   cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 #include <$ac_hdr>
5250 EOF
5251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5252 { (eval echo configure:5253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5254 if test -z "$ac_err"; then
5255   rm -rf conftest*
5256   eval "ac_cv_header_$ac_safe=yes"
5257 else
5258   echo "$ac_err" >&5
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_header_$ac_safe=no"
5263 fi
5264 rm -f conftest*
5265 fi
5266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5267   echo "$ac_t""yes" 1>&6
5268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5269   cat >> confdefs.h <<EOF
5270 #define $ac_tr_hdr 1
5271 EOF
5272  
5273 else
5274   echo "$ac_t""no" 1>&6
5275 fi
5276 done
5277
5278 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5279 echo "configure:5280: checking for ANSI C header files" >&5
5280 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5286 #include <stdlib.h>
5287 #include <stdarg.h>
5288 #include <string.h>
5289 #include <float.h>
5290 EOF
5291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5292 { (eval echo configure:5293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5294 if test -z "$ac_err"; then
5295   rm -rf conftest*
5296   ac_cv_header_stdc=yes
5297 else
5298   echo "$ac_err" >&5
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   ac_cv_header_stdc=no
5303 fi
5304 rm -f conftest*
5305
5306 if test $ac_cv_header_stdc = yes; then
5307   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5308 cat > conftest.$ac_ext <<EOF
5309 #line 5310 "configure"
5310 #include "confdefs.h"
5311 #include <string.h>
5312 EOF
5313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5314   egrep "memchr" >/dev/null 2>&1; then
5315   :
5316 else
5317   rm -rf conftest*
5318   ac_cv_header_stdc=no
5319 fi
5320 rm -f conftest*
5321
5322 fi
5323
5324 if test $ac_cv_header_stdc = yes; then
5325   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5326 cat > conftest.$ac_ext <<EOF
5327 #line 5328 "configure"
5328 #include "confdefs.h"
5329 #include <stdlib.h>
5330 EOF
5331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5332   egrep "free" >/dev/null 2>&1; then
5333   :
5334 else
5335   rm -rf conftest*
5336   ac_cv_header_stdc=no
5337 fi
5338 rm -f conftest*
5339
5340 fi
5341
5342 if test $ac_cv_header_stdc = yes; then
5343   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5344 if test "$cross_compiling" = yes; then
5345   :
5346 else
5347   cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 #include <ctype.h>
5351 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5352 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5353 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5354 int main () { int i; for (i = 0; i < 256; i++)
5355 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5356 exit (0); }
5357
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5360 then
5361   :
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -fr conftest*
5366   ac_cv_header_stdc=no
5367 fi
5368 rm -fr conftest*
5369 fi
5370
5371 fi
5372 fi
5373
5374 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5375 if test $ac_cv_header_stdc = yes; then
5376   cat >> confdefs.h <<\EOF
5377 #define STDC_HEADERS 1
5378 EOF
5379
5380 fi
5381
5382 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
5383 echo "configure:5384: checking whether sys/types.h defines makedev" >&5
5384 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387   cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 #include <sys/types.h>
5391 int main() {
5392 return makedev(0, 0);
5393 ; return 0; }
5394 EOF
5395 if { (eval echo configure:5396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5396   rm -rf conftest*
5397   ac_cv_header_sys_types_h_makedev=yes
5398 else
5399   echo "configure: failed program was:" >&5
5400   cat conftest.$ac_ext >&5
5401   rm -rf conftest*
5402   ac_cv_header_sys_types_h_makedev=no
5403 fi
5404 rm -f conftest*
5405
5406 fi
5407
5408 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
5409
5410 if test $ac_cv_header_sys_types_h_makedev = no; then
5411 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
5412 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
5413 echo "configure:5414: checking for sys/mkdev.h" >&5
5414 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5415   echo $ac_n "(cached) $ac_c" 1>&6
5416 else
5417   cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 #include <sys/mkdev.h>
5421 EOF
5422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5423 { (eval echo configure:5424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5425 if test -z "$ac_err"; then
5426   rm -rf conftest*
5427   eval "ac_cv_header_$ac_safe=yes"
5428 else
5429   echo "$ac_err" >&5
5430   echo "configure: failed program was:" >&5
5431   cat conftest.$ac_ext >&5
5432   rm -rf conftest*
5433   eval "ac_cv_header_$ac_safe=no"
5434 fi
5435 rm -f conftest*
5436 fi
5437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5438   echo "$ac_t""yes" 1>&6
5439   cat >> confdefs.h <<\EOF
5440 #define MAJOR_IN_MKDEV 1
5441 EOF
5442
5443 else
5444   echo "$ac_t""no" 1>&6
5445 fi
5446
5447
5448   if test $ac_cv_header_sys_mkdev_h = no; then
5449 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
5450 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
5451 echo "configure:5452: checking for sys/sysmacros.h" >&5
5452 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   cat > conftest.$ac_ext <<EOF
5456 #line 5457 "configure"
5457 #include "confdefs.h"
5458 #include <sys/sysmacros.h>
5459 EOF
5460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5461 { (eval echo configure:5462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5463 if test -z "$ac_err"; then
5464   rm -rf conftest*
5465   eval "ac_cv_header_$ac_safe=yes"
5466 else
5467   echo "$ac_err" >&5
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_header_$ac_safe=no"
5472 fi
5473 rm -f conftest*
5474 fi
5475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5476   echo "$ac_t""yes" 1>&6
5477   cat >> confdefs.h <<\EOF
5478 #define MAJOR_IN_SYSMACROS 1
5479 EOF
5480
5481 else
5482   echo "$ac_t""no" 1>&6
5483 fi
5484
5485   fi
5486 fi
5487
5488 ac_header_dirent=no
5489 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5490 do
5491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5492 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5493 echo "configure:5494: checking for $ac_hdr that defines DIR" >&5
5494 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5495   echo $ac_n "(cached) $ac_c" 1>&6
5496 else
5497   cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5500 #include <sys/types.h>
5501 #include <$ac_hdr>
5502 int main() {
5503 DIR *dirp = 0;
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5507   rm -rf conftest*
5508   eval "ac_cv_header_dirent_$ac_safe=yes"
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   eval "ac_cv_header_dirent_$ac_safe=no"
5514 fi
5515 rm -f conftest*
5516 fi
5517 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5518   echo "$ac_t""yes" 1>&6
5519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5520   cat >> confdefs.h <<EOF
5521 #define $ac_tr_hdr 1
5522 EOF
5523  ac_header_dirent=$ac_hdr; break
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527 done
5528 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5529 if test $ac_header_dirent = dirent.h; then
5530 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5531 echo "configure:5532: checking for opendir in -ldir" >&5
5532 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5534   echo $ac_n "(cached) $ac_c" 1>&6
5535 else
5536   ac_save_LIBS="$LIBS"
5537 LIBS="-ldir  $LIBS"
5538 cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 /* Override any gcc2 internal prototype to avoid an error.  */
5542 /* We use char because int might match the return type of a gcc2
5543     builtin and then its argument prototype would still apply.  */
5544 char opendir();
5545
5546 int main() {
5547 opendir()
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_lib_$ac_lib_var=no"
5558 fi
5559 rm -f conftest*
5560 LIBS="$ac_save_LIBS"
5561
5562 fi
5563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5564   echo "$ac_t""yes" 1>&6
5565   LIBS="$LIBS -ldir"
5566 else
5567   echo "$ac_t""no" 1>&6
5568 fi
5569
5570 else
5571 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5572 echo "configure:5573: checking for opendir in -lx" >&5
5573 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   ac_save_LIBS="$LIBS"
5578 LIBS="-lx  $LIBS"
5579 cat > conftest.$ac_ext <<EOF
5580 #line 5581 "configure"
5581 #include "confdefs.h"
5582 /* Override any gcc2 internal prototype to avoid an error.  */
5583 /* We use char because int might match the return type of a gcc2
5584     builtin and then its argument prototype would still apply.  */
5585 char opendir();
5586
5587 int main() {
5588 opendir()
5589 ; return 0; }
5590 EOF
5591 if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5592   rm -rf conftest*
5593   eval "ac_cv_lib_$ac_lib_var=yes"
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597   rm -rf conftest*
5598   eval "ac_cv_lib_$ac_lib_var=no"
5599 fi
5600 rm -f conftest*
5601 LIBS="$ac_save_LIBS"
5602
5603 fi
5604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5605   echo "$ac_t""yes" 1>&6
5606   LIBS="$LIBS -lx"
5607 else
5608   echo "$ac_t""no" 1>&6
5609 fi
5610
5611 fi
5612
5613 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5614 echo "configure:5615: checking whether stat file-mode macros are broken" >&5
5615 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5616   echo $ac_n "(cached) $ac_c" 1>&6
5617 else
5618   cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621 #include <sys/types.h>
5622 #include <sys/stat.h>
5623
5624 #if defined(S_ISBLK) && defined(S_IFDIR)
5625 # if S_ISBLK (S_IFDIR)
5626 You lose.
5627 # endif
5628 #endif
5629
5630 #if defined(S_ISBLK) && defined(S_IFCHR)
5631 # if S_ISBLK (S_IFCHR)
5632 You lose.
5633 # endif
5634 #endif
5635
5636 #if defined(S_ISLNK) && defined(S_IFREG)
5637 # if S_ISLNK (S_IFREG)
5638 You lose.
5639 # endif
5640 #endif
5641
5642 #if defined(S_ISSOCK) && defined(S_IFREG)
5643 # if S_ISSOCK (S_IFREG)
5644 You lose.
5645 # endif
5646 #endif
5647
5648 EOF
5649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5650   egrep "You lose" >/dev/null 2>&1; then
5651   rm -rf conftest*
5652   ac_cv_header_stat_broken=yes
5653 else
5654   rm -rf conftest*
5655   ac_cv_header_stat_broken=no
5656 fi
5657 rm -f conftest*
5658
5659 fi
5660
5661 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5662 if test $ac_cv_header_stat_broken = yes; then
5663   cat >> confdefs.h <<\EOF
5664 #define STAT_MACROS_BROKEN 1
5665 EOF
5666
5667 fi
5668
5669 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5670 echo "configure:5671: checking for sys/wait.h that is POSIX.1 compatible" >&5
5671 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5672   echo $ac_n "(cached) $ac_c" 1>&6
5673 else
5674   cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <sys/types.h>
5678 #include <sys/wait.h>
5679 #ifndef WEXITSTATUS
5680 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5681 #endif
5682 #ifndef WIFEXITED
5683 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5684 #endif
5685 int main() {
5686 int s;
5687 wait (&s);
5688 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5692   rm -rf conftest*
5693   ac_cv_header_sys_wait_h=yes
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   ac_cv_header_sys_wait_h=no
5699 fi
5700 rm -f conftest*
5701 fi
5702
5703 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5704 if test $ac_cv_header_sys_wait_h = yes; then
5705   cat >> confdefs.h <<\EOF
5706 #define HAVE_SYS_WAIT_H 1
5707 EOF
5708
5709 fi
5710
5711 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5712 echo "configure:5713: checking whether time.h and sys/time.h may both be included" >&5
5713 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 #include <sys/types.h>
5720 #include <sys/time.h>
5721 #include <time.h>
5722 int main() {
5723 struct tm *tp;
5724 ; return 0; }
5725 EOF
5726 if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5727   rm -rf conftest*
5728   ac_cv_header_time=yes
5729 else
5730   echo "configure: failed program was:" >&5
5731   cat conftest.$ac_ext >&5
5732   rm -rf conftest*
5733   ac_cv_header_time=no
5734 fi
5735 rm -f conftest*
5736 fi
5737
5738 echo "$ac_t""$ac_cv_header_time" 1>&6
5739 if test $ac_cv_header_time = yes; then
5740   cat >> confdefs.h <<\EOF
5741 #define TIME_WITH_SYS_TIME 1
5742 EOF
5743
5744 fi
5745
5746 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5747 echo "configure:5748: checking for st_blksize in struct stat" >&5
5748 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 #include <sys/types.h>
5755 #include <sys/stat.h>
5756 int main() {
5757 struct stat s; s.st_blksize;
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5761   rm -rf conftest*
5762   ac_cv_struct_st_blksize=yes
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   ac_cv_struct_st_blksize=no
5768 fi
5769 rm -f conftest*
5770 fi
5771
5772 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5773 if test $ac_cv_struct_st_blksize = yes; then
5774   cat >> confdefs.h <<\EOF
5775 #define HAVE_ST_BLKSIZE 1
5776 EOF
5777
5778 fi
5779
5780 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
5781 echo "configure:5782: checking for st_blocks in struct stat" >&5
5782 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5783   echo $ac_n "(cached) $ac_c" 1>&6
5784 else
5785   cat > conftest.$ac_ext <<EOF
5786 #line 5787 "configure"
5787 #include "confdefs.h"
5788 #include <sys/types.h>
5789 #include <sys/stat.h>
5790 int main() {
5791 struct stat s; s.st_blocks;
5792 ; return 0; }
5793 EOF
5794 if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5795   rm -rf conftest*
5796   ac_cv_struct_st_blocks=yes
5797 else
5798   echo "configure: failed program was:" >&5
5799   cat conftest.$ac_ext >&5
5800   rm -rf conftest*
5801   ac_cv_struct_st_blocks=no
5802 fi
5803 rm -f conftest*
5804 fi
5805
5806 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5807 if test $ac_cv_struct_st_blocks = yes; then
5808   cat >> confdefs.h <<\EOF
5809 #define HAVE_ST_BLOCKS 1
5810 EOF
5811
5812 else
5813   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5814 fi
5815
5816 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5817 echo "configure:5818: checking whether struct tm is in sys/time.h or time.h" >&5
5818 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5819   echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 #include <sys/types.h>
5825 #include <time.h>
5826 int main() {
5827 struct tm *tp; tp->tm_sec;
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5831   rm -rf conftest*
5832   ac_cv_struct_tm=time.h
5833 else
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   ac_cv_struct_tm=sys/time.h
5838 fi
5839 rm -f conftest*
5840 fi
5841
5842 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5843 if test $ac_cv_struct_tm = sys/time.h; then
5844   cat >> confdefs.h <<\EOF
5845 #define TM_IN_SYS_TIME 1
5846 EOF
5847
5848 fi
5849
5850 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5851 echo "configure:5852: checking for tm_zone in struct tm" >&5
5852 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855   cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858 #include <sys/types.h>
5859 #include <$ac_cv_struct_tm>
5860 int main() {
5861 struct tm tm; tm.tm_zone;
5862 ; return 0; }
5863 EOF
5864 if { (eval echo configure:5865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5865   rm -rf conftest*
5866   ac_cv_struct_tm_zone=yes
5867 else
5868   echo "configure: failed program was:" >&5
5869   cat conftest.$ac_ext >&5
5870   rm -rf conftest*
5871   ac_cv_struct_tm_zone=no
5872 fi
5873 rm -f conftest*
5874 fi
5875
5876 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5877 if test "$ac_cv_struct_tm_zone" = yes; then
5878   cat >> confdefs.h <<\EOF
5879 #define HAVE_TM_ZONE 1
5880 EOF
5881
5882 else
5883   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5884 echo "configure:5885: checking for tzname" >&5
5885 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5886   echo $ac_n "(cached) $ac_c" 1>&6
5887 else
5888   cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5891 #include <time.h>
5892 #ifndef tzname /* For SGI.  */
5893 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5894 #endif
5895 int main() {
5896 atoi(*tzname);
5897 ; return 0; }
5898 EOF
5899 if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5900   rm -rf conftest*
5901   ac_cv_var_tzname=yes
5902 else
5903   echo "configure: failed program was:" >&5
5904   cat conftest.$ac_ext >&5
5905   rm -rf conftest*
5906   ac_cv_var_tzname=no
5907 fi
5908 rm -f conftest*
5909 fi
5910
5911 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5912   if test $ac_cv_var_tzname = yes; then
5913     cat >> confdefs.h <<\EOF
5914 #define HAVE_TZNAME 1
5915 EOF
5916
5917   fi
5918 fi
5919
5920
5921 # It seems that that many machines where <utime.h> seems to be
5922 # broken just require something like -D_XXX_SOURCE, where XXX might
5923 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
5924
5925 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
5926 echo "configure:5927: checking for utime.h" >&5
5927 if eval "test \"`echo '$''{'tar_cv_header_utime_h'+set}'`\" = set"; then
5928   echo $ac_n "(cached) $ac_c" 1>&6
5929 else
5930   cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933
5934 #include <sys/types.h>
5935 #include <utime.h>
5936 int main() {
5937 struct utimbuf foo
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5941   rm -rf conftest*
5942   tar_cv_header_utime_h=yes
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   tar_cv_header_utime_h=no
5948 fi
5949 rm -f conftest*
5950 fi
5951
5952 echo "$ac_t""$tar_cv_header_utime_h" 1>&6
5953 test $tar_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
5954 #define HAVE_UTIME_H 1
5955 EOF
5956
5957
5958 echo $ac_n "checking for working const""... $ac_c" 1>&6
5959 echo "configure:5960: checking for working const" >&5
5960 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5961   echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963   cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966
5967 int main() {
5968
5969 /* Ultrix mips cc rejects this.  */
5970 typedef int charset[2]; const charset x;
5971 /* SunOS 4.1.1 cc rejects this.  */
5972 char const *const *ccp;
5973 char **p;
5974 /* NEC SVR4.0.2 mips cc rejects this.  */
5975 struct point {int x, y;};
5976 static struct point const zero = {0,0};
5977 /* AIX XL C 1.02.0.0 rejects this.
5978    It does not let you subtract one const X* pointer from another in an arm
5979    of an if-expression whose if-part is not a constant expression */
5980 const char *g = "string";
5981 ccp = &g + (g ? g-g : 0);
5982 /* HPUX 7.0 cc rejects these. */
5983 ++ccp;
5984 p = (char**) ccp;
5985 ccp = (char const *const *) p;
5986 { /* SCO 3.2v4 cc rejects this.  */
5987   char *t;
5988   char const *s = 0 ? (char *) 0 : (char const *) 0;
5989
5990   *t++ = 0;
5991 }
5992 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5993   int x[] = {25, 17};
5994   const int *foo = &x[0];
5995   ++foo;
5996 }
5997 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5998   typedef const int *iptr;
5999   iptr p = 0;
6000   ++p;
6001 }
6002 { /* AIX XL C 1.02.0.0 rejects this saying
6003      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6004   struct s { int j; const int *ap[3]; };
6005   struct s *b; b->j = 5;
6006 }
6007 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6008   const int foo = 10;
6009 }
6010
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6014   rm -rf conftest*
6015   ac_cv_c_const=yes
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   ac_cv_c_const=no
6021 fi
6022 rm -f conftest*
6023 fi
6024
6025 echo "$ac_t""$ac_cv_c_const" 1>&6
6026 if test $ac_cv_c_const = no; then
6027   cat >> confdefs.h <<\EOF
6028 #define const 
6029 EOF
6030
6031 fi
6032
6033
6034
6035 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
6036 echo "configure:6037: checking how to get filesystem type" >&5
6037 fstype=no
6038 # The order of these tests is important.
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042 #include <sys/statvfs.h>
6043 #include <sys/fstyp.h>
6044 EOF
6045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6046 { (eval echo configure:6047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6048 if test -z "$ac_err"; then
6049   rm -rf conftest*
6050   cat >> confdefs.h <<\EOF
6051 #define FSTYPE_STATVFS 1
6052 EOF
6053  fstype=SVR4
6054 else
6055   echo "$ac_err" >&5
6056   echo "configure: failed program was:" >&5
6057   cat conftest.$ac_ext >&5
6058 fi
6059 rm -f conftest*
6060 if test $fstype = no; then
6061 cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064 #include <sys/statfs.h>
6065 #include <sys/fstyp.h>
6066 EOF
6067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6068 { (eval echo configure:6069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6070 if test -z "$ac_err"; then
6071   rm -rf conftest*
6072   cat >> confdefs.h <<\EOF
6073 #define FSTYPE_USG_STATFS 1
6074 EOF
6075  fstype=SVR3
6076 else
6077   echo "$ac_err" >&5
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080 fi
6081 rm -f conftest*
6082 fi
6083 if test $fstype = no; then
6084 cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 #include <sys/statfs.h>
6088 #include <sys/vmount.h>
6089 EOF
6090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6091 { (eval echo configure:6092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6093 if test -z "$ac_err"; then
6094   rm -rf conftest*
6095   cat >> confdefs.h <<\EOF
6096 #define FSTYPE_AIX_STATFS 1
6097 EOF
6098  fstype=AIX
6099 else
6100   echo "$ac_err" >&5
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103 fi
6104 rm -f conftest*
6105 fi
6106 if test $fstype = no; then  
6107 cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110 #include <mntent.h>
6111 EOF
6112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6113 { (eval echo configure:6114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6115 if test -z "$ac_err"; then
6116   rm -rf conftest*
6117   cat >> confdefs.h <<\EOF
6118 #define FSTYPE_MNTENT 1
6119 EOF
6120  fstype=4.3BSD
6121 else
6122   echo "$ac_err" >&5
6123   echo "configure: failed program was:" >&5
6124   cat conftest.$ac_ext >&5
6125 fi
6126 rm -f conftest*
6127 fi
6128 if test $fstype = no; then  
6129 cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 #include <sys/mount.h>
6133 EOF
6134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6135   egrep "f_type;" >/dev/null 2>&1; then
6136   rm -rf conftest*
6137   cat >> confdefs.h <<\EOF
6138 #define FSTYPE_STATFS 1
6139 EOF
6140  fstype=4.4BSD/OSF1
6141 fi
6142 rm -f conftest*
6143
6144 fi
6145 if test $fstype = no; then  
6146 cat > conftest.$ac_ext <<EOF
6147 #line 6148 "configure"
6148 #include "confdefs.h"
6149 #include <sys/mount.h>
6150 #include <sys/fs_types.h>
6151 EOF
6152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6153 { (eval echo configure:6154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6155 if test -z "$ac_err"; then
6156   rm -rf conftest*
6157   cat >> confdefs.h <<\EOF
6158 #define FSTYPE_GETMNT 1
6159 EOF
6160  fstype=Ultrix
6161 else
6162   echo "$ac_err" >&5
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165 fi
6166 rm -f conftest*
6167 fi
6168 echo "$ac_t""$fstype" 1>&6
6169
6170 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6171 echo "configure:6172: checking return type of signal handlers" >&5
6172 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6173   echo $ac_n "(cached) $ac_c" 1>&6
6174 else
6175   cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178 #include <sys/types.h>
6179 #include <signal.h>
6180 #ifdef signal
6181 #undef signal
6182 #endif
6183 #ifdef __cplusplus
6184 extern "C" void (*signal (int, void (*)(int)))(int);
6185 #else
6186 void (*signal ()) ();
6187 #endif
6188
6189 int main() {
6190 int i;
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6194   rm -rf conftest*
6195   ac_cv_type_signal=void
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   ac_cv_type_signal=int
6201 fi
6202 rm -f conftest*
6203 fi
6204
6205 echo "$ac_t""$ac_cv_type_signal" 1>&6
6206 cat >> confdefs.h <<EOF
6207 #define RETSIGTYPE $ac_cv_type_signal
6208 EOF
6209
6210
6211
6212 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
6213 echo "configure:6214: checking for type of signal functions" >&5
6214 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
6215   echo $ac_n "(cached) $ac_c" 1>&6
6216 else
6217   
6218   cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 #include <signal.h>
6222 int main() {
6223
6224     sigset_t ss;
6225     struct sigaction sa;
6226     sigemptyset(&ss); sigsuspend(&ss);
6227     sigaction(SIGINT, &sa, (struct sigaction *) 0);
6228     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
6229   
6230 ; return 0; }
6231 EOF
6232 if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6233   rm -rf conftest*
6234   bash_cv_signal_vintage=posix
6235 else
6236   echo "configure: failed program was:" >&5
6237   cat conftest.$ac_ext >&5
6238   rm -rf conftest*
6239   
6240     cat > conftest.$ac_ext <<EOF
6241 #line 6242 "configure"
6242 #include "confdefs.h"
6243 #include <signal.h>
6244 int main() {
6245
6246         int mask = sigmask(SIGINT);
6247         sigsetmask(mask); sigblock(mask); sigpause(mask);
6248     
6249 ; return 0; }
6250 EOF
6251 if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6252   rm -rf conftest*
6253   bash_cv_signal_vintage=4.2bsd
6254 else
6255   echo "configure: failed program was:" >&5
6256   cat conftest.$ac_ext >&5
6257   rm -rf conftest*
6258   
6259       cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262
6263         #include <signal.h>
6264         RETSIGTYPE foo() { }
6265 int main() {
6266
6267                 int mask = sigmask(SIGINT);
6268                 sigset(SIGINT, foo); sigrelse(SIGINT);
6269                 sighold(SIGINT); sigpause(SIGINT);
6270         
6271 ; return 0; }
6272 EOF
6273 if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6274   rm -rf conftest*
6275   bash_cv_signal_vintage=svr3
6276 else
6277   echo "configure: failed program was:" >&5
6278   cat conftest.$ac_ext >&5
6279   rm -rf conftest*
6280   bash_cv_signal_vintage=v7
6281     
6282 fi
6283 rm -f conftest*
6284   
6285 fi
6286 rm -f conftest*
6287
6288 fi
6289 rm -f conftest*
6290
6291 fi
6292
6293 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
6294 if test "$bash_cv_signal_vintage" = posix; then
6295 cat >> confdefs.h <<\EOF
6296 #define HAVE_POSIX_SIGNALS 1
6297 EOF
6298
6299 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
6300 cat >> confdefs.h <<\EOF
6301 #define HAVE_BSD_SIGNALS 1
6302 EOF
6303
6304 elif test "$bash_cv_signal_vintage" = svr3; then
6305 cat >> confdefs.h <<\EOF
6306 #define HAVE_USG_SIGHOLD 1
6307 EOF
6308
6309 fi
6310
6311 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6312 echo "configure:6313: checking for mode_t" >&5
6313 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6314   echo $ac_n "(cached) $ac_c" 1>&6
6315 else
6316   cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319 #include <sys/types.h>
6320 #if STDC_HEADERS
6321 #include <stdlib.h>
6322 #include <stddef.h>
6323 #endif
6324 EOF
6325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6326   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6327   rm -rf conftest*
6328   ac_cv_type_mode_t=yes
6329 else
6330   rm -rf conftest*
6331   ac_cv_type_mode_t=no
6332 fi
6333 rm -f conftest*
6334
6335 fi
6336 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6337 if test $ac_cv_type_mode_t = no; then
6338   cat >> confdefs.h <<\EOF
6339 #define mode_t int
6340 EOF
6341
6342 fi
6343
6344 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6345 echo "configure:6346: checking for uid_t in sys/types.h" >&5
6346 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352 #include <sys/types.h>
6353 EOF
6354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6355   egrep "uid_t" >/dev/null 2>&1; then
6356   rm -rf conftest*
6357   ac_cv_type_uid_t=yes
6358 else
6359   rm -rf conftest*
6360   ac_cv_type_uid_t=no
6361 fi
6362 rm -f conftest*
6363
6364 fi
6365
6366 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6367 if test $ac_cv_type_uid_t = no; then
6368   cat >> confdefs.h <<\EOF
6369 #define uid_t int
6370 EOF
6371
6372   cat >> confdefs.h <<\EOF
6373 #define gid_t int
6374 EOF
6375
6376 fi
6377
6378 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6379 echo "configure:6380: checking for size_t" >&5
6380 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6381   echo $ac_n "(cached) $ac_c" 1>&6
6382 else
6383   cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386 #include <sys/types.h>
6387 #if STDC_HEADERS
6388 #include <stdlib.h>
6389 #include <stddef.h>
6390 #endif
6391 EOF
6392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6393   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6394   rm -rf conftest*
6395   ac_cv_type_size_t=yes
6396 else
6397   rm -rf conftest*
6398   ac_cv_type_size_t=no
6399 fi
6400 rm -f conftest*
6401
6402 fi
6403 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6404 if test $ac_cv_type_size_t = no; then
6405   cat >> confdefs.h <<\EOF
6406 #define size_t unsigned
6407 EOF
6408
6409 fi
6410
6411 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6412 echo "configure:6413: checking for pid_t" >&5
6413 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6414   echo $ac_n "(cached) $ac_c" 1>&6
6415 else
6416   cat > conftest.$ac_ext <<EOF
6417 #line 6418 "configure"
6418 #include "confdefs.h"
6419 #include <sys/types.h>
6420 #if STDC_HEADERS
6421 #include <stdlib.h>
6422 #include <stddef.h>
6423 #endif
6424 EOF
6425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6426   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6427   rm -rf conftest*
6428   ac_cv_type_pid_t=yes
6429 else
6430   rm -rf conftest*
6431   ac_cv_type_pid_t=no
6432 fi
6433 rm -f conftest*
6434
6435 fi
6436 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6437 if test $ac_cv_type_pid_t = no; then
6438   cat >> confdefs.h <<\EOF
6439 #define pid_t int
6440 EOF
6441
6442 fi
6443
6444 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6445 echo "configure:6446: checking for off_t" >&5
6446 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6447   echo $ac_n "(cached) $ac_c" 1>&6
6448 else
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <sys/types.h>
6453 #if STDC_HEADERS
6454 #include <stdlib.h>
6455 #include <stddef.h>
6456 #endif
6457 EOF
6458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6459   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6460   rm -rf conftest*
6461   ac_cv_type_off_t=yes
6462 else
6463   rm -rf conftest*
6464   ac_cv_type_off_t=no
6465 fi
6466 rm -f conftest*
6467
6468 fi
6469 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6470 if test $ac_cv_type_off_t = no; then
6471   cat >> confdefs.h <<\EOF
6472 #define off_t long
6473 EOF
6474
6475 fi
6476
6477 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
6478 echo "configure:6479: checking for ino_t" >&5
6479 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 #include <sys/types.h>
6486 #if STDC_HEADERS
6487 #include <stdlib.h>
6488 #include <stddef.h>
6489 #endif
6490 EOF
6491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6492   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6493   rm -rf conftest*
6494   ac_cv_type_ino_t=yes
6495 else
6496   rm -rf conftest*
6497   ac_cv_type_ino_t=no
6498 fi
6499 rm -f conftest*
6500
6501 fi
6502 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6503 if test $ac_cv_type_ino_t = no; then
6504   cat >> confdefs.h <<\EOF
6505 #define ino_t unsigned long
6506 EOF
6507
6508 fi
6509
6510 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
6511 echo "configure:6512: checking for dev_t" >&5
6512 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6513   echo $ac_n "(cached) $ac_c" 1>&6
6514 else
6515   cat > conftest.$ac_ext <<EOF
6516 #line 6517 "configure"
6517 #include "confdefs.h"
6518 #include <sys/types.h>
6519 #if STDC_HEADERS
6520 #include <stdlib.h>
6521 #include <stddef.h>
6522 #endif
6523 EOF
6524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6525   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6526   rm -rf conftest*
6527   ac_cv_type_dev_t=yes
6528 else
6529   rm -rf conftest*
6530   ac_cv_type_dev_t=no
6531 fi
6532 rm -f conftest*
6533
6534 fi
6535 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6536 if test $ac_cv_type_dev_t = no; then
6537   cat >> confdefs.h <<\EOF
6538 #define dev_t unsigned long
6539 EOF
6540
6541 fi
6542
6543 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
6544 echo "configure:6545: checking for daddr_t" >&5
6545 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 #include <sys/types.h>
6552 #if STDC_HEADERS
6553 #include <stdlib.h>
6554 #include <stddef.h>
6555 #endif
6556 EOF
6557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6558   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6559   rm -rf conftest*
6560   ac_cv_type_daddr_t=yes
6561 else
6562   rm -rf conftest*
6563   ac_cv_type_daddr_t=no
6564 fi
6565 rm -f conftest*
6566
6567 fi
6568 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
6569 if test $ac_cv_type_daddr_t = no; then
6570   cat >> confdefs.h <<\EOF
6571 #define daddr_t long
6572 EOF
6573
6574 fi
6575
6576 echo $ac_n "checking for major_t""... $ac_c" 1>&6
6577 echo "configure:6578: checking for major_t" >&5
6578 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581   cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 #include <sys/types.h>
6585 #if STDC_HEADERS
6586 #include <stdlib.h>
6587 #include <stddef.h>
6588 #endif
6589 EOF
6590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6591   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6592   rm -rf conftest*
6593   ac_cv_type_major_t=yes
6594 else
6595   rm -rf conftest*
6596   ac_cv_type_major_t=no
6597 fi
6598 rm -f conftest*
6599
6600 fi
6601 echo "$ac_t""$ac_cv_type_major_t" 1>&6
6602 if test $ac_cv_type_major_t = no; then
6603   cat >> confdefs.h <<\EOF
6604 #define major_t int
6605 EOF
6606
6607 fi
6608
6609 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
6610 echo "configure:6611: checking for minor_t" >&5
6611 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
6612   echo $ac_n "(cached) $ac_c" 1>&6
6613 else
6614   cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 #include <sys/types.h>
6618 #if STDC_HEADERS
6619 #include <stdlib.h>
6620 #include <stddef.h>
6621 #endif
6622 EOF
6623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6624   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6625   rm -rf conftest*
6626   ac_cv_type_minor_t=yes
6627 else
6628   rm -rf conftest*
6629   ac_cv_type_minor_t=no
6630 fi
6631 rm -f conftest*
6632
6633 fi
6634 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
6635 if test $ac_cv_type_minor_t = no; then
6636   cat >> confdefs.h <<\EOF
6637 #define minor_t int
6638 EOF
6639
6640 fi
6641
6642 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
6643 echo "configure:6644: checking for ssize_t" >&5
6644 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
6645   echo $ac_n "(cached) $ac_c" 1>&6
6646 else
6647   cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 #include <sys/types.h>
6651 #if STDC_HEADERS
6652 #include <stdlib.h>
6653 #include <stddef.h>
6654 #endif
6655 EOF
6656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6657   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6658   rm -rf conftest*
6659   ac_cv_type_ssize_t=yes
6660 else
6661   rm -rf conftest*
6662   ac_cv_type_ssize_t=no
6663 fi
6664 rm -f conftest*
6665
6666 fi
6667 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
6668 if test $ac_cv_type_ssize_t = no; then
6669   cat >> confdefs.h <<\EOF
6670 #define ssize_t int
6671 EOF
6672
6673 fi
6674
6675 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6676 echo "configure:6677: checking for st_blocks in struct stat" >&5
6677 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 #include <sys/types.h>
6684 #include <sys/stat.h>
6685 int main() {
6686 struct stat s; s.st_blocks;
6687 ; return 0; }
6688 EOF
6689 if { (eval echo configure:6690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6690   rm -rf conftest*
6691   ac_cv_struct_st_blocks=yes
6692 else
6693   echo "configure: failed program was:" >&5
6694   cat conftest.$ac_ext >&5
6695   rm -rf conftest*
6696   ac_cv_struct_st_blocks=no
6697 fi
6698 rm -f conftest*
6699 fi
6700
6701 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6702 if test $ac_cv_struct_st_blocks = yes; then
6703   cat >> confdefs.h <<\EOF
6704 #define HAVE_ST_BLOCKS 1
6705 EOF
6706
6707 else
6708   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6709 fi
6710
6711 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
6712 echo "configure:6713: checking for st_rdev in struct stat" >&5
6713 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 #include <sys/types.h>
6720 #include <sys/stat.h>
6721 int main() {
6722 struct stat s; s.st_rdev;
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726   rm -rf conftest*
6727   ac_cv_struct_st_rdev=yes
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   ac_cv_struct_st_rdev=no
6733 fi
6734 rm -f conftest*
6735 fi
6736
6737 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
6738 if test $ac_cv_struct_st_rdev = yes; then
6739   cat >> confdefs.h <<\EOF
6740 #define HAVE_ST_RDEV 1
6741 EOF
6742
6743 fi
6744
6745 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6746 echo "configure:6747: checking whether struct tm is in sys/time.h or time.h" >&5
6747 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6748   echo $ac_n "(cached) $ac_c" 1>&6
6749 else
6750   cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 #include <sys/types.h>
6754 #include <time.h>
6755 int main() {
6756 struct tm *tp; tp->tm_sec;
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6760   rm -rf conftest*
6761   ac_cv_struct_tm=time.h
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   ac_cv_struct_tm=sys/time.h
6767 fi
6768 rm -f conftest*
6769 fi
6770
6771 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6772 if test $ac_cv_struct_tm = sys/time.h; then
6773   cat >> confdefs.h <<\EOF
6774 #define TM_IN_SYS_TIME 1
6775 EOF
6776
6777 fi
6778
6779 echo $ac_n "checking for working const""... $ac_c" 1>&6
6780 echo "configure:6781: checking for working const" >&5
6781 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6782   echo $ac_n "(cached) $ac_c" 1>&6
6783 else
6784   cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787
6788 int main() {
6789
6790 /* Ultrix mips cc rejects this.  */
6791 typedef int charset[2]; const charset x;
6792 /* SunOS 4.1.1 cc rejects this.  */
6793 char const *const *ccp;
6794 char **p;
6795 /* NEC SVR4.0.2 mips cc rejects this.  */
6796 struct point {int x, y;};
6797 static struct point const zero = {0,0};
6798 /* AIX XL C 1.02.0.0 rejects this.
6799    It does not let you subtract one const X* pointer from another in an arm
6800    of an if-expression whose if-part is not a constant expression */
6801 const char *g = "string";
6802 ccp = &g + (g ? g-g : 0);
6803 /* HPUX 7.0 cc rejects these. */
6804 ++ccp;
6805 p = (char**) ccp;
6806 ccp = (char const *const *) p;
6807 { /* SCO 3.2v4 cc rejects this.  */
6808   char *t;
6809   char const *s = 0 ? (char *) 0 : (char const *) 0;
6810
6811   *t++ = 0;
6812 }
6813 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6814   int x[] = {25, 17};
6815   const int *foo = &x[0];
6816   ++foo;
6817 }
6818 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6819   typedef const int *iptr;
6820   iptr p = 0;
6821   ++p;
6822 }
6823 { /* AIX XL C 1.02.0.0 rejects this saying
6824      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6825   struct s { int j; const int *ap[3]; };
6826   struct s *b; b->j = 5;
6827 }
6828 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6829   const int foo = 10;
6830 }
6831
6832 ; return 0; }
6833 EOF
6834 if { (eval echo configure:6835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6835   rm -rf conftest*
6836   ac_cv_c_const=yes
6837 else
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -rf conftest*
6841   ac_cv_c_const=no
6842 fi
6843 rm -f conftest*
6844 fi
6845
6846 echo "$ac_t""$ac_cv_c_const" 1>&6
6847 if test $ac_cv_c_const = no; then
6848   cat >> confdefs.h <<\EOF
6849 #define const 
6850 EOF
6851
6852 fi
6853
6854
6855
6856 echo $ac_n "checking size of char""... $ac_c" 1>&6
6857 echo "configure:6858: checking size of char" >&5
6858 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   if test "$cross_compiling" = yes; then
6862   ac_cv_sizeof_char=1
6863 else
6864   cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 #include <stdio.h>
6868 int main()
6869 {
6870   FILE *f=fopen("conftestval", "w");
6871   if (!f) return(1);
6872   fprintf(f, "%d\n", sizeof(char));
6873   return(0);
6874 }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6877 then
6878   ac_cv_sizeof_char=`cat conftestval`
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -fr conftest*
6883   ac_cv_sizeof_char=0
6884 fi
6885 rm -fr conftest*
6886 fi
6887
6888 fi
6889 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
6890 cat >> confdefs.h <<EOF
6891 #define SIZEOF_CHAR $ac_cv_sizeof_char
6892 EOF
6893
6894
6895 echo $ac_n "checking size of short int""... $ac_c" 1>&6
6896 echo "configure:6897: checking size of short int" >&5
6897 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
6898   echo $ac_n "(cached) $ac_c" 1>&6
6899 else
6900   if test "$cross_compiling" = yes; then
6901   ac_cv_sizeof_short_int=2
6902 else
6903   cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <stdio.h>
6907 int main()
6908 {
6909   FILE *f=fopen("conftestval", "w");
6910   if (!f) return(1);
6911   fprintf(f, "%d\n", sizeof(short int));
6912   return(0);
6913 }
6914 EOF
6915 if { (eval echo configure:6916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6916 then
6917   ac_cv_sizeof_short_int=`cat conftestval`
6918 else
6919   echo "configure: failed program was:" >&5
6920   cat conftest.$ac_ext >&5
6921   rm -fr conftest*
6922   ac_cv_sizeof_short_int=0
6923 fi
6924 rm -fr conftest*
6925 fi
6926
6927 fi
6928 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
6929 cat >> confdefs.h <<EOF
6930 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
6931 EOF
6932
6933
6934 echo $ac_n "checking size of int""... $ac_c" 1>&6
6935 echo "configure:6936: checking size of int" >&5
6936 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939   if test "$cross_compiling" = yes; then
6940   ac_cv_sizeof_int=4
6941 else
6942   cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945 #include <stdio.h>
6946 int main()
6947 {
6948   FILE *f=fopen("conftestval", "w");
6949   if (!f) return(1);
6950   fprintf(f, "%d\n", sizeof(int));
6951   return(0);
6952 }
6953 EOF
6954 if { (eval echo configure:6955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6955 then
6956   ac_cv_sizeof_int=`cat conftestval`
6957 else
6958   echo "configure: failed program was:" >&5
6959   cat conftest.$ac_ext >&5
6960   rm -fr conftest*
6961   ac_cv_sizeof_int=0
6962 fi
6963 rm -fr conftest*
6964 fi
6965
6966 fi
6967 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
6968 cat >> confdefs.h <<EOF
6969 #define SIZEOF_INT $ac_cv_sizeof_int
6970 EOF
6971
6972
6973 echo $ac_n "checking size of long int""... $ac_c" 1>&6
6974 echo "configure:6975: checking size of long int" >&5
6975 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
6976   echo $ac_n "(cached) $ac_c" 1>&6
6977 else
6978   if test "$cross_compiling" = yes; then
6979   ac_cv_sizeof_long_int=4
6980 else
6981   cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 #include <stdio.h>
6985 int main()
6986 {
6987   FILE *f=fopen("conftestval", "w");
6988   if (!f) return(1);
6989   fprintf(f, "%d\n", sizeof(long int));
6990   return(0);
6991 }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6994 then
6995   ac_cv_sizeof_long_int=`cat conftestval`
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -fr conftest*
7000   ac_cv_sizeof_long_int=0
7001 fi
7002 rm -fr conftest*
7003 fi
7004
7005 fi
7006 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
7007 cat >> confdefs.h <<EOF
7008 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
7009 EOF
7010
7011
7012 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
7013 echo "configure:7014: checking size of long long int" >&5
7014 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
7015   echo $ac_n "(cached) $ac_c" 1>&6
7016 else
7017   if test "$cross_compiling" = yes; then
7018   ac_cv_sizeof_long_long_int=8
7019 else
7020   cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023 #include <stdio.h>
7024 int main()
7025 {
7026   FILE *f=fopen("conftestval", "w");
7027   if (!f) return(1);
7028   fprintf(f, "%d\n", sizeof(long long int));
7029   return(0);
7030 }
7031 EOF
7032 if { (eval echo configure:7033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7033 then
7034   ac_cv_sizeof_long_long_int=`cat conftestval`
7035 else
7036   echo "configure: failed program was:" >&5
7037   cat conftest.$ac_ext >&5
7038   rm -fr conftest*
7039   ac_cv_sizeof_long_long_int=0
7040 fi
7041 rm -fr conftest*
7042 fi
7043
7044 fi
7045 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
7046 cat >> confdefs.h <<EOF
7047 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
7048 EOF
7049
7050
7051 echo $ac_n "checking size of int *""... $ac_c" 1>&6
7052 echo "configure:7053: checking size of int *" >&5
7053 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
7054   echo $ac_n "(cached) $ac_c" 1>&6
7055 else
7056   if test "$cross_compiling" = yes; then
7057   ac_cv_sizeof_int_p=4
7058 else
7059   cat > conftest.$ac_ext <<EOF
7060 #line 7061 "configure"
7061 #include "confdefs.h"
7062 #include <stdio.h>
7063 int main()
7064 {
7065   FILE *f=fopen("conftestval", "w");
7066   if (!f) return(1);
7067   fprintf(f, "%d\n", sizeof(int *));
7068   return(0);
7069 }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7072 then
7073   ac_cv_sizeof_int_p=`cat conftestval`
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -fr conftest*
7078   ac_cv_sizeof_int_p=0
7079 fi
7080 rm -fr conftest*
7081 fi
7082
7083 fi
7084 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
7085 cat >> confdefs.h <<EOF
7086 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
7087 EOF
7088
7089
7090
7091 # Check for sys/types.h types
7092 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
7093 echo "configure:7094: checking for u_int type" >&5
7094 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   
7098     cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101  #include <sys/types.h> 
7102 int main() {
7103  u_int a; a = 1;
7104 ; return 0; }
7105 EOF
7106 if { (eval echo configure:7107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7107   rm -rf conftest*
7108    ac_cv_have_u_int="yes" 
7109 else
7110   echo "configure: failed program was:" >&5
7111   cat conftest.$ac_ext >&5
7112   rm -rf conftest*
7113    ac_cv_have_u_int="no" 
7114     
7115 fi
7116 rm -f conftest*
7117
7118 fi
7119
7120 echo "$ac_t""$ac_cv_have_u_int" 1>&6
7121 if test "x$ac_cv_have_u_int" = "xyes" ; then
7122    cat >> confdefs.h <<\EOF
7123 #define HAVE_U_INT 1
7124 EOF
7125
7126    have_u_int=1
7127 fi
7128
7129 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
7130 echo "configure:7131: checking for intmax_t type" >&5
7131 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
7132   echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134   
7135    cat > conftest.$ac_ext <<EOF
7136 #line 7137 "configure"
7137 #include "confdefs.h"
7138  #include <sys/types.h> 
7139 int main() {
7140  intmax_t a; a = 1;
7141 ; return 0; }
7142 EOF
7143 if { (eval echo configure:7144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7144   rm -rf conftest*
7145    ac_cv_have_intmax_t="yes" 
7146 else
7147   echo "configure: failed program was:" >&5
7148   cat conftest.$ac_ext >&5
7149   rm -rf conftest*
7150    
7151          cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154  #include <stdint.h> 
7155 int main() {
7156  intmax_t a; a = 1;
7157 ; return 0; }
7158 EOF
7159 if { (eval echo configure:7160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7160   rm -rf conftest*
7161    ac_cv_have_intmax_t="yes" 
7162 else
7163   echo "configure: failed program was:" >&5
7164   cat conftest.$ac_ext >&5
7165   rm -rf conftest*
7166    ac_cv_have_intmax_t="no" 
7167          
7168 fi
7169 rm -f conftest*
7170       
7171    
7172 fi
7173 rm -f conftest*     
7174
7175
7176 fi
7177
7178 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
7179 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
7180    cat >> confdefs.h <<\EOF
7181 #define HAVE_INTMAX_T 1
7182 EOF
7183
7184    have_intmax_t=1
7185 fi
7186
7187
7188 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
7189 echo "configure:7190: checking for u_intmax_t type" >&5
7190 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   
7194    cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197  #include <sys/types.h> 
7198 int main() {
7199  u_intmax_t a; a = 1;
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7203   rm -rf conftest*
7204    ac_cv_have_u_intmax_t="yes" 
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209    
7210          cat > conftest.$ac_ext <<EOF
7211 #line 7212 "configure"
7212 #include "confdefs.h"
7213  #include <stdint.h> 
7214 int main() {
7215  u_intmax_t a; a = 1;
7216 ; return 0; }
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7219   rm -rf conftest*
7220    ac_cv_have_u_intmax_t="yes" 
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225    ac_cv_have_u_intmax_t="no" 
7226          
7227 fi
7228 rm -f conftest*
7229       
7230    
7231 fi
7232 rm -f conftest*
7233
7234 fi
7235
7236 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
7237 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
7238    cat >> confdefs.h <<\EOF
7239 #define HAVE_U_INTMAX_T 1
7240 EOF
7241
7242    have_u_intmax_t=1
7243 fi
7244
7245
7246 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
7247 echo "configure:7248: checking for intXX_t types" >&5
7248 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
7249   echo $ac_n "(cached) $ac_c" 1>&6
7250 else
7251   
7252    cat > conftest.$ac_ext <<EOF
7253 #line 7254 "configure"
7254 #include "confdefs.h"
7255  #include <sys/types.h> 
7256 int main() {
7257  int8_t a; int16_t b; int32_t c; a = b = c = 1;
7258 ; return 0; }
7259 EOF
7260 if { (eval echo configure:7261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7261   rm -rf conftest*
7262    ac_cv_have_intxx_t="yes" 
7263 else
7264   echo "configure: failed program was:" >&5
7265   cat conftest.$ac_ext >&5
7266   rm -rf conftest*
7267    ac_cv_have_intxx_t="no" 
7268    
7269 fi
7270 rm -f conftest*
7271
7272 fi
7273
7274 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
7275 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
7276    cat >> confdefs.h <<\EOF
7277 #define HAVE_INTXX_T 1
7278 EOF
7279
7280    have_intxx_t=1
7281 fi
7282         
7283 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
7284 echo "configure:7285: checking for int64_t type" >&5
7285 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
7286   echo $ac_n "(cached) $ac_c" 1>&6
7287 else
7288   
7289    cat > conftest.$ac_ext <<EOF
7290 #line 7291 "configure"
7291 #include "confdefs.h"
7292  #include <sys/types.h> 
7293 int main() {
7294  int64_t a; a = 1;
7295 ; return 0; }
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7298   rm -rf conftest*
7299    ac_cv_have_int64_t="yes" 
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -rf conftest*
7304    ac_cv_have_int64_t="no" 
7305    
7306 fi
7307 rm -f conftest*
7308
7309 fi
7310
7311 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
7312 if test "x$ac_cv_have_int64_t" = "xyes" ; then
7313    cat >> confdefs.h <<\EOF
7314 #define HAVE_INT64_T 1
7315 EOF
7316
7317    have_int64_t=1
7318 fi
7319         
7320 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
7321 echo "configure:7322: checking for u_intXX_t types" >&5
7322 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
7323   echo $ac_n "(cached) $ac_c" 1>&6
7324 else
7325   
7326    cat > conftest.$ac_ext <<EOF
7327 #line 7328 "configure"
7328 #include "confdefs.h"
7329  #include <sys/types.h> 
7330 int main() {
7331  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
7332 ; return 0; }
7333 EOF
7334 if { (eval echo configure:7335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7335   rm -rf conftest*
7336    ac_cv_have_u_intxx_t="yes" 
7337 else
7338   echo "configure: failed program was:" >&5
7339   cat conftest.$ac_ext >&5
7340   rm -rf conftest*
7341    ac_cv_have_u_intxx_t="no" 
7342    
7343 fi
7344 rm -f conftest*
7345
7346 fi
7347
7348 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
7349 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
7350    cat >> confdefs.h <<\EOF
7351 #define HAVE_U_INTXX_T 1
7352 EOF
7353
7354    have_u_intxx_t=1
7355 fi
7356
7357 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
7358 echo "configure:7359: checking for u_int64_t types" >&5
7359 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
7360   echo $ac_n "(cached) $ac_c" 1>&6
7361 else
7362   
7363    cat > conftest.$ac_ext <<EOF
7364 #line 7365 "configure"
7365 #include "confdefs.h"
7366  #include <sys/types.h> 
7367 int main() {
7368  u_int64_t a; a = 1;
7369 ; return 0; }
7370 EOF
7371 if { (eval echo configure:7372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7372   rm -rf conftest*
7373    ac_cv_have_u_int64_t="yes" 
7374 else
7375   echo "configure: failed program was:" >&5
7376   cat conftest.$ac_ext >&5
7377   rm -rf conftest*
7378    ac_cv_have_u_int64_t="no" 
7379    
7380 fi
7381 rm -f conftest*
7382
7383 fi
7384
7385 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
7386 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
7387    cat >> confdefs.h <<\EOF
7388 #define HAVE_U_INT64_T 1
7389 EOF
7390
7391    have_u_int64_t=1
7392 fi
7393
7394 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
7395            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
7396 then
7397    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
7398 echo "configure:7399: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
7399    cat > conftest.$ac_ext <<EOF
7400 #line 7401 "configure"
7401 #include "confdefs.h"
7402  #include <sys/bitypes.h>  
7403 int main() {
7404  int8_t a; int16_t b; int32_t c;
7405         u_int8_t e; u_int16_t f; u_int32_t g;
7406         a = b = c = e = f = g = 1;  
7407 ; return 0; }
7408 EOF
7409 if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7410   rm -rf conftest*
7411    cat >> confdefs.h <<\EOF
7412 #define HAVE_U_INTXX_T 1
7413 EOF
7414
7415         cat >> confdefs.h <<\EOF
7416 #define HAVE_INTXX_T 1
7417 EOF
7418
7419         cat >> confdefs.h <<\EOF
7420 #define HAVE_SYS_BITYPES_H 1
7421 EOF
7422
7423         echo "$ac_t""yes" 1>&6 
7424 else
7425   echo "configure: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   rm -rf conftest*
7428    echo "$ac_t""no" 1>&6
7429    
7430 fi
7431 rm -f conftest* 
7432 fi
7433
7434 if test -z "$have_u_intxx_t" ; then
7435    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
7436 echo "configure:7437: checking for uintXX_t types" >&5
7437 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
7438   echo $ac_n "(cached) $ac_c" 1>&6
7439 else
7440   
7441       cat > conftest.$ac_ext <<EOF
7442 #line 7443 "configure"
7443 #include "confdefs.h"
7444  #include <sys/types.h> 
7445 int main() {
7446  uint8_t a; uint16_t b; 
7447            uint32_t c; a = b = c = 1; 
7448 ; return 0; }
7449 EOF
7450 if { (eval echo configure:7451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7451   rm -rf conftest*
7452    ac_cv_have_uintxx_t="yes" 
7453 else
7454   echo "configure: failed program was:" >&5
7455   cat conftest.$ac_ext >&5
7456   rm -rf conftest*
7457    ac_cv_have_uintxx_t="no" 
7458       
7459 fi
7460 rm -f conftest*
7461    
7462 fi
7463
7464 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
7465    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
7466       cat >> confdefs.h <<\EOF
7467 #define HAVE_UINTXX_T 1
7468 EOF
7469
7470    fi
7471 fi
7472
7473
7474 for ac_func in \
7475         fork \
7476         getcwd \
7477         gethostname \
7478         getpid \
7479         setpgid \
7480         setpgrp \
7481         setsid \
7482         signal \
7483         strerror \
7484         strncmp \
7485         strncpy \
7486         vfprintf \
7487         
7488 do
7489 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7490 echo "configure:7491: checking for $ac_func" >&5
7491 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7492   echo $ac_n "(cached) $ac_c" 1>&6
7493 else
7494   cat > conftest.$ac_ext <<EOF
7495 #line 7496 "configure"
7496 #include "confdefs.h"
7497 /* System header to define __stub macros and hopefully few prototypes,
7498     which can conflict with char $ac_func(); below.  */
7499 #include <assert.h>
7500 /* Override any gcc2 internal prototype to avoid an error.  */
7501 /* We use char because int might match the return type of a gcc2
7502     builtin and then its argument prototype would still apply.  */
7503 char $ac_func();
7504
7505 int main() {
7506
7507 /* The GNU C library defines this for functions which it implements
7508     to always fail with ENOSYS.  Some functions are actually named
7509     something starting with __ and the normal name is an alias.  */
7510 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7511 choke me
7512 #else
7513 $ac_func();
7514 #endif
7515
7516 ; return 0; }
7517 EOF
7518 if { (eval echo configure:7519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7519   rm -rf conftest*
7520   eval "ac_cv_func_$ac_func=yes"
7521 else
7522   echo "configure: failed program was:" >&5
7523   cat conftest.$ac_ext >&5
7524   rm -rf conftest*
7525   eval "ac_cv_func_$ac_func=no"
7526 fi
7527 rm -f conftest*
7528 fi
7529
7530 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7531   echo "$ac_t""yes" 1>&6
7532     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7533   cat >> confdefs.h <<EOF
7534 #define $ac_tr_func 1
7535 EOF
7536  
7537 else
7538   echo "$ac_t""no" 1>&6
7539 echo 'configure: cannot find needed function.'; exit 1
7540
7541 fi
7542 done
7543
7544
7545 for ac_func in fchdir
7546 do
7547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7548 echo "configure:7549: checking for $ac_func" >&5
7549 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7550   echo $ac_n "(cached) $ac_c" 1>&6
7551 else
7552   cat > conftest.$ac_ext <<EOF
7553 #line 7554 "configure"
7554 #include "confdefs.h"
7555 /* System header to define __stub macros and hopefully few prototypes,
7556     which can conflict with char $ac_func(); below.  */
7557 #include <assert.h>
7558 /* Override any gcc2 internal prototype to avoid an error.  */
7559 /* We use char because int might match the return type of a gcc2
7560     builtin and then its argument prototype would still apply.  */
7561 char $ac_func();
7562
7563 int main() {
7564
7565 /* The GNU C library defines this for functions which it implements
7566     to always fail with ENOSYS.  Some functions are actually named
7567     something starting with __ and the normal name is an alias.  */
7568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7569 choke me
7570 #else
7571 $ac_func();
7572 #endif
7573
7574 ; return 0; }
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7577   rm -rf conftest*
7578   eval "ac_cv_func_$ac_func=yes"
7579 else
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -rf conftest*
7583   eval "ac_cv_func_$ac_func=no"
7584 fi
7585 rm -f conftest*
7586 fi
7587
7588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7589   echo "$ac_t""yes" 1>&6
7590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7591   cat >> confdefs.h <<EOF
7592 #define $ac_tr_func 1
7593 EOF
7594  cat >> confdefs.h <<\EOF
7595 #define HAVE_FCHDIR 1
7596 EOF
7597
7598 else
7599   echo "$ac_t""no" 1>&6
7600 fi
7601 done
7602
7603
7604 for ac_func in snprintf vsnprintf gethostid getdomainname
7605 do
7606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7607 echo "configure:7608: checking for $ac_func" >&5
7608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7609   echo $ac_n "(cached) $ac_c" 1>&6
7610 else
7611   cat > conftest.$ac_ext <<EOF
7612 #line 7613 "configure"
7613 #include "confdefs.h"
7614 /* System header to define __stub macros and hopefully few prototypes,
7615     which can conflict with char $ac_func(); below.  */
7616 #include <assert.h>
7617 /* Override any gcc2 internal prototype to avoid an error.  */
7618 /* We use char because int might match the return type of a gcc2
7619     builtin and then its argument prototype would still apply.  */
7620 char $ac_func();
7621
7622 int main() {
7623
7624 /* The GNU C library defines this for functions which it implements
7625     to always fail with ENOSYS.  Some functions are actually named
7626     something starting with __ and the normal name is an alias.  */
7627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7628 choke me
7629 #else
7630 $ac_func();
7631 #endif
7632
7633 ; return 0; }
7634 EOF
7635 if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7636   rm -rf conftest*
7637   eval "ac_cv_func_$ac_func=yes"
7638 else
7639   echo "configure: failed program was:" >&5
7640   cat conftest.$ac_ext >&5
7641   rm -rf conftest*
7642   eval "ac_cv_func_$ac_func=no"
7643 fi
7644 rm -f conftest*
7645 fi
7646
7647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7648   echo "$ac_t""yes" 1>&6
7649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7650   cat >> confdefs.h <<EOF
7651 #define $ac_tr_func 1
7652 EOF
7653  
7654 else
7655   echo "$ac_t""no" 1>&6
7656 fi
7657 done
7658
7659
7660 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
7661 do
7662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7663 echo "configure:7664: checking for $ac_func" >&5
7664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7665   echo $ac_n "(cached) $ac_c" 1>&6
7666 else
7667   cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* System header to define __stub macros and hopefully few prototypes,
7671     which can conflict with char $ac_func(); below.  */
7672 #include <assert.h>
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 /* We use char because int might match the return type of a gcc2
7675     builtin and then its argument prototype would still apply.  */
7676 char $ac_func();
7677
7678 int main() {
7679
7680 /* The GNU C library defines this for functions which it implements
7681     to always fail with ENOSYS.  Some functions are actually named
7682     something starting with __ and the normal name is an alias.  */
7683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7684 choke me
7685 #else
7686 $ac_func();
7687 #endif
7688
7689 ; return 0; }
7690 EOF
7691 if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7692   rm -rf conftest*
7693   eval "ac_cv_func_$ac_func=yes"
7694 else
7695   echo "configure: failed program was:" >&5
7696   cat conftest.$ac_ext >&5
7697   rm -rf conftest*
7698   eval "ac_cv_func_$ac_func=no"
7699 fi
7700 rm -f conftest*
7701 fi
7702
7703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7704   echo "$ac_t""yes" 1>&6
7705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7706   cat >> confdefs.h <<EOF
7707 #define $ac_tr_func 1
7708 EOF
7709  
7710 else
7711   echo "$ac_t""no" 1>&6
7712 fi
7713 done
7714
7715
7716 # If resolver functions are not in libc check for -lnsl or -lresolv.
7717 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
7718 echo "configure:7719: checking for gethostbyname_r" >&5
7719 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
7720   echo $ac_n "(cached) $ac_c" 1>&6
7721 else
7722   cat > conftest.$ac_ext <<EOF
7723 #line 7724 "configure"
7724 #include "confdefs.h"
7725 /* System header to define __stub macros and hopefully few prototypes,
7726     which can conflict with char gethostbyname_r(); below.  */
7727 #include <assert.h>
7728 /* Override any gcc2 internal prototype to avoid an error.  */
7729 /* We use char because int might match the return type of a gcc2
7730     builtin and then its argument prototype would still apply.  */
7731 char gethostbyname_r();
7732
7733 int main() {
7734
7735 /* The GNU C library defines this for functions which it implements
7736     to always fail with ENOSYS.  Some functions are actually named
7737     something starting with __ and the normal name is an alias.  */
7738 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
7739 choke me
7740 #else
7741 gethostbyname_r();
7742 #endif
7743
7744 ; return 0; }
7745 EOF
7746 if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7747   rm -rf conftest*
7748   eval "ac_cv_func_gethostbyname_r=yes"
7749 else
7750   echo "configure: failed program was:" >&5
7751   cat conftest.$ac_ext >&5
7752   rm -rf conftest*
7753   eval "ac_cv_func_gethostbyname_r=no"
7754 fi
7755 rm -f conftest*
7756 fi
7757
7758 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
7759   echo "$ac_t""yes" 1>&6
7760   echo "$ac_t""using libc's resolver" 1>&6
7761 else
7762   echo "$ac_t""no" 1>&6
7763 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
7764 echo "configure:7765: checking for gethostbyname_r in -lnsl" >&5
7765 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
7766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769   ac_save_LIBS="$LIBS"
7770 LIBS="-lnsl  $LIBS"
7771 cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 /* Override any gcc2 internal prototype to avoid an error.  */
7775 /* We use char because int might match the return type of a gcc2
7776     builtin and then its argument prototype would still apply.  */
7777 char gethostbyname_r();
7778
7779 int main() {
7780 gethostbyname_r()
7781 ; return 0; }
7782 EOF
7783 if { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7784   rm -rf conftest*
7785   eval "ac_cv_lib_$ac_lib_var=yes"
7786 else
7787   echo "configure: failed program was:" >&5
7788   cat conftest.$ac_ext >&5
7789   rm -rf conftest*
7790   eval "ac_cv_lib_$ac_lib_var=no"
7791 fi
7792 rm -f conftest*
7793 LIBS="$ac_save_LIBS"
7794
7795 fi
7796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7797   echo "$ac_t""yes" 1>&6
7798     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
7799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7800   cat >> confdefs.h <<EOF
7801 #define $ac_tr_lib 1
7802 EOF
7803
7804   LIBS="-lnsl $LIBS"
7805
7806 else
7807   echo "$ac_t""no" 1>&6
7808 fi
7809
7810     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
7811 echo "configure:7812: checking for gethostbyname_r in -lresolv" >&5
7812 ac_lib_var=`echo resolv'_'gethostbyname_r | sed 'y%./+-%__p_%'`
7813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7814   echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816   ac_save_LIBS="$LIBS"
7817 LIBS="-lresolv  $LIBS"
7818 cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* Override any gcc2 internal prototype to avoid an error.  */
7822 /* We use char because int might match the return type of a gcc2
7823     builtin and then its argument prototype would still apply.  */
7824 char gethostbyname_r();
7825
7826 int main() {
7827 gethostbyname_r()
7828 ; return 0; }
7829 EOF
7830 if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7831   rm -rf conftest*
7832   eval "ac_cv_lib_$ac_lib_var=yes"
7833 else
7834   echo "configure: failed program was:" >&5
7835   cat conftest.$ac_ext >&5
7836   rm -rf conftest*
7837   eval "ac_cv_lib_$ac_lib_var=no"
7838 fi
7839 rm -f conftest*
7840 LIBS="$ac_save_LIBS"
7841
7842 fi
7843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7844   echo "$ac_t""yes" 1>&6
7845     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
7846     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7847   cat >> confdefs.h <<EOF
7848 #define $ac_tr_lib 1
7849 EOF
7850
7851   LIBS="-lresolv $LIBS"
7852
7853 else
7854   echo "$ac_t""no" 1>&6
7855 fi
7856
7857 fi
7858
7859
7860
7861 # Find where sockets are (especially for Solaris)
7862 echo $ac_n "checking for socket""... $ac_c" 1>&6
7863 echo "configure:7864: checking for socket" >&5
7864 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7865   echo $ac_n "(cached) $ac_c" 1>&6
7866 else
7867   cat > conftest.$ac_ext <<EOF
7868 #line 7869 "configure"
7869 #include "confdefs.h"
7870 /* System header to define __stub macros and hopefully few prototypes,
7871     which can conflict with char socket(); below.  */
7872 #include <assert.h>
7873 /* Override any gcc2 internal prototype to avoid an error.  */
7874 /* We use char because int might match the return type of a gcc2
7875     builtin and then its argument prototype would still apply.  */
7876 char socket();
7877
7878 int main() {
7879
7880 /* The GNU C library defines this for functions which it implements
7881     to always fail with ENOSYS.  Some functions are actually named
7882     something starting with __ and the normal name is an alias.  */
7883 #if defined (__stub_socket) || defined (__stub___socket)
7884 choke me
7885 #else
7886 socket();
7887 #endif
7888
7889 ; return 0; }
7890 EOF
7891 if { (eval echo configure:7892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7892   rm -rf conftest*
7893   eval "ac_cv_func_socket=yes"
7894 else
7895   echo "configure: failed program was:" >&5
7896   cat conftest.$ac_ext >&5
7897   rm -rf conftest*
7898   eval "ac_cv_func_socket=no"
7899 fi
7900 rm -f conftest*
7901 fi
7902
7903 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
7904   echo "$ac_t""yes" 1>&6
7905   echo "$ac_t""using libc's socket" 1>&6
7906 else
7907   echo "$ac_t""no" 1>&6
7908 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
7909 echo "configure:7910: checking for socket in -lxnet" >&5
7910 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
7911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7912   echo $ac_n "(cached) $ac_c" 1>&6
7913 else
7914   ac_save_LIBS="$LIBS"
7915 LIBS="-lxnet  $LIBS"
7916 cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 /* Override any gcc2 internal prototype to avoid an error.  */
7920 /* We use char because int might match the return type of a gcc2
7921     builtin and then its argument prototype would still apply.  */
7922 char socket();
7923
7924 int main() {
7925 socket()
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7929   rm -rf conftest*
7930   eval "ac_cv_lib_$ac_lib_var=yes"
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   eval "ac_cv_lib_$ac_lib_var=no"
7936 fi
7937 rm -f conftest*
7938 LIBS="$ac_save_LIBS"
7939
7940 fi
7941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7942   echo "$ac_t""yes" 1>&6
7943     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
7944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7945   cat >> confdefs.h <<EOF
7946 #define $ac_tr_lib 1
7947 EOF
7948
7949   LIBS="-lxnet $LIBS"
7950
7951 else
7952   echo "$ac_t""no" 1>&6
7953 fi
7954
7955     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
7956 echo "configure:7957: checking for socket in -lsocket" >&5
7957 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
7958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7959   echo $ac_n "(cached) $ac_c" 1>&6
7960 else
7961   ac_save_LIBS="$LIBS"
7962 LIBS="-lsocket  $LIBS"
7963 cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* Override any gcc2 internal prototype to avoid an error.  */
7967 /* We use char because int might match the return type of a gcc2
7968     builtin and then its argument prototype would still apply.  */
7969 char socket();
7970
7971 int main() {
7972 socket()
7973 ; return 0; }
7974 EOF
7975 if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=yes"
7978 else
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=no"
7983 fi
7984 rm -f conftest*
7985 LIBS="$ac_save_LIBS"
7986
7987 fi
7988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7989   echo "$ac_t""yes" 1>&6
7990     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
7991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7992   cat >> confdefs.h <<EOF
7993 #define $ac_tr_lib 1
7994 EOF
7995
7996   LIBS="-lsocket $LIBS"
7997
7998 else
7999   echo "$ac_t""no" 1>&6
8000 fi
8001
8002     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8003 echo "configure:8004: checking for socket in -linet" >&5
8004 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
8005 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8006   echo $ac_n "(cached) $ac_c" 1>&6
8007 else
8008   ac_save_LIBS="$LIBS"
8009 LIBS="-linet  $LIBS"
8010 cat > conftest.$ac_ext <<EOF
8011 #line 8012 "configure"
8012 #include "confdefs.h"
8013 /* Override any gcc2 internal prototype to avoid an error.  */
8014 /* We use char because int might match the return type of a gcc2
8015     builtin and then its argument prototype would still apply.  */
8016 char socket();
8017
8018 int main() {
8019 socket()
8020 ; return 0; }
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8023   rm -rf conftest*
8024   eval "ac_cv_lib_$ac_lib_var=yes"
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=no"
8030 fi
8031 rm -f conftest*
8032 LIBS="$ac_save_LIBS"
8033
8034 fi
8035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8036   echo "$ac_t""yes" 1>&6
8037     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
8038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8039   cat >> confdefs.h <<EOF
8040 #define $ac_tr_lib 1
8041 EOF
8042
8043   LIBS="-linet $LIBS"
8044
8045 else
8046   echo "$ac_t""no" 1>&6
8047 fi
8048
8049 fi
8050
8051
8052
8053 echo $ac_n "checking for strftime""... $ac_c" 1>&6
8054 echo "configure:8055: checking for strftime" >&5
8055 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
8056   echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* System header to define __stub macros and hopefully few prototypes,
8062     which can conflict with char strftime(); below.  */
8063 #include <assert.h>
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char strftime();
8068
8069 int main() {
8070
8071 /* The GNU C library defines this for functions which it implements
8072     to always fail with ENOSYS.  Some functions are actually named
8073     something starting with __ and the normal name is an alias.  */
8074 #if defined (__stub_strftime) || defined (__stub___strftime)
8075 choke me
8076 #else
8077 strftime();
8078 #endif
8079
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   eval "ac_cv_func_strftime=yes"
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   eval "ac_cv_func_strftime=no"
8090 fi
8091 rm -f conftest*
8092 fi
8093
8094 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
8095   echo "$ac_t""yes" 1>&6
8096   cat >> confdefs.h <<\EOF
8097 #define HAVE_STRFTIME 1
8098 EOF
8099
8100 else
8101   echo "$ac_t""no" 1>&6
8102 # strftime is in -lintl on SCO UNIX.
8103 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8104 echo "configure:8105: checking for strftime in -lintl" >&5
8105 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8107   echo $ac_n "(cached) $ac_c" 1>&6
8108 else
8109   ac_save_LIBS="$LIBS"
8110 LIBS="-lintl  $LIBS"
8111 cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* Override any gcc2 internal prototype to avoid an error.  */
8115 /* We use char because int might match the return type of a gcc2
8116     builtin and then its argument prototype would still apply.  */
8117 char strftime();
8118
8119 int main() {
8120 strftime()
8121 ; return 0; }
8122 EOF
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124   rm -rf conftest*
8125   eval "ac_cv_lib_$ac_lib_var=yes"
8126 else
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=no"
8131 fi
8132 rm -f conftest*
8133 LIBS="$ac_save_LIBS"
8134
8135 fi
8136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8137   echo "$ac_t""yes" 1>&6
8138   cat >> confdefs.h <<\EOF
8139 #define HAVE_STRFTIME 1
8140 EOF
8141
8142 LIBS="-lintl $LIBS"
8143 else
8144   echo "$ac_t""no" 1>&6
8145 fi
8146
8147 fi
8148
8149 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8150 echo "configure:8151: checking for vprintf" >&5
8151 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* System header to define __stub macros and hopefully few prototypes,
8158     which can conflict with char vprintf(); below.  */
8159 #include <assert.h>
8160 /* Override any gcc2 internal prototype to avoid an error.  */
8161 /* We use char because int might match the return type of a gcc2
8162     builtin and then its argument prototype would still apply.  */
8163 char vprintf();
8164
8165 int main() {
8166
8167 /* The GNU C library defines this for functions which it implements
8168     to always fail with ENOSYS.  Some functions are actually named
8169     something starting with __ and the normal name is an alias.  */
8170 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8171 choke me
8172 #else
8173 vprintf();
8174 #endif
8175
8176 ; return 0; }
8177 EOF
8178 if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8179   rm -rf conftest*
8180   eval "ac_cv_func_vprintf=yes"
8181 else
8182   echo "configure: failed program was:" >&5
8183   cat conftest.$ac_ext >&5
8184   rm -rf conftest*
8185   eval "ac_cv_func_vprintf=no"
8186 fi
8187 rm -f conftest*
8188 fi
8189
8190 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8191   echo "$ac_t""yes" 1>&6
8192   cat >> confdefs.h <<\EOF
8193 #define HAVE_VPRINTF 1
8194 EOF
8195
8196 else
8197   echo "$ac_t""no" 1>&6
8198 fi
8199
8200 if test "$ac_cv_func_vprintf" != yes; then
8201 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8202 echo "configure:8203: checking for _doprnt" >&5
8203 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8204   echo $ac_n "(cached) $ac_c" 1>&6
8205 else
8206   cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 /* System header to define __stub macros and hopefully few prototypes,
8210     which can conflict with char _doprnt(); below.  */
8211 #include <assert.h>
8212 /* Override any gcc2 internal prototype to avoid an error.  */
8213 /* We use char because int might match the return type of a gcc2
8214     builtin and then its argument prototype would still apply.  */
8215 char _doprnt();
8216
8217 int main() {
8218
8219 /* The GNU C library defines this for functions which it implements
8220     to always fail with ENOSYS.  Some functions are actually named
8221     something starting with __ and the normal name is an alias.  */
8222 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8223 choke me
8224 #else
8225 _doprnt();
8226 #endif
8227
8228 ; return 0; }
8229 EOF
8230 if { (eval echo configure:8231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8231   rm -rf conftest*
8232   eval "ac_cv_func__doprnt=yes"
8233 else
8234   echo "configure: failed program was:" >&5
8235   cat conftest.$ac_ext >&5
8236   rm -rf conftest*
8237   eval "ac_cv_func__doprnt=no"
8238 fi
8239 rm -f conftest*
8240 fi
8241
8242 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8243   echo "$ac_t""yes" 1>&6
8244   cat >> confdefs.h <<\EOF
8245 #define HAVE_DOPRNT 1
8246 EOF
8247
8248 else
8249   echo "$ac_t""no" 1>&6
8250 fi
8251
8252 fi
8253
8254 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8255 # for constant arguments.  Useless!
8256 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8257 echo "configure:8258: checking for working alloca.h" >&5
8258 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8259   echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261   cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 #include <alloca.h>
8265 int main() {
8266 char *p = alloca(2 * sizeof(int));
8267 ; return 0; }
8268 EOF
8269 if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8270   rm -rf conftest*
8271   ac_cv_header_alloca_h=yes
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -rf conftest*
8276   ac_cv_header_alloca_h=no
8277 fi
8278 rm -f conftest*
8279 fi
8280
8281 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8282 if test $ac_cv_header_alloca_h = yes; then
8283   cat >> confdefs.h <<\EOF
8284 #define HAVE_ALLOCA_H 1
8285 EOF
8286
8287 fi
8288
8289 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8290 echo "configure:8291: checking for alloca" >&5
8291 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8292   echo $ac_n "(cached) $ac_c" 1>&6
8293 else
8294   cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297
8298 #ifdef __GNUC__
8299 # define alloca __builtin_alloca
8300 #else
8301 # ifdef _MSC_VER
8302 #  include <malloc.h>
8303 #  define alloca _alloca
8304 # else
8305 #  if HAVE_ALLOCA_H
8306 #   include <alloca.h>
8307 #  else
8308 #   ifdef _AIX
8309  #pragma alloca
8310 #   else
8311 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8312 char *alloca ();
8313 #    endif
8314 #   endif
8315 #  endif
8316 # endif
8317 #endif
8318
8319 int main() {
8320 char *p = (char *) alloca(1);
8321 ; return 0; }
8322 EOF
8323 if { (eval echo configure:8324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8324   rm -rf conftest*
8325   ac_cv_func_alloca_works=yes
8326 else
8327   echo "configure: failed program was:" >&5
8328   cat conftest.$ac_ext >&5
8329   rm -rf conftest*
8330   ac_cv_func_alloca_works=no
8331 fi
8332 rm -f conftest*
8333 fi
8334
8335 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8336 if test $ac_cv_func_alloca_works = yes; then
8337   cat >> confdefs.h <<\EOF
8338 #define HAVE_ALLOCA 1
8339 EOF
8340
8341 fi
8342
8343 if test $ac_cv_func_alloca_works = no; then
8344   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8345   # that cause trouble.  Some versions do not even contain alloca or
8346   # contain a buggy version.  If you still want to use their alloca,
8347   # use ar to extract alloca.o from them instead of compiling alloca.c.
8348   ALLOCA=alloca.${ac_objext}
8349   cat >> confdefs.h <<\EOF
8350 #define C_ALLOCA 1
8351 EOF
8352
8353
8354 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8355 echo "configure:8356: checking whether alloca needs Cray hooks" >&5
8356 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 #if defined(CRAY) && ! defined(CRAY2)
8363 webecray
8364 #else
8365 wenotbecray
8366 #endif
8367
8368 EOF
8369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8370   egrep "webecray" >/dev/null 2>&1; then
8371   rm -rf conftest*
8372   ac_cv_os_cray=yes
8373 else
8374   rm -rf conftest*
8375   ac_cv_os_cray=no
8376 fi
8377 rm -f conftest*
8378
8379 fi
8380
8381 echo "$ac_t""$ac_cv_os_cray" 1>&6
8382 if test $ac_cv_os_cray = yes; then
8383 for ac_func in _getb67 GETB67 getb67; do
8384   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8385 echo "configure:8386: checking for $ac_func" >&5
8386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 /* System header to define __stub macros and hopefully few prototypes,
8393     which can conflict with char $ac_func(); below.  */
8394 #include <assert.h>
8395 /* Override any gcc2 internal prototype to avoid an error.  */
8396 /* We use char because int might match the return type of a gcc2
8397     builtin and then its argument prototype would still apply.  */
8398 char $ac_func();
8399
8400 int main() {
8401
8402 /* The GNU C library defines this for functions which it implements
8403     to always fail with ENOSYS.  Some functions are actually named
8404     something starting with __ and the normal name is an alias.  */
8405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8406 choke me
8407 #else
8408 $ac_func();
8409 #endif
8410
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8414   rm -rf conftest*
8415   eval "ac_cv_func_$ac_func=yes"
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_func_$ac_func=no"
8421 fi
8422 rm -f conftest*
8423 fi
8424
8425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8426   echo "$ac_t""yes" 1>&6
8427   cat >> confdefs.h <<EOF
8428 #define CRAY_STACKSEG_END $ac_func
8429 EOF
8430
8431   break
8432 else
8433   echo "$ac_t""no" 1>&6
8434 fi
8435
8436 done
8437 fi
8438
8439 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8440 echo "configure:8441: checking stack direction for C alloca" >&5
8441 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   if test "$cross_compiling" = yes; then
8445   ac_cv_c_stack_direction=0
8446 else
8447   cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8450 find_stack_direction ()
8451 {
8452   static char *addr = 0;
8453   auto char dummy;
8454   if (addr == 0)
8455     {
8456       addr = &dummy;
8457       return find_stack_direction ();
8458     }
8459   else
8460     return (&dummy > addr) ? 1 : -1;
8461 }
8462 main ()
8463 {
8464   exit (find_stack_direction() < 0);
8465 }
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8468 then
8469   ac_cv_c_stack_direction=1
8470 else
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -fr conftest*
8474   ac_cv_c_stack_direction=-1
8475 fi
8476 rm -fr conftest*
8477 fi
8478
8479 fi
8480
8481 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8482 cat >> confdefs.h <<EOF
8483 #define STACK_DIRECTION $ac_cv_c_stack_direction
8484 EOF
8485
8486 fi
8487
8488 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
8489 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
8490 echo "configure:8491: checking for getmntent in -lsun" >&5
8491 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
8492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8493   echo $ac_n "(cached) $ac_c" 1>&6
8494 else
8495   ac_save_LIBS="$LIBS"
8496 LIBS="-lsun  $LIBS"
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* Override any gcc2 internal prototype to avoid an error.  */
8501 /* We use char because int might match the return type of a gcc2
8502     builtin and then its argument prototype would still apply.  */
8503 char getmntent();
8504
8505 int main() {
8506 getmntent()
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   eval "ac_cv_lib_$ac_lib_var=yes"
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_lib_$ac_lib_var=no"
8517 fi
8518 rm -f conftest*
8519 LIBS="$ac_save_LIBS"
8520
8521 fi
8522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8523   echo "$ac_t""yes" 1>&6
8524   LIBS="-lsun $LIBS"
8525 else
8526   echo "$ac_t""no" 1>&6
8527 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
8528 echo "configure:8529: checking for getmntent in -lseq" >&5
8529 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
8530 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8531   echo $ac_n "(cached) $ac_c" 1>&6
8532 else
8533   ac_save_LIBS="$LIBS"
8534 LIBS="-lseq  $LIBS"
8535 cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 /* Override any gcc2 internal prototype to avoid an error.  */
8539 /* We use char because int might match the return type of a gcc2
8540     builtin and then its argument prototype would still apply.  */
8541 char getmntent();
8542
8543 int main() {
8544 getmntent()
8545 ; return 0; }
8546 EOF
8547 if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8548   rm -rf conftest*
8549   eval "ac_cv_lib_$ac_lib_var=yes"
8550 else
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -rf conftest*
8554   eval "ac_cv_lib_$ac_lib_var=no"
8555 fi
8556 rm -f conftest*
8557 LIBS="$ac_save_LIBS"
8558
8559 fi
8560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8561   echo "$ac_t""yes" 1>&6
8562   LIBS="-lseq $LIBS"
8563 else
8564   echo "$ac_t""no" 1>&6
8565 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
8566 echo "configure:8567: checking for getmntent in -lgen" >&5
8567 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
8568 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8569   echo $ac_n "(cached) $ac_c" 1>&6
8570 else
8571   ac_save_LIBS="$LIBS"
8572 LIBS="-lgen  $LIBS"
8573 cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 /* Override any gcc2 internal prototype to avoid an error.  */
8577 /* We use char because int might match the return type of a gcc2
8578     builtin and then its argument prototype would still apply.  */
8579 char getmntent();
8580
8581 int main() {
8582 getmntent()
8583 ; return 0; }
8584 EOF
8585 if { (eval echo configure:8586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8586   rm -rf conftest*
8587   eval "ac_cv_lib_$ac_lib_var=yes"
8588 else
8589   echo "configure: failed program was:" >&5
8590   cat conftest.$ac_ext >&5
8591   rm -rf conftest*
8592   eval "ac_cv_lib_$ac_lib_var=no"
8593 fi
8594 rm -f conftest*
8595 LIBS="$ac_save_LIBS"
8596
8597 fi
8598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8599   echo "$ac_t""yes" 1>&6
8600   LIBS="-lgen $LIBS"
8601 else
8602   echo "$ac_t""no" 1>&6
8603 fi
8604
8605 fi
8606
8607 fi
8608
8609 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
8610 echo "configure:8611: checking for getmntent" >&5
8611 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
8612   echo $ac_n "(cached) $ac_c" 1>&6
8613 else
8614   cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617 /* System header to define __stub macros and hopefully few prototypes,
8618     which can conflict with char getmntent(); below.  */
8619 #include <assert.h>
8620 /* Override any gcc2 internal prototype to avoid an error.  */
8621 /* We use char because int might match the return type of a gcc2
8622     builtin and then its argument prototype would still apply.  */
8623 char getmntent();
8624
8625 int main() {
8626
8627 /* The GNU C library defines this for functions which it implements
8628     to always fail with ENOSYS.  Some functions are actually named
8629     something starting with __ and the normal name is an alias.  */
8630 #if defined (__stub_getmntent) || defined (__stub___getmntent)
8631 choke me
8632 #else
8633 getmntent();
8634 #endif
8635
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8639   rm -rf conftest*
8640   eval "ac_cv_func_getmntent=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_func_getmntent=no"
8646 fi
8647 rm -f conftest*
8648 fi
8649
8650 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
8651   echo "$ac_t""yes" 1>&6
8652   cat >> confdefs.h <<\EOF
8653 #define HAVE_GETMNTENT 1
8654 EOF
8655
8656 else
8657   echo "$ac_t""no" 1>&6
8658 fi
8659
8660 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
8661 echo "configure:8662: checking whether closedir returns void" >&5
8662 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   if test "$cross_compiling" = yes; then
8666   ac_cv_func_closedir_void=yes
8667 else
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 #include <sys/types.h>
8672 #include <$ac_header_dirent>
8673 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8676 then
8677   ac_cv_func_closedir_void=no
8678 else
8679   echo "configure: failed program was:" >&5
8680   cat conftest.$ac_ext >&5
8681   rm -fr conftest*
8682   ac_cv_func_closedir_void=yes
8683 fi
8684 rm -fr conftest*
8685 fi
8686
8687 fi
8688
8689 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
8690 if test $ac_cv_func_closedir_void = yes; then
8691   cat >> confdefs.h <<\EOF
8692 #define CLOSEDIR_VOID 1
8693 EOF
8694
8695 fi
8696
8697 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
8698 echo "configure:8699: checking whether setpgrp takes no argument" >&5
8699 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
8700   echo $ac_n "(cached) $ac_c" 1>&6
8701 else
8702   if test "$cross_compiling" = yes; then
8703   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
8704 else
8705   cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708
8709 #ifdef HAVE_UNISTD_H
8710 #include <unistd.h>
8711 #endif
8712
8713 /*
8714  * If this system has a BSD-style setpgrp, which takes arguments, exit
8715  * successfully.
8716  */
8717 main()
8718 {
8719     if (setpgrp(1,1) == -1)
8720         exit(0);
8721     else
8722         exit(1);
8723 }
8724
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8727 then
8728   ac_cv_func_setpgrp_void=no
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -fr conftest*
8733   ac_cv_func_setpgrp_void=yes
8734 fi
8735 rm -fr conftest*
8736 fi
8737
8738
8739 fi
8740
8741 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
8742 if test $ac_cv_func_setpgrp_void = yes; then
8743   cat >> confdefs.h <<\EOF
8744 #define SETPGRP_VOID 1
8745 EOF
8746
8747 fi
8748                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8749 echo "configure:8750: checking for working fnmatch" >&5
8750 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
8751   echo $ac_n "(cached) $ac_c" 1>&6
8752 else
8753   # Some versions of Solaris or SCO have a broken fnmatch function.
8754 # So we run a test program.  If we are cross-compiling, take no chance.
8755 # Thanks to John Oleynick and Franc,ois Pinard for this test.
8756 if test "$cross_compiling" = yes; then
8757   ac_cv_func_fnmatch_works=no
8758 else
8759   cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
8763 EOF
8764 if { (eval echo configure:8765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8765 then
8766   ac_cv_func_fnmatch_works=yes
8767 else
8768   echo "configure: failed program was:" >&5
8769   cat conftest.$ac_ext >&5
8770   rm -fr conftest*
8771   ac_cv_func_fnmatch_works=no
8772 fi
8773 rm -fr conftest*
8774 fi
8775
8776 fi
8777
8778 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
8779 if test $ac_cv_func_fnmatch_works = yes; then
8780   cat >> confdefs.h <<\EOF
8781 #define HAVE_FNMATCH 1
8782 EOF
8783
8784 fi
8785
8786
8787
8788 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
8789 echo "configure:8790: checking for setlocale in -lxpg4" >&5
8790 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
8791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8792   echo $ac_n "(cached) $ac_c" 1>&6
8793 else
8794   ac_save_LIBS="$LIBS"
8795 LIBS="-lxpg4  $LIBS"
8796 cat > conftest.$ac_ext <<EOF
8797 #line 8798 "configure"
8798 #include "confdefs.h"
8799 /* Override any gcc2 internal prototype to avoid an error.  */
8800 /* We use char because int might match the return type of a gcc2
8801     builtin and then its argument prototype would still apply.  */
8802 char setlocale();
8803
8804 int main() {
8805 setlocale()
8806 ; return 0; }
8807 EOF
8808 if { (eval echo configure:8809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8809   rm -rf conftest*
8810   eval "ac_cv_lib_$ac_lib_var=yes"
8811 else
8812   echo "configure: failed program was:" >&5
8813   cat conftest.$ac_ext >&5
8814   rm -rf conftest*
8815   eval "ac_cv_lib_$ac_lib_var=no"
8816 fi
8817 rm -f conftest*
8818 LIBS="$ac_save_LIBS"
8819
8820 fi
8821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8822   echo "$ac_t""yes" 1>&6
8823   LIBS="$LIBS -lxpg4"
8824 else
8825   echo "$ac_t""no" 1>&6
8826 fi
8827
8828
8829
8830 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
8831 echo "configure:8832: checking for getpwnam in -lsun" >&5
8832 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
8833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8834   echo $ac_n "(cached) $ac_c" 1>&6
8835 else
8836   ac_save_LIBS="$LIBS"
8837 LIBS="-lsun  $LIBS"
8838 cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 /* Override any gcc2 internal prototype to avoid an error.  */
8842 /* We use char because int might match the return type of a gcc2
8843     builtin and then its argument prototype would still apply.  */
8844 char getpwnam();
8845
8846 int main() {
8847 getpwnam()
8848 ; return 0; }
8849 EOF
8850 if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8851   rm -rf conftest*
8852   eval "ac_cv_lib_$ac_lib_var=yes"
8853 else
8854   echo "configure: failed program was:" >&5
8855   cat conftest.$ac_ext >&5
8856   rm -rf conftest*
8857   eval "ac_cv_lib_$ac_lib_var=no"
8858 fi
8859 rm -f conftest*
8860 LIBS="$ac_save_LIBS"
8861
8862 fi
8863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8864   echo "$ac_t""yes" 1>&6
8865     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8866     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8867   cat >> confdefs.h <<EOF
8868 #define $ac_tr_lib 1
8869 EOF
8870
8871   LIBS="-lsun $LIBS"
8872
8873 else
8874   echo "$ac_t""no" 1>&6
8875 fi
8876
8877
8878 for ac_hdr in zlib.h
8879 do
8880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8882 echo "configure:8883: checking for $ac_hdr" >&5
8883 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 #include <$ac_hdr>
8890 EOF
8891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8892 { (eval echo configure:8893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8894 if test -z "$ac_err"; then
8895   rm -rf conftest*
8896   eval "ac_cv_header_$ac_safe=yes"
8897 else
8898   echo "$ac_err" >&5
8899   echo "configure: failed program was:" >&5
8900   cat conftest.$ac_ext >&5
8901   rm -rf conftest*
8902   eval "ac_cv_header_$ac_safe=no"
8903 fi
8904 rm -f conftest*
8905 fi
8906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8907   echo "$ac_t""yes" 1>&6
8908     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8909   cat >> confdefs.h <<EOF
8910 #define $ac_tr_hdr 1
8911 EOF
8912  
8913 else
8914   echo "$ac_t""no" 1>&6
8915 fi
8916 done
8917
8918 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
8919 echo "configure:8920: checking for deflate in -lz" >&5
8920 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
8921 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8922   echo $ac_n "(cached) $ac_c" 1>&6
8923 else
8924   ac_save_LIBS="$LIBS"
8925 LIBS="-lz  $LIBS"
8926 cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* Override any gcc2 internal prototype to avoid an error.  */
8930 /* We use char because int might match the return type of a gcc2
8931     builtin and then its argument prototype would still apply.  */
8932 char deflate();
8933
8934 int main() {
8935 deflate()
8936 ; return 0; }
8937 EOF
8938 if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8939   rm -rf conftest*
8940   eval "ac_cv_lib_$ac_lib_var=yes"
8941 else
8942   echo "configure: failed program was:" >&5
8943   cat conftest.$ac_ext >&5
8944   rm -rf conftest*
8945   eval "ac_cv_lib_$ac_lib_var=no"
8946 fi
8947 rm -f conftest*
8948 LIBS="$ac_save_LIBS"
8949
8950 fi
8951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8952   echo "$ac_t""yes" 1>&6
8953   FDLIBS="-lz"
8954 else
8955   echo "$ac_t""no" 1>&6
8956 fi
8957
8958 have_zlib=no
8959 if test x$FDLIBS = x-lz; then
8960   cat >> confdefs.h <<\EOF
8961 #define HAVE_LIBZ 1
8962 EOF
8963
8964   have_zlib=yes
8965 fi
8966
8967 PTHREAD_LIB=""
8968 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
8969 echo "configure:8970: checking for pthread_create in -lpthread" >&5
8970 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
8971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8972   echo $ac_n "(cached) $ac_c" 1>&6
8973 else
8974   ac_save_LIBS="$LIBS"
8975 LIBS="-lpthread  $LIBS"
8976 cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8979 /* Override any gcc2 internal prototype to avoid an error.  */
8980 /* We use char because int might match the return type of a gcc2
8981     builtin and then its argument prototype would still apply.  */
8982 char pthread_create();
8983
8984 int main() {
8985 pthread_create()
8986 ; return 0; }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8989   rm -rf conftest*
8990   eval "ac_cv_lib_$ac_lib_var=yes"
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -rf conftest*
8995   eval "ac_cv_lib_$ac_lib_var=no"
8996 fi
8997 rm -f conftest*
8998 LIBS="$ac_save_LIBS"
8999
9000 fi
9001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9002   echo "$ac_t""yes" 1>&6
9003   PTHREAD_LIB="-lpthread"
9004 else
9005   echo "$ac_t""no" 1>&6
9006 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
9007 echo "configure:9008: checking for pthread_create in -lpthreads" >&5
9008 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
9009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9010   echo $ac_n "(cached) $ac_c" 1>&6
9011 else
9012   ac_save_LIBS="$LIBS"
9013 LIBS="-lpthreads  $LIBS"
9014 cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017 /* Override any gcc2 internal prototype to avoid an error.  */
9018 /* We use char because int might match the return type of a gcc2
9019     builtin and then its argument prototype would still apply.  */
9020 char pthread_create();
9021
9022 int main() {
9023 pthread_create()
9024 ; return 0; }
9025 EOF
9026 if { (eval echo configure:9027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9027   rm -rf conftest*
9028   eval "ac_cv_lib_$ac_lib_var=yes"
9029 else
9030   echo "configure: failed program was:" >&5
9031   cat conftest.$ac_ext >&5
9032   rm -rf conftest*
9033   eval "ac_cv_lib_$ac_lib_var=no"
9034 fi
9035 rm -f conftest*
9036 LIBS="$ac_save_LIBS"
9037
9038 fi
9039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9040   echo "$ac_t""yes" 1>&6
9041   PTHREAD_LIB="-lpthreads"
9042 else
9043   echo "$ac_t""no" 1>&6
9044 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
9045 echo "configure:9046: checking for pthread_create in -lc_r" >&5
9046 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
9047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9048   echo $ac_n "(cached) $ac_c" 1>&6
9049 else
9050   ac_save_LIBS="$LIBS"
9051 LIBS="-lc_r  $LIBS"
9052 cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9055 /* Override any gcc2 internal prototype to avoid an error.  */
9056 /* We use char because int might match the return type of a gcc2
9057     builtin and then its argument prototype would still apply.  */
9058 char pthread_create();
9059
9060 int main() {
9061 pthread_create()
9062 ; return 0; }
9063 EOF
9064 if { (eval echo configure:9065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9065   rm -rf conftest*
9066   eval "ac_cv_lib_$ac_lib_var=yes"
9067 else
9068   echo "configure: failed program was:" >&5
9069   cat conftest.$ac_ext >&5
9070   rm -rf conftest*
9071   eval "ac_cv_lib_$ac_lib_var=no"
9072 fi
9073 rm -f conftest*
9074 LIBS="$ac_save_LIBS"
9075
9076 fi
9077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9078   echo "$ac_t""yes" 1>&6
9079   PTHREAD_LIB="-lc_r"
9080 else
9081   echo "$ac_t""no" 1>&6
9082 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
9083 echo "configure:9084: checking for pthread_create" >&5
9084 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090 /* System header to define __stub macros and hopefully few prototypes,
9091     which can conflict with char pthread_create(); below.  */
9092 #include <assert.h>
9093 /* Override any gcc2 internal prototype to avoid an error.  */
9094 /* We use char because int might match the return type of a gcc2
9095     builtin and then its argument prototype would still apply.  */
9096 char pthread_create();
9097
9098 int main() {
9099
9100 /* The GNU C library defines this for functions which it implements
9101     to always fail with ENOSYS.  Some functions are actually named
9102     something starting with __ and the normal name is an alias.  */
9103 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
9104 choke me
9105 #else
9106 pthread_create();
9107 #endif
9108
9109 ; return 0; }
9110 EOF
9111 if { (eval echo configure:9112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9112   rm -rf conftest*
9113   eval "ac_cv_func_pthread_create=yes"
9114 else
9115   echo "configure: failed program was:" >&5
9116   cat conftest.$ac_ext >&5
9117   rm -rf conftest*
9118   eval "ac_cv_func_pthread_create=no"
9119 fi
9120 rm -f conftest*
9121 fi
9122
9123 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
9124   echo "$ac_t""yes" 1>&6
9125   :
9126 else
9127   echo "$ac_t""no" 1>&6
9128 fi
9129
9130             
9131 fi
9132
9133         
9134 fi
9135
9136
9137 fi
9138
9139
9140
9141 cat >> confdefs.h <<\EOF
9142 #define FDLIBS 1
9143 EOF
9144
9145
9146
9147 CFLAGS=${CFLAGS--O}
9148 LDFLAGS=${LDFLAGS--O}
9149 DB_LIBS="${SQL_LFLAGS}"
9150
9151 CPPFLAGS="$CPPFLAGS"
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164 OBJLIST=
9165
9166
9167 lld="lld"
9168 llu="llu"
9169
9170 #
9171 # Finally we set appropriate distribution specific
9172 #  variables and defaults
9173 #
9174 # PFILES are platform specific files
9175 PFILES="platforms/Makefile"
9176 PSCMD="ps -e"
9177 WIN32=
9178 hostname=`hostname`
9179 case "$DISTNAME" in
9180 alpha)
9181         DISTVER=`uname -r`
9182         PTHREAD_LIB="-lpthread -lexc"
9183         if test "${CC}" = "gcc" ; then
9184            lld="lld"
9185            llu="llu"
9186         else
9187            lld="ld"
9188            llu="lu"
9189         fi
9190         TAPEDRIVE="/dev/nrmt0"
9191   ;;
9192 bsdi)
9193         DISTVER=`uname -a |awk '{print $3}'`
9194         TAPEDRIVE="/dev/nrst0"
9195   ;;
9196 caldera)
9197         DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
9198         TAPEDRIVE="/dev/nrst0"
9199         PSCMD="ps -e -o pid,command"
9200         hostname=`hostname -s`
9201   ;;
9202 cygwin)
9203         DISTVER=`uname -a |awk '{print $3}'`
9204         TAPEDRIVE="/dev/nrst0"
9205         WIN32=win32
9206         CFLAGS="${CFLAGS} -mwindows"
9207         LDFLAGS="${LDFLAGS} -mwindows"
9208   ;;
9209 debian)
9210         DISTVER=`cat /etc/debian_version`
9211         TAPEDRIVE="/dev/nrst0"
9212         PSCMD="ps -e -o pid,command"
9213         hostname=`hostname -s`
9214   ;;
9215 freebsd)
9216         DISTVER=`uname -a |awk '{print $3}'`
9217         PTHREAD_LIB="-pthread"
9218         CFLAGS="${CFLAGS} -pthread"
9219         lld="qd"
9220         llu="qu"
9221         TAPEDRIVE="/dev/nrst0"
9222         PSCMD="ps -x -o pid,command"
9223         PFILES="${PFILES} \
9224             platforms/freebsd/Makefile \
9225             platforms/freebsd/bacula-fd \
9226             platforms/freebsd/bacula-sd \
9227             platforms/freebsd/bacula-dir"
9228         hostname=`hostname -s`
9229         ac_cv_sys_largefile_CFLAGS="yes"
9230   ;;
9231 hpux)
9232         DISTVER=`uname -r`
9233         TAPEDRIVE="/dev/rmt/0hnb"
9234   ;;
9235 irix)
9236         DISTVER=`uname -r`
9237         TAPEDRIVE="/dev/rmt/0cbn"
9238         PSCMD="ps -e -o pid,comm"
9239         hostname=`/usr/bsd/hostname -s`
9240         PFILES="${PFILES} \
9241             platforms/irix/Makefile \
9242             platforms/irix/bacula-fd \
9243             platforms/irix/bacula-sd \
9244             platforms/irix/bacula-dir"
9245   ;;
9246 netbsd)
9247         DISTVER=`uname -a |awk '{print $3}'`
9248         lld="qd"
9249         llu="qu"
9250         TAPEDRIVE="/dev/nrst0"
9251         PSCMD="ps -a -o pid,command"
9252   ;;
9253 openbsd)
9254         DISTVER=`uname -a |awk '{print $3}'`
9255         lld="qd"
9256         llu="qu"
9257         TAPEDRIVE="/dev/nrst0"
9258         PSCMD="ps -a -o pid,command"
9259   ;;
9260 redhat)
9261         DISTVER=`cat /etc/redhat-release | grep release |\
9262                                 cut -f 5 -d ' '`
9263         TAPEDRIVE="/dev/nst0"
9264         PSCMD="ps -e -o pid,command"
9265         PFILES="${PFILES} \
9266             platforms/redhat/Makefile \
9267             platforms/redhat/bacula-fd \
9268             platforms/redhat/bacula-sd \
9269             platforms/redhat/bacula-dir"
9270         hostname=`hostname -s`
9271   ;;
9272 slackware)
9273         DISTVER=`cat /etc/slackware-version`
9274         TAPEDRIVE="/dev/nst0"
9275         PSCMD="ps -e -o pid,command"
9276         hostname=`hostname -s`
9277   ;;
9278 solaris)
9279         DISTVER=Solaris
9280         TAPEDRIVE="/dev/rmt/0cbn"
9281         PSCMD="ps -e -o pid,comm"
9282         PFILES="${PFILES} \
9283             platforms/solaris/Makefile \
9284             platforms/solaris/bacula-fd \
9285             platforms/solaris/bacula-sd \
9286             platforms/solaris/bacula-dir"
9287   ;;
9288 suse)
9289         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
9290                                 cut -f 3 -d ' '`
9291         TAPEDRIVE="/dev/nst0"
9292         PSCMD="ps -e -o pid,command"
9293         hostname=`hostname -s`
9294   ;;
9295 suse5)
9296         DISTNAME=suse
9297         DISTVER=5.x
9298         TAPEDRIVE="/dev/nst0"
9299         PSCMD="ps -e -o pid,command"
9300         hostname=`hostname -s`
9301   ;;
9302 unknown)
9303         DISTVER=unknown
9304         TAPEDRIVE="/dev/nst0"
9305   ;;
9306 *)
9307   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
9308   ;;
9309 esac  
9310
9311
9312
9313
9314 LIBS="$PTHREAD_LIB $LIBS"
9315
9316 cat >> confdefs.h <<EOF
9317 #define lld "$lld"
9318 EOF
9319
9320 cat >> confdefs.h <<EOF
9321 #define llu "$llu"
9322 EOF
9323
9324
9325
9326
9327
9328
9329
9330
9331 MCOMMON=./autoconf/Make.common
9332
9333
9334 trap '' 1 2 15
9335 cat > confcache <<\EOF
9336 # This file is a shell script that caches the results of configure
9337 # tests run on this system so they can be shared between configure
9338 # scripts and configure runs.  It is not useful on other systems.
9339 # If it contains results you don't want to keep, you may remove or edit it.
9340 #
9341 # By default, configure uses ./config.cache as the cache file,
9342 # creating it if it does not exist already.  You can give configure
9343 # the --cache-file=FILE option to use a different cache file; that is
9344 # what configure does when it calls configure scripts in
9345 # subdirectories, so they share the cache.
9346 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9347 # config.status only pays attention to the cache file if you give it the
9348 # --recheck option to rerun configure.
9349 #
9350 EOF
9351 # The following way of writing the cache mishandles newlines in values,
9352 # but we know of no workaround that is simple, portable, and efficient.
9353 # So, don't put newlines in cache variables' values.
9354 # Ultrix sh set writes to stderr and can't be redirected directly,
9355 # and sets the high bit in the cache file unless we assign to the vars.
9356 (set) 2>&1 |
9357   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9358   *ac_space=\ *)
9359     # `set' does not quote correctly, so add quotes (double-quote substitution
9360     # turns \\\\ into \\, and sed turns \\ into \).
9361     sed -n \
9362       -e "s/'/'\\\\''/g" \
9363       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9364     ;;
9365   *)
9366     # `set' quotes correctly as required by POSIX, so do not add quotes.
9367     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9368     ;;
9369   esac >> confcache
9370 if cmp -s $cache_file confcache; then
9371   :
9372 else
9373   if test -w $cache_file; then
9374     echo "updating cache $cache_file"
9375     cat confcache > $cache_file
9376   else
9377     echo "not updating unwritable cache $cache_file"
9378   fi
9379 fi
9380 rm -f confcache
9381
9382 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9383
9384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9385 # Let make expand exec_prefix.
9386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9387
9388 # Any assignment to VPATH causes Sun make to only execute
9389 # the first set of double-colon rules, so remove it if not needed.
9390 # If there is a colon in the path, we need to keep it.
9391 if test "x$srcdir" = x.; then
9392   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9393 fi
9394
9395 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9396
9397 DEFS=-DHAVE_CONFIG_H
9398
9399 # Without the "./", some shells look in PATH for config.status.
9400 : ${CONFIG_STATUS=./config.status}
9401
9402 echo creating $CONFIG_STATUS
9403 rm -f $CONFIG_STATUS
9404 cat > $CONFIG_STATUS <<EOF
9405 #! /bin/sh
9406 # Generated automatically by configure.
9407 # Run this file to recreate the current configuration.
9408 # This directory was configured as follows,
9409 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9410 #
9411 # $0 $ac_configure_args
9412 #
9413 # Compiler output produced by configure, useful for debugging
9414 # configure, is in ./config.log if it exists.
9415
9416 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9417 for ac_option
9418 do
9419   case "\$ac_option" in
9420   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9421     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9422     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9423   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9424     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9425     exit 0 ;;
9426   -help | --help | --hel | --he | --h)
9427     echo "\$ac_cs_usage"; exit 0 ;;
9428   *) echo "\$ac_cs_usage"; exit 1 ;;
9429   esac
9430 done
9431
9432 ac_given_srcdir=$srcdir
9433 ac_given_INSTALL="$INSTALL"
9434
9435 trap 'rm -fr `echo "autoconf/Make.common \
9436            Makefile \
9437            startmysql \
9438            stopmysql \
9439            btraceback \
9440            startit \
9441            stopit \
9442            console \
9443            gconsole \
9444            bacula \
9445            fd \
9446            doc/Makefile \
9447            src/Makefile \
9448            src/console/Makefile \
9449            src/console/console.conf \
9450            src/gnome-console/Makefile \
9451            src/gnome-console/gnome-console.conf \
9452            src/dird/Makefile \
9453            src/dird/bacula-dir.conf \
9454            src/lib/Makefile \
9455            src/stored/Makefile \
9456            src/stored/bacula-sd.conf \
9457            src/filed/Makefile \
9458            src/filed/bacula-fd.conf \
9459            src/filed/win32/Makefile \
9460            src/cats/Makefile \
9461            src/cats/alter_mysql_tables \
9462            src/cats/make_mysql_tables \
9463            src/cats/drop_mysql_tables \
9464            src/cats/create_mysql_database \
9465            src/cats/grant_mysql_privileges \
9466            src/cats/alter_sqlite_tables \
9467            src/cats/make_sqlite_tables \
9468            src/cats/drop_sqlite_tables \
9469            src/cats/create_sqlite_database \
9470            src/cats/sqlite \
9471            src/cats/mysql \
9472            src/cats/create_bdb_database \
9473            src/cats/make_bdb_tables \
9474            src/cats/drop_bdb_tables \
9475            src/cats/make_bacula_tables \
9476            src/cats/drop_bacula_tables \
9477            src/findlib/Makefile \
9478            src/tools/Makefile \
9479            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9480 EOF
9481 cat >> $CONFIG_STATUS <<EOF
9482
9483 # Protect against being on the right side of a sed subst in config.status.
9484 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9485  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9486 $ac_vpsub
9487 $extrasub
9488 s%@SHELL@%$SHELL%g
9489 s%@CFLAGS@%$CFLAGS%g
9490 s%@CPPFLAGS@%$CPPFLAGS%g
9491 s%@CXXFLAGS@%$CXXFLAGS%g
9492 s%@FFLAGS@%$FFLAGS%g
9493 s%@DEFS@%$DEFS%g
9494 s%@LDFLAGS@%$LDFLAGS%g
9495 s%@LIBS@%$LIBS%g
9496 s%@exec_prefix@%$exec_prefix%g
9497 s%@prefix@%$prefix%g
9498 s%@program_transform_name@%$program_transform_name%g
9499 s%@bindir@%$bindir%g
9500 s%@sbindir@%$sbindir%g
9501 s%@libexecdir@%$libexecdir%g
9502 s%@datadir@%$datadir%g
9503 s%@sysconfdir@%$sysconfdir%g
9504 s%@sharedstatedir@%$sharedstatedir%g
9505 s%@localstatedir@%$localstatedir%g
9506 s%@libdir@%$libdir%g
9507 s%@includedir@%$includedir%g
9508 s%@oldincludedir@%$oldincludedir%g
9509 s%@infodir@%$infodir%g
9510 s%@mandir@%$mandir%g
9511 s%@BUILD_DIR@%$BUILD_DIR%g
9512 s%@TRUEPRG@%$TRUEPRG%g
9513 s%@FALSEPRG@%$FALSEPRG%g
9514 s%@host@%$host%g
9515 s%@host_alias@%$host_alias%g
9516 s%@host_cpu@%$host_cpu%g
9517 s%@host_vendor@%$host_vendor%g
9518 s%@host_os@%$host_os%g
9519 s%@VERSION@%$VERSION%g
9520 s%@DATE@%$DATE%g
9521 s%@LSMDATE@%$LSMDATE%g
9522 s%@CC@%$CC%g
9523 s%@CXX@%$CXX%g
9524 s%@CPP@%$CPP%g
9525 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9526 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9527 s%@INSTALL_DATA@%$INSTALL_DATA%g
9528 s%@RANLIB@%$RANLIB%g
9529 s%@MV@%$MV%g
9530 s%@RM@%$RM%g
9531 s%@CP@%$CP%g
9532 s%@SED@%$SED%g
9533 s%@AWK@%$AWK%g
9534 s%@ECHO@%$ECHO%g
9535 s%@CMP@%$CMP%g
9536 s%@TBL@%$TBL%g
9537 s%@AR@%$AR%g
9538 s%@OPENSSL@%$OPENSSL%g
9539 s%@ARFLAGS@%$ARFLAGS%g
9540 s%@MAKE_SHELL@%$MAKE_SHELL%g
9541 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
9542 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
9543 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
9544 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
9545 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
9546 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
9547 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
9548 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
9549 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
9550 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
9551 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
9552 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
9553 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
9554 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
9555 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
9556 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
9557 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
9558 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
9559 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
9560 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
9561 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
9562 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
9563 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
9564 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
9565 s%@HAVE_IRIX_OS_TRUE@%$HAVE_IRIX_OS_TRUE%g
9566 s%@HAVE_IRIX_OS_FALSE@%$HAVE_IRIX_OS_FALSE%g
9567 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
9568 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
9569 s%@MSGFMT@%$MSGFMT%g
9570 s%@GNOME_LIBS@%$GNOME_LIBS%g
9571 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
9572 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
9573 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
9574 s%@ZVT_LIBS@%$ZVT_LIBS%g
9575 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9576 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9577 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9578 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
9579 s%@ORBIT_IDL@%$ORBIT_IDL%g
9580 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
9581 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
9582 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
9583 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
9584 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
9585 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
9586 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
9587 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
9588 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
9589 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
9590 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
9591 s%@GNOME_DIR@%$GNOME_DIR%g
9592 s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
9593 s%@CONS_INC@%$CONS_INC%g
9594 s%@CONS_LIBS@%$CONS_LIBS%g
9595 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
9596 s%@READLINE_SRC@%$READLINE_SRC%g
9597 s%@GMP_INC@%$GMP_INC%g
9598 s%@GMP_LIBS@%$GMP_LIBS%g
9599 s%@GMP_LDFLAGS@%$GMP_LDFLAGS%g
9600 s%@GMP_SRC@%$GMP_SRC%g
9601 s%@CWEB@%$CWEB%g
9602 s%@CWEB_INC@%$CWEB_INC%g
9603 s%@CWEB_LIBS@%$CWEB_LIBS%g
9604 s%@CWEB_LDFLAGS@%$CWEB_LDFLAGS%g
9605 s%@CWEB_SRC@%$CWEB_SRC%g
9606 s%@working_dir@%$working_dir%g
9607 s%@dump_email@%$dump_email%g
9608 s%@job_email@%$job_email%g
9609 s%@smtp_host@%$smtp_host%g
9610 s%@piddir@%$piddir%g
9611 s%@subsysdir@%$subsysdir%g
9612 s%@baseport@%$baseport%g
9613 s%@dir_port@%$dir_port%g
9614 s%@fd_port@%$fd_port%g
9615 s%@sd_port@%$sd_port%g
9616 s%@dir_password@%$dir_password%g
9617 s%@fd_password@%$fd_password%g
9618 s%@sd_password@%$sd_password%g
9619 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
9620 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
9621 s%@SQL_BINDIR@%$SQL_BINDIR%g
9622 s%@cats@%$cats%g
9623 s%@DB_NAME@%$DB_NAME%g
9624 s%@EXEEXT@%$EXEEXT%g
9625 s%@build@%$build%g
9626 s%@build_alias@%$build_alias%g
9627 s%@build_cpu@%$build_cpu%g
9628 s%@build_vendor@%$build_vendor%g
9629 s%@build_os@%$build_os%g
9630 s%@GETCONF@%$GETCONF%g
9631 s%@X_CFLAGS@%$X_CFLAGS%g
9632 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9633 s%@X_LIBS@%$X_LIBS%g
9634 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9635 s%@LIBOBJS@%$LIBOBJS%g
9636 s%@ALLOCA@%$ALLOCA%g
9637 s%@FDLIBS@%$FDLIBS%g
9638 s%@DEBUG@%$DEBUG%g
9639 s%@DINCLUDE@%$DINCLUDE%g
9640 s%@DLIB@%$DLIB%g
9641 s%@DB_LIBS@%$DB_LIBS%g
9642 s%@OBJLIST@%$OBJLIST%g
9643 s%@hostname@%$hostname%g
9644 s%@TAPEDRIVE@%$TAPEDRIVE%g
9645 s%@PSCMD@%$PSCMD%g
9646 s%@WIN32@%$WIN32%g
9647 s%@DISTNAME@%$DISTNAME%g
9648 s%@DISTVER@%$DISTVER%g
9649 /@MCOMMON@/r $MCOMMON
9650 s%@MCOMMON@%%g
9651
9652 CEOF
9653 EOF
9654
9655 cat >> $CONFIG_STATUS <<\EOF
9656
9657 # Split the substitutions into bite-sized pieces for seds with
9658 # small command number limits, like on Digital OSF/1 and HP-UX.
9659 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9660 ac_file=1 # Number of current file.
9661 ac_beg=1 # First line for current file.
9662 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9663 ac_more_lines=:
9664 ac_sed_cmds=""
9665 while $ac_more_lines; do
9666   if test $ac_beg -gt 1; then
9667     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9668   else
9669     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9670   fi
9671   if test ! -s conftest.s$ac_file; then
9672     ac_more_lines=false
9673     rm -f conftest.s$ac_file
9674   else
9675     if test -z "$ac_sed_cmds"; then
9676       ac_sed_cmds="sed -f conftest.s$ac_file"
9677     else
9678       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9679     fi
9680     ac_file=`expr $ac_file + 1`
9681     ac_beg=$ac_end
9682     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9683   fi
9684 done
9685 if test -z "$ac_sed_cmds"; then
9686   ac_sed_cmds=cat
9687 fi
9688 EOF
9689
9690 cat >> $CONFIG_STATUS <<EOF
9691
9692 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
9693            Makefile \
9694            startmysql \
9695            stopmysql \
9696            btraceback \
9697            startit \
9698            stopit \
9699            console \
9700            gconsole \
9701            bacula \
9702            fd \
9703            doc/Makefile \
9704            src/Makefile \
9705            src/console/Makefile \
9706            src/console/console.conf \
9707            src/gnome-console/Makefile \
9708            src/gnome-console/gnome-console.conf \
9709            src/dird/Makefile \
9710            src/dird/bacula-dir.conf \
9711            src/lib/Makefile \
9712            src/stored/Makefile \
9713            src/stored/bacula-sd.conf \
9714            src/filed/Makefile \
9715            src/filed/bacula-fd.conf \
9716            src/filed/win32/Makefile \
9717            src/cats/Makefile \
9718            src/cats/alter_mysql_tables \
9719            src/cats/make_mysql_tables \
9720            src/cats/drop_mysql_tables \
9721            src/cats/create_mysql_database \
9722            src/cats/grant_mysql_privileges \
9723            src/cats/alter_sqlite_tables \
9724            src/cats/make_sqlite_tables \
9725            src/cats/drop_sqlite_tables \
9726            src/cats/create_sqlite_database \
9727            src/cats/sqlite \
9728            src/cats/mysql \
9729            src/cats/create_bdb_database \
9730            src/cats/make_bdb_tables \
9731            src/cats/drop_bdb_tables \
9732            src/cats/make_bacula_tables \
9733            src/cats/drop_bacula_tables \
9734            src/findlib/Makefile \
9735            src/tools/Makefile \
9736            $PFILES "}
9737 EOF
9738 cat >> $CONFIG_STATUS <<\EOF
9739 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9740   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9741   case "$ac_file" in
9742   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9743        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9744   *) ac_file_in="${ac_file}.in" ;;
9745   esac
9746
9747   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9748
9749   # Remove last slash and all that follows it.  Not all systems have dirname.
9750   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9751   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9752     # The file is in a subdirectory.
9753     test ! -d "$ac_dir" && mkdir "$ac_dir"
9754     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9755     # A "../" for each directory in $ac_dir_suffix.
9756     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9757   else
9758     ac_dir_suffix= ac_dots=
9759   fi
9760
9761   case "$ac_given_srcdir" in
9762   .)  srcdir=.
9763       if test -z "$ac_dots"; then top_srcdir=.
9764       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9765   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9766   *) # Relative path.
9767     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9768     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9769   esac
9770
9771   case "$ac_given_INSTALL" in
9772   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9773   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9774   esac
9775
9776   echo creating "$ac_file"
9777   rm -f "$ac_file"
9778   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9779   case "$ac_file" in
9780   *Makefile*) ac_comsub="1i\\
9781 # $configure_input" ;;
9782   *) ac_comsub= ;;
9783   esac
9784
9785   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9786   sed -e "$ac_comsub
9787 s%@configure_input@%$configure_input%g
9788 s%@srcdir@%$srcdir%g
9789 s%@top_srcdir@%$top_srcdir%g
9790 s%@INSTALL@%$INSTALL%g
9791 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9792 fi; done
9793 rm -f conftest.s*
9794
9795 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9796 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9797 #
9798 # ac_d sets the value in "#define NAME VALUE" lines.
9799 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9800 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9801 ac_dC='\3'
9802 ac_dD='%g'
9803 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9804 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9805 ac_uB='\([      ]\)%\1#\2define\3'
9806 ac_uC=' '
9807 ac_uD='\4%g'
9808 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9809 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9810 ac_eB='$%\1#\2define\3'
9811 ac_eC=' '
9812 ac_eD='%g'
9813
9814 if test "${CONFIG_HEADERS+set}" != set; then
9815 EOF
9816 cat >> $CONFIG_STATUS <<EOF
9817   CONFIG_HEADERS="src/config.h:autoconf/config.h.in"
9818 EOF
9819 cat >> $CONFIG_STATUS <<\EOF
9820 fi
9821 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9822   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9823   case "$ac_file" in
9824   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9825        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9826   *) ac_file_in="${ac_file}.in" ;;
9827   esac
9828
9829   echo creating $ac_file
9830
9831   rm -f conftest.frag conftest.in conftest.out
9832   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9833   cat $ac_file_inputs > conftest.in
9834
9835 EOF
9836
9837 # Transform confdefs.h into a sed script conftest.vals that substitutes
9838 # the proper values into config.h.in to produce config.h.  And first:
9839 # Protect against being on the right side of a sed subst in config.status.
9840 # Protect against being in an unquoted here document in config.status.
9841 rm -f conftest.vals
9842 cat > conftest.hdr <<\EOF
9843 s/[\\&%]/\\&/g
9844 s%[\\$`]%\\&%g
9845 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9846 s%ac_d%ac_u%gp
9847 s%ac_u%ac_e%gp
9848 EOF
9849 sed -n -f conftest.hdr confdefs.h > conftest.vals
9850 rm -f conftest.hdr
9851
9852 # This sed command replaces #undef with comments.  This is necessary, for
9853 # example, in the case of _POSIX_SOURCE, which is predefined and required
9854 # on some systems where configure will not decide to define it.
9855 cat >> conftest.vals <<\EOF
9856 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9857 EOF
9858
9859 # Break up conftest.vals because some shells have a limit on
9860 # the size of here documents, and old seds have small limits too.
9861
9862 rm -f conftest.tail
9863 while :
9864 do
9865   ac_lines=`grep -c . conftest.vals`
9866   # grep -c gives empty output for an empty file on some AIX systems.
9867   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9868   # Write a limited-size here document to conftest.frag.
9869   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9870   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9871   echo 'CEOF
9872   sed -f conftest.frag conftest.in > conftest.out
9873   rm -f conftest.in
9874   mv conftest.out conftest.in
9875 ' >> $CONFIG_STATUS
9876   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9877   rm -f conftest.vals
9878   mv conftest.tail conftest.vals
9879 done
9880 rm -f conftest.vals
9881
9882 cat >> $CONFIG_STATUS <<\EOF
9883   rm -f conftest.frag conftest.h
9884   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9885   cat conftest.in >> conftest.h
9886   rm -f conftest.in
9887   if cmp -s $ac_file conftest.h 2>/dev/null; then
9888     echo "$ac_file is unchanged"
9889     rm -f conftest.h
9890   else
9891     # Remove last slash and all that follows it.  Not all systems have dirname.
9892       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9893       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9894       # The file is in a subdirectory.
9895       test ! -d "$ac_dir" && mkdir "$ac_dir"
9896     fi
9897     rm -f $ac_file
9898     mv conftest.h $ac_file
9899   fi
9900 fi; done
9901
9902 EOF
9903 cat >> $CONFIG_STATUS <<EOF
9904
9905 EOF
9906 cat >> $CONFIG_STATUS <<\EOF
9907 (echo "Doing make of dependencies"; make depend;) 
9908
9909 exit 0
9910 EOF
9911 chmod +x $CONFIG_STATUS
9912 rm -fr confdefs* $ac_clean_files
9913 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9914
9915
9916 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
9917 chmod 755 console gconsole
9918 cp -f startit stopit btraceback btraceback.gdb src/console
9919 cp -f startit stopit btraceback btraceback.gdb src/dird
9920 cp -f startit stopit btraceback btraceback.gdb src/filed
9921 cp -f startit stopit btraceback btraceback.gdb src/lib
9922 cp -f startit stopit btraceback btraceback.gdb src/stored
9923 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
9924 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
9925 chmod 755 src/cats/create_mysql_database 
9926 chmod 755 src/cats/alter_mysql_tables
9927 chmod 755 src/cats/grant_mysql_privileges
9928 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables 
9929 chmod 755 src/cats/create_sqlite_database
9930 chmod 755 src/cats/alter_sqlite_tables
9931 chmod 755 src/cats/sqlite
9932 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables 
9933 chmod 755 src/cats/create_bdb_database
9934
9935 if test x$ac_cv_sys_largefile_CFLAGS != xno ; then
9936    ac_cv_sys_largefile_CFLAGS="yes"
9937 fi
9938
9939
9940 echo "
9941 Configuration on `date`:
9942
9943   Host:                       ${DISTNAME} ${DISTVER}
9944   Bacula version:             ${VERSION} (${DATE})
9945   Source code location:       ${srcdir}
9946   Install binaries:           ${sbindir}
9947   Install config files:       ${sysconfdir}
9948   C Compiler:                 ${CC}
9949   C++ Compiler:               ${CXX}
9950   Compiler flags:             ${CFLAGS} 
9951   Linker flags:               ${LDFLAGS}
9952   Libraries:                  ${LIBS}
9953   Statically Linked Tools:    ${support_static_tools}
9954   Database found:             ${have_db}
9955   Database type:              ${db_name}
9956   Database lib:               ${DB_LIBS}
9957
9958   Job Output Email:           ${job_email}
9959   Traceback Email:            ${dump_email}
9960   SMTP Host Address:          ${smtp_host}
9961   Director Port               ${dir_port}
9962   File daemon Port            ${fd_port}
9963   Storage daemon Port         ${sd_port}
9964   Working directory           ${working_dir}
9965   SQL binaries Directory      ${SQL_BINDIR}
9966
9967   Large file support:         $ac_cv_sys_largefile_CFLAGS
9968   readline support:           ${got_readline} ${PRTREADLINE_SRC}
9969   cweb support:               ${got_cweb} ${CWEB_SRC}
9970   TCP Wrappers support:       ${TCPW_MSG}
9971   ZLIB support:               ${have_zlib}
9972   enable-smartalloc:          ${support_smartalloc} 
9973   enable-gnome:               ${support_gnome}
9974   gmp support:                ${got_gmp} ${GMP_SRC}
9975
9976   " > config.out
9977
9978 cat config.out