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