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