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