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