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