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