]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
Last major change for 1.27 code -- see kes13Nov02
[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         string.h \
5074         termios.h \
5075         unistd.h \
5076         sys/byteorder.h \
5077         sys/ioctl.h \
5078         sys/select.h \
5079         sys/sockio.h \
5080         sys/time.h \
5081
5082 do
5083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5085 echo "configure:5086: checking for $ac_hdr" >&5
5086 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5087   echo $ac_n "(cached) $ac_c" 1>&6
5088 else
5089   cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 #include <$ac_hdr>
5093 EOF
5094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5095 { (eval echo configure:5096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5097 if test -z "$ac_err"; then
5098   rm -rf conftest*
5099   eval "ac_cv_header_$ac_safe=yes"
5100 else
5101   echo "$ac_err" >&5
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105   eval "ac_cv_header_$ac_safe=no"
5106 fi
5107 rm -f conftest*
5108 fi
5109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5110   echo "$ac_t""yes" 1>&6
5111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5112   cat >> confdefs.h <<EOF
5113 #define $ac_tr_hdr 1
5114 EOF
5115  
5116 else
5117   echo "$ac_t""no" 1>&6
5118 fi
5119 done
5120
5121 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5122 echo "configure:5123: checking for ANSI C header files" >&5
5123 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5124   echo $ac_n "(cached) $ac_c" 1>&6
5125 else
5126   cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 #include <stdlib.h>
5130 #include <stdarg.h>
5131 #include <string.h>
5132 #include <float.h>
5133 EOF
5134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5135 { (eval echo configure:5136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5137 if test -z "$ac_err"; then
5138   rm -rf conftest*
5139   ac_cv_header_stdc=yes
5140 else
5141   echo "$ac_err" >&5
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   ac_cv_header_stdc=no
5146 fi
5147 rm -f conftest*
5148
5149 if test $ac_cv_header_stdc = yes; then
5150   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 #include <string.h>
5155 EOF
5156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5157   egrep "memchr" >/dev/null 2>&1; then
5158   :
5159 else
5160   rm -rf conftest*
5161   ac_cv_header_stdc=no
5162 fi
5163 rm -f conftest*
5164
5165 fi
5166
5167 if test $ac_cv_header_stdc = yes; then
5168   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5169 cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 #include <stdlib.h>
5173 EOF
5174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5175   egrep "free" >/dev/null 2>&1; then
5176   :
5177 else
5178   rm -rf conftest*
5179   ac_cv_header_stdc=no
5180 fi
5181 rm -f conftest*
5182
5183 fi
5184
5185 if test $ac_cv_header_stdc = yes; then
5186   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5187 if test "$cross_compiling" = yes; then
5188   :
5189 else
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 #include <ctype.h>
5194 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5195 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5196 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5197 int main () { int i; for (i = 0; i < 256; i++)
5198 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5199 exit (0); }
5200
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5203 then
5204   :
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -fr conftest*
5209   ac_cv_header_stdc=no
5210 fi
5211 rm -fr conftest*
5212 fi
5213
5214 fi
5215 fi
5216
5217 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5218 if test $ac_cv_header_stdc = yes; then
5219   cat >> confdefs.h <<\EOF
5220 #define STDC_HEADERS 1
5221 EOF
5222
5223 fi
5224
5225 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
5226 echo "configure:5227: checking whether sys/types.h defines makedev" >&5
5227 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230   cat > conftest.$ac_ext <<EOF
5231 #line 5232 "configure"
5232 #include "confdefs.h"
5233 #include <sys/types.h>
5234 int main() {
5235 return makedev(0, 0);
5236 ; return 0; }
5237 EOF
5238 if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5239   rm -rf conftest*
5240   ac_cv_header_sys_types_h_makedev=yes
5241 else
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   ac_cv_header_sys_types_h_makedev=no
5246 fi
5247 rm -f conftest*
5248
5249 fi
5250
5251 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
5252
5253 if test $ac_cv_header_sys_types_h_makedev = no; then
5254 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
5255 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
5256 echo "configure:5257: checking for sys/mkdev.h" >&5
5257 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5258   echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260   cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263 #include <sys/mkdev.h>
5264 EOF
5265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5266 { (eval echo configure:5267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5268 if test -z "$ac_err"; then
5269   rm -rf conftest*
5270   eval "ac_cv_header_$ac_safe=yes"
5271 else
5272   echo "$ac_err" >&5
5273   echo "configure: failed program was:" >&5
5274   cat conftest.$ac_ext >&5
5275   rm -rf conftest*
5276   eval "ac_cv_header_$ac_safe=no"
5277 fi
5278 rm -f conftest*
5279 fi
5280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5281   echo "$ac_t""yes" 1>&6
5282   cat >> confdefs.h <<\EOF
5283 #define MAJOR_IN_MKDEV 1
5284 EOF
5285
5286 else
5287   echo "$ac_t""no" 1>&6
5288 fi
5289
5290
5291   if test $ac_cv_header_sys_mkdev_h = no; then
5292 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
5293 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
5294 echo "configure:5295: checking for sys/sysmacros.h" >&5
5295 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5296   echo $ac_n "(cached) $ac_c" 1>&6
5297 else
5298   cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 #include <sys/sysmacros.h>
5302 EOF
5303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5304 { (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5306 if test -z "$ac_err"; then
5307   rm -rf conftest*
5308   eval "ac_cv_header_$ac_safe=yes"
5309 else
5310   echo "$ac_err" >&5
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_header_$ac_safe=no"
5315 fi
5316 rm -f conftest*
5317 fi
5318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5319   echo "$ac_t""yes" 1>&6
5320   cat >> confdefs.h <<\EOF
5321 #define MAJOR_IN_SYSMACROS 1
5322 EOF
5323
5324 else
5325   echo "$ac_t""no" 1>&6
5326 fi
5327
5328   fi
5329 fi
5330
5331 ac_header_dirent=no
5332 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5333 do
5334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5335 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5336 echo "configure:5337: checking for $ac_hdr that defines DIR" >&5
5337 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 #include <sys/types.h>
5344 #include <$ac_hdr>
5345 int main() {
5346 DIR *dirp = 0;
5347 ; return 0; }
5348 EOF
5349 if { (eval echo configure:5350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5350   rm -rf conftest*
5351   eval "ac_cv_header_dirent_$ac_safe=yes"
5352 else
5353   echo "configure: failed program was:" >&5
5354   cat conftest.$ac_ext >&5
5355   rm -rf conftest*
5356   eval "ac_cv_header_dirent_$ac_safe=no"
5357 fi
5358 rm -f conftest*
5359 fi
5360 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5361   echo "$ac_t""yes" 1>&6
5362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5363   cat >> confdefs.h <<EOF
5364 #define $ac_tr_hdr 1
5365 EOF
5366  ac_header_dirent=$ac_hdr; break
5367 else
5368   echo "$ac_t""no" 1>&6
5369 fi
5370 done
5371 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5372 if test $ac_header_dirent = dirent.h; then
5373 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5374 echo "configure:5375: checking for opendir in -ldir" >&5
5375 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5377   echo $ac_n "(cached) $ac_c" 1>&6
5378 else
5379   ac_save_LIBS="$LIBS"
5380 LIBS="-ldir  $LIBS"
5381 cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char opendir();
5388
5389 int main() {
5390 opendir()
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_lib_$ac_lib_var=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=no"
5401 fi
5402 rm -f conftest*
5403 LIBS="$ac_save_LIBS"
5404
5405 fi
5406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5407   echo "$ac_t""yes" 1>&6
5408   LIBS="$LIBS -ldir"
5409 else
5410   echo "$ac_t""no" 1>&6
5411 fi
5412
5413 else
5414 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5415 echo "configure:5416: checking for opendir in -lx" >&5
5416 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5418   echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5420   ac_save_LIBS="$LIBS"
5421 LIBS="-lx  $LIBS"
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425 /* Override any gcc2 internal prototype to avoid an error.  */
5426 /* We use char because int might match the return type of a gcc2
5427     builtin and then its argument prototype would still apply.  */
5428 char opendir();
5429
5430 int main() {
5431 opendir()
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=yes"
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=no"
5442 fi
5443 rm -f conftest*
5444 LIBS="$ac_save_LIBS"
5445
5446 fi
5447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5448   echo "$ac_t""yes" 1>&6
5449   LIBS="$LIBS -lx"
5450 else
5451   echo "$ac_t""no" 1>&6
5452 fi
5453
5454 fi
5455
5456 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5457 echo "configure:5458: checking whether stat file-mode macros are broken" >&5
5458 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5459   echo $ac_n "(cached) $ac_c" 1>&6
5460 else
5461   cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 #include <sys/types.h>
5465 #include <sys/stat.h>
5466
5467 #if defined(S_ISBLK) && defined(S_IFDIR)
5468 # if S_ISBLK (S_IFDIR)
5469 You lose.
5470 # endif
5471 #endif
5472
5473 #if defined(S_ISBLK) && defined(S_IFCHR)
5474 # if S_ISBLK (S_IFCHR)
5475 You lose.
5476 # endif
5477 #endif
5478
5479 #if defined(S_ISLNK) && defined(S_IFREG)
5480 # if S_ISLNK (S_IFREG)
5481 You lose.
5482 # endif
5483 #endif
5484
5485 #if defined(S_ISSOCK) && defined(S_IFREG)
5486 # if S_ISSOCK (S_IFREG)
5487 You lose.
5488 # endif
5489 #endif
5490
5491 EOF
5492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5493   egrep "You lose" >/dev/null 2>&1; then
5494   rm -rf conftest*
5495   ac_cv_header_stat_broken=yes
5496 else
5497   rm -rf conftest*
5498   ac_cv_header_stat_broken=no
5499 fi
5500 rm -f conftest*
5501
5502 fi
5503
5504 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5505 if test $ac_cv_header_stat_broken = yes; then
5506   cat >> confdefs.h <<\EOF
5507 #define STAT_MACROS_BROKEN 1
5508 EOF
5509
5510 fi
5511
5512 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5513 echo "configure:5514: checking for sys/wait.h that is POSIX.1 compatible" >&5
5514 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5515   echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517   cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 #include <sys/types.h>
5521 #include <sys/wait.h>
5522 #ifndef WEXITSTATUS
5523 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5524 #endif
5525 #ifndef WIFEXITED
5526 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5527 #endif
5528 int main() {
5529 int s;
5530 wait (&s);
5531 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5535   rm -rf conftest*
5536   ac_cv_header_sys_wait_h=yes
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   ac_cv_header_sys_wait_h=no
5542 fi
5543 rm -f conftest*
5544 fi
5545
5546 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5547 if test $ac_cv_header_sys_wait_h = yes; then
5548   cat >> confdefs.h <<\EOF
5549 #define HAVE_SYS_WAIT_H 1
5550 EOF
5551
5552 fi
5553
5554 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5555 echo "configure:5556: checking whether time.h and sys/time.h may both be included" >&5
5556 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559   cat > conftest.$ac_ext <<EOF
5560 #line 5561 "configure"
5561 #include "confdefs.h"
5562 #include <sys/types.h>
5563 #include <sys/time.h>
5564 #include <time.h>
5565 int main() {
5566 struct tm *tp;
5567 ; return 0; }
5568 EOF
5569 if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5570   rm -rf conftest*
5571   ac_cv_header_time=yes
5572 else
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   ac_cv_header_time=no
5577 fi
5578 rm -f conftest*
5579 fi
5580
5581 echo "$ac_t""$ac_cv_header_time" 1>&6
5582 if test $ac_cv_header_time = yes; then
5583   cat >> confdefs.h <<\EOF
5584 #define TIME_WITH_SYS_TIME 1
5585 EOF
5586
5587 fi
5588
5589 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5590 echo "configure:5591: checking for st_blksize in struct stat" >&5
5591 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 #include <sys/types.h>
5598 #include <sys/stat.h>
5599 int main() {
5600 struct stat s; s.st_blksize;
5601 ; return 0; }
5602 EOF
5603 if { (eval echo configure:5604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5604   rm -rf conftest*
5605   ac_cv_struct_st_blksize=yes
5606 else
5607   echo "configure: failed program was:" >&5
5608   cat conftest.$ac_ext >&5
5609   rm -rf conftest*
5610   ac_cv_struct_st_blksize=no
5611 fi
5612 rm -f conftest*
5613 fi
5614
5615 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5616 if test $ac_cv_struct_st_blksize = yes; then
5617   cat >> confdefs.h <<\EOF
5618 #define HAVE_ST_BLKSIZE 1
5619 EOF
5620
5621 fi
5622
5623 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
5624 echo "configure:5625: checking for st_blocks in struct stat" >&5
5625 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5626   echo $ac_n "(cached) $ac_c" 1>&6
5627 else
5628   cat > conftest.$ac_ext <<EOF
5629 #line 5630 "configure"
5630 #include "confdefs.h"
5631 #include <sys/types.h>
5632 #include <sys/stat.h>
5633 int main() {
5634 struct stat s; s.st_blocks;
5635 ; return 0; }
5636 EOF
5637 if { (eval echo configure:5638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5638   rm -rf conftest*
5639   ac_cv_struct_st_blocks=yes
5640 else
5641   echo "configure: failed program was:" >&5
5642   cat conftest.$ac_ext >&5
5643   rm -rf conftest*
5644   ac_cv_struct_st_blocks=no
5645 fi
5646 rm -f conftest*
5647 fi
5648
5649 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5650 if test $ac_cv_struct_st_blocks = yes; then
5651   cat >> confdefs.h <<\EOF
5652 #define HAVE_ST_BLOCKS 1
5653 EOF
5654
5655 else
5656   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5657 fi
5658
5659 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5660 echo "configure:5661: checking whether struct tm is in sys/time.h or time.h" >&5
5661 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667 #include <sys/types.h>
5668 #include <time.h>
5669 int main() {
5670 struct tm *tp; tp->tm_sec;
5671 ; return 0; }
5672 EOF
5673 if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5674   rm -rf conftest*
5675   ac_cv_struct_tm=time.h
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   ac_cv_struct_tm=sys/time.h
5681 fi
5682 rm -f conftest*
5683 fi
5684
5685 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5686 if test $ac_cv_struct_tm = sys/time.h; then
5687   cat >> confdefs.h <<\EOF
5688 #define TM_IN_SYS_TIME 1
5689 EOF
5690
5691 fi
5692
5693 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5694 echo "configure:5695: checking for tm_zone in struct tm" >&5
5695 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 #include <sys/types.h>
5702 #include <$ac_cv_struct_tm>
5703 int main() {
5704 struct tm tm; tm.tm_zone;
5705 ; return 0; }
5706 EOF
5707 if { (eval echo configure:5708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5708   rm -rf conftest*
5709   ac_cv_struct_tm_zone=yes
5710 else
5711   echo "configure: failed program was:" >&5
5712   cat conftest.$ac_ext >&5
5713   rm -rf conftest*
5714   ac_cv_struct_tm_zone=no
5715 fi
5716 rm -f conftest*
5717 fi
5718
5719 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5720 if test "$ac_cv_struct_tm_zone" = yes; then
5721   cat >> confdefs.h <<\EOF
5722 #define HAVE_TM_ZONE 1
5723 EOF
5724
5725 else
5726   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5727 echo "configure:5728: checking for tzname" >&5
5728 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734 #include <time.h>
5735 #ifndef tzname /* For SGI.  */
5736 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5737 #endif
5738 int main() {
5739 atoi(*tzname);
5740 ; return 0; }
5741 EOF
5742 if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5743   rm -rf conftest*
5744   ac_cv_var_tzname=yes
5745 else
5746   echo "configure: failed program was:" >&5
5747   cat conftest.$ac_ext >&5
5748   rm -rf conftest*
5749   ac_cv_var_tzname=no
5750 fi
5751 rm -f conftest*
5752 fi
5753
5754 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5755   if test $ac_cv_var_tzname = yes; then
5756     cat >> confdefs.h <<\EOF
5757 #define HAVE_TZNAME 1
5758 EOF
5759
5760   fi
5761 fi
5762
5763
5764 # It seems that that many machines where <utime.h> seems to be
5765 # broken just require something like -D_XXX_SOURCE, where XXX might
5766 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
5767
5768 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
5769 echo "configure:5770: checking for utime.h" >&5
5770 if eval "test \"`echo '$''{'tar_cv_header_utime_h'+set}'`\" = set"; then
5771   echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773   cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776
5777 #include <sys/types.h>
5778 #include <utime.h>
5779 int main() {
5780 struct utimbuf foo
5781 ; return 0; }
5782 EOF
5783 if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5784   rm -rf conftest*
5785   tar_cv_header_utime_h=yes
5786 else
5787   echo "configure: failed program was:" >&5
5788   cat conftest.$ac_ext >&5
5789   rm -rf conftest*
5790   tar_cv_header_utime_h=no
5791 fi
5792 rm -f conftest*
5793 fi
5794
5795 echo "$ac_t""$tar_cv_header_utime_h" 1>&6
5796 test $tar_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
5797 #define HAVE_UTIME_H 1
5798 EOF
5799
5800
5801 echo $ac_n "checking for working const""... $ac_c" 1>&6
5802 echo "configure:5803: checking for working const" >&5
5803 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809
5810 int main() {
5811
5812 /* Ultrix mips cc rejects this.  */
5813 typedef int charset[2]; const charset x;
5814 /* SunOS 4.1.1 cc rejects this.  */
5815 char const *const *ccp;
5816 char **p;
5817 /* NEC SVR4.0.2 mips cc rejects this.  */
5818 struct point {int x, y;};
5819 static struct point const zero = {0,0};
5820 /* AIX XL C 1.02.0.0 rejects this.
5821    It does not let you subtract one const X* pointer from another in an arm
5822    of an if-expression whose if-part is not a constant expression */
5823 const char *g = "string";
5824 ccp = &g + (g ? g-g : 0);
5825 /* HPUX 7.0 cc rejects these. */
5826 ++ccp;
5827 p = (char**) ccp;
5828 ccp = (char const *const *) p;
5829 { /* SCO 3.2v4 cc rejects this.  */
5830   char *t;
5831   char const *s = 0 ? (char *) 0 : (char const *) 0;
5832
5833   *t++ = 0;
5834 }
5835 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5836   int x[] = {25, 17};
5837   const int *foo = &x[0];
5838   ++foo;
5839 }
5840 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5841   typedef const int *iptr;
5842   iptr p = 0;
5843   ++p;
5844 }
5845 { /* AIX XL C 1.02.0.0 rejects this saying
5846      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5847   struct s { int j; const int *ap[3]; };
5848   struct s *b; b->j = 5;
5849 }
5850 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5851   const int foo = 10;
5852 }
5853
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5857   rm -rf conftest*
5858   ac_cv_c_const=yes
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   ac_cv_c_const=no
5864 fi
5865 rm -f conftest*
5866 fi
5867
5868 echo "$ac_t""$ac_cv_c_const" 1>&6
5869 if test $ac_cv_c_const = no; then
5870   cat >> confdefs.h <<\EOF
5871 #define const 
5872 EOF
5873
5874 fi
5875
5876
5877
5878 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
5879 echo "configure:5880: checking how to get filesystem type" >&5
5880 fstype=no
5881 # The order of these tests is important.
5882 cat > conftest.$ac_ext <<EOF
5883 #line 5884 "configure"
5884 #include "confdefs.h"
5885 #include <sys/statvfs.h>
5886 #include <sys/fstyp.h>
5887 EOF
5888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5889 { (eval echo configure:5890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5891 if test -z "$ac_err"; then
5892   rm -rf conftest*
5893   cat >> confdefs.h <<\EOF
5894 #define FSTYPE_STATVFS 1
5895 EOF
5896  fstype=SVR4
5897 else
5898   echo "$ac_err" >&5
5899   echo "configure: failed program was:" >&5
5900   cat conftest.$ac_ext >&5
5901 fi
5902 rm -f conftest*
5903 if test $fstype = no; then
5904 cat > conftest.$ac_ext <<EOF
5905 #line 5906 "configure"
5906 #include "confdefs.h"
5907 #include <sys/statfs.h>
5908 #include <sys/fstyp.h>
5909 EOF
5910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5911 { (eval echo configure:5912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5913 if test -z "$ac_err"; then
5914   rm -rf conftest*
5915   cat >> confdefs.h <<\EOF
5916 #define FSTYPE_USG_STATFS 1
5917 EOF
5918  fstype=SVR3
5919 else
5920   echo "$ac_err" >&5
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923 fi
5924 rm -f conftest*
5925 fi
5926 if test $fstype = no; then
5927 cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930 #include <sys/statfs.h>
5931 #include <sys/vmount.h>
5932 EOF
5933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5934 { (eval echo configure:5935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5936 if test -z "$ac_err"; then
5937   rm -rf conftest*
5938   cat >> confdefs.h <<\EOF
5939 #define FSTYPE_AIX_STATFS 1
5940 EOF
5941  fstype=AIX
5942 else
5943   echo "$ac_err" >&5
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946 fi
5947 rm -f conftest*
5948 fi
5949 if test $fstype = no; then  
5950 cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 #include <mntent.h>
5954 EOF
5955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5956 { (eval echo configure:5957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5958 if test -z "$ac_err"; then
5959   rm -rf conftest*
5960   cat >> confdefs.h <<\EOF
5961 #define FSTYPE_MNTENT 1
5962 EOF
5963  fstype=4.3BSD
5964 else
5965   echo "$ac_err" >&5
5966   echo "configure: failed program was:" >&5
5967   cat conftest.$ac_ext >&5
5968 fi
5969 rm -f conftest*
5970 fi
5971 if test $fstype = no; then  
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 #include <sys/mount.h>
5976 EOF
5977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5978   egrep "f_type;" >/dev/null 2>&1; then
5979   rm -rf conftest*
5980   cat >> confdefs.h <<\EOF
5981 #define FSTYPE_STATFS 1
5982 EOF
5983  fstype=4.4BSD/OSF1
5984 fi
5985 rm -f conftest*
5986
5987 fi
5988 if test $fstype = no; then  
5989 cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992 #include <sys/mount.h>
5993 #include <sys/fs_types.h>
5994 EOF
5995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5996 { (eval echo configure:5997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5998 if test -z "$ac_err"; then
5999   rm -rf conftest*
6000   cat >> confdefs.h <<\EOF
6001 #define FSTYPE_GETMNT 1
6002 EOF
6003  fstype=Ultrix
6004 else
6005   echo "$ac_err" >&5
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008 fi
6009 rm -f conftest*
6010 fi
6011 echo "$ac_t""$fstype" 1>&6
6012
6013 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6014 echo "configure:6015: checking return type of signal handlers" >&5
6015 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6016   echo $ac_n "(cached) $ac_c" 1>&6
6017 else
6018   cat > conftest.$ac_ext <<EOF
6019 #line 6020 "configure"
6020 #include "confdefs.h"
6021 #include <sys/types.h>
6022 #include <signal.h>
6023 #ifdef signal
6024 #undef signal
6025 #endif
6026 #ifdef __cplusplus
6027 extern "C" void (*signal (int, void (*)(int)))(int);
6028 #else
6029 void (*signal ()) ();
6030 #endif
6031
6032 int main() {
6033 int i;
6034 ; return 0; }
6035 EOF
6036 if { (eval echo configure:6037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6037   rm -rf conftest*
6038   ac_cv_type_signal=void
6039 else
6040   echo "configure: failed program was:" >&5
6041   cat conftest.$ac_ext >&5
6042   rm -rf conftest*
6043   ac_cv_type_signal=int
6044 fi
6045 rm -f conftest*
6046 fi
6047
6048 echo "$ac_t""$ac_cv_type_signal" 1>&6
6049 cat >> confdefs.h <<EOF
6050 #define RETSIGTYPE $ac_cv_type_signal
6051 EOF
6052
6053
6054
6055 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
6056 echo "configure:6057: checking for type of signal functions" >&5
6057 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
6058   echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060   
6061   cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064 #include <signal.h>
6065 int main() {
6066
6067     sigset_t ss;
6068     struct sigaction sa;
6069     sigemptyset(&ss); sigsuspend(&ss);
6070     sigaction(SIGINT, &sa, (struct sigaction *) 0);
6071     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
6072   
6073 ; return 0; }
6074 EOF
6075 if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6076   rm -rf conftest*
6077   bash_cv_signal_vintage=posix
6078 else
6079   echo "configure: failed program was:" >&5
6080   cat conftest.$ac_ext >&5
6081   rm -rf conftest*
6082   
6083     cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 #include <signal.h>
6087 int main() {
6088
6089         int mask = sigmask(SIGINT);
6090         sigsetmask(mask); sigblock(mask); sigpause(mask);
6091     
6092 ; return 0; }
6093 EOF
6094 if { (eval echo configure:6095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6095   rm -rf conftest*
6096   bash_cv_signal_vintage=4.2bsd
6097 else
6098   echo "configure: failed program was:" >&5
6099   cat conftest.$ac_ext >&5
6100   rm -rf conftest*
6101   
6102       cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105
6106         #include <signal.h>
6107         RETSIGTYPE foo() { }
6108 int main() {
6109
6110                 int mask = sigmask(SIGINT);
6111                 sigset(SIGINT, foo); sigrelse(SIGINT);
6112                 sighold(SIGINT); sigpause(SIGINT);
6113         
6114 ; return 0; }
6115 EOF
6116 if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6117   rm -rf conftest*
6118   bash_cv_signal_vintage=svr3
6119 else
6120   echo "configure: failed program was:" >&5
6121   cat conftest.$ac_ext >&5
6122   rm -rf conftest*
6123   bash_cv_signal_vintage=v7
6124     
6125 fi
6126 rm -f conftest*
6127   
6128 fi
6129 rm -f conftest*
6130
6131 fi
6132 rm -f conftest*
6133
6134 fi
6135
6136 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
6137 if test "$bash_cv_signal_vintage" = posix; then
6138 cat >> confdefs.h <<\EOF
6139 #define HAVE_POSIX_SIGNALS 1
6140 EOF
6141
6142 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
6143 cat >> confdefs.h <<\EOF
6144 #define HAVE_BSD_SIGNALS 1
6145 EOF
6146
6147 elif test "$bash_cv_signal_vintage" = svr3; then
6148 cat >> confdefs.h <<\EOF
6149 #define HAVE_USG_SIGHOLD 1
6150 EOF
6151
6152 fi
6153
6154 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6155 echo "configure:6156: checking for mode_t" >&5
6156 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 #include <sys/types.h>
6163 #if STDC_HEADERS
6164 #include <stdlib.h>
6165 #include <stddef.h>
6166 #endif
6167 EOF
6168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6169   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6170   rm -rf conftest*
6171   ac_cv_type_mode_t=yes
6172 else
6173   rm -rf conftest*
6174   ac_cv_type_mode_t=no
6175 fi
6176 rm -f conftest*
6177
6178 fi
6179 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6180 if test $ac_cv_type_mode_t = no; then
6181   cat >> confdefs.h <<\EOF
6182 #define mode_t int
6183 EOF
6184
6185 fi
6186
6187 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6188 echo "configure:6189: checking for uid_t in sys/types.h" >&5
6189 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6190   echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192   cat > conftest.$ac_ext <<EOF
6193 #line 6194 "configure"
6194 #include "confdefs.h"
6195 #include <sys/types.h>
6196 EOF
6197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6198   egrep "uid_t" >/dev/null 2>&1; then
6199   rm -rf conftest*
6200   ac_cv_type_uid_t=yes
6201 else
6202   rm -rf conftest*
6203   ac_cv_type_uid_t=no
6204 fi
6205 rm -f conftest*
6206
6207 fi
6208
6209 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6210 if test $ac_cv_type_uid_t = no; then
6211   cat >> confdefs.h <<\EOF
6212 #define uid_t int
6213 EOF
6214
6215   cat >> confdefs.h <<\EOF
6216 #define gid_t int
6217 EOF
6218
6219 fi
6220
6221 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6222 echo "configure:6223: checking for size_t" >&5
6223 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6224   echo $ac_n "(cached) $ac_c" 1>&6
6225 else
6226   cat > conftest.$ac_ext <<EOF
6227 #line 6228 "configure"
6228 #include "confdefs.h"
6229 #include <sys/types.h>
6230 #if STDC_HEADERS
6231 #include <stdlib.h>
6232 #include <stddef.h>
6233 #endif
6234 EOF
6235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6236   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6237   rm -rf conftest*
6238   ac_cv_type_size_t=yes
6239 else
6240   rm -rf conftest*
6241   ac_cv_type_size_t=no
6242 fi
6243 rm -f conftest*
6244
6245 fi
6246 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6247 if test $ac_cv_type_size_t = no; then
6248   cat >> confdefs.h <<\EOF
6249 #define size_t unsigned
6250 EOF
6251
6252 fi
6253
6254 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6255 echo "configure:6256: checking for pid_t" >&5
6256 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6257   echo $ac_n "(cached) $ac_c" 1>&6
6258 else
6259   cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262 #include <sys/types.h>
6263 #if STDC_HEADERS
6264 #include <stdlib.h>
6265 #include <stddef.h>
6266 #endif
6267 EOF
6268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6269   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6270   rm -rf conftest*
6271   ac_cv_type_pid_t=yes
6272 else
6273   rm -rf conftest*
6274   ac_cv_type_pid_t=no
6275 fi
6276 rm -f conftest*
6277
6278 fi
6279 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6280 if test $ac_cv_type_pid_t = no; then
6281   cat >> confdefs.h <<\EOF
6282 #define pid_t int
6283 EOF
6284
6285 fi
6286
6287 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6288 echo "configure:6289: checking for off_t" >&5
6289 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6290   echo $ac_n "(cached) $ac_c" 1>&6
6291 else
6292   cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295 #include <sys/types.h>
6296 #if STDC_HEADERS
6297 #include <stdlib.h>
6298 #include <stddef.h>
6299 #endif
6300 EOF
6301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6302   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6303   rm -rf conftest*
6304   ac_cv_type_off_t=yes
6305 else
6306   rm -rf conftest*
6307   ac_cv_type_off_t=no
6308 fi
6309 rm -f conftest*
6310
6311 fi
6312 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6313 if test $ac_cv_type_off_t = no; then
6314   cat >> confdefs.h <<\EOF
6315 #define off_t long
6316 EOF
6317
6318 fi
6319
6320 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
6321 echo "configure:6322: checking for ino_t" >&5
6322 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 #include <sys/types.h>
6329 #if STDC_HEADERS
6330 #include <stdlib.h>
6331 #include <stddef.h>
6332 #endif
6333 EOF
6334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6335   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6336   rm -rf conftest*
6337   ac_cv_type_ino_t=yes
6338 else
6339   rm -rf conftest*
6340   ac_cv_type_ino_t=no
6341 fi
6342 rm -f conftest*
6343
6344 fi
6345 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6346 if test $ac_cv_type_ino_t = no; then
6347   cat >> confdefs.h <<\EOF
6348 #define ino_t unsigned long
6349 EOF
6350
6351 fi
6352
6353 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
6354 echo "configure:6355: checking for dev_t" >&5
6355 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6356   echo $ac_n "(cached) $ac_c" 1>&6
6357 else
6358   cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361 #include <sys/types.h>
6362 #if STDC_HEADERS
6363 #include <stdlib.h>
6364 #include <stddef.h>
6365 #endif
6366 EOF
6367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6368   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6369   rm -rf conftest*
6370   ac_cv_type_dev_t=yes
6371 else
6372   rm -rf conftest*
6373   ac_cv_type_dev_t=no
6374 fi
6375 rm -f conftest*
6376
6377 fi
6378 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6379 if test $ac_cv_type_dev_t = no; then
6380   cat >> confdefs.h <<\EOF
6381 #define dev_t unsigned long
6382 EOF
6383
6384 fi
6385
6386 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
6387 echo "configure:6388: checking for daddr_t" >&5
6388 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   cat > conftest.$ac_ext <<EOF
6392 #line 6393 "configure"
6393 #include "confdefs.h"
6394 #include <sys/types.h>
6395 #if STDC_HEADERS
6396 #include <stdlib.h>
6397 #include <stddef.h>
6398 #endif
6399 EOF
6400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6401   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6402   rm -rf conftest*
6403   ac_cv_type_daddr_t=yes
6404 else
6405   rm -rf conftest*
6406   ac_cv_type_daddr_t=no
6407 fi
6408 rm -f conftest*
6409
6410 fi
6411 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
6412 if test $ac_cv_type_daddr_t = no; then
6413   cat >> confdefs.h <<\EOF
6414 #define daddr_t long
6415 EOF
6416
6417 fi
6418
6419 echo $ac_n "checking for major_t""... $ac_c" 1>&6
6420 echo "configure:6421: checking for major_t" >&5
6421 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
6422   echo $ac_n "(cached) $ac_c" 1>&6
6423 else
6424   cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6427 #include <sys/types.h>
6428 #if STDC_HEADERS
6429 #include <stdlib.h>
6430 #include <stddef.h>
6431 #endif
6432 EOF
6433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6434   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6435   rm -rf conftest*
6436   ac_cv_type_major_t=yes
6437 else
6438   rm -rf conftest*
6439   ac_cv_type_major_t=no
6440 fi
6441 rm -f conftest*
6442
6443 fi
6444 echo "$ac_t""$ac_cv_type_major_t" 1>&6
6445 if test $ac_cv_type_major_t = no; then
6446   cat >> confdefs.h <<\EOF
6447 #define major_t int
6448 EOF
6449
6450 fi
6451
6452 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
6453 echo "configure:6454: checking for minor_t" >&5
6454 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
6455   echo $ac_n "(cached) $ac_c" 1>&6
6456 else
6457   cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 #include <sys/types.h>
6461 #if STDC_HEADERS
6462 #include <stdlib.h>
6463 #include <stddef.h>
6464 #endif
6465 EOF
6466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6467   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6468   rm -rf conftest*
6469   ac_cv_type_minor_t=yes
6470 else
6471   rm -rf conftest*
6472   ac_cv_type_minor_t=no
6473 fi
6474 rm -f conftest*
6475
6476 fi
6477 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
6478 if test $ac_cv_type_minor_t = no; then
6479   cat >> confdefs.h <<\EOF
6480 #define minor_t int
6481 EOF
6482
6483 fi
6484
6485 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
6486 echo "configure:6487: checking for ssize_t" >&5
6487 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   cat > conftest.$ac_ext <<EOF
6491 #line 6492 "configure"
6492 #include "confdefs.h"
6493 #include <sys/types.h>
6494 #if STDC_HEADERS
6495 #include <stdlib.h>
6496 #include <stddef.h>
6497 #endif
6498 EOF
6499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6500   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6501   rm -rf conftest*
6502   ac_cv_type_ssize_t=yes
6503 else
6504   rm -rf conftest*
6505   ac_cv_type_ssize_t=no
6506 fi
6507 rm -f conftest*
6508
6509 fi
6510 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
6511 if test $ac_cv_type_ssize_t = no; then
6512   cat >> confdefs.h <<\EOF
6513 #define ssize_t int
6514 EOF
6515
6516 fi
6517
6518 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6519 echo "configure:6520: checking for st_blocks in struct stat" >&5
6520 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6521   echo $ac_n "(cached) $ac_c" 1>&6
6522 else
6523   cat > conftest.$ac_ext <<EOF
6524 #line 6525 "configure"
6525 #include "confdefs.h"
6526 #include <sys/types.h>
6527 #include <sys/stat.h>
6528 int main() {
6529 struct stat s; s.st_blocks;
6530 ; return 0; }
6531 EOF
6532 if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6533   rm -rf conftest*
6534   ac_cv_struct_st_blocks=yes
6535 else
6536   echo "configure: failed program was:" >&5
6537   cat conftest.$ac_ext >&5
6538   rm -rf conftest*
6539   ac_cv_struct_st_blocks=no
6540 fi
6541 rm -f conftest*
6542 fi
6543
6544 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6545 if test $ac_cv_struct_st_blocks = yes; then
6546   cat >> confdefs.h <<\EOF
6547 #define HAVE_ST_BLOCKS 1
6548 EOF
6549
6550 else
6551   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6552 fi
6553
6554 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
6555 echo "configure:6556: checking for st_rdev in struct stat" >&5
6556 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
6557   echo $ac_n "(cached) $ac_c" 1>&6
6558 else
6559   cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 #include <sys/types.h>
6563 #include <sys/stat.h>
6564 int main() {
6565 struct stat s; s.st_rdev;
6566 ; return 0; }
6567 EOF
6568 if { (eval echo configure:6569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6569   rm -rf conftest*
6570   ac_cv_struct_st_rdev=yes
6571 else
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   ac_cv_struct_st_rdev=no
6576 fi
6577 rm -f conftest*
6578 fi
6579
6580 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
6581 if test $ac_cv_struct_st_rdev = yes; then
6582   cat >> confdefs.h <<\EOF
6583 #define HAVE_ST_RDEV 1
6584 EOF
6585
6586 fi
6587
6588 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6589 echo "configure:6590: checking whether struct tm is in sys/time.h or time.h" >&5
6590 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6591   echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593   cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596 #include <sys/types.h>
6597 #include <time.h>
6598 int main() {
6599 struct tm *tp; tp->tm_sec;
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6603   rm -rf conftest*
6604   ac_cv_struct_tm=time.h
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   ac_cv_struct_tm=sys/time.h
6610 fi
6611 rm -f conftest*
6612 fi
6613
6614 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6615 if test $ac_cv_struct_tm = sys/time.h; then
6616   cat >> confdefs.h <<\EOF
6617 #define TM_IN_SYS_TIME 1
6618 EOF
6619
6620 fi
6621
6622 echo $ac_n "checking for working const""... $ac_c" 1>&6
6623 echo "configure:6624: checking for working const" >&5
6624 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6625   echo $ac_n "(cached) $ac_c" 1>&6
6626 else
6627   cat > conftest.$ac_ext <<EOF
6628 #line 6629 "configure"
6629 #include "confdefs.h"
6630
6631 int main() {
6632
6633 /* Ultrix mips cc rejects this.  */
6634 typedef int charset[2]; const charset x;
6635 /* SunOS 4.1.1 cc rejects this.  */
6636 char const *const *ccp;
6637 char **p;
6638 /* NEC SVR4.0.2 mips cc rejects this.  */
6639 struct point {int x, y;};
6640 static struct point const zero = {0,0};
6641 /* AIX XL C 1.02.0.0 rejects this.
6642    It does not let you subtract one const X* pointer from another in an arm
6643    of an if-expression whose if-part is not a constant expression */
6644 const char *g = "string";
6645 ccp = &g + (g ? g-g : 0);
6646 /* HPUX 7.0 cc rejects these. */
6647 ++ccp;
6648 p = (char**) ccp;
6649 ccp = (char const *const *) p;
6650 { /* SCO 3.2v4 cc rejects this.  */
6651   char *t;
6652   char const *s = 0 ? (char *) 0 : (char const *) 0;
6653
6654   *t++ = 0;
6655 }
6656 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6657   int x[] = {25, 17};
6658   const int *foo = &x[0];
6659   ++foo;
6660 }
6661 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6662   typedef const int *iptr;
6663   iptr p = 0;
6664   ++p;
6665 }
6666 { /* AIX XL C 1.02.0.0 rejects this saying
6667      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6668   struct s { int j; const int *ap[3]; };
6669   struct s *b; b->j = 5;
6670 }
6671 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6672   const int foo = 10;
6673 }
6674
6675 ; return 0; }
6676 EOF
6677 if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6678   rm -rf conftest*
6679   ac_cv_c_const=yes
6680 else
6681   echo "configure: failed program was:" >&5
6682   cat conftest.$ac_ext >&5
6683   rm -rf conftest*
6684   ac_cv_c_const=no
6685 fi
6686 rm -f conftest*
6687 fi
6688
6689 echo "$ac_t""$ac_cv_c_const" 1>&6
6690 if test $ac_cv_c_const = no; then
6691   cat >> confdefs.h <<\EOF
6692 #define const 
6693 EOF
6694
6695 fi
6696
6697
6698
6699 echo $ac_n "checking size of char""... $ac_c" 1>&6
6700 echo "configure:6701: checking size of char" >&5
6701 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   if test "$cross_compiling" = yes; then
6705   ac_cv_sizeof_char=1
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 #include <stdio.h>
6711 int main()
6712 {
6713   FILE *f=fopen("conftestval", "w");
6714   if (!f) return(1);
6715   fprintf(f, "%d\n", sizeof(char));
6716   return(0);
6717 }
6718 EOF
6719 if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6720 then
6721   ac_cv_sizeof_char=`cat conftestval`
6722 else
6723   echo "configure: failed program was:" >&5
6724   cat conftest.$ac_ext >&5
6725   rm -fr conftest*
6726   ac_cv_sizeof_char=0
6727 fi
6728 rm -fr conftest*
6729 fi
6730
6731 fi
6732 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
6733 cat >> confdefs.h <<EOF
6734 #define SIZEOF_CHAR $ac_cv_sizeof_char
6735 EOF
6736
6737
6738 echo $ac_n "checking size of short int""... $ac_c" 1>&6
6739 echo "configure:6740: checking size of short int" >&5
6740 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   if test "$cross_compiling" = yes; then
6744   ac_cv_sizeof_short_int=2
6745 else
6746   cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 #include <stdio.h>
6750 int main()
6751 {
6752   FILE *f=fopen("conftestval", "w");
6753   if (!f) return(1);
6754   fprintf(f, "%d\n", sizeof(short int));
6755   return(0);
6756 }
6757 EOF
6758 if { (eval echo configure:6759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6759 then
6760   ac_cv_sizeof_short_int=`cat conftestval`
6761 else
6762   echo "configure: failed program was:" >&5
6763   cat conftest.$ac_ext >&5
6764   rm -fr conftest*
6765   ac_cv_sizeof_short_int=0
6766 fi
6767 rm -fr conftest*
6768 fi
6769
6770 fi
6771 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
6772 cat >> confdefs.h <<EOF
6773 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
6774 EOF
6775
6776
6777 echo $ac_n "checking size of int""... $ac_c" 1>&6
6778 echo "configure:6779: checking size of int" >&5
6779 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
6780   echo $ac_n "(cached) $ac_c" 1>&6
6781 else
6782   if test "$cross_compiling" = yes; then
6783   ac_cv_sizeof_int=4
6784 else
6785   cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 #include <stdio.h>
6789 int main()
6790 {
6791   FILE *f=fopen("conftestval", "w");
6792   if (!f) return(1);
6793   fprintf(f, "%d\n", sizeof(int));
6794   return(0);
6795 }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6798 then
6799   ac_cv_sizeof_int=`cat conftestval`
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -fr conftest*
6804   ac_cv_sizeof_int=0
6805 fi
6806 rm -fr conftest*
6807 fi
6808
6809 fi
6810 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
6811 cat >> confdefs.h <<EOF
6812 #define SIZEOF_INT $ac_cv_sizeof_int
6813 EOF
6814
6815
6816 echo $ac_n "checking size of long int""... $ac_c" 1>&6
6817 echo "configure:6818: checking size of long int" >&5
6818 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
6819   echo $ac_n "(cached) $ac_c" 1>&6
6820 else
6821   if test "$cross_compiling" = yes; then
6822   ac_cv_sizeof_long_int=4
6823 else
6824   cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 #include <stdio.h>
6828 int main()
6829 {
6830   FILE *f=fopen("conftestval", "w");
6831   if (!f) return(1);
6832   fprintf(f, "%d\n", sizeof(long int));
6833   return(0);
6834 }
6835 EOF
6836 if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6837 then
6838   ac_cv_sizeof_long_int=`cat conftestval`
6839 else
6840   echo "configure: failed program was:" >&5
6841   cat conftest.$ac_ext >&5
6842   rm -fr conftest*
6843   ac_cv_sizeof_long_int=0
6844 fi
6845 rm -fr conftest*
6846 fi
6847
6848 fi
6849 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
6850 cat >> confdefs.h <<EOF
6851 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
6852 EOF
6853
6854
6855 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
6856 echo "configure:6857: checking size of long long int" >&5
6857 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
6858   echo $ac_n "(cached) $ac_c" 1>&6
6859 else
6860   if test "$cross_compiling" = yes; then
6861   ac_cv_sizeof_long_long_int=8
6862 else
6863   cat > conftest.$ac_ext <<EOF
6864 #line 6865 "configure"
6865 #include "confdefs.h"
6866 #include <stdio.h>
6867 int main()
6868 {
6869   FILE *f=fopen("conftestval", "w");
6870   if (!f) return(1);
6871   fprintf(f, "%d\n", sizeof(long long int));
6872   return(0);
6873 }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6876 then
6877   ac_cv_sizeof_long_long_int=`cat conftestval`
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -fr conftest*
6882   ac_cv_sizeof_long_long_int=0
6883 fi
6884 rm -fr conftest*
6885 fi
6886
6887 fi
6888 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
6889 cat >> confdefs.h <<EOF
6890 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
6891 EOF
6892
6893
6894 echo $ac_n "checking size of int *""... $ac_c" 1>&6
6895 echo "configure:6896: checking size of int *" >&5
6896 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
6897   echo $ac_n "(cached) $ac_c" 1>&6
6898 else
6899   if test "$cross_compiling" = yes; then
6900   ac_cv_sizeof_int_p=4
6901 else
6902   cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 #include <stdio.h>
6906 int main()
6907 {
6908   FILE *f=fopen("conftestval", "w");
6909   if (!f) return(1);
6910   fprintf(f, "%d\n", sizeof(int *));
6911   return(0);
6912 }
6913 EOF
6914 if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6915 then
6916   ac_cv_sizeof_int_p=`cat conftestval`
6917 else
6918   echo "configure: failed program was:" >&5
6919   cat conftest.$ac_ext >&5
6920   rm -fr conftest*
6921   ac_cv_sizeof_int_p=0
6922 fi
6923 rm -fr conftest*
6924 fi
6925
6926 fi
6927 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
6928 cat >> confdefs.h <<EOF
6929 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
6930 EOF
6931
6932
6933
6934 # Check for sys/types.h types
6935 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
6936 echo "configure:6937: checking for u_int type" >&5
6937 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
6938   echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940   
6941     cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944  #include <sys/types.h> 
6945 int main() {
6946  u_int a; a = 1;
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6950   rm -rf conftest*
6951    ac_cv_have_u_int="yes" 
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956    ac_cv_have_u_int="no" 
6957     
6958 fi
6959 rm -f conftest*
6960
6961 fi
6962
6963 echo "$ac_t""$ac_cv_have_u_int" 1>&6
6964 if test "x$ac_cv_have_u_int" = "xyes" ; then
6965    cat >> confdefs.h <<\EOF
6966 #define HAVE_U_INT 1
6967 EOF
6968
6969    have_u_int=1
6970 fi
6971
6972 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
6973 echo "configure:6974: checking for intmax_t type" >&5
6974 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
6975   echo $ac_n "(cached) $ac_c" 1>&6
6976 else
6977   
6978    cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981  #include <sys/types.h> 
6982 int main() {
6983  intmax_t a; a = 1;
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6987   rm -rf conftest*
6988    ac_cv_have_intmax_t="yes" 
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993    
6994          cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997  #include <stdint.h> 
6998 int main() {
6999  intmax_t a; a = 1;
7000 ; return 0; }
7001 EOF
7002 if { (eval echo configure:7003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7003   rm -rf conftest*
7004    ac_cv_have_intmax_t="yes" 
7005 else
7006   echo "configure: failed program was:" >&5
7007   cat conftest.$ac_ext >&5
7008   rm -rf conftest*
7009    ac_cv_have_intmax_t="no" 
7010          
7011 fi
7012 rm -f conftest*
7013       
7014    
7015 fi
7016 rm -f conftest*     
7017
7018
7019 fi
7020
7021 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
7022 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
7023    cat >> confdefs.h <<\EOF
7024 #define HAVE_INTMAX_T 1
7025 EOF
7026
7027    have_intmax_t=1
7028 fi
7029
7030
7031 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
7032 echo "configure:7033: checking for u_intmax_t type" >&5
7033 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
7034   echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036   
7037    cat > conftest.$ac_ext <<EOF
7038 #line 7039 "configure"
7039 #include "confdefs.h"
7040  #include <sys/types.h> 
7041 int main() {
7042  u_intmax_t a; a = 1;
7043 ; return 0; }
7044 EOF
7045 if { (eval echo configure:7046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7046   rm -rf conftest*
7047    ac_cv_have_u_intmax_t="yes" 
7048 else
7049   echo "configure: failed program was:" >&5
7050   cat conftest.$ac_ext >&5
7051   rm -rf conftest*
7052    
7053          cat > conftest.$ac_ext <<EOF
7054 #line 7055 "configure"
7055 #include "confdefs.h"
7056  #include <stdint.h> 
7057 int main() {
7058  u_intmax_t a; a = 1;
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7062   rm -rf conftest*
7063    ac_cv_have_u_intmax_t="yes" 
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068    ac_cv_have_u_intmax_t="no" 
7069          
7070 fi
7071 rm -f conftest*
7072       
7073    
7074 fi
7075 rm -f conftest*
7076
7077 fi
7078
7079 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
7080 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
7081    cat >> confdefs.h <<\EOF
7082 #define HAVE_U_INTMAX_T 1
7083 EOF
7084
7085    have_u_intmax_t=1
7086 fi
7087
7088
7089 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
7090 echo "configure:7091: checking for intXX_t types" >&5
7091 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
7092   echo $ac_n "(cached) $ac_c" 1>&6
7093 else
7094   
7095    cat > conftest.$ac_ext <<EOF
7096 #line 7097 "configure"
7097 #include "confdefs.h"
7098  #include <sys/types.h> 
7099 int main() {
7100  int8_t a; int16_t b; int32_t c; a = b = c = 1;
7101 ; return 0; }
7102 EOF
7103 if { (eval echo configure:7104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7104   rm -rf conftest*
7105    ac_cv_have_intxx_t="yes" 
7106 else
7107   echo "configure: failed program was:" >&5
7108   cat conftest.$ac_ext >&5
7109   rm -rf conftest*
7110    ac_cv_have_intxx_t="no" 
7111    
7112 fi
7113 rm -f conftest*
7114
7115 fi
7116
7117 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
7118 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
7119    cat >> confdefs.h <<\EOF
7120 #define HAVE_INTXX_T 1
7121 EOF
7122
7123    have_intxx_t=1
7124 fi
7125         
7126 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
7127 echo "configure:7128: checking for int64_t type" >&5
7128 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   
7132    cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135  #include <sys/types.h> 
7136 int main() {
7137  int64_t a; a = 1;
7138 ; return 0; }
7139 EOF
7140 if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7141   rm -rf conftest*
7142    ac_cv_have_int64_t="yes" 
7143 else
7144   echo "configure: failed program was:" >&5
7145   cat conftest.$ac_ext >&5
7146   rm -rf conftest*
7147    ac_cv_have_int64_t="no" 
7148    
7149 fi
7150 rm -f conftest*
7151
7152 fi
7153
7154 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
7155 if test "x$ac_cv_have_int64_t" = "xyes" ; then
7156    cat >> confdefs.h <<\EOF
7157 #define HAVE_INT64_T 1
7158 EOF
7159
7160    have_int64_t=1
7161 fi
7162         
7163 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
7164 echo "configure:7165: checking for u_intXX_t types" >&5
7165 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   
7169    cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172  #include <sys/types.h> 
7173 int main() {
7174  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
7175 ; return 0; }
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7178   rm -rf conftest*
7179    ac_cv_have_u_intxx_t="yes" 
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184    ac_cv_have_u_intxx_t="no" 
7185    
7186 fi
7187 rm -f conftest*
7188
7189 fi
7190
7191 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
7192 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
7193    cat >> confdefs.h <<\EOF
7194 #define HAVE_U_INTXX_T 1
7195 EOF
7196
7197    have_u_intxx_t=1
7198 fi
7199
7200 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
7201 echo "configure:7202: checking for u_int64_t types" >&5
7202 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
7203   echo $ac_n "(cached) $ac_c" 1>&6
7204 else
7205   
7206    cat > conftest.$ac_ext <<EOF
7207 #line 7208 "configure"
7208 #include "confdefs.h"
7209  #include <sys/types.h> 
7210 int main() {
7211  u_int64_t a; a = 1;
7212 ; return 0; }
7213 EOF
7214 if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7215   rm -rf conftest*
7216    ac_cv_have_u_int64_t="yes" 
7217 else
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221    ac_cv_have_u_int64_t="no" 
7222    
7223 fi
7224 rm -f conftest*
7225
7226 fi
7227
7228 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
7229 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
7230    cat >> confdefs.h <<\EOF
7231 #define HAVE_U_INT64_T 1
7232 EOF
7233
7234    have_u_int64_t=1
7235 fi
7236
7237 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
7238            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
7239 then
7240    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
7241 echo "configure:7242: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
7242    cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245  #include <sys/bitypes.h>  
7246 int main() {
7247  int8_t a; int16_t b; int32_t c;
7248         u_int8_t e; u_int16_t f; u_int32_t g;
7249         a = b = c = e = f = g = 1;  
7250 ; return 0; }
7251 EOF
7252 if { (eval echo configure:7253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7253   rm -rf conftest*
7254    cat >> confdefs.h <<\EOF
7255 #define HAVE_U_INTXX_T 1
7256 EOF
7257
7258         cat >> confdefs.h <<\EOF
7259 #define HAVE_INTXX_T 1
7260 EOF
7261
7262         cat >> confdefs.h <<\EOF
7263 #define HAVE_SYS_BITYPES_H 1
7264 EOF
7265
7266         echo "$ac_t""yes" 1>&6 
7267 else
7268   echo "configure: failed program was:" >&5
7269   cat conftest.$ac_ext >&5
7270   rm -rf conftest*
7271    echo "$ac_t""no" 1>&6
7272    
7273 fi
7274 rm -f conftest* 
7275 fi
7276
7277 if test -z "$have_u_intxx_t" ; then
7278    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
7279 echo "configure:7280: checking for uintXX_t types" >&5
7280 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
7281   echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283   
7284       cat > conftest.$ac_ext <<EOF
7285 #line 7286 "configure"
7286 #include "confdefs.h"
7287  #include <sys/types.h> 
7288 int main() {
7289  uint8_t a; uint16_t b; 
7290            uint32_t c; a = b = c = 1; 
7291 ; return 0; }
7292 EOF
7293 if { (eval echo configure:7294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7294   rm -rf conftest*
7295    ac_cv_have_uintxx_t="yes" 
7296 else
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299   rm -rf conftest*
7300    ac_cv_have_uintxx_t="no" 
7301       
7302 fi
7303 rm -f conftest*
7304    
7305 fi
7306
7307 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
7308    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
7309       cat >> confdefs.h <<\EOF
7310 #define HAVE_UINTXX_T 1
7311 EOF
7312
7313    fi
7314 fi
7315
7316
7317 for ac_func in \
7318         fork \
7319         getcwd \
7320         gethostname \
7321         getpid \
7322         gettimeofday \
7323         setpgid \
7324         setpgrp \
7325         setsid \
7326         signal \
7327         strerror \
7328         strncmp \
7329         strncpy \
7330         vfprintf \
7331         
7332 do
7333 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7334 echo "configure:7335: checking for $ac_func" >&5
7335 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7336   echo $ac_n "(cached) $ac_c" 1>&6
7337 else
7338   cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341 /* System header to define __stub macros and hopefully few prototypes,
7342     which can conflict with char $ac_func(); below.  */
7343 #include <assert.h>
7344 /* Override any gcc2 internal prototype to avoid an error.  */
7345 /* We use char because int might match the return type of a gcc2
7346     builtin and then its argument prototype would still apply.  */
7347 char $ac_func();
7348
7349 int main() {
7350
7351 /* The GNU C library defines this for functions which it implements
7352     to always fail with ENOSYS.  Some functions are actually named
7353     something starting with __ and the normal name is an alias.  */
7354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7355 choke me
7356 #else
7357 $ac_func();
7358 #endif
7359
7360 ; return 0; }
7361 EOF
7362 if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7363   rm -rf conftest*
7364   eval "ac_cv_func_$ac_func=yes"
7365 else
7366   echo "configure: failed program was:" >&5
7367   cat conftest.$ac_ext >&5
7368   rm -rf conftest*
7369   eval "ac_cv_func_$ac_func=no"
7370 fi
7371 rm -f conftest*
7372 fi
7373
7374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7375   echo "$ac_t""yes" 1>&6
7376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7377   cat >> confdefs.h <<EOF
7378 #define $ac_tr_func 1
7379 EOF
7380  
7381 else
7382   echo "$ac_t""no" 1>&6
7383 echo 'configure: cannot find needed function.'; exit 1
7384
7385 fi
7386 done
7387
7388
7389 for ac_func in fchdir
7390 do
7391 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7392 echo "configure:7393: checking for $ac_func" >&5
7393 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 /* System header to define __stub macros and hopefully few prototypes,
7400     which can conflict with char $ac_func(); below.  */
7401 #include <assert.h>
7402 /* Override any gcc2 internal prototype to avoid an error.  */
7403 /* We use char because int might match the return type of a gcc2
7404     builtin and then its argument prototype would still apply.  */
7405 char $ac_func();
7406
7407 int main() {
7408
7409 /* The GNU C library defines this for functions which it implements
7410     to always fail with ENOSYS.  Some functions are actually named
7411     something starting with __ and the normal name is an alias.  */
7412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7413 choke me
7414 #else
7415 $ac_func();
7416 #endif
7417
7418 ; return 0; }
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421   rm -rf conftest*
7422   eval "ac_cv_func_$ac_func=yes"
7423 else
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_func_$ac_func=no"
7428 fi
7429 rm -f conftest*
7430 fi
7431
7432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7435   cat >> confdefs.h <<EOF
7436 #define $ac_tr_func 1
7437 EOF
7438  cat >> confdefs.h <<\EOF
7439 #define HAVE_FCHDIR 1
7440 EOF
7441
7442 else
7443   echo "$ac_t""no" 1>&6
7444 fi
7445 done
7446
7447
7448 for ac_func in snprintf vsnprintf gethostid getdomainname
7449 do
7450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7451 echo "configure:7452: checking for $ac_func" >&5
7452 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7453   echo $ac_n "(cached) $ac_c" 1>&6
7454 else
7455   cat > conftest.$ac_ext <<EOF
7456 #line 7457 "configure"
7457 #include "confdefs.h"
7458 /* System header to define __stub macros and hopefully few prototypes,
7459     which can conflict with char $ac_func(); below.  */
7460 #include <assert.h>
7461 /* Override any gcc2 internal prototype to avoid an error.  */
7462 /* We use char because int might match the return type of a gcc2
7463     builtin and then its argument prototype would still apply.  */
7464 char $ac_func();
7465
7466 int main() {
7467
7468 /* The GNU C library defines this for functions which it implements
7469     to always fail with ENOSYS.  Some functions are actually named
7470     something starting with __ and the normal name is an alias.  */
7471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7472 choke me
7473 #else
7474 $ac_func();
7475 #endif
7476
7477 ; return 0; }
7478 EOF
7479 if { (eval echo configure:7480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7480   rm -rf conftest*
7481   eval "ac_cv_func_$ac_func=yes"
7482 else
7483   echo "configure: failed program was:" >&5
7484   cat conftest.$ac_ext >&5
7485   rm -rf conftest*
7486   eval "ac_cv_func_$ac_func=no"
7487 fi
7488 rm -f conftest*
7489 fi
7490
7491 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7492   echo "$ac_t""yes" 1>&6
7493     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7494   cat >> confdefs.h <<EOF
7495 #define $ac_tr_func 1
7496 EOF
7497  
7498 else
7499   echo "$ac_t""no" 1>&6
7500 fi
7501 done
7502
7503
7504 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
7505 do
7506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7507 echo "configure:7508: checking for $ac_func" >&5
7508 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7509   echo $ac_n "(cached) $ac_c" 1>&6
7510 else
7511   cat > conftest.$ac_ext <<EOF
7512 #line 7513 "configure"
7513 #include "confdefs.h"
7514 /* System header to define __stub macros and hopefully few prototypes,
7515     which can conflict with char $ac_func(); below.  */
7516 #include <assert.h>
7517 /* Override any gcc2 internal prototype to avoid an error.  */
7518 /* We use char because int might match the return type of a gcc2
7519     builtin and then its argument prototype would still apply.  */
7520 char $ac_func();
7521
7522 int main() {
7523
7524 /* The GNU C library defines this for functions which it implements
7525     to always fail with ENOSYS.  Some functions are actually named
7526     something starting with __ and the normal name is an alias.  */
7527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7528 choke me
7529 #else
7530 $ac_func();
7531 #endif
7532
7533 ; return 0; }
7534 EOF
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7536   rm -rf conftest*
7537   eval "ac_cv_func_$ac_func=yes"
7538 else
7539   echo "configure: failed program was:" >&5
7540   cat conftest.$ac_ext >&5
7541   rm -rf conftest*
7542   eval "ac_cv_func_$ac_func=no"
7543 fi
7544 rm -f conftest*
7545 fi
7546
7547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7548   echo "$ac_t""yes" 1>&6
7549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7550   cat >> confdefs.h <<EOF
7551 #define $ac_tr_func 1
7552 EOF
7553  
7554 else
7555   echo "$ac_t""no" 1>&6
7556 fi
7557 done
7558
7559
7560 # If resolver functions are not in libc check for -lnsl or -lresolv.
7561 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
7562 echo "configure:7563: checking for gethostbyname_r" >&5
7563 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
7564   echo $ac_n "(cached) $ac_c" 1>&6
7565 else
7566   cat > conftest.$ac_ext <<EOF
7567 #line 7568 "configure"
7568 #include "confdefs.h"
7569 /* System header to define __stub macros and hopefully few prototypes,
7570     which can conflict with char gethostbyname_r(); below.  */
7571 #include <assert.h>
7572 /* Override any gcc2 internal prototype to avoid an error.  */
7573 /* We use char because int might match the return type of a gcc2
7574     builtin and then its argument prototype would still apply.  */
7575 char gethostbyname_r();
7576
7577 int main() {
7578
7579 /* The GNU C library defines this for functions which it implements
7580     to always fail with ENOSYS.  Some functions are actually named
7581     something starting with __ and the normal name is an alias.  */
7582 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
7583 choke me
7584 #else
7585 gethostbyname_r();
7586 #endif
7587
7588 ; return 0; }
7589 EOF
7590 if { (eval echo configure:7591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7591   rm -rf conftest*
7592   eval "ac_cv_func_gethostbyname_r=yes"
7593 else
7594   echo "configure: failed program was:" >&5
7595   cat conftest.$ac_ext >&5
7596   rm -rf conftest*
7597   eval "ac_cv_func_gethostbyname_r=no"
7598 fi
7599 rm -f conftest*
7600 fi
7601
7602 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
7603   echo "$ac_t""yes" 1>&6
7604   echo "$ac_t""using libc's resolver" 1>&6
7605 else
7606   echo "$ac_t""no" 1>&6
7607 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
7608 echo "configure:7609: checking for gethostbyname_r in -lnsl" >&5
7609 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
7610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7611   echo $ac_n "(cached) $ac_c" 1>&6
7612 else
7613   ac_save_LIBS="$LIBS"
7614 LIBS="-lnsl  $LIBS"
7615 cat > conftest.$ac_ext <<EOF
7616 #line 7617 "configure"
7617 #include "confdefs.h"
7618 /* Override any gcc2 internal prototype to avoid an error.  */
7619 /* We use char because int might match the return type of a gcc2
7620     builtin and then its argument prototype would still apply.  */
7621 char gethostbyname_r();
7622
7623 int main() {
7624 gethostbyname_r()
7625 ; return 0; }
7626 EOF
7627 if { (eval echo configure:7628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7628   rm -rf conftest*
7629   eval "ac_cv_lib_$ac_lib_var=yes"
7630 else
7631   echo "configure: failed program was:" >&5
7632   cat conftest.$ac_ext >&5
7633   rm -rf conftest*
7634   eval "ac_cv_lib_$ac_lib_var=no"
7635 fi
7636 rm -f conftest*
7637 LIBS="$ac_save_LIBS"
7638
7639 fi
7640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7641   echo "$ac_t""yes" 1>&6
7642     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
7643     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7644   cat >> confdefs.h <<EOF
7645 #define $ac_tr_lib 1
7646 EOF
7647
7648   LIBS="-lnsl $LIBS"
7649
7650 else
7651   echo "$ac_t""no" 1>&6
7652 fi
7653
7654     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
7655 echo "configure:7656: checking for gethostbyname_r in -lresolv" >&5
7656 ac_lib_var=`echo resolv'_'gethostbyname_r | sed 'y%./+-%__p_%'`
7657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   ac_save_LIBS="$LIBS"
7661 LIBS="-lresolv  $LIBS"
7662 cat > conftest.$ac_ext <<EOF
7663 #line 7664 "configure"
7664 #include "confdefs.h"
7665 /* Override any gcc2 internal prototype to avoid an error.  */
7666 /* We use char because int might match the return type of a gcc2
7667     builtin and then its argument prototype would still apply.  */
7668 char gethostbyname_r();
7669
7670 int main() {
7671 gethostbyname_r()
7672 ; return 0; }
7673 EOF
7674 if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7675   rm -rf conftest*
7676   eval "ac_cv_lib_$ac_lib_var=yes"
7677 else
7678   echo "configure: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   rm -rf conftest*
7681   eval "ac_cv_lib_$ac_lib_var=no"
7682 fi
7683 rm -f conftest*
7684 LIBS="$ac_save_LIBS"
7685
7686 fi
7687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7688   echo "$ac_t""yes" 1>&6
7689     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
7690     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7691   cat >> confdefs.h <<EOF
7692 #define $ac_tr_lib 1
7693 EOF
7694
7695   LIBS="-lresolv $LIBS"
7696
7697 else
7698   echo "$ac_t""no" 1>&6
7699 fi
7700
7701 fi
7702
7703
7704
7705 # Find where sockets are (especially for Solaris)
7706 echo $ac_n "checking for socket""... $ac_c" 1>&6
7707 echo "configure:7708: checking for socket" >&5
7708 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7709   echo $ac_n "(cached) $ac_c" 1>&6
7710 else
7711   cat > conftest.$ac_ext <<EOF
7712 #line 7713 "configure"
7713 #include "confdefs.h"
7714 /* System header to define __stub macros and hopefully few prototypes,
7715     which can conflict with char socket(); below.  */
7716 #include <assert.h>
7717 /* Override any gcc2 internal prototype to avoid an error.  */
7718 /* We use char because int might match the return type of a gcc2
7719     builtin and then its argument prototype would still apply.  */
7720 char socket();
7721
7722 int main() {
7723
7724 /* The GNU C library defines this for functions which it implements
7725     to always fail with ENOSYS.  Some functions are actually named
7726     something starting with __ and the normal name is an alias.  */
7727 #if defined (__stub_socket) || defined (__stub___socket)
7728 choke me
7729 #else
7730 socket();
7731 #endif
7732
7733 ; return 0; }
7734 EOF
7735 if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7736   rm -rf conftest*
7737   eval "ac_cv_func_socket=yes"
7738 else
7739   echo "configure: failed program was:" >&5
7740   cat conftest.$ac_ext >&5
7741   rm -rf conftest*
7742   eval "ac_cv_func_socket=no"
7743 fi
7744 rm -f conftest*
7745 fi
7746
7747 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
7748   echo "$ac_t""yes" 1>&6
7749   echo "$ac_t""using libc's socket" 1>&6
7750 else
7751   echo "$ac_t""no" 1>&6
7752 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
7753 echo "configure:7754: checking for socket in -lxnet" >&5
7754 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
7755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7756   echo $ac_n "(cached) $ac_c" 1>&6
7757 else
7758   ac_save_LIBS="$LIBS"
7759 LIBS="-lxnet  $LIBS"
7760 cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 /* Override any gcc2 internal prototype to avoid an error.  */
7764 /* We use char because int might match the return type of a gcc2
7765     builtin and then its argument prototype would still apply.  */
7766 char socket();
7767
7768 int main() {
7769 socket()
7770 ; return 0; }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7773   rm -rf conftest*
7774   eval "ac_cv_lib_$ac_lib_var=yes"
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -rf conftest*
7779   eval "ac_cv_lib_$ac_lib_var=no"
7780 fi
7781 rm -f conftest*
7782 LIBS="$ac_save_LIBS"
7783
7784 fi
7785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7786   echo "$ac_t""yes" 1>&6
7787     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
7788     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7789   cat >> confdefs.h <<EOF
7790 #define $ac_tr_lib 1
7791 EOF
7792
7793   LIBS="-lxnet $LIBS"
7794
7795 else
7796   echo "$ac_t""no" 1>&6
7797 fi
7798
7799     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
7800 echo "configure:7801: checking for socket in -lsocket" >&5
7801 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
7802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7803   echo $ac_n "(cached) $ac_c" 1>&6
7804 else
7805   ac_save_LIBS="$LIBS"
7806 LIBS="-lsocket  $LIBS"
7807 cat > conftest.$ac_ext <<EOF
7808 #line 7809 "configure"
7809 #include "confdefs.h"
7810 /* Override any gcc2 internal prototype to avoid an error.  */
7811 /* We use char because int might match the return type of a gcc2
7812     builtin and then its argument prototype would still apply.  */
7813 char socket();
7814
7815 int main() {
7816 socket()
7817 ; return 0; }
7818 EOF
7819 if { (eval echo configure:7820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7820   rm -rf conftest*
7821   eval "ac_cv_lib_$ac_lib_var=yes"
7822 else
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   eval "ac_cv_lib_$ac_lib_var=no"
7827 fi
7828 rm -f conftest*
7829 LIBS="$ac_save_LIBS"
7830
7831 fi
7832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7833   echo "$ac_t""yes" 1>&6
7834     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
7835     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7836   cat >> confdefs.h <<EOF
7837 #define $ac_tr_lib 1
7838 EOF
7839
7840   LIBS="-lsocket $LIBS"
7841
7842 else
7843   echo "$ac_t""no" 1>&6
7844 fi
7845
7846     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
7847 echo "configure:7848: checking for socket in -linet" >&5
7848 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
7849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7850   echo $ac_n "(cached) $ac_c" 1>&6
7851 else
7852   ac_save_LIBS="$LIBS"
7853 LIBS="-linet  $LIBS"
7854 cat > conftest.$ac_ext <<EOF
7855 #line 7856 "configure"
7856 #include "confdefs.h"
7857 /* Override any gcc2 internal prototype to avoid an error.  */
7858 /* We use char because int might match the return type of a gcc2
7859     builtin and then its argument prototype would still apply.  */
7860 char socket();
7861
7862 int main() {
7863 socket()
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7867   rm -rf conftest*
7868   eval "ac_cv_lib_$ac_lib_var=yes"
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   eval "ac_cv_lib_$ac_lib_var=no"
7874 fi
7875 rm -f conftest*
7876 LIBS="$ac_save_LIBS"
7877
7878 fi
7879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7880   echo "$ac_t""yes" 1>&6
7881     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
7882     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7883   cat >> confdefs.h <<EOF
7884 #define $ac_tr_lib 1
7885 EOF
7886
7887   LIBS="-linet $LIBS"
7888
7889 else
7890   echo "$ac_t""no" 1>&6
7891 fi
7892
7893 fi
7894
7895
7896 for ac_func in inet_pton
7897 do
7898 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7899 echo "configure:7900: checking for $ac_func" >&5
7900 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7901   echo $ac_n "(cached) $ac_c" 1>&6
7902 else
7903   cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7906 /* System header to define __stub macros and hopefully few prototypes,
7907     which can conflict with char $ac_func(); below.  */
7908 #include <assert.h>
7909 /* Override any gcc2 internal prototype to avoid an error.  */
7910 /* We use char because int might match the return type of a gcc2
7911     builtin and then its argument prototype would still apply.  */
7912 char $ac_func();
7913
7914 int main() {
7915
7916 /* The GNU C library defines this for functions which it implements
7917     to always fail with ENOSYS.  Some functions are actually named
7918     something starting with __ and the normal name is an alias.  */
7919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7920 choke me
7921 #else
7922 $ac_func();
7923 #endif
7924
7925 ; return 0; }
7926 EOF
7927 if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7928   rm -rf conftest*
7929   eval "ac_cv_func_$ac_func=yes"
7930 else
7931   echo "configure: failed program was:" >&5
7932   cat conftest.$ac_ext >&5
7933   rm -rf conftest*
7934   eval "ac_cv_func_$ac_func=no"
7935 fi
7936 rm -f conftest*
7937 fi
7938
7939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7940   echo "$ac_t""yes" 1>&6
7941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7942   cat >> confdefs.h <<EOF
7943 #define $ac_tr_func 1
7944 EOF
7945  cat >> confdefs.h <<\EOF
7946 #define HAVE_INET_PTON 1
7947 EOF
7948
7949 else
7950   echo "$ac_t""no" 1>&6
7951 fi
7952 done
7953
7954
7955 echo $ac_n "checking for strftime""... $ac_c" 1>&6
7956 echo "configure:7957: checking for strftime" >&5
7957 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* System header to define __stub macros and hopefully few prototypes,
7964     which can conflict with char strftime(); below.  */
7965 #include <assert.h>
7966 /* Override any gcc2 internal prototype to avoid an error.  */
7967 /* We use char because int might match the return type of a gcc2
7968     builtin and then its argument prototype would still apply.  */
7969 char strftime();
7970
7971 int main() {
7972
7973 /* The GNU C library defines this for functions which it implements
7974     to always fail with ENOSYS.  Some functions are actually named
7975     something starting with __ and the normal name is an alias.  */
7976 #if defined (__stub_strftime) || defined (__stub___strftime)
7977 choke me
7978 #else
7979 strftime();
7980 #endif
7981
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7985   rm -rf conftest*
7986   eval "ac_cv_func_strftime=yes"
7987 else
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   eval "ac_cv_func_strftime=no"
7992 fi
7993 rm -f conftest*
7994 fi
7995
7996 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
7997   echo "$ac_t""yes" 1>&6
7998   cat >> confdefs.h <<\EOF
7999 #define HAVE_STRFTIME 1
8000 EOF
8001
8002 else
8003   echo "$ac_t""no" 1>&6
8004 # strftime is in -lintl on SCO UNIX.
8005 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8006 echo "configure:8007: checking for strftime in -lintl" >&5
8007 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   ac_save_LIBS="$LIBS"
8012 LIBS="-lintl  $LIBS"
8013 cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* Override any gcc2 internal prototype to avoid an error.  */
8017 /* We use char because int might match the return type of a gcc2
8018     builtin and then its argument prototype would still apply.  */
8019 char strftime();
8020
8021 int main() {
8022 strftime()
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_lib_$ac_lib_var=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_lib_$ac_lib_var=no"
8033 fi
8034 rm -f conftest*
8035 LIBS="$ac_save_LIBS"
8036
8037 fi
8038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8039   echo "$ac_t""yes" 1>&6
8040   cat >> confdefs.h <<\EOF
8041 #define HAVE_STRFTIME 1
8042 EOF
8043
8044 LIBS="-lintl $LIBS"
8045 else
8046   echo "$ac_t""no" 1>&6
8047 fi
8048
8049 fi
8050
8051 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8052 echo "configure:8053: checking for vprintf" >&5
8053 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   cat > conftest.$ac_ext <<EOF
8057 #line 8058 "configure"
8058 #include "confdefs.h"
8059 /* System header to define __stub macros and hopefully few prototypes,
8060     which can conflict with char vprintf(); below.  */
8061 #include <assert.h>
8062 /* Override any gcc2 internal prototype to avoid an error.  */
8063 /* We use char because int might match the return type of a gcc2
8064     builtin and then its argument prototype would still apply.  */
8065 char vprintf();
8066
8067 int main() {
8068
8069 /* The GNU C library defines this for functions which it implements
8070     to always fail with ENOSYS.  Some functions are actually named
8071     something starting with __ and the normal name is an alias.  */
8072 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8073 choke me
8074 #else
8075 vprintf();
8076 #endif
8077
8078 ; return 0; }
8079 EOF
8080 if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8081   rm -rf conftest*
8082   eval "ac_cv_func_vprintf=yes"
8083 else
8084   echo "configure: failed program was:" >&5
8085   cat conftest.$ac_ext >&5
8086   rm -rf conftest*
8087   eval "ac_cv_func_vprintf=no"
8088 fi
8089 rm -f conftest*
8090 fi
8091
8092 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8093   echo "$ac_t""yes" 1>&6
8094   cat >> confdefs.h <<\EOF
8095 #define HAVE_VPRINTF 1
8096 EOF
8097
8098 else
8099   echo "$ac_t""no" 1>&6
8100 fi
8101
8102 if test "$ac_cv_func_vprintf" != yes; then
8103 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8104 echo "configure:8105: checking for _doprnt" >&5
8105 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8106   echo $ac_n "(cached) $ac_c" 1>&6
8107 else
8108   cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 /* System header to define __stub macros and hopefully few prototypes,
8112     which can conflict with char _doprnt(); below.  */
8113 #include <assert.h>
8114 /* Override any gcc2 internal prototype to avoid an error.  */
8115 /* We use char because int might match the return type of a gcc2
8116     builtin and then its argument prototype would still apply.  */
8117 char _doprnt();
8118
8119 int main() {
8120
8121 /* The GNU C library defines this for functions which it implements
8122     to always fail with ENOSYS.  Some functions are actually named
8123     something starting with __ and the normal name is an alias.  */
8124 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8125 choke me
8126 #else
8127 _doprnt();
8128 #endif
8129
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   eval "ac_cv_func__doprnt=yes"
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_func__doprnt=no"
8140 fi
8141 rm -f conftest*
8142 fi
8143
8144 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8145   echo "$ac_t""yes" 1>&6
8146   cat >> confdefs.h <<\EOF
8147 #define HAVE_DOPRNT 1
8148 EOF
8149
8150 else
8151   echo "$ac_t""no" 1>&6
8152 fi
8153
8154 fi
8155
8156 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8157 # for constant arguments.  Useless!
8158 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8159 echo "configure:8160: checking for working alloca.h" >&5
8160 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8161   echo $ac_n "(cached) $ac_c" 1>&6
8162 else
8163   cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 #include <alloca.h>
8167 int main() {
8168 char *p = alloca(2 * sizeof(int));
8169 ; return 0; }
8170 EOF
8171 if { (eval echo configure:8172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8172   rm -rf conftest*
8173   ac_cv_header_alloca_h=yes
8174 else
8175   echo "configure: failed program was:" >&5
8176   cat conftest.$ac_ext >&5
8177   rm -rf conftest*
8178   ac_cv_header_alloca_h=no
8179 fi
8180 rm -f conftest*
8181 fi
8182
8183 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8184 if test $ac_cv_header_alloca_h = yes; then
8185   cat >> confdefs.h <<\EOF
8186 #define HAVE_ALLOCA_H 1
8187 EOF
8188
8189 fi
8190
8191 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8192 echo "configure:8193: checking for alloca" >&5
8193 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199
8200 #ifdef __GNUC__
8201 # define alloca __builtin_alloca
8202 #else
8203 # ifdef _MSC_VER
8204 #  include <malloc.h>
8205 #  define alloca _alloca
8206 # else
8207 #  if HAVE_ALLOCA_H
8208 #   include <alloca.h>
8209 #  else
8210 #   ifdef _AIX
8211  #pragma alloca
8212 #   else
8213 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8214 char *alloca ();
8215 #    endif
8216 #   endif
8217 #  endif
8218 # endif
8219 #endif
8220
8221 int main() {
8222 char *p = (char *) alloca(1);
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   ac_cv_func_alloca_works=yes
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   ac_cv_func_alloca_works=no
8233 fi
8234 rm -f conftest*
8235 fi
8236
8237 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8238 if test $ac_cv_func_alloca_works = yes; then
8239   cat >> confdefs.h <<\EOF
8240 #define HAVE_ALLOCA 1
8241 EOF
8242
8243 fi
8244
8245 if test $ac_cv_func_alloca_works = no; then
8246   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8247   # that cause trouble.  Some versions do not even contain alloca or
8248   # contain a buggy version.  If you still want to use their alloca,
8249   # use ar to extract alloca.o from them instead of compiling alloca.c.
8250   ALLOCA=alloca.${ac_objext}
8251   cat >> confdefs.h <<\EOF
8252 #define C_ALLOCA 1
8253 EOF
8254
8255
8256 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8257 echo "configure:8258: checking whether alloca needs Cray hooks" >&5
8258 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8259   echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261   cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 #if defined(CRAY) && ! defined(CRAY2)
8265 webecray
8266 #else
8267 wenotbecray
8268 #endif
8269
8270 EOF
8271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8272   egrep "webecray" >/dev/null 2>&1; then
8273   rm -rf conftest*
8274   ac_cv_os_cray=yes
8275 else
8276   rm -rf conftest*
8277   ac_cv_os_cray=no
8278 fi
8279 rm -f conftest*
8280
8281 fi
8282
8283 echo "$ac_t""$ac_cv_os_cray" 1>&6
8284 if test $ac_cv_os_cray = yes; then
8285 for ac_func in _getb67 GETB67 getb67; do
8286   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8287 echo "configure:8288: checking for $ac_func" >&5
8288 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8289   echo $ac_n "(cached) $ac_c" 1>&6
8290 else
8291   cat > conftest.$ac_ext <<EOF
8292 #line 8293 "configure"
8293 #include "confdefs.h"
8294 /* System header to define __stub macros and hopefully few prototypes,
8295     which can conflict with char $ac_func(); below.  */
8296 #include <assert.h>
8297 /* Override any gcc2 internal prototype to avoid an error.  */
8298 /* We use char because int might match the return type of a gcc2
8299     builtin and then its argument prototype would still apply.  */
8300 char $ac_func();
8301
8302 int main() {
8303
8304 /* The GNU C library defines this for functions which it implements
8305     to always fail with ENOSYS.  Some functions are actually named
8306     something starting with __ and the normal name is an alias.  */
8307 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8308 choke me
8309 #else
8310 $ac_func();
8311 #endif
8312
8313 ; return 0; }
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8316   rm -rf conftest*
8317   eval "ac_cv_func_$ac_func=yes"
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -rf conftest*
8322   eval "ac_cv_func_$ac_func=no"
8323 fi
8324 rm -f conftest*
8325 fi
8326
8327 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8328   echo "$ac_t""yes" 1>&6
8329   cat >> confdefs.h <<EOF
8330 #define CRAY_STACKSEG_END $ac_func
8331 EOF
8332
8333   break
8334 else
8335   echo "$ac_t""no" 1>&6
8336 fi
8337
8338 done
8339 fi
8340
8341 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8342 echo "configure:8343: checking stack direction for C alloca" >&5
8343 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8344   echo $ac_n "(cached) $ac_c" 1>&6
8345 else
8346   if test "$cross_compiling" = yes; then
8347   ac_cv_c_stack_direction=0
8348 else
8349   cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 find_stack_direction ()
8353 {
8354   static char *addr = 0;
8355   auto char dummy;
8356   if (addr == 0)
8357     {
8358       addr = &dummy;
8359       return find_stack_direction ();
8360     }
8361   else
8362     return (&dummy > addr) ? 1 : -1;
8363 }
8364 main ()
8365 {
8366   exit (find_stack_direction() < 0);
8367 }
8368 EOF
8369 if { (eval echo configure:8370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8370 then
8371   ac_cv_c_stack_direction=1
8372 else
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -fr conftest*
8376   ac_cv_c_stack_direction=-1
8377 fi
8378 rm -fr conftest*
8379 fi
8380
8381 fi
8382
8383 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8384 cat >> confdefs.h <<EOF
8385 #define STACK_DIRECTION $ac_cv_c_stack_direction
8386 EOF
8387
8388 fi
8389
8390 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
8391 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
8392 echo "configure:8393: checking for getmntent in -lsun" >&5
8393 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
8394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8395   echo $ac_n "(cached) $ac_c" 1>&6
8396 else
8397   ac_save_LIBS="$LIBS"
8398 LIBS="-lsun  $LIBS"
8399 cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 /* Override any gcc2 internal prototype to avoid an error.  */
8403 /* We use char because int might match the return type of a gcc2
8404     builtin and then its argument prototype would still apply.  */
8405 char getmntent();
8406
8407 int main() {
8408 getmntent()
8409 ; return 0; }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8412   rm -rf conftest*
8413   eval "ac_cv_lib_$ac_lib_var=yes"
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -rf conftest*
8418   eval "ac_cv_lib_$ac_lib_var=no"
8419 fi
8420 rm -f conftest*
8421 LIBS="$ac_save_LIBS"
8422
8423 fi
8424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8425   echo "$ac_t""yes" 1>&6
8426   LIBS="-lsun $LIBS"
8427 else
8428   echo "$ac_t""no" 1>&6
8429 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
8430 echo "configure:8431: checking for getmntent in -lseq" >&5
8431 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
8432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8433   echo $ac_n "(cached) $ac_c" 1>&6
8434 else
8435   ac_save_LIBS="$LIBS"
8436 LIBS="-lseq  $LIBS"
8437 cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 /* Override any gcc2 internal prototype to avoid an error.  */
8441 /* We use char because int might match the return type of a gcc2
8442     builtin and then its argument prototype would still apply.  */
8443 char getmntent();
8444
8445 int main() {
8446 getmntent()
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   eval "ac_cv_lib_$ac_lib_var=yes"
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_lib_$ac_lib_var=no"
8457 fi
8458 rm -f conftest*
8459 LIBS="$ac_save_LIBS"
8460
8461 fi
8462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8463   echo "$ac_t""yes" 1>&6
8464   LIBS="-lseq $LIBS"
8465 else
8466   echo "$ac_t""no" 1>&6
8467 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
8468 echo "configure:8469: checking for getmntent in -lgen" >&5
8469 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
8470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8471   echo $ac_n "(cached) $ac_c" 1>&6
8472 else
8473   ac_save_LIBS="$LIBS"
8474 LIBS="-lgen  $LIBS"
8475 cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 /* Override any gcc2 internal prototype to avoid an error.  */
8479 /* We use char because int might match the return type of a gcc2
8480     builtin and then its argument prototype would still apply.  */
8481 char getmntent();
8482
8483 int main() {
8484 getmntent()
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   eval "ac_cv_lib_$ac_lib_var=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_lib_$ac_lib_var=no"
8495 fi
8496 rm -f conftest*
8497 LIBS="$ac_save_LIBS"
8498
8499 fi
8500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8501   echo "$ac_t""yes" 1>&6
8502   LIBS="-lgen $LIBS"
8503 else
8504   echo "$ac_t""no" 1>&6
8505 fi
8506
8507 fi
8508
8509 fi
8510
8511 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
8512 echo "configure:8513: checking for getmntent" >&5
8513 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
8514   echo $ac_n "(cached) $ac_c" 1>&6
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 /* System header to define __stub macros and hopefully few prototypes,
8520     which can conflict with char getmntent(); below.  */
8521 #include <assert.h>
8522 /* Override any gcc2 internal prototype to avoid an error.  */
8523 /* We use char because int might match the return type of a gcc2
8524     builtin and then its argument prototype would still apply.  */
8525 char getmntent();
8526
8527 int main() {
8528
8529 /* The GNU C library defines this for functions which it implements
8530     to always fail with ENOSYS.  Some functions are actually named
8531     something starting with __ and the normal name is an alias.  */
8532 #if defined (__stub_getmntent) || defined (__stub___getmntent)
8533 choke me
8534 #else
8535 getmntent();
8536 #endif
8537
8538 ; return 0; }
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8541   rm -rf conftest*
8542   eval "ac_cv_func_getmntent=yes"
8543 else
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   eval "ac_cv_func_getmntent=no"
8548 fi
8549 rm -f conftest*
8550 fi
8551
8552 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
8553   echo "$ac_t""yes" 1>&6
8554   cat >> confdefs.h <<\EOF
8555 #define HAVE_GETMNTENT 1
8556 EOF
8557
8558 else
8559   echo "$ac_t""no" 1>&6
8560 fi
8561
8562 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
8563 echo "configure:8564: checking whether closedir returns void" >&5
8564 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
8565   echo $ac_n "(cached) $ac_c" 1>&6
8566 else
8567   if test "$cross_compiling" = yes; then
8568   ac_cv_func_closedir_void=yes
8569 else
8570   cat > conftest.$ac_ext <<EOF
8571 #line 8572 "configure"
8572 #include "confdefs.h"
8573 #include <sys/types.h>
8574 #include <$ac_header_dirent>
8575 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
8576 EOF
8577 if { (eval echo configure:8578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8578 then
8579   ac_cv_func_closedir_void=no
8580 else
8581   echo "configure: failed program was:" >&5
8582   cat conftest.$ac_ext >&5
8583   rm -fr conftest*
8584   ac_cv_func_closedir_void=yes
8585 fi
8586 rm -fr conftest*
8587 fi
8588
8589 fi
8590
8591 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
8592 if test $ac_cv_func_closedir_void = yes; then
8593   cat >> confdefs.h <<\EOF
8594 #define CLOSEDIR_VOID 1
8595 EOF
8596
8597 fi
8598
8599 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
8600 echo "configure:8601: checking whether setpgrp takes no argument" >&5
8601 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   if test "$cross_compiling" = yes; then
8605   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
8606 else
8607   cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610
8611 #ifdef HAVE_UNISTD_H
8612 #include <unistd.h>
8613 #endif
8614
8615 /*
8616  * If this system has a BSD-style setpgrp, which takes arguments, exit
8617  * successfully.
8618  */
8619 main()
8620 {
8621     if (setpgrp(1,1) == -1)
8622         exit(0);
8623     else
8624         exit(1);
8625 }
8626
8627 EOF
8628 if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8629 then
8630   ac_cv_func_setpgrp_void=no
8631 else
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -fr conftest*
8635   ac_cv_func_setpgrp_void=yes
8636 fi
8637 rm -fr conftest*
8638 fi
8639
8640
8641 fi
8642
8643 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
8644 if test $ac_cv_func_setpgrp_void = yes; then
8645   cat >> confdefs.h <<\EOF
8646 #define SETPGRP_VOID 1
8647 EOF
8648
8649 fi
8650                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8651 echo "configure:8652: checking for working fnmatch" >&5
8652 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
8653   echo $ac_n "(cached) $ac_c" 1>&6
8654 else
8655   # Some versions of Solaris or SCO have a broken fnmatch function.
8656 # So we run a test program.  If we are cross-compiling, take no chance.
8657 # Thanks to John Oleynick and Franc,ois Pinard for this test.
8658 if test "$cross_compiling" = yes; then
8659   ac_cv_func_fnmatch_works=no
8660 else
8661   cat > conftest.$ac_ext <<EOF
8662 #line 8663 "configure"
8663 #include "confdefs.h"
8664 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8667 then
8668   ac_cv_func_fnmatch_works=yes
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -fr conftest*
8673   ac_cv_func_fnmatch_works=no
8674 fi
8675 rm -fr conftest*
8676 fi
8677
8678 fi
8679
8680 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
8681 if test $ac_cv_func_fnmatch_works = yes; then
8682   cat >> confdefs.h <<\EOF
8683 #define HAVE_FNMATCH 1
8684 EOF
8685
8686 fi
8687
8688
8689
8690 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
8691 echo "configure:8692: checking for setlocale in -lxpg4" >&5
8692 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
8693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8694   echo $ac_n "(cached) $ac_c" 1>&6
8695 else
8696   ac_save_LIBS="$LIBS"
8697 LIBS="-lxpg4  $LIBS"
8698 cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 /* Override any gcc2 internal prototype to avoid an error.  */
8702 /* We use char because int might match the return type of a gcc2
8703     builtin and then its argument prototype would still apply.  */
8704 char setlocale();
8705
8706 int main() {
8707 setlocale()
8708 ; return 0; }
8709 EOF
8710 if { (eval echo configure:8711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8711   rm -rf conftest*
8712   eval "ac_cv_lib_$ac_lib_var=yes"
8713 else
8714   echo "configure: failed program was:" >&5
8715   cat conftest.$ac_ext >&5
8716   rm -rf conftest*
8717   eval "ac_cv_lib_$ac_lib_var=no"
8718 fi
8719 rm -f conftest*
8720 LIBS="$ac_save_LIBS"
8721
8722 fi
8723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8724   echo "$ac_t""yes" 1>&6
8725   LIBS="$LIBS -lxpg4"
8726 else
8727   echo "$ac_t""no" 1>&6
8728 fi
8729
8730
8731
8732 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
8733 echo "configure:8734: checking for getpwnam in -lsun" >&5
8734 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
8735 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   ac_save_LIBS="$LIBS"
8739 LIBS="-lsun  $LIBS"
8740 cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 /* Override any gcc2 internal prototype to avoid an error.  */
8744 /* We use char because int might match the return type of a gcc2
8745     builtin and then its argument prototype would still apply.  */
8746 char getpwnam();
8747
8748 int main() {
8749 getpwnam()
8750 ; return 0; }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8753   rm -rf conftest*
8754   eval "ac_cv_lib_$ac_lib_var=yes"
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   eval "ac_cv_lib_$ac_lib_var=no"
8760 fi
8761 rm -f conftest*
8762 LIBS="$ac_save_LIBS"
8763
8764 fi
8765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8766   echo "$ac_t""yes" 1>&6
8767     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8768     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8769   cat >> confdefs.h <<EOF
8770 #define $ac_tr_lib 1
8771 EOF
8772
8773   LIBS="-lsun $LIBS"
8774
8775 else
8776   echo "$ac_t""no" 1>&6
8777 fi
8778
8779
8780 for ac_hdr in zlib.h
8781 do
8782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8784 echo "configure:8785: checking for $ac_hdr" >&5
8785 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 #include <$ac_hdr>
8792 EOF
8793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8794 { (eval echo configure:8795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8796 if test -z "$ac_err"; then
8797   rm -rf conftest*
8798   eval "ac_cv_header_$ac_safe=yes"
8799 else
8800   echo "$ac_err" >&5
8801   echo "configure: failed program was:" >&5
8802   cat conftest.$ac_ext >&5
8803   rm -rf conftest*
8804   eval "ac_cv_header_$ac_safe=no"
8805 fi
8806 rm -f conftest*
8807 fi
8808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8809   echo "$ac_t""yes" 1>&6
8810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8811   cat >> confdefs.h <<EOF
8812 #define $ac_tr_hdr 1
8813 EOF
8814  
8815 else
8816   echo "$ac_t""no" 1>&6
8817 fi
8818 done
8819
8820 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
8821 echo "configure:8822: checking for deflate in -lz" >&5
8822 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
8823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8824   echo $ac_n "(cached) $ac_c" 1>&6
8825 else
8826   ac_save_LIBS="$LIBS"
8827 LIBS="-lz  $LIBS"
8828 cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831 /* Override any gcc2 internal prototype to avoid an error.  */
8832 /* We use char because int might match the return type of a gcc2
8833     builtin and then its argument prototype would still apply.  */
8834 char deflate();
8835
8836 int main() {
8837 deflate()
8838 ; return 0; }
8839 EOF
8840 if { (eval echo configure:8841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8841   rm -rf conftest*
8842   eval "ac_cv_lib_$ac_lib_var=yes"
8843 else
8844   echo "configure: failed program was:" >&5
8845   cat conftest.$ac_ext >&5
8846   rm -rf conftest*
8847   eval "ac_cv_lib_$ac_lib_var=no"
8848 fi
8849 rm -f conftest*
8850 LIBS="$ac_save_LIBS"
8851
8852 fi
8853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8854   echo "$ac_t""yes" 1>&6
8855   FDLIBS="-lz"
8856 else
8857   echo "$ac_t""no" 1>&6
8858 fi
8859
8860 have_zlib=no
8861 if test x$FDLIBS = x-lz; then
8862   cat >> confdefs.h <<\EOF
8863 #define HAVE_LIBZ 1
8864 EOF
8865
8866   have_zlib=yes
8867 fi
8868
8869 PTHREAD_LIB=""
8870 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
8871 echo "configure:8872: checking for pthread_create in -lpthread" >&5
8872 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
8873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8874   echo $ac_n "(cached) $ac_c" 1>&6
8875 else
8876   ac_save_LIBS="$LIBS"
8877 LIBS="-lpthread  $LIBS"
8878 cat > conftest.$ac_ext <<EOF
8879 #line 8880 "configure"
8880 #include "confdefs.h"
8881 /* Override any gcc2 internal prototype to avoid an error.  */
8882 /* We use char because int might match the return type of a gcc2
8883     builtin and then its argument prototype would still apply.  */
8884 char pthread_create();
8885
8886 int main() {
8887 pthread_create()
8888 ; return 0; }
8889 EOF
8890 if { (eval echo configure:8891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8891   rm -rf conftest*
8892   eval "ac_cv_lib_$ac_lib_var=yes"
8893 else
8894   echo "configure: failed program was:" >&5
8895   cat conftest.$ac_ext >&5
8896   rm -rf conftest*
8897   eval "ac_cv_lib_$ac_lib_var=no"
8898 fi
8899 rm -f conftest*
8900 LIBS="$ac_save_LIBS"
8901
8902 fi
8903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8904   echo "$ac_t""yes" 1>&6
8905   PTHREAD_LIB="-lpthread"
8906 else
8907   echo "$ac_t""no" 1>&6
8908 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
8909 echo "configure:8910: checking for pthread_create in -lpthreads" >&5
8910 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
8911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   ac_save_LIBS="$LIBS"
8915 LIBS="-lpthreads  $LIBS"
8916 cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* Override any gcc2 internal prototype to avoid an error.  */
8920 /* We use char because int might match the return type of a gcc2
8921     builtin and then its argument prototype would still apply.  */
8922 char pthread_create();
8923
8924 int main() {
8925 pthread_create()
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   eval "ac_cv_lib_$ac_lib_var=yes"
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=no"
8936 fi
8937 rm -f conftest*
8938 LIBS="$ac_save_LIBS"
8939
8940 fi
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943   PTHREAD_LIB="-lpthreads"
8944 else
8945   echo "$ac_t""no" 1>&6
8946 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
8947 echo "configure:8948: checking for pthread_create in -lc_r" >&5
8948 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
8949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8950   echo $ac_n "(cached) $ac_c" 1>&6
8951 else
8952   ac_save_LIBS="$LIBS"
8953 LIBS="-lc_r  $LIBS"
8954 cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 /* Override any gcc2 internal prototype to avoid an error.  */
8958 /* We use char because int might match the return type of a gcc2
8959     builtin and then its argument prototype would still apply.  */
8960 char pthread_create();
8961
8962 int main() {
8963 pthread_create()
8964 ; return 0; }
8965 EOF
8966 if { (eval echo configure:8967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8967   rm -rf conftest*
8968   eval "ac_cv_lib_$ac_lib_var=yes"
8969 else
8970   echo "configure: failed program was:" >&5
8971   cat conftest.$ac_ext >&5
8972   rm -rf conftest*
8973   eval "ac_cv_lib_$ac_lib_var=no"
8974 fi
8975 rm -f conftest*
8976 LIBS="$ac_save_LIBS"
8977
8978 fi
8979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8980   echo "$ac_t""yes" 1>&6
8981   PTHREAD_LIB="-lc_r"
8982 else
8983   echo "$ac_t""no" 1>&6
8984 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
8985 echo "configure:8986: checking for pthread_create" >&5
8986 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
8987   echo $ac_n "(cached) $ac_c" 1>&6
8988 else
8989   cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* System header to define __stub macros and hopefully few prototypes,
8993     which can conflict with char pthread_create(); below.  */
8994 #include <assert.h>
8995 /* Override any gcc2 internal prototype to avoid an error.  */
8996 /* We use char because int might match the return type of a gcc2
8997     builtin and then its argument prototype would still apply.  */
8998 char pthread_create();
8999
9000 int main() {
9001
9002 /* The GNU C library defines this for functions which it implements
9003     to always fail with ENOSYS.  Some functions are actually named
9004     something starting with __ and the normal name is an alias.  */
9005 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
9006 choke me
9007 #else
9008 pthread_create();
9009 #endif
9010
9011 ; return 0; }
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9014   rm -rf conftest*
9015   eval "ac_cv_func_pthread_create=yes"
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -rf conftest*
9020   eval "ac_cv_func_pthread_create=no"
9021 fi
9022 rm -f conftest*
9023 fi
9024
9025 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
9026   echo "$ac_t""yes" 1>&6
9027   :
9028 else
9029   echo "$ac_t""no" 1>&6
9030 fi
9031
9032             
9033 fi
9034
9035         
9036 fi
9037
9038
9039 fi
9040
9041
9042
9043 cat >> confdefs.h <<\EOF
9044 #define FDLIBS 1
9045 EOF
9046
9047
9048
9049 CFLAGS=${CFLAGS--O}
9050 LDFLAGS=${LDFLAGS--O}
9051 DB_LIBS="${SQL_LFLAGS}"
9052
9053 CPPFLAGS="$CPPFLAGS"
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066 OBJLIST=
9067
9068
9069 lld="lld"
9070 llu="llu"
9071
9072 #
9073 # Finally we set appropriate distribution specific
9074 #  variables and defaults
9075 #
9076 # PFILES are platform specific files
9077 PFILES="platforms/Makefile"
9078 PSCMD="ps -e"
9079 WIN32=
9080 hostname=`hostname`
9081 case "$DISTNAME" in
9082 alpha)
9083         DISTVER=`uname -r`
9084         PTHREAD_LIB="-lpthread -lexc"
9085         if test "${CC}" = "gcc" ; then
9086            lld="lld"
9087            llu="llu"
9088         else
9089            lld="ld"
9090            llu="lu"
9091         fi
9092         TAPEDRIVE="/dev/nrmt0"
9093   ;;
9094 bsdi)
9095         DISTVER=`uname -a |awk '{print $3}'`
9096         TAPEDRIVE="/dev/nrst0"
9097   ;;
9098 caldera)
9099         DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
9100         TAPEDRIVE="/dev/nrst0"
9101         PSCMD="ps -e -o pid,command"
9102         hostname=`hostname -s`
9103   ;;
9104 cygwin)
9105         DISTVER=`uname -a |awk '{print $3}'`
9106         TAPEDRIVE="/dev/nrst0"
9107         WIN32=win32
9108         CFLAGS="${CFLAGS} -mwindows"
9109         LDFLAGS="${LDFLAGS} -mwindows"
9110   ;;
9111 debian)
9112         DISTVER=`cat /etc/debian_version`
9113         TAPEDRIVE="/dev/nrst0"
9114         PSCMD="ps -e -o pid,command"
9115         hostname=`hostname -s`
9116   ;;
9117 freebsd)
9118         DISTVER=`uname -a |awk '{print $3}'`
9119         PTHREAD_LIB="-pthread"
9120         CFLAGS="${CFLAGS} -pthread"
9121         lld="qd"
9122         llu="qu"
9123         TAPEDRIVE="/dev/nrst0"
9124         PSCMD="ps -x -o pid,command"
9125         PFILES="${PFILES} \
9126             platforms/freebsd/Makefile \
9127             platforms/freebsd/bacula-fd \
9128             platforms/freebsd/bacula-sd \
9129             platforms/freebsd/bacula-dir"
9130         hostname=`hostname -s`
9131         largefile_support="yes"
9132   ;;
9133 hpux)
9134         DISTVER=`uname -r`
9135         TAPEDRIVE="/dev/rmt/0hnb"
9136   ;;
9137 irix)
9138         DISTVER=`uname -r`
9139         TAPEDRIVE="/dev/rmt/0cbn"
9140         PSCMD="ps -e -o pid,comm"
9141         hostname=`/usr/bsd/hostname -s`
9142         PFILES="${PFILES} \
9143             platforms/irix/Makefile \
9144             platforms/irix/bacula-fd \
9145             platforms/irix/bacula-sd \
9146             platforms/irix/bacula-dir"
9147   ;;
9148 netbsd)
9149         DISTVER=`uname -a |awk '{print $3}'`
9150         lld="qd"
9151         llu="qu"
9152         TAPEDRIVE="/dev/nrst0"
9153         PSCMD="ps -a -o pid,command"
9154         PTHREAD_LIB="-pthread"
9155         CFLAGS="${CFLAGS} -pthread"
9156   ;;
9157 openbsd)
9158         DISTVER=`uname -a |awk '{print $3}'`
9159         lld="qd"
9160         llu="qu"
9161         TAPEDRIVE="/dev/nrst0"
9162         PSCMD="ps -a -o pid,command"
9163         PTHREAD_LIB="-pthread"
9164         CFLAGS="${CFLAGS} -pthread"
9165         PFILES="${PFILES} \
9166             platforms/openbsd/Makefile \
9167             platforms/openbsd/bacula-fd \
9168             platforms/openbsd/bacula-sd \
9169             platforms/openbsd/bacula-dir"
9170   ;;
9171 redhat)
9172         DISTVER=`cat /etc/redhat-release | grep release |\
9173                                 cut -f 5 -d ' '`
9174         TAPEDRIVE="/dev/nst0"
9175         PSCMD="ps -e -o pid,command"
9176         PFILES="${PFILES} \
9177             platforms/redhat/Makefile \
9178             platforms/redhat/bacula-fd \
9179             platforms/redhat/bacula-sd \
9180             platforms/redhat/bacula-dir"
9181         hostname=`hostname -s`
9182   ;;
9183 slackware)
9184         DISTVER=`cat /etc/slackware-version`
9185         TAPEDRIVE="/dev/nst0"
9186         PSCMD="ps -e -o pid,command"
9187         hostname=`hostname -s`
9188   ;;
9189 solaris)
9190         DISTVER=Solaris
9191         TAPEDRIVE="/dev/rmt/0cbn"
9192         PSCMD="ps -e -o pid,comm"
9193         PFILES="${PFILES} \
9194             platforms/solaris/Makefile \
9195             platforms/solaris/bacula-fd \
9196             platforms/solaris/bacula-sd \
9197             platforms/solaris/bacula-dir"
9198   ;;
9199 suse)
9200         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
9201                                 cut -f 3 -d ' '`
9202         TAPEDRIVE="/dev/nst0"
9203         PSCMD="ps -e -o pid,command"
9204         hostname=`hostname -s`
9205   ;;
9206 suse5)
9207         DISTNAME=suse
9208         DISTVER=5.x
9209         TAPEDRIVE="/dev/nst0"
9210         PSCMD="ps -e -o pid,command"
9211         hostname=`hostname -s`
9212   ;;
9213 unknown)
9214         DISTVER=unknown
9215         TAPEDRIVE="/dev/nst0"
9216   ;;
9217 *)
9218   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
9219   ;;
9220 esac  
9221
9222
9223
9224
9225 LIBS="$PTHREAD_LIB $LIBS"
9226
9227 cat >> confdefs.h <<EOF
9228 #define lld "$lld"
9229 EOF
9230
9231 cat >> confdefs.h <<EOF
9232 #define llu "$llu"
9233 EOF
9234
9235
9236
9237
9238
9239
9240
9241
9242 MCOMMON=./autoconf/Make.common
9243
9244
9245 trap '' 1 2 15
9246 cat > confcache <<\EOF
9247 # This file is a shell script that caches the results of configure
9248 # tests run on this system so they can be shared between configure
9249 # scripts and configure runs.  It is not useful on other systems.
9250 # If it contains results you don't want to keep, you may remove or edit it.
9251 #
9252 # By default, configure uses ./config.cache as the cache file,
9253 # creating it if it does not exist already.  You can give configure
9254 # the --cache-file=FILE option to use a different cache file; that is
9255 # what configure does when it calls configure scripts in
9256 # subdirectories, so they share the cache.
9257 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9258 # config.status only pays attention to the cache file if you give it the
9259 # --recheck option to rerun configure.
9260 #
9261 EOF
9262 # The following way of writing the cache mishandles newlines in values,
9263 # but we know of no workaround that is simple, portable, and efficient.
9264 # So, don't put newlines in cache variables' values.
9265 # Ultrix sh set writes to stderr and can't be redirected directly,
9266 # and sets the high bit in the cache file unless we assign to the vars.
9267 (set) 2>&1 |
9268   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9269   *ac_space=\ *)
9270     # `set' does not quote correctly, so add quotes (double-quote substitution
9271     # turns \\\\ into \\, and sed turns \\ into \).
9272     sed -n \
9273       -e "s/'/'\\\\''/g" \
9274       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9275     ;;
9276   *)
9277     # `set' quotes correctly as required by POSIX, so do not add quotes.
9278     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9279     ;;
9280   esac >> confcache
9281 if cmp -s $cache_file confcache; then
9282   :
9283 else
9284   if test -w $cache_file; then
9285     echo "updating cache $cache_file"
9286     cat confcache > $cache_file
9287   else
9288     echo "not updating unwritable cache $cache_file"
9289   fi
9290 fi
9291 rm -f confcache
9292
9293 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9294
9295 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9296 # Let make expand exec_prefix.
9297 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9298
9299 # Any assignment to VPATH causes Sun make to only execute
9300 # the first set of double-colon rules, so remove it if not needed.
9301 # If there is a colon in the path, we need to keep it.
9302 if test "x$srcdir" = x.; then
9303   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9304 fi
9305
9306 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9307
9308 DEFS=-DHAVE_CONFIG_H
9309
9310 # Without the "./", some shells look in PATH for config.status.
9311 : ${CONFIG_STATUS=./config.status}
9312
9313 echo creating $CONFIG_STATUS
9314 rm -f $CONFIG_STATUS
9315 cat > $CONFIG_STATUS <<EOF
9316 #! /bin/sh
9317 # Generated automatically by configure.
9318 # Run this file to recreate the current configuration.
9319 # This directory was configured as follows,
9320 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9321 #
9322 # $0 $ac_configure_args
9323 #
9324 # Compiler output produced by configure, useful for debugging
9325 # configure, is in ./config.log if it exists.
9326
9327 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9328 for ac_option
9329 do
9330   case "\$ac_option" in
9331   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9332     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9333     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9334   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9335     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9336     exit 0 ;;
9337   -help | --help | --hel | --he | --h)
9338     echo "\$ac_cs_usage"; exit 0 ;;
9339   *) echo "\$ac_cs_usage"; exit 1 ;;
9340   esac
9341 done
9342
9343 ac_given_srcdir=$srcdir
9344 ac_given_INSTALL="$INSTALL"
9345
9346 trap 'rm -fr `echo "autoconf/Make.common \
9347            Makefile \
9348            scripts/startmysql \
9349            scripts/stopmysql \
9350            scripts/btraceback \
9351            scripts/startit \
9352            scripts/stopit \
9353            scripts/console \
9354            scripts/gconsole \
9355            scripts/bacula \
9356            scripts/fd \
9357            scripts/Makefile \
9358            doc/Makefile \
9359            src/Makefile \
9360            src/console/Makefile \
9361            src/console/console.conf \
9362            src/gnome-console/Makefile \
9363            src/gnome-console/gnome-console.conf \
9364            src/dird/Makefile \
9365            src/dird/bacula-dir.conf \
9366            src/lib/Makefile \
9367            src/stored/Makefile \
9368            src/stored/bacula-sd.conf \
9369            src/filed/Makefile \
9370            src/filed/host.h \
9371            src/filed/bacula-fd.conf \
9372            src/filed/win32/Makefile \
9373            src/cats/Makefile \
9374            src/cats/alter_mysql_tables \
9375            src/cats/make_mysql_tables \
9376            src/cats/drop_mysql_tables \
9377            src/cats/create_mysql_database \
9378            src/cats/grant_mysql_privileges \
9379            src/cats/alter_sqlite_tables \
9380            src/cats/make_sqlite_tables \
9381            src/cats/drop_sqlite_tables \
9382            src/cats/create_sqlite_database \
9383            src/cats/sqlite \
9384            src/cats/mysql \
9385            src/cats/create_bdb_database \
9386            src/cats/make_bdb_tables \
9387            src/cats/drop_bdb_tables \
9388            src/cats/make_bacula_tables \
9389            src/cats/drop_bacula_tables \
9390            src/findlib/Makefile \
9391            src/tools/Makefile \
9392            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9393 EOF
9394 cat >> $CONFIG_STATUS <<EOF
9395
9396 # Protect against being on the right side of a sed subst in config.status.
9397 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9398  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9399 $ac_vpsub
9400 $extrasub
9401 s%@SHELL@%$SHELL%g
9402 s%@CFLAGS@%$CFLAGS%g
9403 s%@CPPFLAGS@%$CPPFLAGS%g
9404 s%@CXXFLAGS@%$CXXFLAGS%g
9405 s%@FFLAGS@%$FFLAGS%g
9406 s%@DEFS@%$DEFS%g
9407 s%@LDFLAGS@%$LDFLAGS%g
9408 s%@LIBS@%$LIBS%g
9409 s%@exec_prefix@%$exec_prefix%g
9410 s%@prefix@%$prefix%g
9411 s%@program_transform_name@%$program_transform_name%g
9412 s%@bindir@%$bindir%g
9413 s%@sbindir@%$sbindir%g
9414 s%@libexecdir@%$libexecdir%g
9415 s%@datadir@%$datadir%g
9416 s%@sysconfdir@%$sysconfdir%g
9417 s%@sharedstatedir@%$sharedstatedir%g
9418 s%@localstatedir@%$localstatedir%g
9419 s%@libdir@%$libdir%g
9420 s%@includedir@%$includedir%g
9421 s%@oldincludedir@%$oldincludedir%g
9422 s%@infodir@%$infodir%g
9423 s%@mandir@%$mandir%g
9424 s%@BUILD_DIR@%$BUILD_DIR%g
9425 s%@TRUEPRG@%$TRUEPRG%g
9426 s%@FALSEPRG@%$FALSEPRG%g
9427 s%@host@%$host%g
9428 s%@host_alias@%$host_alias%g
9429 s%@host_cpu@%$host_cpu%g
9430 s%@host_vendor@%$host_vendor%g
9431 s%@host_os@%$host_os%g
9432 s%@VERSION@%$VERSION%g
9433 s%@DATE@%$DATE%g
9434 s%@LSMDATE@%$LSMDATE%g
9435 s%@CC@%$CC%g
9436 s%@CXX@%$CXX%g
9437 s%@CPP@%$CPP%g
9438 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9439 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9440 s%@INSTALL_DATA@%$INSTALL_DATA%g
9441 s%@RANLIB@%$RANLIB%g
9442 s%@MV@%$MV%g
9443 s%@RM@%$RM%g
9444 s%@CP@%$CP%g
9445 s%@SED@%$SED%g
9446 s%@AWK@%$AWK%g
9447 s%@ECHO@%$ECHO%g
9448 s%@CMP@%$CMP%g
9449 s%@TBL@%$TBL%g
9450 s%@AR@%$AR%g
9451 s%@OPENSSL@%$OPENSSL%g
9452 s%@ARFLAGS@%$ARFLAGS%g
9453 s%@MAKE_SHELL@%$MAKE_SHELL%g
9454 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
9455 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
9456 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
9457 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
9458 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
9459 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
9460 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
9461 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
9462 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
9463 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
9464 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
9465 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
9466 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
9467 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
9468 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
9469 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
9470 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
9471 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
9472 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
9473 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
9474 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
9475 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
9476 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
9477 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
9478 s%@HAVE_IRIX_OS_TRUE@%$HAVE_IRIX_OS_TRUE%g
9479 s%@HAVE_IRIX_OS_FALSE@%$HAVE_IRIX_OS_FALSE%g
9480 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
9481 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
9482 s%@MSGFMT@%$MSGFMT%g
9483 s%@GNOME_LIBS@%$GNOME_LIBS%g
9484 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
9485 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
9486 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
9487 s%@ZVT_LIBS@%$ZVT_LIBS%g
9488 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9489 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9490 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9491 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
9492 s%@ORBIT_IDL@%$ORBIT_IDL%g
9493 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
9494 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
9495 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
9496 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
9497 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
9498 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
9499 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
9500 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
9501 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
9502 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
9503 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
9504 s%@GNOME_DIR@%$GNOME_DIR%g
9505 s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
9506 s%@CONS_INC@%$CONS_INC%g
9507 s%@CONS_LIBS@%$CONS_LIBS%g
9508 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
9509 s%@READLINE_SRC@%$READLINE_SRC%g
9510 s%@working_dir@%$working_dir%g
9511 s%@dump_email@%$dump_email%g
9512 s%@job_email@%$job_email%g
9513 s%@smtp_host@%$smtp_host%g
9514 s%@piddir@%$piddir%g
9515 s%@subsysdir@%$subsysdir%g
9516 s%@baseport@%$baseport%g
9517 s%@dir_port@%$dir_port%g
9518 s%@fd_port@%$fd_port%g
9519 s%@sd_port@%$sd_port%g
9520 s%@dir_password@%$dir_password%g
9521 s%@fd_password@%$fd_password%g
9522 s%@sd_password@%$sd_password%g
9523 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
9524 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
9525 s%@SQL_BINDIR@%$SQL_BINDIR%g
9526 s%@cats@%$cats%g
9527 s%@DB_NAME@%$DB_NAME%g
9528 s%@EXEEXT@%$EXEEXT%g
9529 s%@build@%$build%g
9530 s%@build_alias@%$build_alias%g
9531 s%@build_cpu@%$build_cpu%g
9532 s%@build_vendor@%$build_vendor%g
9533 s%@build_os@%$build_os%g
9534 s%@GETCONF@%$GETCONF%g
9535 s%@X_CFLAGS@%$X_CFLAGS%g
9536 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9537 s%@X_LIBS@%$X_LIBS%g
9538 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9539 s%@LIBOBJS@%$LIBOBJS%g
9540 s%@ALLOCA@%$ALLOCA%g
9541 s%@FDLIBS@%$FDLIBS%g
9542 s%@DEBUG@%$DEBUG%g
9543 s%@DINCLUDE@%$DINCLUDE%g
9544 s%@DLIB@%$DLIB%g
9545 s%@DB_LIBS@%$DB_LIBS%g
9546 s%@OBJLIST@%$OBJLIST%g
9547 s%@hostname@%$hostname%g
9548 s%@TAPEDRIVE@%$TAPEDRIVE%g
9549 s%@PSCMD@%$PSCMD%g
9550 s%@WIN32@%$WIN32%g
9551 s%@DISTNAME@%$DISTNAME%g
9552 s%@DISTVER@%$DISTVER%g
9553 /@MCOMMON@/r $MCOMMON
9554 s%@MCOMMON@%%g
9555
9556 CEOF
9557 EOF
9558
9559 cat >> $CONFIG_STATUS <<\EOF
9560
9561 # Split the substitutions into bite-sized pieces for seds with
9562 # small command number limits, like on Digital OSF/1 and HP-UX.
9563 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9564 ac_file=1 # Number of current file.
9565 ac_beg=1 # First line for current file.
9566 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9567 ac_more_lines=:
9568 ac_sed_cmds=""
9569 while $ac_more_lines; do
9570   if test $ac_beg -gt 1; then
9571     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9572   else
9573     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9574   fi
9575   if test ! -s conftest.s$ac_file; then
9576     ac_more_lines=false
9577     rm -f conftest.s$ac_file
9578   else
9579     if test -z "$ac_sed_cmds"; then
9580       ac_sed_cmds="sed -f conftest.s$ac_file"
9581     else
9582       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9583     fi
9584     ac_file=`expr $ac_file + 1`
9585     ac_beg=$ac_end
9586     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9587   fi
9588 done
9589 if test -z "$ac_sed_cmds"; then
9590   ac_sed_cmds=cat
9591 fi
9592 EOF
9593
9594 cat >> $CONFIG_STATUS <<EOF
9595
9596 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
9597            Makefile \
9598            scripts/startmysql \
9599            scripts/stopmysql \
9600            scripts/btraceback \
9601            scripts/startit \
9602            scripts/stopit \
9603            scripts/console \
9604            scripts/gconsole \
9605            scripts/bacula \
9606            scripts/fd \
9607            scripts/Makefile \
9608            doc/Makefile \
9609            src/Makefile \
9610            src/console/Makefile \
9611            src/console/console.conf \
9612            src/gnome-console/Makefile \
9613            src/gnome-console/gnome-console.conf \
9614            src/dird/Makefile \
9615            src/dird/bacula-dir.conf \
9616            src/lib/Makefile \
9617            src/stored/Makefile \
9618            src/stored/bacula-sd.conf \
9619            src/filed/Makefile \
9620            src/filed/host.h \
9621            src/filed/bacula-fd.conf \
9622            src/filed/win32/Makefile \
9623            src/cats/Makefile \
9624            src/cats/alter_mysql_tables \
9625            src/cats/make_mysql_tables \
9626            src/cats/drop_mysql_tables \
9627            src/cats/create_mysql_database \
9628            src/cats/grant_mysql_privileges \
9629            src/cats/alter_sqlite_tables \
9630            src/cats/make_sqlite_tables \
9631            src/cats/drop_sqlite_tables \
9632            src/cats/create_sqlite_database \
9633            src/cats/sqlite \
9634            src/cats/mysql \
9635            src/cats/create_bdb_database \
9636            src/cats/make_bdb_tables \
9637            src/cats/drop_bdb_tables \
9638            src/cats/make_bacula_tables \
9639            src/cats/drop_bacula_tables \
9640            src/findlib/Makefile \
9641            src/tools/Makefile \
9642            $PFILES "}
9643 EOF
9644 cat >> $CONFIG_STATUS <<\EOF
9645 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9646   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9647   case "$ac_file" in
9648   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9649        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9650   *) ac_file_in="${ac_file}.in" ;;
9651   esac
9652
9653   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9654
9655   # Remove last slash and all that follows it.  Not all systems have dirname.
9656   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9657   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9658     # The file is in a subdirectory.
9659     test ! -d "$ac_dir" && mkdir "$ac_dir"
9660     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9661     # A "../" for each directory in $ac_dir_suffix.
9662     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9663   else
9664     ac_dir_suffix= ac_dots=
9665   fi
9666
9667   case "$ac_given_srcdir" in
9668   .)  srcdir=.
9669       if test -z "$ac_dots"; then top_srcdir=.
9670       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9671   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9672   *) # Relative path.
9673     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9674     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9675   esac
9676
9677   case "$ac_given_INSTALL" in
9678   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9679   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9680   esac
9681
9682   echo creating "$ac_file"
9683   rm -f "$ac_file"
9684   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9685   case "$ac_file" in
9686   *Makefile*) ac_comsub="1i\\
9687 # $configure_input" ;;
9688   *) ac_comsub= ;;
9689   esac
9690
9691   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9692   sed -e "$ac_comsub
9693 s%@configure_input@%$configure_input%g
9694 s%@srcdir@%$srcdir%g
9695 s%@top_srcdir@%$top_srcdir%g
9696 s%@INSTALL@%$INSTALL%g
9697 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9698 fi; done
9699 rm -f conftest.s*
9700
9701 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9702 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9703 #
9704 # ac_d sets the value in "#define NAME VALUE" lines.
9705 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9706 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9707 ac_dC='\3'
9708 ac_dD='%g'
9709 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9710 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9711 ac_uB='\([      ]\)%\1#\2define\3'
9712 ac_uC=' '
9713 ac_uD='\4%g'
9714 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9715 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9716 ac_eB='$%\1#\2define\3'
9717 ac_eC=' '
9718 ac_eD='%g'
9719
9720 if test "${CONFIG_HEADERS+set}" != set; then
9721 EOF
9722 cat >> $CONFIG_STATUS <<EOF
9723   CONFIG_HEADERS="src/config.h:autoconf/config.h.in"
9724 EOF
9725 cat >> $CONFIG_STATUS <<\EOF
9726 fi
9727 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9728   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9729   case "$ac_file" in
9730   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9731        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9732   *) ac_file_in="${ac_file}.in" ;;
9733   esac
9734
9735   echo creating $ac_file
9736
9737   rm -f conftest.frag conftest.in conftest.out
9738   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9739   cat $ac_file_inputs > conftest.in
9740
9741 EOF
9742
9743 # Transform confdefs.h into a sed script conftest.vals that substitutes
9744 # the proper values into config.h.in to produce config.h.  And first:
9745 # Protect against being on the right side of a sed subst in config.status.
9746 # Protect against being in an unquoted here document in config.status.
9747 rm -f conftest.vals
9748 cat > conftest.hdr <<\EOF
9749 s/[\\&%]/\\&/g
9750 s%[\\$`]%\\&%g
9751 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9752 s%ac_d%ac_u%gp
9753 s%ac_u%ac_e%gp
9754 EOF
9755 sed -n -f conftest.hdr confdefs.h > conftest.vals
9756 rm -f conftest.hdr
9757
9758 # This sed command replaces #undef with comments.  This is necessary, for
9759 # example, in the case of _POSIX_SOURCE, which is predefined and required
9760 # on some systems where configure will not decide to define it.
9761 cat >> conftest.vals <<\EOF
9762 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9763 EOF
9764
9765 # Break up conftest.vals because some shells have a limit on
9766 # the size of here documents, and old seds have small limits too.
9767
9768 rm -f conftest.tail
9769 while :
9770 do
9771   ac_lines=`grep -c . conftest.vals`
9772   # grep -c gives empty output for an empty file on some AIX systems.
9773   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9774   # Write a limited-size here document to conftest.frag.
9775   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9776   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9777   echo 'CEOF
9778   sed -f conftest.frag conftest.in > conftest.out
9779   rm -f conftest.in
9780   mv conftest.out conftest.in
9781 ' >> $CONFIG_STATUS
9782   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9783   rm -f conftest.vals
9784   mv conftest.tail conftest.vals
9785 done
9786 rm -f conftest.vals
9787
9788 cat >> $CONFIG_STATUS <<\EOF
9789   rm -f conftest.frag conftest.h
9790   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9791   cat conftest.in >> conftest.h
9792   rm -f conftest.in
9793   if cmp -s $ac_file conftest.h 2>/dev/null; then
9794     echo "$ac_file is unchanged"
9795     rm -f conftest.h
9796   else
9797     # Remove last slash and all that follows it.  Not all systems have dirname.
9798       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9799       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9800       # The file is in a subdirectory.
9801       test ! -d "$ac_dir" && mkdir "$ac_dir"
9802     fi
9803     rm -f $ac_file
9804     mv conftest.h $ac_file
9805   fi
9806 fi; done
9807
9808 EOF
9809 cat >> $CONFIG_STATUS <<EOF
9810
9811 EOF
9812 cat >> $CONFIG_STATUS <<\EOF
9813 (echo "Doing make of dependencies"; make depend;) 
9814
9815 exit 0
9816 EOF
9817 chmod +x $CONFIG_STATUS
9818 rm -fr confdefs* $ac_clean_files
9819 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9820
9821
9822 cd scripts
9823 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
9824 chmod 755 console gconsole
9825 cd ..
9826 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
9827 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
9828 chmod 755 src/cats/create_mysql_database 
9829 chmod 755 src/cats/alter_mysql_tables
9830 chmod 755 src/cats/grant_mysql_privileges
9831 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables 
9832 chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables 
9833 chmod 755 src/cats/create_sqlite_database
9834 chmod 755 src/cats/alter_sqlite_tables
9835 chmod 755 src/cats/sqlite
9836 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables 
9837 chmod 755 src/cats/create_bdb_database
9838
9839 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
9840    largefile_support="yes"
9841 fi
9842
9843
9844 echo "
9845 Configuration on `date`:
9846
9847   Host:                       $host -- ${DISTNAME} ${DISTVER}
9848   Bacula version:             ${VERSION} (${DATE})
9849   Source code location:       ${srcdir}
9850   Install binaries:           ${sbindir}
9851   Install config files:       ${sysconfdir}
9852   C Compiler:                 ${CC}
9853   C++ Compiler:               ${CXX}
9854   Compiler flags:             ${CFLAGS} 
9855   Linker flags:               ${LDFLAGS}
9856   Libraries:                  ${LIBS}
9857   Statically Linked Tools:    ${support_static_tools}
9858   Database type:              ${db_name}
9859   Database lib:               ${DB_LIBS}
9860
9861   Job Output Email:           ${job_email}
9862   Traceback Email:            ${dump_email}
9863   SMTP Host Address:          ${smtp_host}
9864   Director Port               ${dir_port}
9865   File daemon Port            ${fd_port}
9866   Storage daemon Port         ${sd_port}
9867   Working directory           ${working_dir}
9868   SQL binaries Directory      ${SQL_BINDIR}
9869
9870   Large file support:         $largefile_support
9871   readline support:           ${got_readline} ${PRTREADLINE_SRC}
9872   TCP Wrappers support:       ${TCPW_MSG}
9873   ZLIB support:               ${have_zlib}
9874   enable-smartalloc:          ${support_smartalloc} 
9875   enable-gnome:               ${support_gnome}
9876
9877   " > config.out
9878
9879 cat config.out
9880
9881 # old stuff
9882 # cweb support:               ${got_cweb} ${CWEB_SRC}
9883 # gmp support:                ${got_gmp} ${GMP_SRC}
9884