]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
Update home page
[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` = xAIX
2223 then
2224         DISTNAME=aix
2225 elif test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
2226 then
2227         DISTNAME=hpux
2228 elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
2229 then
2230         DISTNAME=solaris
2231 elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
2232 then
2233         DISTNAME=freebsd
2234 elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
2235 then
2236         DISTNAME=netbsd
2237 elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
2238 then
2239         DISTNAME=openbsd
2240 elif test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
2241 then
2242         DISTNAME=irix
2243 elif test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
2244 then
2245         DISTNAME=bsdi
2246 elif test -f /etc/SuSE-release
2247 then
2248         DISTNAME=suse
2249 elif test -d /etc/SuSEconfig
2250 then
2251         DISTNAME=suse5
2252 elif test -d /usr/src/OpenLinux
2253 then
2254         DISTNAME=caldera
2255 elif test -f /etc/redhat-release
2256 then
2257         DISTNAME=redhat
2258 elif test -f /etc/gentoo-release
2259 then
2260         DISTNAME=gentoo
2261 elif test -f /etc/debian_version
2262 then
2263         DISTNAME=debian
2264 elif test -f /etc/slackware-version
2265 then
2266         DISTNAME=slackware
2267 elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
2268 then
2269     DISTNAME=darwin
2270 elif test "$ac_cv_cygwin" = yes
2271 then
2272         DISTNAME=cygwin
2273         cat >> confdefs.h <<\EOF
2274 #define HAVE_CYGWIN 1
2275 EOF
2276
2277 else
2278         DISTNAME=unknown
2279 fi
2280 echo "$ac_t""" "" 1>&6
2281
2282
2283 # -----------------------------------------------------------
2284 # ----------------------------------------------------------
2285
2286         
2287
2288 if false; then
2289   INSIDE_GNOME_COMMON_TRUE=
2290   INSIDE_GNOME_COMMON_FALSE='#'
2291 else
2292   INSIDE_GNOME_COMMON_TRUE='#'
2293   INSIDE_GNOME_COMMON_FALSE=
2294 fi
2295
2296         test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
2297
2298         for k in gnome-macros ; do ACLOCAL="$ACLOCAL -I $k" ; done
2299
2300
2301 # ------------------------------------------------------------------
2302 #  If the user has not set --prefix, we set our default to nothing.
2303 #  In this case, if the user has not set --sysconfdir, we set it
2304 #  to the package default of /etc/bacula.  If either --prefix or
2305 #  --sysconfdir is set, we leave sysconfdir alone except to eval it.
2306 # ------------------------------------------------------------------
2307 if test x${prefix} = xNONE ; then
2308     if test `eval echo ${sysconfdir}` = NONE/etc ; then
2309         sysconfdir=/etc/bacula
2310     fi
2311     prefix=
2312 fi
2313 sysconfdir=`eval echo ${sysconfdir}`
2314
2315 # -------------------------------------------------------------------------
2316 #  If the user has not set --exec-prefix, we default to ${prefix}
2317 # -------------------------------------------------------------------------
2318 if test x${exec_prefix} = xNONE ; then
2319     exec_prefix=${prefix}
2320 fi
2321
2322 # ------------------------------------------------------------------
2323 # If the user has not set --sbindir, we set our default as /sbin
2324 # ------------------------------------------------------------------
2325 if test x$sbindir = x'${exec_prefix}/sbin' ; then
2326     sbindir=${exec_prefix}/sbin
2327 fi
2328 sbindir=`eval echo ${sbindir}`
2329                       
2330 # ------------------------------------------------------------------
2331 # All list of languages for which a translation exist. Each
2332 #  language is separated by a space.
2333 # ------------------------------------------------------------------
2334 ALL_LINGUAS=""
2335
2336 for ac_prog in msgfmt
2337 do
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2341 echo "configure:2342: checking for $ac_word" >&5
2342 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2343   echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345   case "$MSGFMT" in
2346   /*)
2347   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2348   ;;
2349   ?:/*)                  
2350   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
2351   ;;
2352   *)
2353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2354   ac_dummy="$PATH"
2355   for ac_dir in $ac_dummy; do 
2356     test -z "$ac_dir" && ac_dir=.
2357     if test -f $ac_dir/$ac_word; then
2358       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2359       break
2360     fi
2361   done
2362   IFS="$ac_save_ifs"
2363   ;;
2364 esac
2365 fi
2366 MSGFMT="$ac_cv_path_MSGFMT"
2367 if test -n "$MSGFMT"; then
2368   echo "$ac_t""$MSGFMT" 1>&6
2369 else
2370   echo "$ac_t""no" 1>&6
2371 fi
2372
2373 test -n "$MSGFMT" && break
2374 done
2375 test -n "$MSGFMT" || MSGFMT="no"
2376
2377 if test "$MSGFMT" = "no"
2378 then
2379    echo 'msgfmt program not found, disabling NLS !'
2380    USE_NLS=no
2381    USE_INCLUDED_LIBINTL=no
2382 #else
2383 #   AM_GNU_GETTEXT
2384 fi
2385
2386
2387 support_mysql=no
2388 support_sqlite=no
2389 support_smartalloc=yes
2390 support_readline=yes
2391 support_gnome=no
2392 support_static_tools=no
2393 support_static_fd=no
2394 support_static_sd=no
2395 support_static_dir=no
2396 support_static_cons=no
2397 build_client_only=no
2398 cats=
2399 db_name=Internal
2400 DB_NAME=bdb
2401
2402
2403 # -------------------------------------------
2404 # gnome (default off)
2405 # -------------------------------------------
2406 # Check whether --enable-gnome or --disable-gnome was given.
2407 if test "${enable_gnome+set}" = set; then
2408   enableval="$enable_gnome"
2409   if test x$enableval = xyes; then
2410     support_gnome=yes
2411   fi
2412 fi
2413
2414
2415 GNOME_DIR=
2416 if test x$support_gnome = xyes; then
2417     
2418         
2419         
2420         
2421         
2422         
2423         
2424         
2425         
2426
2427         # Check whether --with-gnome-includes or --without-gnome-includes was given.
2428 if test "${with_gnome_includes+set}" = set; then
2429   withval="$with_gnome_includes"
2430   
2431         CFLAGS="$CFLAGS -I$withval"
2432         
2433 fi
2434
2435         
2436         # Check whether --with-gnome-libs or --without-gnome-libs was given.
2437 if test "${with_gnome_libs+set}" = set; then
2438   withval="$with_gnome_libs"
2439   
2440         LDFLAGS="$LDFLAGS -L$withval"
2441         gnome_prefix=$withval
2442         
2443 fi
2444
2445
2446         # Check whether --with-gnome or --without-gnome was given.
2447 if test "${with_gnome+set}" = set; then
2448   withval="$with_gnome"
2449   if test x$withval = xyes; then
2450                         want_gnome=yes
2451                                                                         :
2452                 else
2453                         if test "x$withval" = xno; then
2454                                 want_gnome=no
2455                         else
2456                                 want_gnome=yes
2457                                 LDFLAGS="$LDFLAGS -L$withval/lib"
2458                                 CFLAGS="$CFLAGS -I$withval/include"
2459                                 gnome_prefix=$withval/lib
2460                         fi
2461                 fi
2462 else
2463   want_gnome=yes
2464 fi
2465
2466
2467         if test "x$want_gnome" = xyes; then
2468
2469             # Extract the first word of "gnome-config", so it can be a program name with args.
2470 set dummy gnome-config; ac_word=$2
2471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2472 echo "configure:2473: checking for $ac_word" >&5
2473 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   case "$GNOME_CONFIG" in
2477   /*)
2478   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
2479   ;;
2480   ?:/*)                  
2481   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
2482   ;;
2483   *)
2484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2485   ac_dummy="$PATH"
2486   for ac_dir in $ac_dummy; do 
2487     test -z "$ac_dir" && ac_dir=.
2488     if test -f $ac_dir/$ac_word; then
2489       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
2490       break
2491     fi
2492   done
2493   IFS="$ac_save_ifs"
2494   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
2495   ;;
2496 esac
2497 fi
2498 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
2499 if test -n "$GNOME_CONFIG"; then
2500   echo "$ac_t""$GNOME_CONFIG" 1>&6
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504
2505             if test "$GNOME_CONFIG" = "no"; then
2506               no_gnome_config="yes"
2507             else
2508               echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
2509 echo "configure:2510: checking if $GNOME_CONFIG works" >&5
2510               if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
2511                 echo "$ac_t""yes" 1>&6
2512                 
2513         
2514         # Extract the first word of "orbit-config", so it can be a program name with args.
2515 set dummy orbit-config; ac_word=$2
2516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2517 echo "configure:2518: checking for $ac_word" >&5
2518 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   case "$ORBIT_CONFIG" in
2522   /*)
2523   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
2524   ;;
2525   ?:/*)                  
2526   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path.
2527   ;;
2528   *)
2529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2530   ac_dummy="$PATH"
2531   for ac_dir in $ac_dummy; do 
2532     test -z "$ac_dir" && ac_dir=.
2533     if test -f $ac_dir/$ac_word; then
2534       ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word"
2535       break
2536     fi
2537   done
2538   IFS="$ac_save_ifs"
2539   test -z "$ac_cv_path_ORBIT_CONFIG" && ac_cv_path_ORBIT_CONFIG="no"
2540   ;;
2541 esac
2542 fi
2543 ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
2544 if test -n "$ORBIT_CONFIG"; then
2545   echo "$ac_t""$ORBIT_CONFIG" 1>&6
2546 else
2547   echo "$ac_t""no" 1>&6
2548 fi
2549
2550         # Extract the first word of "orbit-idl", so it can be a program name with args.
2551 set dummy orbit-idl; ac_word=$2
2552 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2553 echo "configure:2554: checking for $ac_word" >&5
2554 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then
2555   echo $ac_n "(cached) $ac_c" 1>&6
2556 else
2557   case "$ORBIT_IDL" in
2558   /*)
2559   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a path.
2560   ;;
2561   ?:/*)                  
2562   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a dos path.
2563   ;;
2564   *)
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2566   ac_dummy="$PATH"
2567   for ac_dir in $ac_dummy; do 
2568     test -z "$ac_dir" && ac_dir=.
2569     if test -f $ac_dir/$ac_word; then
2570       ac_cv_path_ORBIT_IDL="$ac_dir/$ac_word"
2571       break
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   test -z "$ac_cv_path_ORBIT_IDL" && ac_cv_path_ORBIT_IDL="no"
2576   ;;
2577 esac
2578 fi
2579 ORBIT_IDL="$ac_cv_path_ORBIT_IDL"
2580 if test -n "$ORBIT_IDL"; then
2581   echo "$ac_t""$ORBIT_IDL" 1>&6
2582 else
2583   echo "$ac_t""no" 1>&6
2584 fi
2585
2586         echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6
2587 echo "configure:2588: checking for working ORBit environment" >&5
2588 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then
2589   echo $ac_n "(cached) $ac_c" 1>&6
2590 else
2591   
2592                 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
2593                         gnome_cv_orbit_found=no
2594                 else
2595                         gnome_cv_orbit_found=yes
2596                 fi
2597         
2598 fi
2599
2600 echo "$ac_t""$gnome_cv_orbit_found" 1>&6
2601         
2602
2603 if test x$gnome_cv_orbit_found = xyes; then
2604   HAVE_ORBIT_TRUE=
2605   HAVE_ORBIT_FALSE='#'
2606 else
2607   HAVE_ORBIT_TRUE='#'
2608   HAVE_ORBIT_FALSE=
2609 fi
2610         if test x$gnome_cv_orbit_found = xyes; then
2611                 
2612                 ORBIT_CFLAGS=`orbit-config --cflags client server`
2613                 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
2614                 
2615                 
2616         else
2617                 if test xfail = xfailure; then
2618                         { echo "configure: error: ORBit not installed or installation problem" 1>&2; exit 1; }
2619                 fi
2620         fi
2621
2622         echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6
2623 echo "configure:2624: checking for gnorba libraries" >&5
2624 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   
2628                 gnome_cv_gnorba_found=no
2629                 if test x$gnome_cv_orbit_found = xyes; then
2630                         GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2631                         GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2632                         if test -n "$GNORBA_LIBS"; then
2633                                 gnome_cv_gnorba_found=yes
2634                         fi
2635                 fi
2636         
2637 fi
2638
2639 echo "$ac_t""$gnome_cv_gnorba_found" 1>&6
2640         
2641
2642 if test x$gnome_cv_gnorba_found = xyes; then
2643   HAVE_GNORBA_TRUE=
2644   HAVE_GNORBA_FALSE='#'
2645 else
2646   HAVE_GNORBA_TRUE='#'
2647   HAVE_GNORBA_FALSE=
2648 fi
2649         if test x$gnome_cv_orbit_found = xyes; then
2650                 
2651                 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2652                 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2653                 
2654                 
2655         else
2656                 if test xfail = xfailure; then
2657                         { echo "configure: error: gnorba library not installed or installation problem" 1>&2; exit 1; }
2658                 fi
2659         fi
2660
2661                 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
2662                 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
2663                 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
2664                 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
2665                 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
2666                 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
2667                 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
2668                 
2669               else
2670                 echo "$ac_t""no" 1>&6
2671                 no_gnome_config="yes"
2672               fi
2673             fi
2674
2675             if test x$exec_prefix = xNONE; then
2676                 if test x$prefix = xNONE; then
2677                     gnome_prefix=$ac_default_prefix/lib
2678                 else
2679                     gnome_prefix=$prefix/lib
2680                 fi
2681             else
2682                 gnome_prefix=`eval echo \`echo $libdir\``
2683             fi
2684         
2685             if test "$no_gnome_config" = "yes"; then
2686               echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
2687 echo "configure:2688: checking for gnomeConf.sh file in $gnome_prefix" >&5
2688               if test -f $gnome_prefix/gnomeConf.sh; then
2689                 echo "$ac_t""found" 1>&6
2690                 echo "loading gnome configuration from" \
2691                      "$gnome_prefix/gnomeConf.sh"
2692                 . $gnome_prefix/gnomeConf.sh
2693                 
2694               else
2695                 echo "$ac_t""not found" 1>&6
2696                 if test xfail = xfail; then
2697                   { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
2698                 fi
2699               fi
2700             fi
2701         fi
2702
2703         if test -n ""; then
2704           n=""
2705           for i in $n; do
2706             echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6
2707 echo "configure:2708: checking extra library \"$i\"" >&5
2708             case $i in 
2709               applets)
2710                 
2711                 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
2712                 echo "$ac_t""$GNOME_APPLETS_LIBS" 1>&6;;
2713               docklets)
2714                 
2715                 GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
2716                 echo "$ac_t""$GNOME_DOCKLETS_LIBS" 1>&6;;
2717               capplet)
2718                 
2719                 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
2720                 echo "$ac_t""$GNOME_CAPPLET_LIBS" 1>&6;;
2721               *)
2722                 echo "$ac_t""unknown library" 1>&6
2723             esac
2724             EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i`
2725             GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR"
2726           done
2727         fi
2728
2729
2730     GNOME_DIR=src/gnome-console
2731 fi
2732
2733
2734
2735 # -------------------------------------------
2736 # smartalloc (default off)
2737 # -------------------------------------------
2738 # Check whether --enable-smartalloc or --disable-smartalloc was given.
2739 if test "${enable_smartalloc+set}" = set; then
2740   enableval="$enable_smartalloc"
2741   if test x$enableval = xno; then
2742     support_smartalloc=no
2743   fi
2744 fi
2745
2746
2747 if test x$support_smartalloc = xyes; then
2748    cat >> confdefs.h <<\EOF
2749 #define SMARTALLOC 1
2750 EOF
2751
2752 fi
2753
2754 # -------------------------------------------
2755 # static-tools (default off)
2756 # -------------------------------------------
2757 # Check whether --enable-static-tools or --disable-static-tools was given.
2758 if test "${enable_static_tools+set}" = set; then
2759   enableval="$enable_static_tools"
2760   if test x$enableval = xyes; then
2761      support_static_tools=yes
2762    fi
2763 fi
2764
2765
2766 TTOOL_LDFLAGS=
2767 if test x$support_static_tools = xyes; then
2768    TTOOL_LDFLAGS="-static"
2769 fi
2770
2771
2772 # -------------------------------------------
2773 # static-fd    (default off)
2774 # -------------------------------------------
2775 # Check whether --enable-static-fd or --disable-static-fd was given.
2776 if test "${enable_static_fd+set}" = set; then
2777   enableval="$enable_static_fd"
2778   if test x$enableval = xyes; then
2779      support_static_fd=yes
2780    fi
2781 fi
2782
2783
2784 STATIC_FD=
2785 if test x$support_static_fd = xyes; then
2786    STATIC_FD="static-bacula-fd"
2787 fi
2788
2789
2790 # -------------------------------------------
2791 # static-sd    (default off)
2792 # -------------------------------------------
2793 # Check whether --enable-static-sd or --disable-static-sd was given.
2794 if test "${enable_static_sd+set}" = set; then
2795   enableval="$enable_static_sd"
2796   if test x$enableval = xyes; then
2797      support_static_sd=yes
2798    fi
2799 fi
2800
2801
2802 STATIC_SD=
2803 if test x$support_static_sd = xyes; then
2804    STATIC_SD="static-bacula-sd"
2805 fi
2806
2807
2808 # -------------------------------------------
2809 # static-dir   (default off)
2810 # -------------------------------------------
2811 # Check whether --enable-static-dir or --disable-static-dir was given.
2812 if test "${enable_static_dir+set}" = set; then
2813   enableval="$enable_static_dir"
2814   if test x$enableval = xyes; then
2815      support_static_dir=yes
2816    fi
2817 fi
2818
2819
2820 STATIC_DIR=
2821 if test x$support_static_dir = xyes; then
2822    STATIC_DIR="static-bacula-dir"
2823 fi
2824
2825
2826 # -------------------------------------------
2827 # static-cons  (default off)
2828 # -------------------------------------------
2829 # Check whether --enable-static-cons or --disable-static-cons was given.
2830 if test "${enable_static_cons+set}" = set; then
2831   enableval="$enable_static_cons"
2832   if test x$enableval = xyes; then
2833      support_static_cons=yes
2834    fi
2835 fi
2836
2837
2838 STATIC_CONS=
2839 if test x$support_static_cons = xyes; then
2840    STATIC_CONS="static-console"
2841 fi
2842
2843
2844 # -------------------------------------------
2845 # client_only  (default off)
2846 # -------------------------------------------
2847 # Check whether --enable-client-only or --disable-client-only was given.
2848 if test "${enable_client_only+set}" = set; then
2849   enableval="$enable_client_only"
2850   if test x$enableval = xyes; then
2851      build_client_only=yes
2852    fi
2853 fi
2854
2855 if test x$build_client_only = xno; then
2856    ALL_DIRS="subdirs"
2857 else
2858    ALL_DIRS=""
2859 fi
2860
2861
2862 # ---------------------------------------------------
2863 # Check for readline support/directory (default on)
2864 # ---------------------------------------------------
2865 # this allows you to turn it completely off
2866 # Check whether --enable-readline or --disable-readline was given.
2867 if test "${enable_readline+set}" = set; then
2868   enableval="$enable_readline"
2869   if test x$enableval = xno; then
2870     support_readline=no
2871   fi
2872 fi
2873
2874
2875 got_readline="no"
2876 READLINE_SRC=
2877 if test x$support_readline = xyes; then
2878    # Check whether --with-readline or --without-readline was given.
2879 if test "${with_readline+set}" = set; then
2880   withval="$with_readline"
2881   
2882         case "$with_readline" in
2883         no) : ;;
2884         yes|*)
2885           if test "$with_readline" != "yes"; then
2886             CONS_INC="-I$with_readline"
2887             CONS_LDFLAGS="-L$with_readline"
2888           else
2889              with_readline="/usr/include/readline" 
2890           fi
2891           ac_safe=`echo "$with_readline/readline.h" | sed 'y%./+-%__p_%'`
2892 echo $ac_n "checking for $with_readline/readline.h""... $ac_c" 1>&6
2893 echo "configure:2894: checking for $with_readline/readline.h" >&5
2894 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2895   echo $ac_n "(cached) $ac_c" 1>&6
2896 else
2897   cat > conftest.$ac_ext <<EOF
2898 #line 2899 "configure"
2899 #include "confdefs.h"
2900 #include <$with_readline/readline.h>
2901 EOF
2902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2903 { (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2905 if test -z "$ac_err"; then
2906   rm -rf conftest*
2907   eval "ac_cv_header_$ac_safe=yes"
2908 else
2909   echo "$ac_err" >&5
2910   echo "configure: failed program was:" >&5
2911   cat conftest.$ac_ext >&5
2912   rm -rf conftest*
2913   eval "ac_cv_header_$ac_safe=no"
2914 fi
2915 rm -f conftest*
2916 fi
2917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2918   echo "$ac_t""yes" 1>&6
2919    echo "$ac_t""yes" 1>&6
2920                cat >> confdefs.h <<\EOF
2921 #define HAVE_READLINE 1
2922 EOF
2923  
2924                CONS_LIBS="-lreadline -ltermcap"
2925                got_readline="yes"   
2926              
2927 else
2928   echo "$ac_t""no" 1>&6
2929  { echo "configure: error: *** readline library missing" 1>&2; exit 1; } 
2930              
2931           
2932 fi
2933
2934           ;;
2935         esac
2936      
2937 else
2938   
2939        # check for standard readline library
2940        ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
2941 echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
2942 echo "configure:2943: checking for /usr/include/readline/readline.h" >&5
2943 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 #include </usr/include/readline/readline.h>
2950 EOF
2951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2952 { (eval echo configure:2953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2954 if test -z "$ac_err"; then
2955   rm -rf conftest*
2956   eval "ac_cv_header_$ac_safe=yes"
2957 else
2958   echo "$ac_err" >&5
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_header_$ac_safe=no"
2963 fi
2964 rm -f conftest*
2965 fi
2966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2967   echo "$ac_t""yes" 1>&6
2968    echo "$ac_t""yes" 1>&6
2969          cat >> confdefs.h <<\EOF
2970 #define HAVE_READLINE 1
2971 EOF
2972
2973          got_readline="yes"
2974          CONS_INC="-I/usr/include/readline"
2975          CONS_LIBS="-lreadline -ltermcap"
2976        
2977 else
2978   echo "$ac_t""no" 1>&6
2979
2980          # Did not find starndard library, so user our own
2981          echo "$ac_t""yes" 1>&6
2982          cat >> confdefs.h <<\EOF
2983 #define HAVE_READLINE 1
2984 EOF
2985
2986          got_readline="yes"
2987          CONS_INC="-I${TOP_DIR}/depkgs"
2988          CONS_LIBS="-lreadline -lhistory -ltermcap"
2989          CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
2990          PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
2991        
2992 fi
2993
2994          
2995    
2996 fi
2997
2998 fi
2999
3000
3001
3002
3003
3004 # Minimal stuff for readline Makefile configuration
3005 MAKE_SHELL=/bin/sh
3006
3007
3008 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3009 echo "configure:3010: checking whether stat file-mode macros are broken" >&5
3010 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3011   echo $ac_n "(cached) $ac_c" 1>&6
3012 else
3013   cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 #include <sys/types.h>
3017 #include <sys/stat.h>
3018
3019 #if defined(S_ISBLK) && defined(S_IFDIR)
3020 # if S_ISBLK (S_IFDIR)
3021 You lose.
3022 # endif
3023 #endif
3024
3025 #if defined(S_ISBLK) && defined(S_IFCHR)
3026 # if S_ISBLK (S_IFCHR)
3027 You lose.
3028 # endif
3029 #endif
3030
3031 #if defined(S_ISLNK) && defined(S_IFREG)
3032 # if S_ISLNK (S_IFREG)
3033 You lose.
3034 # endif
3035 #endif
3036
3037 #if defined(S_ISSOCK) && defined(S_IFREG)
3038 # if S_ISSOCK (S_IFREG)
3039 You lose.
3040 # endif
3041 #endif
3042
3043 EOF
3044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3045   egrep "You lose" >/dev/null 2>&1; then
3046   rm -rf conftest*
3047   ac_cv_header_stat_broken=yes
3048 else
3049   rm -rf conftest*
3050   ac_cv_header_stat_broken=no
3051 fi
3052 rm -f conftest*
3053
3054 fi
3055
3056 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3057 if test $ac_cv_header_stat_broken = yes; then
3058   cat >> confdefs.h <<\EOF
3059 #define STAT_MACROS_BROKEN 1
3060 EOF
3061
3062 fi
3063
3064 ac_header_dirent=no
3065 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3066 do
3067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3068 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3069 echo "configure:3070: checking for $ac_hdr that defines DIR" >&5
3070 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   cat > conftest.$ac_ext <<EOF
3074 #line 3075 "configure"
3075 #include "confdefs.h"
3076 #include <sys/types.h>
3077 #include <$ac_hdr>
3078 int main() {
3079 DIR *dirp = 0;
3080 ; return 0; }
3081 EOF
3082 if { (eval echo configure:3083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3083   rm -rf conftest*
3084   eval "ac_cv_header_dirent_$ac_safe=yes"
3085 else
3086   echo "configure: failed program was:" >&5
3087   cat conftest.$ac_ext >&5
3088   rm -rf conftest*
3089   eval "ac_cv_header_dirent_$ac_safe=no"
3090 fi
3091 rm -f conftest*
3092 fi
3093 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3094   echo "$ac_t""yes" 1>&6
3095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3096   cat >> confdefs.h <<EOF
3097 #define $ac_tr_hdr 1
3098 EOF
3099  ac_header_dirent=$ac_hdr; break
3100 else
3101   echo "$ac_t""no" 1>&6
3102 fi
3103 done
3104 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3105 if test $ac_header_dirent = dirent.h; then
3106 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3107 echo "configure:3108: checking for opendir in -ldir" >&5
3108 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   ac_save_LIBS="$LIBS"
3113 LIBS="-ldir  $LIBS"
3114 cat > conftest.$ac_ext <<EOF
3115 #line 3116 "configure"
3116 #include "confdefs.h"
3117 /* Override any gcc2 internal prototype to avoid an error.  */
3118 /* We use char because int might match the return type of a gcc2
3119     builtin and then its argument prototype would still apply.  */
3120 char opendir();
3121
3122 int main() {
3123 opendir()
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3127   rm -rf conftest*
3128   eval "ac_cv_lib_$ac_lib_var=yes"
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_lib_$ac_lib_var=no"
3134 fi
3135 rm -f conftest*
3136 LIBS="$ac_save_LIBS"
3137
3138 fi
3139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141   LIBS="$LIBS -ldir"
3142 else
3143   echo "$ac_t""no" 1>&6
3144 fi
3145
3146 else
3147 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3148 echo "configure:3149: checking for opendir in -lx" >&5
3149 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3151   echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153   ac_save_LIBS="$LIBS"
3154 LIBS="-lx  $LIBS"
3155 cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158 /* Override any gcc2 internal prototype to avoid an error.  */
3159 /* We use char because int might match the return type of a gcc2
3160     builtin and then its argument prototype would still apply.  */
3161 char opendir();
3162
3163 int main() {
3164 opendir()
3165 ; return 0; }
3166 EOF
3167 if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3168   rm -rf conftest*
3169   eval "ac_cv_lib_$ac_lib_var=yes"
3170 else
3171   echo "configure: failed program was:" >&5
3172   cat conftest.$ac_ext >&5
3173   rm -rf conftest*
3174   eval "ac_cv_lib_$ac_lib_var=no"
3175 fi
3176 rm -f conftest*
3177 LIBS="$ac_save_LIBS"
3178
3179 fi
3180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3181   echo "$ac_t""yes" 1>&6
3182   LIBS="$LIBS -lx"
3183 else
3184   echo "$ac_t""no" 1>&6
3185 fi
3186
3187 fi
3188
3189
3190 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
3191 do
3192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3193 echo "configure:3194: checking for $ac_func" >&5
3194 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 /* System header to define __stub macros and hopefully few prototypes,
3201     which can conflict with char $ac_func(); below.  */
3202 #include <assert.h>
3203 /* Override any gcc2 internal prototype to avoid an error.  */
3204 /* We use char because int might match the return type of a gcc2
3205     builtin and then its argument prototype would still apply.  */
3206 char $ac_func();
3207
3208 int main() {
3209
3210 /* The GNU C library defines this for functions which it implements
3211     to always fail with ENOSYS.  Some functions are actually named
3212     something starting with __ and the normal name is an alias.  */
3213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3214 choke me
3215 #else
3216 $ac_func();
3217 #endif
3218
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3222   rm -rf conftest*
3223   eval "ac_cv_func_$ac_func=yes"
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   eval "ac_cv_func_$ac_func=no"
3229 fi
3230 rm -f conftest*
3231 fi
3232
3233 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3234   echo "$ac_t""yes" 1>&6
3235     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3236   cat >> confdefs.h <<EOF
3237 #define $ac_tr_func 1
3238 EOF
3239  
3240 else
3241   echo "$ac_t""no" 1>&6
3242 fi
3243 done
3244
3245
3246 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
3247 #   [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
3248 #    EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
3249
3250 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
3251 echo "configure:3252: checking for getopt_long" >&5
3252 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
3253   echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255   cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 /* System header to define __stub macros and hopefully few prototypes,
3259     which can conflict with char getopt_long(); below.  */
3260 #include <assert.h>
3261 /* Override any gcc2 internal prototype to avoid an error.  */
3262 /* We use char because int might match the return type of a gcc2
3263     builtin and then its argument prototype would still apply.  */
3264 char getopt_long();
3265
3266 int main() {
3267
3268 /* The GNU C library defines this for functions which it implements
3269     to always fail with ENOSYS.  Some functions are actually named
3270     something starting with __ and the normal name is an alias.  */
3271 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
3272 choke me
3273 #else
3274 getopt_long();
3275 #endif
3276
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3280   rm -rf conftest*
3281   eval "ac_cv_func_getopt_long=yes"
3282 else
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   eval "ac_cv_func_getopt_long=no"
3287 fi
3288 rm -f conftest*
3289 fi
3290
3291 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
3292   echo "$ac_t""yes" 1>&6
3293   cat >> confdefs.h <<\EOF
3294 #define HAVE_GETOPT_LONG 1
3295 EOF
3296
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300
3301
3302
3303 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
3304 echo "configure:3305: checking for working strcoll" >&5
3305 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
3306   echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308   if test "$cross_compiling" = yes; then
3309   ac_cv_func_strcoll_works=no
3310 else
3311   cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 #include <string.h>
3315 main ()
3316 {
3317   exit (strcoll ("abc", "def") >= 0 ||
3318         strcoll ("ABC", "DEF") >= 0 ||
3319         strcoll ("123", "456") >= 0);
3320 }
3321 EOF
3322 if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3323 then
3324   ac_cv_func_strcoll_works=yes
3325 else
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -fr conftest*
3329   ac_cv_func_strcoll_works=no
3330 fi
3331 rm -fr conftest*
3332 fi
3333
3334 fi
3335
3336 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
3337 if test $ac_cv_func_strcoll_works = yes; then
3338   cat >> confdefs.h <<\EOF
3339 #define HAVE_STRCOLL 1
3340 EOF
3341
3342 fi
3343
3344
3345 for ac_hdr in varargs.h \
3346                 sys/ptem.h sys/pte.h sys/stream.h
3347 do
3348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_hdr" >&5
3351 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
3356 #include "confdefs.h"
3357 #include <$ac_hdr>
3358 EOF
3359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3360 { (eval echo configure:3361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3362 if test -z "$ac_err"; then
3363   rm -rf conftest*
3364   eval "ac_cv_header_$ac_safe=yes"
3365 else
3366   echo "$ac_err" >&5
3367   echo "configure: failed program was:" >&5
3368   cat conftest.$ac_ext >&5
3369   rm -rf conftest*
3370   eval "ac_cv_header_$ac_safe=no"
3371 fi
3372 rm -f conftest*
3373 fi
3374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3375   echo "$ac_t""yes" 1>&6
3376     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3377   cat >> confdefs.h <<EOF
3378 #define $ac_tr_hdr 1
3379 EOF
3380  
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384 done
3385         
3386
3387 # End of readline stuff
3388 # -----------------------------------------------------------------------
3389
3390
3391 # ---------------------------------------------------
3392 # Check for GMP support/directory
3393 # ---------------------------------------------------
3394 #GMP_SRC=
3395 #local_gmp="no"
3396 #AC_ARG_WITH(gmp,
3397 #  [  --with-gmp[=DIR]   Specify gmp library directory],
3398 #  [
3399 #     case "$with_gmp" in
3400 #     no) : ;;
3401 #     yes|*)
3402 #       if test "$with_gmp" != "yes"; then
3403 #         GMP_INC="-I$with_gmp"
3404 #         GMP_LIBS="-lgmp"
3405 #         GMP_LDFLAGS="-L$with_gmp"
3406 #       else
3407 #          with_gmp="/usr/include" 
3408 #       fi
3409 #       AC_CHECK_HEADER($with_gmp/gmp.h, 
3410 #          [ AC_MSG_RESULT(yes)
3411 #            AC_DEFINE(HAVE_GMP) 
3412 #            GMP_LIBS="-lgmp"
3413 #            got_gmp="yes"   
3414 #          ],
3415 #          [ AC_MSG_ERROR([*** gmp library missing]) 
3416 #          ]
3417 #       )
3418 #       ;;
3419 #     esac
3420 #  ],[
3421 #    # check for standard gmp library
3422 #    AC_CHECK_HEADER(/usr/include/gmp.h,
3423 #    [ AC_MSG_RESULT(yes)
3424 #      AC_DEFINE(HAVE_GMP)
3425 #      got_gmp="yes"
3426 #      GMP_INC=
3427 #      GMP_LIBS="-lgmp"
3428 #    ], [
3429 #      # Did not find standard library, so use our own
3430 #      AC_MSG_RESULT(yes)
3431 #      AC_DEFINE(HAVE_GMP)
3432 #      got_gmp="yes"
3433 #      local_gmp="yes"
3434 #      GMP_INC="-I${TOP_DIR}/depkgs/gmp"
3435 #      GMP_LIBS="-lgmp"
3436 #      GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
3437 #      GMP_SRC="${TOP_DIR}/depkgs/gmp"
3438 #    ])
3439 #  ]   
3440 #)
3441 #AC_SUBST(GMP_INC)
3442 #AC_SUBST(GMP_LIBS)
3443 #AC_SUBST(GMP_LDFLAGS)
3444 #AC_SUBST(GMP_SRC)
3445
3446 # End of GMP stuff
3447 # -----------------------------------------------------------------------
3448
3449
3450 # ---------------------------------------------------
3451 # Check for CWEB support/directory
3452 # ---------------------------------------------------
3453 #CWEB_SRC=
3454 #CWEB=/bin
3455 #local_cweb="no"
3456 #AC_ARG_WITH(cweb,
3457 #  [  --with-cweb[=DIR]   Specify cweb library directory],
3458 #  [
3459 #     case "$with_cweb" in
3460 #     no) : ;;
3461 #     yes|*)
3462 #       if test "$with_cweb" != "yes"; then
3463 #         CWEB_INC="-I$with_cweb"
3464 #         CWEB_LIBS="-lcweb"
3465 #         CWEB_LDFLAGS="-L$with_cweb"
3466 #       else
3467 #          with_cweb="/usr/include" 
3468 #       fi
3469 #       AC_CHECK_HEADER($with_cweb/cweb.h, 
3470 #          [ AC_MSG_RESULT(yes)
3471 #            AC_DEFINE(HAVE_CWEB) 
3472 #            CWEB_LIBS="-lcweb"
3473 #            got_cweb="yes"   
3474 #          ],
3475 #          [ AC_MSG_ERROR([*** cweb library missing]) 
3476 #          ]
3477 #       )
3478 #       ;;
3479 #     esac
3480 #  ],[
3481 #    # check for standard cweb library
3482 #    AC_CHECK_HEADER(/usr/include/cweb.h,
3483 #    [ AC_MSG_RESULT(yes)
3484 #      AC_DEFINE(HAVE_CWEB)
3485 #      got_cweb="yes"
3486 #      CWEB_INC=
3487 #      CWEB_LIBS="-lcweb"
3488 #    ], [
3489 #      # Did not find starndard library, so use our own
3490 #      AC_MSG_RESULT(yes)
3491 #      AC_DEFINE(HAVE_CWEB)
3492 #      got_cweb="yes"
3493 #      local_cweb="yes"
3494 #      CWEB=${TOP_DIR}/depkgs/cweb
3495 #      CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
3496 #      CWEB_LIBS="-lcweb"
3497 #      CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
3498 #      CWEB_SRC="${TOP_DIR}/depkgs/cweb"
3499 #    ])
3500 #  ]   
3501 #)
3502 #AC_SUBST(CWEB)
3503 #AC_SUBST(CWEB_INC)
3504 #AC_SUBST(CWEB_LIBS)
3505 #AC_SUBST(CWEB_LDFLAGS)
3506 #AC_SUBST(CWEB_SRC)
3507
3508 # End of CWEB stuff
3509 # -----------------------------------------------------------------------
3510
3511
3512
3513 # -----------------------------------------------------------
3514 # Check whether user wants TCP wrappers support (default off)
3515 # -----------------------------------------------------------
3516 TCPW_MSG="no" 
3517 # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
3518 if test "${with_tcp_wrappers+set}" = set; then
3519   withval="$with_tcp_wrappers"
3520   
3521     if test "x$withval" != "xno" ; then
3522        saved_LIBS="$LIBS"
3523        LIBS="$LIBS -lwrap -lnsl"
3524        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
3525 echo "configure:3526: checking for libwrap" >&5
3526        cat > conftest.$ac_ext <<EOF
3527 #line 3528 "configure"
3528 #include "confdefs.h"
3529  #include <tcpd.h>
3530              int deny_severity = 0;
3531              int allow_severity = 0;
3532              struct request_info *req; 
3533 int main() {
3534  hosts_access(req); 
3535 ; return 0; }
3536 EOF
3537 if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3538   rm -rf conftest*
3539   
3540             echo "$ac_t""yes" 1>&6
3541             cat >> confdefs.h <<\EOF
3542 #define HAVE_LIBWRAP 1
3543 EOF
3544
3545             TCPW_MSG="yes" 
3546           
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   { echo "configure: error: *** libwrap missing" 1>&2; exit 1; } 
3552        
3553 fi
3554 rm -f conftest*
3555     fi
3556   
3557
3558 fi
3559
3560
3561 # ------------------------------------------
3562 # Where to place working dir
3563 # ------------------------------------------
3564 working_dir=`eval echo ${sysconfdir}/working`
3565 # Check whether --with-working-dir or --without-working-dir was given.
3566 if test "${with_working_dir+set}" = set; then
3567   withval="$with_working_dir"
3568   
3569        if test "x$withval" != "xno" ; then     
3570               working_dir=$withval
3571        fi
3572    
3573
3574 fi
3575
3576
3577
3578
3579
3580 # ------------------------------------------
3581 # Where to place scriptdir (script files)
3582 # ------------------------------------------
3583 scriptdir=`eval echo ${sysconfdir}`
3584 # Check whether --with-scriptdir or --without-scriptdir was given.
3585 if test "${with_scriptdir+set}" = set; then
3586   withval="$with_scriptdir"
3587   
3588        if test "x$withval" != "xno" ; then     
3589               scriptdir=$withval
3590        fi
3591    
3592
3593 fi
3594
3595
3596
3597
3598
3599 # ------------------------------------------
3600 # Where to send dump email
3601 # ------------------------------------------
3602 dump_email=root@localhost
3603 # Check whether --with-dump-email or --without-dump-email was given.
3604 if test "${with_dump_email+set}" = set; then
3605   withval="$with_dump_email"
3606   
3607        if test "x$withval" != "xno" ; then     
3608               dump_email=$withval
3609        fi
3610    
3611
3612 fi
3613
3614
3615
3616
3617 # ------------------------------------------
3618 # Where to send job email
3619 # ------------------------------------------
3620 job_email=root@localhost
3621 # Check whether --with-job-email or --without-job-email was given.
3622 if test "${with_job_email+set}" = set; then
3623   withval="$with_job_email"
3624   
3625        if test "x$withval" != "xno" ; then     
3626               job_email=$withval
3627        fi
3628    
3629
3630 fi
3631
3632
3633
3634
3635 # ------------------------------------------
3636 # Where to find smtp host
3637 # ------------------------------------------
3638 smtp_host=localhost
3639 # Check whether --with-smtp_host or --without-smtp_host was given.
3640 if test "${with_smtp_host+set}" = set; then
3641   withval="$with_smtp_host"
3642   
3643        if test "x$withval" != "xno" ; then     
3644               smtp_host=$withval
3645        fi
3646    
3647
3648 fi
3649
3650
3651
3652
3653
3654 # ------------------------------------
3655 # Where to place pid files
3656 # ------------------------------------
3657 piddir=/var/run
3658 # Check whether --with-pid-dir or --without-pid-dir was given.
3659 if test "${with_pid_dir+set}" = set; then
3660   withval="$with_pid_dir"
3661   
3662         if test "x$withval" != "xno" ; then     
3663             piddir=$withval
3664         fi
3665     
3666
3667 fi
3668
3669
3670 # make sure the pid directory exists
3671 if test ! -d $piddir ; then     
3672     piddir=`eval echo ${sysconfdir}`
3673     case $piddir in
3674           NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
3675     esac
3676 fi
3677
3678 cat >> confdefs.h <<EOF
3679 #define _PATH_BACULA_PIDDIR "$piddir"
3680 EOF
3681
3682
3683
3684
3685 # ------------------------------------
3686 # Where to place subsys "lock file"
3687 # ------------------------------------
3688 subsysdir=/var/run/subsys
3689 # Check whether --with-subsys-dir or --without-subsys-dir was given.
3690 if test "${with_subsys_dir+set}" = set; then
3691   withval="$with_subsys_dir"
3692   
3693         if test "x$withval" != "xno" ; then     
3694             subsysdir=$withval
3695         fi
3696     
3697
3698 fi
3699
3700
3701 # make sure the pid directory exists
3702 if test ! -d $subsysdir ; then     
3703     subsysdir=`eval echo ${sysconfdir}`
3704     case $subsysdir in
3705         NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
3706     esac
3707 fi
3708
3709
3710
3711
3712
3713 # ------------------------------------
3714 # Where to start assigning ports
3715 # ------------------------------------
3716 baseport=9101
3717 # Check whether --with-baseport or --without-baseport was given.
3718 if test "${with_baseport+set}" = set; then
3719   withval="$with_baseport"
3720   
3721         if test "x$withval" != "xno" ; then     
3722              baseport=$withval
3723         fi
3724     
3725
3726 fi
3727
3728
3729
3730 dir_port=`expr $baseport`
3731 fd_port=`expr $baseport + 1`
3732 sd_port=`expr $fd_port + 1`
3733
3734
3735
3736
3737
3738
3739 # ------------------------------------------
3740 # Generate passwords
3741 # ------------------------------------------
3742 dir_password=
3743 # Check whether --with-dir-password or --without-dir-password was given.
3744 if test "${with_dir_password+set}" = set; then
3745   withval="$with_dir_password"
3746   
3747        if test "x$withval" != "xno" ; then     
3748            dir_password=$withval
3749        fi
3750    
3751
3752 fi
3753
3754
3755 if test "x$dir_password" = "x" ; then
3756    if test "x$OPENSSL" = "xnone" ; then
3757 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
3758       key=`autoconf/randpass 33`
3759    else
3760       key=`openssl rand -base64 33`
3761    fi
3762    dir_password=$key
3763 fi
3764
3765 fd_password=
3766 # Check whether --with-fd-password or --without-fd-password was given.
3767 if test "${with_fd_password+set}" = set; then
3768   withval="$with_fd_password"
3769   
3770        if test "x$withval" != "xno" ; then     
3771            fd_password=$withval
3772        fi
3773    
3774
3775 fi
3776
3777
3778 if test "x$fd_password" = "x" ; then
3779    if test "x$OPENSSL" = "xnone" ; then
3780 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
3781       key=`autoconf/randpass 37`
3782    else
3783       key=`openssl rand -base64 33`
3784    fi
3785    fd_password=$key
3786 fi
3787
3788 sd_password=
3789 # Check whether --with-sd-password or --without-sd-password was given.
3790 if test "${with_sd_password+set}" = set; then
3791   withval="$with_sd_password"
3792   
3793        if test "x$withval" != "xno" ; then     
3794            sd_password=$withval
3795        fi
3796    
3797
3798 fi
3799
3800
3801 if test "x$sd_password" = "x" ; then
3802    if test "x$OPENSSL" = "xnone" ; then
3803 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
3804       key=`autocnf/randpass 41`
3805    else
3806       key=`openssl rand -base64 33`
3807    fi
3808    sd_password=$key
3809 fi
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819 # ------------------------------------------------
3820 # Bacula check for various SQL database engines
3821 # ------------------------------------------------
3822
3823 db_found=no
3824 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
3825 echo "configure:3826: checking for MySQL support" >&5
3826 # Check whether --with-mysql or --without-mysql was given.
3827 if test "${with_mysql+set}" = set; then
3828   withval="$with_mysql"
3829   
3830   if test "$withval" != "no"; then
3831         if test "$withval" = "yes"; then
3832                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
3833                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
3834                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
3835                         MYSQL_BINDIR=/usr/local/mysql/bin
3836                 elif test -f /usr/include/mysql/mysql.h; then
3837                         MYSQL_INCDIR=/usr/include/mysql
3838                         MYSQL_LIBDIR=/usr/lib/mysql
3839                         MYSQL_BINDIR=/usr/bin      
3840                 elif test -f /usr/include/mysql.h; then
3841                         MYSQL_INCDIR=/usr/include
3842                         MYSQL_LIBDIR=/usr/lib
3843                         MYSQL_BINDIR=/usr/bin
3844                 elif test -f /usr/local/include/mysql/mysql.h; then
3845                         MYSQL_INCDIR=/usr/local/include/mysql
3846                         MYSQL_LIBDIR=/usr/local/lib/mysql
3847                         MYSQL_BINDIR=/usr/local/bin
3848                 elif test -f /usr/local/include/mysql.h; then
3849                         MYSQL_INCDIR=/usr/local/include
3850                         MYSQL_LIBDIR=/usr/local/lib
3851                         MYSQL_BINDIR=/usr/local/bin
3852                 else
3853                    echo "$ac_t""no" 1>&6
3854                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
3855                 fi
3856         else
3857                 if test -f $withval/include/mysql/mysql.h; then
3858                         MYSQL_INCDIR=$withval/include/mysql
3859                         MYSQL_LIBDIR=$withval/lib/mysql
3860                         MYSQL_BINDIR=$withval/bin
3861                 elif test -f $withval/include/mysql.h; then
3862                         MYSQL_INCDIR=$withval/include
3863                         MYSQL_LIBDIR=$withval/lib
3864                         MYSQL_BINDIR=$withval/bin
3865                 else
3866                    echo "$ac_t""no" 1>&6
3867                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
3868                 fi
3869         fi
3870     SQL_INCLUDE=-I$MYSQL_INCDIR
3871     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
3872     SQL_BINDIR=$MYSQL_BINDIR
3873
3874     cat >> confdefs.h <<\EOF
3875 #define HAVE_MYSQL 1
3876 EOF
3877
3878     echo "$ac_t""yes" 1>&6
3879     db_found=yes
3880     support_mysql=yes
3881     db_name=MySQL
3882     DB_NAME=mysql
3883
3884   else
3885         echo "$ac_t""no" 1>&6
3886   fi
3887
3888 else
3889   
3890   echo "$ac_t""no" 1>&6
3891
3892 fi
3893
3894
3895 # Check whether --with-embedded-mysql or --without-embedded-mysql was given.
3896 if test "${with_embedded_mysql+set}" = set; then
3897   withval="$with_embedded_mysql"
3898   
3899   if test "$withval" != "no"; then
3900         if test "$withval" = "yes"; then
3901                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
3902                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
3903                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
3904                         MYSQL_BINDIR=/usr/local/mysql/bin
3905                 elif test -f /usr/include/mysql/mysql.h; then
3906                         MYSQL_INCDIR=/usr/include/mysql
3907                         MYSQL_LIBDIR=/usr/lib/mysql
3908                         MYSQL_BINDIR=/usr/bin      
3909                 elif test -f /usr/include/mysql.h; then
3910                         MYSQL_INCDIR=/usr/include
3911                         MYSQL_LIBDIR=/usr/lib
3912                         MYSQL_BINDIR=/usr/bin
3913                 elif test -f /usr/local/include/mysql/mysql.h; then
3914                         MYSQL_INCDIR=/usr/local/include/mysql
3915                         MYSQL_LIBDIR=/usr/local/lib/mysql
3916                         MYSQL_BINDIR=/usr/local/bin
3917                 elif test -f /usr/local/include/mysql.h; then
3918                         MYSQL_INCDIR=/usr/local/include
3919                         MYSQL_LIBDIR=/usr/local/lib
3920                         MYSQL_BINDIR=/usr/local/bin
3921                 else
3922                    echo "$ac_t""no" 1>&6
3923                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
3924                 fi
3925         else
3926                 if test -f $withval/include/mysql/mysql.h; then
3927                         MYSQL_INCDIR=$withval/include/mysql
3928                         MYSQL_LIBDIR=$withval/lib/mysql
3929                         MYSQL_BINDIR=$withval/bin
3930                 elif test -f $withval/include/mysql.h; then
3931                         MYSQL_INCDIR=$withval/include
3932                         MYSQL_LIBDIR=$withval/lib
3933                         MYSQL_BINDIR=$withval/bin
3934                 else
3935                    echo "$ac_t""no" 1>&6
3936                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
3937                 fi
3938         fi
3939     SQL_INCLUDE=-I$MYSQL_INCDIR
3940     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
3941     SQL_BINDIR=$MYSQL_BINDIR
3942
3943     cat >> confdefs.h <<\EOF
3944 #define HAVE_MYSQL 1
3945 EOF
3946
3947     cat >> confdefs.h <<\EOF
3948 #define HAVE_EMBEDDED_MYSQL 1
3949 EOF
3950
3951     echo "$ac_t""yes" 1>&6
3952     db_found=yes
3953     support_mysql=yes
3954     db_name=MySQL
3955     DB_NAME=mysql
3956
3957   else
3958         echo "$ac_t""no" 1>&6
3959   fi
3960
3961 else
3962   
3963   echo "$ac_t""no" 1>&6
3964
3965 fi
3966
3967
3968
3969
3970
3971
3972   
3973
3974
3975
3976 # ------------------------------------------------
3977 # Bacula check for various SQL database engines
3978 # ------------------------------------------------
3979
3980 db_found=no
3981 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
3982 echo "configure:3983: checking for SQLite support" >&5
3983 # Check whether --with-sqlite or --without-sqlite was given.
3984 if test "${with_sqlite+set}" = set; then
3985   withval="$with_sqlite"
3986   
3987   if test "$withval" != "no"; then
3988         if test "$withval" = "yes"; then
3989                 if test -f /usr/local/include/sqlite.h; then
3990                         SQLITE_INCDIR=/usr/local/include
3991                         SQLITE_LIBDIR=/usr/local/lib
3992                         SQLITE_BINDIR=/usr/local/bin
3993                 elif test -f /usr/include/sqlite.h; then
3994                         SQLITE_INCDIR=/usr/include
3995                         SQLITE_LIBDIR=/usr/lib
3996                         SQLITE_BINDIR=/usr/bin      
3997                 else
3998                    echo "$ac_t""no" 1>&6
3999                    { echo "configure: error: Unable to find sqlite.h in standard locations" 1>&2; exit 1; }
4000                 fi
4001         else
4002                 if test -f $withval/sqlite.h; then
4003                         SQLITE_INCDIR=$withval
4004                         SQLITE_LIBDIR=$withval
4005                         SQLITE_BINDIR=$withval
4006                 else
4007                    echo "$ac_t""no" 1>&6
4008                    { echo "configure: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" 1>&2; exit 1; }
4009                 fi
4010         fi
4011     SQL_INCLUDE=-I$SQLITE_INCDIR
4012     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
4013     SQL_BINDIR=$SQLITE_BINDIR
4014
4015     cat >> confdefs.h <<\EOF
4016 #define HAVE_SQLITE 1
4017 EOF
4018
4019     echo "$ac_t""yes" 1>&6
4020     db_found=yes
4021     support_sqlite=yes
4022     db_name=SQLite
4023     DB_NAME=sqlite
4024
4025   else
4026         echo "$ac_t""no" 1>&6
4027   fi
4028
4029 else
4030   
4031   echo "$ac_t""no" 1>&6
4032
4033 fi
4034
4035
4036
4037
4038   
4039
4040
4041
4042
4043
4044 cat >> confdefs.h <<\EOF
4045 #define PROTOTYPES 1
4046 EOF
4047
4048
4049 if test -z "$CFLAGS"; then
4050     if test -z "$CCOPTS"; then
4051         CCOPTS='-g -O2'
4052     fi
4053     CFLAGS="$CCOPTS"
4054 fi
4055
4056
4057 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4058 echo "configure:4059: checking for mingw32 environment" >&5
4059 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065
4066 int main() {
4067 return __MINGW32__;
4068 ; return 0; }
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4071   rm -rf conftest*
4072   ac_cv_mingw32=yes
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -rf conftest*
4077   ac_cv_mingw32=no
4078 fi
4079 rm -f conftest*
4080 rm -f conftest*
4081 fi
4082
4083 echo "$ac_t""$ac_cv_mingw32" 1>&6
4084 MINGW32=
4085 test "$ac_cv_mingw32" = yes && MINGW32=yes
4086
4087
4088 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4089 echo "configure:4090: checking for executable suffix" >&5
4090 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4094   ac_cv_exeext=.exe
4095 else
4096   rm -f conftest*
4097   echo 'int main () { return 0; }' > conftest.$ac_ext
4098   ac_cv_exeext=
4099   if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4100     for file in conftest.*; do
4101       case $file in
4102       *.c | *.o | *.obj) ;;
4103       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4104       esac
4105     done
4106   else
4107     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4108   fi
4109   rm -f conftest*
4110   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4111 fi
4112 fi
4113
4114 EXEEXT=""
4115 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4116 echo "$ac_t""${ac_cv_exeext}" 1>&6
4117 ac_exeext=$EXEEXT
4118
4119
4120 largefile_support="no"
4121 echo $ac_n "checking build system type""... $ac_c" 1>&6
4122 echo "configure:4123: checking build system type" >&5
4123
4124 build_alias=$build
4125 case "$build_alias" in
4126 NONE)
4127   case $nonopt in
4128   NONE) build_alias=$host_alias ;;
4129   *) build_alias=$nonopt ;;
4130   esac ;;
4131 esac
4132
4133 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
4134 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4135 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4136 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4137 echo "$ac_t""$build" 1>&6
4138
4139 if test $host != $build; then
4140   ac_tool_prefix=${host_alias}-
4141 else
4142   ac_tool_prefix=
4143 fi
4144
4145
4146    # Check whether --enable-largefile or --disable-largefile was given.
4147 if test "${enable_largefile+set}" = set; then
4148   enableval="$enable_largefile"
4149   :
4150 fi
4151
4152    if test "$enable_largefile" != no; then
4153      # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
4154 set dummy ${ac_tool_prefix}getconf; ac_word=$2
4155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4156 echo "configure:4157: checking for $ac_word" >&5
4157 if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
4158   echo $ac_n "(cached) $ac_c" 1>&6
4159 else
4160   if test -n "$GETCONF"; then
4161   ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
4162 else
4163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4164   ac_dummy="$PATH"
4165   for ac_dir in $ac_dummy; do
4166     test -z "$ac_dir" && ac_dir=.
4167     if test -f $ac_dir/$ac_word; then
4168       ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
4169       break
4170     fi
4171   done
4172   IFS="$ac_save_ifs"
4173   test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
4174 fi
4175 fi
4176 GETCONF="$ac_cv_prog_GETCONF"
4177 if test -n "$GETCONF"; then
4178   echo "$ac_t""$GETCONF" 1>&6
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182
4183
4184
4185      echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
4186 echo "configure:4187: checking for CFLAGS value to request large file support" >&5
4187 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
4188   echo $ac_n "(cached) $ac_c" 1>&6
4189 else
4190   ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
4191         ac_cv_sys_largefile_CFLAGS=no
4192         case "$host_os" in
4193            # IRIX 6.2 and later require cc -n32.
4194            irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
4195              if test "$GCC" != yes; then
4196                ac_cv_sys_largefile_CFLAGS=-n32
4197              fi
4198              ac_save_CC="$CC"
4199              CC="$CC $ac_cv_sys_largefile_CFLAGS"
4200              cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203
4204 int main() {
4205
4206 ; return 0; }
4207 EOF
4208 if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4209   :
4210 else
4211   echo "configure: failed program was:" >&5
4212   cat conftest.$ac_ext >&5
4213   rm -rf conftest*
4214   ac_cv_sys_largefile_CFLAGS=no
4215 fi
4216 rm -f conftest*
4217              CC="$ac_save_CC"
4218            esac
4219       }
4220 fi
4221
4222 echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
4223      echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
4224 echo "configure:4225: checking for LDFLAGS value to request large file support" >&5
4225 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
4226   echo $ac_n "(cached) $ac_c" 1>&6
4227 else
4228   ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
4229         ac_cv_sys_largefile_LDFLAGS=no
4230         
4231       }
4232 fi
4233
4234 echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
4235      echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
4236 echo "configure:4237: checking for LIBS value to request large file support" >&5
4237 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
4241         ac_cv_sys_largefile_LIBS=no
4242         
4243       }
4244 fi
4245
4246 echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
4247
4248      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4249        case "$ac_flag" in
4250        no) ;;
4251        -D_FILE_OFFSET_BITS=*) ;;
4252        -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
4253        -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
4254        -D?* | -I?*)
4255          case "$ac_flag" in
4256    no) ;;
4257    ?*)
4258      case "$CPPFLAGS" in
4259      '') CPPFLAGS="$ac_flag" ;;
4260      *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
4261      esac ;;
4262    esac ;;
4263        *)
4264          case "$ac_flag" in
4265    no) ;;
4266    ?*)
4267      case "$CFLAGS" in
4268      '') CFLAGS="$ac_flag" ;;
4269      *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
4270      esac ;;
4271    esac ;;
4272        esac
4273      done
4274      case "$ac_cv_sys_largefile_LDFLAGS" in
4275    no) ;;
4276    ?*)
4277      case "$LDFLAGS" in
4278      '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
4279      *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
4280      esac ;;
4281    esac
4282      case "$ac_cv_sys_largefile_LIBS" in
4283    no) ;;
4284    ?*)
4285      case "$LIBS" in
4286      '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
4287      *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
4288      esac ;;
4289    esac
4290      echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
4291 echo "configure:4292: checking for _FILE_OFFSET_BITS" >&5
4292 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
4293   echo $ac_n "(cached) $ac_c" 1>&6
4294 else
4295   ac_cv_sys_file_offset_bits=no
4296       case "$host_os" in
4297         # HP-UX 10.20 and later
4298         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4299           ac_cv_sys_file_offset_bits=64 ;;
4300         esac
4301       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4302         case "$ac_flag" in
4303         -D_FILE_OFFSET_BITS)
4304           ac_cv_sys_file_offset_bits=1 ;;
4305         -D_FILE_OFFSET_BITS=*)
4306           ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4307         esac
4308       done
4309       
4310 fi
4311
4312 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
4313    if test "$ac_cv_sys_file_offset_bits" != no; then
4314      cat >> confdefs.h <<EOF
4315 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4316 EOF
4317
4318    fi
4319      echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
4320 echo "configure:4321: checking for _LARGEFILE_SOURCE" >&5
4321 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   ac_cv_sys_largefile_source=no
4325       case "$host_os" in
4326         # HP-UX 10.20 and later
4327         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4328           ac_cv_sys_largefile_source=1 ;;
4329         esac
4330       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4331         case "$ac_flag" in
4332         -D_LARGEFILE_SOURCE)
4333           ac_cv_sys_largefile_source=1 ;;
4334         -D_LARGEFILE_SOURCE=*)
4335           ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4336         esac
4337       done
4338       
4339 fi
4340
4341 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
4342    if test "$ac_cv_sys_largefile_source" != no; then
4343      cat >> confdefs.h <<EOF
4344 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4345 EOF
4346
4347    fi
4348      echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
4349 echo "configure:4350: checking for _LARGE_FILES" >&5
4350 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   ac_cv_sys_large_files=no
4354       case "$host_os" in
4355         # AIX 4.2 and later
4356         aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
4357           ac_cv_sys_large_files=1 ;;
4358         esac
4359       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4360         case "$ac_flag" in
4361         -D_LARGE_FILES)
4362           ac_cv_sys_large_files=1 ;;
4363         -D_LARGE_FILES=*)
4364           ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4365         esac
4366       done
4367       
4368 fi
4369
4370 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
4371    if test "$ac_cv_sys_large_files" != no; then
4372      cat >> confdefs.h <<EOF
4373 #define _LARGE_FILES $ac_cv_sys_large_files
4374 EOF
4375
4376    fi
4377    fi
4378   
4379
4380
4381 # If we find X, set shell vars x_includes and x_libraries to the
4382 # paths, otherwise set no_x=yes.
4383 # Uses ac_ vars as temps to allow command line to override cache and checks.
4384 # --without-x overrides everything else, but does not touch the cache.
4385 echo $ac_n "checking for X""... $ac_c" 1>&6
4386 echo "configure:4387: checking for X" >&5
4387
4388 # Check whether --with-x or --without-x was given.
4389 if test "${with_x+set}" = set; then
4390   withval="$with_x"
4391   :
4392 fi
4393
4394 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4395 if test "x$with_x" = xno; then
4396   # The user explicitly disabled X.
4397   have_x=disabled
4398 else
4399   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4400     # Both variables are already set.
4401     have_x=yes
4402   else
4403 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4404   echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406   # One or both of the vars are not set, and there is no cached value.
4407 ac_x_includes=NO ac_x_libraries=NO
4408 rm -fr conftestdir
4409 if mkdir conftestdir; then
4410   cd conftestdir
4411   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4412   cat > Imakefile <<'EOF'
4413 acfindx:
4414         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4415 EOF
4416   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4417     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4418     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4419     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4420     for ac_extension in a so sl; do
4421       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4422         test -f $ac_im_libdir/libX11.$ac_extension; then
4423         ac_im_usrlibdir=$ac_im_libdir; break
4424       fi
4425     done
4426     # Screen out bogus values from the imake configuration.  They are
4427     # bogus both because they are the default anyway, and because
4428     # using them would break gcc on systems where it needs fixed includes.
4429     case "$ac_im_incroot" in
4430         /usr/include) ;;
4431         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4432     esac
4433     case "$ac_im_usrlibdir" in
4434         /usr/lib | /lib) ;;
4435         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4436     esac
4437   fi
4438   cd ..
4439   rm -fr conftestdir
4440 fi
4441
4442 if test "$ac_x_includes" = NO; then
4443   # Guess where to find include files, by looking for this one X11 .h file.
4444   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4445
4446   # First, try using that file with no special directory specified.
4447 cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 #include <$x_direct_test_include>
4451 EOF
4452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4453 { (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4455 if test -z "$ac_err"; then
4456   rm -rf conftest*
4457   # We can compile using X headers with no special include directory.
4458 ac_x_includes=
4459 else
4460   echo "$ac_err" >&5
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   # Look for the header file in a standard set of common directories.
4465 # Check X11 before X11Rn because it is often a symlink to the current release.
4466   for ac_dir in               \
4467     /usr/X11/include          \
4468     /usr/X11R6/include        \
4469     /usr/X11R5/include        \
4470     /usr/X11R4/include        \
4471                               \
4472     /usr/include/X11          \
4473     /usr/include/X11R6        \
4474     /usr/include/X11R5        \
4475     /usr/include/X11R4        \
4476                               \
4477     /usr/local/X11/include    \
4478     /usr/local/X11R6/include  \
4479     /usr/local/X11R5/include  \
4480     /usr/local/X11R4/include  \
4481                               \
4482     /usr/local/include/X11    \
4483     /usr/local/include/X11R6  \
4484     /usr/local/include/X11R5  \
4485     /usr/local/include/X11R4  \
4486                               \
4487     /usr/X386/include         \
4488     /usr/x386/include         \
4489     /usr/XFree86/include/X11  \
4490                               \
4491     /usr/include              \
4492     /usr/local/include        \
4493     /usr/unsupported/include  \
4494     /usr/athena/include       \
4495     /usr/local/x11r5/include  \
4496     /usr/lpp/Xamples/include  \
4497                               \
4498     /usr/openwin/include      \
4499     /usr/openwin/share/include \
4500     ; \
4501   do
4502     if test -r "$ac_dir/$x_direct_test_include"; then
4503       ac_x_includes=$ac_dir
4504       break
4505     fi
4506   done
4507 fi
4508 rm -f conftest*
4509 fi # $ac_x_includes = NO
4510
4511 if test "$ac_x_libraries" = NO; then
4512   # Check for the libraries.
4513
4514   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4515   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4516
4517   # See if we find them without any special options.
4518   # Don't add to $LIBS permanently.
4519   ac_save_LIBS="$LIBS"
4520   LIBS="-l$x_direct_test_library $LIBS"
4521 cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524
4525 int main() {
4526 ${x_direct_test_function}()
4527 ; return 0; }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4530   rm -rf conftest*
4531   LIBS="$ac_save_LIBS"
4532 # We can link X programs with no special library path.
4533 ac_x_libraries=
4534 else
4535   echo "configure: failed program was:" >&5
4536   cat conftest.$ac_ext >&5
4537   rm -rf conftest*
4538   LIBS="$ac_save_LIBS"
4539 # First see if replacing the include by lib works.
4540 # Check X11 before X11Rn because it is often a symlink to the current release.
4541 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4542     /usr/X11/lib          \
4543     /usr/X11R6/lib        \
4544     /usr/X11R5/lib        \
4545     /usr/X11R4/lib        \
4546                           \
4547     /usr/lib/X11          \
4548     /usr/lib/X11R6        \
4549     /usr/lib/X11R5        \
4550     /usr/lib/X11R4        \
4551                           \
4552     /usr/local/X11/lib    \
4553     /usr/local/X11R6/lib  \
4554     /usr/local/X11R5/lib  \
4555     /usr/local/X11R4/lib  \
4556                           \
4557     /usr/local/lib/X11    \
4558     /usr/local/lib/X11R6  \
4559     /usr/local/lib/X11R5  \
4560     /usr/local/lib/X11R4  \
4561                           \
4562     /usr/X386/lib         \
4563     /usr/x386/lib         \
4564     /usr/XFree86/lib/X11  \
4565                           \
4566     /usr/lib              \
4567     /usr/local/lib        \
4568     /usr/unsupported/lib  \
4569     /usr/athena/lib       \
4570     /usr/local/x11r5/lib  \
4571     /usr/lpp/Xamples/lib  \
4572     /lib/usr/lib/X11      \
4573                           \
4574     /usr/openwin/lib      \
4575     /usr/openwin/share/lib \
4576     ; \
4577 do
4578   for ac_extension in a so sl; do
4579     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4580       ac_x_libraries=$ac_dir
4581       break 2
4582     fi
4583   done
4584 done
4585 fi
4586 rm -f conftest*
4587 fi # $ac_x_libraries = NO
4588
4589 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4590   # Didn't find X anywhere.  Cache the known absence of X.
4591   ac_cv_have_x="have_x=no"
4592 else
4593   # Record where we found X for the cache.
4594   ac_cv_have_x="have_x=yes \
4595                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4596 fi
4597 fi
4598   fi
4599   eval "$ac_cv_have_x"
4600 fi # $with_x != no
4601
4602 if test "$have_x" != yes; then
4603   echo "$ac_t""$have_x" 1>&6
4604   no_x=yes
4605 else
4606   # If each of the values was on the command line, it overrides each guess.
4607   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4608   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4609   # Update the cache value to reflect the command line values.
4610   ac_cv_have_x="have_x=yes \
4611                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4612   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4613 fi
4614
4615 if test "$no_x" = yes; then
4616   # Not all programs may use this symbol, but it does not hurt to define it.
4617   cat >> confdefs.h <<\EOF
4618 #define X_DISPLAY_MISSING 1
4619 EOF
4620
4621   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4622 else
4623   if test -n "$x_includes"; then
4624     X_CFLAGS="$X_CFLAGS -I$x_includes"
4625   fi
4626
4627   # It would also be nice to do this for all -L options, not just this one.
4628   if test -n "$x_libraries"; then
4629     X_LIBS="$X_LIBS -L$x_libraries"
4630     # For Solaris; some versions of Sun CC require a space after -R and
4631     # others require no space.  Words are not sufficient . . . .
4632     case "`(uname -sr) 2>/dev/null`" in
4633     "SunOS 5"*)
4634       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4635 echo "configure:4636: checking whether -R must be followed by a space" >&5
4636       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4637       cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 int main() {
4642
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   ac_R_nospace=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   ac_R_nospace=no
4653 fi
4654 rm -f conftest*
4655       if test $ac_R_nospace = yes; then
4656         echo "$ac_t""no" 1>&6
4657         X_LIBS="$X_LIBS -R$x_libraries"
4658       else
4659         LIBS="$ac_xsave_LIBS -R $x_libraries"
4660         cat > conftest.$ac_ext <<EOF
4661 #line 4662 "configure"
4662 #include "confdefs.h"
4663
4664 int main() {
4665
4666 ; return 0; }
4667 EOF
4668 if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4669   rm -rf conftest*
4670   ac_R_space=yes
4671 else
4672   echo "configure: failed program was:" >&5
4673   cat conftest.$ac_ext >&5
4674   rm -rf conftest*
4675   ac_R_space=no
4676 fi
4677 rm -f conftest*
4678         if test $ac_R_space = yes; then
4679           echo "$ac_t""yes" 1>&6
4680           X_LIBS="$X_LIBS -R $x_libraries"
4681         else
4682           echo "$ac_t""neither works" 1>&6
4683         fi
4684       fi
4685       LIBS="$ac_xsave_LIBS"
4686     esac
4687   fi
4688
4689   # Check for system-dependent libraries X programs must link with.
4690   # Do this before checking for the system-independent R6 libraries
4691   # (-lICE), since we may need -lsocket or whatever for X linking.
4692
4693   if test "$ISC" = yes; then
4694     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4695   else
4696     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4697     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4698     # the Alpha needs dnet_stub (dnet does not exist).
4699     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4700 echo "configure:4701: checking for dnet_ntoa in -ldnet" >&5
4701 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   ac_save_LIBS="$LIBS"
4706 LIBS="-ldnet  $LIBS"
4707 cat > conftest.$ac_ext <<EOF
4708 #line 4709 "configure"
4709 #include "confdefs.h"
4710 /* Override any gcc2 internal prototype to avoid an error.  */
4711 /* We use char because int might match the return type of a gcc2
4712     builtin and then its argument prototype would still apply.  */
4713 char dnet_ntoa();
4714
4715 int main() {
4716 dnet_ntoa()
4717 ; return 0; }
4718 EOF
4719 if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4720   rm -rf conftest*
4721   eval "ac_cv_lib_$ac_lib_var=yes"
4722 else
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   eval "ac_cv_lib_$ac_lib_var=no"
4727 fi
4728 rm -f conftest*
4729 LIBS="$ac_save_LIBS"
4730
4731 fi
4732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4733   echo "$ac_t""yes" 1>&6
4734   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738
4739     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4740       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4741 echo "configure:4742: checking for dnet_ntoa in -ldnet_stub" >&5
4742 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4743 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   ac_save_LIBS="$LIBS"
4747 LIBS="-ldnet_stub  $LIBS"
4748 cat > conftest.$ac_ext <<EOF
4749 #line 4750 "configure"
4750 #include "confdefs.h"
4751 /* Override any gcc2 internal prototype to avoid an error.  */
4752 /* We use char because int might match the return type of a gcc2
4753     builtin and then its argument prototype would still apply.  */
4754 char dnet_ntoa();
4755
4756 int main() {
4757 dnet_ntoa()
4758 ; return 0; }
4759 EOF
4760 if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4761   rm -rf conftest*
4762   eval "ac_cv_lib_$ac_lib_var=yes"
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766   rm -rf conftest*
4767   eval "ac_cv_lib_$ac_lib_var=no"
4768 fi
4769 rm -f conftest*
4770 LIBS="$ac_save_LIBS"
4771
4772 fi
4773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4774   echo "$ac_t""yes" 1>&6
4775   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4776 else
4777   echo "$ac_t""no" 1>&6
4778 fi
4779
4780     fi
4781
4782     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4783     # to get the SysV transport functions.
4784     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4785     # needs -lnsl.
4786     # The nsl library prevents programs from opening the X display
4787     # on Irix 5.2, according to dickey@clark.net.
4788     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4789 echo "configure:4790: checking for gethostbyname" >&5
4790 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   cat > conftest.$ac_ext <<EOF
4794 #line 4795 "configure"
4795 #include "confdefs.h"
4796 /* System header to define __stub macros and hopefully few prototypes,
4797     which can conflict with char gethostbyname(); below.  */
4798 #include <assert.h>
4799 /* Override any gcc2 internal prototype to avoid an error.  */
4800 /* We use char because int might match the return type of a gcc2
4801     builtin and then its argument prototype would still apply.  */
4802 char gethostbyname();
4803
4804 int main() {
4805
4806 /* The GNU C library defines this for functions which it implements
4807     to always fail with ENOSYS.  Some functions are actually named
4808     something starting with __ and the normal name is an alias.  */
4809 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4810 choke me
4811 #else
4812 gethostbyname();
4813 #endif
4814
4815 ; return 0; }
4816 EOF
4817 if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4818   rm -rf conftest*
4819   eval "ac_cv_func_gethostbyname=yes"
4820 else
4821   echo "configure: failed program was:" >&5
4822   cat conftest.$ac_ext >&5
4823   rm -rf conftest*
4824   eval "ac_cv_func_gethostbyname=no"
4825 fi
4826 rm -f conftest*
4827 fi
4828
4829 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4830   echo "$ac_t""yes" 1>&6
4831   :
4832 else
4833   echo "$ac_t""no" 1>&6
4834 fi
4835
4836     if test $ac_cv_func_gethostbyname = no; then
4837       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4838 echo "configure:4839: checking for gethostbyname in -lnsl" >&5
4839 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4841   echo $ac_n "(cached) $ac_c" 1>&6
4842 else
4843   ac_save_LIBS="$LIBS"
4844 LIBS="-lnsl  $LIBS"
4845 cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848 /* Override any gcc2 internal prototype to avoid an error.  */
4849 /* We use char because int might match the return type of a gcc2
4850     builtin and then its argument prototype would still apply.  */
4851 char gethostbyname();
4852
4853 int main() {
4854 gethostbyname()
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_lib_$ac_lib_var=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_lib_$ac_lib_var=no"
4865 fi
4866 rm -f conftest*
4867 LIBS="$ac_save_LIBS"
4868
4869 fi
4870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4871   echo "$ac_t""yes" 1>&6
4872   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4873 else
4874   echo "$ac_t""no" 1>&6
4875 fi
4876
4877     fi
4878
4879     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4880     # socket/setsockopt and other routines are undefined under SCO ODT
4881     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4882     # on later versions), says simon@lia.di.epfl.ch: it contains
4883     # gethostby* variants that don't use the nameserver (or something).
4884     # -lsocket must be given before -lnsl if both are needed.
4885     # We assume that if connect needs -lnsl, so does gethostbyname.
4886     echo $ac_n "checking for connect""... $ac_c" 1>&6
4887 echo "configure:4888: checking for connect" >&5
4888 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 /* System header to define __stub macros and hopefully few prototypes,
4895     which can conflict with char connect(); below.  */
4896 #include <assert.h>
4897 /* Override any gcc2 internal prototype to avoid an error.  */
4898 /* We use char because int might match the return type of a gcc2
4899     builtin and then its argument prototype would still apply.  */
4900 char connect();
4901
4902 int main() {
4903
4904 /* The GNU C library defines this for functions which it implements
4905     to always fail with ENOSYS.  Some functions are actually named
4906     something starting with __ and the normal name is an alias.  */
4907 #if defined (__stub_connect) || defined (__stub___connect)
4908 choke me
4909 #else
4910 connect();
4911 #endif
4912
4913 ; return 0; }
4914 EOF
4915 if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4916   rm -rf conftest*
4917   eval "ac_cv_func_connect=yes"
4918 else
4919   echo "configure: failed program was:" >&5
4920   cat conftest.$ac_ext >&5
4921   rm -rf conftest*
4922   eval "ac_cv_func_connect=no"
4923 fi
4924 rm -f conftest*
4925 fi
4926
4927 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4928   echo "$ac_t""yes" 1>&6
4929   :
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933
4934     if test $ac_cv_func_connect = no; then
4935       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4936 echo "configure:4937: checking for connect in -lsocket" >&5
4937 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   ac_save_LIBS="$LIBS"
4942 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 /* Override any gcc2 internal prototype to avoid an error.  */
4947 /* We use char because int might match the return type of a gcc2
4948     builtin and then its argument prototype would still apply.  */
4949 char connect();
4950
4951 int main() {
4952 connect()
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=no"
4963 fi
4964 rm -f conftest*
4965 LIBS="$ac_save_LIBS"
4966
4967 fi
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4971 else
4972   echo "$ac_t""no" 1>&6
4973 fi
4974
4975     fi
4976
4977     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4978     echo $ac_n "checking for remove""... $ac_c" 1>&6
4979 echo "configure:4980: checking for remove" >&5
4980 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4981   echo $ac_n "(cached) $ac_c" 1>&6
4982 else
4983   cat > conftest.$ac_ext <<EOF
4984 #line 4985 "configure"
4985 #include "confdefs.h"
4986 /* System header to define __stub macros and hopefully few prototypes,
4987     which can conflict with char remove(); below.  */
4988 #include <assert.h>
4989 /* Override any gcc2 internal prototype to avoid an error.  */
4990 /* We use char because int might match the return type of a gcc2
4991     builtin and then its argument prototype would still apply.  */
4992 char remove();
4993
4994 int main() {
4995
4996 /* The GNU C library defines this for functions which it implements
4997     to always fail with ENOSYS.  Some functions are actually named
4998     something starting with __ and the normal name is an alias.  */
4999 #if defined (__stub_remove) || defined (__stub___remove)
5000 choke me
5001 #else
5002 remove();
5003 #endif
5004
5005 ; return 0; }
5006 EOF
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5008   rm -rf conftest*
5009   eval "ac_cv_func_remove=yes"
5010 else
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -rf conftest*
5014   eval "ac_cv_func_remove=no"
5015 fi
5016 rm -f conftest*
5017 fi
5018
5019 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5020   echo "$ac_t""yes" 1>&6
5021   :
5022 else
5023   echo "$ac_t""no" 1>&6
5024 fi
5025
5026     if test $ac_cv_func_remove = no; then
5027       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5028 echo "configure:5029: checking for remove in -lposix" >&5
5029 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   ac_save_LIBS="$LIBS"
5034 LIBS="-lposix  $LIBS"
5035 cat > conftest.$ac_ext <<EOF
5036 #line 5037 "configure"
5037 #include "confdefs.h"
5038 /* Override any gcc2 internal prototype to avoid an error.  */
5039 /* We use char because int might match the return type of a gcc2
5040     builtin and then its argument prototype would still apply.  */
5041 char remove();
5042
5043 int main() {
5044 remove()
5045 ; return 0; }
5046 EOF
5047 if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5048   rm -rf conftest*
5049   eval "ac_cv_lib_$ac_lib_var=yes"
5050 else
5051   echo "configure: failed program was:" >&5
5052   cat conftest.$ac_ext >&5
5053   rm -rf conftest*
5054   eval "ac_cv_lib_$ac_lib_var=no"
5055 fi
5056 rm -f conftest*
5057 LIBS="$ac_save_LIBS"
5058
5059 fi
5060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5061   echo "$ac_t""yes" 1>&6
5062   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5063 else
5064   echo "$ac_t""no" 1>&6
5065 fi
5066
5067     fi
5068
5069     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5070     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5071 echo "configure:5072: checking for shmat" >&5
5072 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5073   echo $ac_n "(cached) $ac_c" 1>&6
5074 else
5075   cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char shmat(); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 /* We use char because int might match the return type of a gcc2
5083     builtin and then its argument prototype would still apply.  */
5084 char shmat();
5085
5086 int main() {
5087
5088 /* The GNU C library defines this for functions which it implements
5089     to always fail with ENOSYS.  Some functions are actually named
5090     something starting with __ and the normal name is an alias.  */
5091 #if defined (__stub_shmat) || defined (__stub___shmat)
5092 choke me
5093 #else
5094 shmat();
5095 #endif
5096
5097 ; return 0; }
5098 EOF
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100   rm -rf conftest*
5101   eval "ac_cv_func_shmat=yes"
5102 else
5103   echo "configure: failed program was:" >&5
5104   cat conftest.$ac_ext >&5
5105   rm -rf conftest*
5106   eval "ac_cv_func_shmat=no"
5107 fi
5108 rm -f conftest*
5109 fi
5110
5111 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5112   echo "$ac_t""yes" 1>&6
5113   :
5114 else
5115   echo "$ac_t""no" 1>&6
5116 fi
5117
5118     if test $ac_cv_func_shmat = no; then
5119       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5120 echo "configure:5121: checking for shmat in -lipc" >&5
5121 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125   ac_save_LIBS="$LIBS"
5126 LIBS="-lipc  $LIBS"
5127 cat > conftest.$ac_ext <<EOF
5128 #line 5129 "configure"
5129 #include "confdefs.h"
5130 /* Override any gcc2 internal prototype to avoid an error.  */
5131 /* We use char because int might match the return type of a gcc2
5132     builtin and then its argument prototype would still apply.  */
5133 char shmat();
5134
5135 int main() {
5136 shmat()
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140   rm -rf conftest*
5141   eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143   echo "configure: failed program was:" >&5
5144   cat conftest.$ac_ext >&5
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=no"
5147 fi
5148 rm -f conftest*
5149 LIBS="$ac_save_LIBS"
5150
5151 fi
5152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5153   echo "$ac_t""yes" 1>&6
5154   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5155 else
5156   echo "$ac_t""no" 1>&6
5157 fi
5158
5159     fi
5160   fi
5161
5162   # Check for libraries that X11R6 Xt/Xaw programs need.
5163   ac_save_LDFLAGS="$LDFLAGS"
5164   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5165   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5166   # check for ICE first), but we must link in the order -lSM -lICE or
5167   # we get undefined symbols.  So assume we have SM if we have ICE.
5168   # These have to be linked with before -lX11, unlike the other
5169   # libraries we check for below, so use a different variable.
5170   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5171   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5172 echo "configure:5173: checking for IceConnectionNumber in -lICE" >&5
5173 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5175   echo $ac_n "(cached) $ac_c" 1>&6
5176 else
5177   ac_save_LIBS="$LIBS"
5178 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5179 cat > conftest.$ac_ext <<EOF
5180 #line 5181 "configure"
5181 #include "confdefs.h"
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 /* We use char because int might match the return type of a gcc2
5184     builtin and then its argument prototype would still apply.  */
5185 char IceConnectionNumber();
5186
5187 int main() {
5188 IceConnectionNumber()
5189 ; return 0; }
5190 EOF
5191 if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5192   rm -rf conftest*
5193   eval "ac_cv_lib_$ac_lib_var=yes"
5194 else
5195   echo "configure: failed program was:" >&5
5196   cat conftest.$ac_ext >&5
5197   rm -rf conftest*
5198   eval "ac_cv_lib_$ac_lib_var=no"
5199 fi
5200 rm -f conftest*
5201 LIBS="$ac_save_LIBS"
5202
5203 fi
5204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5205   echo "$ac_t""yes" 1>&6
5206   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5207 else
5208   echo "$ac_t""no" 1>&6
5209 fi
5210
5211   LDFLAGS="$ac_save_LDFLAGS"
5212
5213 fi
5214
5215
5216 for ac_hdr in \
5217         assert.h \
5218         fcntl.h \
5219         grp.h \
5220         pwd.h \
5221         libc.h \
5222         limits.h \
5223         stdarg.h \
5224         stdlib.h \
5225         stdint.h \
5226         string.h \
5227         termios.h \
5228         unistd.h \
5229         sys/byteorder.h \
5230         sys/ioctl.h \
5231         sys/select.h \
5232         sys/sockio.h \
5233         sys/time.h \
5234         sys/socket.h \
5235         arpa/nameser.h \
5236         resolv.h \
5237         mtio.h \
5238         sys/mtio.h \
5239
5240 do
5241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5243 echo "configure:5244: checking for $ac_hdr" >&5
5244 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 #include <$ac_hdr>
5251 EOF
5252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5253 { (eval echo configure:5254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5255 if test -z "$ac_err"; then
5256   rm -rf conftest*
5257   eval "ac_cv_header_$ac_safe=yes"
5258 else
5259   echo "$ac_err" >&5
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   rm -rf conftest*
5263   eval "ac_cv_header_$ac_safe=no"
5264 fi
5265 rm -f conftest*
5266 fi
5267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5268   echo "$ac_t""yes" 1>&6
5269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5270   cat >> confdefs.h <<EOF
5271 #define $ac_tr_hdr 1
5272 EOF
5273  
5274 else
5275   echo "$ac_t""no" 1>&6
5276 fi
5277 done
5278
5279 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5280 echo "configure:5281: checking for ANSI C header files" >&5
5281 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284   cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287 #include <stdlib.h>
5288 #include <stdarg.h>
5289 #include <string.h>
5290 #include <float.h>
5291 EOF
5292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5293 { (eval echo configure:5294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5295 if test -z "$ac_err"; then
5296   rm -rf conftest*
5297   ac_cv_header_stdc=yes
5298 else
5299   echo "$ac_err" >&5
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   ac_cv_header_stdc=no
5304 fi
5305 rm -f conftest*
5306
5307 if test $ac_cv_header_stdc = yes; then
5308   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5309 cat > conftest.$ac_ext <<EOF
5310 #line 5311 "configure"
5311 #include "confdefs.h"
5312 #include <string.h>
5313 EOF
5314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5315   egrep "memchr" >/dev/null 2>&1; then
5316   :
5317 else
5318   rm -rf conftest*
5319   ac_cv_header_stdc=no
5320 fi
5321 rm -f conftest*
5322
5323 fi
5324
5325 if test $ac_cv_header_stdc = yes; then
5326   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5327 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 #include <stdlib.h>
5331 EOF
5332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5333   egrep "free" >/dev/null 2>&1; then
5334   :
5335 else
5336   rm -rf conftest*
5337   ac_cv_header_stdc=no
5338 fi
5339 rm -f conftest*
5340
5341 fi
5342
5343 if test $ac_cv_header_stdc = yes; then
5344   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5345 if test "$cross_compiling" = yes; then
5346   :
5347 else
5348   cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 #include <ctype.h>
5352 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5353 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5354 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5355 int main () { int i; for (i = 0; i < 256; i++)
5356 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5357 exit (0); }
5358
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5361 then
5362   :
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -fr conftest*
5367   ac_cv_header_stdc=no
5368 fi
5369 rm -fr conftest*
5370 fi
5371
5372 fi
5373 fi
5374
5375 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5376 if test $ac_cv_header_stdc = yes; then
5377   cat >> confdefs.h <<\EOF
5378 #define STDC_HEADERS 1
5379 EOF
5380
5381 fi
5382
5383 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
5384 echo "configure:5385: checking whether sys/types.h defines makedev" >&5
5385 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391 #include <sys/types.h>
5392 int main() {
5393 return makedev(0, 0);
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397   rm -rf conftest*
5398   ac_cv_header_sys_types_h_makedev=yes
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   ac_cv_header_sys_types_h_makedev=no
5404 fi
5405 rm -f conftest*
5406
5407 fi
5408
5409 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
5410
5411 if test $ac_cv_header_sys_types_h_makedev = no; then
5412 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
5413 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
5414 echo "configure:5415: checking for sys/mkdev.h" >&5
5415 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5416   echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418   cat > conftest.$ac_ext <<EOF
5419 #line 5420 "configure"
5420 #include "confdefs.h"
5421 #include <sys/mkdev.h>
5422 EOF
5423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5424 { (eval echo configure:5425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5426 if test -z "$ac_err"; then
5427   rm -rf conftest*
5428   eval "ac_cv_header_$ac_safe=yes"
5429 else
5430   echo "$ac_err" >&5
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_header_$ac_safe=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5439   echo "$ac_t""yes" 1>&6
5440   cat >> confdefs.h <<\EOF
5441 #define MAJOR_IN_MKDEV 1
5442 EOF
5443
5444 else
5445   echo "$ac_t""no" 1>&6
5446 fi
5447
5448
5449   if test $ac_cv_header_sys_mkdev_h = no; then
5450 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
5451 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
5452 echo "configure:5453: checking for sys/sysmacros.h" >&5
5453 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5454   echo $ac_n "(cached) $ac_c" 1>&6
5455 else
5456   cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459 #include <sys/sysmacros.h>
5460 EOF
5461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5462 { (eval echo configure:5463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5464 if test -z "$ac_err"; then
5465   rm -rf conftest*
5466   eval "ac_cv_header_$ac_safe=yes"
5467 else
5468   echo "$ac_err" >&5
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_header_$ac_safe=no"
5473 fi
5474 rm -f conftest*
5475 fi
5476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478   cat >> confdefs.h <<\EOF
5479 #define MAJOR_IN_SYSMACROS 1
5480 EOF
5481
5482 else
5483   echo "$ac_t""no" 1>&6
5484 fi
5485
5486   fi
5487 fi
5488
5489 ac_header_dirent=no
5490 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5491 do
5492 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5493 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5494 echo "configure:5495: checking for $ac_hdr that defines DIR" >&5
5495 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 #include <sys/types.h>
5502 #include <$ac_hdr>
5503 int main() {
5504 DIR *dirp = 0;
5505 ; return 0; }
5506 EOF
5507 if { (eval echo configure:5508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5508   rm -rf conftest*
5509   eval "ac_cv_header_dirent_$ac_safe=yes"
5510 else
5511   echo "configure: failed program was:" >&5
5512   cat conftest.$ac_ext >&5
5513   rm -rf conftest*
5514   eval "ac_cv_header_dirent_$ac_safe=no"
5515 fi
5516 rm -f conftest*
5517 fi
5518 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5519   echo "$ac_t""yes" 1>&6
5520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5521   cat >> confdefs.h <<EOF
5522 #define $ac_tr_hdr 1
5523 EOF
5524  ac_header_dirent=$ac_hdr; break
5525 else
5526   echo "$ac_t""no" 1>&6
5527 fi
5528 done
5529 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5530 if test $ac_header_dirent = dirent.h; then
5531 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5532 echo "configure:5533: checking for opendir in -ldir" >&5
5533 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5534 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5535   echo $ac_n "(cached) $ac_c" 1>&6
5536 else
5537   ac_save_LIBS="$LIBS"
5538 LIBS="-ldir  $LIBS"
5539 cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5542 /* Override any gcc2 internal prototype to avoid an error.  */
5543 /* We use char because int might match the return type of a gcc2
5544     builtin and then its argument prototype would still apply.  */
5545 char opendir();
5546
5547 int main() {
5548 opendir()
5549 ; return 0; }
5550 EOF
5551 if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5552   rm -rf conftest*
5553   eval "ac_cv_lib_$ac_lib_var=yes"
5554 else
5555   echo "configure: failed program was:" >&5
5556   cat conftest.$ac_ext >&5
5557   rm -rf conftest*
5558   eval "ac_cv_lib_$ac_lib_var=no"
5559 fi
5560 rm -f conftest*
5561 LIBS="$ac_save_LIBS"
5562
5563 fi
5564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5565   echo "$ac_t""yes" 1>&6
5566   LIBS="$LIBS -ldir"
5567 else
5568   echo "$ac_t""no" 1>&6
5569 fi
5570
5571 else
5572 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5573 echo "configure:5574: checking for opendir in -lx" >&5
5574 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5575 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5576   echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578   ac_save_LIBS="$LIBS"
5579 LIBS="-lx  $LIBS"
5580 cat > conftest.$ac_ext <<EOF
5581 #line 5582 "configure"
5582 #include "confdefs.h"
5583 /* Override any gcc2 internal prototype to avoid an error.  */
5584 /* We use char because int might match the return type of a gcc2
5585     builtin and then its argument prototype would still apply.  */
5586 char opendir();
5587
5588 int main() {
5589 opendir()
5590 ; return 0; }
5591 EOF
5592 if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5593   rm -rf conftest*
5594   eval "ac_cv_lib_$ac_lib_var=yes"
5595 else
5596   echo "configure: failed program was:" >&5
5597   cat conftest.$ac_ext >&5
5598   rm -rf conftest*
5599   eval "ac_cv_lib_$ac_lib_var=no"
5600 fi
5601 rm -f conftest*
5602 LIBS="$ac_save_LIBS"
5603
5604 fi
5605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5606   echo "$ac_t""yes" 1>&6
5607   LIBS="$LIBS -lx"
5608 else
5609   echo "$ac_t""no" 1>&6
5610 fi
5611
5612 fi
5613
5614 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5615 echo "configure:5616: checking whether stat file-mode macros are broken" >&5
5616 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5617   echo $ac_n "(cached) $ac_c" 1>&6
5618 else
5619   cat > conftest.$ac_ext <<EOF
5620 #line 5621 "configure"
5621 #include "confdefs.h"
5622 #include <sys/types.h>
5623 #include <sys/stat.h>
5624
5625 #if defined(S_ISBLK) && defined(S_IFDIR)
5626 # if S_ISBLK (S_IFDIR)
5627 You lose.
5628 # endif
5629 #endif
5630
5631 #if defined(S_ISBLK) && defined(S_IFCHR)
5632 # if S_ISBLK (S_IFCHR)
5633 You lose.
5634 # endif
5635 #endif
5636
5637 #if defined(S_ISLNK) && defined(S_IFREG)
5638 # if S_ISLNK (S_IFREG)
5639 You lose.
5640 # endif
5641 #endif
5642
5643 #if defined(S_ISSOCK) && defined(S_IFREG)
5644 # if S_ISSOCK (S_IFREG)
5645 You lose.
5646 # endif
5647 #endif
5648
5649 EOF
5650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5651   egrep "You lose" >/dev/null 2>&1; then
5652   rm -rf conftest*
5653   ac_cv_header_stat_broken=yes
5654 else
5655   rm -rf conftest*
5656   ac_cv_header_stat_broken=no
5657 fi
5658 rm -f conftest*
5659
5660 fi
5661
5662 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5663 if test $ac_cv_header_stat_broken = yes; then
5664   cat >> confdefs.h <<\EOF
5665 #define STAT_MACROS_BROKEN 1
5666 EOF
5667
5668 fi
5669
5670 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5671 echo "configure:5672: checking for sys/wait.h that is POSIX.1 compatible" >&5
5672 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 #include <sys/types.h>
5679 #include <sys/wait.h>
5680 #ifndef WEXITSTATUS
5681 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5682 #endif
5683 #ifndef WIFEXITED
5684 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5685 #endif
5686 int main() {
5687 int s;
5688 wait (&s);
5689 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5690 ; return 0; }
5691 EOF
5692 if { (eval echo configure:5693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5693   rm -rf conftest*
5694   ac_cv_header_sys_wait_h=yes
5695 else
5696   echo "configure: failed program was:" >&5
5697   cat conftest.$ac_ext >&5
5698   rm -rf conftest*
5699   ac_cv_header_sys_wait_h=no
5700 fi
5701 rm -f conftest*
5702 fi
5703
5704 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5705 if test $ac_cv_header_sys_wait_h = yes; then
5706   cat >> confdefs.h <<\EOF
5707 #define HAVE_SYS_WAIT_H 1
5708 EOF
5709
5710 fi
5711
5712 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5713 echo "configure:5714: checking whether time.h and sys/time.h may both be included" >&5
5714 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5715   echo $ac_n "(cached) $ac_c" 1>&6
5716 else
5717   cat > conftest.$ac_ext <<EOF
5718 #line 5719 "configure"
5719 #include "confdefs.h"
5720 #include <sys/types.h>
5721 #include <sys/time.h>
5722 #include <time.h>
5723 int main() {
5724 struct tm *tp;
5725 ; return 0; }
5726 EOF
5727 if { (eval echo configure:5728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5728   rm -rf conftest*
5729   ac_cv_header_time=yes
5730 else
5731   echo "configure: failed program was:" >&5
5732   cat conftest.$ac_ext >&5
5733   rm -rf conftest*
5734   ac_cv_header_time=no
5735 fi
5736 rm -f conftest*
5737 fi
5738
5739 echo "$ac_t""$ac_cv_header_time" 1>&6
5740 if test $ac_cv_header_time = yes; then
5741   cat >> confdefs.h <<\EOF
5742 #define TIME_WITH_SYS_TIME 1
5743 EOF
5744
5745 fi
5746
5747 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5748 echo "configure:5749: checking for st_blksize in struct stat" >&5
5749 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5750   echo $ac_n "(cached) $ac_c" 1>&6
5751 else
5752   cat > conftest.$ac_ext <<EOF
5753 #line 5754 "configure"
5754 #include "confdefs.h"
5755 #include <sys/types.h>
5756 #include <sys/stat.h>
5757 int main() {
5758 struct stat s; s.st_blksize;
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5762   rm -rf conftest*
5763   ac_cv_struct_st_blksize=yes
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   ac_cv_struct_st_blksize=no
5769 fi
5770 rm -f conftest*
5771 fi
5772
5773 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5774 if test $ac_cv_struct_st_blksize = yes; then
5775   cat >> confdefs.h <<\EOF
5776 #define HAVE_ST_BLKSIZE 1
5777 EOF
5778
5779 fi
5780
5781 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
5782 echo "configure:5783: checking for st_blocks in struct stat" >&5
5783 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5784   echo $ac_n "(cached) $ac_c" 1>&6
5785 else
5786   cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789 #include <sys/types.h>
5790 #include <sys/stat.h>
5791 int main() {
5792 struct stat s; s.st_blocks;
5793 ; return 0; }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5796   rm -rf conftest*
5797   ac_cv_struct_st_blocks=yes
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -rf conftest*
5802   ac_cv_struct_st_blocks=no
5803 fi
5804 rm -f conftest*
5805 fi
5806
5807 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5808 if test $ac_cv_struct_st_blocks = yes; then
5809   cat >> confdefs.h <<\EOF
5810 #define HAVE_ST_BLOCKS 1
5811 EOF
5812
5813 else
5814   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5815 fi
5816
5817 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5818 echo "configure:5819: checking whether struct tm is in sys/time.h or time.h" >&5
5819 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 #include <sys/types.h>
5826 #include <time.h>
5827 int main() {
5828 struct tm *tp; tp->tm_sec;
5829 ; return 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5832   rm -rf conftest*
5833   ac_cv_struct_tm=time.h
5834 else
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   ac_cv_struct_tm=sys/time.h
5839 fi
5840 rm -f conftest*
5841 fi
5842
5843 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5844 if test $ac_cv_struct_tm = sys/time.h; then
5845   cat >> confdefs.h <<\EOF
5846 #define TM_IN_SYS_TIME 1
5847 EOF
5848
5849 fi
5850
5851 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5852 echo "configure:5853: checking for tm_zone in struct tm" >&5
5853 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5854   echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856   cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 #include <sys/types.h>
5860 #include <$ac_cv_struct_tm>
5861 int main() {
5862 struct tm tm; tm.tm_zone;
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5866   rm -rf conftest*
5867   ac_cv_struct_tm_zone=yes
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   ac_cv_struct_tm_zone=no
5873 fi
5874 rm -f conftest*
5875 fi
5876
5877 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5878 if test "$ac_cv_struct_tm_zone" = yes; then
5879   cat >> confdefs.h <<\EOF
5880 #define HAVE_TM_ZONE 1
5881 EOF
5882
5883 else
5884   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5885 echo "configure:5886: checking for tzname" >&5
5886 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5887   echo $ac_n "(cached) $ac_c" 1>&6
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 #include <time.h>
5893 #ifndef tzname /* For SGI.  */
5894 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5895 #endif
5896 int main() {
5897 atoi(*tzname);
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   ac_cv_var_tzname=yes
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   ac_cv_var_tzname=no
5908 fi
5909 rm -f conftest*
5910 fi
5911
5912 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5913   if test $ac_cv_var_tzname = yes; then
5914     cat >> confdefs.h <<\EOF
5915 #define HAVE_TZNAME 1
5916 EOF
5917
5918   fi
5919 fi
5920
5921
5922 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
5923 echo "configure:5924: checking for utime.h" >&5
5924 if eval "test \"`echo '$''{'ba_cv_header_utime_h'+set}'`\" = set"; then
5925   echo $ac_n "(cached) $ac_c" 1>&6
5926 else
5927   cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930
5931 #include <sys/types.h>
5932 #include <utime.h>
5933 int main() {
5934 struct utimbuf foo
5935 ; return 0; }
5936 EOF
5937 if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5938   rm -rf conftest*
5939   ba_cv_header_utime_h=yes
5940 else
5941   echo "configure: failed program was:" >&5
5942   cat conftest.$ac_ext >&5
5943   rm -rf conftest*
5944   ba_cv_header_utime_h=no
5945 fi
5946 rm -f conftest*
5947 fi
5948
5949 echo "$ac_t""$ba_cv_header_utime_h" 1>&6
5950 test $ba_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
5951 #define HAVE_UTIME_H 1
5952 EOF
5953
5954
5955 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
5956 echo "configure:5957: checking for socklen_t" >&5
5957 if eval "test \"`echo '$''{'ba_cv_header_socklen_t'+set}'`\" = set"; then
5958   echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960   cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963
5964 #include <sys/types.h>
5965 #include <sys/socket.h>
5966 int main() {
5967 socklen_t x
5968 ; return 0; }
5969 EOF
5970 if { (eval echo configure:5971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5971   rm -rf conftest*
5972   ba_cv_header_socklen_t=yes
5973 else
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   ba_cv_header_socklen_t=no
5978 fi
5979 rm -f conftest*
5980 fi
5981
5982 echo "$ac_t""$ba_cv_header_socklen_t" 1>&6
5983 test $ba_cv_header_socklen_t = yes && cat >> confdefs.h <<\EOF
5984 #define HAVE_SOCKLEN_T 1
5985 EOF
5986
5987
5988 echo $ac_n "checking for bigendian""... $ac_c" 1>&6
5989 echo "configure:5990: checking for bigendian" >&5
5990 if eval "test \"`echo '$''{'ba_cv_bigendian'+set}'`\" = set"; then
5991   echo $ac_n "(cached) $ac_c" 1>&6
5992 else
5993   if test "$cross_compiling" = yes; then
5994   ba_cv_bigendian=no
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 main(){long a=1L; char *p=(char *)&a; exit(*p);}
6000 EOF
6001 if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6002 then
6003   ba_cv_bigendian=yes
6004 else
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -fr conftest*
6008   ba_cv_bigendian=no
6009 fi
6010 rm -fr conftest*
6011 fi
6012
6013 fi
6014
6015 echo "$ac_t""$ba_cv_bigendian" 1>&6
6016 test $ba_cv_bigendian = yes && cat >> confdefs.h <<\EOF
6017 #define HAVE_BIGENDIAN 1
6018 EOF
6019
6020
6021
6022 echo $ac_n "checking for working const""... $ac_c" 1>&6
6023 echo "configure:6024: checking for working const" >&5
6024 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   cat > conftest.$ac_ext <<EOF
6028 #line 6029 "configure"
6029 #include "confdefs.h"
6030
6031 int main() {
6032
6033 /* Ultrix mips cc rejects this.  */
6034 typedef int charset[2]; const charset x;
6035 /* SunOS 4.1.1 cc rejects this.  */
6036 char const *const *ccp;
6037 char **p;
6038 /* NEC SVR4.0.2 mips cc rejects this.  */
6039 struct point {int x, y;};
6040 static struct point const zero = {0,0};
6041 /* AIX XL C 1.02.0.0 rejects this.
6042    It does not let you subtract one const X* pointer from another in an arm
6043    of an if-expression whose if-part is not a constant expression */
6044 const char *g = "string";
6045 ccp = &g + (g ? g-g : 0);
6046 /* HPUX 7.0 cc rejects these. */
6047 ++ccp;
6048 p = (char**) ccp;
6049 ccp = (char const *const *) p;
6050 { /* SCO 3.2v4 cc rejects this.  */
6051   char *t;
6052   char const *s = 0 ? (char *) 0 : (char const *) 0;
6053
6054   *t++ = 0;
6055 }
6056 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6057   int x[] = {25, 17};
6058   const int *foo = &x[0];
6059   ++foo;
6060 }
6061 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6062   typedef const int *iptr;
6063   iptr p = 0;
6064   ++p;
6065 }
6066 { /* AIX XL C 1.02.0.0 rejects this saying
6067      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6068   struct s { int j; const int *ap[3]; };
6069   struct s *b; b->j = 5;
6070 }
6071 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6072   const int foo = 10;
6073 }
6074
6075 ; return 0; }
6076 EOF
6077 if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6078   rm -rf conftest*
6079   ac_cv_c_const=yes
6080 else
6081   echo "configure: failed program was:" >&5
6082   cat conftest.$ac_ext >&5
6083   rm -rf conftest*
6084   ac_cv_c_const=no
6085 fi
6086 rm -f conftest*
6087 fi
6088
6089 echo "$ac_t""$ac_cv_c_const" 1>&6
6090 if test $ac_cv_c_const = no; then
6091   cat >> confdefs.h <<\EOF
6092 #define const 
6093 EOF
6094
6095 fi
6096
6097
6098
6099 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
6100 echo "configure:6101: checking how to get filesystem type" >&5
6101 fstype=no
6102 # The order of these tests is important.
6103 cat > conftest.$ac_ext <<EOF
6104 #line 6105 "configure"
6105 #include "confdefs.h"
6106 #include <sys/statvfs.h>
6107 #include <sys/fstyp.h>
6108 EOF
6109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6110 { (eval echo configure:6111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6112 if test -z "$ac_err"; then
6113   rm -rf conftest*
6114   cat >> confdefs.h <<\EOF
6115 #define FSTYPE_STATVFS 1
6116 EOF
6117  fstype=SVR4
6118 else
6119   echo "$ac_err" >&5
6120   echo "configure: failed program was:" >&5
6121   cat conftest.$ac_ext >&5
6122 fi
6123 rm -f conftest*
6124 if test $fstype = no; then
6125 cat > conftest.$ac_ext <<EOF
6126 #line 6127 "configure"
6127 #include "confdefs.h"
6128 #include <sys/statfs.h>
6129 #include <sys/fstyp.h>
6130 EOF
6131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6132 { (eval echo configure:6133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6134 if test -z "$ac_err"; then
6135   rm -rf conftest*
6136   cat >> confdefs.h <<\EOF
6137 #define FSTYPE_USG_STATFS 1
6138 EOF
6139  fstype=SVR3
6140 else
6141   echo "$ac_err" >&5
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144 fi
6145 rm -f conftest*
6146 fi
6147 if test $fstype = no; then
6148 cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 #include <sys/statfs.h>
6152 #include <sys/vmount.h>
6153 EOF
6154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6155 { (eval echo configure:6156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6157 if test -z "$ac_err"; then
6158   rm -rf conftest*
6159   cat >> confdefs.h <<\EOF
6160 #define FSTYPE_AIX_STATFS 1
6161 EOF
6162  fstype=AIX
6163 else
6164   echo "$ac_err" >&5
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167 fi
6168 rm -f conftest*
6169 fi
6170 if test $fstype = no; then  
6171 cat > conftest.$ac_ext <<EOF
6172 #line 6173 "configure"
6173 #include "confdefs.h"
6174 #include <mntent.h>
6175 EOF
6176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6177 { (eval echo configure:6178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6179 if test -z "$ac_err"; then
6180   rm -rf conftest*
6181   cat >> confdefs.h <<\EOF
6182 #define FSTYPE_MNTENT 1
6183 EOF
6184  fstype=4.3BSD
6185 else
6186   echo "$ac_err" >&5
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189 fi
6190 rm -f conftest*
6191 fi
6192 if test $fstype = no; then  
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6196 #include <sys/mount.h>
6197 EOF
6198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6199   egrep "f_type;" >/dev/null 2>&1; then
6200   rm -rf conftest*
6201   cat >> confdefs.h <<\EOF
6202 #define FSTYPE_STATFS 1
6203 EOF
6204  fstype=4.4BSD/OSF1
6205 fi
6206 rm -f conftest*
6207
6208 fi
6209 if test $fstype = no; then  
6210 cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 #include <sys/mount.h>
6214 #include <sys/fs_types.h>
6215 EOF
6216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6217 { (eval echo configure:6218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6219 if test -z "$ac_err"; then
6220   rm -rf conftest*
6221   cat >> confdefs.h <<\EOF
6222 #define FSTYPE_GETMNT 1
6223 EOF
6224  fstype=Ultrix
6225 else
6226   echo "$ac_err" >&5
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229 fi
6230 rm -f conftest*
6231 fi
6232 echo "$ac_t""$fstype" 1>&6
6233
6234 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6235 echo "configure:6236: checking return type of signal handlers" >&5
6236 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6237   echo $ac_n "(cached) $ac_c" 1>&6
6238 else
6239   cat > conftest.$ac_ext <<EOF
6240 #line 6241 "configure"
6241 #include "confdefs.h"
6242 #include <sys/types.h>
6243 #include <signal.h>
6244 #ifdef signal
6245 #undef signal
6246 #endif
6247 #ifdef __cplusplus
6248 extern "C" void (*signal (int, void (*)(int)))(int);
6249 #else
6250 void (*signal ()) ();
6251 #endif
6252
6253 int main() {
6254 int i;
6255 ; return 0; }
6256 EOF
6257 if { (eval echo configure:6258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6258   rm -rf conftest*
6259   ac_cv_type_signal=void
6260 else
6261   echo "configure: failed program was:" >&5
6262   cat conftest.$ac_ext >&5
6263   rm -rf conftest*
6264   ac_cv_type_signal=int
6265 fi
6266 rm -f conftest*
6267 fi
6268
6269 echo "$ac_t""$ac_cv_type_signal" 1>&6
6270 cat >> confdefs.h <<EOF
6271 #define RETSIGTYPE $ac_cv_type_signal
6272 EOF
6273
6274
6275
6276 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
6277 echo "configure:6278: checking for type of signal functions" >&5
6278 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
6279   echo $ac_n "(cached) $ac_c" 1>&6
6280 else
6281   
6282   cat > conftest.$ac_ext <<EOF
6283 #line 6284 "configure"
6284 #include "confdefs.h"
6285 #include <signal.h>
6286 int main() {
6287
6288     sigset_t ss;
6289     struct sigaction sa;
6290     sigemptyset(&ss); sigsuspend(&ss);
6291     sigaction(SIGINT, &sa, (struct sigaction *) 0);
6292     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
6293   
6294 ; return 0; }
6295 EOF
6296 if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6297   rm -rf conftest*
6298   bash_cv_signal_vintage=posix
6299 else
6300   echo "configure: failed program was:" >&5
6301   cat conftest.$ac_ext >&5
6302   rm -rf conftest*
6303   
6304     cat > conftest.$ac_ext <<EOF
6305 #line 6306 "configure"
6306 #include "confdefs.h"
6307 #include <signal.h>
6308 int main() {
6309
6310         int mask = sigmask(SIGINT);
6311         sigsetmask(mask); sigblock(mask); sigpause(mask);
6312     
6313 ; return 0; }
6314 EOF
6315 if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6316   rm -rf conftest*
6317   bash_cv_signal_vintage=4.2bsd
6318 else
6319   echo "configure: failed program was:" >&5
6320   cat conftest.$ac_ext >&5
6321   rm -rf conftest*
6322   
6323       cat > conftest.$ac_ext <<EOF
6324 #line 6325 "configure"
6325 #include "confdefs.h"
6326
6327         #include <signal.h>
6328         RETSIGTYPE foo() { }
6329 int main() {
6330
6331                 int mask = sigmask(SIGINT);
6332                 sigset(SIGINT, foo); sigrelse(SIGINT);
6333                 sighold(SIGINT); sigpause(SIGINT);
6334         
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   bash_cv_signal_vintage=svr3
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   bash_cv_signal_vintage=v7
6345     
6346 fi
6347 rm -f conftest*
6348   
6349 fi
6350 rm -f conftest*
6351
6352 fi
6353 rm -f conftest*
6354
6355 fi
6356
6357 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
6358 if test "$bash_cv_signal_vintage" = posix; then
6359 cat >> confdefs.h <<\EOF
6360 #define HAVE_POSIX_SIGNALS 1
6361 EOF
6362
6363 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
6364 cat >> confdefs.h <<\EOF
6365 #define HAVE_BSD_SIGNALS 1
6366 EOF
6367
6368 elif test "$bash_cv_signal_vintage" = svr3; then
6369 cat >> confdefs.h <<\EOF
6370 #define HAVE_USG_SIGHOLD 1
6371 EOF
6372
6373 fi
6374
6375 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6376 echo "configure:6377: checking for mode_t" >&5
6377 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6378   echo $ac_n "(cached) $ac_c" 1>&6
6379 else
6380   cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 #include <sys/types.h>
6384 #if STDC_HEADERS
6385 #include <stdlib.h>
6386 #include <stddef.h>
6387 #endif
6388 EOF
6389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6390   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6391   rm -rf conftest*
6392   ac_cv_type_mode_t=yes
6393 else
6394   rm -rf conftest*
6395   ac_cv_type_mode_t=no
6396 fi
6397 rm -f conftest*
6398
6399 fi
6400 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6401 if test $ac_cv_type_mode_t = no; then
6402   cat >> confdefs.h <<\EOF
6403 #define mode_t int
6404 EOF
6405
6406 fi
6407
6408 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6409 echo "configure:6410: checking for uid_t in sys/types.h" >&5
6410 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6411   echo $ac_n "(cached) $ac_c" 1>&6
6412 else
6413   cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 #include <sys/types.h>
6417 EOF
6418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6419   egrep "uid_t" >/dev/null 2>&1; then
6420   rm -rf conftest*
6421   ac_cv_type_uid_t=yes
6422 else
6423   rm -rf conftest*
6424   ac_cv_type_uid_t=no
6425 fi
6426 rm -f conftest*
6427
6428 fi
6429
6430 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6431 if test $ac_cv_type_uid_t = no; then
6432   cat >> confdefs.h <<\EOF
6433 #define uid_t int
6434 EOF
6435
6436   cat >> confdefs.h <<\EOF
6437 #define gid_t int
6438 EOF
6439
6440 fi
6441
6442 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6443 echo "configure:6444: checking for size_t" >&5
6444 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6445   echo $ac_n "(cached) $ac_c" 1>&6
6446 else
6447   cat > conftest.$ac_ext <<EOF
6448 #line 6449 "configure"
6449 #include "confdefs.h"
6450 #include <sys/types.h>
6451 #if STDC_HEADERS
6452 #include <stdlib.h>
6453 #include <stddef.h>
6454 #endif
6455 EOF
6456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6457   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6458   rm -rf conftest*
6459   ac_cv_type_size_t=yes
6460 else
6461   rm -rf conftest*
6462   ac_cv_type_size_t=no
6463 fi
6464 rm -f conftest*
6465
6466 fi
6467 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6468 if test $ac_cv_type_size_t = no; then
6469   cat >> confdefs.h <<\EOF
6470 #define size_t unsigned
6471 EOF
6472
6473 fi
6474
6475 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6476 echo "configure:6477: checking for pid_t" >&5
6477 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6478   echo $ac_n "(cached) $ac_c" 1>&6
6479 else
6480   cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483 #include <sys/types.h>
6484 #if STDC_HEADERS
6485 #include <stdlib.h>
6486 #include <stddef.h>
6487 #endif
6488 EOF
6489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6490   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6491   rm -rf conftest*
6492   ac_cv_type_pid_t=yes
6493 else
6494   rm -rf conftest*
6495   ac_cv_type_pid_t=no
6496 fi
6497 rm -f conftest*
6498
6499 fi
6500 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6501 if test $ac_cv_type_pid_t = no; then
6502   cat >> confdefs.h <<\EOF
6503 #define pid_t int
6504 EOF
6505
6506 fi
6507
6508 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6509 echo "configure:6510: checking for off_t" >&5
6510 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6511   echo $ac_n "(cached) $ac_c" 1>&6
6512 else
6513   cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516 #include <sys/types.h>
6517 #if STDC_HEADERS
6518 #include <stdlib.h>
6519 #include <stddef.h>
6520 #endif
6521 EOF
6522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6523   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6524   rm -rf conftest*
6525   ac_cv_type_off_t=yes
6526 else
6527   rm -rf conftest*
6528   ac_cv_type_off_t=no
6529 fi
6530 rm -f conftest*
6531
6532 fi
6533 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6534 if test $ac_cv_type_off_t = no; then
6535   cat >> confdefs.h <<\EOF
6536 #define off_t long
6537 EOF
6538
6539 fi
6540
6541 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
6542 echo "configure:6543: checking for ino_t" >&5
6543 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 #include <sys/types.h>
6550 #if STDC_HEADERS
6551 #include <stdlib.h>
6552 #include <stddef.h>
6553 #endif
6554 EOF
6555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6556   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6557   rm -rf conftest*
6558   ac_cv_type_ino_t=yes
6559 else
6560   rm -rf conftest*
6561   ac_cv_type_ino_t=no
6562 fi
6563 rm -f conftest*
6564
6565 fi
6566 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6567 if test $ac_cv_type_ino_t = no; then
6568   cat >> confdefs.h <<\EOF
6569 #define ino_t unsigned long
6570 EOF
6571
6572 fi
6573
6574 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
6575 echo "configure:6576: checking for dev_t" >&5
6576 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6577   echo $ac_n "(cached) $ac_c" 1>&6
6578 else
6579   cat > conftest.$ac_ext <<EOF
6580 #line 6581 "configure"
6581 #include "confdefs.h"
6582 #include <sys/types.h>
6583 #if STDC_HEADERS
6584 #include <stdlib.h>
6585 #include <stddef.h>
6586 #endif
6587 EOF
6588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6589   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6590   rm -rf conftest*
6591   ac_cv_type_dev_t=yes
6592 else
6593   rm -rf conftest*
6594   ac_cv_type_dev_t=no
6595 fi
6596 rm -f conftest*
6597
6598 fi
6599 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6600 if test $ac_cv_type_dev_t = no; then
6601   cat >> confdefs.h <<\EOF
6602 #define dev_t unsigned long
6603 EOF
6604
6605 fi
6606
6607 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
6608 echo "configure:6609: checking for daddr_t" >&5
6609 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
6610   echo $ac_n "(cached) $ac_c" 1>&6
6611 else
6612   cat > conftest.$ac_ext <<EOF
6613 #line 6614 "configure"
6614 #include "confdefs.h"
6615 #include <sys/types.h>
6616 #if STDC_HEADERS
6617 #include <stdlib.h>
6618 #include <stddef.h>
6619 #endif
6620 EOF
6621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6622   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6623   rm -rf conftest*
6624   ac_cv_type_daddr_t=yes
6625 else
6626   rm -rf conftest*
6627   ac_cv_type_daddr_t=no
6628 fi
6629 rm -f conftest*
6630
6631 fi
6632 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
6633 if test $ac_cv_type_daddr_t = no; then
6634   cat >> confdefs.h <<\EOF
6635 #define daddr_t long
6636 EOF
6637
6638 fi
6639
6640 echo $ac_n "checking for major_t""... $ac_c" 1>&6
6641 echo "configure:6642: checking for major_t" >&5
6642 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 #include <sys/types.h>
6649 #if STDC_HEADERS
6650 #include <stdlib.h>
6651 #include <stddef.h>
6652 #endif
6653 EOF
6654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6655   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6656   rm -rf conftest*
6657   ac_cv_type_major_t=yes
6658 else
6659   rm -rf conftest*
6660   ac_cv_type_major_t=no
6661 fi
6662 rm -f conftest*
6663
6664 fi
6665 echo "$ac_t""$ac_cv_type_major_t" 1>&6
6666 if test $ac_cv_type_major_t = no; then
6667   cat >> confdefs.h <<\EOF
6668 #define major_t int
6669 EOF
6670
6671 fi
6672
6673 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
6674 echo "configure:6675: checking for minor_t" >&5
6675 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
6676   echo $ac_n "(cached) $ac_c" 1>&6
6677 else
6678   cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 #include <sys/types.h>
6682 #if STDC_HEADERS
6683 #include <stdlib.h>
6684 #include <stddef.h>
6685 #endif
6686 EOF
6687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6688   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6689   rm -rf conftest*
6690   ac_cv_type_minor_t=yes
6691 else
6692   rm -rf conftest*
6693   ac_cv_type_minor_t=no
6694 fi
6695 rm -f conftest*
6696
6697 fi
6698 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
6699 if test $ac_cv_type_minor_t = no; then
6700   cat >> confdefs.h <<\EOF
6701 #define minor_t int
6702 EOF
6703
6704 fi
6705
6706 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
6707 echo "configure:6708: checking for ssize_t" >&5
6708 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
6709   echo $ac_n "(cached) $ac_c" 1>&6
6710 else
6711   cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 #include <sys/types.h>
6715 #if STDC_HEADERS
6716 #include <stdlib.h>
6717 #include <stddef.h>
6718 #endif
6719 EOF
6720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6721   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6722   rm -rf conftest*
6723   ac_cv_type_ssize_t=yes
6724 else
6725   rm -rf conftest*
6726   ac_cv_type_ssize_t=no
6727 fi
6728 rm -f conftest*
6729
6730 fi
6731 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
6732 if test $ac_cv_type_ssize_t = no; then
6733   cat >> confdefs.h <<\EOF
6734 #define ssize_t int
6735 EOF
6736
6737 fi
6738
6739 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6740 echo "configure:6741: checking for st_blocks in struct stat" >&5
6741 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 #include <sys/types.h>
6748 #include <sys/stat.h>
6749 int main() {
6750 struct stat s; s.st_blocks;
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6754   rm -rf conftest*
6755   ac_cv_struct_st_blocks=yes
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   ac_cv_struct_st_blocks=no
6761 fi
6762 rm -f conftest*
6763 fi
6764
6765 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6766 if test $ac_cv_struct_st_blocks = yes; then
6767   cat >> confdefs.h <<\EOF
6768 #define HAVE_ST_BLOCKS 1
6769 EOF
6770
6771 else
6772   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6773 fi
6774
6775 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
6776 echo "configure:6777: checking for st_rdev in struct stat" >&5
6777 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
6778   echo $ac_n "(cached) $ac_c" 1>&6
6779 else
6780   cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783 #include <sys/types.h>
6784 #include <sys/stat.h>
6785 int main() {
6786 struct stat s; s.st_rdev;
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6790   rm -rf conftest*
6791   ac_cv_struct_st_rdev=yes
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   ac_cv_struct_st_rdev=no
6797 fi
6798 rm -f conftest*
6799 fi
6800
6801 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
6802 if test $ac_cv_struct_st_rdev = yes; then
6803   cat >> confdefs.h <<\EOF
6804 #define HAVE_ST_RDEV 1
6805 EOF
6806
6807 fi
6808
6809 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6810 echo "configure:6811: checking whether struct tm is in sys/time.h or time.h" >&5
6811 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 #include <sys/types.h>
6818 #include <time.h>
6819 int main() {
6820 struct tm *tp; tp->tm_sec;
6821 ; return 0; }
6822 EOF
6823 if { (eval echo configure:6824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6824   rm -rf conftest*
6825   ac_cv_struct_tm=time.h
6826 else
6827   echo "configure: failed program was:" >&5
6828   cat conftest.$ac_ext >&5
6829   rm -rf conftest*
6830   ac_cv_struct_tm=sys/time.h
6831 fi
6832 rm -f conftest*
6833 fi
6834
6835 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6836 if test $ac_cv_struct_tm = sys/time.h; then
6837   cat >> confdefs.h <<\EOF
6838 #define TM_IN_SYS_TIME 1
6839 EOF
6840
6841 fi
6842
6843 echo $ac_n "checking for working const""... $ac_c" 1>&6
6844 echo "configure:6845: checking for working const" >&5
6845 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6846   echo $ac_n "(cached) $ac_c" 1>&6
6847 else
6848   cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851
6852 int main() {
6853
6854 /* Ultrix mips cc rejects this.  */
6855 typedef int charset[2]; const charset x;
6856 /* SunOS 4.1.1 cc rejects this.  */
6857 char const *const *ccp;
6858 char **p;
6859 /* NEC SVR4.0.2 mips cc rejects this.  */
6860 struct point {int x, y;};
6861 static struct point const zero = {0,0};
6862 /* AIX XL C 1.02.0.0 rejects this.
6863    It does not let you subtract one const X* pointer from another in an arm
6864    of an if-expression whose if-part is not a constant expression */
6865 const char *g = "string";
6866 ccp = &g + (g ? g-g : 0);
6867 /* HPUX 7.0 cc rejects these. */
6868 ++ccp;
6869 p = (char**) ccp;
6870 ccp = (char const *const *) p;
6871 { /* SCO 3.2v4 cc rejects this.  */
6872   char *t;
6873   char const *s = 0 ? (char *) 0 : (char const *) 0;
6874
6875   *t++ = 0;
6876 }
6877 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6878   int x[] = {25, 17};
6879   const int *foo = &x[0];
6880   ++foo;
6881 }
6882 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6883   typedef const int *iptr;
6884   iptr p = 0;
6885   ++p;
6886 }
6887 { /* AIX XL C 1.02.0.0 rejects this saying
6888      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6889   struct s { int j; const int *ap[3]; };
6890   struct s *b; b->j = 5;
6891 }
6892 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6893   const int foo = 10;
6894 }
6895
6896 ; return 0; }
6897 EOF
6898 if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6899   rm -rf conftest*
6900   ac_cv_c_const=yes
6901 else
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904   rm -rf conftest*
6905   ac_cv_c_const=no
6906 fi
6907 rm -f conftest*
6908 fi
6909
6910 echo "$ac_t""$ac_cv_c_const" 1>&6
6911 if test $ac_cv_c_const = no; then
6912   cat >> confdefs.h <<\EOF
6913 #define const 
6914 EOF
6915
6916 fi
6917
6918
6919
6920 echo $ac_n "checking size of char""... $ac_c" 1>&6
6921 echo "configure:6922: checking size of char" >&5
6922 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
6923   echo $ac_n "(cached) $ac_c" 1>&6
6924 else
6925   if test "$cross_compiling" = yes; then
6926   ac_cv_sizeof_char=1
6927 else
6928   cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 #include <stdio.h>
6932 int main()
6933 {
6934   FILE *f=fopen("conftestval", "w");
6935   if (!f) return(1);
6936   fprintf(f, "%d\n", sizeof(char));
6937   return(0);
6938 }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6941 then
6942   ac_cv_sizeof_char=`cat conftestval`
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -fr conftest*
6947   ac_cv_sizeof_char=0
6948 fi
6949 rm -fr conftest*
6950 fi
6951
6952 fi
6953 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
6954 cat >> confdefs.h <<EOF
6955 #define SIZEOF_CHAR $ac_cv_sizeof_char
6956 EOF
6957
6958
6959 echo $ac_n "checking size of short int""... $ac_c" 1>&6
6960 echo "configure:6961: checking size of short int" >&5
6961 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
6962   echo $ac_n "(cached) $ac_c" 1>&6
6963 else
6964   if test "$cross_compiling" = yes; then
6965   ac_cv_sizeof_short_int=2
6966 else
6967   cat > conftest.$ac_ext <<EOF
6968 #line 6969 "configure"
6969 #include "confdefs.h"
6970 #include <stdio.h>
6971 int main()
6972 {
6973   FILE *f=fopen("conftestval", "w");
6974   if (!f) return(1);
6975   fprintf(f, "%d\n", sizeof(short int));
6976   return(0);
6977 }
6978 EOF
6979 if { (eval echo configure:6980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6980 then
6981   ac_cv_sizeof_short_int=`cat conftestval`
6982 else
6983   echo "configure: failed program was:" >&5
6984   cat conftest.$ac_ext >&5
6985   rm -fr conftest*
6986   ac_cv_sizeof_short_int=0
6987 fi
6988 rm -fr conftest*
6989 fi
6990
6991 fi
6992 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
6993 cat >> confdefs.h <<EOF
6994 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
6995 EOF
6996
6997
6998 echo $ac_n "checking size of int""... $ac_c" 1>&6
6999 echo "configure:7000: checking size of int" >&5
7000 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7001   echo $ac_n "(cached) $ac_c" 1>&6
7002 else
7003   if test "$cross_compiling" = yes; then
7004   ac_cv_sizeof_int=4
7005 else
7006   cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009 #include <stdio.h>
7010 int main()
7011 {
7012   FILE *f=fopen("conftestval", "w");
7013   if (!f) return(1);
7014   fprintf(f, "%d\n", sizeof(int));
7015   return(0);
7016 }
7017 EOF
7018 if { (eval echo configure:7019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7019 then
7020   ac_cv_sizeof_int=`cat conftestval`
7021 else
7022   echo "configure: failed program was:" >&5
7023   cat conftest.$ac_ext >&5
7024   rm -fr conftest*
7025   ac_cv_sizeof_int=0
7026 fi
7027 rm -fr conftest*
7028 fi
7029
7030 fi
7031 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
7032 cat >> confdefs.h <<EOF
7033 #define SIZEOF_INT $ac_cv_sizeof_int
7034 EOF
7035
7036
7037 echo $ac_n "checking size of long int""... $ac_c" 1>&6
7038 echo "configure:7039: checking size of long int" >&5
7039 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
7040   echo $ac_n "(cached) $ac_c" 1>&6
7041 else
7042   if test "$cross_compiling" = yes; then
7043   ac_cv_sizeof_long_int=4
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 #include <stdio.h>
7049 int main()
7050 {
7051   FILE *f=fopen("conftestval", "w");
7052   if (!f) return(1);
7053   fprintf(f, "%d\n", sizeof(long int));
7054   return(0);
7055 }
7056 EOF
7057 if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7058 then
7059   ac_cv_sizeof_long_int=`cat conftestval`
7060 else
7061   echo "configure: failed program was:" >&5
7062   cat conftest.$ac_ext >&5
7063   rm -fr conftest*
7064   ac_cv_sizeof_long_int=0
7065 fi
7066 rm -fr conftest*
7067 fi
7068
7069 fi
7070 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
7071 cat >> confdefs.h <<EOF
7072 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
7073 EOF
7074
7075
7076 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
7077 echo "configure:7078: checking size of long long int" >&5
7078 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   if test "$cross_compiling" = yes; then
7082   ac_cv_sizeof_long_long_int=8
7083 else
7084   cat > conftest.$ac_ext <<EOF
7085 #line 7086 "configure"
7086 #include "confdefs.h"
7087 #include <stdio.h>
7088 int main()
7089 {
7090   FILE *f=fopen("conftestval", "w");
7091   if (!f) return(1);
7092   fprintf(f, "%d\n", sizeof(long long int));
7093   return(0);
7094 }
7095 EOF
7096 if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7097 then
7098   ac_cv_sizeof_long_long_int=`cat conftestval`
7099 else
7100   echo "configure: failed program was:" >&5
7101   cat conftest.$ac_ext >&5
7102   rm -fr conftest*
7103   ac_cv_sizeof_long_long_int=0
7104 fi
7105 rm -fr conftest*
7106 fi
7107
7108 fi
7109 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
7110 cat >> confdefs.h <<EOF
7111 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
7112 EOF
7113
7114
7115 echo $ac_n "checking size of int *""... $ac_c" 1>&6
7116 echo "configure:7117: checking size of int *" >&5
7117 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   if test "$cross_compiling" = yes; then
7121   ac_cv_sizeof_int_p=4
7122 else
7123   cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 #include <stdio.h>
7127 int main()
7128 {
7129   FILE *f=fopen("conftestval", "w");
7130   if (!f) return(1);
7131   fprintf(f, "%d\n", sizeof(int *));
7132   return(0);
7133 }
7134 EOF
7135 if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7136 then
7137   ac_cv_sizeof_int_p=`cat conftestval`
7138 else
7139   echo "configure: failed program was:" >&5
7140   cat conftest.$ac_ext >&5
7141   rm -fr conftest*
7142   ac_cv_sizeof_int_p=0
7143 fi
7144 rm -fr conftest*
7145 fi
7146
7147 fi
7148 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
7149 cat >> confdefs.h <<EOF
7150 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
7151 EOF
7152
7153
7154
7155 # Check for sys/types.h types
7156 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
7157 echo "configure:7158: checking for u_int type" >&5
7158 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
7159   echo $ac_n "(cached) $ac_c" 1>&6
7160 else
7161   
7162     cat > conftest.$ac_ext <<EOF
7163 #line 7164 "configure"
7164 #include "confdefs.h"
7165  #include <sys/types.h> 
7166 int main() {
7167  u_int a; a = 1;
7168 ; return 0; }
7169 EOF
7170 if { (eval echo configure:7171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7171   rm -rf conftest*
7172    ac_cv_have_u_int="yes" 
7173 else
7174   echo "configure: failed program was:" >&5
7175   cat conftest.$ac_ext >&5
7176   rm -rf conftest*
7177    ac_cv_have_u_int="no" 
7178     
7179 fi
7180 rm -f conftest*
7181
7182 fi
7183
7184 echo "$ac_t""$ac_cv_have_u_int" 1>&6
7185 if test "x$ac_cv_have_u_int" = "xyes" ; then
7186    cat >> confdefs.h <<\EOF
7187 #define HAVE_U_INT 1
7188 EOF
7189
7190    have_u_int=1
7191 fi
7192
7193 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
7194 echo "configure:7195: checking for intmax_t type" >&5
7195 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
7196   echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198   
7199    cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202  #include <sys/types.h> 
7203 int main() {
7204  intmax_t a; a = 1;
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7208   rm -rf conftest*
7209    ac_cv_have_intmax_t="yes" 
7210 else
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214    
7215          cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218  #include <stdint.h> 
7219 int main() {
7220  intmax_t a; a = 1;
7221 ; return 0; }
7222 EOF
7223 if { (eval echo configure:7224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7224   rm -rf conftest*
7225    ac_cv_have_intmax_t="yes" 
7226 else
7227   echo "configure: failed program was:" >&5
7228   cat conftest.$ac_ext >&5
7229   rm -rf conftest*
7230    ac_cv_have_intmax_t="no" 
7231          
7232 fi
7233 rm -f conftest*
7234       
7235    
7236 fi
7237 rm -f conftest*     
7238
7239
7240 fi
7241
7242 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
7243 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
7244    cat >> confdefs.h <<\EOF
7245 #define HAVE_INTMAX_T 1
7246 EOF
7247
7248    have_intmax_t=1
7249 fi
7250
7251
7252 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
7253 echo "configure:7254: checking for u_intmax_t type" >&5
7254 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   
7258    cat > conftest.$ac_ext <<EOF
7259 #line 7260 "configure"
7260 #include "confdefs.h"
7261  #include <sys/types.h> 
7262 int main() {
7263  u_intmax_t a; a = 1;
7264 ; return 0; }
7265 EOF
7266 if { (eval echo configure:7267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7267   rm -rf conftest*
7268    ac_cv_have_u_intmax_t="yes" 
7269 else
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273    
7274          cat > conftest.$ac_ext <<EOF
7275 #line 7276 "configure"
7276 #include "confdefs.h"
7277  #include <stdint.h> 
7278 int main() {
7279  u_intmax_t a; a = 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_u_intmax_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_u_intmax_t="no" 
7290          
7291 fi
7292 rm -f conftest*
7293       
7294    
7295 fi
7296 rm -f conftest*
7297
7298 fi
7299
7300 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
7301 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
7302    cat >> confdefs.h <<\EOF
7303 #define HAVE_U_INTMAX_T 1
7304 EOF
7305
7306    have_u_intmax_t=1
7307 fi
7308
7309
7310 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
7311 echo "configure:7312: checking for intXX_t types" >&5
7312 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
7313   echo $ac_n "(cached) $ac_c" 1>&6
7314 else
7315   
7316    cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319  #include <sys/types.h> 
7320 int main() {
7321  int8_t a; int16_t b; int32_t c; a = b = c = 1;
7322 ; return 0; }
7323 EOF
7324 if { (eval echo configure:7325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7325   rm -rf conftest*
7326    ac_cv_have_intxx_t="yes" 
7327 else
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331    ac_cv_have_intxx_t="no" 
7332    
7333 fi
7334 rm -f conftest*
7335
7336 fi
7337
7338 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
7339 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
7340    cat >> confdefs.h <<\EOF
7341 #define HAVE_INTXX_T 1
7342 EOF
7343
7344    have_intxx_t=1
7345 fi
7346         
7347 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
7348 echo "configure:7349: checking for int64_t type" >&5
7349 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
7350   echo $ac_n "(cached) $ac_c" 1>&6
7351 else
7352   
7353    cat > conftest.$ac_ext <<EOF
7354 #line 7355 "configure"
7355 #include "confdefs.h"
7356  #include <sys/types.h> 
7357 int main() {
7358  int64_t a; a = 1;
7359 ; return 0; }
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7362   rm -rf conftest*
7363    ac_cv_have_int64_t="yes" 
7364 else
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368    ac_cv_have_int64_t="no" 
7369    
7370 fi
7371 rm -f conftest*
7372
7373 fi
7374
7375 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
7376 if test "x$ac_cv_have_int64_t" = "xyes" ; then
7377    cat >> confdefs.h <<\EOF
7378 #define HAVE_INT64_T 1
7379 EOF
7380
7381    have_int64_t=1
7382 fi
7383         
7384 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
7385 echo "configure:7386: checking for u_intXX_t types" >&5
7386 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
7387   echo $ac_n "(cached) $ac_c" 1>&6
7388 else
7389   
7390    cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393  #include <sys/types.h> 
7394 int main() {
7395  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
7396 ; return 0; }
7397 EOF
7398 if { (eval echo configure:7399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7399   rm -rf conftest*
7400    ac_cv_have_u_intxx_t="yes" 
7401 else
7402   echo "configure: failed program was:" >&5
7403   cat conftest.$ac_ext >&5
7404   rm -rf conftest*
7405    ac_cv_have_u_intxx_t="no" 
7406    
7407 fi
7408 rm -f conftest*
7409
7410 fi
7411
7412 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
7413 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
7414    cat >> confdefs.h <<\EOF
7415 #define HAVE_U_INTXX_T 1
7416 EOF
7417
7418    have_u_intxx_t=1
7419 fi
7420
7421 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
7422 echo "configure:7423: checking for u_int64_t types" >&5
7423 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
7424   echo $ac_n "(cached) $ac_c" 1>&6
7425 else
7426   
7427    cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430  #include <sys/types.h> 
7431 int main() {
7432  u_int64_t a; a = 1;
7433 ; return 0; }
7434 EOF
7435 if { (eval echo configure:7436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7436   rm -rf conftest*
7437    ac_cv_have_u_int64_t="yes" 
7438 else
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442    ac_cv_have_u_int64_t="no" 
7443    
7444 fi
7445 rm -f conftest*
7446
7447 fi
7448
7449 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
7450 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
7451    cat >> confdefs.h <<\EOF
7452 #define HAVE_U_INT64_T 1
7453 EOF
7454
7455    have_u_int64_t=1
7456 fi
7457
7458 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
7459            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
7460 then
7461    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
7462 echo "configure:7463: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
7463    cat > conftest.$ac_ext <<EOF
7464 #line 7465 "configure"
7465 #include "confdefs.h"
7466  #include <sys/bitypes.h>  
7467 int main() {
7468  int8_t a; int16_t b; int32_t c;
7469         u_int8_t e; u_int16_t f; u_int32_t g;
7470         a = b = c = e = f = g = 1;  
7471 ; return 0; }
7472 EOF
7473 if { (eval echo configure:7474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7474   rm -rf conftest*
7475    cat >> confdefs.h <<\EOF
7476 #define HAVE_U_INTXX_T 1
7477 EOF
7478
7479         cat >> confdefs.h <<\EOF
7480 #define HAVE_INTXX_T 1
7481 EOF
7482
7483         cat >> confdefs.h <<\EOF
7484 #define HAVE_SYS_BITYPES_H 1
7485 EOF
7486
7487         echo "$ac_t""yes" 1>&6 
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492    echo "$ac_t""no" 1>&6
7493    
7494 fi
7495 rm -f conftest* 
7496 fi
7497
7498 if test -z "$have_u_intxx_t" ; then
7499    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
7500 echo "configure:7501: checking for uintXX_t types" >&5
7501 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
7502   echo $ac_n "(cached) $ac_c" 1>&6
7503 else
7504   
7505       cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508  #include <sys/types.h> 
7509 int main() {
7510  uint8_t a; uint16_t b; 
7511            uint32_t c; a = b = c = 1; 
7512 ; return 0; }
7513 EOF
7514 if { (eval echo configure:7515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7515   rm -rf conftest*
7516    ac_cv_have_uintxx_t="yes" 
7517 else
7518   echo "configure: failed program was:" >&5
7519   cat conftest.$ac_ext >&5
7520   rm -rf conftest*
7521    ac_cv_have_uintxx_t="no" 
7522       
7523 fi
7524 rm -f conftest*
7525    
7526 fi
7527
7528 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
7529    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
7530       cat >> confdefs.h <<\EOF
7531 #define HAVE_UINTXX_T 1
7532 EOF
7533
7534    fi
7535 fi
7536
7537
7538 for ac_func in \
7539         fork \
7540         getcwd \
7541         gethostname \
7542         getpid \
7543         gettimeofday \
7544         setpgid \
7545         setpgrp \
7546         setsid \
7547         signal \
7548         strerror \
7549         strncmp \
7550         strncpy \
7551         vfprintf \
7552         
7553 do
7554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7555 echo "configure:7556: checking for $ac_func" >&5
7556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7557   echo $ac_n "(cached) $ac_c" 1>&6
7558 else
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 /* System header to define __stub macros and hopefully few prototypes,
7563     which can conflict with char $ac_func(); below.  */
7564 #include <assert.h>
7565 /* Override any gcc2 internal prototype to avoid an error.  */
7566 /* We use char because int might match the return type of a gcc2
7567     builtin and then its argument prototype would still apply.  */
7568 char $ac_func();
7569
7570 int main() {
7571
7572 /* The GNU C library defines this for functions which it implements
7573     to always fail with ENOSYS.  Some functions are actually named
7574     something starting with __ and the normal name is an alias.  */
7575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7576 choke me
7577 #else
7578 $ac_func();
7579 #endif
7580
7581 ; return 0; }
7582 EOF
7583 if { (eval echo configure:7584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7584   rm -rf conftest*
7585   eval "ac_cv_func_$ac_func=yes"
7586 else
7587   echo "configure: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   rm -rf conftest*
7590   eval "ac_cv_func_$ac_func=no"
7591 fi
7592 rm -f conftest*
7593 fi
7594
7595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7596   echo "$ac_t""yes" 1>&6
7597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7598   cat >> confdefs.h <<EOF
7599 #define $ac_tr_func 1
7600 EOF
7601  
7602 else
7603   echo "$ac_t""no" 1>&6
7604 echo 'configure: cannot find needed function.'; exit 1
7605
7606 fi
7607 done
7608
7609
7610 for ac_func in fchdir
7611 do
7612 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613 echo "configure:7614: checking for $ac_func" >&5
7614 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7615   echo $ac_n "(cached) $ac_c" 1>&6
7616 else
7617   cat > conftest.$ac_ext <<EOF
7618 #line 7619 "configure"
7619 #include "confdefs.h"
7620 /* System header to define __stub macros and hopefully few prototypes,
7621     which can conflict with char $ac_func(); below.  */
7622 #include <assert.h>
7623 /* Override any gcc2 internal prototype to avoid an error.  */
7624 /* We use char because int might match the return type of a gcc2
7625     builtin and then its argument prototype would still apply.  */
7626 char $ac_func();
7627
7628 int main() {
7629
7630 /* The GNU C library defines this for functions which it implements
7631     to always fail with ENOSYS.  Some functions are actually named
7632     something starting with __ and the normal name is an alias.  */
7633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7634 choke me
7635 #else
7636 $ac_func();
7637 #endif
7638
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_func_$ac_func=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_func_$ac_func=no"
7649 fi
7650 rm -f conftest*
7651 fi
7652
7653 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7654   echo "$ac_t""yes" 1>&6
7655     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7656   cat >> confdefs.h <<EOF
7657 #define $ac_tr_func 1
7658 EOF
7659  cat >> confdefs.h <<\EOF
7660 #define HAVE_FCHDIR 1
7661 EOF
7662
7663 else
7664   echo "$ac_t""no" 1>&6
7665 fi
7666 done
7667
7668
7669 for ac_func in chflags
7670 do
7671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7672 echo "configure:7673: checking for $ac_func" >&5
7673 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7674   echo $ac_n "(cached) $ac_c" 1>&6
7675 else
7676   cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* System header to define __stub macros and hopefully few prototypes,
7680     which can conflict with char $ac_func(); below.  */
7681 #include <assert.h>
7682 /* Override any gcc2 internal prototype to avoid an error.  */
7683 /* We use char because int might match the return type of a gcc2
7684     builtin and then its argument prototype would still apply.  */
7685 char $ac_func();
7686
7687 int main() {
7688
7689 /* The GNU C library defines this for functions which it implements
7690     to always fail with ENOSYS.  Some functions are actually named
7691     something starting with __ and the normal name is an alias.  */
7692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7693 choke me
7694 #else
7695 $ac_func();
7696 #endif
7697
7698 ; return 0; }
7699 EOF
7700 if { (eval echo configure:7701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7701   rm -rf conftest*
7702   eval "ac_cv_func_$ac_func=yes"
7703 else
7704   echo "configure: failed program was:" >&5
7705   cat conftest.$ac_ext >&5
7706   rm -rf conftest*
7707   eval "ac_cv_func_$ac_func=no"
7708 fi
7709 rm -f conftest*
7710 fi
7711
7712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7713   echo "$ac_t""yes" 1>&6
7714     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7715   cat >> confdefs.h <<EOF
7716 #define $ac_tr_func 1
7717 EOF
7718  
7719 else
7720   echo "$ac_t""no" 1>&6
7721 fi
7722 done
7723  
7724
7725 for ac_func in snprintf vsnprintf gethostid getdomainname
7726 do
7727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7728 echo "configure:7729: checking for $ac_func" >&5
7729 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7730   echo $ac_n "(cached) $ac_c" 1>&6
7731 else
7732   cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735 /* System header to define __stub macros and hopefully few prototypes,
7736     which can conflict with char $ac_func(); below.  */
7737 #include <assert.h>
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 /* We use char because int might match the return type of a gcc2
7740     builtin and then its argument prototype would still apply.  */
7741 char $ac_func();
7742
7743 int main() {
7744
7745 /* The GNU C library defines this for functions which it implements
7746     to always fail with ENOSYS.  Some functions are actually named
7747     something starting with __ and the normal name is an alias.  */
7748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7749 choke me
7750 #else
7751 $ac_func();
7752 #endif
7753
7754 ; return 0; }
7755 EOF
7756 if { (eval echo configure:7757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7757   rm -rf conftest*
7758   eval "ac_cv_func_$ac_func=yes"
7759 else
7760   echo "configure: failed program was:" >&5
7761   cat conftest.$ac_ext >&5
7762   rm -rf conftest*
7763   eval "ac_cv_func_$ac_func=no"
7764 fi
7765 rm -f conftest*
7766 fi
7767
7768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7769   echo "$ac_t""yes" 1>&6
7770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7771   cat >> confdefs.h <<EOF
7772 #define $ac_tr_func 1
7773 EOF
7774  
7775 else
7776   echo "$ac_t""no" 1>&6
7777 fi
7778 done
7779
7780
7781 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
7782 do
7783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7784 echo "configure:7785: checking for $ac_func" >&5
7785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7786   echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788   cat > conftest.$ac_ext <<EOF
7789 #line 7790 "configure"
7790 #include "confdefs.h"
7791 /* System header to define __stub macros and hopefully few prototypes,
7792     which can conflict with char $ac_func(); below.  */
7793 #include <assert.h>
7794 /* Override any gcc2 internal prototype to avoid an error.  */
7795 /* We use char because int might match the return type of a gcc2
7796     builtin and then its argument prototype would still apply.  */
7797 char $ac_func();
7798
7799 int main() {
7800
7801 /* The GNU C library defines this for functions which it implements
7802     to always fail with ENOSYS.  Some functions are actually named
7803     something starting with __ and the normal name is an alias.  */
7804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7805 choke me
7806 #else
7807 $ac_func();
7808 #endif
7809
7810 ; return 0; }
7811 EOF
7812 if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7813   rm -rf conftest*
7814   eval "ac_cv_func_$ac_func=yes"
7815 else
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -rf conftest*
7819   eval "ac_cv_func_$ac_func=no"
7820 fi
7821 rm -f conftest*
7822 fi
7823
7824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7827   cat >> confdefs.h <<EOF
7828 #define $ac_tr_func 1
7829 EOF
7830  
7831 else
7832   echo "$ac_t""no" 1>&6
7833 fi
7834 done
7835
7836
7837 # If resolver functions are not in libc check for -lnsl or -lresolv.
7838 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
7839 echo "configure:7840: checking for gethostbyname_r" >&5
7840 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
7841   echo $ac_n "(cached) $ac_c" 1>&6
7842 else
7843   cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 /* System header to define __stub macros and hopefully few prototypes,
7847     which can conflict with char gethostbyname_r(); below.  */
7848 #include <assert.h>
7849 /* Override any gcc2 internal prototype to avoid an error.  */
7850 /* We use char because int might match the return type of a gcc2
7851     builtin and then its argument prototype would still apply.  */
7852 char gethostbyname_r();
7853
7854 int main() {
7855
7856 /* The GNU C library defines this for functions which it implements
7857     to always fail with ENOSYS.  Some functions are actually named
7858     something starting with __ and the normal name is an alias.  */
7859 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
7860 choke me
7861 #else
7862 gethostbyname_r();
7863 #endif
7864
7865 ; return 0; }
7866 EOF
7867 if { (eval echo configure:7868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7868   rm -rf conftest*
7869   eval "ac_cv_func_gethostbyname_r=yes"
7870 else
7871   echo "configure: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   rm -rf conftest*
7874   eval "ac_cv_func_gethostbyname_r=no"
7875 fi
7876 rm -f conftest*
7877 fi
7878
7879 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
7880   echo "$ac_t""yes" 1>&6
7881   echo "$ac_t""using libc's resolver" 1>&6
7882 else
7883   echo "$ac_t""no" 1>&6
7884 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
7885 echo "configure:7886: checking for gethostbyname_r in -lnsl" >&5
7886 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
7887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   ac_save_LIBS="$LIBS"
7891 LIBS="-lnsl  $LIBS"
7892 cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 /* Override any gcc2 internal prototype to avoid an error.  */
7896 /* We use char because int might match the return type of a gcc2
7897     builtin and then its argument prototype would still apply.  */
7898 char gethostbyname_r();
7899
7900 int main() {
7901 gethostbyname_r()
7902 ; return 0; }
7903 EOF
7904 if { (eval echo configure:7905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7905   rm -rf conftest*
7906   eval "ac_cv_lib_$ac_lib_var=yes"
7907 else
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   eval "ac_cv_lib_$ac_lib_var=no"
7912 fi
7913 rm -f conftest*
7914 LIBS="$ac_save_LIBS"
7915
7916 fi
7917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
7920     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7921   cat >> confdefs.h <<EOF
7922 #define $ac_tr_lib 1
7923 EOF
7924
7925   LIBS="-lnsl $LIBS"
7926
7927 else
7928   echo "$ac_t""no" 1>&6
7929 fi
7930
7931     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
7932 echo "configure:7933: checking for gethostbyname_r in -lresolv" >&5
7933 ac_lib_var=`echo resolv'_'gethostbyname_r | 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="-lresolv  $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 gethostbyname_r();
7946
7947 int main() {
7948 gethostbyname_r()
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 resolv | 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="-lresolv $LIBS"
7973
7974 else
7975   echo "$ac_t""no" 1>&6
7976 fi
7977
7978 fi
7979
7980
7981
7982 # Find where sockets are (especially for Solaris)
7983 echo $ac_n "checking for socket""... $ac_c" 1>&6
7984 echo "configure:7985: checking for socket" >&5
7985 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7986   echo $ac_n "(cached) $ac_c" 1>&6
7987 else
7988   cat > conftest.$ac_ext <<EOF
7989 #line 7990 "configure"
7990 #include "confdefs.h"
7991 /* System header to define __stub macros and hopefully few prototypes,
7992     which can conflict with char socket(); below.  */
7993 #include <assert.h>
7994 /* Override any gcc2 internal prototype to avoid an error.  */
7995 /* We use char because int might match the return type of a gcc2
7996     builtin and then its argument prototype would still apply.  */
7997 char socket();
7998
7999 int main() {
8000
8001 /* The GNU C library defines this for functions which it implements
8002     to always fail with ENOSYS.  Some functions are actually named
8003     something starting with __ and the normal name is an alias.  */
8004 #if defined (__stub_socket) || defined (__stub___socket)
8005 choke me
8006 #else
8007 socket();
8008 #endif
8009
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8013   rm -rf conftest*
8014   eval "ac_cv_func_socket=yes"
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   eval "ac_cv_func_socket=no"
8020 fi
8021 rm -f conftest*
8022 fi
8023
8024 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8025   echo "$ac_t""yes" 1>&6
8026   echo "$ac_t""using libc's socket" 1>&6
8027 else
8028   echo "$ac_t""no" 1>&6
8029 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
8030 echo "configure:8031: checking for socket in -lxnet" >&5
8031 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
8032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   ac_save_LIBS="$LIBS"
8036 LIBS="-lxnet  $LIBS"
8037 cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* Override any gcc2 internal prototype to avoid an error.  */
8041 /* We use char because int might match the return type of a gcc2
8042     builtin and then its argument prototype would still apply.  */
8043 char socket();
8044
8045 int main() {
8046 socket()
8047 ; return 0; }
8048 EOF
8049 if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8050   rm -rf conftest*
8051   eval "ac_cv_lib_$ac_lib_var=yes"
8052 else
8053   echo "configure: failed program was:" >&5
8054   cat conftest.$ac_ext >&5
8055   rm -rf conftest*
8056   eval "ac_cv_lib_$ac_lib_var=no"
8057 fi
8058 rm -f conftest*
8059 LIBS="$ac_save_LIBS"
8060
8061 fi
8062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8063   echo "$ac_t""yes" 1>&6
8064     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
8065     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8066   cat >> confdefs.h <<EOF
8067 #define $ac_tr_lib 1
8068 EOF
8069
8070   LIBS="-lxnet $LIBS"
8071
8072 else
8073   echo "$ac_t""no" 1>&6
8074 fi
8075
8076     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
8077 echo "configure:8078: checking for socket in -lsocket" >&5
8078 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
8079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8080   echo $ac_n "(cached) $ac_c" 1>&6
8081 else
8082   ac_save_LIBS="$LIBS"
8083 LIBS="-lsocket  $LIBS"
8084 cat > conftest.$ac_ext <<EOF
8085 #line 8086 "configure"
8086 #include "confdefs.h"
8087 /* Override any gcc2 internal prototype to avoid an error.  */
8088 /* We use char because int might match the return type of a gcc2
8089     builtin and then its argument prototype would still apply.  */
8090 char socket();
8091
8092 int main() {
8093 socket()
8094 ; return 0; }
8095 EOF
8096 if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8097   rm -rf conftest*
8098   eval "ac_cv_lib_$ac_lib_var=yes"
8099 else
8100   echo "configure: failed program was:" >&5
8101   cat conftest.$ac_ext >&5
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=no"
8104 fi
8105 rm -f conftest*
8106 LIBS="$ac_save_LIBS"
8107
8108 fi
8109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8110   echo "$ac_t""yes" 1>&6
8111     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
8112     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8113   cat >> confdefs.h <<EOF
8114 #define $ac_tr_lib 1
8115 EOF
8116
8117   LIBS="-lsocket $LIBS"
8118
8119 else
8120   echo "$ac_t""no" 1>&6
8121 fi
8122
8123     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8124 echo "configure:8125: checking for socket in -linet" >&5
8125 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
8126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8127   echo $ac_n "(cached) $ac_c" 1>&6
8128 else
8129   ac_save_LIBS="$LIBS"
8130 LIBS="-linet  $LIBS"
8131 cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* Override any gcc2 internal prototype to avoid an error.  */
8135 /* We use char because int might match the return type of a gcc2
8136     builtin and then its argument prototype would still apply.  */
8137 char socket();
8138
8139 int main() {
8140 socket()
8141 ; return 0; }
8142 EOF
8143 if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8144   rm -rf conftest*
8145   eval "ac_cv_lib_$ac_lib_var=yes"
8146 else
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -rf conftest*
8150   eval "ac_cv_lib_$ac_lib_var=no"
8151 fi
8152 rm -f conftest*
8153 LIBS="$ac_save_LIBS"
8154
8155 fi
8156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8157   echo "$ac_t""yes" 1>&6
8158     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
8159     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8160   cat >> confdefs.h <<EOF
8161 #define $ac_tr_lib 1
8162 EOF
8163
8164   LIBS="-linet $LIBS"
8165
8166 else
8167   echo "$ac_t""no" 1>&6
8168 fi
8169
8170 fi
8171
8172
8173 for ac_func in inet_pton
8174 do
8175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8176 echo "configure:8177: checking for $ac_func" >&5
8177 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8178   echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8180   cat > conftest.$ac_ext <<EOF
8181 #line 8182 "configure"
8182 #include "confdefs.h"
8183 /* System header to define __stub macros and hopefully few prototypes,
8184     which can conflict with char $ac_func(); below.  */
8185 #include <assert.h>
8186 /* Override any gcc2 internal prototype to avoid an error.  */
8187 /* We use char because int might match the return type of a gcc2
8188     builtin and then its argument prototype would still apply.  */
8189 char $ac_func();
8190
8191 int main() {
8192
8193 /* The GNU C library defines this for functions which it implements
8194     to always fail with ENOSYS.  Some functions are actually named
8195     something starting with __ and the normal name is an alias.  */
8196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8197 choke me
8198 #else
8199 $ac_func();
8200 #endif
8201
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_func_$ac_func=yes"
8207 else
8208   echo "configure: failed program was:" >&5
8209   cat conftest.$ac_ext >&5
8210   rm -rf conftest*
8211   eval "ac_cv_func_$ac_func=no"
8212 fi
8213 rm -f conftest*
8214 fi
8215
8216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8217   echo "$ac_t""yes" 1>&6
8218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8219   cat >> confdefs.h <<EOF
8220 #define $ac_tr_func 1
8221 EOF
8222  cat >> confdefs.h <<\EOF
8223 #define HAVE_INET_PTON 1
8224 EOF
8225
8226 else
8227   echo "$ac_t""no" 1>&6
8228 fi
8229 done
8230
8231
8232 echo $ac_n "checking for strftime""... $ac_c" 1>&6
8233 echo "configure:8234: checking for strftime" >&5
8234 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
8235   echo $ac_n "(cached) $ac_c" 1>&6
8236 else
8237   cat > conftest.$ac_ext <<EOF
8238 #line 8239 "configure"
8239 #include "confdefs.h"
8240 /* System header to define __stub macros and hopefully few prototypes,
8241     which can conflict with char strftime(); below.  */
8242 #include <assert.h>
8243 /* Override any gcc2 internal prototype to avoid an error.  */
8244 /* We use char because int might match the return type of a gcc2
8245     builtin and then its argument prototype would still apply.  */
8246 char strftime();
8247
8248 int main() {
8249
8250 /* The GNU C library defines this for functions which it implements
8251     to always fail with ENOSYS.  Some functions are actually named
8252     something starting with __ and the normal name is an alias.  */
8253 #if defined (__stub_strftime) || defined (__stub___strftime)
8254 choke me
8255 #else
8256 strftime();
8257 #endif
8258
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_func_strftime=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_func_strftime=no"
8269 fi
8270 rm -f conftest*
8271 fi
8272
8273 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
8274   echo "$ac_t""yes" 1>&6
8275   cat >> confdefs.h <<\EOF
8276 #define HAVE_STRFTIME 1
8277 EOF
8278
8279 else
8280   echo "$ac_t""no" 1>&6
8281 # strftime is in -lintl on SCO UNIX.
8282 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8283 echo "configure:8284: checking for strftime in -lintl" >&5
8284 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8286   echo $ac_n "(cached) $ac_c" 1>&6
8287 else
8288   ac_save_LIBS="$LIBS"
8289 LIBS="-lintl  $LIBS"
8290 cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.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 strftime();
8297
8298 int main() {
8299 strftime()
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=no"
8310 fi
8311 rm -f conftest*
8312 LIBS="$ac_save_LIBS"
8313
8314 fi
8315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8316   echo "$ac_t""yes" 1>&6
8317   cat >> confdefs.h <<\EOF
8318 #define HAVE_STRFTIME 1
8319 EOF
8320
8321 LIBS="-lintl $LIBS"
8322 else
8323   echo "$ac_t""no" 1>&6
8324 fi
8325
8326 fi
8327
8328 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8329 echo "configure:8330: checking for vprintf" >&5
8330 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 /* System header to define __stub macros and hopefully few prototypes,
8337     which can conflict with char vprintf(); below.  */
8338 #include <assert.h>
8339 /* Override any gcc2 internal prototype to avoid an error.  */
8340 /* We use char because int might match the return type of a gcc2
8341     builtin and then its argument prototype would still apply.  */
8342 char vprintf();
8343
8344 int main() {
8345
8346 /* The GNU C library defines this for functions which it implements
8347     to always fail with ENOSYS.  Some functions are actually named
8348     something starting with __ and the normal name is an alias.  */
8349 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8350 choke me
8351 #else
8352 vprintf();
8353 #endif
8354
8355 ; return 0; }
8356 EOF
8357 if { (eval echo configure:8358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8358   rm -rf conftest*
8359   eval "ac_cv_func_vprintf=yes"
8360 else
8361   echo "configure: failed program was:" >&5
8362   cat conftest.$ac_ext >&5
8363   rm -rf conftest*
8364   eval "ac_cv_func_vprintf=no"
8365 fi
8366 rm -f conftest*
8367 fi
8368
8369 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8370   echo "$ac_t""yes" 1>&6
8371   cat >> confdefs.h <<\EOF
8372 #define HAVE_VPRINTF 1
8373 EOF
8374
8375 else
8376   echo "$ac_t""no" 1>&6
8377 fi
8378
8379 if test "$ac_cv_func_vprintf" != yes; then
8380 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8381 echo "configure:8382: checking for _doprnt" >&5
8382 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8383   echo $ac_n "(cached) $ac_c" 1>&6
8384 else
8385   cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388 /* System header to define __stub macros and hopefully few prototypes,
8389     which can conflict with char _doprnt(); below.  */
8390 #include <assert.h>
8391 /* Override any gcc2 internal prototype to avoid an error.  */
8392 /* We use char because int might match the return type of a gcc2
8393     builtin and then its argument prototype would still apply.  */
8394 char _doprnt();
8395
8396 int main() {
8397
8398 /* The GNU C library defines this for functions which it implements
8399     to always fail with ENOSYS.  Some functions are actually named
8400     something starting with __ and the normal name is an alias.  */
8401 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8402 choke me
8403 #else
8404 _doprnt();
8405 #endif
8406
8407 ; return 0; }
8408 EOF
8409 if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8410   rm -rf conftest*
8411   eval "ac_cv_func__doprnt=yes"
8412 else
8413   echo "configure: failed program was:" >&5
8414   cat conftest.$ac_ext >&5
8415   rm -rf conftest*
8416   eval "ac_cv_func__doprnt=no"
8417 fi
8418 rm -f conftest*
8419 fi
8420
8421 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8422   echo "$ac_t""yes" 1>&6
8423   cat >> confdefs.h <<\EOF
8424 #define HAVE_DOPRNT 1
8425 EOF
8426
8427 else
8428   echo "$ac_t""no" 1>&6
8429 fi
8430
8431 fi
8432
8433 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8434 # for constant arguments.  Useless!
8435 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8436 echo "configure:8437: checking for working alloca.h" >&5
8437 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+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 #include <alloca.h>
8444 int main() {
8445 char *p = alloca(2 * sizeof(int));
8446 ; return 0; }
8447 EOF
8448 if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8449   rm -rf conftest*
8450   ac_cv_header_alloca_h=yes
8451 else
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   ac_cv_header_alloca_h=no
8456 fi
8457 rm -f conftest*
8458 fi
8459
8460 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8461 if test $ac_cv_header_alloca_h = yes; then
8462   cat >> confdefs.h <<\EOF
8463 #define HAVE_ALLOCA_H 1
8464 EOF
8465
8466 fi
8467
8468 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8469 echo "configure:8470: checking for alloca" >&5
8470 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8471   echo $ac_n "(cached) $ac_c" 1>&6
8472 else
8473   cat > conftest.$ac_ext <<EOF
8474 #line 8475 "configure"
8475 #include "confdefs.h"
8476
8477 #ifdef __GNUC__
8478 # define alloca __builtin_alloca
8479 #else
8480 # ifdef _MSC_VER
8481 #  include <malloc.h>
8482 #  define alloca _alloca
8483 # else
8484 #  if HAVE_ALLOCA_H
8485 #   include <alloca.h>
8486 #  else
8487 #   ifdef _AIX
8488  #pragma alloca
8489 #   else
8490 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8491 char *alloca ();
8492 #    endif
8493 #   endif
8494 #  endif
8495 # endif
8496 #endif
8497
8498 int main() {
8499 char *p = (char *) alloca(1);
8500 ; return 0; }
8501 EOF
8502 if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8503   rm -rf conftest*
8504   ac_cv_func_alloca_works=yes
8505 else
8506   echo "configure: failed program was:" >&5
8507   cat conftest.$ac_ext >&5
8508   rm -rf conftest*
8509   ac_cv_func_alloca_works=no
8510 fi
8511 rm -f conftest*
8512 fi
8513
8514 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8515 if test $ac_cv_func_alloca_works = yes; then
8516   cat >> confdefs.h <<\EOF
8517 #define HAVE_ALLOCA 1
8518 EOF
8519
8520 fi
8521
8522 if test $ac_cv_func_alloca_works = no; then
8523   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8524   # that cause trouble.  Some versions do not even contain alloca or
8525   # contain a buggy version.  If you still want to use their alloca,
8526   # use ar to extract alloca.o from them instead of compiling alloca.c.
8527   ALLOCA=alloca.${ac_objext}
8528   cat >> confdefs.h <<\EOF
8529 #define C_ALLOCA 1
8530 EOF
8531
8532
8533 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8534 echo "configure:8535: checking whether alloca needs Cray hooks" >&5
8535 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8536   echo $ac_n "(cached) $ac_c" 1>&6
8537 else
8538   cat > conftest.$ac_ext <<EOF
8539 #line 8540 "configure"
8540 #include "confdefs.h"
8541 #if defined(CRAY) && ! defined(CRAY2)
8542 webecray
8543 #else
8544 wenotbecray
8545 #endif
8546
8547 EOF
8548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8549   egrep "webecray" >/dev/null 2>&1; then
8550   rm -rf conftest*
8551   ac_cv_os_cray=yes
8552 else
8553   rm -rf conftest*
8554   ac_cv_os_cray=no
8555 fi
8556 rm -f conftest*
8557
8558 fi
8559
8560 echo "$ac_t""$ac_cv_os_cray" 1>&6
8561 if test $ac_cv_os_cray = yes; then
8562 for ac_func in _getb67 GETB67 getb67; do
8563   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8564 echo "configure:8565: checking for $ac_func" >&5
8565 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8566   echo $ac_n "(cached) $ac_c" 1>&6
8567 else
8568   cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 /* System header to define __stub macros and hopefully few prototypes,
8572     which can conflict with char $ac_func(); below.  */
8573 #include <assert.h>
8574 /* Override any gcc2 internal prototype to avoid an error.  */
8575 /* We use char because int might match the return type of a gcc2
8576     builtin and then its argument prototype would still apply.  */
8577 char $ac_func();
8578
8579 int main() {
8580
8581 /* The GNU C library defines this for functions which it implements
8582     to always fail with ENOSYS.  Some functions are actually named
8583     something starting with __ and the normal name is an alias.  */
8584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8585 choke me
8586 #else
8587 $ac_func();
8588 #endif
8589
8590 ; return 0; }
8591 EOF
8592 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8593   rm -rf conftest*
8594   eval "ac_cv_func_$ac_func=yes"
8595 else
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -rf conftest*
8599   eval "ac_cv_func_$ac_func=no"
8600 fi
8601 rm -f conftest*
8602 fi
8603
8604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8605   echo "$ac_t""yes" 1>&6
8606   cat >> confdefs.h <<EOF
8607 #define CRAY_STACKSEG_END $ac_func
8608 EOF
8609
8610   break
8611 else
8612   echo "$ac_t""no" 1>&6
8613 fi
8614
8615 done
8616 fi
8617
8618 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8619 echo "configure:8620: checking stack direction for C alloca" >&5
8620 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   if test "$cross_compiling" = yes; then
8624   ac_cv_c_stack_direction=0
8625 else
8626   cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 find_stack_direction ()
8630 {
8631   static char *addr = 0;
8632   auto char dummy;
8633   if (addr == 0)
8634     {
8635       addr = &dummy;
8636       return find_stack_direction ();
8637     }
8638   else
8639     return (&dummy > addr) ? 1 : -1;
8640 }
8641 main ()
8642 {
8643   exit (find_stack_direction() < 0);
8644 }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8647 then
8648   ac_cv_c_stack_direction=1
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -fr conftest*
8653   ac_cv_c_stack_direction=-1
8654 fi
8655 rm -fr conftest*
8656 fi
8657
8658 fi
8659
8660 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8661 cat >> confdefs.h <<EOF
8662 #define STACK_DIRECTION $ac_cv_c_stack_direction
8663 EOF
8664
8665 fi
8666
8667 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
8668 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
8669 echo "configure:8670: checking for getmntent in -lsun" >&5
8670 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
8671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8672   echo $ac_n "(cached) $ac_c" 1>&6
8673 else
8674   ac_save_LIBS="$LIBS"
8675 LIBS="-lsun  $LIBS"
8676 cat > conftest.$ac_ext <<EOF
8677 #line 8678 "configure"
8678 #include "confdefs.h"
8679 /* Override any gcc2 internal prototype to avoid an error.  */
8680 /* We use char because int might match the return type of a gcc2
8681     builtin and then its argument prototype would still apply.  */
8682 char getmntent();
8683
8684 int main() {
8685 getmntent()
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8689   rm -rf conftest*
8690   eval "ac_cv_lib_$ac_lib_var=yes"
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   eval "ac_cv_lib_$ac_lib_var=no"
8696 fi
8697 rm -f conftest*
8698 LIBS="$ac_save_LIBS"
8699
8700 fi
8701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8702   echo "$ac_t""yes" 1>&6
8703   LIBS="-lsun $LIBS"
8704 else
8705   echo "$ac_t""no" 1>&6
8706 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
8707 echo "configure:8708: checking for getmntent in -lseq" >&5
8708 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
8709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   ac_save_LIBS="$LIBS"
8713 LIBS="-lseq  $LIBS"
8714 cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 /* Override any gcc2 internal prototype to avoid an error.  */
8718 /* We use char because int might match the return type of a gcc2
8719     builtin and then its argument prototype would still apply.  */
8720 char getmntent();
8721
8722 int main() {
8723 getmntent()
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8727   rm -rf conftest*
8728   eval "ac_cv_lib_$ac_lib_var=yes"
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   eval "ac_cv_lib_$ac_lib_var=no"
8734 fi
8735 rm -f conftest*
8736 LIBS="$ac_save_LIBS"
8737
8738 fi
8739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8740   echo "$ac_t""yes" 1>&6
8741   LIBS="-lseq $LIBS"
8742 else
8743   echo "$ac_t""no" 1>&6
8744 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
8745 echo "configure:8746: checking for getmntent in -lgen" >&5
8746 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
8747 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8748   echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750   ac_save_LIBS="$LIBS"
8751 LIBS="-lgen  $LIBS"
8752 cat > conftest.$ac_ext <<EOF
8753 #line 8754 "configure"
8754 #include "confdefs.h"
8755 /* Override any gcc2 internal prototype to avoid an error.  */
8756 /* We use char because int might match the return type of a gcc2
8757     builtin and then its argument prototype would still apply.  */
8758 char getmntent();
8759
8760 int main() {
8761 getmntent()
8762 ; return 0; }
8763 EOF
8764 if { (eval echo configure:8765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8765   rm -rf conftest*
8766   eval "ac_cv_lib_$ac_lib_var=yes"
8767 else
8768   echo "configure: failed program was:" >&5
8769   cat conftest.$ac_ext >&5
8770   rm -rf conftest*
8771   eval "ac_cv_lib_$ac_lib_var=no"
8772 fi
8773 rm -f conftest*
8774 LIBS="$ac_save_LIBS"
8775
8776 fi
8777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8778   echo "$ac_t""yes" 1>&6
8779   LIBS="-lgen $LIBS"
8780 else
8781   echo "$ac_t""no" 1>&6
8782 fi
8783
8784 fi
8785
8786 fi
8787
8788 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
8789 echo "configure:8790: checking for getmntent" >&5
8790 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
8791   echo $ac_n "(cached) $ac_c" 1>&6
8792 else
8793   cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 /* System header to define __stub macros and hopefully few prototypes,
8797     which can conflict with char getmntent(); below.  */
8798 #include <assert.h>
8799 /* Override any gcc2 internal prototype to avoid an error.  */
8800 /* We use char because int might match the return type of a gcc2
8801     builtin and then its argument prototype would still apply.  */
8802 char getmntent();
8803
8804 int main() {
8805
8806 /* The GNU C library defines this for functions which it implements
8807     to always fail with ENOSYS.  Some functions are actually named
8808     something starting with __ and the normal name is an alias.  */
8809 #if defined (__stub_getmntent) || defined (__stub___getmntent)
8810 choke me
8811 #else
8812 getmntent();
8813 #endif
8814
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   eval "ac_cv_func_getmntent=yes"
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   eval "ac_cv_func_getmntent=no"
8825 fi
8826 rm -f conftest*
8827 fi
8828
8829 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
8830   echo "$ac_t""yes" 1>&6
8831   cat >> confdefs.h <<\EOF
8832 #define HAVE_GETMNTENT 1
8833 EOF
8834
8835 else
8836   echo "$ac_t""no" 1>&6
8837 fi
8838
8839 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
8840 echo "configure:8841: checking whether closedir returns void" >&5
8841 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
8842   echo $ac_n "(cached) $ac_c" 1>&6
8843 else
8844   if test "$cross_compiling" = yes; then
8845   ac_cv_func_closedir_void=yes
8846 else
8847   cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 #include <sys/types.h>
8851 #include <$ac_header_dirent>
8852 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
8853 EOF
8854 if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8855 then
8856   ac_cv_func_closedir_void=no
8857 else
8858   echo "configure: failed program was:" >&5
8859   cat conftest.$ac_ext >&5
8860   rm -fr conftest*
8861   ac_cv_func_closedir_void=yes
8862 fi
8863 rm -fr conftest*
8864 fi
8865
8866 fi
8867
8868 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
8869 if test $ac_cv_func_closedir_void = yes; then
8870   cat >> confdefs.h <<\EOF
8871 #define CLOSEDIR_VOID 1
8872 EOF
8873
8874 fi
8875
8876 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
8877 echo "configure:8878: checking whether setpgrp takes no argument" >&5
8878 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   if test "$cross_compiling" = yes; then
8882   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
8883 else
8884   cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887
8888 #ifdef HAVE_UNISTD_H
8889 #include <unistd.h>
8890 #endif
8891
8892 /*
8893  * If this system has a BSD-style setpgrp, which takes arguments, exit
8894  * successfully.
8895  */
8896 main()
8897 {
8898     if (setpgrp(1,1) == -1)
8899         exit(0);
8900     else
8901         exit(1);
8902 }
8903
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8906 then
8907   ac_cv_func_setpgrp_void=no
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -fr conftest*
8912   ac_cv_func_setpgrp_void=yes
8913 fi
8914 rm -fr conftest*
8915 fi
8916
8917
8918 fi
8919
8920 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
8921 if test $ac_cv_func_setpgrp_void = yes; then
8922   cat >> confdefs.h <<\EOF
8923 #define SETPGRP_VOID 1
8924 EOF
8925
8926 fi
8927                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8928 echo "configure:8929: checking for working fnmatch" >&5
8929 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
8930   echo $ac_n "(cached) $ac_c" 1>&6
8931 else
8932   # Some versions of Solaris or SCO have a broken fnmatch function.
8933 # So we run a test program.  If we are cross-compiling, take no chance.
8934 # Thanks to John Oleynick and Franc,ois Pinard for this test.
8935 if test "$cross_compiling" = yes; then
8936   ac_cv_func_fnmatch_works=no
8937 else
8938   cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
8942 EOF
8943 if { (eval echo configure:8944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8944 then
8945   ac_cv_func_fnmatch_works=yes
8946 else
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -fr conftest*
8950   ac_cv_func_fnmatch_works=no
8951 fi
8952 rm -fr conftest*
8953 fi
8954
8955 fi
8956
8957 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
8958 if test $ac_cv_func_fnmatch_works = yes; then
8959   cat >> confdefs.h <<\EOF
8960 #define HAVE_FNMATCH 1
8961 EOF
8962
8963 fi
8964
8965
8966
8967 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
8968 echo "configure:8969: checking for setlocale in -lxpg4" >&5
8969 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
8970 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8971   echo $ac_n "(cached) $ac_c" 1>&6
8972 else
8973   ac_save_LIBS="$LIBS"
8974 LIBS="-lxpg4  $LIBS"
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 /* Override any gcc2 internal prototype to avoid an error.  */
8979 /* We use char because int might match the return type of a gcc2
8980     builtin and then its argument prototype would still apply.  */
8981 char setlocale();
8982
8983 int main() {
8984 setlocale()
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   eval "ac_cv_lib_$ac_lib_var=yes"
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   eval "ac_cv_lib_$ac_lib_var=no"
8995 fi
8996 rm -f conftest*
8997 LIBS="$ac_save_LIBS"
8998
8999 fi
9000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9001   echo "$ac_t""yes" 1>&6
9002   LIBS="$LIBS -lxpg4"
9003 else
9004   echo "$ac_t""no" 1>&6
9005 fi
9006
9007
9008
9009 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
9010 echo "configure:9011: checking for getpwnam in -lsun" >&5
9011 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
9012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9013   echo $ac_n "(cached) $ac_c" 1>&6
9014 else
9015   ac_save_LIBS="$LIBS"
9016 LIBS="-lsun  $LIBS"
9017 cat > conftest.$ac_ext <<EOF
9018 #line 9019 "configure"
9019 #include "confdefs.h"
9020 /* Override any gcc2 internal prototype to avoid an error.  */
9021 /* We use char because int might match the return type of a gcc2
9022     builtin and then its argument prototype would still apply.  */
9023 char getpwnam();
9024
9025 int main() {
9026 getpwnam()
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=yes"
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   eval "ac_cv_lib_$ac_lib_var=no"
9037 fi
9038 rm -f conftest*
9039 LIBS="$ac_save_LIBS"
9040
9041 fi
9042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9043   echo "$ac_t""yes" 1>&6
9044     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9046   cat >> confdefs.h <<EOF
9047 #define $ac_tr_lib 1
9048 EOF
9049
9050   LIBS="-lsun $LIBS"
9051
9052 else
9053   echo "$ac_t""no" 1>&6
9054 fi
9055
9056
9057 for ac_hdr in zlib.h
9058 do
9059 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9060 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9061 echo "configure:9062: checking for $ac_hdr" >&5
9062 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9063   echo $ac_n "(cached) $ac_c" 1>&6
9064 else
9065   cat > conftest.$ac_ext <<EOF
9066 #line 9067 "configure"
9067 #include "confdefs.h"
9068 #include <$ac_hdr>
9069 EOF
9070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9071 { (eval echo configure:9072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9073 if test -z "$ac_err"; then
9074   rm -rf conftest*
9075   eval "ac_cv_header_$ac_safe=yes"
9076 else
9077   echo "$ac_err" >&5
9078   echo "configure: failed program was:" >&5
9079   cat conftest.$ac_ext >&5
9080   rm -rf conftest*
9081   eval "ac_cv_header_$ac_safe=no"
9082 fi
9083 rm -f conftest*
9084 fi
9085 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9086   echo "$ac_t""yes" 1>&6
9087     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9088   cat >> confdefs.h <<EOF
9089 #define $ac_tr_hdr 1
9090 EOF
9091  
9092 else
9093   echo "$ac_t""no" 1>&6
9094 fi
9095 done
9096
9097 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
9098 echo "configure:9099: checking for deflate in -lz" >&5
9099 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
9100 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9101   echo $ac_n "(cached) $ac_c" 1>&6
9102 else
9103   ac_save_LIBS="$LIBS"
9104 LIBS="-lz  $LIBS"
9105 cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9108 /* Override any gcc2 internal prototype to avoid an error.  */
9109 /* We use char because int might match the return type of a gcc2
9110     builtin and then its argument prototype would still apply.  */
9111 char deflate();
9112
9113 int main() {
9114 deflate()
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9118   rm -rf conftest*
9119   eval "ac_cv_lib_$ac_lib_var=yes"
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_lib_$ac_lib_var=no"
9125 fi
9126 rm -f conftest*
9127 LIBS="$ac_save_LIBS"
9128
9129 fi
9130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9131   echo "$ac_t""yes" 1>&6
9132   FDLIBS="-lz"
9133 else
9134   echo "$ac_t""no" 1>&6
9135 fi
9136
9137 have_zlib=no
9138 if test x$FDLIBS = x-lz; then
9139   cat >> confdefs.h <<\EOF
9140 #define HAVE_LIBZ 1
9141 EOF
9142
9143   have_zlib=yes
9144 fi
9145
9146 PTHREAD_LIB=""
9147 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
9148 echo "configure:9149: checking for pthread_create in -lpthread" >&5
9149 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
9150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9151   echo $ac_n "(cached) $ac_c" 1>&6
9152 else
9153   ac_save_LIBS="$LIBS"
9154 LIBS="-lpthread  $LIBS"
9155 cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158 /* Override any gcc2 internal prototype to avoid an error.  */
9159 /* We use char because int might match the return type of a gcc2
9160     builtin and then its argument prototype would still apply.  */
9161 char pthread_create();
9162
9163 int main() {
9164 pthread_create()
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_lib_$ac_lib_var=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=no"
9175 fi
9176 rm -f conftest*
9177 LIBS="$ac_save_LIBS"
9178
9179 fi
9180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9181   echo "$ac_t""yes" 1>&6
9182   PTHREAD_LIB="-lpthread"
9183 else
9184   echo "$ac_t""no" 1>&6
9185 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
9186 echo "configure:9187: checking for pthread_create in -lpthreads" >&5
9187 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
9188 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   ac_save_LIBS="$LIBS"
9192 LIBS="-lpthreads  $LIBS"
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 /* Override any gcc2 internal prototype to avoid an error.  */
9197 /* We use char because int might match the return type of a gcc2
9198     builtin and then its argument prototype would still apply.  */
9199 char pthread_create();
9200
9201 int main() {
9202 pthread_create()
9203 ; return 0; }
9204 EOF
9205 if { (eval echo configure:9206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=yes"
9208 else
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   eval "ac_cv_lib_$ac_lib_var=no"
9213 fi
9214 rm -f conftest*
9215 LIBS="$ac_save_LIBS"
9216
9217 fi
9218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9219   echo "$ac_t""yes" 1>&6
9220   PTHREAD_LIB="-lpthreads"
9221 else
9222   echo "$ac_t""no" 1>&6
9223 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
9224 echo "configure:9225: checking for pthread_create in -lc_r" >&5
9225 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
9226 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9227   echo $ac_n "(cached) $ac_c" 1>&6
9228 else
9229   ac_save_LIBS="$LIBS"
9230 LIBS="-lc_r  $LIBS"
9231 cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 /* Override any gcc2 internal prototype to avoid an error.  */
9235 /* We use char because int might match the return type of a gcc2
9236     builtin and then its argument prototype would still apply.  */
9237 char pthread_create();
9238
9239 int main() {
9240 pthread_create()
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=yes"
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=no"
9251 fi
9252 rm -f conftest*
9253 LIBS="$ac_save_LIBS"
9254
9255 fi
9256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258   PTHREAD_LIB="-lc_r"
9259 else
9260   echo "$ac_t""no" 1>&6
9261 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
9262 echo "configure:9263: checking for pthread_create" >&5
9263 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
9264   echo $ac_n "(cached) $ac_c" 1>&6
9265 else
9266   cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 /* System header to define __stub macros and hopefully few prototypes,
9270     which can conflict with char pthread_create(); below.  */
9271 #include <assert.h>
9272 /* Override any gcc2 internal prototype to avoid an error.  */
9273 /* We use char because int might match the return type of a gcc2
9274     builtin and then its argument prototype would still apply.  */
9275 char pthread_create();
9276
9277 int main() {
9278
9279 /* The GNU C library defines this for functions which it implements
9280     to always fail with ENOSYS.  Some functions are actually named
9281     something starting with __ and the normal name is an alias.  */
9282 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
9283 choke me
9284 #else
9285 pthread_create();
9286 #endif
9287
9288 ; return 0; }
9289 EOF
9290 if { (eval echo configure:9291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9291   rm -rf conftest*
9292   eval "ac_cv_func_pthread_create=yes"
9293 else
9294   echo "configure: failed program was:" >&5
9295   cat conftest.$ac_ext >&5
9296   rm -rf conftest*
9297   eval "ac_cv_func_pthread_create=no"
9298 fi
9299 rm -f conftest*
9300 fi
9301
9302 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304   :
9305 else
9306   echo "$ac_t""no" 1>&6
9307 fi
9308
9309             
9310 fi
9311
9312         
9313 fi
9314
9315
9316 fi
9317
9318
9319
9320 cat >> confdefs.h <<\EOF
9321 #define FDLIBS 1
9322 EOF
9323
9324
9325
9326 CFLAGS=${CFLAGS--O}
9327 LDFLAGS=${LDFLAGS--O}
9328 DB_LIBS="${SQL_LFLAGS}"
9329
9330 CPPFLAGS="$CPPFLAGS"
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343 OBJLIST=
9344
9345
9346 lld="lld"
9347 llu="llu"
9348
9349 #
9350 # Finally we set appropriate distribution specific
9351 #  variables and defaults
9352 #
9353 # PFILES are platform specific files
9354 PFILES="platforms/Makefile"
9355 PSCMD="ps -e"
9356 WIN32=
9357 hostname=`uname -n`
9358 case "$DISTNAME" in
9359 aix)
9360         DISTVER=`uname -r`
9361         PSCMD="ps -e -o pid,comm"
9362         PFILES="${PFILES} \
9363            platforms/aix/Makefile"
9364   ;;      
9365 alpha)
9366         DISTVER=`uname -r`
9367         PTHREAD_LIB="-lpthread -lexc"
9368         if test "${CC}" = "gcc" ; then
9369            lld="lld"
9370            llu="llu"
9371         else
9372            lld="ld"
9373            llu="lu"
9374         fi
9375         TAPEDRIVE="/dev/nrmt0"
9376   ;;
9377 bsdi)
9378         DISTVER=`uname -a |awk '{print $3}'`
9379         TAPEDRIVE="/dev/nrst0"
9380   ;;
9381 caldera)
9382         DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
9383         TAPEDRIVE="/dev/nrst0"
9384         PSCMD="ps -e -o pid,command"
9385         hostname=`hostname -s`
9386   ;;
9387 cygwin)
9388         DISTVER=`uname -a |awk '{print $3}'`
9389         TAPEDRIVE="/dev/nrst0"
9390         WIN32=win32
9391         CFLAGS="${CFLAGS} -mwindows"
9392         LDFLAGS="${LDFLAGS} -mwindows"
9393   ;;
9394 darwin)
9395         DISTVER=`uname -r`
9396         TAPEDRIVE="/dev/nst0"
9397         PSCMD="ps -e -o pid,command"
9398         hostname=`hostname -s`
9399         PFILES="${PFILES} \
9400            platforms/darwin/Makefile"
9401   ;;
9402 debian)
9403         DISTVER=`cat /etc/debian_version`
9404         TAPEDRIVE="/dev/nrst0"
9405         PSCMD="ps -e -o pid,command"
9406         hostname=`hostname -s`
9407   ;;
9408 freebsd)
9409         DISTVER=`uname -a |awk '{print $3}'`
9410         PTHREAD_LIB="-pthread"
9411         CFLAGS="${CFLAGS} -pthread"
9412         lld="qd"
9413         llu="qu"
9414         TAPEDRIVE="/dev/nrst0"
9415         PSCMD="ps -x -o pid,command"
9416         PFILES="${PFILES} \
9417             platforms/freebsd/Makefile \
9418             platforms/freebsd/bacula-fd \
9419             platforms/freebsd/bacula-sd \
9420             platforms/freebsd/bacula-dir"
9421         hostname=`hostname -s`
9422         largefile_support="yes"
9423   ;;
9424 hpux)
9425         DISTVER=`uname -r`
9426         TAPEDRIVE="/dev/rmt/0hnb"
9427   ;;
9428 irix)
9429         DISTVER=`uname -r`
9430         TAPEDRIVE="/dev/rmt/0cbn"
9431         PSCMD="ps -e -o pid,comm"
9432         PFILES="${PFILES} \
9433             platforms/irix/Makefile \
9434             platforms/irix/bacula-fd \
9435             platforms/irix/bacula-sd \
9436             platforms/irix/bacula-dir"
9437   ;;
9438 netbsd)
9439         DISTVER=`uname -a |awk '{print $3}'`
9440         lld="qd"
9441         llu="qu"
9442         TAPEDRIVE="/dev/nrst0"
9443         PSCMD="ps -a -o pid,command"
9444         PTHREAD_LIB="-pthread"
9445         CFLAGS="${CFLAGS} -pthread"
9446   ;;
9447 openbsd)
9448         DISTVER=`uname -a |awk '{print $3}'`
9449         lld="qd"
9450         llu="qu"
9451         TAPEDRIVE="/dev/nrst0"
9452         PSCMD="ps -a -o pid,command"
9453         PTHREAD_LIB="-pthread"
9454         CFLAGS="${CFLAGS} -pthread"
9455         PFILES="${PFILES} \
9456             platforms/openbsd/Makefile \
9457             platforms/openbsd/bacula-fd \
9458             platforms/openbsd/bacula-sd \
9459             platforms/openbsd/bacula-dir"
9460   ;;
9461 redhat)
9462         DISTVER=`cat /etc/redhat-release | grep release |\
9463                                 cut -f 5 -d ' '`
9464         TAPEDRIVE="/dev/nst0"
9465         PSCMD="ps -e -o pid,command"
9466         PFILES="${PFILES} \
9467             platforms/redhat/Makefile \
9468             platforms/redhat/bacula-fd \
9469             platforms/redhat/bacula-sd \
9470             platforms/redhat/bacula-dir \
9471             platforms/redhat/bacula.mysql.rh8.spec \
9472             platforms/redhat/bacula.sqlite.rh8.spec"
9473         hostname=`hostname -s`
9474   ;;
9475 gentoo)
9476         DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
9477         TAPEDRIVE="/dev/nst0"
9478         PSCMD="ps -e -o pid,command"
9479         PFILES="${PFILES} \
9480             platforms/gentoo/Makefile \
9481             platforms/gentoo/bacula-fd \
9482             platforms/gentoo/bacula-sd \
9483             platforms/gentoo/bacula-dir"
9484         hostname=`hostname -s`
9485   ;;
9486
9487 slackware)
9488         DISTVER=`cat /etc/slackware-version`
9489         TAPEDRIVE="/dev/nst0"
9490         PSCMD="ps -e -o pid,command"
9491         hostname=`hostname -s`
9492   ;;
9493 solaris)
9494         DISTVER=`uname -r`
9495         TAPEDRIVE="/dev/rmt/0cbn"
9496         PSCMD="ps -e -o pid,comm"
9497         PFILES="${PFILES} \
9498             platforms/solaris/Makefile \
9499             platforms/solaris/bacula-fd \
9500             platforms/solaris/bacula-sd \
9501             platforms/solaris/bacula-dir"
9502         if test x$DISTVER = x5.6 ; then
9503             cat >> confdefs.h <<\EOF
9504 #define HAVE_OLD_SOCKOPT 1
9505 EOF
9506
9507         fi
9508   ;;
9509 suse)
9510         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
9511                                 cut -f 3 -d ' '`
9512         TAPEDRIVE="/dev/nst0"
9513         PSCMD="ps -e -o pid,command"
9514         hostname=`hostname -s`
9515   ;;
9516 suse5)
9517         DISTNAME=suse
9518         DISTVER=5.x
9519         TAPEDRIVE="/dev/nst0"
9520         PSCMD="ps -e -o pid,command"
9521         hostname=`hostname -s`
9522   ;;
9523 unknown)
9524         DISTVER=unknown
9525         TAPEDRIVE="/dev/nst0"
9526   ;;
9527 *)
9528   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
9529   ;;
9530 esac  
9531
9532
9533
9534
9535 LIBS="$PTHREAD_LIB $LIBS"
9536
9537 cat >> confdefs.h <<EOF
9538 #define lld "$lld"
9539 EOF
9540
9541 cat >> confdefs.h <<EOF
9542 #define llu "$llu"
9543 EOF
9544
9545
9546
9547
9548
9549
9550
9551 MCOMMON=./autoconf/Make.common
9552
9553
9554 trap '' 1 2 15
9555 cat > confcache <<\EOF
9556 # This file is a shell script that caches the results of configure
9557 # tests run on this system so they can be shared between configure
9558 # scripts and configure runs.  It is not useful on other systems.
9559 # If it contains results you don't want to keep, you may remove or edit it.
9560 #
9561 # By default, configure uses ./config.cache as the cache file,
9562 # creating it if it does not exist already.  You can give configure
9563 # the --cache-file=FILE option to use a different cache file; that is
9564 # what configure does when it calls configure scripts in
9565 # subdirectories, so they share the cache.
9566 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9567 # config.status only pays attention to the cache file if you give it the
9568 # --recheck option to rerun configure.
9569 #
9570 EOF
9571 # The following way of writing the cache mishandles newlines in values,
9572 # but we know of no workaround that is simple, portable, and efficient.
9573 # So, don't put newlines in cache variables' values.
9574 # Ultrix sh set writes to stderr and can't be redirected directly,
9575 # and sets the high bit in the cache file unless we assign to the vars.
9576 (set) 2>&1 |
9577   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9578   *ac_space=\ *)
9579     # `set' does not quote correctly, so add quotes (double-quote substitution
9580     # turns \\\\ into \\, and sed turns \\ into \).
9581     sed -n \
9582       -e "s/'/'\\\\''/g" \
9583       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9584     ;;
9585   *)
9586     # `set' quotes correctly as required by POSIX, so do not add quotes.
9587     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9588     ;;
9589   esac >> confcache
9590 if cmp -s $cache_file confcache; then
9591   :
9592 else
9593   if test -w $cache_file; then
9594     echo "updating cache $cache_file"
9595     cat confcache > $cache_file
9596   else
9597     echo "not updating unwritable cache $cache_file"
9598   fi
9599 fi
9600 rm -f confcache
9601
9602 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9603
9604 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9605 # Let make expand exec_prefix.
9606 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9607
9608 # Any assignment to VPATH causes Sun make to only execute
9609 # the first set of double-colon rules, so remove it if not needed.
9610 # If there is a colon in the path, we need to keep it.
9611 if test "x$srcdir" = x.; then
9612   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9613 fi
9614
9615 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9616
9617 DEFS=-DHAVE_CONFIG_H
9618
9619 # Without the "./", some shells look in PATH for config.status.
9620 : ${CONFIG_STATUS=./config.status}
9621
9622 echo creating $CONFIG_STATUS
9623 rm -f $CONFIG_STATUS
9624 cat > $CONFIG_STATUS <<EOF
9625 #! /bin/sh
9626 # Generated automatically by configure.
9627 # Run this file to recreate the current configuration.
9628 # This directory was configured as follows,
9629 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9630 #
9631 # $0 $ac_configure_args
9632 #
9633 # Compiler output produced by configure, useful for debugging
9634 # configure, is in ./config.log if it exists.
9635
9636 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9637 for ac_option
9638 do
9639   case "\$ac_option" in
9640   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9641     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9642     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9643   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9644     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9645     exit 0 ;;
9646   -help | --help | --hel | --he | --h)
9647     echo "\$ac_cs_usage"; exit 0 ;;
9648   *) echo "\$ac_cs_usage"; exit 1 ;;
9649   esac
9650 done
9651
9652 ac_given_srcdir=$srcdir
9653 ac_given_INSTALL="$INSTALL"
9654
9655 trap 'rm -fr `echo "autoconf/Make.common \
9656            Makefile \
9657            rescue/Makefile \
9658            rescue/linux/Makefile \
9659            rescue/freebsd/Makefile \
9660            rescue/solaris/Makefile \
9661            scripts/startmysql \
9662            scripts/stopmysql \
9663            scripts/btraceback \
9664            scripts/startit \
9665            scripts/stopit \
9666            scripts/console \
9667            scripts/gconsole \
9668            scripts/bacula \
9669            scripts/fd \
9670            scripts/Makefile \
9671            scripts/logrotate \
9672            scripts/bacula.desktop \
9673            doc/Makefile \
9674            src/Makefile \
9675            src/console/Makefile \
9676            src/console/console.conf \
9677            src/gnome-console/Makefile \
9678            src/gnome-console/gnome-console.conf \
9679            src/tconsole/Makefile \
9680            src/dird/Makefile \
9681            src/dird/bacula-dir.conf \
9682            src/lib/Makefile \
9683            src/stored/Makefile \
9684            src/stored/bacula-sd.conf \
9685            src/filed/Makefile \
9686            src/filed/host.h \
9687            src/filed/bacula-fd.conf \
9688            src/filed/win32/Makefile \
9689            src/cats/Makefile \
9690            src/cats/make_catalog_backup \
9691            src/cats/delete_catalog_backup \
9692            src/cats/alter_mysql_tables \
9693            src/cats/make_mysql_tables \
9694            src/cats/drop_mysql_tables \
9695            src/cats/create_mysql_database \
9696            src/cats/grant_mysql_privileges \
9697            src/cats/alter_sqlite_tables \
9698            src/cats/make_sqlite_tables \
9699            src/cats/drop_sqlite_tables \
9700            src/cats/create_sqlite_database \
9701            src/cats/sqlite \
9702            src/cats/mysql \
9703            src/cats/create_bdb_database \
9704            src/cats/make_bdb_tables \
9705            src/cats/drop_bdb_tables \
9706            src/cats/make_bacula_tables \
9707            src/cats/drop_bacula_tables \
9708            src/findlib/Makefile \
9709            src/tools/Makefile \
9710            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9711 EOF
9712 cat >> $CONFIG_STATUS <<EOF
9713
9714 # Protect against being on the right side of a sed subst in config.status.
9715 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9716  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9717 $ac_vpsub
9718 $extrasub
9719 s%@SHELL@%$SHELL%g
9720 s%@CFLAGS@%$CFLAGS%g
9721 s%@CPPFLAGS@%$CPPFLAGS%g
9722 s%@CXXFLAGS@%$CXXFLAGS%g
9723 s%@FFLAGS@%$FFLAGS%g
9724 s%@DEFS@%$DEFS%g
9725 s%@LDFLAGS@%$LDFLAGS%g
9726 s%@LIBS@%$LIBS%g
9727 s%@exec_prefix@%$exec_prefix%g
9728 s%@prefix@%$prefix%g
9729 s%@program_transform_name@%$program_transform_name%g
9730 s%@bindir@%$bindir%g
9731 s%@sbindir@%$sbindir%g
9732 s%@libexecdir@%$libexecdir%g
9733 s%@datadir@%$datadir%g
9734 s%@sysconfdir@%$sysconfdir%g
9735 s%@sharedstatedir@%$sharedstatedir%g
9736 s%@localstatedir@%$localstatedir%g
9737 s%@libdir@%$libdir%g
9738 s%@includedir@%$includedir%g
9739 s%@oldincludedir@%$oldincludedir%g
9740 s%@infodir@%$infodir%g
9741 s%@mandir@%$mandir%g
9742 s%@BUILD_DIR@%$BUILD_DIR%g
9743 s%@TRUEPRG@%$TRUEPRG%g
9744 s%@FALSEPRG@%$FALSEPRG%g
9745 s%@host@%$host%g
9746 s%@host_alias@%$host_alias%g
9747 s%@host_cpu@%$host_cpu%g
9748 s%@host_vendor@%$host_vendor%g
9749 s%@host_os@%$host_os%g
9750 s%@VERSION@%$VERSION%g
9751 s%@DATE@%$DATE%g
9752 s%@LSMDATE@%$LSMDATE%g
9753 s%@CC@%$CC%g
9754 s%@CXX@%$CXX%g
9755 s%@CPP@%$CPP%g
9756 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9757 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9758 s%@INSTALL_DATA@%$INSTALL_DATA%g
9759 s%@RANLIB@%$RANLIB%g
9760 s%@MV@%$MV%g
9761 s%@RM@%$RM%g
9762 s%@CP@%$CP%g
9763 s%@SED@%$SED%g
9764 s%@AWK@%$AWK%g
9765 s%@ECHO@%$ECHO%g
9766 s%@CMP@%$CMP%g
9767 s%@TBL@%$TBL%g
9768 s%@AR@%$AR%g
9769 s%@OPENSSL@%$OPENSSL%g
9770 s%@ARFLAGS@%$ARFLAGS%g
9771 s%@MAKE_SHELL@%$MAKE_SHELL%g
9772 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
9773 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
9774 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
9775 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
9776 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
9777 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
9778 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
9779 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
9780 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
9781 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
9782 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
9783 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
9784 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
9785 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
9786 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
9787 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
9788 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
9789 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
9790 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
9791 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
9792 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
9793 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
9794 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
9795 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
9796 s%@HAVE_IRIX_OS_TRUE@%$HAVE_IRIX_OS_TRUE%g
9797 s%@HAVE_IRIX_OS_FALSE@%$HAVE_IRIX_OS_FALSE%g
9798 s%@HAVE_DARWIN_OS_TRUE@%$HAVE_DARWIN_OS_TRUE%g
9799 s%@HAVE_DARWIN_OS_FALSE@%$HAVE_DARWIN_OS_FALSE%g
9800 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
9801 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
9802 s%@MSGFMT@%$MSGFMT%g
9803 s%@GNOME_LIBS@%$GNOME_LIBS%g
9804 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
9805 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
9806 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
9807 s%@ZVT_LIBS@%$ZVT_LIBS%g
9808 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9809 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9810 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9811 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
9812 s%@ORBIT_IDL@%$ORBIT_IDL%g
9813 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
9814 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
9815 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
9816 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
9817 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
9818 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
9819 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
9820 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
9821 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
9822 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
9823 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
9824 s%@GNOME_DIR@%$GNOME_DIR%g
9825 s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
9826 s%@STATIC_FD@%$STATIC_FD%g
9827 s%@STATIC_SD@%$STATIC_SD%g
9828 s%@STATIC_DIR@%$STATIC_DIR%g
9829 s%@STATIC_CONS@%$STATIC_CONS%g
9830 s%@ALL_DIRS@%$ALL_DIRS%g
9831 s%@CONS_INC@%$CONS_INC%g
9832 s%@CONS_LIBS@%$CONS_LIBS%g
9833 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
9834 s%@READLINE_SRC@%$READLINE_SRC%g
9835 s%@working_dir@%$working_dir%g
9836 s%@scriptdir@%$scriptdir%g
9837 s%@dump_email@%$dump_email%g
9838 s%@job_email@%$job_email%g
9839 s%@smtp_host@%$smtp_host%g
9840 s%@piddir@%$piddir%g
9841 s%@subsysdir@%$subsysdir%g
9842 s%@baseport@%$baseport%g
9843 s%@dir_port@%$dir_port%g
9844 s%@fd_port@%$fd_port%g
9845 s%@sd_port@%$sd_port%g
9846 s%@dir_password@%$dir_password%g
9847 s%@fd_password@%$fd_password%g
9848 s%@sd_password@%$sd_password%g
9849 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
9850 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
9851 s%@SQL_BINDIR@%$SQL_BINDIR%g
9852 s%@cats@%$cats%g
9853 s%@DB_NAME@%$DB_NAME%g
9854 s%@EXEEXT@%$EXEEXT%g
9855 s%@build@%$build%g
9856 s%@build_alias@%$build_alias%g
9857 s%@build_cpu@%$build_cpu%g
9858 s%@build_vendor@%$build_vendor%g
9859 s%@build_os@%$build_os%g
9860 s%@GETCONF@%$GETCONF%g
9861 s%@X_CFLAGS@%$X_CFLAGS%g
9862 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9863 s%@X_LIBS@%$X_LIBS%g
9864 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9865 s%@LIBOBJS@%$LIBOBJS%g
9866 s%@ALLOCA@%$ALLOCA%g
9867 s%@FDLIBS@%$FDLIBS%g
9868 s%@DEBUG@%$DEBUG%g
9869 s%@DINCLUDE@%$DINCLUDE%g
9870 s%@DLIB@%$DLIB%g
9871 s%@DB_LIBS@%$DB_LIBS%g
9872 s%@OBJLIST@%$OBJLIST%g
9873 s%@hostname@%$hostname%g
9874 s%@TAPEDRIVE@%$TAPEDRIVE%g
9875 s%@PSCMD@%$PSCMD%g
9876 s%@WIN32@%$WIN32%g
9877 s%@DISTNAME@%$DISTNAME%g
9878 s%@DISTVER@%$DISTVER%g
9879 /@MCOMMON@/r $MCOMMON
9880 s%@MCOMMON@%%g
9881
9882 CEOF
9883 EOF
9884
9885 cat >> $CONFIG_STATUS <<\EOF
9886
9887 # Split the substitutions into bite-sized pieces for seds with
9888 # small command number limits, like on Digital OSF/1 and HP-UX.
9889 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9890 ac_file=1 # Number of current file.
9891 ac_beg=1 # First line for current file.
9892 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9893 ac_more_lines=:
9894 ac_sed_cmds=""
9895 while $ac_more_lines; do
9896   if test $ac_beg -gt 1; then
9897     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9898   else
9899     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9900   fi
9901   if test ! -s conftest.s$ac_file; then
9902     ac_more_lines=false
9903     rm -f conftest.s$ac_file
9904   else
9905     if test -z "$ac_sed_cmds"; then
9906       ac_sed_cmds="sed -f conftest.s$ac_file"
9907     else
9908       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9909     fi
9910     ac_file=`expr $ac_file + 1`
9911     ac_beg=$ac_end
9912     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9913   fi
9914 done
9915 if test -z "$ac_sed_cmds"; then
9916   ac_sed_cmds=cat
9917 fi
9918 EOF
9919
9920 cat >> $CONFIG_STATUS <<EOF
9921
9922 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
9923            Makefile \
9924            rescue/Makefile \
9925            rescue/linux/Makefile \
9926            rescue/freebsd/Makefile \
9927            rescue/solaris/Makefile \
9928            scripts/startmysql \
9929            scripts/stopmysql \
9930            scripts/btraceback \
9931            scripts/startit \
9932            scripts/stopit \
9933            scripts/console \
9934            scripts/gconsole \
9935            scripts/bacula \
9936            scripts/fd \
9937            scripts/Makefile \
9938            scripts/logrotate \
9939            scripts/bacula.desktop \
9940            doc/Makefile \
9941            src/Makefile \
9942            src/console/Makefile \
9943            src/console/console.conf \
9944            src/gnome-console/Makefile \
9945            src/gnome-console/gnome-console.conf \
9946            src/tconsole/Makefile \
9947            src/dird/Makefile \
9948            src/dird/bacula-dir.conf \
9949            src/lib/Makefile \
9950            src/stored/Makefile \
9951            src/stored/bacula-sd.conf \
9952            src/filed/Makefile \
9953            src/filed/host.h \
9954            src/filed/bacula-fd.conf \
9955            src/filed/win32/Makefile \
9956            src/cats/Makefile \
9957            src/cats/make_catalog_backup \
9958            src/cats/delete_catalog_backup \
9959            src/cats/alter_mysql_tables \
9960            src/cats/make_mysql_tables \
9961            src/cats/drop_mysql_tables \
9962            src/cats/create_mysql_database \
9963            src/cats/grant_mysql_privileges \
9964            src/cats/alter_sqlite_tables \
9965            src/cats/make_sqlite_tables \
9966            src/cats/drop_sqlite_tables \
9967            src/cats/create_sqlite_database \
9968            src/cats/sqlite \
9969            src/cats/mysql \
9970            src/cats/create_bdb_database \
9971            src/cats/make_bdb_tables \
9972            src/cats/drop_bdb_tables \
9973            src/cats/make_bacula_tables \
9974            src/cats/drop_bacula_tables \
9975            src/findlib/Makefile \
9976            src/tools/Makefile \
9977            $PFILES "}
9978 EOF
9979 cat >> $CONFIG_STATUS <<\EOF
9980 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9981   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9982   case "$ac_file" in
9983   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9984        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9985   *) ac_file_in="${ac_file}.in" ;;
9986   esac
9987
9988   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9989
9990   # Remove last slash and all that follows it.  Not all systems have dirname.
9991   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9992   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9993     # The file is in a subdirectory.
9994     test ! -d "$ac_dir" && mkdir "$ac_dir"
9995     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9996     # A "../" for each directory in $ac_dir_suffix.
9997     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9998   else
9999     ac_dir_suffix= ac_dots=
10000   fi
10001
10002   case "$ac_given_srcdir" in
10003   .)  srcdir=.
10004       if test -z "$ac_dots"; then top_srcdir=.
10005       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10006   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10007   *) # Relative path.
10008     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10009     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10010   esac
10011
10012   case "$ac_given_INSTALL" in
10013   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10014   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10015   esac
10016
10017   echo creating "$ac_file"
10018   rm -f "$ac_file"
10019   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10020   case "$ac_file" in
10021   *Makefile*) ac_comsub="1i\\
10022 # $configure_input" ;;
10023   *) ac_comsub= ;;
10024   esac
10025
10026   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10027   sed -e "$ac_comsub
10028 s%@configure_input@%$configure_input%g
10029 s%@srcdir@%$srcdir%g
10030 s%@top_srcdir@%$top_srcdir%g
10031 s%@INSTALL@%$INSTALL%g
10032 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10033 fi; done
10034 rm -f conftest.s*
10035
10036 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10037 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10038 #
10039 # ac_d sets the value in "#define NAME VALUE" lines.
10040 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10041 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10042 ac_dC='\3'
10043 ac_dD='%g'
10044 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10045 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10046 ac_uB='\([      ]\)%\1#\2define\3'
10047 ac_uC=' '
10048 ac_uD='\4%g'
10049 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10050 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10051 ac_eB='$%\1#\2define\3'
10052 ac_eC=' '
10053 ac_eD='%g'
10054
10055 if test "${CONFIG_HEADERS+set}" != set; then
10056 EOF
10057 cat >> $CONFIG_STATUS <<EOF
10058   CONFIG_HEADERS="src/config.h:autoconf/config.h.in"
10059 EOF
10060 cat >> $CONFIG_STATUS <<\EOF
10061 fi
10062 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10063   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10064   case "$ac_file" in
10065   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10066        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10067   *) ac_file_in="${ac_file}.in" ;;
10068   esac
10069
10070   echo creating $ac_file
10071
10072   rm -f conftest.frag conftest.in conftest.out
10073   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10074   cat $ac_file_inputs > conftest.in
10075
10076 EOF
10077
10078 # Transform confdefs.h into a sed script conftest.vals that substitutes
10079 # the proper values into config.h.in to produce config.h.  And first:
10080 # Protect against being on the right side of a sed subst in config.status.
10081 # Protect against being in an unquoted here document in config.status.
10082 rm -f conftest.vals
10083 cat > conftest.hdr <<\EOF
10084 s/[\\&%]/\\&/g
10085 s%[\\$`]%\\&%g
10086 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10087 s%ac_d%ac_u%gp
10088 s%ac_u%ac_e%gp
10089 EOF
10090 sed -n -f conftest.hdr confdefs.h > conftest.vals
10091 rm -f conftest.hdr
10092
10093 # This sed command replaces #undef with comments.  This is necessary, for
10094 # example, in the case of _POSIX_SOURCE, which is predefined and required
10095 # on some systems where configure will not decide to define it.
10096 cat >> conftest.vals <<\EOF
10097 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10098 EOF
10099
10100 # Break up conftest.vals because some shells have a limit on
10101 # the size of here documents, and old seds have small limits too.
10102
10103 rm -f conftest.tail
10104 while :
10105 do
10106   ac_lines=`grep -c . conftest.vals`
10107   # grep -c gives empty output for an empty file on some AIX systems.
10108   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10109   # Write a limited-size here document to conftest.frag.
10110   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10111   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10112   echo 'CEOF
10113   sed -f conftest.frag conftest.in > conftest.out
10114   rm -f conftest.in
10115   mv conftest.out conftest.in
10116 ' >> $CONFIG_STATUS
10117   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10118   rm -f conftest.vals
10119   mv conftest.tail conftest.vals
10120 done
10121 rm -f conftest.vals
10122
10123 cat >> $CONFIG_STATUS <<\EOF
10124   rm -f conftest.frag conftest.h
10125   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10126   cat conftest.in >> conftest.h
10127   rm -f conftest.in
10128   if cmp -s $ac_file conftest.h 2>/dev/null; then
10129     echo "$ac_file is unchanged"
10130     rm -f conftest.h
10131   else
10132     # Remove last slash and all that follows it.  Not all systems have dirname.
10133       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10134       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10135       # The file is in a subdirectory.
10136       test ! -d "$ac_dir" && mkdir "$ac_dir"
10137     fi
10138     rm -f $ac_file
10139     mv conftest.h $ac_file
10140   fi
10141 fi; done
10142
10143 EOF
10144 cat >> $CONFIG_STATUS <<EOF
10145
10146 EOF
10147 cat >> $CONFIG_STATUS <<\EOF
10148 (echo "Doing make of dependencies"; make depend;) 
10149
10150 exit 0
10151 EOF
10152 chmod +x $CONFIG_STATUS
10153 rm -fr confdefs* $ac_clean_files
10154 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10155
10156
10157 cd scripts
10158 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
10159 chmod 755 console gconsole
10160 cd ..
10161 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
10162 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
10163 chmod 755 src/cats/create_mysql_database 
10164 chmod 755 src/cats/make_catalog_backup src/cats/delete_catalog_backup
10165 chmod 755 src/cats/alter_mysql_tables
10166 chmod 755 src/cats/grant_mysql_privileges
10167 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables 
10168 chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables 
10169 chmod 755 src/cats/create_sqlite_database
10170 chmod 755 src/cats/alter_sqlite_tables
10171 chmod 755 src/cats/sqlite
10172 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables 
10173 chmod 755 src/cats/create_bdb_database
10174
10175 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
10176    largefile_support="yes"
10177 fi
10178
10179 CCVERSION=`${CC} --version`
10180 CXXVERSION=`${CXX} --version`
10181
10182 echo "
10183 Configuration on `date`:
10184
10185   Host:                       $host -- ${DISTNAME} ${DISTVER}
10186   Bacula version:             ${VERSION} (${DATE})
10187   Source code location:       ${srcdir}
10188   Install binaries:           ${sbindir}
10189   Install config files:       ${sysconfdir}
10190   Scripts directory           ${scriptdir}
10191   Working directory           ${working_dir}
10192   C Compiler:                 ${CC} ${CCVERSION}
10193   C++ Compiler:               ${CXX} ${CXXVERSION}
10194   Compiler flags:             ${CFLAGS} 
10195   Linker flags:               ${LDFLAGS}
10196   Libraries:                  ${LIBS}
10197   Statically Linked Tools:    ${support_static_tools}
10198   Statically Linked FD:       ${support_static_fd}
10199   Statically Linked SD:       ${support_static_sd}
10200   Statically Linked DIR:      ${support_static_dir}
10201   Statically Linked CONS:     ${support_static_cons}
10202   Database type:              ${db_name}
10203   Database lib:               ${DB_LIBS}
10204
10205   Job Output Email:           ${job_email}
10206   Traceback Email:            ${dump_email}
10207   SMTP Host Address:          ${smtp_host}
10208   Director Port               ${dir_port}
10209   File daemon Port            ${fd_port}
10210   Storage daemon Port         ${sd_port}
10211   SQL binaries Directory      ${SQL_BINDIR}
10212
10213   Large file support:         $largefile_support
10214   readline support:           ${got_readline} ${PRTREADLINE_SRC}
10215   TCP Wrappers support:       ${TCPW_MSG}
10216   ZLIB support:               ${have_zlib}
10217   enable-smartalloc:          ${support_smartalloc} 
10218   enable-gnome:               ${support_gnome}
10219   client-only:                ${build_client_only}
10220
10221   " > config.out
10222
10223 cat config.out
10224
10225 # old stuff
10226 # cweb support:               ${got_cweb} ${CWEB_SRC}
10227 # gmp support:                ${got_gmp} ${GMP_SRC}