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