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