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