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