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