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