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