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