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