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