]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
2707774c10328ef616cc6dcba4c37069e753ac7e
[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"
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"
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"
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                 termcap.h termio.h 
3107 do
3108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3110 echo "configure:3111: checking for $ac_hdr" >&5
3111 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   cat > conftest.$ac_ext <<EOF
3115 #line 3116 "configure"
3116 #include "confdefs.h"
3117 #include <$ac_hdr>
3118 EOF
3119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3120 { (eval echo configure:3121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3122 if test -z "$ac_err"; then
3123   rm -rf conftest*
3124   eval "ac_cv_header_$ac_safe=yes"
3125 else
3126   echo "$ac_err" >&5
3127   echo "configure: failed program was:" >&5
3128   cat conftest.$ac_ext >&5
3129   rm -rf conftest*
3130   eval "ac_cv_header_$ac_safe=no"
3131 fi
3132 rm -f conftest*
3133 fi
3134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3135   echo "$ac_t""yes" 1>&6
3136     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3137   cat >> confdefs.h <<EOF
3138 #define $ac_tr_hdr 1
3139 EOF
3140  
3141 else
3142   echo "$ac_t""no" 1>&6
3143 fi
3144 done
3145
3146
3147 TERMCAP_LIB=-ltermcap
3148
3149
3150
3151 # End of readline stuff
3152 # -----------------------------------------------------------------------
3153
3154
3155 # ---------------------------------------------------
3156 # Check for GMP support/directory
3157 # ---------------------------------------------------
3158 GMP_SRC=
3159 local_gmp="no"
3160 # Check whether --with-gmp or --without-gmp was given.
3161 if test "${with_gmp+set}" = set; then
3162   withval="$with_gmp"
3163   
3164      case "$with_gmp" in
3165      no) : ;;
3166      yes|*)
3167        if test "$with_gmp" != "yes"; then
3168          GMP_INC="-I$with_gmp"
3169          GMP_LIBS="-lgmp"
3170          GMP_LDFLAGS="-L$with_gmp"
3171        else
3172           with_gmp="/usr/include" 
3173        fi
3174        ac_safe=`echo "$with_gmp/gmp.h" | sed 'y%./+-%__p_%'`
3175 echo $ac_n "checking for $with_gmp/gmp.h""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $with_gmp/gmp.h" >&5
3177 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 #include <$with_gmp/gmp.h>
3184 EOF
3185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3186 { (eval echo configure:3187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3188 if test -z "$ac_err"; then
3189   rm -rf conftest*
3190   eval "ac_cv_header_$ac_safe=yes"
3191 else
3192   echo "$ac_err" >&5
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195   rm -rf conftest*
3196   eval "ac_cv_header_$ac_safe=no"
3197 fi
3198 rm -f conftest*
3199 fi
3200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3201   echo "$ac_t""yes" 1>&6
3202    echo "$ac_t""yes" 1>&6
3203             cat >> confdefs.h <<\EOF
3204 #define HAVE_GMP 1
3205 EOF
3206  
3207             GMP_LIBS="-lgmp"
3208             got_gmp="yes"   
3209           
3210 else
3211   echo "$ac_t""no" 1>&6
3212  { echo "configure: error: *** gmp library missing" 1>&2; exit 1; } 
3213           
3214        
3215 fi
3216
3217        ;;
3218      esac
3219   
3220 else
3221   
3222     # check for standard gmp library
3223     ac_safe=`echo "/usr/include/gmp.h" | sed 'y%./+-%__p_%'`
3224 echo $ac_n "checking for /usr/include/gmp.h""... $ac_c" 1>&6
3225 echo "configure:3226: checking for /usr/include/gmp.h" >&5
3226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 #include </usr/include/gmp.h>
3233 EOF
3234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3235 { (eval echo configure:3236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3237 if test -z "$ac_err"; then
3238   rm -rf conftest*
3239   eval "ac_cv_header_$ac_safe=yes"
3240 else
3241   echo "$ac_err" >&5
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   eval "ac_cv_header_$ac_safe=no"
3246 fi
3247 rm -f conftest*
3248 fi
3249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3250   echo "$ac_t""yes" 1>&6
3251    echo "$ac_t""yes" 1>&6
3252       cat >> confdefs.h <<\EOF
3253 #define HAVE_GMP 1
3254 EOF
3255
3256       got_gmp="yes"
3257       GMP_INC=
3258       GMP_LIBS="-lgmp"
3259     
3260 else
3261   echo "$ac_t""no" 1>&6
3262
3263       # Did not find standard library, so use our own
3264       echo "$ac_t""yes" 1>&6
3265       cat >> confdefs.h <<\EOF
3266 #define HAVE_GMP 1
3267 EOF
3268
3269       got_gmp="yes"
3270       local_gmp="yes"
3271       GMP_INC="-I${TOP_DIR}/depkgs/gmp"
3272       GMP_LIBS="-lgmp"
3273       GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
3274       GMP_SRC="${TOP_DIR}/depkgs/gmp"
3275     
3276 fi
3277
3278      
3279
3280 fi
3281
3282
3283
3284
3285
3286
3287 # End of GMP stuff
3288 # -----------------------------------------------------------------------
3289
3290
3291 # ---------------------------------------------------
3292 # Check for CWEB support/directory
3293 # ---------------------------------------------------
3294 CWEB_SRC=
3295 local_cweb="no"
3296 # Check whether --with-cweb or --without-cweb was given.
3297 if test "${with_cweb+set}" = set; then
3298   withval="$with_cweb"
3299   
3300      case "$with_cweb" in
3301      no) : ;;
3302      yes|*)
3303        if test "$with_cweb" != "yes"; then
3304          CWEB_INC="-I$with_cweb"
3305          CWEB_LIBS="-lcweb"
3306          CWEB_LDFLAGS="-L$with_cweb"
3307        else
3308           with_cweb="/usr/include" 
3309        fi
3310        ac_safe=`echo "$with_cweb/cweb.h" | sed 'y%./+-%__p_%'`
3311 echo $ac_n "checking for $with_cweb/cweb.h""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $with_cweb/cweb.h" >&5
3313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 #include <$with_cweb/cweb.h>
3320 EOF
3321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3322 { (eval echo configure:3323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3324 if test -z "$ac_err"; then
3325   rm -rf conftest*
3326   eval "ac_cv_header_$ac_safe=yes"
3327 else
3328   echo "$ac_err" >&5
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -rf conftest*
3332   eval "ac_cv_header_$ac_safe=no"
3333 fi
3334 rm -f conftest*
3335 fi
3336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338    echo "$ac_t""yes" 1>&6
3339             cat >> confdefs.h <<\EOF
3340 #define HAVE_CWEB 1
3341 EOF
3342  
3343             CWEB_LIBS="-lcweb"
3344             got_cweb="yes"   
3345           
3346 else
3347   echo "$ac_t""no" 1>&6
3348  { echo "configure: error: *** cweb library missing" 1>&2; exit 1; } 
3349           
3350        
3351 fi
3352
3353        ;;
3354      esac
3355   
3356 else
3357   
3358     # check for standard cweb library
3359     ac_safe=`echo "/usr/include/cweb.h" | sed 'y%./+-%__p_%'`
3360 echo $ac_n "checking for /usr/include/cweb.h""... $ac_c" 1>&6
3361 echo "configure:3362: checking for /usr/include/cweb.h" >&5
3362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 #include </usr/include/cweb.h>
3369 EOF
3370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3371 { (eval echo configure:3372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3373 if test -z "$ac_err"; then
3374   rm -rf conftest*
3375   eval "ac_cv_header_$ac_safe=yes"
3376 else
3377   echo "$ac_err" >&5
3378   echo "configure: failed program was:" >&5
3379   cat conftest.$ac_ext >&5
3380   rm -rf conftest*
3381   eval "ac_cv_header_$ac_safe=no"
3382 fi
3383 rm -f conftest*
3384 fi
3385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3386   echo "$ac_t""yes" 1>&6
3387    echo "$ac_t""yes" 1>&6
3388       cat >> confdefs.h <<\EOF
3389 #define HAVE_CWEB 1
3390 EOF
3391
3392       got_cweb="yes"
3393       CWEB_INC=
3394       CWEB_LIBS="-lcweb"
3395     
3396 else
3397   echo "$ac_t""no" 1>&6
3398
3399       # Did not find starndard library, so use our own
3400       echo "$ac_t""yes" 1>&6
3401       cat >> confdefs.h <<\EOF
3402 #define HAVE_CWEB 1
3403 EOF
3404
3405       got_cweb="yes"
3406       local_cweb="yes"
3407       CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
3408       CWEB_LIBS="-lcweb"
3409       CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
3410       CWEB_SRC="${TOP_DIR}/depkgs/cweb"
3411     
3412 fi
3413
3414      
3415
3416 fi
3417
3418
3419
3420
3421
3422
3423 # End of CWEB stuff
3424 # -----------------------------------------------------------------------
3425
3426
3427
3428 # -----------------------------------------------------------
3429 # Check whether user wants TCP wrappers support (default off)
3430 # -----------------------------------------------------------
3431 TCPW_MSG="no" 
3432 # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
3433 if test "${with_tcp_wrappers+set}" = set; then
3434   withval="$with_tcp_wrappers"
3435   
3436     if test "x$withval" != "xno" ; then
3437        saved_LIBS="$LIBS"
3438        LIBS="$LIBS -lwrap -lnsl"
3439        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
3440 echo "configure:3441: checking for libwrap" >&5
3441        cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444  #include <tcpd.h>
3445              int deny_severity = 0;
3446              int allow_severity = 0;
3447              struct request_info *req; 
3448 int main() {
3449  hosts_access(req); 
3450 ; return 0; }
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3453   rm -rf conftest*
3454   
3455             echo "$ac_t""yes" 1>&6
3456             cat >> confdefs.h <<\EOF
3457 #define HAVE_LIBWRAP 1
3458 EOF
3459
3460             TCPW_MSG="yes" 
3461           
3462 else
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -rf conftest*
3466   { echo "configure: error: *** libwrap missing" 1>&2; exit 1; } 
3467        
3468 fi
3469 rm -f conftest*
3470     fi
3471   
3472
3473 fi
3474
3475
3476 # ------------------------------------------
3477 # Where to place working dir
3478 # ------------------------------------------
3479 working_dir=`eval echo ${sysconfdir}/working`
3480 # Check whether --with-working-dir or --without-working-dir was given.
3481 if test "${with_working_dir+set}" = set; then
3482   withval="$with_working_dir"
3483   
3484        if test "x$withval" != "xno" ; then     
3485               working_dir=$withval
3486        fi
3487    
3488
3489 fi
3490
3491
3492
3493
3494 # ------------------------------------------
3495 # Where to send dump email
3496 # ------------------------------------------
3497 dump_email=root
3498 # Check whether --with-dump-email or --without-dump-email was given.
3499 if test "${with_dump_email+set}" = set; then
3500   withval="$with_dump_email"
3501   
3502        if test "x$withval" != "xno" ; then     
3503               dump_email=$withval
3504        fi
3505    
3506
3507 fi
3508
3509
3510
3511
3512 # ------------------------------------------
3513 # Where to send job email
3514 # ------------------------------------------
3515 job_email=root
3516 # Check whether --with-job-email or --without-job-email was given.
3517 if test "${with_job_email+set}" = set; then
3518   withval="$with_job_email"
3519   
3520        if test "x$withval" != "xno" ; then     
3521               job_email=$withval
3522        fi
3523    
3524
3525 fi
3526
3527
3528
3529
3530 # ------------------------------------------
3531 # Where to find smtp host
3532 # ------------------------------------------
3533 smtp_host=localhost
3534 # Check whether --with-smtp_host or --without-smtp_host was given.
3535 if test "${with_smtp_host+set}" = set; then
3536   withval="$with_smtp_host"
3537   
3538        if test "x$withval" != "xno" ; then     
3539               smtp_host=$withval
3540        fi
3541    
3542
3543 fi
3544
3545
3546
3547
3548
3549 # ------------------------------------
3550 # Where to place pid files
3551 # ------------------------------------
3552 piddir=/var/run
3553 # Check whether --with-pid-dir or --without-pid-dir was given.
3554 if test "${with_pid_dir+set}" = set; then
3555   withval="$with_pid_dir"
3556   
3557         if test "x$withval" != "xno" ; then     
3558             piddir=$withval
3559         fi
3560     
3561
3562 fi
3563
3564
3565 # make sure the pid directory exists
3566 if test ! -d $piddir ; then     
3567     piddir=`eval echo ${sysconfdir}`
3568     case $piddir in
3569           NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
3570     esac
3571 fi
3572
3573 cat >> confdefs.h <<EOF
3574 #define _PATH_BACULA_PIDDIR "$piddir"
3575 EOF
3576
3577
3578
3579
3580 # ------------------------------------
3581 # Where to place subsys "lock file"
3582 # ------------------------------------
3583 subsysdir=/var/run/subsys
3584 # Check whether --with-subsys-dir or --without-subsys-dir was given.
3585 if test "${with_subsys_dir+set}" = set; then
3586   withval="$with_subsys_dir"
3587   
3588         if test "x$withval" != "xno" ; then     
3589             subsysdir=$withval
3590         fi
3591     
3592
3593 fi
3594
3595
3596 # make sure the pid directory exists
3597 if test ! -d $subsysdir ; then     
3598     subsysdir=`eval echo ${sysconfdir}`
3599     case $subsysdir in
3600         NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
3601     esac
3602 fi
3603
3604
3605
3606
3607
3608 # ------------------------------------
3609 # Where to start assigning ports
3610 # ------------------------------------
3611 baseport=9101
3612 # Check whether --with-baseport or --without-baseport was given.
3613 if test "${with_baseport+set}" = set; then
3614   withval="$with_baseport"
3615   
3616         if test "x$withval" != "xno" ; then     
3617              baseport=$withval
3618         fi
3619     
3620
3621 fi
3622
3623
3624
3625 dir_port=`expr $baseport`
3626 fd_port=`expr $baseport + 1`
3627 sd_port=`expr $fd_port + 1`
3628
3629
3630
3631
3632
3633
3634 # ------------------------------------------
3635 # Generate passwords
3636 # ------------------------------------------
3637 dir_password=
3638 # Check whether --with-dir-password or --without-dir-password was given.
3639 if test "${with_dir_password+set}" = set; then
3640   withval="$with_dir_password"
3641   
3642        if test "x$withval" != "xno" ; then     
3643            dir_password=$withval
3644        fi
3645    
3646
3647 fi
3648
3649
3650 if test "x$dir_password" = "x" ; then
3651    if test "x$OPENSSL" = "xnone" ; then
3652       key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
3653    else
3654       key=`openssl rand -base64 33`
3655    fi
3656    dir_password=$key
3657 fi
3658
3659 fd_password=
3660 # Check whether --with-fd-password or --without-fd-password was given.
3661 if test "${with_fd_password+set}" = set; then
3662   withval="$with_fd_password"
3663   
3664        if test "x$withval" != "xno" ; then     
3665            fd_password=$withval
3666        fi
3667    
3668
3669 fi
3670
3671
3672 if test "x$fd_password" = "x" ; then
3673    if test "x$OPENSSL" = "xnone" ; then
3674       key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
3675    else
3676       key=`openssl rand -base64 33`
3677    fi
3678    fd_password=$key
3679 fi
3680
3681 sd_password=
3682 # Check whether --with-sd-password or --without-sd-password was given.
3683 if test "${with_sd_password+set}" = set; then
3684   withval="$with_sd_password"
3685   
3686        if test "x$withval" != "xno" ; then     
3687            sd_password=$withval
3688        fi
3689    
3690
3691 fi
3692
3693
3694 if test "x$sd_password" = "x" ; then
3695    if test "x$OPENSSL" = "xnone" ; then
3696       key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
3697    else
3698       key=`openssl rand -base64 33`
3699    fi
3700    sd_password=$key
3701 fi
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712 # ------------------------------------------------
3713 # Bacula check for various SQL database engines
3714 # ------------------------------------------------
3715
3716 have_db=no
3717 db_name=none
3718 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
3719 echo "configure:3720: checking for MySQL support" >&5
3720 # Check whether --with-mysql or --without-mysql was given.
3721 if test "${with_mysql+set}" = set; then
3722   withval="$with_mysql"
3723   
3724   if test "$withval" != "no"; then
3725         if test "$withval" = "yes"; then
3726                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
3727                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
3728                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
3729                         MYSQL_BINDIR=/usr/local/mysql/bin
3730                 elif test -f /usr/include/mysql/mysql.h; then
3731                         MYSQL_INCDIR=/usr/include/mysql
3732                         MYSQL_LIBDIR=/usr/lib/mysql
3733                         MYSQL_BINDIR=/usr/bin      
3734                 elif test -f /usr/include/mysql.h; then
3735                         MYSQL_INCDIR=/usr/include
3736                         MYSQL_LIBDIR=/usr/lib
3737                         MYSQL_BINDIR=/usr/bin
3738                 elif test -f /usr/local/include/mysql/mysql.h; then
3739                         MYSQL_INCDIR=/usr/local/include/mysql
3740                         MYSQL_LIBDIR=/usr/local/lib/mysql
3741                         MYSQL_BINDIR=/usr/local/bin
3742                 elif test -f /usr/local/include/mysql.h; then
3743                         MYSQL_INCDIR=/usr/local/include
3744                         MYSQL_LIBDIR=/usr/local/lib
3745                         MYSQL_BINDIR=/usr/local/bin
3746                 else
3747                    echo "$ac_t""no" 1>&6
3748                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
3749                 fi
3750         else
3751                 if test -f $withval/include/mysql/mysql.h; then
3752                         MYSQL_INCDIR=$withval/include/mysql
3753                         MYSQL_LIBDIR=$withval/lib/mysql
3754                         MYSQL_BINDIR=$withval/bin
3755                 elif test -f $withval/include/mysql.h; then
3756                         MYSQL_INCDIR=$withval/include
3757                         MYSQL_LIBDIR=$withval/lib
3758                         MYSQL_BINDIR=$withval/bin
3759                 else
3760                    echo "$ac_t""no" 1>&6
3761                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
3762                 fi
3763         fi
3764     SQL_INCLUDE=-I$MYSQL_INCDIR
3765     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient"
3766     SQL_BINDIR=$MYSQL_BINDIR
3767
3768     cat >> confdefs.h <<\EOF
3769 #define HAVE_MYSQL 1
3770 EOF
3771
3772     echo "$ac_t""yes" 1>&6
3773     have_db=yes
3774     support_mysql=yes
3775     db_name=MySQL
3776
3777   else
3778         echo "$ac_t""no" 1>&6
3779   fi
3780
3781 else
3782   
3783   echo "$ac_t""no" 1>&6
3784
3785 fi
3786
3787
3788
3789
3790   
3791
3792
3793
3794 # ------------------------------------------------
3795 # Bacula check for various SQL database engines
3796 # ------------------------------------------------
3797
3798 have_db=no
3799 db_name=none
3800 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
3801 echo "configure:3802: checking for SQLite support" >&5
3802 # Check whether --with-sqlite or --without-sqlite was given.
3803 if test "${with_sqlite+set}" = set; then
3804   withval="$with_sqlite"
3805   
3806   if test "$withval" != "no"; then
3807         if test "$withval" = "yes"; then
3808                 if test -f /usr/local/include/sqlite.h; then
3809                         SQLITE_INCDIR=/usr/local/include
3810                         SQLITE_LIBDIR=/usr/local/lib
3811                         SQLITE_BINDIR=/usr/local/bin
3812                 elif test -f /usr/include/sqlite.h; then
3813                         SQLITE_INCDIR=/usr/include
3814                         SQLITE_LIBDIR=/usr/lib
3815                         SQLITE_BINDIR=/usr/bin      
3816                 else
3817                    echo "$ac_t""no" 1>&6
3818                    { echo "configure: error: Unable to find sqlite.h in standard locations" 1>&2; exit 1; }
3819                 fi
3820         else
3821                 if test -f $withval/sqlite.h; then
3822                         SQLITE_INCDIR=$withval
3823                         SQLITE_LIBDIR=$withval
3824                         SQLITE_BINDIR=$withval
3825                 else
3826                    echo "$ac_t""no" 1>&6
3827                    { echo "configure: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" 1>&2; exit 1; }
3828                 fi
3829         fi
3830     SQL_INCLUDE=-I$SQLITE_INCDIR
3831     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
3832     SQL_BINDIR=$SQLITE_BINDIR
3833
3834     cat >> confdefs.h <<\EOF
3835 #define HAVE_SQLITE 1
3836 EOF
3837
3838     echo "$ac_t""yes" 1>&6
3839     have_db=yes
3840     support_sqlite=yes
3841     db_name=SQLite
3842
3843   else
3844         echo "$ac_t""no" 1>&6
3845   fi
3846
3847 else
3848   
3849   echo "$ac_t""no" 1>&6
3850
3851 fi
3852
3853
3854
3855
3856   
3857
3858
3859
3860 cat >> confdefs.h <<\EOF
3861 #define PROTOTYPES 1
3862 EOF
3863
3864
3865 if test -z "$CFLAGS"; then
3866     if test -z "$CCOPTS"; then
3867         CCOPTS='-O'
3868     fi
3869     CFLAGS="$CCOPTS"
3870 fi
3871
3872
3873 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3874 echo "configure:3875: checking for mingw32 environment" >&5
3875 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881
3882 int main() {
3883 return __MINGW32__;
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3887   rm -rf conftest*
3888   ac_cv_mingw32=yes
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   ac_cv_mingw32=no
3894 fi
3895 rm -f conftest*
3896 rm -f conftest*
3897 fi
3898
3899 echo "$ac_t""$ac_cv_mingw32" 1>&6
3900 MINGW32=
3901 test "$ac_cv_mingw32" = yes && MINGW32=yes
3902
3903
3904 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3905 echo "configure:3906: checking for executable suffix" >&5
3906 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3910   ac_cv_exeext=.exe
3911 else
3912   rm -f conftest*
3913   echo 'int main () { return 0; }' > conftest.$ac_ext
3914   ac_cv_exeext=
3915   if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3916     for file in conftest.*; do
3917       case $file in
3918       *.c | *.o | *.obj) ;;
3919       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3920       esac
3921     done
3922   else
3923     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3924   fi
3925   rm -f conftest*
3926   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3927 fi
3928 fi
3929
3930 EXEEXT=""
3931 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3932 echo "$ac_t""${ac_cv_exeext}" 1>&6
3933 ac_exeext=$EXEEXT
3934
3935   
3936
3937
3938 # If we find X, set shell vars x_includes and x_libraries to the
3939 # paths, otherwise set no_x=yes.
3940 # Uses ac_ vars as temps to allow command line to override cache and checks.
3941 # --without-x overrides everything else, but does not touch the cache.
3942 echo $ac_n "checking for X""... $ac_c" 1>&6
3943 echo "configure:3944: checking for X" >&5
3944
3945 # Check whether --with-x or --without-x was given.
3946 if test "${with_x+set}" = set; then
3947   withval="$with_x"
3948   :
3949 fi
3950
3951 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3952 if test "x$with_x" = xno; then
3953   # The user explicitly disabled X.
3954   have_x=disabled
3955 else
3956   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3957     # Both variables are already set.
3958     have_x=yes
3959   else
3960 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3961   echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963   # One or both of the vars are not set, and there is no cached value.
3964 ac_x_includes=NO ac_x_libraries=NO
3965 rm -fr conftestdir
3966 if mkdir conftestdir; then
3967   cd conftestdir
3968   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3969   cat > Imakefile <<'EOF'
3970 acfindx:
3971         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3972 EOF
3973   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3974     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3975     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3976     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3977     for ac_extension in a so sl; do
3978       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3979         test -f $ac_im_libdir/libX11.$ac_extension; then
3980         ac_im_usrlibdir=$ac_im_libdir; break
3981       fi
3982     done
3983     # Screen out bogus values from the imake configuration.  They are
3984     # bogus both because they are the default anyway, and because
3985     # using them would break gcc on systems where it needs fixed includes.
3986     case "$ac_im_incroot" in
3987         /usr/include) ;;
3988         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3989     esac
3990     case "$ac_im_usrlibdir" in
3991         /usr/lib | /lib) ;;
3992         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3993     esac
3994   fi
3995   cd ..
3996   rm -fr conftestdir
3997 fi
3998
3999 if test "$ac_x_includes" = NO; then
4000   # Guess where to find include files, by looking for this one X11 .h file.
4001   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4002
4003   # First, try using that file with no special directory specified.
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 #include <$x_direct_test_include>
4008 EOF
4009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4010 { (eval echo configure:4011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4012 if test -z "$ac_err"; then
4013   rm -rf conftest*
4014   # We can compile using X headers with no special include directory.
4015 ac_x_includes=
4016 else
4017   echo "$ac_err" >&5
4018   echo "configure: failed program was:" >&5
4019   cat conftest.$ac_ext >&5
4020   rm -rf conftest*
4021   # Look for the header file in a standard set of common directories.
4022 # Check X11 before X11Rn because it is often a symlink to the current release.
4023   for ac_dir in               \
4024     /usr/X11/include          \
4025     /usr/X11R6/include        \
4026     /usr/X11R5/include        \
4027     /usr/X11R4/include        \
4028                               \
4029     /usr/include/X11          \
4030     /usr/include/X11R6        \
4031     /usr/include/X11R5        \
4032     /usr/include/X11R4        \
4033                               \
4034     /usr/local/X11/include    \
4035     /usr/local/X11R6/include  \
4036     /usr/local/X11R5/include  \
4037     /usr/local/X11R4/include  \
4038                               \
4039     /usr/local/include/X11    \
4040     /usr/local/include/X11R6  \
4041     /usr/local/include/X11R5  \
4042     /usr/local/include/X11R4  \
4043                               \
4044     /usr/X386/include         \
4045     /usr/x386/include         \
4046     /usr/XFree86/include/X11  \
4047                               \
4048     /usr/include              \
4049     /usr/local/include        \
4050     /usr/unsupported/include  \
4051     /usr/athena/include       \
4052     /usr/local/x11r5/include  \
4053     /usr/lpp/Xamples/include  \
4054                               \
4055     /usr/openwin/include      \
4056     /usr/openwin/share/include \
4057     ; \
4058   do
4059     if test -r "$ac_dir/$x_direct_test_include"; then
4060       ac_x_includes=$ac_dir
4061       break
4062     fi
4063   done
4064 fi
4065 rm -f conftest*
4066 fi # $ac_x_includes = NO
4067
4068 if test "$ac_x_libraries" = NO; then
4069   # Check for the libraries.
4070
4071   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4072   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4073
4074   # See if we find them without any special options.
4075   # Don't add to $LIBS permanently.
4076   ac_save_LIBS="$LIBS"
4077   LIBS="-l$x_direct_test_library $LIBS"
4078 cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081
4082 int main() {
4083 ${x_direct_test_function}()
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4087   rm -rf conftest*
4088   LIBS="$ac_save_LIBS"
4089 # We can link X programs with no special library path.
4090 ac_x_libraries=
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   LIBS="$ac_save_LIBS"
4096 # First see if replacing the include by lib works.
4097 # Check X11 before X11Rn because it is often a symlink to the current release.
4098 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4099     /usr/X11/lib          \
4100     /usr/X11R6/lib        \
4101     /usr/X11R5/lib        \
4102     /usr/X11R4/lib        \
4103                           \
4104     /usr/lib/X11          \
4105     /usr/lib/X11R6        \
4106     /usr/lib/X11R5        \
4107     /usr/lib/X11R4        \
4108                           \
4109     /usr/local/X11/lib    \
4110     /usr/local/X11R6/lib  \
4111     /usr/local/X11R5/lib  \
4112     /usr/local/X11R4/lib  \
4113                           \
4114     /usr/local/lib/X11    \
4115     /usr/local/lib/X11R6  \
4116     /usr/local/lib/X11R5  \
4117     /usr/local/lib/X11R4  \
4118                           \
4119     /usr/X386/lib         \
4120     /usr/x386/lib         \
4121     /usr/XFree86/lib/X11  \
4122                           \
4123     /usr/lib              \
4124     /usr/local/lib        \
4125     /usr/unsupported/lib  \
4126     /usr/athena/lib       \
4127     /usr/local/x11r5/lib  \
4128     /usr/lpp/Xamples/lib  \
4129     /lib/usr/lib/X11      \
4130                           \
4131     /usr/openwin/lib      \
4132     /usr/openwin/share/lib \
4133     ; \
4134 do
4135   for ac_extension in a so sl; do
4136     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4137       ac_x_libraries=$ac_dir
4138       break 2
4139     fi
4140   done
4141 done
4142 fi
4143 rm -f conftest*
4144 fi # $ac_x_libraries = NO
4145
4146 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4147   # Didn't find X anywhere.  Cache the known absence of X.
4148   ac_cv_have_x="have_x=no"
4149 else
4150   # Record where we found X for the cache.
4151   ac_cv_have_x="have_x=yes \
4152                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4153 fi
4154 fi
4155   fi
4156   eval "$ac_cv_have_x"
4157 fi # $with_x != no
4158
4159 if test "$have_x" != yes; then
4160   echo "$ac_t""$have_x" 1>&6
4161   no_x=yes
4162 else
4163   # If each of the values was on the command line, it overrides each guess.
4164   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4165   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4166   # Update the cache value to reflect the command line values.
4167   ac_cv_have_x="have_x=yes \
4168                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4169   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4170 fi
4171
4172 if test "$no_x" = yes; then
4173   # Not all programs may use this symbol, but it does not hurt to define it.
4174   cat >> confdefs.h <<\EOF
4175 #define X_DISPLAY_MISSING 1
4176 EOF
4177
4178   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4179 else
4180   if test -n "$x_includes"; then
4181     X_CFLAGS="$X_CFLAGS -I$x_includes"
4182   fi
4183
4184   # It would also be nice to do this for all -L options, not just this one.
4185   if test -n "$x_libraries"; then
4186     X_LIBS="$X_LIBS -L$x_libraries"
4187     # For Solaris; some versions of Sun CC require a space after -R and
4188     # others require no space.  Words are not sufficient . . . .
4189     case "`(uname -sr) 2>/dev/null`" in
4190     "SunOS 5"*)
4191       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4192 echo "configure:4193: checking whether -R must be followed by a space" >&5
4193       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4194       cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197
4198 int main() {
4199
4200 ; return 0; }
4201 EOF
4202 if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4203   rm -rf conftest*
4204   ac_R_nospace=yes
4205 else
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208   rm -rf conftest*
4209   ac_R_nospace=no
4210 fi
4211 rm -f conftest*
4212       if test $ac_R_nospace = yes; then
4213         echo "$ac_t""no" 1>&6
4214         X_LIBS="$X_LIBS -R$x_libraries"
4215       else
4216         LIBS="$ac_xsave_LIBS -R $x_libraries"
4217         cat > conftest.$ac_ext <<EOF
4218 #line 4219 "configure"
4219 #include "confdefs.h"
4220
4221 int main() {
4222
4223 ; return 0; }
4224 EOF
4225 if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4226   rm -rf conftest*
4227   ac_R_space=yes
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   ac_R_space=no
4233 fi
4234 rm -f conftest*
4235         if test $ac_R_space = yes; then
4236           echo "$ac_t""yes" 1>&6
4237           X_LIBS="$X_LIBS -R $x_libraries"
4238         else
4239           echo "$ac_t""neither works" 1>&6
4240         fi
4241       fi
4242       LIBS="$ac_xsave_LIBS"
4243     esac
4244   fi
4245
4246   # Check for system-dependent libraries X programs must link with.
4247   # Do this before checking for the system-independent R6 libraries
4248   # (-lICE), since we may need -lsocket or whatever for X linking.
4249
4250   if test "$ISC" = yes; then
4251     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4252   else
4253     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4254     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4255     # the Alpha needs dnet_stub (dnet does not exist).
4256     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4257 echo "configure:4258: checking for dnet_ntoa in -ldnet" >&5
4258 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   ac_save_LIBS="$LIBS"
4263 LIBS="-ldnet  $LIBS"
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 /* Override any gcc2 internal prototype to avoid an error.  */
4268 /* We use char because int might match the return type of a gcc2
4269     builtin and then its argument prototype would still apply.  */
4270 char dnet_ntoa();
4271
4272 int main() {
4273 dnet_ntoa()
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4277   rm -rf conftest*
4278   eval "ac_cv_lib_$ac_lib_var=yes"
4279 else
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   eval "ac_cv_lib_$ac_lib_var=no"
4284 fi
4285 rm -f conftest*
4286 LIBS="$ac_save_LIBS"
4287
4288 fi
4289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4290   echo "$ac_t""yes" 1>&6
4291   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4297       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4298 echo "configure:4299: checking for dnet_ntoa in -ldnet_stub" >&5
4299 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4301   echo $ac_n "(cached) $ac_c" 1>&6
4302 else
4303   ac_save_LIBS="$LIBS"
4304 LIBS="-ldnet_stub  $LIBS"
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 /* Override any gcc2 internal prototype to avoid an error.  */
4309 /* We use char because int might match the return type of a gcc2
4310     builtin and then its argument prototype would still apply.  */
4311 char dnet_ntoa();
4312
4313 int main() {
4314 dnet_ntoa()
4315 ; return 0; }
4316 EOF
4317 if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4318   rm -rf conftest*
4319   eval "ac_cv_lib_$ac_lib_var=yes"
4320 else
4321   echo "configure: failed program was:" >&5
4322   cat conftest.$ac_ext >&5
4323   rm -rf conftest*
4324   eval "ac_cv_lib_$ac_lib_var=no"
4325 fi
4326 rm -f conftest*
4327 LIBS="$ac_save_LIBS"
4328
4329 fi
4330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4331   echo "$ac_t""yes" 1>&6
4332   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336
4337     fi
4338
4339     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4340     # to get the SysV transport functions.
4341     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4342     # needs -lnsl.
4343     # The nsl library prevents programs from opening the X display
4344     # on Irix 5.2, according to dickey@clark.net.
4345     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4346 echo "configure:4347: checking for gethostbyname" >&5
4347 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* System header to define __stub macros and hopefully few prototypes,
4354     which can conflict with char gethostbyname(); below.  */
4355 #include <assert.h>
4356 /* Override any gcc2 internal prototype to avoid an error.  */
4357 /* We use char because int might match the return type of a gcc2
4358     builtin and then its argument prototype would still apply.  */
4359 char gethostbyname();
4360
4361 int main() {
4362
4363 /* The GNU C library defines this for functions which it implements
4364     to always fail with ENOSYS.  Some functions are actually named
4365     something starting with __ and the normal name is an alias.  */
4366 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4367 choke me
4368 #else
4369 gethostbyname();
4370 #endif
4371
4372 ; return 0; }
4373 EOF
4374 if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4375   rm -rf conftest*
4376   eval "ac_cv_func_gethostbyname=yes"
4377 else
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   eval "ac_cv_func_gethostbyname=no"
4382 fi
4383 rm -f conftest*
4384 fi
4385
4386 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4387   echo "$ac_t""yes" 1>&6
4388   :
4389 else
4390   echo "$ac_t""no" 1>&6
4391 fi
4392
4393     if test $ac_cv_func_gethostbyname = no; then
4394       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4395 echo "configure:4396: checking for gethostbyname in -lnsl" >&5
4396 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4397 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4398   echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4400   ac_save_LIBS="$LIBS"
4401 LIBS="-lnsl  $LIBS"
4402 cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405 /* Override any gcc2 internal prototype to avoid an error.  */
4406 /* We use char because int might match the return type of a gcc2
4407     builtin and then its argument prototype would still apply.  */
4408 char gethostbyname();
4409
4410 int main() {
4411 gethostbyname()
4412 ; return 0; }
4413 EOF
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4415   rm -rf conftest*
4416   eval "ac_cv_lib_$ac_lib_var=yes"
4417 else
4418   echo "configure: failed program was:" >&5
4419   cat conftest.$ac_ext >&5
4420   rm -rf conftest*
4421   eval "ac_cv_lib_$ac_lib_var=no"
4422 fi
4423 rm -f conftest*
4424 LIBS="$ac_save_LIBS"
4425
4426 fi
4427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4428   echo "$ac_t""yes" 1>&6
4429   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433
4434     fi
4435
4436     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4437     # socket/setsockopt and other routines are undefined under SCO ODT
4438     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4439     # on later versions), says simon@lia.di.epfl.ch: it contains
4440     # gethostby* variants that don't use the nameserver (or something).
4441     # -lsocket must be given before -lnsl if both are needed.
4442     # We assume that if connect needs -lnsl, so does gethostbyname.
4443     echo $ac_n "checking for connect""... $ac_c" 1>&6
4444 echo "configure:4445: checking for connect" >&5
4445 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451 /* System header to define __stub macros and hopefully few prototypes,
4452     which can conflict with char connect(); below.  */
4453 #include <assert.h>
4454 /* Override any gcc2 internal prototype to avoid an error.  */
4455 /* We use char because int might match the return type of a gcc2
4456     builtin and then its argument prototype would still apply.  */
4457 char connect();
4458
4459 int main() {
4460
4461 /* The GNU C library defines this for functions which it implements
4462     to always fail with ENOSYS.  Some functions are actually named
4463     something starting with __ and the normal name is an alias.  */
4464 #if defined (__stub_connect) || defined (__stub___connect)
4465 choke me
4466 #else
4467 connect();
4468 #endif
4469
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4473   rm -rf conftest*
4474   eval "ac_cv_func_connect=yes"
4475 else
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478   rm -rf conftest*
4479   eval "ac_cv_func_connect=no"
4480 fi
4481 rm -f conftest*
4482 fi
4483
4484 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4485   echo "$ac_t""yes" 1>&6
4486   :
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490
4491     if test $ac_cv_func_connect = no; then
4492       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4493 echo "configure:4494: checking for connect in -lsocket" >&5
4494 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4496   echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498   ac_save_LIBS="$LIBS"
4499 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4500 cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4503 /* Override any gcc2 internal prototype to avoid an error.  */
4504 /* We use char because int might match the return type of a gcc2
4505     builtin and then its argument prototype would still apply.  */
4506 char connect();
4507
4508 int main() {
4509 connect()
4510 ; return 0; }
4511 EOF
4512 if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4513   rm -rf conftest*
4514   eval "ac_cv_lib_$ac_lib_var=yes"
4515 else
4516   echo "configure: failed program was:" >&5
4517   cat conftest.$ac_ext >&5
4518   rm -rf conftest*
4519   eval "ac_cv_lib_$ac_lib_var=no"
4520 fi
4521 rm -f conftest*
4522 LIBS="$ac_save_LIBS"
4523
4524 fi
4525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4526   echo "$ac_t""yes" 1>&6
4527   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4528 else
4529   echo "$ac_t""no" 1>&6
4530 fi
4531
4532     fi
4533
4534     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4535     echo $ac_n "checking for remove""... $ac_c" 1>&6
4536 echo "configure:4537: checking for remove" >&5
4537 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4538   echo $ac_n "(cached) $ac_c" 1>&6
4539 else
4540   cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543 /* System header to define __stub macros and hopefully few prototypes,
4544     which can conflict with char remove(); below.  */
4545 #include <assert.h>
4546 /* Override any gcc2 internal prototype to avoid an error.  */
4547 /* We use char because int might match the return type of a gcc2
4548     builtin and then its argument prototype would still apply.  */
4549 char remove();
4550
4551 int main() {
4552
4553 /* The GNU C library defines this for functions which it implements
4554     to always fail with ENOSYS.  Some functions are actually named
4555     something starting with __ and the normal name is an alias.  */
4556 #if defined (__stub_remove) || defined (__stub___remove)
4557 choke me
4558 #else
4559 remove();
4560 #endif
4561
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   eval "ac_cv_func_remove=yes"
4567 else
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   eval "ac_cv_func_remove=no"
4572 fi
4573 rm -f conftest*
4574 fi
4575
4576 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578   :
4579 else
4580   echo "$ac_t""no" 1>&6
4581 fi
4582
4583     if test $ac_cv_func_remove = no; then
4584       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
4585 echo "configure:4586: checking for remove in -lposix" >&5
4586 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
4587 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   ac_save_LIBS="$LIBS"
4591 LIBS="-lposix  $LIBS"
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 /* Override any gcc2 internal prototype to avoid an error.  */
4596 /* We use char because int might match the return type of a gcc2
4597     builtin and then its argument prototype would still apply.  */
4598 char remove();
4599
4600 int main() {
4601 remove()
4602 ; return 0; }
4603 EOF
4604 if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4605   rm -rf conftest*
4606   eval "ac_cv_lib_$ac_lib_var=yes"
4607 else
4608   echo "configure: failed program was:" >&5
4609   cat conftest.$ac_ext >&5
4610   rm -rf conftest*
4611   eval "ac_cv_lib_$ac_lib_var=no"
4612 fi
4613 rm -f conftest*
4614 LIBS="$ac_save_LIBS"
4615
4616 fi
4617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4618   echo "$ac_t""yes" 1>&6
4619   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
4620 else
4621   echo "$ac_t""no" 1>&6
4622 fi
4623
4624     fi
4625
4626     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
4627     echo $ac_n "checking for shmat""... $ac_c" 1>&6
4628 echo "configure:4629: checking for shmat" >&5
4629 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 /* System header to define __stub macros and hopefully few prototypes,
4636     which can conflict with char shmat(); below.  */
4637 #include <assert.h>
4638 /* Override any gcc2 internal prototype to avoid an error.  */
4639 /* We use char because int might match the return type of a gcc2
4640     builtin and then its argument prototype would still apply.  */
4641 char shmat();
4642
4643 int main() {
4644
4645 /* The GNU C library defines this for functions which it implements
4646     to always fail with ENOSYS.  Some functions are actually named
4647     something starting with __ and the normal name is an alias.  */
4648 #if defined (__stub_shmat) || defined (__stub___shmat)
4649 choke me
4650 #else
4651 shmat();
4652 #endif
4653
4654 ; return 0; }
4655 EOF
4656 if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4657   rm -rf conftest*
4658   eval "ac_cv_func_shmat=yes"
4659 else
4660   echo "configure: failed program was:" >&5
4661   cat conftest.$ac_ext >&5
4662   rm -rf conftest*
4663   eval "ac_cv_func_shmat=no"
4664 fi
4665 rm -f conftest*
4666 fi
4667
4668 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670   :
4671 else
4672   echo "$ac_t""no" 1>&6
4673 fi
4674
4675     if test $ac_cv_func_shmat = no; then
4676       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
4677 echo "configure:4678: checking for shmat in -lipc" >&5
4678 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
4679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   ac_save_LIBS="$LIBS"
4683 LIBS="-lipc  $LIBS"
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 /* Override any gcc2 internal prototype to avoid an error.  */
4688 /* We use char because int might match the return type of a gcc2
4689     builtin and then its argument prototype would still apply.  */
4690 char shmat();
4691
4692 int main() {
4693 shmat()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715
4716     fi
4717   fi
4718
4719   # Check for libraries that X11R6 Xt/Xaw programs need.
4720   ac_save_LDFLAGS="$LDFLAGS"
4721   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4722   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4723   # check for ICE first), but we must link in the order -lSM -lICE or
4724   # we get undefined symbols.  So assume we have SM if we have ICE.
4725   # These have to be linked with before -lX11, unlike the other
4726   # libraries we check for below, so use a different variable.
4727   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4728   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4729 echo "configure:4730: checking for IceConnectionNumber in -lICE" >&5
4730 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4732   echo $ac_n "(cached) $ac_c" 1>&6
4733 else
4734   ac_save_LIBS="$LIBS"
4735 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4736 cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 /* Override any gcc2 internal prototype to avoid an error.  */
4740 /* We use char because int might match the return type of a gcc2
4741     builtin and then its argument prototype would still apply.  */
4742 char IceConnectionNumber();
4743
4744 int main() {
4745 IceConnectionNumber()
4746 ; return 0; }
4747 EOF
4748 if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4749   rm -rf conftest*
4750   eval "ac_cv_lib_$ac_lib_var=yes"
4751 else
4752   echo "configure: failed program was:" >&5
4753   cat conftest.$ac_ext >&5
4754   rm -rf conftest*
4755   eval "ac_cv_lib_$ac_lib_var=no"
4756 fi
4757 rm -f conftest*
4758 LIBS="$ac_save_LIBS"
4759
4760 fi
4761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767
4768   LDFLAGS="$ac_save_LDFLAGS"
4769
4770 fi
4771
4772
4773 for ac_hdr in \
4774         assert.h \
4775         fcntl.h \
4776         grp.h \
4777         libc.h \
4778         limits.h \
4779         stdarg.h \
4780         stdlib.h \
4781         string.h \
4782         termios.h \
4783         unistd.h \
4784         sys/byteorder.h \
4785         sys/ioctl.h \
4786         sys/select.h \
4787         sys/sockio.h \
4788         sys/time.h \
4789
4790 do
4791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4793 echo "configure:4794: checking for $ac_hdr" >&5
4794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #include <$ac_hdr>
4801 EOF
4802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4803 { (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805 if test -z "$ac_err"; then
4806   rm -rf conftest*
4807   eval "ac_cv_header_$ac_safe=yes"
4808 else
4809   echo "$ac_err" >&5
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818   echo "$ac_t""yes" 1>&6
4819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820   cat >> confdefs.h <<EOF
4821 #define $ac_tr_hdr 1
4822 EOF
4823  
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827 done
4828
4829 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4830 echo "configure:4831: checking for ANSI C header files" >&5
4831 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4832   echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834   cat > conftest.$ac_ext <<EOF
4835 #line 4836 "configure"
4836 #include "confdefs.h"
4837 #include <stdlib.h>
4838 #include <stdarg.h>
4839 #include <string.h>
4840 #include <float.h>
4841 EOF
4842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4843 { (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4845 if test -z "$ac_err"; then
4846   rm -rf conftest*
4847   ac_cv_header_stdc=yes
4848 else
4849   echo "$ac_err" >&5
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   ac_cv_header_stdc=no
4854 fi
4855 rm -f conftest*
4856
4857 if test $ac_cv_header_stdc = yes; then
4858   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 #include <string.h>
4863 EOF
4864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4865   egrep "memchr" >/dev/null 2>&1; then
4866   :
4867 else
4868   rm -rf conftest*
4869   ac_cv_header_stdc=no
4870 fi
4871 rm -f conftest*
4872
4873 fi
4874
4875 if test $ac_cv_header_stdc = yes; then
4876   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4877 cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 #include <stdlib.h>
4881 EOF
4882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4883   egrep "free" >/dev/null 2>&1; then
4884   :
4885 else
4886   rm -rf conftest*
4887   ac_cv_header_stdc=no
4888 fi
4889 rm -f conftest*
4890
4891 fi
4892
4893 if test $ac_cv_header_stdc = yes; then
4894   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4895 if test "$cross_compiling" = yes; then
4896   :
4897 else
4898   cat > conftest.$ac_ext <<EOF
4899 #line 4900 "configure"
4900 #include "confdefs.h"
4901 #include <ctype.h>
4902 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4903 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4905 int main () { int i; for (i = 0; i < 256; i++)
4906 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4907 exit (0); }
4908
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4911 then
4912   :
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -fr conftest*
4917   ac_cv_header_stdc=no
4918 fi
4919 rm -fr conftest*
4920 fi
4921
4922 fi
4923 fi
4924
4925 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4926 if test $ac_cv_header_stdc = yes; then
4927   cat >> confdefs.h <<\EOF
4928 #define STDC_HEADERS 1
4929 EOF
4930
4931 fi
4932
4933 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
4934 echo "configure:4935: checking whether sys/types.h defines makedev" >&5
4935 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
4936   echo $ac_n "(cached) $ac_c" 1>&6
4937 else
4938   cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 #include <sys/types.h>
4942 int main() {
4943 return makedev(0, 0);
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   ac_cv_header_sys_types_h_makedev=yes
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   ac_cv_header_sys_types_h_makedev=no
4954 fi
4955 rm -f conftest*
4956
4957 fi
4958
4959 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
4960
4961 if test $ac_cv_header_sys_types_h_makedev = no; then
4962 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
4963 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
4964 echo "configure:4965: checking for sys/mkdev.h" >&5
4965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4966   echo $ac_n "(cached) $ac_c" 1>&6
4967 else
4968   cat > conftest.$ac_ext <<EOF
4969 #line 4970 "configure"
4970 #include "confdefs.h"
4971 #include <sys/mkdev.h>
4972 EOF
4973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4974 { (eval echo configure:4975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4976 if test -z "$ac_err"; then
4977   rm -rf conftest*
4978   eval "ac_cv_header_$ac_safe=yes"
4979 else
4980   echo "$ac_err" >&5
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_header_$ac_safe=no"
4985 fi
4986 rm -f conftest*
4987 fi
4988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4989   echo "$ac_t""yes" 1>&6
4990   cat >> confdefs.h <<\EOF
4991 #define MAJOR_IN_MKDEV 1
4992 EOF
4993
4994 else
4995   echo "$ac_t""no" 1>&6
4996 fi
4997
4998
4999   if test $ac_cv_header_sys_mkdev_h = no; then
5000 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
5001 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
5002 echo "configure:5003: checking for sys/sysmacros.h" >&5
5003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   cat > conftest.$ac_ext <<EOF
5007 #line 5008 "configure"
5008 #include "confdefs.h"
5009 #include <sys/sysmacros.h>
5010 EOF
5011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5012 { (eval echo configure:5013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5014 if test -z "$ac_err"; then
5015   rm -rf conftest*
5016   eval "ac_cv_header_$ac_safe=yes"
5017 else
5018   echo "$ac_err" >&5
5019   echo "configure: failed program was:" >&5
5020   cat conftest.$ac_ext >&5
5021   rm -rf conftest*
5022   eval "ac_cv_header_$ac_safe=no"
5023 fi
5024 rm -f conftest*
5025 fi
5026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5027   echo "$ac_t""yes" 1>&6
5028   cat >> confdefs.h <<\EOF
5029 #define MAJOR_IN_SYSMACROS 1
5030 EOF
5031
5032 else
5033   echo "$ac_t""no" 1>&6
5034 fi
5035
5036   fi
5037 fi
5038
5039 ac_header_dirent=no
5040 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5041 do
5042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5043 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5044 echo "configure:5045: checking for $ac_hdr that defines DIR" >&5
5045 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5046   echo $ac_n "(cached) $ac_c" 1>&6
5047 else
5048   cat > conftest.$ac_ext <<EOF
5049 #line 5050 "configure"
5050 #include "confdefs.h"
5051 #include <sys/types.h>
5052 #include <$ac_hdr>
5053 int main() {
5054 DIR *dirp = 0;
5055 ; return 0; }
5056 EOF
5057 if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5058   rm -rf conftest*
5059   eval "ac_cv_header_dirent_$ac_safe=yes"
5060 else
5061   echo "configure: failed program was:" >&5
5062   cat conftest.$ac_ext >&5
5063   rm -rf conftest*
5064   eval "ac_cv_header_dirent_$ac_safe=no"
5065 fi
5066 rm -f conftest*
5067 fi
5068 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5071   cat >> confdefs.h <<EOF
5072 #define $ac_tr_hdr 1
5073 EOF
5074  ac_header_dirent=$ac_hdr; break
5075 else
5076   echo "$ac_t""no" 1>&6
5077 fi
5078 done
5079 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5080 if test $ac_header_dirent = dirent.h; then
5081 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5082 echo "configure:5083: checking for opendir in -ldir" >&5
5083 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   ac_save_LIBS="$LIBS"
5088 LIBS="-ldir  $LIBS"
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* Override any gcc2 internal prototype to avoid an error.  */
5093 /* We use char because int might match the return type of a gcc2
5094     builtin and then its argument prototype would still apply.  */
5095 char opendir();
5096
5097 int main() {
5098 opendir()
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5102   rm -rf conftest*
5103   eval "ac_cv_lib_$ac_lib_var=yes"
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=no"
5109 fi
5110 rm -f conftest*
5111 LIBS="$ac_save_LIBS"
5112
5113 fi
5114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5115   echo "$ac_t""yes" 1>&6
5116   LIBS="$LIBS -ldir"
5117 else
5118   echo "$ac_t""no" 1>&6
5119 fi
5120
5121 else
5122 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5123 echo "configure:5124: checking for opendir in -lx" >&5
5124 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5126   echo $ac_n "(cached) $ac_c" 1>&6
5127 else
5128   ac_save_LIBS="$LIBS"
5129 LIBS="-lx  $LIBS"
5130 cat > conftest.$ac_ext <<EOF
5131 #line 5132 "configure"
5132 #include "confdefs.h"
5133 /* Override any gcc2 internal prototype to avoid an error.  */
5134 /* We use char because int might match the return type of a gcc2
5135     builtin and then its argument prototype would still apply.  */
5136 char opendir();
5137
5138 int main() {
5139 opendir()
5140 ; return 0; }
5141 EOF
5142 if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5143   rm -rf conftest*
5144   eval "ac_cv_lib_$ac_lib_var=yes"
5145 else
5146   echo "configure: failed program was:" >&5
5147   cat conftest.$ac_ext >&5
5148   rm -rf conftest*
5149   eval "ac_cv_lib_$ac_lib_var=no"
5150 fi
5151 rm -f conftest*
5152 LIBS="$ac_save_LIBS"
5153
5154 fi
5155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5156   echo "$ac_t""yes" 1>&6
5157   LIBS="$LIBS -lx"
5158 else
5159   echo "$ac_t""no" 1>&6
5160 fi
5161
5162 fi
5163
5164 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5165 echo "configure:5166: checking whether stat file-mode macros are broken" >&5
5166 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5167   echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169   cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 #include <sys/types.h>
5173 #include <sys/stat.h>
5174
5175 #if defined(S_ISBLK) && defined(S_IFDIR)
5176 # if S_ISBLK (S_IFDIR)
5177 You lose.
5178 # endif
5179 #endif
5180
5181 #if defined(S_ISBLK) && defined(S_IFCHR)
5182 # if S_ISBLK (S_IFCHR)
5183 You lose.
5184 # endif
5185 #endif
5186
5187 #if defined(S_ISLNK) && defined(S_IFREG)
5188 # if S_ISLNK (S_IFREG)
5189 You lose.
5190 # endif
5191 #endif
5192
5193 #if defined(S_ISSOCK) && defined(S_IFREG)
5194 # if S_ISSOCK (S_IFREG)
5195 You lose.
5196 # endif
5197 #endif
5198
5199 EOF
5200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5201   egrep "You lose" >/dev/null 2>&1; then
5202   rm -rf conftest*
5203   ac_cv_header_stat_broken=yes
5204 else
5205   rm -rf conftest*
5206   ac_cv_header_stat_broken=no
5207 fi
5208 rm -f conftest*
5209
5210 fi
5211
5212 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5213 if test $ac_cv_header_stat_broken = yes; then
5214   cat >> confdefs.h <<\EOF
5215 #define STAT_MACROS_BROKEN 1
5216 EOF
5217
5218 fi
5219
5220 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5221 echo "configure:5222: checking for sys/wait.h that is POSIX.1 compatible" >&5
5222 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228 #include <sys/types.h>
5229 #include <sys/wait.h>
5230 #ifndef WEXITSTATUS
5231 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5232 #endif
5233 #ifndef WIFEXITED
5234 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5235 #endif
5236 int main() {
5237 int s;
5238 wait (&s);
5239 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5240 ; return 0; }
5241 EOF
5242 if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5243   rm -rf conftest*
5244   ac_cv_header_sys_wait_h=yes
5245 else
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248   rm -rf conftest*
5249   ac_cv_header_sys_wait_h=no
5250 fi
5251 rm -f conftest*
5252 fi
5253
5254 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5255 if test $ac_cv_header_sys_wait_h = yes; then
5256   cat >> confdefs.h <<\EOF
5257 #define HAVE_SYS_WAIT_H 1
5258 EOF
5259
5260 fi
5261
5262 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5263 echo "configure:5264: checking whether time.h and sys/time.h may both be included" >&5
5264 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270 #include <sys/types.h>
5271 #include <sys/time.h>
5272 #include <time.h>
5273 int main() {
5274 struct tm *tp;
5275 ; return 0; }
5276 EOF
5277 if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5278   rm -rf conftest*
5279   ac_cv_header_time=yes
5280 else
5281   echo "configure: failed program was:" >&5
5282   cat conftest.$ac_ext >&5
5283   rm -rf conftest*
5284   ac_cv_header_time=no
5285 fi
5286 rm -f conftest*
5287 fi
5288
5289 echo "$ac_t""$ac_cv_header_time" 1>&6
5290 if test $ac_cv_header_time = yes; then
5291   cat >> confdefs.h <<\EOF
5292 #define TIME_WITH_SYS_TIME 1
5293 EOF
5294
5295 fi
5296
5297 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5298 echo "configure:5299: checking for st_blksize in struct stat" >&5
5299 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 #include <sys/types.h>
5306 #include <sys/stat.h>
5307 int main() {
5308 struct stat s; s.st_blksize;
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312   rm -rf conftest*
5313   ac_cv_struct_st_blksize=yes
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   ac_cv_struct_st_blksize=no
5319 fi
5320 rm -f conftest*
5321 fi
5322
5323 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5324 if test $ac_cv_struct_st_blksize = yes; then
5325   cat >> confdefs.h <<\EOF
5326 #define HAVE_ST_BLKSIZE 1
5327 EOF
5328
5329 fi
5330
5331 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
5332 echo "configure:5333: checking for st_blocks in struct stat" >&5
5333 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5334   echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 #include <sys/types.h>
5340 #include <sys/stat.h>
5341 int main() {
5342 struct stat s; s.st_blocks;
5343 ; return 0; }
5344 EOF
5345 if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5346   rm -rf conftest*
5347   ac_cv_struct_st_blocks=yes
5348 else
5349   echo "configure: failed program was:" >&5
5350   cat conftest.$ac_ext >&5
5351   rm -rf conftest*
5352   ac_cv_struct_st_blocks=no
5353 fi
5354 rm -f conftest*
5355 fi
5356
5357 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5358 if test $ac_cv_struct_st_blocks = yes; then
5359   cat >> confdefs.h <<\EOF
5360 #define HAVE_ST_BLOCKS 1
5361 EOF
5362
5363 else
5364   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5365 fi
5366
5367 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5368 echo "configure:5369: checking whether struct tm is in sys/time.h or time.h" >&5
5369 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375 #include <sys/types.h>
5376 #include <time.h>
5377 int main() {
5378 struct tm *tp; tp->tm_sec;
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5382   rm -rf conftest*
5383   ac_cv_struct_tm=time.h
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   ac_cv_struct_tm=sys/time.h
5389 fi
5390 rm -f conftest*
5391 fi
5392
5393 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5394 if test $ac_cv_struct_tm = sys/time.h; then
5395   cat >> confdefs.h <<\EOF
5396 #define TM_IN_SYS_TIME 1
5397 EOF
5398
5399 fi
5400
5401 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5402 echo "configure:5403: checking for tm_zone in struct tm" >&5
5403 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5404   echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406   cat > conftest.$ac_ext <<EOF
5407 #line 5408 "configure"
5408 #include "confdefs.h"
5409 #include <sys/types.h>
5410 #include <$ac_cv_struct_tm>
5411 int main() {
5412 struct tm tm; tm.tm_zone;
5413 ; return 0; }
5414 EOF
5415 if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5416   rm -rf conftest*
5417   ac_cv_struct_tm_zone=yes
5418 else
5419   echo "configure: failed program was:" >&5
5420   cat conftest.$ac_ext >&5
5421   rm -rf conftest*
5422   ac_cv_struct_tm_zone=no
5423 fi
5424 rm -f conftest*
5425 fi
5426
5427 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5428 if test "$ac_cv_struct_tm_zone" = yes; then
5429   cat >> confdefs.h <<\EOF
5430 #define HAVE_TM_ZONE 1
5431 EOF
5432
5433 else
5434   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5435 echo "configure:5436: checking for tzname" >&5
5436 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5437   echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439   cat > conftest.$ac_ext <<EOF
5440 #line 5441 "configure"
5441 #include "confdefs.h"
5442 #include <time.h>
5443 #ifndef tzname /* For SGI.  */
5444 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5445 #endif
5446 int main() {
5447 atoi(*tzname);
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   ac_cv_var_tzname=yes
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   ac_cv_var_tzname=no
5458 fi
5459 rm -f conftest*
5460 fi
5461
5462 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5463   if test $ac_cv_var_tzname = yes; then
5464     cat >> confdefs.h <<\EOF
5465 #define HAVE_TZNAME 1
5466 EOF
5467
5468   fi
5469 fi
5470
5471
5472 # It seems that that many machines where <utime.h> seems to be
5473 # broken just require something like -D_XXX_SOURCE, where XXX might
5474 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
5475
5476 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
5477 echo "configure:5478: checking for utime.h" >&5
5478 if eval "test \"`echo '$''{'tar_cv_header_utime_h'+set}'`\" = set"; then
5479   echo $ac_n "(cached) $ac_c" 1>&6
5480 else
5481   cat > conftest.$ac_ext <<EOF
5482 #line 5483 "configure"
5483 #include "confdefs.h"
5484
5485 #include <sys/types.h>
5486 #include <utime.h>
5487 int main() {
5488 struct utimbuf foo
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5492   rm -rf conftest*
5493   tar_cv_header_utime_h=yes
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   tar_cv_header_utime_h=no
5499 fi
5500 rm -f conftest*
5501 fi
5502
5503 echo "$ac_t""$tar_cv_header_utime_h" 1>&6
5504 test $tar_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
5505 #define HAVE_UTIME_H 1
5506 EOF
5507
5508
5509 echo $ac_n "checking for working const""... $ac_c" 1>&6
5510 echo "configure:5511: checking for working const" >&5
5511 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5512   echo $ac_n "(cached) $ac_c" 1>&6
5513 else
5514   cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517
5518 int main() {
5519
5520 /* Ultrix mips cc rejects this.  */
5521 typedef int charset[2]; const charset x;
5522 /* SunOS 4.1.1 cc rejects this.  */
5523 char const *const *ccp;
5524 char **p;
5525 /* NEC SVR4.0.2 mips cc rejects this.  */
5526 struct point {int x, y;};
5527 static struct point const zero = {0,0};
5528 /* AIX XL C 1.02.0.0 rejects this.
5529    It does not let you subtract one const X* pointer from another in an arm
5530    of an if-expression whose if-part is not a constant expression */
5531 const char *g = "string";
5532 ccp = &g + (g ? g-g : 0);
5533 /* HPUX 7.0 cc rejects these. */
5534 ++ccp;
5535 p = (char**) ccp;
5536 ccp = (char const *const *) p;
5537 { /* SCO 3.2v4 cc rejects this.  */
5538   char *t;
5539   char const *s = 0 ? (char *) 0 : (char const *) 0;
5540
5541   *t++ = 0;
5542 }
5543 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5544   int x[] = {25, 17};
5545   const int *foo = &x[0];
5546   ++foo;
5547 }
5548 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5549   typedef const int *iptr;
5550   iptr p = 0;
5551   ++p;
5552 }
5553 { /* AIX XL C 1.02.0.0 rejects this saying
5554      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5555   struct s { int j; const int *ap[3]; };
5556   struct s *b; b->j = 5;
5557 }
5558 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5559   const int foo = 10;
5560 }
5561
5562 ; return 0; }
5563 EOF
5564 if { (eval echo configure:5565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5565   rm -rf conftest*
5566   ac_cv_c_const=yes
5567 else
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   ac_cv_c_const=no
5572 fi
5573 rm -f conftest*
5574 fi
5575
5576 echo "$ac_t""$ac_cv_c_const" 1>&6
5577 if test $ac_cv_c_const = no; then
5578   cat >> confdefs.h <<\EOF
5579 #define const 
5580 EOF
5581
5582 fi
5583
5584
5585
5586 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
5587 echo "configure:5588: checking how to get filesystem type" >&5
5588 fstype=no
5589 # The order of these tests is important.
5590 cat > conftest.$ac_ext <<EOF
5591 #line 5592 "configure"
5592 #include "confdefs.h"
5593 #include <sys/statvfs.h>
5594 #include <sys/fstyp.h>
5595 EOF
5596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5597 { (eval echo configure:5598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5599 if test -z "$ac_err"; then
5600   rm -rf conftest*
5601   cat >> confdefs.h <<\EOF
5602 #define FSTYPE_STATVFS 1
5603 EOF
5604  fstype=SVR4
5605 else
5606   echo "$ac_err" >&5
5607   echo "configure: failed program was:" >&5
5608   cat conftest.$ac_ext >&5
5609 fi
5610 rm -f conftest*
5611 if test $fstype = no; then
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615 #include <sys/statfs.h>
5616 #include <sys/fstyp.h>
5617 EOF
5618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5619 { (eval echo configure:5620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5621 if test -z "$ac_err"; then
5622   rm -rf conftest*
5623   cat >> confdefs.h <<\EOF
5624 #define FSTYPE_USG_STATFS 1
5625 EOF
5626  fstype=SVR3
5627 else
5628   echo "$ac_err" >&5
5629   echo "configure: failed program was:" >&5
5630   cat conftest.$ac_ext >&5
5631 fi
5632 rm -f conftest*
5633 fi
5634 if test $fstype = no; then
5635 cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638 #include <sys/statfs.h>
5639 #include <sys/vmount.h>
5640 EOF
5641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5642 { (eval echo configure:5643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5644 if test -z "$ac_err"; then
5645   rm -rf conftest*
5646   cat >> confdefs.h <<\EOF
5647 #define FSTYPE_AIX_STATFS 1
5648 EOF
5649  fstype=AIX
5650 else
5651   echo "$ac_err" >&5
5652   echo "configure: failed program was:" >&5
5653   cat conftest.$ac_ext >&5
5654 fi
5655 rm -f conftest*
5656 fi
5657 if test $fstype = no; then  
5658 cat > conftest.$ac_ext <<EOF
5659 #line 5660 "configure"
5660 #include "confdefs.h"
5661 #include <mntent.h>
5662 EOF
5663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5664 { (eval echo configure:5665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5666 if test -z "$ac_err"; then
5667   rm -rf conftest*
5668   cat >> confdefs.h <<\EOF
5669 #define FSTYPE_MNTENT 1
5670 EOF
5671  fstype=4.3BSD
5672 else
5673   echo "$ac_err" >&5
5674   echo "configure: failed program was:" >&5
5675   cat conftest.$ac_ext >&5
5676 fi
5677 rm -f conftest*
5678 fi
5679 if test $fstype = no; then  
5680 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 #include <sys/mount.h>
5684 EOF
5685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5686   egrep "f_type;" >/dev/null 2>&1; then
5687   rm -rf conftest*
5688   cat >> confdefs.h <<\EOF
5689 #define FSTYPE_STATFS 1
5690 EOF
5691  fstype=4.4BSD/OSF1
5692 fi
5693 rm -f conftest*
5694
5695 fi
5696 if test $fstype = no; then  
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 #include <sys/mount.h>
5701 #include <sys/fs_types.h>
5702 EOF
5703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5704 { (eval echo configure:5705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5706 if test -z "$ac_err"; then
5707   rm -rf conftest*
5708   cat >> confdefs.h <<\EOF
5709 #define FSTYPE_GETMNT 1
5710 EOF
5711  fstype=Ultrix
5712 else
5713   echo "$ac_err" >&5
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716 fi
5717 rm -f conftest*
5718 fi
5719 echo "$ac_t""$fstype" 1>&6
5720
5721 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5722 echo "configure:5723: checking return type of signal handlers" >&5
5723 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5724   echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726   cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729 #include <sys/types.h>
5730 #include <signal.h>
5731 #ifdef signal
5732 #undef signal
5733 #endif
5734 #ifdef __cplusplus
5735 extern "C" void (*signal (int, void (*)(int)))(int);
5736 #else
5737 void (*signal ()) ();
5738 #endif
5739
5740 int main() {
5741 int i;
5742 ; return 0; }
5743 EOF
5744 if { (eval echo configure:5745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5745   rm -rf conftest*
5746   ac_cv_type_signal=void
5747 else
5748   echo "configure: failed program was:" >&5
5749   cat conftest.$ac_ext >&5
5750   rm -rf conftest*
5751   ac_cv_type_signal=int
5752 fi
5753 rm -f conftest*
5754 fi
5755
5756 echo "$ac_t""$ac_cv_type_signal" 1>&6
5757 cat >> confdefs.h <<EOF
5758 #define RETSIGTYPE $ac_cv_type_signal
5759 EOF
5760
5761
5762
5763 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
5764 echo "configure:5765: checking for type of signal functions" >&5
5765 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   
5769   cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772 #include <signal.h>
5773 int main() {
5774
5775     sigset_t ss;
5776     struct sigaction sa;
5777     sigemptyset(&ss); sigsuspend(&ss);
5778     sigaction(SIGINT, &sa, (struct sigaction *) 0);
5779     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
5780   
5781 ; return 0; }
5782 EOF
5783 if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5784   rm -rf conftest*
5785   bash_cv_signal_vintage=posix
5786 else
5787   echo "configure: failed program was:" >&5
5788   cat conftest.$ac_ext >&5
5789   rm -rf conftest*
5790   
5791     cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 #include <signal.h>
5795 int main() {
5796
5797         int mask = sigmask(SIGINT);
5798         sigsetmask(mask); sigblock(mask); sigpause(mask);
5799     
5800 ; return 0; }
5801 EOF
5802 if { (eval echo configure:5803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5803   rm -rf conftest*
5804   bash_cv_signal_vintage=4.2bsd
5805 else
5806   echo "configure: failed program was:" >&5
5807   cat conftest.$ac_ext >&5
5808   rm -rf conftest*
5809   
5810       cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813
5814         #include <signal.h>
5815         RETSIGTYPE foo() { }
5816 int main() {
5817
5818                 int mask = sigmask(SIGINT);
5819                 sigset(SIGINT, foo); sigrelse(SIGINT);
5820                 sighold(SIGINT); sigpause(SIGINT);
5821         
5822 ; return 0; }
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825   rm -rf conftest*
5826   bash_cv_signal_vintage=svr3
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   bash_cv_signal_vintage=v7
5832     
5833 fi
5834 rm -f conftest*
5835   
5836 fi
5837 rm -f conftest*
5838
5839 fi
5840 rm -f conftest*
5841
5842 fi
5843
5844 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
5845 if test "$bash_cv_signal_vintage" = posix; then
5846 cat >> confdefs.h <<\EOF
5847 #define HAVE_POSIX_SIGNALS 1
5848 EOF
5849
5850 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
5851 cat >> confdefs.h <<\EOF
5852 #define HAVE_BSD_SIGNALS 1
5853 EOF
5854
5855 elif test "$bash_cv_signal_vintage" = svr3; then
5856 cat >> confdefs.h <<\EOF
5857 #define HAVE_USG_SIGHOLD 1
5858 EOF
5859
5860 fi
5861
5862 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
5863 echo "configure:5864: checking for mode_t" >&5
5864 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <sys/types.h>
5871 #if STDC_HEADERS
5872 #include <stdlib.h>
5873 #include <stddef.h>
5874 #endif
5875 EOF
5876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5877   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5878   rm -rf conftest*
5879   ac_cv_type_mode_t=yes
5880 else
5881   rm -rf conftest*
5882   ac_cv_type_mode_t=no
5883 fi
5884 rm -f conftest*
5885
5886 fi
5887 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
5888 if test $ac_cv_type_mode_t = no; then
5889   cat >> confdefs.h <<\EOF
5890 #define mode_t int
5891 EOF
5892
5893 fi
5894
5895 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5896 echo "configure:5897: checking for uid_t in sys/types.h" >&5
5897 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5898   echo $ac_n "(cached) $ac_c" 1>&6
5899 else
5900   cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 #include <sys/types.h>
5904 EOF
5905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5906   egrep "uid_t" >/dev/null 2>&1; then
5907   rm -rf conftest*
5908   ac_cv_type_uid_t=yes
5909 else
5910   rm -rf conftest*
5911   ac_cv_type_uid_t=no
5912 fi
5913 rm -f conftest*
5914
5915 fi
5916
5917 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5918 if test $ac_cv_type_uid_t = no; then
5919   cat >> confdefs.h <<\EOF
5920 #define uid_t int
5921 EOF
5922
5923   cat >> confdefs.h <<\EOF
5924 #define gid_t int
5925 EOF
5926
5927 fi
5928
5929 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5930 echo "configure:5931: checking for size_t" >&5
5931 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5932   echo $ac_n "(cached) $ac_c" 1>&6
5933 else
5934   cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 #include <sys/types.h>
5938 #if STDC_HEADERS
5939 #include <stdlib.h>
5940 #include <stddef.h>
5941 #endif
5942 EOF
5943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5944   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5945   rm -rf conftest*
5946   ac_cv_type_size_t=yes
5947 else
5948   rm -rf conftest*
5949   ac_cv_type_size_t=no
5950 fi
5951 rm -f conftest*
5952
5953 fi
5954 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5955 if test $ac_cv_type_size_t = no; then
5956   cat >> confdefs.h <<\EOF
5957 #define size_t unsigned
5958 EOF
5959
5960 fi
5961
5962 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
5963 echo "configure:5964: checking for pid_t" >&5
5964 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
5965   echo $ac_n "(cached) $ac_c" 1>&6
5966 else
5967   cat > conftest.$ac_ext <<EOF
5968 #line 5969 "configure"
5969 #include "confdefs.h"
5970 #include <sys/types.h>
5971 #if STDC_HEADERS
5972 #include <stdlib.h>
5973 #include <stddef.h>
5974 #endif
5975 EOF
5976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5977   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5978   rm -rf conftest*
5979   ac_cv_type_pid_t=yes
5980 else
5981   rm -rf conftest*
5982   ac_cv_type_pid_t=no
5983 fi
5984 rm -f conftest*
5985
5986 fi
5987 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5988 if test $ac_cv_type_pid_t = no; then
5989   cat >> confdefs.h <<\EOF
5990 #define pid_t int
5991 EOF
5992
5993 fi
5994
5995 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5996 echo "configure:5997: checking for off_t" >&5
5997 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 #include <sys/types.h>
6004 #if STDC_HEADERS
6005 #include <stdlib.h>
6006 #include <stddef.h>
6007 #endif
6008 EOF
6009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6010   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6011   rm -rf conftest*
6012   ac_cv_type_off_t=yes
6013 else
6014   rm -rf conftest*
6015   ac_cv_type_off_t=no
6016 fi
6017 rm -f conftest*
6018
6019 fi
6020 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6021 if test $ac_cv_type_off_t = no; then
6022   cat >> confdefs.h <<\EOF
6023 #define off_t long
6024 EOF
6025
6026 fi
6027
6028 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
6029 echo "configure:6030: checking for ino_t" >&5
6030 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 #include <sys/types.h>
6037 #if STDC_HEADERS
6038 #include <stdlib.h>
6039 #include <stddef.h>
6040 #endif
6041 EOF
6042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6043   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6044   rm -rf conftest*
6045   ac_cv_type_ino_t=yes
6046 else
6047   rm -rf conftest*
6048   ac_cv_type_ino_t=no
6049 fi
6050 rm -f conftest*
6051
6052 fi
6053 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6054 if test $ac_cv_type_ino_t = no; then
6055   cat >> confdefs.h <<\EOF
6056 #define ino_t unsigned long
6057 EOF
6058
6059 fi
6060
6061 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
6062 echo "configure:6063: checking for dev_t" >&5
6063 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6064   echo $ac_n "(cached) $ac_c" 1>&6
6065 else
6066   cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069 #include <sys/types.h>
6070 #if STDC_HEADERS
6071 #include <stdlib.h>
6072 #include <stddef.h>
6073 #endif
6074 EOF
6075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6076   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6077   rm -rf conftest*
6078   ac_cv_type_dev_t=yes
6079 else
6080   rm -rf conftest*
6081   ac_cv_type_dev_t=no
6082 fi
6083 rm -f conftest*
6084
6085 fi
6086 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6087 if test $ac_cv_type_dev_t = no; then
6088   cat >> confdefs.h <<\EOF
6089 #define dev_t unsigned long
6090 EOF
6091
6092 fi
6093
6094 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
6095 echo "configure:6096: checking for daddr_t" >&5
6096 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 #include <sys/types.h>
6103 #if STDC_HEADERS
6104 #include <stdlib.h>
6105 #include <stddef.h>
6106 #endif
6107 EOF
6108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6109   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6110   rm -rf conftest*
6111   ac_cv_type_daddr_t=yes
6112 else
6113   rm -rf conftest*
6114   ac_cv_type_daddr_t=no
6115 fi
6116 rm -f conftest*
6117
6118 fi
6119 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
6120 if test $ac_cv_type_daddr_t = no; then
6121   cat >> confdefs.h <<\EOF
6122 #define daddr_t long
6123 EOF
6124
6125 fi
6126
6127 echo $ac_n "checking for major_t""... $ac_c" 1>&6
6128 echo "configure:6129: checking for major_t" >&5
6129 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
6130   echo $ac_n "(cached) $ac_c" 1>&6
6131 else
6132   cat > conftest.$ac_ext <<EOF
6133 #line 6134 "configure"
6134 #include "confdefs.h"
6135 #include <sys/types.h>
6136 #if STDC_HEADERS
6137 #include <stdlib.h>
6138 #include <stddef.h>
6139 #endif
6140 EOF
6141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6142   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6143   rm -rf conftest*
6144   ac_cv_type_major_t=yes
6145 else
6146   rm -rf conftest*
6147   ac_cv_type_major_t=no
6148 fi
6149 rm -f conftest*
6150
6151 fi
6152 echo "$ac_t""$ac_cv_type_major_t" 1>&6
6153 if test $ac_cv_type_major_t = no; then
6154   cat >> confdefs.h <<\EOF
6155 #define major_t int
6156 EOF
6157
6158 fi
6159
6160 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
6161 echo "configure:6162: checking for minor_t" >&5
6162 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 #include <sys/types.h>
6169 #if STDC_HEADERS
6170 #include <stdlib.h>
6171 #include <stddef.h>
6172 #endif
6173 EOF
6174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6175   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6176   rm -rf conftest*
6177   ac_cv_type_minor_t=yes
6178 else
6179   rm -rf conftest*
6180   ac_cv_type_minor_t=no
6181 fi
6182 rm -f conftest*
6183
6184 fi
6185 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
6186 if test $ac_cv_type_minor_t = no; then
6187   cat >> confdefs.h <<\EOF
6188 #define minor_t int
6189 EOF
6190
6191 fi
6192
6193 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
6194 echo "configure:6195: checking for ssize_t" >&5
6195 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201 #include <sys/types.h>
6202 #if STDC_HEADERS
6203 #include <stdlib.h>
6204 #include <stddef.h>
6205 #endif
6206 EOF
6207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6208   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6209   rm -rf conftest*
6210   ac_cv_type_ssize_t=yes
6211 else
6212   rm -rf conftest*
6213   ac_cv_type_ssize_t=no
6214 fi
6215 rm -f conftest*
6216
6217 fi
6218 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
6219 if test $ac_cv_type_ssize_t = no; then
6220   cat >> confdefs.h <<\EOF
6221 #define ssize_t int
6222 EOF
6223
6224 fi
6225
6226 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6227 echo "configure:6228: checking for st_blocks in struct stat" >&5
6228 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6229   echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231   cat > conftest.$ac_ext <<EOF
6232 #line 6233 "configure"
6233 #include "confdefs.h"
6234 #include <sys/types.h>
6235 #include <sys/stat.h>
6236 int main() {
6237 struct stat s; s.st_blocks;
6238 ; return 0; }
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6241   rm -rf conftest*
6242   ac_cv_struct_st_blocks=yes
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   ac_cv_struct_st_blocks=no
6248 fi
6249 rm -f conftest*
6250 fi
6251
6252 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6253 if test $ac_cv_struct_st_blocks = yes; then
6254   cat >> confdefs.h <<\EOF
6255 #define HAVE_ST_BLOCKS 1
6256 EOF
6257
6258 else
6259   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6260 fi
6261
6262 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
6263 echo "configure:6264: checking for st_rdev in struct stat" >&5
6264 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
6265   echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267   cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 #include <sys/types.h>
6271 #include <sys/stat.h>
6272 int main() {
6273 struct stat s; s.st_rdev;
6274 ; return 0; }
6275 EOF
6276 if { (eval echo configure:6277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6277   rm -rf conftest*
6278   ac_cv_struct_st_rdev=yes
6279 else
6280   echo "configure: failed program was:" >&5
6281   cat conftest.$ac_ext >&5
6282   rm -rf conftest*
6283   ac_cv_struct_st_rdev=no
6284 fi
6285 rm -f conftest*
6286 fi
6287
6288 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
6289 if test $ac_cv_struct_st_rdev = yes; then
6290   cat >> confdefs.h <<\EOF
6291 #define HAVE_ST_RDEV 1
6292 EOF
6293
6294 fi
6295
6296 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6297 echo "configure:6298: checking whether struct tm is in sys/time.h or time.h" >&5
6298 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6299   echo $ac_n "(cached) $ac_c" 1>&6
6300 else
6301   cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304 #include <sys/types.h>
6305 #include <time.h>
6306 int main() {
6307 struct tm *tp; tp->tm_sec;
6308 ; return 0; }
6309 EOF
6310 if { (eval echo configure:6311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6311   rm -rf conftest*
6312   ac_cv_struct_tm=time.h
6313 else
6314   echo "configure: failed program was:" >&5
6315   cat conftest.$ac_ext >&5
6316   rm -rf conftest*
6317   ac_cv_struct_tm=sys/time.h
6318 fi
6319 rm -f conftest*
6320 fi
6321
6322 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6323 if test $ac_cv_struct_tm = sys/time.h; then
6324   cat >> confdefs.h <<\EOF
6325 #define TM_IN_SYS_TIME 1
6326 EOF
6327
6328 fi
6329
6330 echo $ac_n "checking for working const""... $ac_c" 1>&6
6331 echo "configure:6332: checking for working const" >&5
6332 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6333   echo $ac_n "(cached) $ac_c" 1>&6
6334 else
6335   cat > conftest.$ac_ext <<EOF
6336 #line 6337 "configure"
6337 #include "confdefs.h"
6338
6339 int main() {
6340
6341 /* Ultrix mips cc rejects this.  */
6342 typedef int charset[2]; const charset x;
6343 /* SunOS 4.1.1 cc rejects this.  */
6344 char const *const *ccp;
6345 char **p;
6346 /* NEC SVR4.0.2 mips cc rejects this.  */
6347 struct point {int x, y;};
6348 static struct point const zero = {0,0};
6349 /* AIX XL C 1.02.0.0 rejects this.
6350    It does not let you subtract one const X* pointer from another in an arm
6351    of an if-expression whose if-part is not a constant expression */
6352 const char *g = "string";
6353 ccp = &g + (g ? g-g : 0);
6354 /* HPUX 7.0 cc rejects these. */
6355 ++ccp;
6356 p = (char**) ccp;
6357 ccp = (char const *const *) p;
6358 { /* SCO 3.2v4 cc rejects this.  */
6359   char *t;
6360   char const *s = 0 ? (char *) 0 : (char const *) 0;
6361
6362   *t++ = 0;
6363 }
6364 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6365   int x[] = {25, 17};
6366   const int *foo = &x[0];
6367   ++foo;
6368 }
6369 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6370   typedef const int *iptr;
6371   iptr p = 0;
6372   ++p;
6373 }
6374 { /* AIX XL C 1.02.0.0 rejects this saying
6375      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6376   struct s { int j; const int *ap[3]; };
6377   struct s *b; b->j = 5;
6378 }
6379 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6380   const int foo = 10;
6381 }
6382
6383 ; return 0; }
6384 EOF
6385 if { (eval echo configure:6386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6386   rm -rf conftest*
6387   ac_cv_c_const=yes
6388 else
6389   echo "configure: failed program was:" >&5
6390   cat conftest.$ac_ext >&5
6391   rm -rf conftest*
6392   ac_cv_c_const=no
6393 fi
6394 rm -f conftest*
6395 fi
6396
6397 echo "$ac_t""$ac_cv_c_const" 1>&6
6398 if test $ac_cv_c_const = no; then
6399   cat >> confdefs.h <<\EOF
6400 #define const 
6401 EOF
6402
6403 fi
6404
6405
6406
6407 echo $ac_n "checking size of char""... $ac_c" 1>&6
6408 echo "configure:6409: checking size of char" >&5
6409 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   if test "$cross_compiling" = yes; then
6413   ac_cv_sizeof_char=1
6414 else
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 #include <stdio.h>
6419 main()
6420 {
6421   FILE *f=fopen("conftestval", "w");
6422   if (!f) exit(1);
6423   fprintf(f, "%d\n", sizeof(char));
6424   exit(0);
6425 }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6428 then
6429   ac_cv_sizeof_char=`cat conftestval`
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -fr conftest*
6434   ac_cv_sizeof_char=0
6435 fi
6436 rm -fr conftest*
6437 fi
6438
6439 fi
6440 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
6441 cat >> confdefs.h <<EOF
6442 #define SIZEOF_CHAR $ac_cv_sizeof_char
6443 EOF
6444
6445
6446 echo $ac_n "checking size of short int""... $ac_c" 1>&6
6447 echo "configure:6448: checking size of short int" >&5
6448 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
6449   echo $ac_n "(cached) $ac_c" 1>&6
6450 else
6451   if test "$cross_compiling" = yes; then
6452   ac_cv_sizeof_short_int=2
6453 else
6454   cat > conftest.$ac_ext <<EOF
6455 #line 6456 "configure"
6456 #include "confdefs.h"
6457 #include <stdio.h>
6458 main()
6459 {
6460   FILE *f=fopen("conftestval", "w");
6461   if (!f) exit(1);
6462   fprintf(f, "%d\n", sizeof(short int));
6463   exit(0);
6464 }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6467 then
6468   ac_cv_sizeof_short_int=`cat conftestval`
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -fr conftest*
6473   ac_cv_sizeof_short_int=0
6474 fi
6475 rm -fr conftest*
6476 fi
6477
6478 fi
6479 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
6480 cat >> confdefs.h <<EOF
6481 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
6482 EOF
6483
6484
6485 echo $ac_n "checking size of int""... $ac_c" 1>&6
6486 echo "configure:6487: checking size of int" >&5
6487 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   if test "$cross_compiling" = yes; then
6491   ac_cv_sizeof_int=4
6492 else
6493   cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 #include <stdio.h>
6497 main()
6498 {
6499   FILE *f=fopen("conftestval", "w");
6500   if (!f) exit(1);
6501   fprintf(f, "%d\n", sizeof(int));
6502   exit(0);
6503 }
6504 EOF
6505 if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6506 then
6507   ac_cv_sizeof_int=`cat conftestval`
6508 else
6509   echo "configure: failed program was:" >&5
6510   cat conftest.$ac_ext >&5
6511   rm -fr conftest*
6512   ac_cv_sizeof_int=0
6513 fi
6514 rm -fr conftest*
6515 fi
6516
6517 fi
6518 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
6519 cat >> confdefs.h <<EOF
6520 #define SIZEOF_INT $ac_cv_sizeof_int
6521 EOF
6522
6523
6524 echo $ac_n "checking size of long int""... $ac_c" 1>&6
6525 echo "configure:6526: checking size of long int" >&5
6526 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
6527   echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529   if test "$cross_compiling" = yes; then
6530   ac_cv_sizeof_long_int=4
6531 else
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 #include <stdio.h>
6536 main()
6537 {
6538   FILE *f=fopen("conftestval", "w");
6539   if (!f) exit(1);
6540   fprintf(f, "%d\n", sizeof(long int));
6541   exit(0);
6542 }
6543 EOF
6544 if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6545 then
6546   ac_cv_sizeof_long_int=`cat conftestval`
6547 else
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -fr conftest*
6551   ac_cv_sizeof_long_int=0
6552 fi
6553 rm -fr conftest*
6554 fi
6555
6556 fi
6557 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
6558 cat >> confdefs.h <<EOF
6559 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
6560 EOF
6561
6562
6563 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
6564 echo "configure:6565: checking size of long long int" >&5
6565 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
6566   echo $ac_n "(cached) $ac_c" 1>&6
6567 else
6568   if test "$cross_compiling" = yes; then
6569   ac_cv_sizeof_long_long_int=8
6570 else
6571   cat > conftest.$ac_ext <<EOF
6572 #line 6573 "configure"
6573 #include "confdefs.h"
6574 #include <stdio.h>
6575 main()
6576 {
6577   FILE *f=fopen("conftestval", "w");
6578   if (!f) exit(1);
6579   fprintf(f, "%d\n", sizeof(long long int));
6580   exit(0);
6581 }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6584 then
6585   ac_cv_sizeof_long_long_int=`cat conftestval`
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -fr conftest*
6590   ac_cv_sizeof_long_long_int=0
6591 fi
6592 rm -fr conftest*
6593 fi
6594
6595 fi
6596 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
6597 cat >> confdefs.h <<EOF
6598 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
6599 EOF
6600
6601
6602 echo $ac_n "checking size of int *""... $ac_c" 1>&6
6603 echo "configure:6604: checking size of int *" >&5
6604 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
6605   echo $ac_n "(cached) $ac_c" 1>&6
6606 else
6607   if test "$cross_compiling" = yes; then
6608   ac_cv_sizeof_int_p=4
6609 else
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 #include <stdio.h>
6614 main()
6615 {
6616   FILE *f=fopen("conftestval", "w");
6617   if (!f) exit(1);
6618   fprintf(f, "%d\n", sizeof(int *));
6619   exit(0);
6620 }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6623 then
6624   ac_cv_sizeof_int_p=`cat conftestval`
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -fr conftest*
6629   ac_cv_sizeof_int_p=0
6630 fi
6631 rm -fr conftest*
6632 fi
6633
6634 fi
6635 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
6636 cat >> confdefs.h <<EOF
6637 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
6638 EOF
6639
6640
6641
6642 # Check for sys/types.h types
6643 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
6644 echo "configure:6645: checking for u_int type" >&5
6645 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
6646   echo $ac_n "(cached) $ac_c" 1>&6
6647 else
6648   
6649     cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652  #include <sys/types.h> 
6653 int main() {
6654  u_int a; a = 1;
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6658   rm -rf conftest*
6659    ac_cv_have_u_int="yes" 
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664    ac_cv_have_u_int="no" 
6665     
6666 fi
6667 rm -f conftest*
6668
6669 fi
6670
6671 echo "$ac_t""$ac_cv_have_u_int" 1>&6
6672 if test "x$ac_cv_have_u_int" = "xyes" ; then
6673    cat >> confdefs.h <<\EOF
6674 #define HAVE_U_INT 1
6675 EOF
6676
6677    have_u_int=1
6678 fi
6679
6680 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
6681 echo "configure:6682: checking for intmax_t type" >&5
6682 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
6683   echo $ac_n "(cached) $ac_c" 1>&6
6684 else
6685   
6686    cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689  #include <sys/types.h> 
6690 int main() {
6691  intmax_t a; a = 1;
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6695   rm -rf conftest*
6696    ac_cv_have_intmax_t="yes" 
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701    
6702          cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705  #include <stdint.h> 
6706 int main() {
6707  intmax_t a; a = 1;
6708 ; return 0; }
6709 EOF
6710 if { (eval echo configure:6711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6711   rm -rf conftest*
6712    ac_cv_have_intmax_t="yes" 
6713 else
6714   echo "configure: failed program was:" >&5
6715   cat conftest.$ac_ext >&5
6716   rm -rf conftest*
6717    ac_cv_have_intmax_t="no" 
6718          
6719 fi
6720 rm -f conftest*
6721       
6722    
6723 fi
6724 rm -f conftest*     
6725
6726
6727 fi
6728
6729 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
6730 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
6731    cat >> confdefs.h <<\EOF
6732 #define HAVE_INTMAX_T 1
6733 EOF
6734
6735    have_intmax_t=1
6736 fi
6737
6738
6739 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
6740 echo "configure:6741: checking for u_intmax_t type" >&5
6741 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   
6745    cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748  #include <sys/types.h> 
6749 int main() {
6750  u_intmax_t a; a = 1;
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6754   rm -rf conftest*
6755    ac_cv_have_u_intmax_t="yes" 
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760    
6761          cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764  #include <stdint.h> 
6765 int main() {
6766  u_intmax_t a; a = 1;
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6770   rm -rf conftest*
6771    ac_cv_have_u_intmax_t="yes" 
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776    ac_cv_have_u_intmax_t="no" 
6777          
6778 fi
6779 rm -f conftest*
6780       
6781    
6782 fi
6783 rm -f conftest*
6784
6785 fi
6786
6787 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
6788 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
6789    cat >> confdefs.h <<\EOF
6790 #define HAVE_U_INTMAX_T 1
6791 EOF
6792
6793    have_u_intmax_t=1
6794 fi
6795
6796
6797 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
6798 echo "configure:6799: checking for intXX_t types" >&5
6799 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   
6803    cat > conftest.$ac_ext <<EOF
6804 #line 6805 "configure"
6805 #include "confdefs.h"
6806  #include <sys/types.h> 
6807 int main() {
6808  int8_t a; int16_t b; int32_t c; a = b = c = 1;
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6812   rm -rf conftest*
6813    ac_cv_have_intxx_t="yes" 
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818    ac_cv_have_intxx_t="no" 
6819    
6820 fi
6821 rm -f conftest*
6822
6823 fi
6824
6825 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
6826 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
6827    cat >> confdefs.h <<\EOF
6828 #define HAVE_INTXX_T 1
6829 EOF
6830
6831    have_intxx_t=1
6832 fi
6833         
6834 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
6835 echo "configure:6836: checking for int64_t type" >&5
6836 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
6837   echo $ac_n "(cached) $ac_c" 1>&6
6838 else
6839   
6840    cat > conftest.$ac_ext <<EOF
6841 #line 6842 "configure"
6842 #include "confdefs.h"
6843  #include <sys/types.h> 
6844 int main() {
6845  int64_t a; a = 1;
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6849   rm -rf conftest*
6850    ac_cv_have_int64_t="yes" 
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855    ac_cv_have_int64_t="no" 
6856    
6857 fi
6858 rm -f conftest*
6859
6860 fi
6861
6862 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
6863 if test "x$ac_cv_have_int64_t" = "xyes" ; then
6864    cat >> confdefs.h <<\EOF
6865 #define HAVE_INT64_T 1
6866 EOF
6867
6868    have_int64_t=1
6869 fi
6870         
6871 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
6872 echo "configure:6873: checking for u_intXX_t types" >&5
6873 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   
6877    cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880  #include <sys/types.h> 
6881 int main() {
6882  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6886   rm -rf conftest*
6887    ac_cv_have_u_intxx_t="yes" 
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892    ac_cv_have_u_intxx_t="no" 
6893    
6894 fi
6895 rm -f conftest*
6896
6897 fi
6898
6899 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
6900 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
6901    cat >> confdefs.h <<\EOF
6902 #define HAVE_U_INTXX_T 1
6903 EOF
6904
6905    have_u_intxx_t=1
6906 fi
6907
6908 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
6909 echo "configure:6910: checking for u_int64_t types" >&5
6910 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
6911   echo $ac_n "(cached) $ac_c" 1>&6
6912 else
6913   
6914    cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917  #include <sys/types.h> 
6918 int main() {
6919  u_int64_t a; a = 1;
6920 ; return 0; }
6921 EOF
6922 if { (eval echo configure:6923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6923   rm -rf conftest*
6924    ac_cv_have_u_int64_t="yes" 
6925 else
6926   echo "configure: failed program was:" >&5
6927   cat conftest.$ac_ext >&5
6928   rm -rf conftest*
6929    ac_cv_have_u_int64_t="no" 
6930    
6931 fi
6932 rm -f conftest*
6933
6934 fi
6935
6936 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
6937 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
6938    cat >> confdefs.h <<\EOF
6939 #define HAVE_U_INT64_T 1
6940 EOF
6941
6942    have_u_int64_t=1
6943 fi
6944
6945 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
6946            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
6947 then
6948    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
6949 echo "configure:6950: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
6950    cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953  #include <sys/bitypes.h>  
6954 int main() {
6955  int8_t a; int16_t b; int32_t c;
6956         u_int8_t e; u_int16_t f; u_int32_t g;
6957         a = b = c = e = f = g = 1;  
6958 ; return 0; }
6959 EOF
6960 if { (eval echo configure:6961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6961   rm -rf conftest*
6962    cat >> confdefs.h <<\EOF
6963 #define HAVE_U_INTXX_T 1
6964 EOF
6965
6966         cat >> confdefs.h <<\EOF
6967 #define HAVE_INTXX_T 1
6968 EOF
6969
6970         cat >> confdefs.h <<\EOF
6971 #define HAVE_SYS_BITYPES_H 1
6972 EOF
6973
6974         echo "$ac_t""yes" 1>&6 
6975 else
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979    echo "$ac_t""no" 1>&6
6980    
6981 fi
6982 rm -f conftest* 
6983 fi
6984
6985 if test -z "$have_u_intxx_t" ; then
6986    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
6987 echo "configure:6988: checking for uintXX_t types" >&5
6988 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
6989   echo $ac_n "(cached) $ac_c" 1>&6
6990 else
6991   
6992       cat > conftest.$ac_ext <<EOF
6993 #line 6994 "configure"
6994 #include "confdefs.h"
6995  #include <sys/types.h> 
6996 int main() {
6997  uint8_t a; uint16_t b; 
6998            uint32_t c; a = b = c = 1; 
6999 ; return 0; }
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7002   rm -rf conftest*
7003    ac_cv_have_uintxx_t="yes" 
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008    ac_cv_have_uintxx_t="no" 
7009       
7010 fi
7011 rm -f conftest*
7012    
7013 fi
7014
7015 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
7016    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
7017       cat >> confdefs.h <<\EOF
7018 #define HAVE_UINTXX_T 1
7019 EOF
7020
7021    fi
7022 fi
7023
7024
7025 for ac_func in \
7026         fork \
7027         getcwd \
7028         gethostname \
7029         getpid \
7030         setpgid \
7031         setpgrp \
7032         setsid \
7033         signal \
7034         strerror \
7035         strncmp \
7036         strncpy \
7037         vfprintf \
7038         
7039 do
7040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7041 echo "configure:7042: checking for $ac_func" >&5
7042 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 /* System header to define __stub macros and hopefully few prototypes,
7049     which can conflict with char $ac_func(); below.  */
7050 #include <assert.h>
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char $ac_func();
7055
7056 int main() {
7057
7058 /* The GNU C library defines this for functions which it implements
7059     to always fail with ENOSYS.  Some functions are actually named
7060     something starting with __ and the normal name is an alias.  */
7061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7062 choke me
7063 #else
7064 $ac_func();
7065 #endif
7066
7067 ; return 0; }
7068 EOF
7069 if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7070   rm -rf conftest*
7071   eval "ac_cv_func_$ac_func=yes"
7072 else
7073   echo "configure: failed program was:" >&5
7074   cat conftest.$ac_ext >&5
7075   rm -rf conftest*
7076   eval "ac_cv_func_$ac_func=no"
7077 fi
7078 rm -f conftest*
7079 fi
7080
7081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7082   echo "$ac_t""yes" 1>&6
7083     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7084   cat >> confdefs.h <<EOF
7085 #define $ac_tr_func 1
7086 EOF
7087  
7088 else
7089   echo "$ac_t""no" 1>&6
7090 echo 'configure: cannot find needed function.'; exit 1
7091
7092 fi
7093 done
7094
7095
7096 for ac_func in fchdir
7097 do
7098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7099 echo "configure:7100: checking for $ac_func" >&5
7100 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7101   echo $ac_n "(cached) $ac_c" 1>&6
7102 else
7103   cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106 /* System header to define __stub macros and hopefully few prototypes,
7107     which can conflict with char $ac_func(); below.  */
7108 #include <assert.h>
7109 /* Override any gcc2 internal prototype to avoid an error.  */
7110 /* We use char because int might match the return type of a gcc2
7111     builtin and then its argument prototype would still apply.  */
7112 char $ac_func();
7113
7114 int main() {
7115
7116 /* The GNU C library defines this for functions which it implements
7117     to always fail with ENOSYS.  Some functions are actually named
7118     something starting with __ and the normal name is an alias.  */
7119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7120 choke me
7121 #else
7122 $ac_func();
7123 #endif
7124
7125 ; return 0; }
7126 EOF
7127 if { (eval echo configure:7128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7128   rm -rf conftest*
7129   eval "ac_cv_func_$ac_func=yes"
7130 else
7131   echo "configure: failed program was:" >&5
7132   cat conftest.$ac_ext >&5
7133   rm -rf conftest*
7134   eval "ac_cv_func_$ac_func=no"
7135 fi
7136 rm -f conftest*
7137 fi
7138
7139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7140   echo "$ac_t""yes" 1>&6
7141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7142   cat >> confdefs.h <<EOF
7143 #define $ac_tr_func 1
7144 EOF
7145  cat >> confdefs.h <<\EOF
7146 #define HAVE_FCHDIR 1
7147 EOF
7148
7149 else
7150   echo "$ac_t""no" 1>&6
7151 fi
7152 done
7153
7154
7155 for ac_func in snprintf vsnprintf
7156 do
7157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7158 echo "configure:7159: checking for $ac_func" >&5
7159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7160   echo $ac_n "(cached) $ac_c" 1>&6
7161 else
7162   cat > conftest.$ac_ext <<EOF
7163 #line 7164 "configure"
7164 #include "confdefs.h"
7165 /* System header to define __stub macros and hopefully few prototypes,
7166     which can conflict with char $ac_func(); below.  */
7167 #include <assert.h>
7168 /* Override any gcc2 internal prototype to avoid an error.  */
7169 /* We use char because int might match the return type of a gcc2
7170     builtin and then its argument prototype would still apply.  */
7171 char $ac_func();
7172
7173 int main() {
7174
7175 /* The GNU C library defines this for functions which it implements
7176     to always fail with ENOSYS.  Some functions are actually named
7177     something starting with __ and the normal name is an alias.  */
7178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7179 choke me
7180 #else
7181 $ac_func();
7182 #endif
7183
7184 ; return 0; }
7185 EOF
7186 if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7187   rm -rf conftest*
7188   eval "ac_cv_func_$ac_func=yes"
7189 else
7190   echo "configure: failed program was:" >&5
7191   cat conftest.$ac_ext >&5
7192   rm -rf conftest*
7193   eval "ac_cv_func_$ac_func=no"
7194 fi
7195 rm -f conftest*
7196 fi
7197
7198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7199   echo "$ac_t""yes" 1>&6
7200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7201   cat >> confdefs.h <<EOF
7202 #define $ac_tr_func 1
7203 EOF
7204  
7205 else
7206   echo "$ac_t""no" 1>&6
7207 fi
7208 done
7209
7210
7211 for ac_func in localtime_r
7212 do
7213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7214 echo "configure:7215: checking for $ac_func" >&5
7215 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7216   echo $ac_n "(cached) $ac_c" 1>&6
7217 else
7218   cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221 /* System header to define __stub macros and hopefully few prototypes,
7222     which can conflict with char $ac_func(); below.  */
7223 #include <assert.h>
7224 /* Override any gcc2 internal prototype to avoid an error.  */
7225 /* We use char because int might match the return type of a gcc2
7226     builtin and then its argument prototype would still apply.  */
7227 char $ac_func();
7228
7229 int main() {
7230
7231 /* The GNU C library defines this for functions which it implements
7232     to always fail with ENOSYS.  Some functions are actually named
7233     something starting with __ and the normal name is an alias.  */
7234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7235 choke me
7236 #else
7237 $ac_func();
7238 #endif
7239
7240 ; return 0; }
7241 EOF
7242 if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7243   rm -rf conftest*
7244   eval "ac_cv_func_$ac_func=yes"
7245 else
7246   echo "configure: failed program was:" >&5
7247   cat conftest.$ac_ext >&5
7248   rm -rf conftest*
7249   eval "ac_cv_func_$ac_func=no"
7250 fi
7251 rm -f conftest*
7252 fi
7253
7254 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7255   echo "$ac_t""yes" 1>&6
7256     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7257   cat >> confdefs.h <<EOF
7258 #define $ac_tr_func 1
7259 EOF
7260  cat >> confdefs.h <<\EOF
7261 #define HAVE_LOCALTIME_R 1
7262 EOF
7263
7264 else
7265   echo "$ac_t""no" 1>&6
7266 fi
7267 done
7268
7269
7270 for ac_func in readdir_r
7271 do
7272 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7273 echo "configure:7274: checking for $ac_func" >&5
7274 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7275   echo $ac_n "(cached) $ac_c" 1>&6
7276 else
7277   cat > conftest.$ac_ext <<EOF
7278 #line 7279 "configure"
7279 #include "confdefs.h"
7280 /* System header to define __stub macros and hopefully few prototypes,
7281     which can conflict with char $ac_func(); below.  */
7282 #include <assert.h>
7283 /* Override any gcc2 internal prototype to avoid an error.  */
7284 /* We use char because int might match the return type of a gcc2
7285     builtin and then its argument prototype would still apply.  */
7286 char $ac_func();
7287
7288 int main() {
7289
7290 /* The GNU C library defines this for functions which it implements
7291     to always fail with ENOSYS.  Some functions are actually named
7292     something starting with __ and the normal name is an alias.  */
7293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7294 choke me
7295 #else
7296 $ac_func();
7297 #endif
7298
7299 ; return 0; }
7300 EOF
7301 if { (eval echo configure:7302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7302   rm -rf conftest*
7303   eval "ac_cv_func_$ac_func=yes"
7304 else
7305   echo "configure: failed program was:" >&5
7306   cat conftest.$ac_ext >&5
7307   rm -rf conftest*
7308   eval "ac_cv_func_$ac_func=no"
7309 fi
7310 rm -f conftest*
7311 fi
7312
7313 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7314   echo "$ac_t""yes" 1>&6
7315     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7316   cat >> confdefs.h <<EOF
7317 #define $ac_tr_func 1
7318 EOF
7319  cat >> confdefs.h <<\EOF
7320 #define HAVE_READDIR_R 1
7321 EOF
7322
7323 else
7324   echo "$ac_t""no" 1>&6
7325 fi
7326 done
7327
7328
7329 # Find where sockets are (especially for Solaris)
7330 echo $ac_n "checking for socket""... $ac_c" 1>&6
7331 echo "configure:7332: checking for socket" >&5
7332 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7333   echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335   cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 /* System header to define __stub macros and hopefully few prototypes,
7339     which can conflict with char socket(); below.  */
7340 #include <assert.h>
7341 /* Override any gcc2 internal prototype to avoid an error.  */
7342 /* We use char because int might match the return type of a gcc2
7343     builtin and then its argument prototype would still apply.  */
7344 char socket();
7345
7346 int main() {
7347
7348 /* The GNU C library defines this for functions which it implements
7349     to always fail with ENOSYS.  Some functions are actually named
7350     something starting with __ and the normal name is an alias.  */
7351 #if defined (__stub_socket) || defined (__stub___socket)
7352 choke me
7353 #else
7354 socket();
7355 #endif
7356
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_func_socket=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_func_socket=no"
7367 fi
7368 rm -f conftest*
7369 fi
7370
7371 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373   echo "$ac_t""using libc's socket" 1>&6
7374 else
7375   echo "$ac_t""no" 1>&6
7376 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
7377 echo "configure:7378: checking for socket in -lxnet" >&5
7378 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
7379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7380   echo $ac_n "(cached) $ac_c" 1>&6
7381 else
7382   ac_save_LIBS="$LIBS"
7383 LIBS="-lxnet  $LIBS"
7384 cat > conftest.$ac_ext <<EOF
7385 #line 7386 "configure"
7386 #include "confdefs.h"
7387 /* Override any gcc2 internal prototype to avoid an error.  */
7388 /* We use char because int might match the return type of a gcc2
7389     builtin and then its argument prototype would still apply.  */
7390 char socket();
7391
7392 int main() {
7393 socket()
7394 ; return 0; }
7395 EOF
7396 if { (eval echo configure:7397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7397   rm -rf conftest*
7398   eval "ac_cv_lib_$ac_lib_var=yes"
7399 else
7400   echo "configure: failed program was:" >&5
7401   cat conftest.$ac_ext >&5
7402   rm -rf conftest*
7403   eval "ac_cv_lib_$ac_lib_var=no"
7404 fi
7405 rm -f conftest*
7406 LIBS="$ac_save_LIBS"
7407
7408 fi
7409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7410   echo "$ac_t""yes" 1>&6
7411     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
7412     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7413   cat >> confdefs.h <<EOF
7414 #define $ac_tr_lib 1
7415 EOF
7416
7417   LIBS="-lxnet $LIBS"
7418
7419 else
7420   echo "$ac_t""no" 1>&6
7421 fi
7422
7423     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
7424 echo "configure:7425: checking for socket in -lsocket" >&5
7425 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
7426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7427   echo $ac_n "(cached) $ac_c" 1>&6
7428 else
7429   ac_save_LIBS="$LIBS"
7430 LIBS="-lsocket  $LIBS"
7431 cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 /* Override any gcc2 internal prototype to avoid an error.  */
7435 /* We use char because int might match the return type of a gcc2
7436     builtin and then its argument prototype would still apply.  */
7437 char socket();
7438
7439 int main() {
7440 socket()
7441 ; return 0; }
7442 EOF
7443 if { (eval echo configure:7444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7444   rm -rf conftest*
7445   eval "ac_cv_lib_$ac_lib_var=yes"
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   eval "ac_cv_lib_$ac_lib_var=no"
7451 fi
7452 rm -f conftest*
7453 LIBS="$ac_save_LIBS"
7454
7455 fi
7456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7457   echo "$ac_t""yes" 1>&6
7458     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
7459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7460   cat >> confdefs.h <<EOF
7461 #define $ac_tr_lib 1
7462 EOF
7463
7464   LIBS="-lsocket $LIBS"
7465
7466 else
7467   echo "$ac_t""no" 1>&6
7468 fi
7469
7470     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
7471 echo "configure:7472: checking for socket in -linet" >&5
7472 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
7473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7474   echo $ac_n "(cached) $ac_c" 1>&6
7475 else
7476   ac_save_LIBS="$LIBS"
7477 LIBS="-linet  $LIBS"
7478 cat > conftest.$ac_ext <<EOF
7479 #line 7480 "configure"
7480 #include "confdefs.h"
7481 /* Override any gcc2 internal prototype to avoid an error.  */
7482 /* We use char because int might match the return type of a gcc2
7483     builtin and then its argument prototype would still apply.  */
7484 char socket();
7485
7486 int main() {
7487 socket()
7488 ; return 0; }
7489 EOF
7490 if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7491   rm -rf conftest*
7492   eval "ac_cv_lib_$ac_lib_var=yes"
7493 else
7494   echo "configure: failed program was:" >&5
7495   cat conftest.$ac_ext >&5
7496   rm -rf conftest*
7497   eval "ac_cv_lib_$ac_lib_var=no"
7498 fi
7499 rm -f conftest*
7500 LIBS="$ac_save_LIBS"
7501
7502 fi
7503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7504   echo "$ac_t""yes" 1>&6
7505     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
7506     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7507   cat >> confdefs.h <<EOF
7508 #define $ac_tr_lib 1
7509 EOF
7510
7511   LIBS="-linet $LIBS"
7512
7513 else
7514   echo "$ac_t""no" 1>&6
7515 fi
7516
7517 fi
7518
7519
7520 # If resolver functions are not in libc check for -lnsl or -lresolv.
7521 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
7522 echo "configure:7523: checking for gethostbyname" >&5
7523 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* System header to define __stub macros and hopefully few prototypes,
7530     which can conflict with char gethostbyname(); below.  */
7531 #include <assert.h>
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 /* We use char because int might match the return type of a gcc2
7534     builtin and then its argument prototype would still apply.  */
7535 char gethostbyname();
7536
7537 int main() {
7538
7539 /* The GNU C library defines this for functions which it implements
7540     to always fail with ENOSYS.  Some functions are actually named
7541     something starting with __ and the normal name is an alias.  */
7542 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7543 choke me
7544 #else
7545 gethostbyname();
7546 #endif
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   eval "ac_cv_func_gethostbyname=yes"
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   eval "ac_cv_func_gethostbyname=no"
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
7563   echo "$ac_t""yes" 1>&6
7564   echo "$ac_t""using libc's resolver" 1>&6
7565 else
7566   echo "$ac_t""no" 1>&6
7567 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
7568 echo "configure:7569: checking for gethostbyname in -lnsl" >&5
7569 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
7570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7571   echo $ac_n "(cached) $ac_c" 1>&6
7572 else
7573   ac_save_LIBS="$LIBS"
7574 LIBS="-lnsl  $LIBS"
7575 cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 /* Override any gcc2 internal prototype to avoid an error.  */
7579 /* We use char because int might match the return type of a gcc2
7580     builtin and then its argument prototype would still apply.  */
7581 char gethostbyname();
7582
7583 int main() {
7584 gethostbyname()
7585 ; return 0; }
7586 EOF
7587 if { (eval echo configure:7588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7588   rm -rf conftest*
7589   eval "ac_cv_lib_$ac_lib_var=yes"
7590 else
7591   echo "configure: failed program was:" >&5
7592   cat conftest.$ac_ext >&5
7593   rm -rf conftest*
7594   eval "ac_cv_lib_$ac_lib_var=no"
7595 fi
7596 rm -f conftest*
7597 LIBS="$ac_save_LIBS"
7598
7599 fi
7600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7601   echo "$ac_t""yes" 1>&6
7602     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
7603     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7604   cat >> confdefs.h <<EOF
7605 #define $ac_tr_lib 1
7606 EOF
7607
7608   LIBS="-lnsl $LIBS"
7609
7610 else
7611   echo "$ac_t""no" 1>&6
7612 fi
7613
7614     echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
7615 echo "configure:7616: checking for gethostbyname in -lresolv" >&5
7616 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
7617 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7618   echo $ac_n "(cached) $ac_c" 1>&6
7619 else
7620   ac_save_LIBS="$LIBS"
7621 LIBS="-lresolv  $LIBS"
7622 cat > conftest.$ac_ext <<EOF
7623 #line 7624 "configure"
7624 #include "confdefs.h"
7625 /* Override any gcc2 internal prototype to avoid an error.  */
7626 /* We use char because int might match the return type of a gcc2
7627     builtin and then its argument prototype would still apply.  */
7628 char gethostbyname();
7629
7630 int main() {
7631 gethostbyname()
7632 ; return 0; }
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7635   rm -rf conftest*
7636   eval "ac_cv_lib_$ac_lib_var=yes"
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   eval "ac_cv_lib_$ac_lib_var=no"
7642 fi
7643 rm -f conftest*
7644 LIBS="$ac_save_LIBS"
7645
7646 fi
7647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7648   echo "$ac_t""yes" 1>&6
7649     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
7650     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7651   cat >> confdefs.h <<EOF
7652 #define $ac_tr_lib 1
7653 EOF
7654
7655   LIBS="-lresolv $LIBS"
7656
7657 else
7658   echo "$ac_t""no" 1>&6
7659 fi
7660
7661 fi
7662
7663
7664
7665 echo $ac_n "checking for strftime""... $ac_c" 1>&6
7666 echo "configure:7667: checking for strftime" >&5
7667 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
7668   echo $ac_n "(cached) $ac_c" 1>&6
7669 else
7670   cat > conftest.$ac_ext <<EOF
7671 #line 7672 "configure"
7672 #include "confdefs.h"
7673 /* System header to define __stub macros and hopefully few prototypes,
7674     which can conflict with char strftime(); below.  */
7675 #include <assert.h>
7676 /* Override any gcc2 internal prototype to avoid an error.  */
7677 /* We use char because int might match the return type of a gcc2
7678     builtin and then its argument prototype would still apply.  */
7679 char strftime();
7680
7681 int main() {
7682
7683 /* The GNU C library defines this for functions which it implements
7684     to always fail with ENOSYS.  Some functions are actually named
7685     something starting with __ and the normal name is an alias.  */
7686 #if defined (__stub_strftime) || defined (__stub___strftime)
7687 choke me
7688 #else
7689 strftime();
7690 #endif
7691
7692 ; return 0; }
7693 EOF
7694 if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7695   rm -rf conftest*
7696   eval "ac_cv_func_strftime=yes"
7697 else
7698   echo "configure: failed program was:" >&5
7699   cat conftest.$ac_ext >&5
7700   rm -rf conftest*
7701   eval "ac_cv_func_strftime=no"
7702 fi
7703 rm -f conftest*
7704 fi
7705
7706 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
7707   echo "$ac_t""yes" 1>&6
7708   cat >> confdefs.h <<\EOF
7709 #define HAVE_STRFTIME 1
7710 EOF
7711
7712 else
7713   echo "$ac_t""no" 1>&6
7714 # strftime is in -lintl on SCO UNIX.
7715 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
7716 echo "configure:7717: checking for strftime in -lintl" >&5
7717 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
7718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7719   echo $ac_n "(cached) $ac_c" 1>&6
7720 else
7721   ac_save_LIBS="$LIBS"
7722 LIBS="-lintl  $LIBS"
7723 cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* Override any gcc2 internal prototype to avoid an error.  */
7727 /* We use char because int might match the return type of a gcc2
7728     builtin and then its argument prototype would still apply.  */
7729 char strftime();
7730
7731 int main() {
7732 strftime()
7733 ; return 0; }
7734 EOF
7735 if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7736   rm -rf conftest*
7737   eval "ac_cv_lib_$ac_lib_var=yes"
7738 else
7739   echo "configure: failed program was:" >&5
7740   cat conftest.$ac_ext >&5
7741   rm -rf conftest*
7742   eval "ac_cv_lib_$ac_lib_var=no"
7743 fi
7744 rm -f conftest*
7745 LIBS="$ac_save_LIBS"
7746
7747 fi
7748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7749   echo "$ac_t""yes" 1>&6
7750   cat >> confdefs.h <<\EOF
7751 #define HAVE_STRFTIME 1
7752 EOF
7753
7754 LIBS="-lintl $LIBS"
7755 else
7756   echo "$ac_t""no" 1>&6
7757 fi
7758
7759 fi
7760
7761 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
7762 echo "configure:7763: checking for vprintf" >&5
7763 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
7764   echo $ac_n "(cached) $ac_c" 1>&6
7765 else
7766   cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 /* System header to define __stub macros and hopefully few prototypes,
7770     which can conflict with char vprintf(); below.  */
7771 #include <assert.h>
7772 /* Override any gcc2 internal prototype to avoid an error.  */
7773 /* We use char because int might match the return type of a gcc2
7774     builtin and then its argument prototype would still apply.  */
7775 char vprintf();
7776
7777 int main() {
7778
7779 /* The GNU C library defines this for functions which it implements
7780     to always fail with ENOSYS.  Some functions are actually named
7781     something starting with __ and the normal name is an alias.  */
7782 #if defined (__stub_vprintf) || defined (__stub___vprintf)
7783 choke me
7784 #else
7785 vprintf();
7786 #endif
7787
7788 ; return 0; }
7789 EOF
7790 if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7791   rm -rf conftest*
7792   eval "ac_cv_func_vprintf=yes"
7793 else
7794   echo "configure: failed program was:" >&5
7795   cat conftest.$ac_ext >&5
7796   rm -rf conftest*
7797   eval "ac_cv_func_vprintf=no"
7798 fi
7799 rm -f conftest*
7800 fi
7801
7802 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
7803   echo "$ac_t""yes" 1>&6
7804   cat >> confdefs.h <<\EOF
7805 #define HAVE_VPRINTF 1
7806 EOF
7807
7808 else
7809   echo "$ac_t""no" 1>&6
7810 fi
7811
7812 if test "$ac_cv_func_vprintf" != yes; then
7813 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
7814 echo "configure:7815: checking for _doprnt" >&5
7815 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
7816   echo $ac_n "(cached) $ac_c" 1>&6
7817 else
7818   cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* System header to define __stub macros and hopefully few prototypes,
7822     which can conflict with char _doprnt(); below.  */
7823 #include <assert.h>
7824 /* Override any gcc2 internal prototype to avoid an error.  */
7825 /* We use char because int might match the return type of a gcc2
7826     builtin and then its argument prototype would still apply.  */
7827 char _doprnt();
7828
7829 int main() {
7830
7831 /* The GNU C library defines this for functions which it implements
7832     to always fail with ENOSYS.  Some functions are actually named
7833     something starting with __ and the normal name is an alias.  */
7834 #if defined (__stub__doprnt) || defined (__stub____doprnt)
7835 choke me
7836 #else
7837 _doprnt();
7838 #endif
7839
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7843   rm -rf conftest*
7844   eval "ac_cv_func__doprnt=yes"
7845 else
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849   eval "ac_cv_func__doprnt=no"
7850 fi
7851 rm -f conftest*
7852 fi
7853
7854 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
7855   echo "$ac_t""yes" 1>&6
7856   cat >> confdefs.h <<\EOF
7857 #define HAVE_DOPRNT 1
7858 EOF
7859
7860 else
7861   echo "$ac_t""no" 1>&6
7862 fi
7863
7864 fi
7865
7866 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7867 # for constant arguments.  Useless!
7868 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
7869 echo "configure:7870: checking for working alloca.h" >&5
7870 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876 #include <alloca.h>
7877 int main() {
7878 char *p = alloca(2 * sizeof(int));
7879 ; return 0; }
7880 EOF
7881 if { (eval echo configure:7882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7882   rm -rf conftest*
7883   ac_cv_header_alloca_h=yes
7884 else
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   ac_cv_header_alloca_h=no
7889 fi
7890 rm -f conftest*
7891 fi
7892
7893 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
7894 if test $ac_cv_header_alloca_h = yes; then
7895   cat >> confdefs.h <<\EOF
7896 #define HAVE_ALLOCA_H 1
7897 EOF
7898
7899 fi
7900
7901 echo $ac_n "checking for alloca""... $ac_c" 1>&6
7902 echo "configure:7903: checking for alloca" >&5
7903 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
7904   echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909
7910 #ifdef __GNUC__
7911 # define alloca __builtin_alloca
7912 #else
7913 # ifdef _MSC_VER
7914 #  include <malloc.h>
7915 #  define alloca _alloca
7916 # else
7917 #  if HAVE_ALLOCA_H
7918 #   include <alloca.h>
7919 #  else
7920 #   ifdef _AIX
7921  #pragma alloca
7922 #   else
7923 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7924 char *alloca ();
7925 #    endif
7926 #   endif
7927 #  endif
7928 # endif
7929 #endif
7930
7931 int main() {
7932 char *p = (char *) alloca(1);
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   ac_cv_func_alloca_works=yes
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   ac_cv_func_alloca_works=no
7943 fi
7944 rm -f conftest*
7945 fi
7946
7947 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
7948 if test $ac_cv_func_alloca_works = yes; then
7949   cat >> confdefs.h <<\EOF
7950 #define HAVE_ALLOCA 1
7951 EOF
7952
7953 fi
7954
7955 if test $ac_cv_func_alloca_works = no; then
7956   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7957   # that cause trouble.  Some versions do not even contain alloca or
7958   # contain a buggy version.  If you still want to use their alloca,
7959   # use ar to extract alloca.o from them instead of compiling alloca.c.
7960   ALLOCA=alloca.${ac_objext}
7961   cat >> confdefs.h <<\EOF
7962 #define C_ALLOCA 1
7963 EOF
7964
7965
7966 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
7967 echo "configure:7968: checking whether alloca needs Cray hooks" >&5
7968 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
7969   echo $ac_n "(cached) $ac_c" 1>&6
7970 else
7971   cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974 #if defined(CRAY) && ! defined(CRAY2)
7975 webecray
7976 #else
7977 wenotbecray
7978 #endif
7979
7980 EOF
7981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7982   egrep "webecray" >/dev/null 2>&1; then
7983   rm -rf conftest*
7984   ac_cv_os_cray=yes
7985 else
7986   rm -rf conftest*
7987   ac_cv_os_cray=no
7988 fi
7989 rm -f conftest*
7990
7991 fi
7992
7993 echo "$ac_t""$ac_cv_os_cray" 1>&6
7994 if test $ac_cv_os_cray = yes; then
7995 for ac_func in _getb67 GETB67 getb67; do
7996   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7997 echo "configure:7998: checking for $ac_func" >&5
7998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* System header to define __stub macros and hopefully few prototypes,
8005     which can conflict with char $ac_func(); below.  */
8006 #include <assert.h>
8007 /* Override any gcc2 internal prototype to avoid an error.  */
8008 /* We use char because int might match the return type of a gcc2
8009     builtin and then its argument prototype would still apply.  */
8010 char $ac_func();
8011
8012 int main() {
8013
8014 /* The GNU C library defines this for functions which it implements
8015     to always fail with ENOSYS.  Some functions are actually named
8016     something starting with __ and the normal name is an alias.  */
8017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8018 choke me
8019 #else
8020 $ac_func();
8021 #endif
8022
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_func_$ac_func=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_func_$ac_func=no"
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039   cat >> confdefs.h <<EOF
8040 #define CRAY_STACKSEG_END $ac_func
8041 EOF
8042
8043   break
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047
8048 done
8049 fi
8050
8051 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8052 echo "configure:8053: checking stack direction for C alloca" >&5
8053 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   if test "$cross_compiling" = yes; then
8057   ac_cv_c_stack_direction=0
8058 else
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062 find_stack_direction ()
8063 {
8064   static char *addr = 0;
8065   auto char dummy;
8066   if (addr == 0)
8067     {
8068       addr = &dummy;
8069       return find_stack_direction ();
8070     }
8071   else
8072     return (&dummy > addr) ? 1 : -1;
8073 }
8074 main ()
8075 {
8076   exit (find_stack_direction() < 0);
8077 }
8078 EOF
8079 if { (eval echo configure:8080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8080 then
8081   ac_cv_c_stack_direction=1
8082 else
8083   echo "configure: failed program was:" >&5
8084   cat conftest.$ac_ext >&5
8085   rm -fr conftest*
8086   ac_cv_c_stack_direction=-1
8087 fi
8088 rm -fr conftest*
8089 fi
8090
8091 fi
8092
8093 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8094 cat >> confdefs.h <<EOF
8095 #define STACK_DIRECTION $ac_cv_c_stack_direction
8096 EOF
8097
8098 fi
8099
8100 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
8101 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
8102 echo "configure:8103: checking for getmntent in -lsun" >&5
8103 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
8104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   ac_save_LIBS="$LIBS"
8108 LIBS="-lsun  $LIBS"
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* Override any gcc2 internal prototype to avoid an error.  */
8113 /* We use char because int might match the return type of a gcc2
8114     builtin and then its argument prototype would still apply.  */
8115 char getmntent();
8116
8117 int main() {
8118 getmntent()
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=yes"
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=no"
8129 fi
8130 rm -f conftest*
8131 LIBS="$ac_save_LIBS"
8132
8133 fi
8134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8135   echo "$ac_t""yes" 1>&6
8136   LIBS="-lsun $LIBS"
8137 else
8138   echo "$ac_t""no" 1>&6
8139 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
8140 echo "configure:8141: checking for getmntent in -lseq" >&5
8141 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
8142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   ac_save_LIBS="$LIBS"
8146 LIBS="-lseq  $LIBS"
8147 cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150 /* Override any gcc2 internal prototype to avoid an error.  */
8151 /* We use char because int might match the return type of a gcc2
8152     builtin and then its argument prototype would still apply.  */
8153 char getmntent();
8154
8155 int main() {
8156 getmntent()
8157 ; return 0; }
8158 EOF
8159 if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8160   rm -rf conftest*
8161   eval "ac_cv_lib_$ac_lib_var=yes"
8162 else
8163   echo "configure: failed program was:" >&5
8164   cat conftest.$ac_ext >&5
8165   rm -rf conftest*
8166   eval "ac_cv_lib_$ac_lib_var=no"
8167 fi
8168 rm -f conftest*
8169 LIBS="$ac_save_LIBS"
8170
8171 fi
8172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8173   echo "$ac_t""yes" 1>&6
8174   LIBS="-lseq $LIBS"
8175 else
8176   echo "$ac_t""no" 1>&6
8177 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
8178 echo "configure:8179: checking for getmntent in -lgen" >&5
8179 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
8180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   ac_save_LIBS="$LIBS"
8184 LIBS="-lgen  $LIBS"
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* Override any gcc2 internal prototype to avoid an error.  */
8189 /* We use char because int might match the return type of a gcc2
8190     builtin and then its argument prototype would still apply.  */
8191 char getmntent();
8192
8193 int main() {
8194 getmntent()
8195 ; return 0; }
8196 EOF
8197 if { (eval echo configure:8198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8198   rm -rf conftest*
8199   eval "ac_cv_lib_$ac_lib_var=yes"
8200 else
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=no"
8205 fi
8206 rm -f conftest*
8207 LIBS="$ac_save_LIBS"
8208
8209 fi
8210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8211   echo "$ac_t""yes" 1>&6
8212   LIBS="-lgen $LIBS"
8213 else
8214   echo "$ac_t""no" 1>&6
8215 fi
8216
8217 fi
8218
8219 fi
8220
8221 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
8222 echo "configure:8223: checking for getmntent" >&5
8223 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* System header to define __stub macros and hopefully few prototypes,
8230     which can conflict with char getmntent(); below.  */
8231 #include <assert.h>
8232 /* Override any gcc2 internal prototype to avoid an error.  */
8233 /* We use char because int might match the return type of a gcc2
8234     builtin and then its argument prototype would still apply.  */
8235 char getmntent();
8236
8237 int main() {
8238
8239 /* The GNU C library defines this for functions which it implements
8240     to always fail with ENOSYS.  Some functions are actually named
8241     something starting with __ and the normal name is an alias.  */
8242 #if defined (__stub_getmntent) || defined (__stub___getmntent)
8243 choke me
8244 #else
8245 getmntent();
8246 #endif
8247
8248 ; return 0; }
8249 EOF
8250 if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8251   rm -rf conftest*
8252   eval "ac_cv_func_getmntent=yes"
8253 else
8254   echo "configure: failed program was:" >&5
8255   cat conftest.$ac_ext >&5
8256   rm -rf conftest*
8257   eval "ac_cv_func_getmntent=no"
8258 fi
8259 rm -f conftest*
8260 fi
8261
8262 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
8263   echo "$ac_t""yes" 1>&6
8264   cat >> confdefs.h <<\EOF
8265 #define HAVE_GETMNTENT 1
8266 EOF
8267
8268 else
8269   echo "$ac_t""no" 1>&6
8270 fi
8271
8272 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
8273 echo "configure:8274: checking whether closedir returns void" >&5
8274 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
8275   echo $ac_n "(cached) $ac_c" 1>&6
8276 else
8277   if test "$cross_compiling" = yes; then
8278   ac_cv_func_closedir_void=yes
8279 else
8280   cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 #include <sys/types.h>
8284 #include <$ac_header_dirent>
8285 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
8286 EOF
8287 if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8288 then
8289   ac_cv_func_closedir_void=no
8290 else
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -fr conftest*
8294   ac_cv_func_closedir_void=yes
8295 fi
8296 rm -fr conftest*
8297 fi
8298
8299 fi
8300
8301 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
8302 if test $ac_cv_func_closedir_void = yes; then
8303   cat >> confdefs.h <<\EOF
8304 #define CLOSEDIR_VOID 1
8305 EOF
8306
8307 fi
8308
8309 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
8310 echo "configure:8311: checking whether setpgrp takes no argument" >&5
8311 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
8312   echo $ac_n "(cached) $ac_c" 1>&6
8313 else
8314   if test "$cross_compiling" = yes; then
8315   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
8316 else
8317   cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320
8321 #ifdef HAVE_UNISTD_H
8322 #include <unistd.h>
8323 #endif
8324
8325 /*
8326  * If this system has a BSD-style setpgrp, which takes arguments, exit
8327  * successfully.
8328  */
8329 main()
8330 {
8331     if (setpgrp(1,1) == -1)
8332         exit(0);
8333     else
8334         exit(1);
8335 }
8336
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8339 then
8340   ac_cv_func_setpgrp_void=no
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -fr conftest*
8345   ac_cv_func_setpgrp_void=yes
8346 fi
8347 rm -fr conftest*
8348 fi
8349
8350
8351 fi
8352
8353 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
8354 if test $ac_cv_func_setpgrp_void = yes; then
8355   cat >> confdefs.h <<\EOF
8356 #define SETPGRP_VOID 1
8357 EOF
8358
8359 fi
8360                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8361 echo "configure:8362: checking for working fnmatch" >&5
8362 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   # Some versions of Solaris or SCO have a broken fnmatch function.
8366 # So we run a test program.  If we are cross-compiling, take no chance.
8367 # Thanks to John Oleynick and Franc,ois Pinard for this test.
8368 if test "$cross_compiling" = yes; then
8369   ac_cv_func_fnmatch_works=no
8370 else
8371   cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
8375 EOF
8376 if { (eval echo configure:8377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8377 then
8378   ac_cv_func_fnmatch_works=yes
8379 else
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -fr conftest*
8383   ac_cv_func_fnmatch_works=no
8384 fi
8385 rm -fr conftest*
8386 fi
8387
8388 fi
8389
8390 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
8391 if test $ac_cv_func_fnmatch_works = yes; then
8392   cat >> confdefs.h <<\EOF
8393 #define HAVE_FNMATCH 1
8394 EOF
8395
8396 fi
8397
8398
8399
8400 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
8401 echo "configure:8402: checking for setlocale in -lxpg4" >&5
8402 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
8403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8404   echo $ac_n "(cached) $ac_c" 1>&6
8405 else
8406   ac_save_LIBS="$LIBS"
8407 LIBS="-lxpg4  $LIBS"
8408 cat > conftest.$ac_ext <<EOF
8409 #line 8410 "configure"
8410 #include "confdefs.h"
8411 /* Override any gcc2 internal prototype to avoid an error.  */
8412 /* We use char because int might match the return type of a gcc2
8413     builtin and then its argument prototype would still apply.  */
8414 char setlocale();
8415
8416 int main() {
8417 setlocale()
8418 ; return 0; }
8419 EOF
8420 if { (eval echo configure:8421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8421   rm -rf conftest*
8422   eval "ac_cv_lib_$ac_lib_var=yes"
8423 else
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -rf conftest*
8427   eval "ac_cv_lib_$ac_lib_var=no"
8428 fi
8429 rm -f conftest*
8430 LIBS="$ac_save_LIBS"
8431
8432 fi
8433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8434   echo "$ac_t""yes" 1>&6
8435   LIBS="$LIBS -lxpg4"
8436 else
8437   echo "$ac_t""no" 1>&6
8438 fi
8439
8440
8441
8442 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
8443 echo "configure:8444: checking for getpwnam in -lsun" >&5
8444 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
8445 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8446   echo $ac_n "(cached) $ac_c" 1>&6
8447 else
8448   ac_save_LIBS="$LIBS"
8449 LIBS="-lsun  $LIBS"
8450 cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 /* Override any gcc2 internal prototype to avoid an error.  */
8454 /* We use char because int might match the return type of a gcc2
8455     builtin and then its argument prototype would still apply.  */
8456 char getpwnam();
8457
8458 int main() {
8459 getpwnam()
8460 ; return 0; }
8461 EOF
8462 if { (eval echo configure:8463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=yes"
8465 else
8466   echo "configure: failed program was:" >&5
8467   cat conftest.$ac_ext >&5
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=no"
8470 fi
8471 rm -f conftest*
8472 LIBS="$ac_save_LIBS"
8473
8474 fi
8475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8478     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8479   cat >> confdefs.h <<EOF
8480 #define $ac_tr_lib 1
8481 EOF
8482
8483   LIBS="-lsun $LIBS"
8484
8485 else
8486   echo "$ac_t""no" 1>&6
8487 fi
8488
8489 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
8490 echo "configure:8491: checking for deflate in -lz" >&5
8491 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
8492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8493   echo $ac_n "(cached) $ac_c" 1>&6
8494 else
8495   ac_save_LIBS="$LIBS"
8496 LIBS="-lz  $LIBS"
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* Override any gcc2 internal prototype to avoid an error.  */
8501 /* We use char because int might match the return type of a gcc2
8502     builtin and then its argument prototype would still apply.  */
8503 char deflate();
8504
8505 int main() {
8506 deflate()
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   eval "ac_cv_lib_$ac_lib_var=yes"
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_lib_$ac_lib_var=no"
8517 fi
8518 rm -f conftest*
8519 LIBS="$ac_save_LIBS"
8520
8521 fi
8522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8523   echo "$ac_t""yes" 1>&6
8524   FDLIBS="-lz"
8525 else
8526   echo "$ac_t""no" 1>&6
8527 fi
8528
8529 have_zlib=no
8530 if test x$FDLIBS = x-lz; then
8531   have_zlib=yes
8532 fi
8533
8534 PTHREAD_LIB=""
8535 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
8536 echo "configure:8537: checking for pthread_create in -lpthread" >&5
8537 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
8538 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8539   echo $ac_n "(cached) $ac_c" 1>&6
8540 else
8541   ac_save_LIBS="$LIBS"
8542 LIBS="-lpthread  $LIBS"
8543 cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char pthread_create();
8550
8551 int main() {
8552 pthread_create()
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=no"
8563 fi
8564 rm -f conftest*
8565 LIBS="$ac_save_LIBS"
8566
8567 fi
8568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570   PTHREAD_LIB="-lpthread"
8571 else
8572   echo "$ac_t""no" 1>&6
8573 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
8574 echo "configure:8575: checking for pthread_create in -lpthreads" >&5
8575 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
8576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8577   echo $ac_n "(cached) $ac_c" 1>&6
8578 else
8579   ac_save_LIBS="$LIBS"
8580 LIBS="-lpthreads  $LIBS"
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8583 "configure"
8583 #include "confdefs.h"
8584 /* Override any gcc2 internal prototype to avoid an error.  */
8585 /* We use char because int might match the return type of a gcc2
8586     builtin and then its argument prototype would still apply.  */
8587 char pthread_create();
8588
8589 int main() {
8590 pthread_create()
8591 ; return 0; }
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8594   rm -rf conftest*
8595   eval "ac_cv_lib_$ac_lib_var=yes"
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   eval "ac_cv_lib_$ac_lib_var=no"
8601 fi
8602 rm -f conftest*
8603 LIBS="$ac_save_LIBS"
8604
8605 fi
8606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8607   echo "$ac_t""yes" 1>&6
8608   PTHREAD_LIB="-lpthreads"
8609 else
8610   echo "$ac_t""no" 1>&6
8611 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
8612 echo "configure:8613: checking for pthread_create in -lc_r" >&5
8613 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
8614 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8615   echo $ac_n "(cached) $ac_c" 1>&6
8616 else
8617   ac_save_LIBS="$LIBS"
8618 LIBS="-lc_r  $LIBS"
8619 cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 /* Override any gcc2 internal prototype to avoid an error.  */
8623 /* We use char because int might match the return type of a gcc2
8624     builtin and then its argument prototype would still apply.  */
8625 char pthread_create();
8626
8627 int main() {
8628 pthread_create()
8629 ; return 0; }
8630 EOF
8631 if { (eval echo configure:8632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8632   rm -rf conftest*
8633   eval "ac_cv_lib_$ac_lib_var=yes"
8634 else
8635   echo "configure: failed program was:" >&5
8636   cat conftest.$ac_ext >&5
8637   rm -rf conftest*
8638   eval "ac_cv_lib_$ac_lib_var=no"
8639 fi
8640 rm -f conftest*
8641 LIBS="$ac_save_LIBS"
8642
8643 fi
8644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8645   echo "$ac_t""yes" 1>&6
8646   PTHREAD_LIB="-lc_r"
8647 else
8648   echo "$ac_t""no" 1>&6
8649 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
8650 echo "configure:8651: checking for pthread_create" >&5
8651 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
8652   echo $ac_n "(cached) $ac_c" 1>&6
8653 else
8654   cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* System header to define __stub macros and hopefully few prototypes,
8658     which can conflict with char pthread_create(); below.  */
8659 #include <assert.h>
8660 /* Override any gcc2 internal prototype to avoid an error.  */
8661 /* We use char because int might match the return type of a gcc2
8662     builtin and then its argument prototype would still apply.  */
8663 char pthread_create();
8664
8665 int main() {
8666
8667 /* The GNU C library defines this for functions which it implements
8668     to always fail with ENOSYS.  Some functions are actually named
8669     something starting with __ and the normal name is an alias.  */
8670 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
8671 choke me
8672 #else
8673 pthread_create();
8674 #endif
8675
8676 ; return 0; }
8677 EOF
8678 if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8679   rm -rf conftest*
8680   eval "ac_cv_func_pthread_create=yes"
8681 else
8682   echo "configure: failed program was:" >&5
8683   cat conftest.$ac_ext >&5
8684   rm -rf conftest*
8685   eval "ac_cv_func_pthread_create=no"
8686 fi
8687 rm -f conftest*
8688 fi
8689
8690 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
8691   echo "$ac_t""yes" 1>&6
8692   :
8693 else
8694   echo "$ac_t""no" 1>&6
8695 fi
8696
8697             
8698 fi
8699
8700         
8701 fi
8702
8703
8704 fi
8705
8706
8707
8708 cat >> confdefs.h <<\EOF
8709 #define FDLIBS 1
8710 EOF
8711
8712
8713
8714 CFLAGS=${CFLAGS--O}
8715 LDFLAGS=${LDFLAGS--O}
8716 LIBS="${LIBS} ${SQL_LFLAGS}"
8717
8718 CPPFLAGS="$CPPFLAGS"
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730 OBJLIST=
8731
8732
8733 lld="lld"
8734 llu="llu"
8735
8736 #
8737 # Finally we set appropriate distribution specific
8738 #  variables and defaults
8739 #
8740 # PFILES are platform specific files
8741 PFILES="platforms/Makefile"
8742 PSCMD="ps -e"
8743 WIN32=
8744 hostname=`hostname`
8745 case "$DISTNAME" in
8746 alpha)
8747         DISTVER=`uname -r`
8748         PTHREAD_LIB="-lpthread -lexc"
8749         if test "${CC}" = "gcc" ; then
8750            lld="lld"
8751            llu="llu"
8752         else
8753            lld="ld"
8754            llu="lu"
8755         fi
8756         TAPEDRIVE="/dev/nrmt0"
8757   ;;
8758 bsdi)
8759         DISTVER=`uname -a |awk '{print $3}'`
8760         TAPEDRIVE="/dev/nrst0"
8761   ;;
8762 caldera)
8763         DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
8764         TAPEDRIVE="/dev/nrst0"
8765         PSCMD="ps -e -o pid,command"
8766         hostname=`hostname -s`
8767   ;;
8768 cygwin)
8769         DISTVER=`uname -a |awk '{print $3}'`
8770         TAPEDRIVE="/dev/nrst0"
8771         WIN32=win32
8772         CFLAGS="${CFLAGS} -mwindows"
8773         LDFLAGS="${LDFLAGS} -mwindows"
8774   ;;
8775 debian)
8776         DISTVER=`cat /etc/debian_version`
8777         TAPEDRIVE="/dev/nrst0"
8778         PSCMD="ps -e -o pid,command"
8779         hostname=`hostname -s`
8780   ;;
8781 freebsd)
8782         DISTVER=`uname -a |awk '{print $3}'`
8783         PTHREAD_LIB="-pthread"
8784         CFLAGS="${CFLAGS} -pthread"
8785         lld="qd"
8786         llu="qu"
8787         TAPEDRIVE="/dev/nrst0"
8788         PSCMD="ps -x -o pid,command"
8789         PFILES="${PFILES} \
8790             platforms/freebsd/Makefile \
8791             platforms/freebsd/bacula-fd \
8792             platforms/freebsd/bacula-sd \
8793             platforms/freebsd/bacula-dir"
8794         hostname=`hostname -s`
8795   ;;
8796 hpux)
8797         DISTVER=`uname -r`
8798         TAPEDRIVE="/dev/rmt/0hnb"
8799   ;;
8800 netbsd)
8801         DISTVER=`uname -a |awk '{print $3}'`
8802         lld="qd"
8803         llu="qu"
8804         TAPEDRIVE="/dev/nrst0"
8805         PSCMD="ps -a -o pid,command"
8806   ;;
8807 openbsd)
8808         DISTVER=`uname -a |awk '{print $3}'`
8809         lld="qd"
8810         llu="qu"
8811         TAPEDRIVE="/dev/nrst0"
8812         PSCMD="ps -a -o pid,command"
8813   ;;
8814 redhat)
8815         DISTVER=`cat /etc/redhat-release | grep release |\
8816                                 cut -f 5 -d ' '`
8817         TAPEDRIVE="/dev/nst0"
8818         PSCMD="ps -e -o pid,command"
8819         PFILES="${PFILES} \
8820             platforms/redhat/Makefile \
8821             platforms/redhat/bacula-fd \
8822             platforms/redhat/bacula-sd \
8823             platforms/redhat/bacula-dir"
8824         hostname=`hostname -s`
8825   ;;
8826 slackware)
8827         DISTVER=`cat /etc/slackware-version`
8828         TAPEDRIVE="/dev/nst0"
8829         PSCMD="ps -e -o pid,command"
8830         hostname=`hostname -s`
8831   ;;
8832 solaris)
8833         DISTVER=Solaris
8834         TAPEDRIVE="/dev/rmt/0cbn"
8835         PSCMD="ps -e -o pid,comm"
8836         PFILES="${PFILES} \
8837             platforms/solaris/Makefile \
8838             platforms/solaris/bacula-fd \
8839             platforms/solaris/bacula-sd \
8840             platforms/solaris/bacula-dir"
8841   ;;
8842 suse)
8843         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
8844                                 cut -f 3 -d ' '`
8845         TAPEDRIVE="/dev/nst0"
8846         PSCMD="ps -e -o pid,command"
8847         hostname=`hostname -s`
8848   ;;
8849 suse5)
8850         DISTNAME=suse
8851         DISTVER=5.x
8852         TAPEDRIVE="/dev/nst0"
8853         PSCMD="ps -e -o pid,command"
8854         hostname=`hostname -s`
8855   ;;
8856 unknown)
8857         DISTVER=unknown
8858         TAPEDRIVE="/dev/nst0"
8859   ;;
8860 *)
8861   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
8862   ;;
8863 esac  
8864
8865
8866
8867
8868 LIBS="$PTHREAD_LIB $LIBS"
8869
8870 cat >> confdefs.h <<EOF
8871 #define lld "$lld"
8872 EOF
8873
8874 cat >> confdefs.h <<EOF
8875 #define llu "$llu"
8876 EOF
8877
8878
8879
8880
8881
8882
8883
8884
8885 MCOMMON=./autoconf/Make.common
8886
8887
8888 trap '' 1 2 15
8889 cat > confcache <<\EOF
8890 # This file is a shell script that caches the results of configure
8891 # tests run on this system so they can be shared between configure
8892 # scripts and configure runs.  It is not useful on other systems.
8893 # If it contains results you don't want to keep, you may remove or edit it.
8894 #
8895 # By default, configure uses ./config.cache as the cache file,
8896 # creating it if it does not exist already.  You can give configure
8897 # the --cache-file=FILE option to use a different cache file; that is
8898 # what configure does when it calls configure scripts in
8899 # subdirectories, so they share the cache.
8900 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8901 # config.status only pays attention to the cache file if you give it the
8902 # --recheck option to rerun configure.
8903 #
8904 EOF
8905 # The following way of writing the cache mishandles newlines in values,
8906 # but we know of no workaround that is simple, portable, and efficient.
8907 # So, don't put newlines in cache variables' values.
8908 # Ultrix sh set writes to stderr and can't be redirected directly,
8909 # and sets the high bit in the cache file unless we assign to the vars.
8910 (set) 2>&1 |
8911   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8912   *ac_space=\ *)
8913     # `set' does not quote correctly, so add quotes (double-quote substitution
8914     # turns \\\\ into \\, and sed turns \\ into \).
8915     sed -n \
8916       -e "s/'/'\\\\''/g" \
8917       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8918     ;;
8919   *)
8920     # `set' quotes correctly as required by POSIX, so do not add quotes.
8921     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8922     ;;
8923   esac >> confcache
8924 if cmp -s $cache_file confcache; then
8925   :
8926 else
8927   if test -w $cache_file; then
8928     echo "updating cache $cache_file"
8929     cat confcache > $cache_file
8930   else
8931     echo "not updating unwritable cache $cache_file"
8932   fi
8933 fi
8934 rm -f confcache
8935
8936 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8937
8938 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8939 # Let make expand exec_prefix.
8940 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8941
8942 # Any assignment to VPATH causes Sun make to only execute
8943 # the first set of double-colon rules, so remove it if not needed.
8944 # If there is a colon in the path, we need to keep it.
8945 if test "x$srcdir" = x.; then
8946   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8947 fi
8948
8949 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8950
8951 DEFS=-DHAVE_CONFIG_H
8952
8953 # Without the "./", some shells look in PATH for config.status.
8954 : ${CONFIG_STATUS=./config.status}
8955
8956 echo creating $CONFIG_STATUS
8957 rm -f $CONFIG_STATUS
8958 cat > $CONFIG_STATUS <<EOF
8959 #! /bin/sh
8960 # Generated automatically by configure.
8961 # Run this file to recreate the current configuration.
8962 # This directory was configured as follows,
8963 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8964 #
8965 # $0 $ac_configure_args
8966 #
8967 # Compiler output produced by configure, useful for debugging
8968 # configure, is in ./config.log if it exists.
8969
8970 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8971 for ac_option
8972 do
8973   case "\$ac_option" in
8974   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8975     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8976     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8977   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8978     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8979     exit 0 ;;
8980   -help | --help | --hel | --he | --h)
8981     echo "\$ac_cs_usage"; exit 0 ;;
8982   *) echo "\$ac_cs_usage"; exit 1 ;;
8983   esac
8984 done
8985
8986 ac_given_srcdir=$srcdir
8987 ac_given_INSTALL="$INSTALL"
8988
8989 trap 'rm -fr `echo "autoconf/Make.common \
8990            Makefile \
8991            startmysql \
8992            stopmysql \
8993            btraceback \
8994            startit \
8995            stopit \
8996            bacula \
8997            fd \
8998            doc/Makefile \
8999            src/Makefile \
9000            src/console/Makefile \
9001            src/console/console.conf \
9002            src/gnome-console/Makefile \
9003            src/gnome-console/gnome-console.conf \
9004            src/dird/Makefile \
9005            src/dird/bacula-dir.conf \
9006            src/lib/Makefile \
9007            src/stored/Makefile \
9008            src/stored/bacula-sd.conf \
9009            src/filed/Makefile \
9010            src/filed/bacula-fd.conf \
9011            src/filed/win32/Makefile \
9012            src/cats/Makefile \
9013            src/cats/make_mysql_tables \
9014            src/cats/drop_mysql_tables \
9015            src/cats/create_mysql_database \
9016            src/cats/grant_mysql_privileges \
9017            src/cats/make_sqlite_tables \
9018            src/cats/sqlite \
9019            src/findlib/Makefile \
9020            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9021 EOF
9022 cat >> $CONFIG_STATUS <<EOF
9023
9024 # Protect against being on the right side of a sed subst in config.status.
9025 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9026  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9027 $ac_vpsub
9028 $extrasub
9029 s%@SHELL@%$SHELL%g
9030 s%@CFLAGS@%$CFLAGS%g
9031 s%@CPPFLAGS@%$CPPFLAGS%g
9032 s%@CXXFLAGS@%$CXXFLAGS%g
9033 s%@FFLAGS@%$FFLAGS%g
9034 s%@DEFS@%$DEFS%g
9035 s%@LDFLAGS@%$LDFLAGS%g
9036 s%@LIBS@%$LIBS%g
9037 s%@exec_prefix@%$exec_prefix%g
9038 s%@prefix@%$prefix%g
9039 s%@program_transform_name@%$program_transform_name%g
9040 s%@bindir@%$bindir%g
9041 s%@sbindir@%$sbindir%g
9042 s%@libexecdir@%$libexecdir%g
9043 s%@datadir@%$datadir%g
9044 s%@sysconfdir@%$sysconfdir%g
9045 s%@sharedstatedir@%$sharedstatedir%g
9046 s%@localstatedir@%$localstatedir%g
9047 s%@libdir@%$libdir%g
9048 s%@includedir@%$includedir%g
9049 s%@oldincludedir@%$oldincludedir%g
9050 s%@infodir@%$infodir%g
9051 s%@mandir@%$mandir%g
9052 s%@BUILD_DIR@%$BUILD_DIR%g
9053 s%@TRUEPRG@%$TRUEPRG%g
9054 s%@FALSEPRG@%$FALSEPRG%g
9055 s%@host@%$host%g
9056 s%@host_alias@%$host_alias%g
9057 s%@host_cpu@%$host_cpu%g
9058 s%@host_vendor@%$host_vendor%g
9059 s%@host_os@%$host_os%g
9060 s%@VERSION@%$VERSION%g
9061 s%@DATE@%$DATE%g
9062 s%@LSMDATE@%$LSMDATE%g
9063 s%@CC@%$CC%g
9064 s%@CXX@%$CXX%g
9065 s%@CPP@%$CPP%g
9066 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9067 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9068 s%@INSTALL_DATA@%$INSTALL_DATA%g
9069 s%@RANLIB@%$RANLIB%g
9070 s%@MV@%$MV%g
9071 s%@RM@%$RM%g
9072 s%@CP@%$CP%g
9073 s%@SED@%$SED%g
9074 s%@AWK@%$AWK%g
9075 s%@ECHO@%$ECHO%g
9076 s%@CMP@%$CMP%g
9077 s%@TBL@%$TBL%g
9078 s%@AR@%$AR%g
9079 s%@OPENSSL@%$OPENSSL%g
9080 s%@ARFLAGS@%$ARFLAGS%g
9081 s%@MAKE_SHELL@%$MAKE_SHELL%g
9082 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
9083 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
9084 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
9085 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
9086 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
9087 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
9088 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
9089 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
9090 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
9091 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
9092 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
9093 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
9094 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
9095 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
9096 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
9097 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
9098 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
9099 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
9100 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
9101 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
9102 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
9103 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
9104 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
9105 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
9106 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
9107 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
9108 s%@MSGFMT@%$MSGFMT%g
9109 s%@GNOME_LIBS@%$GNOME_LIBS%g
9110 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
9111 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
9112 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
9113 s%@ZVT_LIBS@%$ZVT_LIBS%g
9114 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9115 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9116 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9117 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
9118 s%@ORBIT_IDL@%$ORBIT_IDL%g
9119 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
9120 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
9121 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
9122 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
9123 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
9124 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
9125 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
9126 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
9127 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
9128 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
9129 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
9130 s%@GNOME_DIR@%$GNOME_DIR%g
9131 s%@CONS_INC@%$CONS_INC%g
9132 s%@CONS_LIBS@%$CONS_LIBS%g
9133 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
9134 s%@READLINE_SRC@%$READLINE_SRC%g
9135 s%@TERMCAP_LIB@%$TERMCAP_LIB%g
9136 s%@GMP_INC@%$GMP_INC%g
9137 s%@GMP_LIBS@%$GMP_LIBS%g
9138 s%@GMP_LDFLAGS@%$GMP_LDFLAGS%g
9139 s%@GMP_SRC@%$GMP_SRC%g
9140 s%@CWEB_INC@%$CWEB_INC%g
9141 s%@CWEB_LIBS@%$CWEB_LIBS%g
9142 s%@CWEB_LDFLAGS@%$CWEB_LDFLAGS%g
9143 s%@CWEB_SRC@%$CWEB_SRC%g
9144 s%@working_dir@%$working_dir%g
9145 s%@dump_email@%$dump_email%g
9146 s%@job_email@%$job_email%g
9147 s%@smtp_host@%$smtp_host%g
9148 s%@piddir@%$piddir%g
9149 s%@subsysdir@%$subsysdir%g
9150 s%@baseport@%$baseport%g
9151 s%@dir_port@%$dir_port%g
9152 s%@fd_port@%$fd_port%g
9153 s%@sd_port@%$sd_port%g
9154 s%@dir_password@%$dir_password%g
9155 s%@fd_password@%$fd_password%g
9156 s%@sd_password@%$sd_password%g
9157 s%@cats@%$cats%g
9158 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
9159 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
9160 s%@SQL_BINDIR@%$SQL_BINDIR%g
9161 s%@EXEEXT@%$EXEEXT%g
9162 s%@X_CFLAGS@%$X_CFLAGS%g
9163 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9164 s%@X_LIBS@%$X_LIBS%g
9165 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9166 s%@LIBOBJS@%$LIBOBJS%g
9167 s%@ALLOCA@%$ALLOCA%g
9168 s%@FDLIBS@%$FDLIBS%g
9169 s%@DEBUG@%$DEBUG%g
9170 s%@DINCLUDE@%$DINCLUDE%g
9171 s%@DLIB@%$DLIB%g
9172 s%@OBJLIST@%$OBJLIST%g
9173 s%@hostname@%$hostname%g
9174 s%@TAPEDRIVE@%$TAPEDRIVE%g
9175 s%@PSCMD@%$PSCMD%g
9176 s%@WIN32@%$WIN32%g
9177 s%@DISTNAME@%$DISTNAME%g
9178 s%@DISTVER@%$DISTVER%g
9179 /@MCOMMON@/r $MCOMMON
9180 s%@MCOMMON@%%g
9181
9182 CEOF
9183 EOF
9184
9185 cat >> $CONFIG_STATUS <<\EOF
9186
9187 # Split the substitutions into bite-sized pieces for seds with
9188 # small command number limits, like on Digital OSF/1 and HP-UX.
9189 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9190 ac_file=1 # Number of current file.
9191 ac_beg=1 # First line for current file.
9192 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9193 ac_more_lines=:
9194 ac_sed_cmds=""
9195 while $ac_more_lines; do
9196   if test $ac_beg -gt 1; then
9197     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9198   else
9199     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9200   fi
9201   if test ! -s conftest.s$ac_file; then
9202     ac_more_lines=false
9203     rm -f conftest.s$ac_file
9204   else
9205     if test -z "$ac_sed_cmds"; then
9206       ac_sed_cmds="sed -f conftest.s$ac_file"
9207     else
9208       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9209     fi
9210     ac_file=`expr $ac_file + 1`
9211     ac_beg=$ac_end
9212     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9213   fi
9214 done
9215 if test -z "$ac_sed_cmds"; then
9216   ac_sed_cmds=cat
9217 fi
9218 EOF
9219
9220 cat >> $CONFIG_STATUS <<EOF
9221
9222 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
9223            Makefile \
9224            startmysql \
9225            stopmysql \
9226            btraceback \
9227            startit \
9228            stopit \
9229            bacula \
9230            fd \
9231            doc/Makefile \
9232            src/Makefile \
9233            src/console/Makefile \
9234            src/console/console.conf \
9235            src/gnome-console/Makefile \
9236            src/gnome-console/gnome-console.conf \
9237            src/dird/Makefile \
9238            src/dird/bacula-dir.conf \
9239            src/lib/Makefile \
9240            src/stored/Makefile \
9241            src/stored/bacula-sd.conf \
9242            src/filed/Makefile \
9243            src/filed/bacula-fd.conf \
9244            src/filed/win32/Makefile \
9245            src/cats/Makefile \
9246            src/cats/make_mysql_tables \
9247            src/cats/drop_mysql_tables \
9248            src/cats/create_mysql_database \
9249            src/cats/grant_mysql_privileges \
9250            src/cats/make_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 
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   "