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