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