]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
Add src/tray-monitor directory
[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-wx-console     enable build of wxWidgets console [disabled]"
24 ac_help="$ac_help
25   --enable-tray-monitor   enable build of Gnome tray monitor (compatible with KDE) [disabled]"
26 ac_help="$ac_help
27   --enable-smartalloc     enable smartalloc debugging support [disabled]"
28 ac_help="$ac_help
29   --enable-static-tools   enable static tape tools [disabled]"
30 ac_help="$ac_help
31   --enable-static-fd      enable static File daemon [disabled]"
32 ac_help="$ac_help
33   --enable-static-sd      enable static Storage daemon [disabled]"
34 ac_help="$ac_help
35   --enable-static-dir     enable static Director [disabled]"
36 ac_help="$ac_help
37   --enable-static-cons    enable static Console [disabled]"
38 ac_help="$ac_help
39   --enable-client-only    build client (File daemon) only [disabled]"
40 ac_help="$ac_help
41   --disable-conio            disable conio support [enabled]
42                                                       "
43 ac_help="$ac_help
44   --disable-readline      disable readline support [disable]
45                                                       "
46 ac_help="$ac_help
47  --with-readline=DIR             specify readline library directory"
48 ac_help="$ac_help
49   --with-tcp-wrappers=DIR        enable tcpwrappers support"
50 ac_help="$ac_help
51   --with-working-dir=PATH        specify path of Bacula working directory"
52 ac_help="$ac_help
53   --with-scriptdir=PATH    specify path of Bacula scripts directory"
54 ac_help="$ac_help
55   --with-dump-email=EMAIL        dump email address"
56 ac_help="$ac_help
57   --with-job-email=EMAIL         job output email address"
58 ac_help="$ac_help
59   --with-smtp-host=HOST          SMTP mail host address"
60 ac_help="$ac_help
61   --with-pid-dir=PATH            specify location of Bacula pid files"
62 ac_help="$ac_help
63   --with-subsys-dir=PATH         specify location of Bacula subsys file"
64 ac_help="$ac_help
65   --with-baseport=PORT           specify base port address for daemons"
66 ac_help="$ac_help
67   --with-dir-password=PASSWORD   specify Director's password"
68 ac_help="$ac_help
69   --with-fd-password=PASSWORD    specify Client's password"
70 ac_help="$ac_help
71   --with-sd-password=PASSWORD    specify Storage daemon's password"
72 ac_help="$ac_help
73   --with-dir-user=USER           specify user for Director daemon"
74 ac_help="$ac_help
75   --with-dir-group=GROUP                 specify group for Director daemon"
76 ac_help="$ac_help
77   --with-sd-user=USER            specify user for Storage daemon"
78 ac_help="$ac_help
79   --with-sd-group=GROUP          specify group for Storage daemon"
80 ac_help="$ac_help
81   --with-fd-user=USER            specify user for File daemon"
82 ac_help="$ac_help
83   --with-fd-group=GROUP          specify group for File daemon"
84 ac_help="$ac_help
85   --with-sbin-perm=MODE          specify permissions for sbin binaries (0754)"
86 ac_help="$ac_help
87   --with-postgresql[=DIR]      Include PostgreSQL support.  DIR is the PostgreSQL
88                           base install directory, defaults to /usr/local/pgsql"
89 ac_help="$ac_help
90
91   --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
92                           install directory, default is to search through
93                           a number of common places for the MySQL files."
94 ac_help="$ac_help
95
96   --with-embedded-mysql[=DIR] Include MySQL support.  DIR is the MySQL base
97                           install directory, default is to search through
98                           a number of common places for the MySQL files."
99 ac_help="$ac_help
100
101   --with-sqlite[=DIR]     Include SQLite support.  DIR is the SQLite base
102                           install directory, default is to search through
103                           a number of common places for the SQLite files."
104 ac_help="$ac_help
105   --disable-largefile     omit support for large files"
106 ac_help="$ac_help
107   --with-x                use the X Window System"
108
109 # Initialize some variables set by options.
110 # The variables have the same names as the options, with
111 # dashes changed to underlines.
112 build=NONE
113 cache_file=./config.cache
114 exec_prefix=NONE
115 host=NONE
116 no_create=
117 nonopt=NONE
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 target=NONE
127 verbose=
128 x_includes=NONE
129 x_libraries=NONE
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
142
143 # Initialize some other variables.
144 subdirs=
145 MFLAGS= MAKEFLAGS=
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
148 ac_max_here_lines=12
149
150 ac_prev=
151 for ac_option
152 do
153
154   # If the previous option needs an argument, assign it.
155   if test -n "$ac_prev"; then
156     eval "$ac_prev=\$ac_option"
157     ac_prev=
158     continue
159   fi
160
161   case "$ac_option" in
162   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163   *) ac_optarg= ;;
164   esac
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case "$ac_option" in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir="$ac_optarg" ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build="$ac_optarg" ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file="$ac_optarg" ;;
186
187   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
188     ac_prev=datadir ;;
189   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
190   | --da=*)
191     datadir="$ac_optarg" ;;
192
193   -disable-* | --disable-*)
194     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195     # Reject names that are not valid shell variable names.
196     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
198     fi
199     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200     eval "enable_${ac_feature}=no" ;;
201
202   -enable-* | --enable-*)
203     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204     # Reject names that are not valid shell variable names.
205     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
207     fi
208     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209     case "$ac_option" in
210       *=*) ;;
211       *) ac_optarg=yes ;;
212     esac
213     eval "enable_${ac_feature}='$ac_optarg'" ;;
214
215   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217   | --exec | --exe | --ex)
218     ac_prev=exec_prefix ;;
219   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221   | --exec=* | --exe=* | --ex=*)
222     exec_prefix="$ac_optarg" ;;
223
224   -gas | --gas | --ga | --g)
225     # Obsolete; use --with-gas.
226     with_gas=yes ;;
227
228   -help | --help | --hel | --he)
229     # Omit some internal or obsolete options to make the list less imposing.
230     # This message is too long to be a string in the A/UX 3.1 sh.
231     cat << EOF
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
234 Configuration:
235   --cache-file=FILE       cache test results in FILE
236   --help                  print this message
237   --no-create             do not create output files
238   --quiet, --silent       do not print \`checking...' messages
239   --version               print the version of autoconf that created configure
240 Directory and file names:
241   --prefix=PREFIX         install architecture-independent files in PREFIX
242                           [$ac_default_prefix]
243   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
244                           [same as prefix]
245   --bindir=DIR            user executables in DIR [EPREFIX/bin]
246   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
247   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
248   --datadir=DIR           read-only architecture-independent data in DIR
249                           [PREFIX/share]
250   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
251   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
252                           [PREFIX/com]
253   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
254   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
255   --includedir=DIR        C header files in DIR [PREFIX/include]
256   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
257   --infodir=DIR           info documentation in DIR [PREFIX/info]
258   --mandir=DIR            man documentation in DIR [PREFIX/man]
259   --srcdir=DIR            find the sources in DIR [configure dir or ..]
260   --program-prefix=PREFIX prepend PREFIX to installed program names
261   --program-suffix=SUFFIX append SUFFIX to installed program names
262   --program-transform-name=PROGRAM
263                           run sed PROGRAM on installed program names
264 EOF
265     cat << EOF
266 Host type:
267   --build=BUILD           configure for building on BUILD [BUILD=HOST]
268   --host=HOST             configure for HOST [guessed]
269   --target=TARGET         configure for TARGET [TARGET=HOST]
270 Features and packages:
271   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
272   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
273   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
274   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
275   --x-includes=DIR        X include files are in DIR
276   --x-libraries=DIR       X library files are in DIR
277 EOF
278     if test -n "$ac_help"; then
279       echo "--enable and --with options recognized:$ac_help"
280     fi
281     exit 0 ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host="$ac_optarg" ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir="$ac_optarg" ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir="$ac_optarg" ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir="$ac_optarg" ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir="$ac_optarg" ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir="$ac_optarg" ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir="$ac_optarg" ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir="$ac_optarg" ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix="$ac_optarg" ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix="$ac_optarg" ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix="$ac_optarg" ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name="$ac_optarg" ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir="$ac_optarg" ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir="$ac_optarg" ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site="$ac_optarg" ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir="$ac_optarg" ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir="$ac_optarg" ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target="$ac_optarg" ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers)
430     echo "configure generated by autoconf version 2.13"
431     exit 0 ;;
432
433   -with-* | --with-*)
434     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
435     # Reject names that are not valid shell variable names.
436     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
437       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438     fi
439     ac_package=`echo $ac_package| sed 's/-/_/g'`
440     case "$ac_option" in
441       *=*) ;;
442       *) ac_optarg=yes ;;
443     esac
444     eval "with_${ac_package}='$ac_optarg'" ;;
445
446   -without-* | --without-*)
447     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     eval "with_${ac_package}=no" ;;
454
455   --x)
456     # Obsolete; use --with-x.
457     with_x=yes ;;
458
459   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
460   | --x-incl | --x-inc | --x-in | --x-i)
461     ac_prev=x_includes ;;
462   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
463   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
464     x_includes="$ac_optarg" ;;
465
466   -x-libraries | --x-libraries | --x-librarie | --x-librari \
467   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
468     ac_prev=x_libraries ;;
469   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
470   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
471     x_libraries="$ac_optarg" ;;
472
473   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
474     ;;
475
476   *)
477     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
478       echo "configure: warning: $ac_option: invalid host type" 1>&2
479     fi
480     if test "x$nonopt" != xNONE; then
481       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
482     fi
483     nonopt="$ac_option"
484     ;;
485
486   esac
487 done
488
489 if test -n "$ac_prev"; then
490   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
491 fi
492
493 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
494
495 # File descriptor usage:
496 # 0 standard input
497 # 1 file creation
498 # 2 errors and warnings
499 # 3 some systems may open it to /dev/tty
500 # 4 used on the Kubota Titan
501 # 6 checking for... messages and results
502 # 5 compiler messages saved in config.log
503 if test "$silent" = yes; then
504   exec 6>/dev/null
505 else
506   exec 6>&1
507 fi
508 exec 5>./config.log
509
510 echo "\
511 This file contains any messages produced by compilers while
512 running configure, to aid debugging if configure makes a mistake.
513 " 1>&5
514
515 # Strip out --no-create and --no-recursion so they do not pile up.
516 # Also quote any args containing shell metacharacters.
517 ac_configure_args=
518 for ac_arg
519 do
520   case "$ac_arg" in
521   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
522   | --no-cr | --no-c) ;;
523   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
524   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
525   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
526   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
527   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
528   esac
529 done
530
531 # NLS nuisances.
532 # Only set these to C if already set.  These must not be set unconditionally
533 # because not all systems understand e.g. LANG=C (notably SCO).
534 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
535 # Non-C LC_CTYPE values break the ctype check.
536 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
537 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
538 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
539 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
540
541 # confdefs.h avoids OS command line length limits that DEFS can exceed.
542 rm -rf conftest* confdefs.h
543 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
544 echo > confdefs.h
545
546 # A filename unique to this package, relative to the directory that
547 # configure is in, which we can look for to find out if srcdir is correct.
548 ac_unique_file=src/version.h
549
550 # Find the source files, if location was not specified.
551 if test -z "$srcdir"; then
552   ac_srcdir_defaulted=yes
553   # Try the directory containing this script, then its parent.
554   ac_prog=$0
555   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
556   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
557   srcdir=$ac_confdir
558   if test ! -r $srcdir/$ac_unique_file; then
559     srcdir=..
560   fi
561 else
562   ac_srcdir_defaulted=no
563 fi
564 if test ! -r $srcdir/$ac_unique_file; then
565   if test "$ac_srcdir_defaulted" = yes; then
566     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
567   else
568     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
569   fi
570 fi
571 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
572
573 # Prefer explicitly selected file to automatically selected ones.
574 if test -z "$CONFIG_SITE"; then
575   if test "x$prefix" != xNONE; then
576     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
577   else
578     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
579   fi
580 fi
581 for ac_site_file in $CONFIG_SITE; do
582   if test -r "$ac_site_file"; then
583     echo "loading site script $ac_site_file"
584     . "$ac_site_file"
585   fi
586 done
587
588 if test -r "$cache_file"; then
589   echo "loading cache $cache_file"
590   . $cache_file
591 else
592   echo "creating cache $cache_file"
593   > $cache_file
594 fi
595
596 ac_ext=c
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
602
603 ac_exeext=
604 ac_objext=o
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
608     ac_n= ac_c='
609 ' ac_t='        '
610   else
611     ac_n=-n ac_c= ac_t=
612   fi
613 else
614   ac_n= ac_c='\c' ac_t=
615 fi
616
617
618 BUILD_DIR=`pwd`
619 cd ..
620 TOP_DIR=`pwd`
621 cd ${BUILD_DIR}
622
623 ac_aux_dir=
624 for ac_dir in ${BUILD_DIR}/autoconf $srcdir/${BUILD_DIR}/autoconf; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in ${BUILD_DIR}/autoconf $srcdir/${BUILD_DIR}/autoconf" 1>&2; exit 1; }
637 fi
638 ac_config_guess=$ac_aux_dir/config.guess
639 ac_config_sub=$ac_aux_dir/config.sub
640 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641
642
643
644
645
646
647 for ac_prog in true
648 do
649 # Extract the first word of "$ac_prog", so it can be a program name with args.
650 set dummy $ac_prog; ac_word=$2
651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
652 echo "configure:653: checking for $ac_word" >&5
653 if eval "test \"`echo '$''{'ac_cv_path_TRUEPRG'+set}'`\" = set"; then
654   echo $ac_n "(cached) $ac_c" 1>&6
655 else
656   case "$TRUEPRG" in
657   /*)
658   ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a path.
659   ;;
660   ?:/*)                  
661   ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a dos path.
662   ;;
663   *)
664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
665   ac_dummy="$PATH"
666   for ac_dir in $ac_dummy; do 
667     test -z "$ac_dir" && ac_dir=.
668     if test -f $ac_dir/$ac_word; then
669       ac_cv_path_TRUEPRG="$ac_dir/$ac_word"
670       break
671     fi
672   done
673   IFS="$ac_save_ifs"
674   ;;
675 esac
676 fi
677 TRUEPRG="$ac_cv_path_TRUEPRG"
678 if test -n "$TRUEPRG"; then
679   echo "$ac_t""$TRUEPRG" 1>&6
680 else
681   echo "$ac_t""no" 1>&6
682 fi
683
684 test -n "$TRUEPRG" && break
685 done
686 test -n "$TRUEPRG" || TRUEPRG=":"
687
688 for ac_prog in false
689 do
690 # Extract the first word of "$ac_prog", so it can be a program name with args.
691 set dummy $ac_prog; ac_word=$2
692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
693 echo "configure:694: checking for $ac_word" >&5
694 if eval "test \"`echo '$''{'ac_cv_path_FALSEPRG'+set}'`\" = set"; then
695   echo $ac_n "(cached) $ac_c" 1>&6
696 else
697   case "$FALSEPRG" in
698   /*)
699   ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a path.
700   ;;
701   ?:/*)                  
702   ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a dos path.
703   ;;
704   *)
705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
706   ac_dummy="$PATH"
707   for ac_dir in $ac_dummy; do 
708     test -z "$ac_dir" && ac_dir=.
709     if test -f $ac_dir/$ac_word; then
710       ac_cv_path_FALSEPRG="$ac_dir/$ac_word"
711       break
712     fi
713   done
714   IFS="$ac_save_ifs"
715   ;;
716 esac
717 fi
718 FALSEPRG="$ac_cv_path_FALSEPRG"
719 if test -n "$FALSEPRG"; then
720   echo "$ac_t""$FALSEPRG" 1>&6
721 else
722   echo "$ac_t""no" 1>&6
723 fi
724
725 test -n "$FALSEPRG" && break
726 done
727 test -n "$FALSEPRG" || FALSEPRG=":"
728
729
730 #AC_CANONICAL_HOST
731
732 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
733 DATE=`sed -n -e 's/^.* \t*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
734 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
735 echo "configuring for bacula $VERSION ($DATE)"
736
737
738
739 # Extract the first word of "gcc", so it can be a program name with args.
740 set dummy gcc; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746   if test -n "$CC"; then
747   ac_cv_prog_CC="$CC" # Let the user override the test.
748 else
749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
750   ac_dummy="$PATH"
751   for ac_dir in $ac_dummy; do
752     test -z "$ac_dir" && ac_dir=.
753     if test -f $ac_dir/$ac_word; then
754       ac_cv_prog_CC="gcc"
755       break
756     fi
757   done
758   IFS="$ac_save_ifs"
759 fi
760 fi
761 CC="$ac_cv_prog_CC"
762 if test -n "$CC"; then
763   echo "$ac_t""$CC" 1>&6
764 else
765   echo "$ac_t""no" 1>&6
766 fi
767
768 if test -z "$CC"; then
769   # Extract the first word of "cc", so it can be a program name with args.
770 set dummy cc; ac_word=$2
771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
772 echo "configure:773: checking for $ac_word" >&5
773 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
774   echo $ac_n "(cached) $ac_c" 1>&6
775 else
776   if test -n "$CC"; then
777   ac_cv_prog_CC="$CC" # Let the user override the test.
778 else
779   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
780   ac_prog_rejected=no
781   ac_dummy="$PATH"
782   for ac_dir in $ac_dummy; do
783     test -z "$ac_dir" && ac_dir=.
784     if test -f $ac_dir/$ac_word; then
785       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
786         ac_prog_rejected=yes
787         continue
788       fi
789       ac_cv_prog_CC="cc"
790       break
791     fi
792   done
793   IFS="$ac_save_ifs"
794 if test $ac_prog_rejected = yes; then
795   # We found a bogon in the path, so make sure we never use it.
796   set dummy $ac_cv_prog_CC
797   shift
798   if test $# -gt 0; then
799     # We chose a different compiler from the bogus one.
800     # However, it has the same basename, so the bogon will be chosen
801     # first if we set CC to just the basename; use the full file name.
802     shift
803     set dummy "$ac_dir/$ac_word" "$@"
804     shift
805     ac_cv_prog_CC="$@"
806   fi
807 fi
808 fi
809 fi
810 CC="$ac_cv_prog_CC"
811 if test -n "$CC"; then
812   echo "$ac_t""$CC" 1>&6
813 else
814   echo "$ac_t""no" 1>&6
815 fi
816
817   if test -z "$CC"; then
818     case "`uname -s`" in
819     *win32* | *WIN32*)
820       # Extract the first word of "cl", so it can be a program name with args.
821 set dummy cl; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 echo "configure:824: checking for $ac_word" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825   echo $ac_n "(cached) $ac_c" 1>&6
826 else
827   if test -n "$CC"; then
828   ac_cv_prog_CC="$CC" # Let the user override the test.
829 else
830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
831   ac_dummy="$PATH"
832   for ac_dir in $ac_dummy; do
833     test -z "$ac_dir" && ac_dir=.
834     if test -f $ac_dir/$ac_word; then
835       ac_cv_prog_CC="cl"
836       break
837     fi
838   done
839   IFS="$ac_save_ifs"
840 fi
841 fi
842 CC="$ac_cv_prog_CC"
843 if test -n "$CC"; then
844   echo "$ac_t""$CC" 1>&6
845 else
846   echo "$ac_t""no" 1>&6
847 fi
848  ;;
849     esac
850   fi
851   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
852 fi
853
854 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
855 echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
856
857 ac_ext=c
858 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
859 ac_cpp='$CPP $CPPFLAGS'
860 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
861 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
862 cross_compiling=$ac_cv_prog_cc_cross
863
864 cat > conftest.$ac_ext << EOF
865
866 #line 867 "configure"
867 #include "confdefs.h"
868
869 main(){return(0);}
870 EOF
871 if { (eval echo configure:872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
872   ac_cv_prog_cc_works=yes
873   # If we can't run a trivial program, we are probably using a cross compiler.
874   if (./conftest; exit) 2>/dev/null; then
875     ac_cv_prog_cc_cross=no
876   else
877     ac_cv_prog_cc_cross=yes
878   fi
879 else
880   echo "configure: failed program was:" >&5
881   cat conftest.$ac_ext >&5
882   ac_cv_prog_cc_works=no
883 fi
884 rm -fr conftest*
885 ac_ext=c
886 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
887 ac_cpp='$CPP $CPPFLAGS'
888 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
889 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
890 cross_compiling=$ac_cv_prog_cc_cross
891
892 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
893 if test $ac_cv_prog_cc_works = no; then
894   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
895 fi
896 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
897 echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
898 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
899 cross_compiling=$ac_cv_prog_cc_cross
900
901 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
902 echo "configure:903: checking whether we are using GNU C" >&5
903 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
904   echo $ac_n "(cached) $ac_c" 1>&6
905 else
906   cat > conftest.c <<EOF
907 #ifdef __GNUC__
908   yes;
909 #endif
910 EOF
911 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
912   ac_cv_prog_gcc=yes
913 else
914   ac_cv_prog_gcc=no
915 fi
916 fi
917
918 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
919
920 if test $ac_cv_prog_gcc = yes; then
921   GCC=yes
922 else
923   GCC=
924 fi
925
926 ac_test_CFLAGS="${CFLAGS+set}"
927 ac_save_CFLAGS="$CFLAGS"
928 CFLAGS=
929 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
930 echo "configure:931: checking whether ${CC-cc} accepts -g" >&5
931 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
932   echo $ac_n "(cached) $ac_c" 1>&6
933 else
934   echo 'void f(){}' > conftest.c
935 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
936   ac_cv_prog_cc_g=yes
937 else
938   ac_cv_prog_cc_g=no
939 fi
940 rm -f conftest*
941
942 fi
943
944 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
945 if test "$ac_test_CFLAGS" = set; then
946   CFLAGS="$ac_save_CFLAGS"
947 elif test $ac_cv_prog_cc_g = yes; then
948   if test "$GCC" = yes; then
949     CFLAGS="-g -O2"
950   else
951     CFLAGS="-g"
952   fi
953 else
954   if test "$GCC" = yes; then
955     CFLAGS="-O2"
956   else
957     CFLAGS=
958   fi
959 fi
960
961 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
962 do
963 # Extract the first word of "$ac_prog", so it can be a program name with args.
964 set dummy $ac_prog; ac_word=$2
965 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
966 echo "configure:967: checking for $ac_word" >&5
967 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
968   echo $ac_n "(cached) $ac_c" 1>&6
969 else
970   if test -n "$CXX"; then
971   ac_cv_prog_CXX="$CXX" # Let the user override the test.
972 else
973   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
974   ac_dummy="$PATH"
975   for ac_dir in $ac_dummy; do
976     test -z "$ac_dir" && ac_dir=.
977     if test -f $ac_dir/$ac_word; then
978       ac_cv_prog_CXX="$ac_prog"
979       break
980     fi
981   done
982   IFS="$ac_save_ifs"
983 fi
984 fi
985 CXX="$ac_cv_prog_CXX"
986 if test -n "$CXX"; then
987   echo "$ac_t""$CXX" 1>&6
988 else
989   echo "$ac_t""no" 1>&6
990 fi
991
992 test -n "$CXX" && break
993 done
994 test -n "$CXX" || CXX="gcc"
995
996
997 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
998 echo "configure:999: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
999
1000 ac_ext=C
1001 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1002 ac_cpp='$CXXCPP $CPPFLAGS'
1003 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1004 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1005 cross_compiling=$ac_cv_prog_cxx_cross
1006
1007 cat > conftest.$ac_ext << EOF
1008
1009 #line 1010 "configure"
1010 #include "confdefs.h"
1011
1012 int main(){return(0);}
1013 EOF
1014 if { (eval echo configure:1015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1015   ac_cv_prog_cxx_works=yes
1016   # If we can't run a trivial program, we are probably using a cross compiler.
1017   if (./conftest; exit) 2>/dev/null; then
1018     ac_cv_prog_cxx_cross=no
1019   else
1020     ac_cv_prog_cxx_cross=yes
1021   fi
1022 else
1023   echo "configure: failed program was:" >&5
1024   cat conftest.$ac_ext >&5
1025   ac_cv_prog_cxx_works=no
1026 fi
1027 rm -fr conftest*
1028 ac_ext=c
1029 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1030 ac_cpp='$CPP $CPPFLAGS'
1031 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1032 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1033 cross_compiling=$ac_cv_prog_cc_cross
1034
1035 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1036 if test $ac_cv_prog_cxx_works = no; then
1037   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1038 fi
1039 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1040 echo "configure:1041: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1041 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1042 cross_compiling=$ac_cv_prog_cxx_cross
1043
1044 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1045 echo "configure:1046: checking whether we are using GNU C++" >&5
1046 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1047   echo $ac_n "(cached) $ac_c" 1>&6
1048 else
1049   cat > conftest.C <<EOF
1050 #ifdef __GNUC__
1051   yes;
1052 #endif
1053 EOF
1054 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1055   ac_cv_prog_gxx=yes
1056 else
1057   ac_cv_prog_gxx=no
1058 fi
1059 fi
1060
1061 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1062
1063 if test $ac_cv_prog_gxx = yes; then
1064   GXX=yes
1065 else
1066   GXX=
1067 fi
1068
1069 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1070 ac_save_CXXFLAGS="$CXXFLAGS"
1071 CXXFLAGS=
1072 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1073 echo "configure:1074: checking whether ${CXX-g++} accepts -g" >&5
1074 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1075   echo $ac_n "(cached) $ac_c" 1>&6
1076 else
1077   echo 'void f(){}' > conftest.cc
1078 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1079   ac_cv_prog_cxx_g=yes
1080 else
1081   ac_cv_prog_cxx_g=no
1082 fi
1083 rm -f conftest*
1084
1085 fi
1086
1087 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1088 if test "$ac_test_CXXFLAGS" = set; then
1089   CXXFLAGS="$ac_save_CXXFLAGS"
1090 elif test $ac_cv_prog_cxx_g = yes; then
1091   if test "$GXX" = yes; then
1092     CXXFLAGS="-g -O2"
1093   else
1094     CXXFLAGS="-g"
1095   fi
1096 else
1097   if test "$GXX" = yes; then
1098     CXXFLAGS="-O2"
1099   else
1100     CXXFLAGS=
1101   fi
1102 fi
1103
1104 if test "x$CC" != xcc; then
1105   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1106 echo "configure:1107: checking whether $CC and cc understand -c and -o together" >&5
1107 else
1108   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1109 echo "configure:1110: checking whether cc understands -c and -o together" >&5
1110 fi
1111 set dummy $CC; ac_cc="`echo $2 |
1112                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1113 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1114   echo $ac_n "(cached) $ac_c" 1>&6
1115 else
1116   echo 'foo(){}' > conftest.c
1117 # Make sure it works both with $CC and with simple cc.
1118 # We do the test twice because some compilers refuse to overwrite an
1119 # existing .o file with -o, though they will create one.
1120 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1121 if { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1122    test -f conftest.o && { (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1123 then
1124   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1125   if test "x$CC" != xcc; then
1126     # Test first that cc exists at all.
1127     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1128       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1129       if { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1130          test -f conftest.o && { (eval echo configure:1131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1131       then
1132         # cc works too.
1133         :
1134       else
1135         # cc exists but doesn't like -o.
1136         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1137       fi
1138     fi
1139   fi
1140 else
1141   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1142 fi
1143 rm -f conftest*
1144
1145 fi
1146 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1147   echo "$ac_t""yes" 1>&6
1148 else
1149   echo "$ac_t""no" 1>&6
1150   cat >> confdefs.h <<\EOF
1151 #define NO_MINUS_C_MINUS_O 1
1152 EOF
1153
1154 fi
1155                         echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1156 echo "configure:1157: checking how to run the C preprocessor" >&5
1157 # On Suns, sometimes $CPP names a directory.
1158 if test -n "$CPP" && test -d "$CPP"; then
1159   CPP=
1160 fi
1161 if test -z "$CPP"; then
1162 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165     # This must be in double quotes, not single quotes, because CPP may get
1166   # substituted into the Makefile and "${CC-cc}" will confuse make.
1167   CPP="${CC-cc} -E"
1168   # On the NeXT, cc -E runs the code through the compiler's parser,
1169   # not just through cpp.
1170   cat > conftest.$ac_ext <<EOF
1171 #line 1172 "configure"
1172 #include "confdefs.h"
1173 #include <assert.h>
1174 Syntax Error
1175 EOF
1176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1177 { (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1179 if test -z "$ac_err"; then
1180   :
1181 else
1182   echo "$ac_err" >&5
1183   echo "configure: failed program was:" >&5
1184   cat conftest.$ac_ext >&5
1185   rm -rf conftest*
1186   CPP="${CC-cc} -E -traditional-cpp"
1187   cat > conftest.$ac_ext <<EOF
1188 #line 1189 "configure"
1189 #include "confdefs.h"
1190 #include <assert.h>
1191 Syntax Error
1192 EOF
1193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1194 { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1196 if test -z "$ac_err"; then
1197   :
1198 else
1199   echo "$ac_err" >&5
1200   echo "configure: failed program was:" >&5
1201   cat conftest.$ac_ext >&5
1202   rm -rf conftest*
1203   CPP="${CC-cc} -nologo -E"
1204   cat > conftest.$ac_ext <<EOF
1205 #line 1206 "configure"
1206 #include "confdefs.h"
1207 #include <assert.h>
1208 Syntax Error
1209 EOF
1210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1211 { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1213 if test -z "$ac_err"; then
1214   :
1215 else
1216   echo "$ac_err" >&5
1217   echo "configure: failed program was:" >&5
1218   cat conftest.$ac_ext >&5
1219   rm -rf conftest*
1220   CPP=/lib/cpp
1221 fi
1222 rm -f conftest*
1223 fi
1224 rm -f conftest*
1225 fi
1226 rm -f conftest*
1227   ac_cv_prog_CPP="$CPP"
1228 fi
1229   CPP="$ac_cv_prog_CPP"
1230 else
1231   ac_cv_prog_CPP="$CPP"
1232 fi
1233 echo "$ac_t""$CPP" 1>&6
1234
1235 if test $ac_cv_prog_gcc = yes; then
1236     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1237 echo "configure:1238: checking whether ${CC-cc} needs -traditional" >&5
1238 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1239   echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241     ac_pattern="Autoconf.*'x'"
1242   cat > conftest.$ac_ext <<EOF
1243 #line 1244 "configure"
1244 #include "confdefs.h"
1245 #include <sgtty.h>
1246 Autoconf TIOCGETP
1247 EOF
1248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1249   egrep "$ac_pattern" >/dev/null 2>&1; then
1250   rm -rf conftest*
1251   ac_cv_prog_gcc_traditional=yes
1252 else
1253   rm -rf conftest*
1254   ac_cv_prog_gcc_traditional=no
1255 fi
1256 rm -f conftest*
1257
1258
1259   if test $ac_cv_prog_gcc_traditional = no; then
1260     cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1263 #include <termio.h>
1264 Autoconf TCGETA
1265 EOF
1266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1267   egrep "$ac_pattern" >/dev/null 2>&1; then
1268   rm -rf conftest*
1269   ac_cv_prog_gcc_traditional=yes
1270 fi
1271 rm -f conftest*
1272
1273   fi
1274 fi
1275
1276 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1277   if test $ac_cv_prog_gcc_traditional = yes; then
1278     CC="$CC -traditional"
1279   fi
1280 fi
1281         
1282 if test x$CC = xgcc
1283 then
1284    cat >> confdefs.h <<\EOF
1285 #define HAVE_GCC 1
1286 EOF
1287
1288 fi
1289
1290 # Find a good install program.  We prefer a C program (faster),
1291 # so one script is as good as another.  But avoid the broken or
1292 # incompatible versions:
1293 # SysV /etc/install, /usr/sbin/install
1294 # SunOS /usr/etc/install
1295 # IRIX /sbin/install
1296 # AIX /bin/install
1297 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1298 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1299 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1300 # ./install, which can be erroneously created by make from ./install.sh.
1301 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1302 echo "configure:1303: checking for a BSD compatible install" >&5
1303 if test -z "$INSTALL"; then
1304 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1308   for ac_dir in $PATH; do
1309     # Account for people who put trailing slashes in PATH elements.
1310     case "$ac_dir/" in
1311     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1312     *)
1313       # OSF1 and SCO ODT 3.0 have their own names for install.
1314       # Don't use installbsd from OSF since it installs stuff as root
1315       # by default.
1316       for ac_prog in ginstall scoinst install; do
1317         if test -f $ac_dir/$ac_prog; then
1318           if test $ac_prog = install &&
1319             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1320             # AIX install.  It has an incompatible calling convention.
1321             :
1322           else
1323             ac_cv_path_install="$ac_dir/$ac_prog -c"
1324             break 2
1325           fi
1326         fi
1327       done
1328       ;;
1329     esac
1330   done
1331   IFS="$ac_save_IFS"
1332
1333 fi
1334   if test "${ac_cv_path_install+set}" = set; then
1335     INSTALL="$ac_cv_path_install"
1336   else
1337     # As a last resort, use the slow shell script.  We don't cache a
1338     # path for INSTALL within a source directory, because that will
1339     # break other packages using the cache if that directory is
1340     # removed, or if the path is relative.
1341     INSTALL="$ac_install_sh"
1342   fi
1343 fi
1344 echo "$ac_t""$INSTALL" 1>&6
1345
1346 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1347 # It thinks the first close brace ends the variable substitution.
1348 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1349
1350 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1351
1352 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1353
1354 # Extract the first word of "ranlib", so it can be a program name with args.
1355 set dummy ranlib; ac_word=$2
1356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1357 echo "configure:1358: checking for $ac_word" >&5
1358 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1359   echo $ac_n "(cached) $ac_c" 1>&6
1360 else
1361   if test -n "$RANLIB"; then
1362   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1363 else
1364   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1365   ac_dummy="$PATH"
1366   for ac_dir in $ac_dummy; do
1367     test -z "$ac_dir" && ac_dir=.
1368     if test -f $ac_dir/$ac_word; then
1369       ac_cv_prog_RANLIB="ranlib"
1370       break
1371     fi
1372   done
1373   IFS="$ac_save_ifs"
1374   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1375 fi
1376 fi
1377 RANLIB="$ac_cv_prog_RANLIB"
1378 if test -n "$RANLIB"; then
1379   echo "$ac_t""$RANLIB" 1>&6
1380 else
1381   echo "$ac_t""no" 1>&6
1382 fi
1383
1384 # Extract the first word of "mv", so it can be a program name with args.
1385 set dummy mv; ac_word=$2
1386 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1387 echo "configure:1388: checking for $ac_word" >&5
1388 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
1389   echo $ac_n "(cached) $ac_c" 1>&6
1390 else
1391   case "$MV" in
1392   /*)
1393   ac_cv_path_MV="$MV" # Let the user override the test with a path.
1394   ;;
1395   ?:/*)                  
1396   ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
1397   ;;
1398   *)
1399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1400   ac_dummy="$PATH"
1401   for ac_dir in $ac_dummy; do 
1402     test -z "$ac_dir" && ac_dir=.
1403     if test -f $ac_dir/$ac_word; then
1404       ac_cv_path_MV="$ac_dir/$ac_word"
1405       break
1406     fi
1407   done
1408   IFS="$ac_save_ifs"
1409   test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
1410   ;;
1411 esac
1412 fi
1413 MV="$ac_cv_path_MV"
1414 if test -n "$MV"; then
1415   echo "$ac_t""$MV" 1>&6
1416 else
1417   echo "$ac_t""no" 1>&6
1418 fi
1419
1420 # Extract the first word of "rm", so it can be a program name with args.
1421 set dummy rm; ac_word=$2
1422 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1423 echo "configure:1424: checking for $ac_word" >&5
1424 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   case "$RM" in
1428   /*)
1429   ac_cv_path_RM="$RM" # Let the user override the test with a path.
1430   ;;
1431   ?:/*)                  
1432   ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
1433   ;;
1434   *)
1435   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1436   ac_dummy="$PATH"
1437   for ac_dir in $ac_dummy; do 
1438     test -z "$ac_dir" && ac_dir=.
1439     if test -f $ac_dir/$ac_word; then
1440       ac_cv_path_RM="$ac_dir/$ac_word"
1441       break
1442     fi
1443   done
1444   IFS="$ac_save_ifs"
1445   test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
1446   ;;
1447 esac
1448 fi
1449 RM="$ac_cv_path_RM"
1450 if test -n "$RM"; then
1451   echo "$ac_t""$RM" 1>&6
1452 else
1453   echo "$ac_t""no" 1>&6
1454 fi
1455
1456 # Extract the first word of "cp", so it can be a program name with args.
1457 set dummy cp; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463   case "$CP" in
1464   /*)
1465   ac_cv_path_CP="$CP" # Let the user override the test with a path.
1466   ;;
1467   ?:/*)                  
1468   ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
1469   ;;
1470   *)
1471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1472   ac_dummy="$PATH"
1473   for ac_dir in $ac_dummy; do 
1474     test -z "$ac_dir" && ac_dir=.
1475     if test -f $ac_dir/$ac_word; then
1476       ac_cv_path_CP="$ac_dir/$ac_word"
1477       break
1478     fi
1479   done
1480   IFS="$ac_save_ifs"
1481   test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
1482   ;;
1483 esac
1484 fi
1485 CP="$ac_cv_path_CP"
1486 if test -n "$CP"; then
1487   echo "$ac_t""$CP" 1>&6
1488 else
1489   echo "$ac_t""no" 1>&6
1490 fi
1491
1492 # Extract the first word of "sed", so it can be a program name with args.
1493 set dummy sed; ac_word=$2
1494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1495 echo "configure:1496: checking for $ac_word" >&5
1496 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
1497   echo $ac_n "(cached) $ac_c" 1>&6
1498 else
1499   case "$SED" in
1500   /*)
1501   ac_cv_path_SED="$SED" # Let the user override the test with a path.
1502   ;;
1503   ?:/*)                  
1504   ac_cv_path_SED="$SED" # Let the user override the test with a dos path.
1505   ;;
1506   *)
1507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1508   ac_dummy="$PATH"
1509   for ac_dir in $ac_dummy; do 
1510     test -z "$ac_dir" && ac_dir=.
1511     if test -f $ac_dir/$ac_word; then
1512       ac_cv_path_SED="$ac_dir/$ac_word"
1513       break
1514     fi
1515   done
1516   IFS="$ac_save_ifs"
1517   test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
1518   ;;
1519 esac
1520 fi
1521 SED="$ac_cv_path_SED"
1522 if test -n "$SED"; then
1523   echo "$ac_t""$SED" 1>&6
1524 else
1525   echo "$ac_t""no" 1>&6
1526 fi
1527
1528 # Extract the first word of "awk", so it can be a program name with args.
1529 set dummy awk; ac_word=$2
1530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1531 echo "configure:1532: checking for $ac_word" >&5
1532 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
1533   echo $ac_n "(cached) $ac_c" 1>&6
1534 else
1535   case "$AWK" in
1536   /*)
1537   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
1538   ;;
1539   ?:/*)                  
1540   ac_cv_path_AWK="$AWK" # Let the user override the test with a dos path.
1541   ;;
1542   *)
1543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1544   ac_dummy="$PATH"
1545   for ac_dir in $ac_dummy; do 
1546     test -z "$ac_dir" && ac_dir=.
1547     if test -f $ac_dir/$ac_word; then
1548       ac_cv_path_AWK="$ac_dir/$ac_word"
1549       break
1550     fi
1551   done
1552   IFS="$ac_save_ifs"
1553   test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="awk"
1554   ;;
1555 esac
1556 fi
1557 AWK="$ac_cv_path_AWK"
1558 if test -n "$AWK"; then
1559   echo "$ac_t""$AWK" 1>&6
1560 else
1561   echo "$ac_t""no" 1>&6
1562 fi
1563
1564 # Extract the first word of "echo", so it can be a program name with args.
1565 set dummy echo; ac_word=$2
1566 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1567 echo "configure:1568: checking for $ac_word" >&5
1568 if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then
1569   echo $ac_n "(cached) $ac_c" 1>&6
1570 else
1571   case "$ECHO" in
1572   /*)
1573   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
1574   ;;
1575   ?:/*)                  
1576   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a dos path.
1577   ;;
1578   *)
1579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1580   ac_dummy="$PATH"
1581   for ac_dir in $ac_dummy; do 
1582     test -z "$ac_dir" && ac_dir=.
1583     if test -f $ac_dir/$ac_word; then
1584       ac_cv_path_ECHO="$ac_dir/$ac_word"
1585       break
1586     fi
1587   done
1588   IFS="$ac_save_ifs"
1589   test -z "$ac_cv_path_ECHO" && ac_cv_path_ECHO="echo"
1590   ;;
1591 esac
1592 fi
1593 ECHO="$ac_cv_path_ECHO"
1594 if test -n "$ECHO"; then
1595   echo "$ac_t""$ECHO" 1>&6
1596 else
1597   echo "$ac_t""no" 1>&6
1598 fi
1599
1600 # Extract the first word of "cmp", so it can be a program name with args.
1601 set dummy cmp; ac_word=$2
1602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1603 echo "configure:1604: checking for $ac_word" >&5
1604 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
1605   echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607   case "$CMP" in
1608   /*)
1609   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
1610   ;;
1611   ?:/*)                  
1612   ac_cv_path_CMP="$CMP" # Let the user override the test with a dos path.
1613   ;;
1614   *)
1615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1616   ac_dummy="$PATH"
1617   for ac_dir in $ac_dummy; do 
1618     test -z "$ac_dir" && ac_dir=.
1619     if test -f $ac_dir/$ac_word; then
1620       ac_cv_path_CMP="$ac_dir/$ac_word"
1621       break
1622     fi
1623   done
1624   IFS="$ac_save_ifs"
1625   test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp"
1626   ;;
1627 esac
1628 fi
1629 CMP="$ac_cv_path_CMP"
1630 if test -n "$CMP"; then
1631   echo "$ac_t""$CMP" 1>&6
1632 else
1633   echo "$ac_t""no" 1>&6
1634 fi
1635
1636 # Extract the first word of "tbl", so it can be a program name with args.
1637 set dummy tbl; ac_word=$2
1638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1639 echo "configure:1640: checking for $ac_word" >&5
1640 if eval "test \"`echo '$''{'ac_cv_path_TBL'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   case "$TBL" in
1644   /*)
1645   ac_cv_path_TBL="$TBL" # Let the user override the test with a path.
1646   ;;
1647   ?:/*)                  
1648   ac_cv_path_TBL="$TBL" # Let the user override the test with a dos path.
1649   ;;
1650   *)
1651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1652   ac_dummy="$PATH"
1653   for ac_dir in $ac_dummy; do 
1654     test -z "$ac_dir" && ac_dir=.
1655     if test -f $ac_dir/$ac_word; then
1656       ac_cv_path_TBL="$ac_dir/$ac_word"
1657       break
1658     fi
1659   done
1660   IFS="$ac_save_ifs"
1661   test -z "$ac_cv_path_TBL" && ac_cv_path_TBL="tbl"
1662   ;;
1663 esac
1664 fi
1665 TBL="$ac_cv_path_TBL"
1666 if test -n "$TBL"; then
1667   echo "$ac_t""$TBL" 1>&6
1668 else
1669   echo "$ac_t""no" 1>&6
1670 fi
1671
1672 # Extract the first word of "ar", so it can be a program name with args.
1673 set dummy ar; ac_word=$2
1674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1675 echo "configure:1676: checking for $ac_word" >&5
1676 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
1677   echo $ac_n "(cached) $ac_c" 1>&6
1678 else
1679   case "$AR" in
1680   /*)
1681   ac_cv_path_AR="$AR" # Let the user override the test with a path.
1682   ;;
1683   ?:/*)                  
1684   ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
1685   ;;
1686   *)
1687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1688   ac_dummy="$PATH"
1689   for ac_dir in $ac_dummy; do 
1690     test -z "$ac_dir" && ac_dir=.
1691     if test -f $ac_dir/$ac_word; then
1692       ac_cv_path_AR="$ac_dir/$ac_word"
1693       break
1694     fi
1695   done
1696   IFS="$ac_save_ifs"
1697   test -z "$ac_cv_path_AR" && ac_cv_path_AR="ar"
1698   ;;
1699 esac
1700 fi
1701 AR="$ac_cv_path_AR"
1702 if test -n "$AR"; then
1703   echo "$ac_t""$AR" 1>&6
1704 else
1705   echo "$ac_t""no" 1>&6
1706 fi
1707
1708 # Extract the first word of "openssl", so it can be a program name with args.
1709 set dummy openssl; ac_word=$2
1710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1711 echo "configure:1712: checking for $ac_word" >&5
1712 if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
1713   echo $ac_n "(cached) $ac_c" 1>&6
1714 else
1715   case "$OPENSSL" in
1716   /*)
1717   ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
1718   ;;
1719   ?:/*)                  
1720   ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a dos path.
1721   ;;
1722   *)
1723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1724   ac_dummy="$PATH"
1725   for ac_dir in $ac_dummy; do 
1726     test -z "$ac_dir" && ac_dir=.
1727     if test -f $ac_dir/$ac_word; then
1728       ac_cv_path_OPENSSL="$ac_dir/$ac_word"
1729       break
1730     fi
1731   done
1732   IFS="$ac_save_ifs"
1733   test -z "$ac_cv_path_OPENSSL" && ac_cv_path_OPENSSL="none"
1734   ;;
1735 esac
1736 fi
1737 OPENSSL="$ac_cv_path_OPENSSL"
1738 if test -n "$OPENSSL"; then
1739   echo "$ac_t""$OPENSSL" 1>&6
1740 else
1741   echo "$ac_t""no" 1>&6
1742 fi
1743
1744 # Extract the first word of "mtx", so it can be a program name with args.
1745 set dummy mtx; ac_word=$2
1746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1747 echo "configure:1748: checking for $ac_word" >&5
1748 if eval "test \"`echo '$''{'ac_cv_path_MTX'+set}'`\" = set"; then
1749   echo $ac_n "(cached) $ac_c" 1>&6
1750 else
1751   case "$MTX" in
1752   /*)
1753   ac_cv_path_MTX="$MTX" # Let the user override the test with a path.
1754   ;;
1755   ?:/*)                  
1756   ac_cv_path_MTX="$MTX" # Let the user override the test with a dos path.
1757   ;;
1758   *)
1759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1760   ac_dummy="$PATH"
1761   for ac_dir in $ac_dummy; do 
1762     test -z "$ac_dir" && ac_dir=.
1763     if test -f $ac_dir/$ac_word; then
1764       ac_cv_path_MTX="$ac_dir/$ac_word"
1765       break
1766     fi
1767   done
1768   IFS="$ac_save_ifs"
1769   test -z "$ac_cv_path_MTX" && ac_cv_path_MTX="mtx"
1770   ;;
1771 esac
1772 fi
1773 MTX="$ac_cv_path_MTX"
1774 if test -n "$MTX"; then
1775   echo "$ac_t""$MTX" 1>&6
1776 else
1777   echo "$ac_t""no" 1>&6
1778 fi
1779
1780 # Extract the first word of "pkg-config", so it can be a program name with args.
1781 set dummy pkg-config; ac_word=$2
1782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1783 echo "configure:1784: checking for $ac_word" >&5
1784 if eval "test \"`echo '$''{'ac_cv_path_PKGCONFIG'+set}'`\" = set"; then
1785   echo $ac_n "(cached) $ac_c" 1>&6
1786 else
1787   case "$PKGCONFIG" in
1788   /*)
1789   ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
1790   ;;
1791   ?:/*)                  
1792   ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a dos path.
1793   ;;
1794   *)
1795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1796   ac_dummy="$PATH"
1797   for ac_dir in $ac_dummy; do 
1798     test -z "$ac_dir" && ac_dir=.
1799     if test -f $ac_dir/$ac_word; then
1800       ac_cv_path_PKGCONFIG="$ac_dir/$ac_word"
1801       break
1802     fi
1803   done
1804   IFS="$ac_save_ifs"
1805   test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="pkg-config"
1806   ;;
1807 esac
1808 fi
1809 PKGCONFIG="$ac_cv_path_PKGCONFIG"
1810 if test -n "$PKGCONFIG"; then
1811   echo "$ac_t""$PKGCONFIG" 1>&6
1812 else
1813   echo "$ac_t""no" 1>&6
1814 fi
1815
1816 # Extract the first word of "wx-config", so it can be a program name with args.
1817 set dummy wx-config; ac_word=$2
1818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1819 echo "configure:1820: checking for $ac_word" >&5
1820 if eval "test \"`echo '$''{'ac_cv_path_WXCONFIG'+set}'`\" = set"; then
1821   echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823   case "$WXCONFIG" in
1824   /*)
1825   ac_cv_path_WXCONFIG="$WXCONFIG" # Let the user override the test with a path.
1826   ;;
1827   ?:/*)                  
1828   ac_cv_path_WXCONFIG="$WXCONFIG" # Let the user override the test with a dos path.
1829   ;;
1830   *)
1831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1832   ac_dummy="$PATH"
1833   for ac_dir in $ac_dummy; do 
1834     test -z "$ac_dir" && ac_dir=.
1835     if test -f $ac_dir/$ac_word; then
1836       ac_cv_path_WXCONFIG="$ac_dir/$ac_word"
1837       break
1838     fi
1839   done
1840   IFS="$ac_save_ifs"
1841   test -z "$ac_cv_path_WXCONFIG" && ac_cv_path_WXCONFIG="wx-config"
1842   ;;
1843 esac
1844 fi
1845 WXCONFIG="$ac_cv_path_WXCONFIG"
1846 if test -n "$WXCONFIG"; then
1847   echo "$ac_t""$WXCONFIG" 1>&6
1848 else
1849   echo "$ac_t""no" 1>&6
1850 fi
1851
1852
1853 test -n "$ARFLAG" || ARFLAGS="cr"
1854
1855
1856 MAKE_SHELL=/bin/sh
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1868 echo "configure:1869: checking for Cygwin environment" >&5
1869 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1870   echo $ac_n "(cached) $ac_c" 1>&6
1871 else
1872   cat > conftest.$ac_ext <<EOF
1873 #line 1874 "configure"
1874 #include "confdefs.h"
1875
1876 int main() {
1877
1878 #ifndef __CYGWIN__
1879 #define __CYGWIN__ __CYGWIN32__
1880 #endif
1881 return __CYGWIN__;
1882 ; return 0; }
1883 EOF
1884 if { (eval echo configure:1885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1885   rm -rf conftest*
1886   ac_cv_cygwin=yes
1887 else
1888   echo "configure: failed program was:" >&5
1889   cat conftest.$ac_ext >&5
1890   rm -rf conftest*
1891   ac_cv_cygwin=no
1892 fi
1893 rm -f conftest*
1894 rm -f conftest*
1895 fi
1896
1897 echo "$ac_t""$ac_cv_cygwin" 1>&6
1898 CYGWIN=
1899 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1900 if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
1901 then
1902         
1903
1904 if $TRUEPRG; then
1905   HAVE_SUN_OS_TRUE=
1906   HAVE_SUN_OS_FALSE='#'
1907 else
1908   HAVE_SUN_OS_TRUE='#'
1909   HAVE_SUN_OS_FALSE=
1910 fi
1911         cat >> confdefs.h <<\EOF
1912 #define HAVE_SUN_OS 1
1913 EOF
1914
1915 else
1916         
1917
1918 if $FALSEPRG; then
1919   HAVE_SUN_OS_TRUE=
1920   HAVE_SUN_OS_FALSE='#'
1921 else
1922   HAVE_SUN_OS_TRUE='#'
1923   HAVE_SUN_OS_FALSE=
1924 fi
1925 fi
1926
1927 if test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
1928 then
1929         
1930
1931 if $TRUEPRG; then
1932   HAVE_OSF1_OS_TRUE=
1933   HAVE_OSF1_OS_FALSE='#'
1934 else
1935   HAVE_OSF1_OS_TRUE='#'
1936   HAVE_OSF1_OS_FALSE=
1937 fi
1938         cat >> confdefs.h <<\EOF
1939 #define HAVE_OSF1_OS 1
1940 EOF
1941
1942 else
1943         
1944
1945 if $FALSEPRG; then
1946   HAVE_OSF1_OS_TRUE=
1947   HAVE_OSF1_OS_FALSE='#'
1948 else
1949   HAVE_OSF1_OS_TRUE='#'
1950   HAVE_OSF1_OS_FALSE=
1951 fi
1952 fi
1953
1954 if test $HAVE_UNAME=yes -a x`uname -s` = xAIX
1955 then
1956         
1957
1958 if $TRUEPRG; then
1959   HAVE_AIX_OS_TRUE=
1960   HAVE_AIX_OS_FALSE='#'
1961 else
1962   HAVE_AIX_OS_TRUE='#'
1963   HAVE_AIX_OS_FALSE=
1964 fi
1965         cat >> confdefs.h <<\EOF
1966 #define HAVE_AIX_OS 1
1967 EOF
1968
1969 else
1970         
1971
1972 if $FALSEPRG; then
1973   HAVE_AIX_OS_TRUE=
1974   HAVE_AIX_OS_FALSE='#'
1975 else
1976   HAVE_AIX_OS_TRUE='#'
1977   HAVE_AIX_OS_FALSE=
1978 fi
1979 fi
1980
1981 if test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
1982 then
1983         
1984
1985 if $TRUEPRG; then
1986   HAVE_HPUX_OS_TRUE=
1987   HAVE_HPUX_OS_FALSE='#'
1988 else
1989   HAVE_HPUX_OS_TRUE='#'
1990   HAVE_HPUX_OS_FALSE=
1991 fi
1992         cat >> confdefs.h <<\EOF
1993 #define HAVE_HPUX_OS 1
1994 EOF
1995
1996 else
1997         
1998
1999 if $FALSEPRG; then
2000   HAVE_HPUX_OS_TRUE=
2001   HAVE_HPUX_OS_FALSE='#'
2002 else
2003   HAVE_HPUX_OS_TRUE='#'
2004   HAVE_HPUX_OS_FALSE=
2005 fi
2006 fi
2007
2008 if test $HAVE_UNAME=yes -a x`uname -s` = xLinux
2009 then
2010         
2011
2012 if $TRUEPRG; then
2013   HAVE_LINUX_OS_TRUE=
2014   HAVE_LINUX_OS_FALSE='#'
2015 else
2016   HAVE_LINUX_OS_TRUE='#'
2017   HAVE_LINUX_OS_FALSE=
2018 fi
2019         cat >> confdefs.h <<\EOF
2020 #define HAVE_LINUX_OS 1
2021 EOF
2022
2023 else
2024         
2025
2026 if $FALSEPRG; then
2027   HAVE_LINUX_OS_TRUE=
2028   HAVE_LINUX_OS_FALSE='#'
2029 else
2030   HAVE_LINUX_OS_TRUE='#'
2031   HAVE_LINUX_OS_FALSE=
2032 fi
2033 fi
2034
2035 if test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
2036 then
2037         
2038
2039 if $TRUEPRG; then
2040   HAVE_FREEBSD_OS_TRUE=
2041   HAVE_FREEBSD_OS_FALSE='#'
2042 else
2043   HAVE_FREEBSD_OS_TRUE='#'
2044   HAVE_FREEBSD_OS_FALSE=
2045 fi
2046         cat >> confdefs.h <<\EOF
2047 #define HAVE_FREEBSD_OS 1
2048 EOF
2049
2050 else
2051         
2052
2053 if $FALSEPRG; then
2054   HAVE_FREEBSD_OS_TRUE=
2055   HAVE_FREEBSD_OS_FALSE='#'
2056 else
2057   HAVE_FREEBSD_OS_TRUE='#'
2058   HAVE_FREEBSD_OS_FALSE=
2059 fi
2060 fi
2061
2062 if test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
2063 then
2064         
2065
2066 if $TRUEPRG; then
2067   HAVE_NETBSD_OS_TRUE=
2068   HAVE_NETBSD_OS_FALSE='#'
2069 else
2070   HAVE_NETBSD_OS_TRUE='#'
2071   HAVE_NETBSD_OS_FALSE=
2072 fi
2073         cat >> confdefs.h <<\EOF
2074 #define HAVE_NETBSD_OS 1
2075 EOF
2076
2077 else
2078         
2079
2080 if $FALSEPRG; then
2081   HAVE_NETBSD_OS_TRUE=
2082   HAVE_NETBSD_OS_FALSE='#'
2083 else
2084   HAVE_NETBSD_OS_TRUE='#'
2085   HAVE_NETBSD_OS_FALSE=
2086 fi
2087 fi
2088
2089 if test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
2090 then
2091         
2092
2093 if $TRUEPRG; then
2094   HAVE_OPENBSD_OS_TRUE=
2095   HAVE_OPENBSD_OS_FALSE='#'
2096 else
2097   HAVE_OPENBSD_OS_TRUE='#'
2098   HAVE_OPENBSD_OS_FALSE=
2099 fi
2100         cat >> confdefs.h <<\EOF
2101 #define HAVE_OPENBSD_OS 1
2102 EOF
2103
2104 else
2105         
2106
2107 if $FALSEPRG; then
2108   HAVE_OPENBSD_OS_TRUE=
2109   HAVE_OPENBSD_OS_FALSE='#'
2110 else
2111   HAVE_OPENBSD_OS_TRUE='#'
2112   HAVE_OPENBSD_OS_FALSE=
2113 fi
2114 fi
2115
2116 if test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
2117 then
2118         
2119
2120 if $TRUEPRG; then
2121   HAVE_BSDI_OS_TRUE=
2122   HAVE_BSDI_OS_FALSE='#'
2123 else
2124   HAVE_BSDI_OS_TRUE='#'
2125   HAVE_BSDI_OS_FALSE=
2126 fi
2127         cat >> confdefs.h <<\EOF
2128 #define HAVE_BSDI_OS 1
2129 EOF
2130
2131 else
2132         
2133
2134 if $FALSEPRG; then
2135   HAVE_BSDI_OS_TRUE=
2136   HAVE_BSDI_OS_FALSE='#'
2137 else
2138   HAVE_BSDI_OS_TRUE='#'
2139   HAVE_BSDI_OS_FALSE=
2140 fi
2141 fi
2142
2143 if test $HAVE_UNAME=yes -a x`uname -s` = xSGI
2144 then
2145         
2146
2147 if $TRUEPRG; then
2148   HAVE_SGI_OS_TRUE=
2149   HAVE_SGI_OS_FALSE='#'
2150 else
2151   HAVE_SGI_OS_TRUE='#'
2152   HAVE_SGI_OS_FALSE=
2153 fi
2154         cat >> confdefs.h <<\EOF
2155 #define HAVE_SGI_OS 1
2156 EOF
2157
2158 else
2159         
2160
2161 if $FALSEPRG; then
2162   HAVE_SGI_OS_TRUE=
2163   HAVE_SGI_OS_FALSE='#'
2164 else
2165   HAVE_SGI_OS_TRUE='#'
2166   HAVE_SGI_OS_FALSE=
2167 fi
2168 fi
2169
2170 if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
2171 then
2172         
2173
2174 if $TRUEPRG; then
2175   HAVE_IRIX_OS_TRUE=
2176   HAVE_IRIX_OS_FALSE='#'
2177 else
2178   HAVE_IRIX_OS_TRUE='#'
2179   HAVE_IRIX_OS_FALSE=
2180 fi
2181         cat >> confdefs.h <<\EOF
2182 #define HAVE_IRIX_OS 1
2183 EOF
2184
2185 else
2186         
2187
2188 if $FALSEPRG; then
2189   HAVE_IRIX_OS_TRUE=
2190   HAVE_IRIX_OS_FALSE='#'
2191 else
2192   HAVE_IRIX_OS_TRUE='#'
2193   HAVE_IRIX_OS_FALSE=
2194 fi
2195 fi
2196
2197 if test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
2198 then
2199     
2200
2201 if $TRUEPRG; then
2202   HAVE_DARWIN_OS_TRUE=
2203   HAVE_DARWIN_OS_FALSE='#'
2204 else
2205   HAVE_DARWIN_OS_TRUE='#'
2206   HAVE_DARWIN_OS_FALSE=
2207 fi
2208     cat >> confdefs.h <<\EOF
2209 #define HAVE_DARWIN_OS 1
2210 EOF
2211
2212 else
2213     
2214
2215 if $FALSEPRG; then
2216   HAVE_DARWIN_OS_TRUE=
2217   HAVE_DARWIN_OS_FALSE='#'
2218 else
2219   HAVE_DARWIN_OS_TRUE='#'
2220   HAVE_DARWIN_OS_FALSE=
2221 fi
2222 fi
2223
2224
2225 # -----------------------------------------------------------
2226 # ----------------------------------------------------------
2227 echo $ac_n "checking for Operating System Distribution""... $ac_c" 1>&6
2228 echo "configure:2229: checking for Operating System Distribution" >&5
2229 if test "x$DISTNAME" != "x"
2230 then
2231         echo "distname set to $DISTNAME"
2232 elif test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
2233 then
2234         DISTNAME=alpha
2235 elif test $HAVE_UNAME=yes -a x`uname -s` = xAIX
2236 then
2237         DISTNAME=aix
2238 elif test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
2239 then
2240         DISTNAME=hpux
2241 elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
2242 then
2243         DISTNAME=solaris
2244 elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
2245 then
2246         DISTNAME=freebsd
2247 elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
2248 then
2249         DISTNAME=netbsd
2250 elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
2251 then
2252         DISTNAME=openbsd
2253 elif test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
2254 then
2255         DISTNAME=irix
2256 elif test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
2257 then
2258         DISTNAME=bsdi
2259 elif test -f /etc/SuSE-release
2260 then
2261         DISTNAME=suse
2262 elif test -d /etc/SuSEconfig
2263 then
2264         DISTNAME=suse5
2265 elif test -f /etc/mandrake-release
2266 then
2267         DISTNAME=mandrake
2268 elif test -f /etc/whitebox-release
2269 then
2270        DISTNAME=redhat
2271 elif test -f /etc/redhat-release
2272 then
2273         DISTNAME=redhat
2274 elif test -f /etc/gentoo-release
2275 then
2276         DISTNAME=gentoo
2277 elif test -f /etc/debian_version
2278 then
2279         DISTNAME=debian
2280 elif test -f /etc/slackware-version
2281 then
2282         DISTNAME=slackware
2283 elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
2284 then
2285     DISTNAME=darwin
2286 elif test -f /etc/engarde-version
2287 then
2288         DISTNAME=engarde
2289 elif test "$CYGWIN" = yes
2290 then
2291         DISTNAME=cygwin
2292         cat >> confdefs.h <<\EOF
2293 #define HAVE_CYGWIN 1
2294 EOF
2295
2296 else
2297         DISTNAME=unknown
2298 fi
2299 echo "$ac_t""done" 1>&6
2300
2301
2302 # -----------------------------------------------------------
2303 # ----------------------------------------------------------
2304
2305         
2306
2307 if false; then
2308   INSIDE_GNOME_COMMON_TRUE=
2309   INSIDE_GNOME_COMMON_FALSE='#'
2310 else
2311   INSIDE_GNOME_COMMON_TRUE='#'
2312   INSIDE_GNOME_COMMON_FALSE=
2313 fi
2314
2315         test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
2316
2317         for k in gnome-macros ; do ACLOCAL="$ACLOCAL -I $k" ; done
2318
2319
2320 # ------------------------------------------------------------------
2321 #  If the user has not set --prefix, we set our default to nothing.
2322 #  In this case, if the user has not set --sysconfdir, we set it
2323 #  to the package default of /etc/bacula.  If either --prefix or
2324 #  --sysconfdir is set, we leave sysconfdir alone except to eval it.
2325 # ------------------------------------------------------------------
2326 if test x${prefix} = xNONE ; then
2327     if test `eval echo ${sysconfdir}` = NONE/etc ; then
2328         sysconfdir=/etc/bacula
2329     fi
2330     prefix=
2331 fi
2332 sysconfdir=`eval echo ${sysconfdir}`
2333
2334 # -------------------------------------------------------------------------
2335 #  If the user has not set --exec-prefix, we default to ${prefix}
2336 # -------------------------------------------------------------------------
2337 if test x${exec_prefix} = xNONE ; then
2338     exec_prefix=${prefix}
2339 fi
2340
2341 # ------------------------------------------------------------------
2342 # If the user has not set --sbindir, we set our default as /sbin
2343 # ------------------------------------------------------------------
2344 if test x$sbindir = x'${exec_prefix}/sbin' ; then
2345     sbindir=${exec_prefix}/sbin
2346 fi
2347 sbindir=`eval echo ${sbindir}`
2348                       
2349 # ------------------------------------------------------------------
2350 # All list of languages for which a translation exist. Each
2351 #  language is separated by a space.
2352 # ------------------------------------------------------------------
2353 ALL_LINGUAS=""
2354
2355 for ac_prog in msgfmt
2356 do
2357 # Extract the first word of "$ac_prog", so it can be a program name with args.
2358 set dummy $ac_prog; ac_word=$2
2359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2360 echo "configure:2361: checking for $ac_word" >&5
2361 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2362   echo $ac_n "(cached) $ac_c" 1>&6
2363 else
2364   case "$MSGFMT" in
2365   /*)
2366   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2367   ;;
2368   ?:/*)                  
2369   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
2370   ;;
2371   *)
2372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2373   ac_dummy="$PATH"
2374   for ac_dir in $ac_dummy; do 
2375     test -z "$ac_dir" && ac_dir=.
2376     if test -f $ac_dir/$ac_word; then
2377       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2378       break
2379     fi
2380   done
2381   IFS="$ac_save_ifs"
2382   ;;
2383 esac
2384 fi
2385 MSGFMT="$ac_cv_path_MSGFMT"
2386 if test -n "$MSGFMT"; then
2387   echo "$ac_t""$MSGFMT" 1>&6
2388 else
2389   echo "$ac_t""no" 1>&6
2390 fi
2391
2392 test -n "$MSGFMT" && break
2393 done
2394 test -n "$MSGFMT" || MSGFMT="no"
2395
2396 if test "$MSGFMT" = "no"
2397 then
2398    echo 'msgfmt program not found, disabling NLS !'
2399    USE_NLS=no
2400    USE_INCLUDED_LIBINTL=no
2401 #else
2402 #   AM_GNU_GETTEXT
2403 fi
2404
2405
2406 support_mysql=no
2407 support_sqlite=no
2408 support_postgresql=no
2409 support_smartalloc=yes
2410 support_readline=yes
2411 support_conio=yes
2412 support_gnome=no
2413 support_wx_console=no
2414 gnome_version=
2415 support_static_tools=no
2416 support_static_fd=no
2417 support_static_sd=no
2418 support_static_dir=no
2419 support_static_cons=no
2420 build_client_only=no
2421 cats=
2422 db_name=Internal
2423 DB_NAME=bdb
2424
2425
2426 # -------------------------------------------
2427 # gnome (default off)
2428 # -------------------------------------------
2429 # Check whether --enable-gnome or --disable-gnome was given.
2430 if test "${enable_gnome+set}" = set; then
2431   enableval="$enable_gnome"
2432   if test x$enableval = xyes; then
2433     support_gnome=yes
2434   fi
2435 fi
2436
2437
2438 GNOME_DIR=
2439 if test x$support_gnome = xyes; then
2440   abc=`$PKGCONFIG --exists libgnomeui-2.0`
2441   pkg=$?
2442   if test $pkg = 0; then
2443      GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
2444      GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
2445      GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
2446      GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
2447      
2448      
2449      
2450      
2451      GNOME_DIR=src/gnome2-console
2452      gnome_version="Version 2.x"
2453   else
2454      
2455         
2456         
2457         
2458         
2459         
2460         
2461         
2462         
2463
2464         # Check whether --with-gnome-includes or --without-gnome-includes was given.
2465 if test "${with_gnome_includes+set}" = set; then
2466   withval="$with_gnome_includes"
2467   
2468         CFLAGS="$CFLAGS -I$withval"
2469         
2470 fi
2471
2472         
2473         # Check whether --with-gnome-libs or --without-gnome-libs was given.
2474 if test "${with_gnome_libs+set}" = set; then
2475   withval="$with_gnome_libs"
2476   
2477         LDFLAGS="$LDFLAGS -L$withval"
2478         gnome_prefix=$withval
2479         
2480 fi
2481
2482
2483         # Check whether --with-gnome or --without-gnome was given.
2484 if test "${with_gnome+set}" = set; then
2485   withval="$with_gnome"
2486   if test x$withval = xyes; then
2487                         want_gnome=yes
2488                                                                         :
2489                 else
2490                         if test "x$withval" = xno; then
2491                                 want_gnome=no
2492                         else
2493                                 want_gnome=yes
2494                                 LDFLAGS="$LDFLAGS -L$withval/lib"
2495                                 CFLAGS="$CFLAGS -I$withval/include"
2496                                 gnome_prefix=$withval/lib
2497                         fi
2498                 fi
2499 else
2500   want_gnome=yes
2501 fi
2502
2503
2504         if test "x$want_gnome" = xyes; then
2505
2506             # Extract the first word of "gnome-config", so it can be a program name with args.
2507 set dummy gnome-config; ac_word=$2
2508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2509 echo "configure:2510: checking for $ac_word" >&5
2510 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
2511   echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513   case "$GNOME_CONFIG" in
2514   /*)
2515   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
2516   ;;
2517   ?:/*)                  
2518   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
2519   ;;
2520   *)
2521   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2522   ac_dummy="$PATH"
2523   for ac_dir in $ac_dummy; do 
2524     test -z "$ac_dir" && ac_dir=.
2525     if test -f $ac_dir/$ac_word; then
2526       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
2527       break
2528     fi
2529   done
2530   IFS="$ac_save_ifs"
2531   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
2532   ;;
2533 esac
2534 fi
2535 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
2536 if test -n "$GNOME_CONFIG"; then
2537   echo "$ac_t""$GNOME_CONFIG" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541
2542             if test "$GNOME_CONFIG" = "no"; then
2543               no_gnome_config="yes"
2544             else
2545               echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
2546 echo "configure:2547: checking if $GNOME_CONFIG works" >&5
2547               if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
2548                 echo "$ac_t""yes" 1>&6
2549                 
2550         
2551         # Extract the first word of "orbit-config", so it can be a program name with args.
2552 set dummy orbit-config; ac_word=$2
2553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2554 echo "configure:2555: checking for $ac_word" >&5
2555 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
2556   echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558   case "$ORBIT_CONFIG" in
2559   /*)
2560   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
2561   ;;
2562   ?:/*)                  
2563   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path.
2564   ;;
2565   *)
2566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2567   ac_dummy="$PATH"
2568   for ac_dir in $ac_dummy; do 
2569     test -z "$ac_dir" && ac_dir=.
2570     if test -f $ac_dir/$ac_word; then
2571       ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word"
2572       break
2573     fi
2574   done
2575   IFS="$ac_save_ifs"
2576   test -z "$ac_cv_path_ORBIT_CONFIG" && ac_cv_path_ORBIT_CONFIG="no"
2577   ;;
2578 esac
2579 fi
2580 ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
2581 if test -n "$ORBIT_CONFIG"; then
2582   echo "$ac_t""$ORBIT_CONFIG" 1>&6
2583 else
2584   echo "$ac_t""no" 1>&6
2585 fi
2586
2587         # Extract the first word of "orbit-idl", so it can be a program name with args.
2588 set dummy orbit-idl; ac_word=$2
2589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2590 echo "configure:2591: checking for $ac_word" >&5
2591 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then
2592   echo $ac_n "(cached) $ac_c" 1>&6
2593 else
2594   case "$ORBIT_IDL" in
2595   /*)
2596   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a path.
2597   ;;
2598   ?:/*)                  
2599   ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a dos path.
2600   ;;
2601   *)
2602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2603   ac_dummy="$PATH"
2604   for ac_dir in $ac_dummy; do 
2605     test -z "$ac_dir" && ac_dir=.
2606     if test -f $ac_dir/$ac_word; then
2607       ac_cv_path_ORBIT_IDL="$ac_dir/$ac_word"
2608       break
2609     fi
2610   done
2611   IFS="$ac_save_ifs"
2612   test -z "$ac_cv_path_ORBIT_IDL" && ac_cv_path_ORBIT_IDL="no"
2613   ;;
2614 esac
2615 fi
2616 ORBIT_IDL="$ac_cv_path_ORBIT_IDL"
2617 if test -n "$ORBIT_IDL"; then
2618   echo "$ac_t""$ORBIT_IDL" 1>&6
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622
2623         echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6
2624 echo "configure:2625: checking for working ORBit environment" >&5
2625 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then
2626   echo $ac_n "(cached) $ac_c" 1>&6
2627 else
2628   
2629                 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
2630                         gnome_cv_orbit_found=no
2631                 else
2632                         gnome_cv_orbit_found=yes
2633                 fi
2634         
2635 fi
2636
2637 echo "$ac_t""$gnome_cv_orbit_found" 1>&6
2638         
2639
2640 if test x$gnome_cv_orbit_found = xyes; then
2641   HAVE_ORBIT_TRUE=
2642   HAVE_ORBIT_FALSE='#'
2643 else
2644   HAVE_ORBIT_TRUE='#'
2645   HAVE_ORBIT_FALSE=
2646 fi
2647         if test x$gnome_cv_orbit_found = xyes; then
2648                 
2649                 ORBIT_CFLAGS=`orbit-config --cflags client server`
2650                 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
2651                 
2652                 
2653         else
2654                 if test xfail = xfailure; then
2655                         { echo "configure: error: ORBit not installed or installation problem" 1>&2; exit 1; }
2656                 fi
2657         fi
2658
2659         echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6
2660 echo "configure:2661: checking for gnorba libraries" >&5
2661 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then
2662   echo $ac_n "(cached) $ac_c" 1>&6
2663 else
2664   
2665                 gnome_cv_gnorba_found=no
2666                 if test x$gnome_cv_orbit_found = xyes; then
2667                         GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2668                         GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2669                         if test -n "$GNORBA_LIBS"; then
2670                                 gnome_cv_gnorba_found=yes
2671                         fi
2672                 fi
2673         
2674 fi
2675
2676 echo "$ac_t""$gnome_cv_gnorba_found" 1>&6
2677         
2678
2679 if test x$gnome_cv_gnorba_found = xyes; then
2680   HAVE_GNORBA_TRUE=
2681   HAVE_GNORBA_FALSE='#'
2682 else
2683   HAVE_GNORBA_TRUE='#'
2684   HAVE_GNORBA_FALSE=
2685 fi
2686         if test x$gnome_cv_orbit_found = xyes; then
2687                 
2688                 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2689                 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2690                 
2691                 
2692         else
2693                 if test xfail = xfailure; then
2694                         { echo "configure: error: gnorba library not installed or installation problem" 1>&2; exit 1; }
2695                 fi
2696         fi
2697
2698                 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
2699                 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
2700                 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
2701                 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
2702                 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
2703                 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
2704                 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
2705                 
2706               else
2707                 echo "$ac_t""no" 1>&6
2708                 no_gnome_config="yes"
2709               fi
2710             fi
2711
2712             if test x$exec_prefix = xNONE; then
2713                 if test x$prefix = xNONE; then
2714                     gnome_prefix=$ac_default_prefix/lib
2715                 else
2716                     gnome_prefix=$prefix/lib
2717                 fi
2718             else
2719                 gnome_prefix=`eval echo \`echo $libdir\``
2720             fi
2721         
2722             if test "$no_gnome_config" = "yes"; then
2723               echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
2724 echo "configure:2725: checking for gnomeConf.sh file in $gnome_prefix" >&5
2725               if test -f $gnome_prefix/gnomeConf.sh; then
2726                 echo "$ac_t""found" 1>&6
2727                 echo "loading gnome configuration from" \
2728                      "$gnome_prefix/gnomeConf.sh"
2729                 . $gnome_prefix/gnomeConf.sh
2730                 
2731               else
2732                 echo "$ac_t""not found" 1>&6
2733                 if test xfail = xfail; then
2734                   { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
2735                 fi
2736               fi
2737             fi
2738         fi
2739
2740         if test -n ""; then
2741           n=""
2742           for i in $n; do
2743             echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6
2744 echo "configure:2745: checking extra library \"$i\"" >&5
2745             case $i in 
2746               applets)
2747                 
2748                 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
2749                 echo "$ac_t""$GNOME_APPLETS_LIBS" 1>&6;;
2750               docklets)
2751                 
2752                 GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
2753                 echo "$ac_t""$GNOME_DOCKLETS_LIBS" 1>&6;;
2754               capplet)
2755                 
2756                 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
2757                 echo "$ac_t""$GNOME_CAPPLET_LIBS" 1>&6;;
2758               *)
2759                 echo "$ac_t""unknown library" 1>&6
2760             esac
2761             EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i`
2762             GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR"
2763           done
2764         fi
2765
2766
2767      GNOME_DIR=src/gnome-console
2768      gnome_version="Version 1.4"
2769   fi
2770 fi
2771
2772
2773
2774 # -------------------------------------------
2775 # wx-console (default off)
2776 # -------------------------------------------
2777 # Check whether --enable-wx-console or --disable-wx-console was given.
2778 if test "${enable_wx_console+set}" = set; then
2779   enableval="$enable_wx_console"
2780   if test x$enableval = xyes; then
2781     support_wx_console=yes
2782   fi
2783 fi
2784
2785
2786 WX_DIR=
2787 if test x$support_wx_console = xyes; then
2788   abc=`$WXCONFIG --cppflags`
2789   pkg=$?
2790   if test $pkg = 0; then
2791      WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
2792      WXCONS_LDFLAGS=`$WXCONFIG --libs`
2793      
2794      
2795      WX_DIR=src/wx-console
2796   else
2797      echo " "
2798      echo "wx-config program not found. wx-console disabled."
2799      echo " "
2800      support_wx_console=no
2801   fi
2802 fi
2803
2804
2805
2806 # -------------------------------------------
2807 # tray-monitor (default off)
2808 # -------------------------------------------
2809 # Check whether --enable-tray-monitor or --disable-tray-monitor was given.
2810 if test "${enable_tray_monitor+set}" = set; then
2811   enableval="$enable_tray_monitor"
2812   if test x$enableval = xyes; then
2813     support_tray_monitor=yes
2814   fi
2815 fi
2816
2817
2818 TRAY_MONITOR_DIR=
2819 if test x$support_tray_monitor = xyes; then
2820 # TODO: Check for GTK+ presence
2821   TRAY_MONITOR_DIR=src/tray-monitor
2822 fi
2823
2824
2825 # -------------------------------------------
2826 # smartalloc (default off)
2827 # -------------------------------------------
2828 # Check whether --enable-smartalloc or --disable-smartalloc was given.
2829 if test "${enable_smartalloc+set}" = set; then
2830   enableval="$enable_smartalloc"
2831   if test x$enableval = xno; then
2832     support_smartalloc=no
2833   fi
2834 fi
2835
2836
2837 if test x$support_smartalloc = xyes; then
2838    cat >> confdefs.h <<\EOF
2839 #define SMARTALLOC 1
2840 EOF
2841
2842 fi
2843
2844 # -------------------------------------------
2845 # static-tools (default off)
2846 # -------------------------------------------
2847 # Check whether --enable-static-tools or --disable-static-tools was given.
2848 if test "${enable_static_tools+set}" = set; then
2849   enableval="$enable_static_tools"
2850   if test x$enableval = xyes; then
2851      support_static_tools=yes
2852    fi
2853 fi
2854
2855
2856 TTOOL_LDFLAGS=
2857 if test x$support_static_tools = xyes; then
2858    TTOOL_LDFLAGS="-static"
2859 fi
2860
2861
2862 # -------------------------------------------
2863 # static-fd    (default off)
2864 # -------------------------------------------
2865 # Check whether --enable-static-fd or --disable-static-fd was given.
2866 if test "${enable_static_fd+set}" = set; then
2867   enableval="$enable_static_fd"
2868   if test x$enableval = xyes; then
2869      support_static_fd=yes
2870    fi
2871 fi
2872
2873
2874 STATIC_FD=
2875 if test x$support_static_fd = xyes; then
2876    STATIC_FD="static-bacula-fd"
2877 fi
2878
2879
2880 # -------------------------------------------
2881 # static-sd    (default off)
2882 # -------------------------------------------
2883 # Check whether --enable-static-sd or --disable-static-sd was given.
2884 if test "${enable_static_sd+set}" = set; then
2885   enableval="$enable_static_sd"
2886   if test x$enableval = xyes; then
2887      support_static_sd=yes
2888    fi
2889 fi
2890
2891
2892 STATIC_SD=
2893 if test x$support_static_sd = xyes; then
2894    STATIC_SD="static-bacula-sd"
2895 fi
2896
2897
2898 # -------------------------------------------
2899 # static-dir   (default off)
2900 # -------------------------------------------
2901 # Check whether --enable-static-dir or --disable-static-dir was given.
2902 if test "${enable_static_dir+set}" = set; then
2903   enableval="$enable_static_dir"
2904   if test x$enableval = xyes; then
2905      support_static_dir=yes
2906    fi
2907 fi
2908
2909
2910 STATIC_DIR=
2911 if test x$support_static_dir = xyes; then
2912    STATIC_DIR="static-bacula-dir"
2913 fi
2914
2915
2916 # -------------------------------------------
2917 # static-cons  (default off)
2918 # -------------------------------------------
2919 # Check whether --enable-static-cons or --disable-static-cons was given.
2920 if test "${enable_static_cons+set}" = set; then
2921   enableval="$enable_static_cons"
2922   if test x$enableval = xyes; then
2923      support_static_cons=yes
2924    fi
2925 fi
2926
2927
2928 STATIC_CONS=
2929 STATIC_GNOME_CONS=
2930 STATIC_WX_CONS=
2931 if test x$support_static_cons = xyes; then
2932    STATIC_CONS="static-bconsole"
2933    STATIC_GNOME_CONS="static-gnome-console"
2934    STATIC_WX_CONS="static-wx-console"
2935 fi
2936
2937
2938
2939
2940 # -------------------------------------------
2941 # client_only  (default off)
2942 # -------------------------------------------
2943 # Check whether --enable-client-only or --disable-client-only was given.
2944 if test "${enable_client_only+set}" = set; then
2945   enableval="$enable_client_only"
2946   if test x$enableval = xyes; then
2947      build_client_only=yes
2948     db_name=None
2949     DB_NAME=none
2950    fi
2951 fi
2952
2953 if test x$build_client_only = xno; then
2954    ALL_DIRS="subdirs"
2955 else
2956    ALL_DIRS=""
2957 fi
2958
2959
2960 # ---------------------------------------------------
2961 # Check for conio (Bacula readline substitute)(
2962 # ---------------------------------------------------
2963 # this allows you to turn it completely off
2964 # Check whether --enable-conio or --disable-conio was given.
2965 if test "${enable_conio+set}" = set; then
2966   enableval="$enable_conio"
2967   if test x$enableval = xno; then
2968     support_conio=no
2969   fi
2970 fi
2971
2972
2973 got_conio="no"
2974 if test x$support_conio = xyes; then
2975    ac_safe=`echo "termcap.h" | sed 'y%./+-%__p_%'`
2976 echo $ac_n "checking for termcap.h""... $ac_c" 1>&6
2977 echo "configure:2978: checking for termcap.h" >&5
2978 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 #include <termcap.h>
2985 EOF
2986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2987 { (eval echo configure:2988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2989 if test -z "$ac_err"; then
2990   rm -rf conftest*
2991   eval "ac_cv_header_$ac_safe=yes"
2992 else
2993   echo "$ac_err" >&5
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996   rm -rf conftest*
2997   eval "ac_cv_header_$ac_safe=no"
2998 fi
2999 rm -f conftest*
3000 fi
3001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3002   echo "$ac_t""yes" 1>&6
3003    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3004 echo "configure:3005: checking for tgetent in -ltermcap" >&5
3005 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3007   echo $ac_n "(cached) $ac_c" 1>&6
3008 else
3009   ac_save_LIBS="$LIBS"
3010 LIBS="-ltermcap  $LIBS"
3011 cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014 /* Override any gcc2 internal prototype to avoid an error.  */
3015 /* We use char because int might match the return type of a gcc2
3016     builtin and then its argument prototype would still apply.  */
3017 char tgetent();
3018
3019 int main() {
3020 tgetent()
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3024   rm -rf conftest*
3025   eval "ac_cv_lib_$ac_lib_var=yes"
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   eval "ac_cv_lib_$ac_lib_var=no"
3031 fi
3032 rm -f conftest*
3033 LIBS="$ac_save_LIBS"
3034
3035 fi
3036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3037   echo "$ac_t""yes" 1>&6
3038    CONS_LIBS="-ltermcap"
3039          CONS_OBJ="conio.o"
3040          CONS_SRC="conio.c"
3041          got_conio="yes"
3042          support_readline=no
3043          cat >> confdefs.h <<\EOF
3044 #define HAVE_CONIO 1
3045 EOF
3046  
3047        
3048 else
3049   echo "$ac_t""no" 1>&6
3050  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3051 echo "configure:3052: checking for tgetent in -lncurses" >&5
3052 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3053 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   ac_save_LIBS="$LIBS"
3057 LIBS="-lncurses  $LIBS"
3058 cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061 /* Override any gcc2 internal prototype to avoid an error.  */
3062 /* We use char because int might match the return type of a gcc2
3063     builtin and then its argument prototype would still apply.  */
3064 char tgetent();
3065
3066 int main() {
3067 tgetent()
3068 ; return 0; }
3069 EOF
3070 if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3071   rm -rf conftest*
3072   eval "ac_cv_lib_$ac_lib_var=yes"
3073 else
3074   echo "configure: failed program was:" >&5
3075   cat conftest.$ac_ext >&5
3076   rm -rf conftest*
3077   eval "ac_cv_lib_$ac_lib_var=no"
3078 fi
3079 rm -f conftest*
3080 LIBS="$ac_save_LIBS"
3081
3082 fi
3083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3084   echo "$ac_t""yes" 1>&6
3085    CONS_LIBS="-lncurses"
3086            CONS_OBJ="conio.o"
3087            CONS_SRC="conio.c"
3088            got_conio="yes"
3089            support_readline=no
3090            cat >> confdefs.h <<\EOF
3091 #define HAVE_CONIO 1
3092 EOF
3093  
3094          
3095 else
3096   echo "$ac_t""no" 1>&6
3097  echo " "; echo "Neither termcap nor ncurses library found. CONIO turned off ..."; echo " "
3098 fi
3099
3100        
3101 fi
3102
3103     
3104 else
3105   echo "$ac_t""no" 1>&6
3106 echo " "; echo "termcap.h not found. CONIO turned off ..."; echo " "
3107 fi
3108
3109 fi
3110
3111
3112 # ---------------------------------------------------
3113 # Check for readline support/directory (default off)
3114 # ---------------------------------------------------
3115 # this allows you to turn it completely off
3116 # Check whether --enable-readline or --disable-readline was given.
3117 if test "${enable_readline+set}" = set; then
3118   enableval="$enable_readline"
3119   if test x$enableval = xno; then
3120     support_readline=no
3121   fi
3122 fi
3123
3124
3125 got_readline="no"
3126 READLINE_SRC=
3127 if test x$support_readline = xyes; then
3128    # Check whether --with-readline or --without-readline was given.
3129 if test "${with_readline+set}" = set; then
3130   withval="$with_readline"
3131   
3132         case "$with_readline" in
3133         no) : ;;
3134         yes|*)
3135           if test "$with_readline" != "yes"; then
3136             CONS_INC="-I${with_readline}"
3137             CONS_LDFLAGS="-L$with_readline"
3138           else
3139              with_readline="/usr/include/readline" 
3140           fi
3141           ac_safe=`echo "${with_readline}/readline.h" | sed 'y%./+-%__p_%'`
3142 echo $ac_n "checking for ${with_readline}/readline.h""... $ac_c" 1>&6
3143 echo "configure:3144: checking for ${with_readline}/readline.h" >&5
3144 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 #include <${with_readline}/readline.h>
3151 EOF
3152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3153 { (eval echo configure:3154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3155 if test -z "$ac_err"; then
3156   rm -rf conftest*
3157   eval "ac_cv_header_$ac_safe=yes"
3158 else
3159   echo "$ac_err" >&5
3160   echo "configure: failed program was:" >&5
3161   cat conftest.$ac_ext >&5
3162   rm -rf conftest*
3163   eval "ac_cv_header_$ac_safe=no"
3164 fi
3165 rm -f conftest*
3166 fi
3167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3168   echo "$ac_t""yes" 1>&6
3169    cat >> confdefs.h <<\EOF
3170 #define HAVE_READLINE 1
3171 EOF
3172  
3173                CONS_LIBS="-lreadline -ltermcap"
3174                got_readline="yes"   
3175              
3176 else
3177   echo "$ac_t""no" 1>&6
3178  echo " "
3179                echo "readline.h not found. readline turned off ..."
3180                echo " "
3181              
3182           
3183 fi
3184
3185           ;;
3186         esac
3187      
3188 else
3189   
3190        # check for standard readline library
3191        ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
3192 echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
3193 echo "configure:3194: checking for /usr/include/readline/readline.h" >&5
3194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include </usr/include/readline/readline.h>
3201 EOF
3202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3203 { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205 if test -z "$ac_err"; then
3206   rm -rf conftest*
3207   eval "ac_cv_header_$ac_safe=yes"
3208 else
3209   echo "$ac_err" >&5
3210   echo "configure: failed program was:" >&5
3211   cat conftest.$ac_ext >&5
3212   rm -rf conftest*
3213   eval "ac_cv_header_$ac_safe=no"
3214 fi
3215 rm -f conftest*
3216 fi
3217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218   echo "$ac_t""yes" 1>&6
3219    cat >> confdefs.h <<\EOF
3220 #define HAVE_READLINE 1
3221 EOF
3222
3223            got_readline="yes"
3224            CONS_INC="-I/usr/include/readline"
3225            CONS_LIBS="-lreadline -ltermcap"
3226          
3227 else
3228   echo "$ac_t""no" 1>&6
3229
3230            # Did not find standard library, so try Bacula's default
3231             ac_safe=`echo "${TOP_DIR}/depkgs/readline/readline.h" | sed 'y%./+-%__p_%'`
3232 echo $ac_n "checking for ${TOP_DIR}/depkgs/readline/readline.h""... $ac_c" 1>&6
3233 echo "configure:3234: checking for ${TOP_DIR}/depkgs/readline/readline.h" >&5
3234 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3235   echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237   cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240 #include <${TOP_DIR}/depkgs/readline/readline.h>
3241 EOF
3242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3243 { (eval echo configure:3244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3245 if test -z "$ac_err"; then
3246   rm -rf conftest*
3247   eval "ac_cv_header_$ac_safe=yes"
3248 else
3249   echo "$ac_err" >&5
3250   echo "configure: failed program was:" >&5
3251   cat conftest.$ac_ext >&5
3252   rm -rf conftest*
3253   eval "ac_cv_header_$ac_safe=no"
3254 fi
3255 rm -f conftest*
3256 fi
3257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3258   echo "$ac_t""yes" 1>&6
3259    cat >> confdefs.h <<\EOF
3260 #define HAVE_READLINE 1
3261 EOF
3262  
3263                  got_readline="yes"   
3264                  CONS_INC="-I${TOP_DIR}/depkgs/readline"
3265                  CONS_LIBS="-lreadline -lhistory -ltermcap"
3266                  CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
3267                  PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
3268               
3269 else
3270   echo "$ac_t""no" 1>&6
3271  echo " "
3272                 echo "readline.h not found. readline turned off ..."
3273                 echo " "
3274               
3275             
3276 fi
3277
3278          
3279        
3280 fi
3281
3282          
3283    
3284 fi
3285
3286 fi
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297 # Minimal stuff for readline Makefile configuration
3298 MAKE_SHELL=/bin/sh
3299
3300 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3301 echo "configure:3302: checking whether stat file-mode macros are broken" >&5
3302 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 #include <sys/types.h>
3309 #include <sys/stat.h>
3310
3311 #if defined(S_ISBLK) && defined(S_IFDIR)
3312 # if S_ISBLK (S_IFDIR)
3313 You lose.
3314 # endif
3315 #endif
3316
3317 #if defined(S_ISBLK) && defined(S_IFCHR)
3318 # if S_ISBLK (S_IFCHR)
3319 You lose.
3320 # endif
3321 #endif
3322
3323 #if defined(S_ISLNK) && defined(S_IFREG)
3324 # if S_ISLNK (S_IFREG)
3325 You lose.
3326 # endif
3327 #endif
3328
3329 #if defined(S_ISSOCK) && defined(S_IFREG)
3330 # if S_ISSOCK (S_IFREG)
3331 You lose.
3332 # endif
3333 #endif
3334
3335 EOF
3336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3337   egrep "You lose" >/dev/null 2>&1; then
3338   rm -rf conftest*
3339   ac_cv_header_stat_broken=yes
3340 else
3341   rm -rf conftest*
3342   ac_cv_header_stat_broken=no
3343 fi
3344 rm -f conftest*
3345
3346 fi
3347
3348 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3349 if test $ac_cv_header_stat_broken = yes; then
3350   cat >> confdefs.h <<\EOF
3351 #define STAT_MACROS_BROKEN 1
3352 EOF
3353
3354 fi
3355
3356 ac_header_dirent=no
3357 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3358 do
3359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3360 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_hdr that defines DIR" >&5
3362 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 #include <sys/types.h>
3369 #include <$ac_hdr>
3370 int main() {
3371 DIR *dirp = 0;
3372 ; return 0; }
3373 EOF
3374 if { (eval echo configure:3375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3375   rm -rf conftest*
3376   eval "ac_cv_header_dirent_$ac_safe=yes"
3377 else
3378   echo "configure: failed program was:" >&5
3379   cat conftest.$ac_ext >&5
3380   rm -rf conftest*
3381   eval "ac_cv_header_dirent_$ac_safe=no"
3382 fi
3383 rm -f conftest*
3384 fi
3385 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3386   echo "$ac_t""yes" 1>&6
3387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3388   cat >> confdefs.h <<EOF
3389 #define $ac_tr_hdr 1
3390 EOF
3391  ac_header_dirent=$ac_hdr; break
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395 done
3396 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3397 if test $ac_header_dirent = dirent.h; then
3398 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3399 echo "configure:3400: checking for opendir in -ldir" >&5
3400 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3401 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   ac_save_LIBS="$LIBS"
3405 LIBS="-ldir  $LIBS"
3406 cat > conftest.$ac_ext <<EOF
3407 #line 3408 "configure"
3408 #include "confdefs.h"
3409 /* Override any gcc2 internal prototype to avoid an error.  */
3410 /* We use char because int might match the return type of a gcc2
3411     builtin and then its argument prototype would still apply.  */
3412 char opendir();
3413
3414 int main() {
3415 opendir()
3416 ; return 0; }
3417 EOF
3418 if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3419   rm -rf conftest*
3420   eval "ac_cv_lib_$ac_lib_var=yes"
3421 else
3422   echo "configure: failed program was:" >&5
3423   cat conftest.$ac_ext >&5
3424   rm -rf conftest*
3425   eval "ac_cv_lib_$ac_lib_var=no"
3426 fi
3427 rm -f conftest*
3428 LIBS="$ac_save_LIBS"
3429
3430 fi
3431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3432   echo "$ac_t""yes" 1>&6
3433   LIBS="$LIBS -ldir"
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437
3438 else
3439 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3440 echo "configure:3441: checking for opendir in -lx" >&5
3441 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   ac_save_LIBS="$LIBS"
3446 LIBS="-lx  $LIBS"
3447 cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 /* Override any gcc2 internal prototype to avoid an error.  */
3451 /* We use char because int might match the return type of a gcc2
3452     builtin and then its argument prototype would still apply.  */
3453 char opendir();
3454
3455 int main() {
3456 opendir()
3457 ; return 0; }
3458 EOF
3459 if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3460   rm -rf conftest*
3461   eval "ac_cv_lib_$ac_lib_var=yes"
3462 else
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -rf conftest*
3466   eval "ac_cv_lib_$ac_lib_var=no"
3467 fi
3468 rm -f conftest*
3469 LIBS="$ac_save_LIBS"
3470
3471 fi
3472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3473   echo "$ac_t""yes" 1>&6
3474   LIBS="$LIBS -lx"
3475 else
3476   echo "$ac_t""no" 1>&6
3477 fi
3478
3479 fi
3480
3481 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
3482 do
3483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_func" >&5
3485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3486   echo $ac_n "(cached) $ac_c" 1>&6
3487 else
3488   cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 /* System header to define __stub macros and hopefully few prototypes,
3492     which can conflict with char $ac_func(); below.  */
3493 #include <assert.h>
3494 /* Override any gcc2 internal prototype to avoid an error.  */
3495 /* We use char because int might match the return type of a gcc2
3496     builtin and then its argument prototype would still apply.  */
3497 char $ac_func();
3498
3499 int main() {
3500
3501 /* The GNU C library defines this for functions which it implements
3502     to always fail with ENOSYS.  Some functions are actually named
3503     something starting with __ and the normal name is an alias.  */
3504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3505 choke me
3506 #else
3507 $ac_func();
3508 #endif
3509
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3513   rm -rf conftest*
3514   eval "ac_cv_func_$ac_func=yes"
3515 else
3516   echo "configure: failed program was:" >&5
3517   cat conftest.$ac_ext >&5
3518   rm -rf conftest*
3519   eval "ac_cv_func_$ac_func=no"
3520 fi
3521 rm -f conftest*
3522 fi
3523
3524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3525   echo "$ac_t""yes" 1>&6
3526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3527   cat >> confdefs.h <<EOF
3528 #define $ac_tr_func 1
3529 EOF
3530  
3531 else
3532   echo "$ac_t""no" 1>&6
3533 fi
3534 done
3535
3536 for ac_func in nanosleep nl_langinfo
3537 do
3538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3539 echo "configure:3540: checking for $ac_func" >&5
3540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3541   echo $ac_n "(cached) $ac_c" 1>&6
3542 else
3543   cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 /* System header to define __stub macros and hopefully few prototypes,
3547     which can conflict with char $ac_func(); below.  */
3548 #include <assert.h>
3549 /* Override any gcc2 internal prototype to avoid an error.  */
3550 /* We use char because int might match the return type of a gcc2
3551     builtin and then its argument prototype would still apply.  */
3552 char $ac_func();
3553
3554 int main() {
3555
3556 /* The GNU C library defines this for functions which it implements
3557     to always fail with ENOSYS.  Some functions are actually named
3558     something starting with __ and the normal name is an alias.  */
3559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3560 choke me
3561 #else
3562 $ac_func();
3563 #endif
3564
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568   rm -rf conftest*
3569   eval "ac_cv_func_$ac_func=yes"
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   eval "ac_cv_func_$ac_func=no"
3575 fi
3576 rm -f conftest*
3577 fi
3578
3579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3580   echo "$ac_t""yes" 1>&6
3581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3582   cat >> confdefs.h <<EOF
3583 #define $ac_tr_func 1
3584 EOF
3585  
3586 else
3587   echo "$ac_t""no" 1>&6
3588 fi
3589 done
3590
3591 for ac_hdr in varargs.h
3592 do
3593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3595 echo "configure:3596: checking for $ac_hdr" >&5
3596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <$ac_hdr>
3603 EOF
3604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3605 { (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3607 if test -z "$ac_err"; then
3608   rm -rf conftest*
3609   eval "ac_cv_header_$ac_safe=yes"
3610 else
3611   echo "$ac_err" >&5
3612   echo "configure: failed program was:" >&5
3613   cat conftest.$ac_ext >&5
3614   rm -rf conftest*
3615   eval "ac_cv_header_$ac_safe=no"
3616 fi
3617 rm -f conftest*
3618 fi
3619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3620   echo "$ac_t""yes" 1>&6
3621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3622   cat >> confdefs.h <<EOF
3623 #define $ac_tr_hdr 1
3624 EOF
3625  
3626 else
3627   echo "$ac_t""no" 1>&6
3628 fi
3629 done
3630
3631
3632 # End of readline/conio stuff
3633 # -----------------------------------------------------------------------
3634
3635
3636 # ---------------------------------------------------
3637 # Check for GMP support/directory
3638 # ---------------------------------------------------
3639 #GMP_SRC=
3640 #local_gmp="no"
3641 #AC_ARG_WITH(gmp,
3642 #  [  --with-gmp[=DIR]   Specify gmp library directory],
3643 #  [
3644 #     case "$with_gmp" in
3645 #     no) : ;;
3646 #     yes|*)
3647 #       if test "$with_gmp" != "yes"; then
3648 #         GMP_INC="-I$with_gmp"
3649 #         GMP_LIBS="-lgmp"
3650 #         GMP_LDFLAGS="-L$with_gmp"
3651 #       else
3652 #          with_gmp="/usr/include" 
3653 #       fi
3654 #       AC_CHECK_HEADER($with_gmp/gmp.h, 
3655 #          [ AC_MSG_RESULT(yes)
3656 #            AC_DEFINE(HAVE_GMP) 
3657 #            GMP_LIBS="-lgmp"
3658 #            got_gmp="yes"   
3659 #          ],
3660 #          [ AC_MSG_ERROR([*** gmp library missing]) 
3661 #          ]
3662 #       )
3663 #       ;;
3664 #     esac
3665 #  ],[
3666 #    # check for standard gmp library
3667 #    AC_CHECK_HEADER(/usr/include/gmp.h,
3668 #    [ AC_MSG_RESULT(yes)
3669 #      AC_DEFINE(HAVE_GMP)
3670 #      got_gmp="yes"
3671 #      GMP_INC=
3672 #      GMP_LIBS="-lgmp"
3673 #    ], [
3674 #      # Did not find standard library, so use our own
3675 #      AC_MSG_RESULT(yes)
3676 #      AC_DEFINE(HAVE_GMP)
3677 #      got_gmp="yes"
3678 #      local_gmp="yes"
3679 #      GMP_INC="-I${TOP_DIR}/depkgs/gmp"
3680 #      GMP_LIBS="-lgmp"
3681 #      GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
3682 #      GMP_SRC="${TOP_DIR}/depkgs/gmp"
3683 #    ])
3684 #  ]   
3685 #)
3686 #AC_SUBST(GMP_INC)
3687 #AC_SUBST(GMP_LIBS)
3688 #AC_SUBST(GMP_LDFLAGS)
3689 #AC_SUBST(GMP_SRC)
3690
3691 # End of GMP stuff
3692 # -----------------------------------------------------------------------
3693
3694
3695 # ---------------------------------------------------
3696 # Check for CWEB support/directory
3697 # ---------------------------------------------------
3698 #CWEB_SRC=
3699 #CWEB=/bin
3700 #local_cweb="no"
3701 #AC_ARG_WITH(cweb,
3702 #  [  --with-cweb[=DIR]   Specify cweb library directory],
3703 #  [
3704 #     case "$with_cweb" in
3705 #     no) : ;;
3706 #     yes|*)
3707 #       if test "$with_cweb" != "yes"; then
3708 #         CWEB_INC="-I$with_cweb"
3709 #         CWEB_LIBS="-lcweb"
3710 #         CWEB_LDFLAGS="-L$with_cweb"
3711 #       else
3712 #          with_cweb="/usr/include" 
3713 #       fi
3714 #       AC_CHECK_HEADER($with_cweb/cweb.h, 
3715 #          [ AC_MSG_RESULT(yes)
3716 #            AC_DEFINE(HAVE_CWEB) 
3717 #            CWEB_LIBS="-lcweb"
3718 #            got_cweb="yes"   
3719 #          ],
3720 #          [ AC_MSG_ERROR([*** cweb library missing]) 
3721 #          ]
3722 #       )
3723 #       ;;
3724 #     esac
3725 #  ],[
3726 #    # check for standard cweb library
3727 #    AC_CHECK_HEADER(/usr/include/cweb.h,
3728 #    [ AC_MSG_RESULT(yes)
3729 #      AC_DEFINE(HAVE_CWEB)
3730 #      got_cweb="yes"
3731 #      CWEB_INC=
3732 #      CWEB_LIBS="-lcweb"
3733 #    ], [
3734 #      # Did not find starndard library, so use our own
3735 #      AC_MSG_RESULT(yes)
3736 #      AC_DEFINE(HAVE_CWEB)
3737 #      got_cweb="yes"
3738 #      local_cweb="yes"
3739 #      CWEB=${TOP_DIR}/depkgs/cweb
3740 #      CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
3741 #      CWEB_LIBS="-lcweb"
3742 #      CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
3743 #      CWEB_SRC="${TOP_DIR}/depkgs/cweb"
3744 #    ])
3745 #  ]   
3746 #)
3747 #AC_SUBST(CWEB)
3748 #AC_SUBST(CWEB_INC)
3749 #AC_SUBST(CWEB_LIBS)
3750 #AC_SUBST(CWEB_LDFLAGS)
3751 #AC_SUBST(CWEB_SRC)
3752
3753 # End of CWEB stuff
3754 # -----------------------------------------------------------------------
3755
3756
3757
3758 # -----------------------------------------------------------
3759 # Check whether user wants TCP wrappers support (default off)
3760 # -----------------------------------------------------------
3761 TCPW_MSG="no" 
3762 # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
3763 if test "${with_tcp_wrappers+set}" = set; then
3764   withval="$with_tcp_wrappers"
3765   
3766     if test "x$withval" != "xno" ; then
3767        saved_LIBS="$LIBS"
3768        LIBS="$saved_LIBS -lwrap"
3769        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
3770 echo "configure:3771: checking for libwrap" >&5
3771        cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774  #include <tcpd.h>
3775              int deny_severity = 0;
3776              int allow_severity = 0;
3777              struct request_info *req; 
3778 int main() {
3779  hosts_access(req); 
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3783   rm -rf conftest*
3784   
3785             echo "$ac_t""yes" 1>&6
3786             cat >> confdefs.h <<\EOF
3787 #define HAVE_LIBWRAP 1
3788 EOF
3789
3790             TCPW_MSG="yes" 
3791           
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -rf conftest*
3796   
3797             LIBS="$saved_LIBS -lwrap -lnsl"
3798             cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801  #include <tcpd.h>
3802                  int deny_severity = 0;
3803                  int allow_severity = 0;
3804                  struct request_info *req; 
3805 int main() {
3806  hosts_access(req); 
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3810   rm -rf conftest*
3811   
3812                  echo "$ac_t""yes" 1>&6
3813                  cat >> confdefs.h <<\EOF
3814 #define HAVE_LIBWRAP 1
3815 EOF
3816
3817                  TCPW_MSG="yes" 
3818               
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   { echo "configure: error: *** libwrap missing" 1>&2; exit 1; }  
3824             
3825 fi
3826 rm -f conftest*
3827        
3828 fi
3829 rm -f conftest*
3830     fi
3831   
3832
3833 fi
3834
3835
3836 # ------------------------------------------
3837 # Where to place working dir
3838 # ------------------------------------------
3839 working_dir=`eval echo ${prefix}/var/bacula/working`
3840 # Check whether --with-working-dir or --without-working-dir was given.
3841 if test "${with_working_dir+set}" = set; then
3842   withval="$with_working_dir"
3843   
3844        if test "x$withval" != "xno" ; then     
3845               working_dir=$withval
3846        fi
3847    
3848
3849 fi
3850
3851
3852
3853
3854
3855 # ------------------------------------------
3856 # Where to place scriptdir (script files)
3857 # ------------------------------------------
3858 scriptdir=`eval echo ${sysconfdir}`
3859 # Check whether --with-scriptdir or --without-scriptdir was given.
3860 if test "${with_scriptdir+set}" = set; then
3861   withval="$with_scriptdir"
3862   
3863        if test "x$withval" != "xno" ; then     
3864               scriptdir=$withval
3865        fi
3866    
3867
3868 fi
3869
3870
3871
3872
3873
3874 # ------------------------------------------
3875 # Where to send dump email
3876 # ------------------------------------------
3877 dump_email=root@localhost
3878 # Check whether --with-dump-email or --without-dump-email was given.
3879 if test "${with_dump_email+set}" = set; then
3880   withval="$with_dump_email"
3881   
3882        if test "x$withval" != "xno" ; then     
3883               dump_email=$withval
3884        fi
3885    
3886
3887 fi
3888
3889
3890
3891
3892 # ------------------------------------------
3893 # Where to send job email
3894 # ------------------------------------------
3895 job_email=root@localhost
3896 # Check whether --with-job-email or --without-job-email was given.
3897 if test "${with_job_email+set}" = set; then
3898   withval="$with_job_email"
3899   
3900        if test "x$withval" != "xno" ; then     
3901               job_email=$withval
3902        fi
3903    
3904
3905 fi
3906
3907
3908
3909
3910 # ------------------------------------------
3911 # Where to find smtp host
3912 # ------------------------------------------
3913 smtp_host=localhost
3914 # Check whether --with-smtp_host or --without-smtp_host was given.
3915 if test "${with_smtp_host+set}" = set; then
3916   withval="$with_smtp_host"
3917   
3918        if test "x$withval" != "xno" ; then     
3919               smtp_host=$withval
3920        fi
3921    
3922
3923 fi
3924
3925
3926
3927
3928
3929 # ------------------------------------
3930 # Where to place pid files
3931 # ------------------------------------
3932 piddir=/var/run
3933 # Check whether --with-pid-dir or --without-pid-dir was given.
3934 if test "${with_pid_dir+set}" = set; then
3935   withval="$with_pid_dir"
3936   
3937         if test "x$withval" != "xno" ; then     
3938             piddir=$withval
3939         fi
3940     
3941
3942 fi
3943
3944
3945 cat >> confdefs.h <<EOF
3946 #define _PATH_BACULA_PIDDIR "$piddir"
3947 EOF
3948
3949
3950
3951
3952 # ------------------------------------
3953 # Where to place subsys "lock file"
3954 # ------------------------------------
3955 subsysdir=/var/run/subsys
3956 # Check whether --with-subsys-dir or --without-subsys-dir was given.
3957 if test "${with_subsys_dir+set}" = set; then
3958   withval="$with_subsys_dir"
3959   
3960         if test "x$withval" != "xno" ; then     
3961             subsysdir=$withval
3962         fi
3963     
3964
3965 fi
3966
3967
3968
3969
3970
3971
3972 # ------------------------------------
3973 # Where to start assigning ports
3974 # ------------------------------------
3975 baseport=9101
3976 # Check whether --with-baseport or --without-baseport was given.
3977 if test "${with_baseport+set}" = set; then
3978   withval="$with_baseport"
3979   
3980         if test "x$withval" != "xno" ; then     
3981              baseport=$withval
3982         fi
3983     
3984
3985 fi
3986
3987
3988
3989 dir_port=`expr $baseport`
3990 fd_port=`expr $baseport + 1`
3991 sd_port=`expr $fd_port + 1`
3992
3993
3994
3995
3996
3997
3998 # ------------------------------------------
3999 # Generate passwords
4000 # ------------------------------------------
4001 dir_password=
4002 # Check whether --with-dir-password or --without-dir-password was given.
4003 if test "${with_dir_password+set}" = set; then
4004   withval="$with_dir_password"
4005   
4006        if test "x$withval" != "xno" ; then     
4007            dir_password=$withval
4008        fi
4009    
4010
4011 fi
4012
4013
4014 if test "x$dir_password" = "x" ; then
4015    if test "x$OPENSSL" = "xnone" ; then
4016 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
4017       key=`autoconf/randpass 33`
4018    else
4019       key=`openssl rand -base64 33`
4020    fi
4021    dir_password=$key
4022 fi
4023
4024 fd_password=
4025 # Check whether --with-fd-password or --without-fd-password was given.
4026 if test "${with_fd_password+set}" = set; then
4027   withval="$with_fd_password"
4028   
4029        if test "x$withval" != "xno" ; then     
4030            fd_password=$withval
4031        fi
4032    
4033
4034 fi
4035
4036
4037 if test "x$fd_password" = "x" ; then
4038    if test "x$OPENSSL" = "xnone" ; then
4039 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
4040       key=`autoconf/randpass 37`
4041    else
4042       key=`openssl rand -base64 33`
4043    fi
4044    fd_password=$key
4045 fi
4046
4047 sd_password=
4048 # Check whether --with-sd-password or --without-sd-password was given.
4049 if test "${with_sd_password+set}" = set; then
4050   withval="$with_sd_password"
4051   
4052        if test "x$withval" != "xno" ; then     
4053            sd_password=$withval
4054        fi
4055    
4056
4057 fi
4058
4059
4060 if test "x$sd_password" = "x" ; then
4061    if test "x$OPENSSL" = "xnone" ; then
4062 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
4063       key=`autoconf/randpass 41`
4064    else
4065       key=`openssl rand -base64 33`
4066    fi
4067    sd_password=$key
4068 fi
4069
4070
4071
4072
4073
4074
4075
4076 #
4077 # Handle users and groups for each daemon
4078 #
4079 dir_user=
4080 # Check whether --with-dir_user or --without-dir_user was given.
4081 if test "${with_dir_user+set}" = set; then
4082   withval="$with_dir_user"
4083   
4084         if test "x$withval" != "x" ; then       
4085              dir_user=$withval
4086         fi
4087     
4088
4089 fi
4090
4091
4092 dir_group=
4093 # Check whether --with-dir_group or --without-dir_group was given.
4094 if test "${with_dir_group+set}" = set; then
4095   withval="$with_dir_group"
4096   
4097         if test "x$withval" != "x" ; then       
4098              dir_group=$withval
4099         fi
4100     
4101
4102 fi
4103
4104
4105 sd_user=
4106 # Check whether --with-sd_user or --without-sd_user was given.
4107 if test "${with_sd_user+set}" = set; then
4108   withval="$with_sd_user"
4109   
4110         if test "x$withval" != "x" ; then       
4111              sd_user=$withval
4112         fi
4113     
4114
4115 fi
4116
4117
4118 sd_group=
4119 # Check whether --with-sd_group or --without-sd_group was given.
4120 if test "${with_sd_group+set}" = set; then
4121   withval="$with_sd_group"
4122   
4123         if test "x$withval" != "x" ; then       
4124              sd_group=$withval
4125         fi
4126     
4127
4128 fi
4129
4130
4131 fd_user=
4132 # Check whether --with-fd_user or --without-fd_user was given.
4133 if test "${with_fd_user+set}" = set; then
4134   withval="$with_fd_user"
4135   
4136         if test "x$withval" != "x" ; then       
4137              fd_user=$withval
4138         fi
4139     
4140
4141 fi
4142
4143
4144 fd_group=
4145 # Check whether --with-fd_group or --without-fd_group was given.
4146 if test "${with_fd_group+set}" = set; then
4147   withval="$with_fd_group"
4148   
4149         if test "x$withval" != "x" ; then       
4150              fd_group=$withval
4151         fi
4152     
4153
4154 fi
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167 #
4168 # allow setting default executable permissions
4169 #
4170 SBINPERM=0754
4171 # Check whether --with-sbin-perm or --without-sbin-perm was given.
4172 if test "${with_sbin_perm+set}" = set; then
4173   withval="$with_sbin_perm"
4174   
4175         if test "x$withval" != "x" ; then       
4176             SBINPERM=$withval
4177         fi
4178     
4179
4180 fi
4181
4182
4183
4184
4185 # ------------------------------------------------
4186 # Bacula check for various SQL database engines
4187 # ------------------------------------------------
4188
4189 db_found=no
4190 echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6
4191 echo "configure:4192: checking for PostgreSQL support" >&5
4192 # Check whether --with-postgresql or --without-postgresql was given.
4193 if test "${with_postgresql+set}" = set; then
4194   withval="$with_postgresql"
4195   
4196   if test "$withval" != "no"; then
4197       if test "$db_found" = "yes"; then
4198           echo "$ac_t""error" 1>&6
4199           { echo "configure: error: "You can configure for only one database."" 1>&2; exit 1; };
4200       fi
4201       if test "$withval" = "yes"; then
4202           if test -f /usr/local/include/libpq-fe.h; then
4203               POSTGRESQL_INCDIR=/usr/local/include
4204               POSTGRESQL_LIBDIR=/usr/local/lib
4205               POSTGRESQL_BINDIR=/usr/local/bin
4206           elif test -f /usr/include/libpq-fe.h; then
4207               POSTGRESQL_INCDIR=/usr/include
4208               POSTGRESQL_LIBDIR=/usr/lib
4209               POSTGRESQL_BINDIR=/usr/bin
4210           elif test -f /usr/include/pgsql/libpq-fe.h; then
4211               POSTGRESQL_INCDIR=/usr/include/pgsql
4212               POSTGRESQL_LIBDIR=/usr/lib/pgsql
4213               POSTGRESQL_BINDIR=/usr/bin
4214           elif test -f /usr/include/postgresql/libpq-fe.h; then
4215               POSTGRESQL_INCDIR=/usr/include/postgresql
4216               POSTGRESQL_LIBDIR=/usr/lib/postgresql
4217               POSTGRESQL_BINDIR=/usr/bin
4218           else
4219               echo "$ac_t""no" 1>&6
4220               { echo "configure: error: Unable to find libpq-fe.h in standard locations" 1>&2; exit 1; }
4221           fi
4222       elif test -f $withval/include/libpq-fe.h; then
4223           POSTGRESQL_INCDIR=$withval/include
4224           POSTGRESQL_LIBDIR=$withval/lib
4225           POSTGRESQL_BINDIR=$withval/bin
4226       else
4227           echo "$ac_t""no" 1>&6
4228           { echo "configure: error: Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval" 1>&2; exit 1; }
4229       fi
4230       POSTGRESQL_LFLAGS="-L$POSTGRESQL_LIBDIR -lpq"
4231       echo $ac_n "checking for crypt""... $ac_c" 1>&6
4232 echo "configure:4233: checking for crypt" >&5
4233 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 /* System header to define __stub macros and hopefully few prototypes,
4240     which can conflict with char crypt(); below.  */
4241 #include <assert.h>
4242 /* Override any gcc2 internal prototype to avoid an error.  */
4243 /* We use char because int might match the return type of a gcc2
4244     builtin and then its argument prototype would still apply.  */
4245 char crypt();
4246
4247 int main() {
4248
4249 /* The GNU C library defines this for functions which it implements
4250     to always fail with ENOSYS.  Some functions are actually named
4251     something starting with __ and the normal name is an alias.  */
4252 #if defined (__stub_crypt) || defined (__stub___crypt)
4253 choke me
4254 #else
4255 crypt();
4256 #endif
4257
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4261   rm -rf conftest*
4262   eval "ac_cv_func_crypt=yes"
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_func_crypt=no"
4268 fi
4269 rm -f conftest*
4270 fi
4271
4272 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
4273   echo "$ac_t""yes" 1>&6
4274   :
4275 else
4276   echo "$ac_t""no" 1>&6
4277 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4278 echo "configure:4279: checking for crypt in -lcrypt" >&5
4279 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   ac_save_LIBS="$LIBS"
4284 LIBS="-lcrypt  $LIBS"
4285 cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 /* Override any gcc2 internal prototype to avoid an error.  */
4289 /* We use char because int might match the return type of a gcc2
4290     builtin and then its argument prototype would still apply.  */
4291 char crypt();
4292
4293 int main() {
4294 crypt()
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298   rm -rf conftest*
4299   eval "ac_cv_lib_$ac_lib_var=yes"
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_lib_$ac_lib_var=no"
4305 fi
4306 rm -f conftest*
4307 LIBS="$ac_save_LIBS"
4308
4309 fi
4310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4311   echo "$ac_t""yes" 1>&6
4312   POSTGRESQL_LFLAGS="-lcrypt $POSTGRESQL_LFLAGS"
4313 else
4314   echo "$ac_t""no" 1>&6
4315 fi
4316
4317 fi
4318
4319       SQL_INCLUDE=-I$POSTGRESQL_INCDIR
4320       SQL_LFLAGS=$POSTGRESQL_LFLAGS
4321       SQL_BINDIR=$POSTGRESQL_BINDIR
4322       cat >> confdefs.h <<\EOF
4323 #define HAVE_POSTGRESQL 1
4324 EOF
4325
4326       echo "$ac_t""yes" 1>&6
4327       db_found=yes
4328       support_postgresql=yes
4329       db_name=PostgreSQL
4330       DB_NAME=postgresql
4331   else
4332       echo "$ac_t""no" 1>&6
4333   fi
4334
4335 else
4336   
4337   echo "$ac_t""no" 1>&6
4338
4339 fi
4340
4341
4342
4343
4344
4345
4346
4347
4348 db_found=no
4349 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
4350 echo "configure:4351: checking for MySQL support" >&5
4351 # Check whether --with-mysql or --without-mysql was given.
4352 if test "${with_mysql+set}" = set; then
4353   withval="$with_mysql"
4354   
4355   if test "$withval" != "no"; then
4356         if test "$withval" = "yes"; then
4357                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
4358                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
4359                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
4360                         MYSQL_BINDIR=/usr/local/mysql/bin
4361                 elif test -f /usr/include/mysql/mysql.h; then
4362                         MYSQL_INCDIR=/usr/include/mysql
4363                         MYSQL_LIBDIR=/usr/lib/mysql
4364                         MYSQL_BINDIR=/usr/bin      
4365                 elif test -f /usr/include/mysql.h; then
4366                         MYSQL_INCDIR=/usr/include
4367                         MYSQL_LIBDIR=/usr/lib
4368                         MYSQL_BINDIR=/usr/bin
4369                 elif test -f /usr/local/include/mysql/mysql.h; then
4370                         MYSQL_INCDIR=/usr/local/include/mysql
4371                         MYSQL_LIBDIR=/usr/local/lib/mysql
4372                         MYSQL_BINDIR=/usr/local/bin
4373                 elif test -f /usr/local/include/mysql.h; then
4374                         MYSQL_INCDIR=/usr/local/include
4375                         MYSQL_LIBDIR=/usr/local/lib
4376                         MYSQL_BINDIR=/usr/local/bin
4377                 else
4378                    echo "$ac_t""no" 1>&6
4379                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
4380                 fi
4381         else
4382                 if test -f $withval/include/mysql/mysql.h; then
4383                         MYSQL_INCDIR=$withval/include/mysql
4384                         MYSQL_LIBDIR=$withval/lib/mysql
4385                         MYSQL_BINDIR=$withval/bin
4386                 elif test -f $withval/include/mysql.h; then
4387                         MYSQL_INCDIR=$withval/include
4388                         MYSQL_LIBDIR=$withval/lib
4389                         MYSQL_BINDIR=$withval/bin
4390                 else
4391                    echo "$ac_t""no" 1>&6
4392                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
4393                 fi
4394         fi
4395     SQL_INCLUDE=-I$MYSQL_INCDIR
4396     if test -f $MYSQL_LIBDIR/libmysqlclient_r.a; then
4397        SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
4398        cat >> confdefs.h <<\EOF
4399 #define HAVE_THREAD_SAFE_MYSQL 1
4400 EOF
4401
4402     else
4403        SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
4404     fi
4405     SQL_BINDIR=$MYSQL_BINDIR
4406
4407     cat >> confdefs.h <<\EOF
4408 #define HAVE_MYSQL 1
4409 EOF
4410
4411     echo "$ac_t""yes" 1>&6
4412     db_found=yes
4413     support_mysql=yes
4414     db_name=MySQL
4415     DB_NAME=mysql
4416
4417   else
4418         echo "$ac_t""no" 1>&6
4419   fi
4420
4421
4422 fi
4423
4424
4425 # Check whether --with-embedded-mysql or --without-embedded-mysql was given.
4426 if test "${with_embedded_mysql+set}" = set; then
4427   withval="$with_embedded_mysql"
4428   
4429   if test "$withval" != "no"; then
4430         if test "$withval" = "yes"; then
4431                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
4432                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
4433                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
4434                         MYSQL_BINDIR=/usr/local/mysql/bin
4435                 elif test -f /usr/include/mysql/mysql.h; then
4436                         MYSQL_INCDIR=/usr/include/mysql
4437                         MYSQL_LIBDIR=/usr/lib/mysql
4438                         MYSQL_BINDIR=/usr/bin      
4439                 elif test -f /usr/include/mysql.h; then
4440                         MYSQL_INCDIR=/usr/include
4441                         MYSQL_LIBDIR=/usr/lib
4442                         MYSQL_BINDIR=/usr/bin
4443                 elif test -f /usr/local/include/mysql/mysql.h; then
4444                         MYSQL_INCDIR=/usr/local/include/mysql
4445                         MYSQL_LIBDIR=/usr/local/lib/mysql
4446                         MYSQL_BINDIR=/usr/local/bin
4447                 elif test -f /usr/local/include/mysql.h; then
4448                         MYSQL_INCDIR=/usr/local/include
4449                         MYSQL_LIBDIR=/usr/local/lib
4450                         MYSQL_BINDIR=/usr/local/bin
4451                 else
4452                    echo "$ac_t""no" 1>&6
4453                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
4454                 fi
4455         else
4456                 if test -f $withval/include/mysql/mysql.h; then
4457                         MYSQL_INCDIR=$withval/include/mysql
4458                         MYSQL_LIBDIR=$withval/lib/mysql
4459                         MYSQL_BINDIR=$withval/bin
4460                 elif test -f $withval/include/mysql.h; then
4461                         MYSQL_INCDIR=$withval/include
4462                         MYSQL_LIBDIR=$withval/lib
4463                         MYSQL_BINDIR=$withval/bin
4464                 else
4465                    echo "$ac_t""no" 1>&6
4466                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
4467                 fi
4468         fi
4469     SQL_INCLUDE=-I$MYSQL_INCDIR
4470     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
4471     SQL_BINDIR=$MYSQL_BINDIR
4472
4473     cat >> confdefs.h <<\EOF
4474 #define HAVE_MYSQL 1
4475 EOF
4476
4477     cat >> confdefs.h <<\EOF
4478 #define HAVE_EMBEDDED_MYSQL 1
4479 EOF
4480
4481     echo "$ac_t""yes" 1>&6
4482     db_found=yes
4483     support_mysql=yes
4484     db_name=MySQL
4485     DB_NAME=mysql
4486
4487   else
4488         echo "$ac_t""no" 1>&6
4489   fi
4490
4491
4492 fi
4493
4494
4495
4496
4497
4498
4499   
4500
4501
4502
4503 db_found=no
4504 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
4505 echo "configure:4506: checking for SQLite support" >&5
4506 # Check whether --with-sqlite or --without-sqlite was given.
4507 if test "${with_sqlite+set}" = set; then
4508   withval="$with_sqlite"
4509   
4510   if test "$withval" != "no"; then
4511      if test "$withval" = "yes"; then
4512         if test -f /usr/local/include/sqlite.h; then
4513            SQLITE_INCDIR=/usr/local/include
4514            SQLITE_LIBDIR=/usr/local/lib
4515            SQLITE_BINDIR=/usr/local/bin
4516         elif test -f /usr/include/sqlite.h; then
4517            SQLITE_INCDIR=/usr/include
4518            SQLITE_LIBDIR=/usr/lib
4519            SQLITE_BINDIR=/usr/bin      
4520         else
4521            echo "$ac_t""no" 1>&6
4522            { echo "configure: error: Unable to find sqlite.h in standard locations" 1>&2; exit 1; }
4523         fi
4524      else
4525         if test -f $withval/sqlite.h; then
4526            SQLITE_INCDIR=$withval
4527            SQLITE_LIBDIR=$withval
4528            SQLITE_BINDIR=$withval
4529         else
4530            echo "$ac_t""no" 1>&6
4531            { echo "configure: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" 1>&2; exit 1; }
4532         fi
4533      fi
4534      SQL_INCLUDE=-I$SQLITE_INCDIR
4535      SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
4536      SQL_BINDIR=$SQLITE_BINDIR
4537
4538      cat >> confdefs.h <<\EOF
4539 #define HAVE_SQLITE 1
4540 EOF
4541
4542      echo "$ac_t""yes" 1>&6
4543      db_found=yes
4544      support_sqlite=yes
4545      db_name=SQLite
4546      DB_NAME=sqlite
4547
4548   else
4549      echo "$ac_t""no" 1>&6
4550   fi
4551
4552 else
4553   
4554   echo "$ac_t""no" 1>&6
4555
4556 fi
4557
4558
4559
4560
4561   
4562
4563
4564
4565
4566
4567 cat >> confdefs.h <<\EOF
4568 #define PROTOTYPES 1
4569 EOF
4570
4571
4572 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
4573     if test -z "$CCOPTS"; then
4574         CCOPTS='-g -O2 -Wall'
4575     fi
4576     CFLAGS="$CCOPTS"
4577 fi
4578
4579
4580 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4581 echo "configure:4582: checking for mingw32 environment" >&5
4582 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4583   echo $ac_n "(cached) $ac_c" 1>&6
4584 else
4585   cat > conftest.$ac_ext <<EOF
4586 #line 4587 "configure"
4587 #include "confdefs.h"
4588
4589 int main() {
4590 return __MINGW32__;
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4594   rm -rf conftest*
4595   ac_cv_mingw32=yes
4596 else
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   ac_cv_mingw32=no
4601 fi
4602 rm -f conftest*
4603 rm -f conftest*
4604 fi
4605
4606 echo "$ac_t""$ac_cv_mingw32" 1>&6
4607 MINGW32=
4608 test "$ac_cv_mingw32" = yes && MINGW32=yes
4609
4610
4611 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4612 echo "configure:4613: checking for executable suffix" >&5
4613 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4614   echo $ac_n "(cached) $ac_c" 1>&6
4615 else
4616   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4617   ac_cv_exeext=.exe
4618 else
4619   rm -f conftest*
4620   echo 'int main () { return 0; }' > conftest.$ac_ext
4621   ac_cv_exeext=
4622   if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4623     for file in conftest.*; do
4624       case $file in
4625       *.c | *.o | *.obj) ;;
4626       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4627       esac
4628     done
4629   else
4630     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4631   fi
4632   rm -f conftest*
4633   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4634 fi
4635 fi
4636
4637 EXEEXT=""
4638 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4639 echo "$ac_t""${ac_cv_exeext}" 1>&6
4640 ac_exeext=$EXEEXT
4641
4642
4643 largefile_support="no"
4644 echo $ac_n "checking build system type""... $ac_c" 1>&6
4645 echo "configure:4646: checking build system type" >&5
4646
4647 build_alias=$build
4648 case "$build_alias" in
4649 NONE)
4650   case $nonopt in
4651   NONE) build_alias=$host_alias ;;
4652   *) build_alias=$nonopt ;;
4653   esac ;;
4654 esac
4655
4656 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
4657 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4658 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4659 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4660 echo "$ac_t""$build" 1>&6
4661
4662
4663 # Make sure we can run config.sub.
4664 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
4665 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
4666 fi
4667
4668 echo $ac_n "checking host system type""... $ac_c" 1>&6
4669 echo "configure:4670: checking host system type" >&5
4670
4671 host_alias=$host
4672 case "$host_alias" in
4673 NONE)
4674   case $nonopt in
4675   NONE)
4676     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
4677     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
4678     fi ;;
4679   *) host_alias=$nonopt ;;
4680   esac ;;
4681 esac
4682
4683 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
4684 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4685 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4686 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4687 echo "$ac_t""$host" 1>&6
4688
4689 if test $host != $build; then
4690   ac_tool_prefix=${host_alias}-
4691 else
4692   ac_tool_prefix=
4693 fi
4694
4695
4696    # Check whether --enable-largefile or --disable-largefile was given.
4697 if test "${enable_largefile+set}" = set; then
4698   enableval="$enable_largefile"
4699   :
4700 fi
4701
4702    if test "$enable_largefile" != no; then
4703      # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
4704 set dummy ${ac_tool_prefix}getconf; ac_word=$2
4705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4706 echo "configure:4707: checking for $ac_word" >&5
4707 if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710   if test -n "$GETCONF"; then
4711   ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
4712 else
4713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4714   ac_dummy="$PATH"
4715   for ac_dir in $ac_dummy; do
4716     test -z "$ac_dir" && ac_dir=.
4717     if test -f $ac_dir/$ac_word; then
4718       ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
4719       break
4720     fi
4721   done
4722   IFS="$ac_save_ifs"
4723   test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
4724 fi
4725 fi
4726 GETCONF="$ac_cv_prog_GETCONF"
4727 if test -n "$GETCONF"; then
4728   echo "$ac_t""$GETCONF" 1>&6
4729 else
4730   echo "$ac_t""no" 1>&6
4731 fi
4732
4733
4734
4735      echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
4736 echo "configure:4737: checking for CFLAGS value to request large file support" >&5
4737 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
4741         ac_cv_sys_largefile_CFLAGS=no
4742         case "$host_os" in
4743            # IRIX 6.2 and later require cc -n32.
4744            irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
4745              if test "$GCC" != yes; then
4746                ac_cv_sys_largefile_CFLAGS=-n32
4747              fi
4748              ac_save_CC="$CC"
4749              CC="$CC $ac_cv_sys_largefile_CFLAGS"
4750              cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753
4754 int main() {
4755
4756 ; return 0; }
4757 EOF
4758 if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4759   :
4760 else
4761   echo "configure: failed program was:" >&5
4762   cat conftest.$ac_ext >&5
4763   rm -rf conftest*
4764   ac_cv_sys_largefile_CFLAGS=no
4765 fi
4766 rm -f conftest*
4767              CC="$ac_save_CC"
4768            esac
4769       }
4770 fi
4771
4772 echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
4773      echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
4774 echo "configure:4775: checking for LDFLAGS value to request large file support" >&5
4775 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
4779         ac_cv_sys_largefile_LDFLAGS=no
4780         
4781       }
4782 fi
4783
4784 echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
4785      echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
4786 echo "configure:4787: checking for LIBS value to request large file support" >&5
4787 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
4791         ac_cv_sys_largefile_LIBS=no
4792         
4793       }
4794 fi
4795
4796 echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
4797
4798      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4799        case "$ac_flag" in
4800        no) ;;
4801        -D_FILE_OFFSET_BITS=*) ;;
4802        -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
4803        -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
4804        -D?* | -I?*)
4805          case "$ac_flag" in
4806    no) ;;
4807    ?*)
4808      case "$CPPFLAGS" in
4809      '') CPPFLAGS="$ac_flag" ;;
4810      *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
4811      esac ;;
4812    esac ;;
4813        *)
4814          case "$ac_flag" in
4815    no) ;;
4816    ?*)
4817      case "$CFLAGS" in
4818      '') CFLAGS="$ac_flag" ;;
4819      *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
4820      esac ;;
4821    esac ;;
4822        esac
4823      done
4824      case "$ac_cv_sys_largefile_LDFLAGS" in
4825    no) ;;
4826    ?*)
4827      case "$LDFLAGS" in
4828      '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
4829      *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
4830      esac ;;
4831    esac
4832      case "$ac_cv_sys_largefile_LIBS" in
4833    no) ;;
4834    ?*)
4835      case "$LIBS" in
4836      '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
4837      *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
4838      esac ;;
4839    esac
4840      echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
4841 echo "configure:4842: checking for _FILE_OFFSET_BITS" >&5
4842 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   ac_cv_sys_file_offset_bits=no
4846       case "$host_os" in
4847         # HP-UX 10.20 and later
4848         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4849           ac_cv_sys_file_offset_bits=64 ;;
4850         esac
4851       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4852         case "$ac_flag" in
4853         -D_FILE_OFFSET_BITS)
4854           ac_cv_sys_file_offset_bits=1 ;;
4855         -D_FILE_OFFSET_BITS=*)
4856           ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4857         esac
4858       done
4859       
4860 fi
4861
4862 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
4863    if test "$ac_cv_sys_file_offset_bits" != no; then
4864      cat >> confdefs.h <<EOF
4865 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4866 EOF
4867
4868    fi
4869      echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
4870 echo "configure:4871: checking for _LARGEFILE_SOURCE" >&5
4871 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874   ac_cv_sys_largefile_source=no
4875       case "$host_os" in
4876         # HP-UX 10.20 and later
4877         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4878           ac_cv_sys_largefile_source=1 ;;
4879         esac
4880       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4881         case "$ac_flag" in
4882         -D_LARGEFILE_SOURCE)
4883           ac_cv_sys_largefile_source=1 ;;
4884         -D_LARGEFILE_SOURCE=*)
4885           ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4886         esac
4887       done
4888       
4889 fi
4890
4891 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
4892    if test "$ac_cv_sys_largefile_source" != no; then
4893      cat >> confdefs.h <<EOF
4894 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4895 EOF
4896
4897    fi
4898      echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
4899 echo "configure:4900: checking for _LARGE_FILES" >&5
4900 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   ac_cv_sys_large_files=no
4904       case "$host_os" in
4905         # AIX 4.2 and later
4906         aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
4907           ac_cv_sys_large_files=1 ;;
4908         esac
4909       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4910         case "$ac_flag" in
4911         -D_LARGE_FILES)
4912           ac_cv_sys_large_files=1 ;;
4913         -D_LARGE_FILES=*)
4914           ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4915         esac
4916       done
4917       
4918 fi
4919
4920 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
4921    if test "$ac_cv_sys_large_files" != no; then
4922      cat >> confdefs.h <<EOF
4923 #define _LARGE_FILES $ac_cv_sys_large_files
4924 EOF
4925
4926    fi
4927    fi
4928   
4929
4930
4931 # If we find X, set shell vars x_includes and x_libraries to the
4932 # paths, otherwise set no_x=yes.
4933 # Uses ac_ vars as temps to allow command line to override cache and checks.
4934 # --without-x overrides everything else, but does not touch the cache.
4935 echo $ac_n "checking for X""... $ac_c" 1>&6
4936 echo "configure:4937: checking for X" >&5
4937
4938 # Check whether --with-x or --without-x was given.
4939 if test "${with_x+set}" = set; then
4940   withval="$with_x"
4941   :
4942 fi
4943
4944 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4945 if test "x$with_x" = xno; then
4946   # The user explicitly disabled X.
4947   have_x=disabled
4948 else
4949   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4950     # Both variables are already set.
4951     have_x=yes
4952   else
4953 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   # One or both of the vars are not set, and there is no cached value.
4957 ac_x_includes=NO ac_x_libraries=NO
4958 rm -fr conftestdir
4959 if mkdir conftestdir; then
4960   cd conftestdir
4961   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4962   cat > Imakefile <<'EOF'
4963 acfindx:
4964         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4965 EOF
4966   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4967     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4968     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4969     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4970     for ac_extension in a so sl; do
4971       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4972         test -f $ac_im_libdir/libX11.$ac_extension; then
4973         ac_im_usrlibdir=$ac_im_libdir; break
4974       fi
4975     done
4976     # Screen out bogus values from the imake configuration.  They are
4977     # bogus both because they are the default anyway, and because
4978     # using them would break gcc on systems where it needs fixed includes.
4979     case "$ac_im_incroot" in
4980         /usr/include) ;;
4981         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4982     esac
4983     case "$ac_im_usrlibdir" in
4984         /usr/lib | /lib) ;;
4985         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4986     esac
4987   fi
4988   cd ..
4989   rm -fr conftestdir
4990 fi
4991
4992 if test "$ac_x_includes" = NO; then
4993   # Guess where to find include files, by looking for this one X11 .h file.
4994   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4995
4996   # First, try using that file with no special directory specified.
4997 cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 #include <$x_direct_test_include>
5001 EOF
5002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5003 { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005 if test -z "$ac_err"; then
5006   rm -rf conftest*
5007   # We can compile using X headers with no special include directory.
5008 ac_x_includes=
5009 else
5010   echo "$ac_err" >&5
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -rf conftest*
5014   # Look for the header file in a standard set of common directories.
5015 # Check X11 before X11Rn because it is often a symlink to the current release.
5016   for ac_dir in               \
5017     /usr/X11/include          \
5018     /usr/X11R6/include        \
5019     /usr/X11R5/include        \
5020     /usr/X11R4/include        \
5021                               \
5022     /usr/include/X11          \
5023     /usr/include/X11R6        \
5024     /usr/include/X11R5        \
5025     /usr/include/X11R4        \
5026                               \
5027     /usr/local/X11/include    \
5028     /usr/local/X11R6/include  \
5029     /usr/local/X11R5/include  \
5030     /usr/local/X11R4/include  \
5031                               \
5032     /usr/local/include/X11    \
5033     /usr/local/include/X11R6  \
5034     /usr/local/include/X11R5  \
5035     /usr/local/include/X11R4  \
5036                               \
5037     /usr/X386/include         \
5038     /usr/x386/include         \
5039     /usr/XFree86/include/X11  \
5040                               \
5041     /usr/include              \
5042     /usr/local/include        \
5043     /usr/unsupported/include  \
5044     /usr/athena/include       \
5045     /usr/local/x11r5/include  \
5046     /usr/lpp/Xamples/include  \
5047                               \
5048     /usr/openwin/include      \
5049     /usr/openwin/share/include \
5050     ; \
5051   do
5052     if test -r "$ac_dir/$x_direct_test_include"; then
5053       ac_x_includes=$ac_dir
5054       break
5055     fi
5056   done
5057 fi
5058 rm -f conftest*
5059 fi # $ac_x_includes = NO
5060
5061 if test "$ac_x_libraries" = NO; then
5062   # Check for the libraries.
5063
5064   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5065   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5066
5067   # See if we find them without any special options.
5068   # Don't add to $LIBS permanently.
5069   ac_save_LIBS="$LIBS"
5070   LIBS="-l$x_direct_test_library $LIBS"
5071 cat > conftest.$ac_ext <<EOF
5072 #line 5073 "configure"
5073 #include "confdefs.h"
5074
5075 int main() {
5076 ${x_direct_test_function}()
5077 ; return 0; }
5078 EOF
5079 if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5080   rm -rf conftest*
5081   LIBS="$ac_save_LIBS"
5082 # We can link X programs with no special library path.
5083 ac_x_libraries=
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   LIBS="$ac_save_LIBS"
5089 # First see if replacing the include by lib works.
5090 # Check X11 before X11Rn because it is often a symlink to the current release.
5091 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5092     /usr/X11/lib          \
5093     /usr/X11R6/lib        \
5094     /usr/X11R5/lib        \
5095     /usr/X11R4/lib        \
5096                           \
5097     /usr/lib/X11          \
5098     /usr/lib/X11R6        \
5099     /usr/lib/X11R5        \
5100     /usr/lib/X11R4        \
5101                           \
5102     /usr/local/X11/lib    \
5103     /usr/local/X11R6/lib  \
5104     /usr/local/X11R5/lib  \
5105     /usr/local/X11R4/lib  \
5106                           \
5107     /usr/local/lib/X11    \
5108     /usr/local/lib/X11R6  \
5109     /usr/local/lib/X11R5  \
5110     /usr/local/lib/X11R4  \
5111                           \
5112     /usr/X386/lib         \
5113     /usr/x386/lib         \
5114     /usr/XFree86/lib/X11  \
5115                           \
5116     /usr/lib              \
5117     /usr/local/lib        \
5118     /usr/unsupported/lib  \
5119     /usr/athena/lib       \
5120     /usr/local/x11r5/lib  \
5121     /usr/lpp/Xamples/lib  \
5122     /lib/usr/lib/X11      \
5123                           \
5124     /usr/openwin/lib      \
5125     /usr/openwin/share/lib \
5126     ; \
5127 do
5128   for ac_extension in a so sl; do
5129     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5130       ac_x_libraries=$ac_dir
5131       break 2
5132     fi
5133   done
5134 done
5135 fi
5136 rm -f conftest*
5137 fi # $ac_x_libraries = NO
5138
5139 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5140   # Didn't find X anywhere.  Cache the known absence of X.
5141   ac_cv_have_x="have_x=no"
5142 else
5143   # Record where we found X for the cache.
5144   ac_cv_have_x="have_x=yes \
5145                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5146 fi
5147 fi
5148   fi
5149   eval "$ac_cv_have_x"
5150 fi # $with_x != no
5151
5152 if test "$have_x" != yes; then
5153   echo "$ac_t""$have_x" 1>&6
5154   no_x=yes
5155 else
5156   # If each of the values was on the command line, it overrides each guess.
5157   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5158   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5159   # Update the cache value to reflect the command line values.
5160   ac_cv_have_x="have_x=yes \
5161                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5162   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5163 fi
5164
5165 if test "$no_x" = yes; then
5166   # Not all programs may use this symbol, but it does not hurt to define it.
5167   cat >> confdefs.h <<\EOF
5168 #define X_DISPLAY_MISSING 1
5169 EOF
5170
5171   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5172 else
5173   if test -n "$x_includes"; then
5174     X_CFLAGS="$X_CFLAGS -I$x_includes"
5175   fi
5176
5177   # It would also be nice to do this for all -L options, not just this one.
5178   if test -n "$x_libraries"; then
5179     X_LIBS="$X_LIBS -L$x_libraries"
5180     # For Solaris; some versions of Sun CC require a space after -R and
5181     # others require no space.  Words are not sufficient . . . .
5182     case "`(uname -sr) 2>/dev/null`" in
5183     "SunOS 5"*)
5184       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5185 echo "configure:5186: checking whether -R must be followed by a space" >&5
5186       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5187       cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190
5191 int main() {
5192
5193 ; return 0; }
5194 EOF
5195 if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5196   rm -rf conftest*
5197   ac_R_nospace=yes
5198 else
5199   echo "configure: failed program was:" >&5
5200   cat conftest.$ac_ext >&5
5201   rm -rf conftest*
5202   ac_R_nospace=no
5203 fi
5204 rm -f conftest*
5205       if test $ac_R_nospace = yes; then
5206         echo "$ac_t""no" 1>&6
5207         X_LIBS="$X_LIBS -R$x_libraries"
5208       else
5209         LIBS="$ac_xsave_LIBS -R $x_libraries"
5210         cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213
5214 int main() {
5215
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219   rm -rf conftest*
5220   ac_R_space=yes
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   ac_R_space=no
5226 fi
5227 rm -f conftest*
5228         if test $ac_R_space = yes; then
5229           echo "$ac_t""yes" 1>&6
5230           X_LIBS="$X_LIBS -R $x_libraries"
5231         else
5232           echo "$ac_t""neither works" 1>&6
5233         fi
5234       fi
5235       LIBS="$ac_xsave_LIBS"
5236     esac
5237   fi
5238
5239   # Check for system-dependent libraries X programs must link with.
5240   # Do this before checking for the system-independent R6 libraries
5241   # (-lICE), since we may need -lsocket or whatever for X linking.
5242
5243   if test "$ISC" = yes; then
5244     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5245   else
5246     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5247     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5248     # the Alpha needs dnet_stub (dnet does not exist).
5249     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5250 echo "configure:5251: checking for dnet_ntoa in -ldnet" >&5
5251 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5253   echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255   ac_save_LIBS="$LIBS"
5256 LIBS="-ldnet  $LIBS"
5257 cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260 /* Override any gcc2 internal prototype to avoid an error.  */
5261 /* We use char because int might match the return type of a gcc2
5262     builtin and then its argument prototype would still apply.  */
5263 char dnet_ntoa();
5264
5265 int main() {
5266 dnet_ntoa()
5267 ; return 0; }
5268 EOF
5269 if { (eval echo configure:5270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5270   rm -rf conftest*
5271   eval "ac_cv_lib_$ac_lib_var=yes"
5272 else
5273   echo "configure: failed program was:" >&5
5274   cat conftest.$ac_ext >&5
5275   rm -rf conftest*
5276   eval "ac_cv_lib_$ac_lib_var=no"
5277 fi
5278 rm -f conftest*
5279 LIBS="$ac_save_LIBS"
5280
5281 fi
5282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5285 else
5286   echo "$ac_t""no" 1>&6
5287 fi
5288
5289     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5290       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5291 echo "configure:5292: checking for dnet_ntoa in -ldnet_stub" >&5
5292 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   ac_save_LIBS="$LIBS"
5297 LIBS="-ldnet_stub  $LIBS"
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* Override any gcc2 internal prototype to avoid an error.  */
5302 /* We use char because int might match the return type of a gcc2
5303     builtin and then its argument prototype would still apply.  */
5304 char dnet_ntoa();
5305
5306 int main() {
5307 dnet_ntoa()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 LIBS="$ac_save_LIBS"
5321
5322 fi
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5326 else
5327   echo "$ac_t""no" 1>&6
5328 fi
5329
5330     fi
5331
5332     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5333     # to get the SysV transport functions.
5334     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5335     # needs -lnsl.
5336     # The nsl library prevents programs from opening the X display
5337     # on Irix 5.2, according to dickey@clark.net.
5338     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5339 echo "configure:5340: checking for gethostbyname" >&5
5340 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5341   echo $ac_n "(cached) $ac_c" 1>&6
5342 else
5343   cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346 /* System header to define __stub macros and hopefully few prototypes,
5347     which can conflict with char gethostbyname(); below.  */
5348 #include <assert.h>
5349 /* Override any gcc2 internal prototype to avoid an error.  */
5350 /* We use char because int might match the return type of a gcc2
5351     builtin and then its argument prototype would still apply.  */
5352 char gethostbyname();
5353
5354 int main() {
5355
5356 /* The GNU C library defines this for functions which it implements
5357     to always fail with ENOSYS.  Some functions are actually named
5358     something starting with __ and the normal name is an alias.  */
5359 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5360 choke me
5361 #else
5362 gethostbyname();
5363 #endif
5364
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5368   rm -rf conftest*
5369   eval "ac_cv_func_gethostbyname=yes"
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373   rm -rf conftest*
5374   eval "ac_cv_func_gethostbyname=no"
5375 fi
5376 rm -f conftest*
5377 fi
5378
5379 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5380   echo "$ac_t""yes" 1>&6
5381   :
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385
5386     if test $ac_cv_func_gethostbyname = no; then
5387       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5388 echo "configure:5389: checking for gethostbyname in -lnsl" >&5
5389 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5390 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5391   echo $ac_n "(cached) $ac_c" 1>&6
5392 else
5393   ac_save_LIBS="$LIBS"
5394 LIBS="-lnsl  $LIBS"
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398 /* Override any gcc2 internal prototype to avoid an error.  */
5399 /* We use char because int might match the return type of a gcc2
5400     builtin and then its argument prototype would still apply.  */
5401 char gethostbyname();
5402
5403 int main() {
5404 gethostbyname()
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5408   rm -rf conftest*
5409   eval "ac_cv_lib_$ac_lib_var=yes"
5410 else
5411   echo "configure: failed program was:" >&5
5412   cat conftest.$ac_ext >&5
5413   rm -rf conftest*
5414   eval "ac_cv_lib_$ac_lib_var=no"
5415 fi
5416 rm -f conftest*
5417 LIBS="$ac_save_LIBS"
5418
5419 fi
5420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5421   echo "$ac_t""yes" 1>&6
5422   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5423 else
5424   echo "$ac_t""no" 1>&6
5425 fi
5426
5427     fi
5428
5429     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5430     # socket/setsockopt and other routines are undefined under SCO ODT
5431     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5432     # on later versions), says simon@lia.di.epfl.ch: it contains
5433     # gethostby* variants that don't use the nameserver (or something).
5434     # -lsocket must be given before -lnsl if both are needed.
5435     # We assume that if connect needs -lnsl, so does gethostbyname.
5436     echo $ac_n "checking for connect""... $ac_c" 1>&6
5437 echo "configure:5438: checking for connect" >&5
5438 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5439   echo $ac_n "(cached) $ac_c" 1>&6
5440 else
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 /* System header to define __stub macros and hopefully few prototypes,
5445     which can conflict with char connect(); below.  */
5446 #include <assert.h>
5447 /* Override any gcc2 internal prototype to avoid an error.  */
5448 /* We use char because int might match the return type of a gcc2
5449     builtin and then its argument prototype would still apply.  */
5450 char connect();
5451
5452 int main() {
5453
5454 /* The GNU C library defines this for functions which it implements
5455     to always fail with ENOSYS.  Some functions are actually named
5456     something starting with __ and the normal name is an alias.  */
5457 #if defined (__stub_connect) || defined (__stub___connect)
5458 choke me
5459 #else
5460 connect();
5461 #endif
5462
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5466   rm -rf conftest*
5467   eval "ac_cv_func_connect=yes"
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_func_connect=no"
5473 fi
5474 rm -f conftest*
5475 fi
5476
5477 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   :
5480 else
5481   echo "$ac_t""no" 1>&6
5482 fi
5483
5484     if test $ac_cv_func_connect = no; then
5485       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5486 echo "configure:5487: checking for connect in -lsocket" >&5
5487 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5489   echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491   ac_save_LIBS="$LIBS"
5492 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5493 cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 /* Override any gcc2 internal prototype to avoid an error.  */
5497 /* We use char because int might match the return type of a gcc2
5498     builtin and then its argument prototype would still apply.  */
5499 char connect();
5500
5501 int main() {
5502 connect()
5503 ; return 0; }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5506   rm -rf conftest*
5507   eval "ac_cv_lib_$ac_lib_var=yes"
5508 else
5509   echo "configure: failed program was:" >&5
5510   cat conftest.$ac_ext >&5
5511   rm -rf conftest*
5512   eval "ac_cv_lib_$ac_lib_var=no"
5513 fi
5514 rm -f conftest*
5515 LIBS="$ac_save_LIBS"
5516
5517 fi
5518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5519   echo "$ac_t""yes" 1>&6
5520   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5521 else
5522   echo "$ac_t""no" 1>&6
5523 fi
5524
5525     fi
5526
5527     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5528     echo $ac_n "checking for remove""... $ac_c" 1>&6
5529 echo "configure:5530: checking for remove" >&5
5530 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5531   echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533   cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 /* System header to define __stub macros and hopefully few prototypes,
5537     which can conflict with char remove(); below.  */
5538 #include <assert.h>
5539 /* Override any gcc2 internal prototype to avoid an error.  */
5540 /* We use char because int might match the return type of a gcc2
5541     builtin and then its argument prototype would still apply.  */
5542 char remove();
5543
5544 int main() {
5545
5546 /* The GNU C library defines this for functions which it implements
5547     to always fail with ENOSYS.  Some functions are actually named
5548     something starting with __ and the normal name is an alias.  */
5549 #if defined (__stub_remove) || defined (__stub___remove)
5550 choke me
5551 #else
5552 remove();
5553 #endif
5554
5555 ; return 0; }
5556 EOF
5557 if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5558   rm -rf conftest*
5559   eval "ac_cv_func_remove=yes"
5560 else
5561   echo "configure: failed program was:" >&5
5562   cat conftest.$ac_ext >&5
5563   rm -rf conftest*
5564   eval "ac_cv_func_remove=no"
5565 fi
5566 rm -f conftest*
5567 fi
5568
5569 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5570   echo "$ac_t""yes" 1>&6
5571   :
5572 else
5573   echo "$ac_t""no" 1>&6
5574 fi
5575
5576     if test $ac_cv_func_remove = no; then
5577       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5578 echo "configure:5579: checking for remove in -lposix" >&5
5579 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5581   echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583   ac_save_LIBS="$LIBS"
5584 LIBS="-lposix  $LIBS"
5585 cat > conftest.$ac_ext <<EOF
5586 #line 5587 "configure"
5587 #include "confdefs.h"
5588 /* Override any gcc2 internal prototype to avoid an error.  */
5589 /* We use char because int might match the return type of a gcc2
5590     builtin and then its argument prototype would still apply.  */
5591 char remove();
5592
5593 int main() {
5594 remove()
5595 ; return 0; }
5596 EOF
5597 if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598   rm -rf conftest*
5599   eval "ac_cv_lib_$ac_lib_var=yes"
5600 else
5601   echo "configure: failed program was:" >&5
5602   cat conftest.$ac_ext >&5
5603   rm -rf conftest*
5604   eval "ac_cv_lib_$ac_lib_var=no"
5605 fi
5606 rm -f conftest*
5607 LIBS="$ac_save_LIBS"
5608
5609 fi
5610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5611   echo "$ac_t""yes" 1>&6
5612   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5613 else
5614   echo "$ac_t""no" 1>&6
5615 fi
5616
5617     fi
5618
5619     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5620     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5621 echo "configure:5622: checking for shmat" >&5
5622 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5623   echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625   cat > conftest.$ac_ext <<EOF
5626 #line 5627 "configure"
5627 #include "confdefs.h"
5628 /* System header to define __stub macros and hopefully few prototypes,
5629     which can conflict with char shmat(); below.  */
5630 #include <assert.h>
5631 /* Override any gcc2 internal prototype to avoid an error.  */
5632 /* We use char because int might match the return type of a gcc2
5633     builtin and then its argument prototype would still apply.  */
5634 char shmat();
5635
5636 int main() {
5637
5638 /* The GNU C library defines this for functions which it implements
5639     to always fail with ENOSYS.  Some functions are actually named
5640     something starting with __ and the normal name is an alias.  */
5641 #if defined (__stub_shmat) || defined (__stub___shmat)
5642 choke me
5643 #else
5644 shmat();
5645 #endif
5646
5647 ; return 0; }
5648 EOF
5649 if { (eval echo configure:5650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5650   rm -rf conftest*
5651   eval "ac_cv_func_shmat=yes"
5652 else
5653   echo "configure: failed program was:" >&5
5654   cat conftest.$ac_ext >&5
5655   rm -rf conftest*
5656   eval "ac_cv_func_shmat=no"
5657 fi
5658 rm -f conftest*
5659 fi
5660
5661 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5662   echo "$ac_t""yes" 1>&6
5663   :
5664 else
5665   echo "$ac_t""no" 1>&6
5666 fi
5667
5668     if test $ac_cv_func_shmat = no; then
5669       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5670 echo "configure:5671: checking for shmat in -lipc" >&5
5671 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   ac_save_LIBS="$LIBS"
5676 LIBS="-lipc  $LIBS"
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680 /* Override any gcc2 internal prototype to avoid an error.  */
5681 /* We use char because int might match the return type of a gcc2
5682     builtin and then its argument prototype would still apply.  */
5683 char shmat();
5684
5685 int main() {
5686 shmat()
5687 ; return 0; }
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690   rm -rf conftest*
5691   eval "ac_cv_lib_$ac_lib_var=yes"
5692 else
5693   echo "configure: failed program was:" >&5
5694   cat conftest.$ac_ext >&5
5695   rm -rf conftest*
5696   eval "ac_cv_lib_$ac_lib_var=no"
5697 fi
5698 rm -f conftest*
5699 LIBS="$ac_save_LIBS"
5700
5701 fi
5702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5703   echo "$ac_t""yes" 1>&6
5704   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5705 else
5706   echo "$ac_t""no" 1>&6
5707 fi
5708
5709     fi
5710   fi
5711
5712   # Check for libraries that X11R6 Xt/Xaw programs need.
5713   ac_save_LDFLAGS="$LDFLAGS"
5714   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5715   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5716   # check for ICE first), but we must link in the order -lSM -lICE or
5717   # we get undefined symbols.  So assume we have SM if we have ICE.
5718   # These have to be linked with before -lX11, unlike the other
5719   # libraries we check for below, so use a different variable.
5720   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5721   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5722 echo "configure:5723: checking for IceConnectionNumber in -lICE" >&5
5723 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   ac_save_LIBS="$LIBS"
5728 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5729 cat > conftest.$ac_ext <<EOF
5730 #line 5731 "configure"
5731 #include "confdefs.h"
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 /* We use char because int might match the return type of a gcc2
5734     builtin and then its argument prototype would still apply.  */
5735 char IceConnectionNumber();
5736
5737 int main() {
5738 IceConnectionNumber()
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_lib_$ac_lib_var=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_lib_$ac_lib_var=no"
5749 fi
5750 rm -f conftest*
5751 LIBS="$ac_save_LIBS"
5752
5753 fi
5754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5755   echo "$ac_t""yes" 1>&6
5756   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760
5761   LDFLAGS="$ac_save_LDFLAGS"
5762
5763 fi
5764
5765
5766 for ac_hdr in \
5767         assert.h \
5768         fcntl.h \
5769         grp.h \
5770         pwd.h \
5771         libc.h \
5772         limits.h \
5773         stdarg.h \
5774         stdlib.h \
5775         stdint.h \
5776         string.h \
5777         termios.h \
5778         unistd.h \
5779         sys/bitypes.h \
5780         sys/byteorder.h \
5781         sys/ioctl.h \
5782         sys/select.h \
5783         sys/sockio.h \
5784         sys/time.h \
5785         sys/socket.h \
5786         arpa/nameser.h \
5787         resolv.h \
5788         mtio.h \
5789         sys/mtio.h \
5790         sys/tape.h \
5791         regex.h \
5792
5793 do
5794 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5795 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5796 echo "configure:5797: checking for $ac_hdr" >&5
5797 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5798   echo $ac_n "(cached) $ac_c" 1>&6
5799 else
5800   cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803 #include <$ac_hdr>
5804 EOF
5805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5806 { (eval echo configure:5807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5808 if test -z "$ac_err"; then
5809   rm -rf conftest*
5810   eval "ac_cv_header_$ac_safe=yes"
5811 else
5812   echo "$ac_err" >&5
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   eval "ac_cv_header_$ac_safe=no"
5817 fi
5818 rm -f conftest*
5819 fi
5820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5821   echo "$ac_t""yes" 1>&6
5822     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5823   cat >> confdefs.h <<EOF
5824 #define $ac_tr_hdr 1
5825 EOF
5826  
5827 else
5828   echo "$ac_t""no" 1>&6
5829 fi
5830 done
5831
5832 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5833 echo "configure:5834: checking for ANSI C header files" >&5
5834 if eval "test \"`echo '$''{'ac_cv_header_stdc'+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 <stdlib.h>
5841 #include <stdarg.h>
5842 #include <string.h>
5843 #include <float.h>
5844 EOF
5845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5846 { (eval echo configure:5847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5848 if test -z "$ac_err"; then
5849   rm -rf conftest*
5850   ac_cv_header_stdc=yes
5851 else
5852   echo "$ac_err" >&5
5853   echo "configure: failed program was:" >&5
5854   cat conftest.$ac_ext >&5
5855   rm -rf conftest*
5856   ac_cv_header_stdc=no
5857 fi
5858 rm -f conftest*
5859
5860 if test $ac_cv_header_stdc = yes; then
5861   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5862 cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 #include <string.h>
5866 EOF
5867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5868   egrep "memchr" >/dev/null 2>&1; then
5869   :
5870 else
5871   rm -rf conftest*
5872   ac_cv_header_stdc=no
5873 fi
5874 rm -f conftest*
5875
5876 fi
5877
5878 if test $ac_cv_header_stdc = yes; then
5879   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5880 cat > conftest.$ac_ext <<EOF
5881 #line 5882 "configure"
5882 #include "confdefs.h"
5883 #include <stdlib.h>
5884 EOF
5885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5886   egrep "free" >/dev/null 2>&1; then
5887   :
5888 else
5889   rm -rf conftest*
5890   ac_cv_header_stdc=no
5891 fi
5892 rm -f conftest*
5893
5894 fi
5895
5896 if test $ac_cv_header_stdc = yes; then
5897   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5898 if test "$cross_compiling" = yes; then
5899   :
5900 else
5901   cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 #include <ctype.h>
5905 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5906 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5908 int main () { int i; for (i = 0; i < 256; i++)
5909 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5910 exit (0); }
5911
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5914 then
5915   :
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -fr conftest*
5920   ac_cv_header_stdc=no
5921 fi
5922 rm -fr conftest*
5923 fi
5924
5925 fi
5926 fi
5927
5928 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5929 if test $ac_cv_header_stdc = yes; then
5930   cat >> confdefs.h <<\EOF
5931 #define STDC_HEADERS 1
5932 EOF
5933
5934 fi
5935
5936 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
5937 echo "configure:5938: checking whether sys/types.h defines makedev" >&5
5938 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 #include <sys/types.h>
5945 int main() {
5946 return makedev(0, 0);
5947 ; return 0; }
5948 EOF
5949 if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5950   rm -rf conftest*
5951   ac_cv_header_sys_types_h_makedev=yes
5952 else
5953   echo "configure: failed program was:" >&5
5954   cat conftest.$ac_ext >&5
5955   rm -rf conftest*
5956   ac_cv_header_sys_types_h_makedev=no
5957 fi
5958 rm -f conftest*
5959
5960 fi
5961
5962 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
5963
5964 if test $ac_cv_header_sys_types_h_makedev = no; then
5965 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
5966 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
5967 echo "configure:5968: checking for sys/mkdev.h" >&5
5968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5969   echo $ac_n "(cached) $ac_c" 1>&6
5970 else
5971   cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 #include <sys/mkdev.h>
5975 EOF
5976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5977 { (eval echo configure:5978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5979 if test -z "$ac_err"; then
5980   rm -rf conftest*
5981   eval "ac_cv_header_$ac_safe=yes"
5982 else
5983   echo "$ac_err" >&5
5984   echo "configure: failed program was:" >&5
5985   cat conftest.$ac_ext >&5
5986   rm -rf conftest*
5987   eval "ac_cv_header_$ac_safe=no"
5988 fi
5989 rm -f conftest*
5990 fi
5991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992   echo "$ac_t""yes" 1>&6
5993   cat >> confdefs.h <<\EOF
5994 #define MAJOR_IN_MKDEV 1
5995 EOF
5996
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000
6001
6002   if test $ac_cv_header_sys_mkdev_h = no; then
6003 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
6004 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
6005 echo "configure:6006: checking for sys/sysmacros.h" >&5
6006 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6007   echo $ac_n "(cached) $ac_c" 1>&6
6008 else
6009   cat > conftest.$ac_ext <<EOF
6010 #line 6011 "configure"
6011 #include "confdefs.h"
6012 #include <sys/sysmacros.h>
6013 EOF
6014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6015 { (eval echo configure:6016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6017 if test -z "$ac_err"; then
6018   rm -rf conftest*
6019   eval "ac_cv_header_$ac_safe=yes"
6020 else
6021   echo "$ac_err" >&5
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_header_$ac_safe=no"
6026 fi
6027 rm -f conftest*
6028 fi
6029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6030   echo "$ac_t""yes" 1>&6
6031   cat >> confdefs.h <<\EOF
6032 #define MAJOR_IN_SYSMACROS 1
6033 EOF
6034
6035 else
6036   echo "$ac_t""no" 1>&6
6037 fi
6038
6039   fi
6040 fi
6041
6042 ac_header_dirent=no
6043 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6044 do
6045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6046 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6047 echo "configure:6048: checking for $ac_hdr that defines DIR" >&5
6048 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+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 <sys/types.h>
6055 #include <$ac_hdr>
6056 int main() {
6057 DIR *dirp = 0;
6058 ; return 0; }
6059 EOF
6060 if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6061   rm -rf conftest*
6062   eval "ac_cv_header_dirent_$ac_safe=yes"
6063 else
6064   echo "configure: failed program was:" >&5
6065   cat conftest.$ac_ext >&5
6066   rm -rf conftest*
6067   eval "ac_cv_header_dirent_$ac_safe=no"
6068 fi
6069 rm -f conftest*
6070 fi
6071 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6072   echo "$ac_t""yes" 1>&6
6073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6074   cat >> confdefs.h <<EOF
6075 #define $ac_tr_hdr 1
6076 EOF
6077  ac_header_dirent=$ac_hdr; break
6078 else
6079   echo "$ac_t""no" 1>&6
6080 fi
6081 done
6082 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6083 if test $ac_header_dirent = dirent.h; then
6084 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6085 echo "configure:6086: checking for opendir in -ldir" >&5
6086 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6088   echo $ac_n "(cached) $ac_c" 1>&6
6089 else
6090   ac_save_LIBS="$LIBS"
6091 LIBS="-ldir  $LIBS"
6092 cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 /* Override any gcc2 internal prototype to avoid an error.  */
6096 /* We use char because int might match the return type of a gcc2
6097     builtin and then its argument prototype would still apply.  */
6098 char opendir();
6099
6100 int main() {
6101 opendir()
6102 ; return 0; }
6103 EOF
6104 if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6105   rm -rf conftest*
6106   eval "ac_cv_lib_$ac_lib_var=yes"
6107 else
6108   echo "configure: failed program was:" >&5
6109   cat conftest.$ac_ext >&5
6110   rm -rf conftest*
6111   eval "ac_cv_lib_$ac_lib_var=no"
6112 fi
6113 rm -f conftest*
6114 LIBS="$ac_save_LIBS"
6115
6116 fi
6117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6118   echo "$ac_t""yes" 1>&6
6119   LIBS="$LIBS -ldir"
6120 else
6121   echo "$ac_t""no" 1>&6
6122 fi
6123
6124 else
6125 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6126 echo "configure:6127: checking for opendir in -lx" >&5
6127 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6129   echo $ac_n "(cached) $ac_c" 1>&6
6130 else
6131   ac_save_LIBS="$LIBS"
6132 LIBS="-lx  $LIBS"
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 /* Override any gcc2 internal prototype to avoid an error.  */
6137 /* We use char because int might match the return type of a gcc2
6138     builtin and then its argument prototype would still apply.  */
6139 char opendir();
6140
6141 int main() {
6142 opendir()
6143 ; return 0; }
6144 EOF
6145 if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6146   rm -rf conftest*
6147   eval "ac_cv_lib_$ac_lib_var=yes"
6148 else
6149   echo "configure: failed program was:" >&5
6150   cat conftest.$ac_ext >&5
6151   rm -rf conftest*
6152   eval "ac_cv_lib_$ac_lib_var=no"
6153 fi
6154 rm -f conftest*
6155 LIBS="$ac_save_LIBS"
6156
6157 fi
6158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6159   echo "$ac_t""yes" 1>&6
6160   LIBS="$LIBS -lx"
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164
6165 fi
6166
6167 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
6168 echo "configure:6169: checking whether stat file-mode macros are broken" >&5
6169 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
6170   echo $ac_n "(cached) $ac_c" 1>&6
6171 else
6172   cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 #include <sys/types.h>
6176 #include <sys/stat.h>
6177
6178 #if defined(S_ISBLK) && defined(S_IFDIR)
6179 # if S_ISBLK (S_IFDIR)
6180 You lose.
6181 # endif
6182 #endif
6183
6184 #if defined(S_ISBLK) && defined(S_IFCHR)
6185 # if S_ISBLK (S_IFCHR)
6186 You lose.
6187 # endif
6188 #endif
6189
6190 #if defined(S_ISLNK) && defined(S_IFREG)
6191 # if S_ISLNK (S_IFREG)
6192 You lose.
6193 # endif
6194 #endif
6195
6196 #if defined(S_ISSOCK) && defined(S_IFREG)
6197 # if S_ISSOCK (S_IFREG)
6198 You lose.
6199 # endif
6200 #endif
6201
6202 EOF
6203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6204   egrep "You lose" >/dev/null 2>&1; then
6205   rm -rf conftest*
6206   ac_cv_header_stat_broken=yes
6207 else
6208   rm -rf conftest*
6209   ac_cv_header_stat_broken=no
6210 fi
6211 rm -f conftest*
6212
6213 fi
6214
6215 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
6216 if test $ac_cv_header_stat_broken = yes; then
6217   cat >> confdefs.h <<\EOF
6218 #define STAT_MACROS_BROKEN 1
6219 EOF
6220
6221 fi
6222
6223 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
6224 echo "configure:6225: checking for sys/wait.h that is POSIX.1 compatible" >&5
6225 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6226   echo $ac_n "(cached) $ac_c" 1>&6
6227 else
6228   cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231 #include <sys/types.h>
6232 #include <sys/wait.h>
6233 #ifndef WEXITSTATUS
6234 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6235 #endif
6236 #ifndef WIFEXITED
6237 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6238 #endif
6239 int main() {
6240 int s;
6241 wait (&s);
6242 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6243 ; return 0; }
6244 EOF
6245 if { (eval echo configure:6246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6246   rm -rf conftest*
6247   ac_cv_header_sys_wait_h=yes
6248 else
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   ac_cv_header_sys_wait_h=no
6253 fi
6254 rm -f conftest*
6255 fi
6256
6257 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6258 if test $ac_cv_header_sys_wait_h = yes; then
6259   cat >> confdefs.h <<\EOF
6260 #define HAVE_SYS_WAIT_H 1
6261 EOF
6262
6263 fi
6264
6265 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6266 echo "configure:6267: checking whether time.h and sys/time.h may both be included" >&5
6267 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6268   echo $ac_n "(cached) $ac_c" 1>&6
6269 else
6270   cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273 #include <sys/types.h>
6274 #include <sys/time.h>
6275 #include <time.h>
6276 int main() {
6277 struct tm *tp;
6278 ; return 0; }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6281   rm -rf conftest*
6282   ac_cv_header_time=yes
6283 else
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   ac_cv_header_time=no
6288 fi
6289 rm -f conftest*
6290 fi
6291
6292 echo "$ac_t""$ac_cv_header_time" 1>&6
6293 if test $ac_cv_header_time = yes; then
6294   cat >> confdefs.h <<\EOF
6295 #define TIME_WITH_SYS_TIME 1
6296 EOF
6297
6298 fi
6299
6300 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
6301 echo "configure:6302: checking for st_blksize in struct stat" >&5
6302 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
6303   echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305   cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 #include <sys/types.h>
6309 #include <sys/stat.h>
6310 int main() {
6311 struct stat s; s.st_blksize;
6312 ; return 0; }
6313 EOF
6314 if { (eval echo configure:6315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6315   rm -rf conftest*
6316   ac_cv_struct_st_blksize=yes
6317 else
6318   echo "configure: failed program was:" >&5
6319   cat conftest.$ac_ext >&5
6320   rm -rf conftest*
6321   ac_cv_struct_st_blksize=no
6322 fi
6323 rm -f conftest*
6324 fi
6325
6326 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6327 if test $ac_cv_struct_st_blksize = yes; then
6328   cat >> confdefs.h <<\EOF
6329 #define HAVE_ST_BLKSIZE 1
6330 EOF
6331
6332 fi
6333
6334 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6335 echo "configure:6336: checking for st_blocks in struct stat" >&5
6336 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6337   echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339   cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 #include <sys/types.h>
6343 #include <sys/stat.h>
6344 int main() {
6345 struct stat s; s.st_blocks;
6346 ; return 0; }
6347 EOF
6348 if { (eval echo configure:6349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6349   rm -rf conftest*
6350   ac_cv_struct_st_blocks=yes
6351 else
6352   echo "configure: failed program was:" >&5
6353   cat conftest.$ac_ext >&5
6354   rm -rf conftest*
6355   ac_cv_struct_st_blocks=no
6356 fi
6357 rm -f conftest*
6358 fi
6359
6360 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6361 if test $ac_cv_struct_st_blocks = yes; then
6362   cat >> confdefs.h <<\EOF
6363 #define HAVE_ST_BLOCKS 1
6364 EOF
6365
6366 else
6367   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6368 fi
6369
6370 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6371 echo "configure:6372: checking whether struct tm is in sys/time.h or time.h" >&5
6372 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6373   echo $ac_n "(cached) $ac_c" 1>&6
6374 else
6375   cat > conftest.$ac_ext <<EOF
6376 #line 6377 "configure"
6377 #include "confdefs.h"
6378 #include <sys/types.h>
6379 #include <time.h>
6380 int main() {
6381 struct tm *tp; tp->tm_sec;
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6385   rm -rf conftest*
6386   ac_cv_struct_tm=time.h
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   ac_cv_struct_tm=sys/time.h
6392 fi
6393 rm -f conftest*
6394 fi
6395
6396 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6397 if test $ac_cv_struct_tm = sys/time.h; then
6398   cat >> confdefs.h <<\EOF
6399 #define TM_IN_SYS_TIME 1
6400 EOF
6401
6402 fi
6403
6404 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
6405 echo "configure:6406: checking for tm_zone in struct tm" >&5
6406 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
6407   echo $ac_n "(cached) $ac_c" 1>&6
6408 else
6409   cat > conftest.$ac_ext <<EOF
6410 #line 6411 "configure"
6411 #include "confdefs.h"
6412 #include <sys/types.h>
6413 #include <$ac_cv_struct_tm>
6414 int main() {
6415 struct tm tm; tm.tm_zone;
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6419   rm -rf conftest*
6420   ac_cv_struct_tm_zone=yes
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   ac_cv_struct_tm_zone=no
6426 fi
6427 rm -f conftest*
6428 fi
6429
6430 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
6431 if test "$ac_cv_struct_tm_zone" = yes; then
6432   cat >> confdefs.h <<\EOF
6433 #define HAVE_TM_ZONE 1
6434 EOF
6435
6436 else
6437   echo $ac_n "checking for tzname""... $ac_c" 1>&6
6438 echo "configure:6439: checking for tzname" >&5
6439 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
6440   echo $ac_n "(cached) $ac_c" 1>&6
6441 else
6442   cat > conftest.$ac_ext <<EOF
6443 #line 6444 "configure"
6444 #include "confdefs.h"
6445 #include <time.h>
6446 #ifndef tzname /* For SGI.  */
6447 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
6448 #endif
6449 int main() {
6450 atoi(*tzname);
6451 ; return 0; }
6452 EOF
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6454   rm -rf conftest*
6455   ac_cv_var_tzname=yes
6456 else
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   ac_cv_var_tzname=no
6461 fi
6462 rm -f conftest*
6463 fi
6464
6465 echo "$ac_t""$ac_cv_var_tzname" 1>&6
6466   if test $ac_cv_var_tzname = yes; then
6467     cat >> confdefs.h <<\EOF
6468 #define HAVE_TZNAME 1
6469 EOF
6470
6471   fi
6472 fi
6473
6474
6475 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
6476 echo "configure:6477: checking for utime.h" >&5
6477 if eval "test \"`echo '$''{'ba_cv_header_utime_h'+set}'`\" = set"; then
6478   echo $ac_n "(cached) $ac_c" 1>&6
6479 else
6480   cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483
6484 #include <sys/types.h>
6485 #include <utime.h>
6486 int main() {
6487 struct utimbuf foo
6488 ; return 0; }
6489 EOF
6490 if { (eval echo configure:6491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6491   rm -rf conftest*
6492   ba_cv_header_utime_h=yes
6493 else
6494   echo "configure: failed program was:" >&5
6495   cat conftest.$ac_ext >&5
6496   rm -rf conftest*
6497   ba_cv_header_utime_h=no
6498 fi
6499 rm -f conftest*
6500 fi
6501
6502 echo "$ac_t""$ba_cv_header_utime_h" 1>&6
6503 test $ba_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
6504 #define HAVE_UTIME_H 1
6505 EOF
6506
6507
6508 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
6509 echo "configure:6510: checking for socklen_t" >&5
6510 if eval "test \"`echo '$''{'ba_cv_header_socklen_t'+set}'`\" = set"; then
6511   echo $ac_n "(cached) $ac_c" 1>&6
6512 else
6513   cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516
6517 #include <sys/types.h>
6518 #include <sys/socket.h>
6519 int main() {
6520 socklen_t x
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6524   rm -rf conftest*
6525   ba_cv_header_socklen_t=yes
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   ba_cv_header_socklen_t=no
6531 fi
6532 rm -f conftest*
6533 fi
6534
6535 echo "$ac_t""$ba_cv_header_socklen_t" 1>&6
6536 test $ba_cv_header_socklen_t = yes && cat >> confdefs.h <<\EOF
6537 #define HAVE_SOCKLEN_T 1
6538 EOF
6539
6540
6541 echo $ac_n "checking for bigendian""... $ac_c" 1>&6
6542 echo "configure:6543: checking for bigendian" >&5
6543 if eval "test \"`echo '$''{'ba_cv_bigendian'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   if test "$cross_compiling" = yes; then
6547   ba_cv_bigendian=no
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 main(){long a=1L; char *p=(char *)&a; exit(*p);}
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6555 then
6556   ba_cv_bigendian=yes
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560   rm -fr conftest*
6561   ba_cv_bigendian=no
6562 fi
6563 rm -fr conftest*
6564 fi
6565
6566 fi
6567
6568 echo "$ac_t""$ba_cv_bigendian" 1>&6
6569 test $ba_cv_bigendian = yes && cat >> confdefs.h <<\EOF
6570 #define HAVE_BIGENDIAN 1
6571 EOF
6572
6573
6574
6575 echo $ac_n "checking for working const""... $ac_c" 1>&6
6576 echo "configure:6577: checking for working const" >&5
6577 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583
6584 int main() {
6585
6586 /* Ultrix mips cc rejects this.  */
6587 typedef int charset[2]; const charset x;
6588 /* SunOS 4.1.1 cc rejects this.  */
6589 char const *const *ccp;
6590 char **p;
6591 /* NEC SVR4.0.2 mips cc rejects this.  */
6592 struct point {int x, y;};
6593 static struct point const zero = {0,0};
6594 /* AIX XL C 1.02.0.0 rejects this.
6595    It does not let you subtract one const X* pointer from another in an arm
6596    of an if-expression whose if-part is not a constant expression */
6597 const char *g = "string";
6598 ccp = &g + (g ? g-g : 0);
6599 /* HPUX 7.0 cc rejects these. */
6600 ++ccp;
6601 p = (char**) ccp;
6602 ccp = (char const *const *) p;
6603 { /* SCO 3.2v4 cc rejects this.  */
6604   char *t;
6605   char const *s = 0 ? (char *) 0 : (char const *) 0;
6606
6607   *t++ = 0;
6608 }
6609 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6610   int x[] = {25, 17};
6611   const int *foo = &x[0];
6612   ++foo;
6613 }
6614 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6615   typedef const int *iptr;
6616   iptr p = 0;
6617   ++p;
6618 }
6619 { /* AIX XL C 1.02.0.0 rejects this saying
6620      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6621   struct s { int j; const int *ap[3]; };
6622   struct s *b; b->j = 5;
6623 }
6624 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6625   const int foo = 10;
6626 }
6627
6628 ; return 0; }
6629 EOF
6630 if { (eval echo configure:6631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6631   rm -rf conftest*
6632   ac_cv_c_const=yes
6633 else
6634   echo "configure: failed program was:" >&5
6635   cat conftest.$ac_ext >&5
6636   rm -rf conftest*
6637   ac_cv_c_const=no
6638 fi
6639 rm -f conftest*
6640 fi
6641
6642 echo "$ac_t""$ac_cv_c_const" 1>&6
6643 if test $ac_cv_c_const = no; then
6644   cat >> confdefs.h <<\EOF
6645 #define const 
6646 EOF
6647
6648 fi
6649
6650
6651
6652 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
6653 echo "configure:6654: checking how to get filesystem type" >&5
6654 fstype=no
6655 # The order of these tests is important.
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 #include <sys/statvfs.h>
6660 #include <sys/fstyp.h>
6661 EOF
6662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6663 { (eval echo configure:6664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6665 if test -z "$ac_err"; then
6666   rm -rf conftest*
6667   cat >> confdefs.h <<\EOF
6668 #define FSTYPE_STATVFS 1
6669 EOF
6670  fstype=SVR4
6671 else
6672   echo "$ac_err" >&5
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675 fi
6676 rm -f conftest*
6677 if test $fstype = no; then
6678 cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 #include <sys/statfs.h>
6682 #include <sys/fstyp.h>
6683 EOF
6684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6685 { (eval echo configure:6686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6687 if test -z "$ac_err"; then
6688   rm -rf conftest*
6689   cat >> confdefs.h <<\EOF
6690 #define FSTYPE_USG_STATFS 1
6691 EOF
6692  fstype=SVR3
6693 else
6694   echo "$ac_err" >&5
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697 fi
6698 rm -f conftest*
6699 fi
6700 if test $fstype = no; then
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6703 "configure"
6703 #include "confdefs.h"
6704 #include <sys/statfs.h>
6705 #include <sys/vmount.h>
6706 EOF
6707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6708 { (eval echo configure:6709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6710 if test -z "$ac_err"; then
6711   rm -rf conftest*
6712   cat >> confdefs.h <<\EOF
6713 #define FSTYPE_AIX_STATFS 1
6714 EOF
6715  fstype=AIX
6716 else
6717   echo "$ac_err" >&5
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720 fi
6721 rm -f conftest*
6722 fi
6723 if test $fstype = no; then  
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 #include <mntent.h>
6728 EOF
6729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6730 { (eval echo configure:6731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6732 if test -z "$ac_err"; then
6733   rm -rf conftest*
6734   cat >> confdefs.h <<\EOF
6735 #define FSTYPE_MNTENT 1
6736 EOF
6737  fstype=4.3BSD
6738 else
6739   echo "$ac_err" >&5
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742 fi
6743 rm -f conftest*
6744 fi
6745 if test $fstype = no; then  
6746 cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 #include <sys/mount.h>
6750 EOF
6751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6752   egrep "f_type;" >/dev/null 2>&1; then
6753   rm -rf conftest*
6754   cat >> confdefs.h <<\EOF
6755 #define FSTYPE_STATFS 1
6756 EOF
6757  fstype=4.4BSD/OSF1
6758 fi
6759 rm -f conftest*
6760
6761 fi
6762 if test $fstype = no; then  
6763 cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 #include <sys/mount.h>
6767 #include <sys/fs_types.h>
6768 EOF
6769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6770 { (eval echo configure:6771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6772 if test -z "$ac_err"; then
6773   rm -rf conftest*
6774   cat >> confdefs.h <<\EOF
6775 #define FSTYPE_GETMNT 1
6776 EOF
6777  fstype=Ultrix
6778 else
6779   echo "$ac_err" >&5
6780   echo "configure: failed program was:" >&5
6781   cat conftest.$ac_ext >&5
6782 fi
6783 rm -f conftest*
6784 fi
6785 echo "$ac_t""$fstype" 1>&6
6786
6787 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6788 echo "configure:6789: checking return type of signal handlers" >&5
6789 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6790   echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792   cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 #include <sys/types.h>
6796 #include <signal.h>
6797 #ifdef signal
6798 #undef signal
6799 #endif
6800 #ifdef __cplusplus
6801 extern "C" void (*signal (int, void (*)(int)))(int);
6802 #else
6803 void (*signal ()) ();
6804 #endif
6805
6806 int main() {
6807 int i;
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6811   rm -rf conftest*
6812   ac_cv_type_signal=void
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   ac_cv_type_signal=int
6818 fi
6819 rm -f conftest*
6820 fi
6821
6822 echo "$ac_t""$ac_cv_type_signal" 1>&6
6823 cat >> confdefs.h <<EOF
6824 #define RETSIGTYPE $ac_cv_type_signal
6825 EOF
6826
6827
6828
6829 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
6830 echo "configure:6831: checking for type of signal functions" >&5
6831 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   
6835   cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 #include <signal.h>
6839 int main() {
6840
6841     sigset_t ss;
6842     struct sigaction sa;
6843     sigemptyset(&ss); sigsuspend(&ss);
6844     sigaction(SIGINT, &sa, (struct sigaction *) 0);
6845     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
6846   
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   bash_cv_signal_vintage=posix
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   
6857     cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 #include <signal.h>
6861 int main() {
6862
6863         int mask = sigmask(SIGINT);
6864         sigsetmask(mask); sigblock(mask); sigpause(mask);
6865     
6866 ; return 0; }
6867 EOF
6868 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6869   rm -rf conftest*
6870   bash_cv_signal_vintage=4.2bsd
6871 else
6872   echo "configure: failed program was:" >&5
6873   cat conftest.$ac_ext >&5
6874   rm -rf conftest*
6875   
6876       cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879
6880         #include <signal.h>
6881         RETSIGTYPE foo() { }
6882 int main() {
6883
6884                 int mask = sigmask(SIGINT);
6885                 sigset(SIGINT, foo); sigrelse(SIGINT);
6886                 sighold(SIGINT); sigpause(SIGINT);
6887         
6888 ; return 0; }
6889 EOF
6890 if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6891   rm -rf conftest*
6892   bash_cv_signal_vintage=svr3
6893 else
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   bash_cv_signal_vintage=v7
6898     
6899 fi
6900 rm -f conftest*
6901   
6902 fi
6903 rm -f conftest*
6904
6905 fi
6906 rm -f conftest*
6907
6908 fi
6909
6910 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
6911 if test "$bash_cv_signal_vintage" = posix; then
6912 cat >> confdefs.h <<\EOF
6913 #define HAVE_POSIX_SIGNALS 1
6914 EOF
6915
6916 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
6917 cat >> confdefs.h <<\EOF
6918 #define HAVE_BSD_SIGNALS 1
6919 EOF
6920
6921 elif test "$bash_cv_signal_vintage" = svr3; then
6922 cat >> confdefs.h <<\EOF
6923 #define HAVE_USG_SIGHOLD 1
6924 EOF
6925
6926 fi
6927
6928 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6929 echo "configure:6930: checking for mode_t" >&5
6930 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6931   echo $ac_n "(cached) $ac_c" 1>&6
6932 else
6933   cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936 #include <sys/types.h>
6937 #if STDC_HEADERS
6938 #include <stdlib.h>
6939 #include <stddef.h>
6940 #endif
6941 EOF
6942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6943   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6944   rm -rf conftest*
6945   ac_cv_type_mode_t=yes
6946 else
6947   rm -rf conftest*
6948   ac_cv_type_mode_t=no
6949 fi
6950 rm -f conftest*
6951
6952 fi
6953 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6954 if test $ac_cv_type_mode_t = no; then
6955   cat >> confdefs.h <<\EOF
6956 #define mode_t int
6957 EOF
6958
6959 fi
6960
6961 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6962 echo "configure:6963: checking for uid_t in sys/types.h" >&5
6963 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6964   echo $ac_n "(cached) $ac_c" 1>&6
6965 else
6966   cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 #include <sys/types.h>
6970 EOF
6971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6972   egrep "uid_t" >/dev/null 2>&1; then
6973   rm -rf conftest*
6974   ac_cv_type_uid_t=yes
6975 else
6976   rm -rf conftest*
6977   ac_cv_type_uid_t=no
6978 fi
6979 rm -f conftest*
6980
6981 fi
6982
6983 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6984 if test $ac_cv_type_uid_t = no; then
6985   cat >> confdefs.h <<\EOF
6986 #define uid_t int
6987 EOF
6988
6989   cat >> confdefs.h <<\EOF
6990 #define gid_t int
6991 EOF
6992
6993 fi
6994
6995 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6996 echo "configure:6997: checking for size_t" >&5
6997 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003 #include <sys/types.h>
7004 #if STDC_HEADERS
7005 #include <stdlib.h>
7006 #include <stddef.h>
7007 #endif
7008 EOF
7009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7010   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7011   rm -rf conftest*
7012   ac_cv_type_size_t=yes
7013 else
7014   rm -rf conftest*
7015   ac_cv_type_size_t=no
7016 fi
7017 rm -f conftest*
7018
7019 fi
7020 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7021 if test $ac_cv_type_size_t = no; then
7022   cat >> confdefs.h <<\EOF
7023 #define size_t unsigned
7024 EOF
7025
7026 fi
7027
7028 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7029 echo "configure:7030: checking for pid_t" >&5
7030 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 #include <sys/types.h>
7037 #if STDC_HEADERS
7038 #include <stdlib.h>
7039 #include <stddef.h>
7040 #endif
7041 EOF
7042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7043   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7044   rm -rf conftest*
7045   ac_cv_type_pid_t=yes
7046 else
7047   rm -rf conftest*
7048   ac_cv_type_pid_t=no
7049 fi
7050 rm -f conftest*
7051
7052 fi
7053 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7054 if test $ac_cv_type_pid_t = no; then
7055   cat >> confdefs.h <<\EOF
7056 #define pid_t int
7057 EOF
7058
7059 fi
7060
7061 echo $ac_n "checking for off_t""... $ac_c" 1>&6
7062 echo "configure:7063: checking for off_t" >&5
7063 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 #include <sys/types.h>
7070 #if STDC_HEADERS
7071 #include <stdlib.h>
7072 #include <stddef.h>
7073 #endif
7074 EOF
7075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7076   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7077   rm -rf conftest*
7078   ac_cv_type_off_t=yes
7079 else
7080   rm -rf conftest*
7081   ac_cv_type_off_t=no
7082 fi
7083 rm -f conftest*
7084
7085 fi
7086 echo "$ac_t""$ac_cv_type_off_t" 1>&6
7087 if test $ac_cv_type_off_t = no; then
7088   cat >> confdefs.h <<\EOF
7089 #define off_t long
7090 EOF
7091
7092 fi
7093
7094 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
7095 echo "configure:7096: checking for ino_t" >&5
7096 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   cat > conftest.$ac_ext <<EOF
7100 #line 7101 "configure"
7101 #include "confdefs.h"
7102 #include <sys/types.h>
7103 #if STDC_HEADERS
7104 #include <stdlib.h>
7105 #include <stddef.h>
7106 #endif
7107 EOF
7108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7109   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7110   rm -rf conftest*
7111   ac_cv_type_ino_t=yes
7112 else
7113   rm -rf conftest*
7114   ac_cv_type_ino_t=no
7115 fi
7116 rm -f conftest*
7117
7118 fi
7119 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
7120 if test $ac_cv_type_ino_t = no; then
7121   cat >> confdefs.h <<\EOF
7122 #define ino_t unsigned long
7123 EOF
7124
7125 fi
7126
7127 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
7128 echo "configure:7129: checking for dev_t" >&5
7129 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 #include <sys/types.h>
7136 #if STDC_HEADERS
7137 #include <stdlib.h>
7138 #include <stddef.h>
7139 #endif
7140 EOF
7141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7142   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7143   rm -rf conftest*
7144   ac_cv_type_dev_t=yes
7145 else
7146   rm -rf conftest*
7147   ac_cv_type_dev_t=no
7148 fi
7149 rm -f conftest*
7150
7151 fi
7152 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
7153 if test $ac_cv_type_dev_t = no; then
7154   cat >> confdefs.h <<\EOF
7155 #define dev_t unsigned long
7156 EOF
7157
7158 fi
7159
7160 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
7161 echo "configure:7162: checking for daddr_t" >&5
7162 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
7163   echo $ac_n "(cached) $ac_c" 1>&6
7164 else
7165   cat > conftest.$ac_ext <<EOF
7166 #line 7167 "configure"
7167 #include "confdefs.h"
7168 #include <sys/types.h>
7169 #if STDC_HEADERS
7170 #include <stdlib.h>
7171 #include <stddef.h>
7172 #endif
7173 EOF
7174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7175   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7176   rm -rf conftest*
7177   ac_cv_type_daddr_t=yes
7178 else
7179   rm -rf conftest*
7180   ac_cv_type_daddr_t=no
7181 fi
7182 rm -f conftest*
7183
7184 fi
7185 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
7186 if test $ac_cv_type_daddr_t = no; then
7187   cat >> confdefs.h <<\EOF
7188 #define daddr_t long
7189 EOF
7190
7191 fi
7192
7193 echo $ac_n "checking for major_t""... $ac_c" 1>&6
7194 echo "configure:7195: checking for major_t" >&5
7195 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
7196   echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198   cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7201 #include <sys/types.h>
7202 #if STDC_HEADERS
7203 #include <stdlib.h>
7204 #include <stddef.h>
7205 #endif
7206 EOF
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7209   rm -rf conftest*
7210   ac_cv_type_major_t=yes
7211 else
7212   rm -rf conftest*
7213   ac_cv_type_major_t=no
7214 fi
7215 rm -f conftest*
7216
7217 fi
7218 echo "$ac_t""$ac_cv_type_major_t" 1>&6
7219 if test $ac_cv_type_major_t = no; then
7220   cat >> confdefs.h <<\EOF
7221 #define major_t int
7222 EOF
7223
7224 fi
7225
7226 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
7227 echo "configure:7228: checking for minor_t" >&5
7228 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
7229   echo $ac_n "(cached) $ac_c" 1>&6
7230 else
7231   cat > conftest.$ac_ext <<EOF
7232 #line 7233 "configure"
7233 #include "confdefs.h"
7234 #include <sys/types.h>
7235 #if STDC_HEADERS
7236 #include <stdlib.h>
7237 #include <stddef.h>
7238 #endif
7239 EOF
7240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7241   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7242   rm -rf conftest*
7243   ac_cv_type_minor_t=yes
7244 else
7245   rm -rf conftest*
7246   ac_cv_type_minor_t=no
7247 fi
7248 rm -f conftest*
7249
7250 fi
7251 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
7252 if test $ac_cv_type_minor_t = no; then
7253   cat >> confdefs.h <<\EOF
7254 #define minor_t int
7255 EOF
7256
7257 fi
7258
7259 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
7260 echo "configure:7261: checking for ssize_t" >&5
7261 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
7262   echo $ac_n "(cached) $ac_c" 1>&6
7263 else
7264   cat > conftest.$ac_ext <<EOF
7265 #line 7266 "configure"
7266 #include "confdefs.h"
7267 #include <sys/types.h>
7268 #if STDC_HEADERS
7269 #include <stdlib.h>
7270 #include <stddef.h>
7271 #endif
7272 EOF
7273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7274   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7275   rm -rf conftest*
7276   ac_cv_type_ssize_t=yes
7277 else
7278   rm -rf conftest*
7279   ac_cv_type_ssize_t=no
7280 fi
7281 rm -f conftest*
7282
7283 fi
7284 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
7285 if test $ac_cv_type_ssize_t = no; then
7286   cat >> confdefs.h <<\EOF
7287 #define ssize_t int
7288 EOF
7289
7290 fi
7291
7292 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
7293 echo "configure:7294: checking for st_blocks in struct stat" >&5
7294 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
7295   echo $ac_n "(cached) $ac_c" 1>&6
7296 else
7297   cat > conftest.$ac_ext <<EOF
7298 #line 7299 "configure"
7299 #include "confdefs.h"
7300 #include <sys/types.h>
7301 #include <sys/stat.h>
7302 int main() {
7303 struct stat s; s.st_blocks;
7304 ; return 0; }
7305 EOF
7306 if { (eval echo configure:7307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7307   rm -rf conftest*
7308   ac_cv_struct_st_blocks=yes
7309 else
7310   echo "configure: failed program was:" >&5
7311   cat conftest.$ac_ext >&5
7312   rm -rf conftest*
7313   ac_cv_struct_st_blocks=no
7314 fi
7315 rm -f conftest*
7316 fi
7317
7318 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
7319 if test $ac_cv_struct_st_blocks = yes; then
7320   cat >> confdefs.h <<\EOF
7321 #define HAVE_ST_BLOCKS 1
7322 EOF
7323
7324 else
7325   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
7326 fi
7327
7328 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
7329 echo "configure:7330: checking for st_rdev in struct stat" >&5
7330 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
7331   echo $ac_n "(cached) $ac_c" 1>&6
7332 else
7333   cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 #include <sys/types.h>
7337 #include <sys/stat.h>
7338 int main() {
7339 struct stat s; s.st_rdev;
7340 ; return 0; }
7341 EOF
7342 if { (eval echo configure:7343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7343   rm -rf conftest*
7344   ac_cv_struct_st_rdev=yes
7345 else
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -rf conftest*
7349   ac_cv_struct_st_rdev=no
7350 fi
7351 rm -f conftest*
7352 fi
7353
7354 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
7355 if test $ac_cv_struct_st_rdev = yes; then
7356   cat >> confdefs.h <<\EOF
7357 #define HAVE_ST_RDEV 1
7358 EOF
7359
7360 fi
7361
7362 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
7363 echo "configure:7364: checking whether struct tm is in sys/time.h or time.h" >&5
7364 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
7365   echo $ac_n "(cached) $ac_c" 1>&6
7366 else
7367   cat > conftest.$ac_ext <<EOF
7368 #line 7369 "configure"
7369 #include "confdefs.h"
7370 #include <sys/types.h>
7371 #include <time.h>
7372 int main() {
7373 struct tm *tp; tp->tm_sec;
7374 ; return 0; }
7375 EOF
7376 if { (eval echo configure:7377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7377   rm -rf conftest*
7378   ac_cv_struct_tm=time.h
7379 else
7380   echo "configure: failed program was:" >&5
7381   cat conftest.$ac_ext >&5
7382   rm -rf conftest*
7383   ac_cv_struct_tm=sys/time.h
7384 fi
7385 rm -f conftest*
7386 fi
7387
7388 echo "$ac_t""$ac_cv_struct_tm" 1>&6
7389 if test $ac_cv_struct_tm = sys/time.h; then
7390   cat >> confdefs.h <<\EOF
7391 #define TM_IN_SYS_TIME 1
7392 EOF
7393
7394 fi
7395
7396 echo $ac_n "checking for working const""... $ac_c" 1>&6
7397 echo "configure:7398: checking for working const" >&5
7398 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7399   echo $ac_n "(cached) $ac_c" 1>&6
7400 else
7401   cat > conftest.$ac_ext <<EOF
7402 #line 7403 "configure"
7403 #include "confdefs.h"
7404
7405 int main() {
7406
7407 /* Ultrix mips cc rejects this.  */
7408 typedef int charset[2]; const charset x;
7409 /* SunOS 4.1.1 cc rejects this.  */
7410 char const *const *ccp;
7411 char **p;
7412 /* NEC SVR4.0.2 mips cc rejects this.  */
7413 struct point {int x, y;};
7414 static struct point const zero = {0,0};
7415 /* AIX XL C 1.02.0.0 rejects this.
7416    It does not let you subtract one const X* pointer from another in an arm
7417    of an if-expression whose if-part is not a constant expression */
7418 const char *g = "string";
7419 ccp = &g + (g ? g-g : 0);
7420 /* HPUX 7.0 cc rejects these. */
7421 ++ccp;
7422 p = (char**) ccp;
7423 ccp = (char const *const *) p;
7424 { /* SCO 3.2v4 cc rejects this.  */
7425   char *t;
7426   char const *s = 0 ? (char *) 0 : (char const *) 0;
7427
7428   *t++ = 0;
7429 }
7430 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7431   int x[] = {25, 17};
7432   const int *foo = &x[0];
7433   ++foo;
7434 }
7435 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7436   typedef const int *iptr;
7437   iptr p = 0;
7438   ++p;
7439 }
7440 { /* AIX XL C 1.02.0.0 rejects this saying
7441      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7442   struct s { int j; const int *ap[3]; };
7443   struct s *b; b->j = 5;
7444 }
7445 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7446   const int foo = 10;
7447 }
7448
7449 ; return 0; }
7450 EOF
7451 if { (eval echo configure:7452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7452   rm -rf conftest*
7453   ac_cv_c_const=yes
7454 else
7455   echo "configure: failed program was:" >&5
7456   cat conftest.$ac_ext >&5
7457   rm -rf conftest*
7458   ac_cv_c_const=no
7459 fi
7460 rm -f conftest*
7461 fi
7462
7463 echo "$ac_t""$ac_cv_c_const" 1>&6
7464 if test $ac_cv_c_const = no; then
7465   cat >> confdefs.h <<\EOF
7466 #define const 
7467 EOF
7468
7469 fi
7470
7471
7472
7473 echo $ac_n "checking size of char""... $ac_c" 1>&6
7474 echo "configure:7475: checking size of char" >&5
7475 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
7476   echo $ac_n "(cached) $ac_c" 1>&6
7477 else
7478   if test "$cross_compiling" = yes; then
7479   ac_cv_sizeof_char=1
7480 else
7481   cat > conftest.$ac_ext <<EOF
7482 #line 7483 "configure"
7483 #include "confdefs.h"
7484 #include <stdio.h>
7485 main()
7486 {
7487   FILE *f=fopen("conftestval", "w");
7488   if (!f) exit(1);
7489   fprintf(f, "%d\n", sizeof(char));
7490   exit(0);
7491 }
7492 EOF
7493 if { (eval echo configure:7494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7494 then
7495   ac_cv_sizeof_char=`cat conftestval`
7496 else
7497   echo "configure: failed program was:" >&5
7498   cat conftest.$ac_ext >&5
7499   rm -fr conftest*
7500   ac_cv_sizeof_char=0
7501 fi
7502 rm -fr conftest*
7503 fi
7504
7505 fi
7506 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
7507 cat >> confdefs.h <<EOF
7508 #define SIZEOF_CHAR $ac_cv_sizeof_char
7509 EOF
7510
7511
7512 echo $ac_n "checking size of short int""... $ac_c" 1>&6
7513 echo "configure:7514: checking size of short int" >&5
7514 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
7515   echo $ac_n "(cached) $ac_c" 1>&6
7516 else
7517   if test "$cross_compiling" = yes; then
7518   ac_cv_sizeof_short_int=2
7519 else
7520   cat > conftest.$ac_ext <<EOF
7521 #line 7522 "configure"
7522 #include "confdefs.h"
7523 #include <stdio.h>
7524 main()
7525 {
7526   FILE *f=fopen("conftestval", "w");
7527   if (!f) exit(1);
7528   fprintf(f, "%d\n", sizeof(short int));
7529   exit(0);
7530 }
7531 EOF
7532 if { (eval echo configure:7533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7533 then
7534   ac_cv_sizeof_short_int=`cat conftestval`
7535 else
7536   echo "configure: failed program was:" >&5
7537   cat conftest.$ac_ext >&5
7538   rm -fr conftest*
7539   ac_cv_sizeof_short_int=0
7540 fi
7541 rm -fr conftest*
7542 fi
7543
7544 fi
7545 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
7546 cat >> confdefs.h <<EOF
7547 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
7548 EOF
7549
7550
7551 echo $ac_n "checking size of int""... $ac_c" 1>&6
7552 echo "configure:7553: checking size of int" >&5
7553 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7554   echo $ac_n "(cached) $ac_c" 1>&6
7555 else
7556   if test "$cross_compiling" = yes; then
7557   ac_cv_sizeof_int=4
7558 else
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 #include <stdio.h>
7563 main()
7564 {
7565   FILE *f=fopen("conftestval", "w");
7566   if (!f) exit(1);
7567   fprintf(f, "%d\n", sizeof(int));
7568   exit(0);
7569 }
7570 EOF
7571 if { (eval echo configure:7572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7572 then
7573   ac_cv_sizeof_int=`cat conftestval`
7574 else
7575   echo "configure: failed program was:" >&5
7576   cat conftest.$ac_ext >&5
7577   rm -fr conftest*
7578   ac_cv_sizeof_int=0
7579 fi
7580 rm -fr conftest*
7581 fi
7582
7583 fi
7584 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
7585 cat >> confdefs.h <<EOF
7586 #define SIZEOF_INT $ac_cv_sizeof_int
7587 EOF
7588
7589
7590 echo $ac_n "checking size of long int""... $ac_c" 1>&6
7591 echo "configure:7592: checking size of long int" >&5
7592 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
7593   echo $ac_n "(cached) $ac_c" 1>&6
7594 else
7595   if test "$cross_compiling" = yes; then
7596   ac_cv_sizeof_long_int=4
7597 else
7598   cat > conftest.$ac_ext <<EOF
7599 #line 7600 "configure"
7600 #include "confdefs.h"
7601 #include <stdio.h>
7602 main()
7603 {
7604   FILE *f=fopen("conftestval", "w");
7605   if (!f) exit(1);
7606   fprintf(f, "%d\n", sizeof(long int));
7607   exit(0);
7608 }
7609 EOF
7610 if { (eval echo configure:7611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7611 then
7612   ac_cv_sizeof_long_int=`cat conftestval`
7613 else
7614   echo "configure: failed program was:" >&5
7615   cat conftest.$ac_ext >&5
7616   rm -fr conftest*
7617   ac_cv_sizeof_long_int=0
7618 fi
7619 rm -fr conftest*
7620 fi
7621
7622 fi
7623 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
7624 cat >> confdefs.h <<EOF
7625 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
7626 EOF
7627
7628
7629 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
7630 echo "configure:7631: checking size of long long int" >&5
7631 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   if test "$cross_compiling" = yes; then
7635   ac_cv_sizeof_long_long_int=8
7636 else
7637   cat > conftest.$ac_ext <<EOF
7638 #line 7639 "configure"
7639 #include "confdefs.h"
7640 #include <stdio.h>
7641 main()
7642 {
7643   FILE *f=fopen("conftestval", "w");
7644   if (!f) exit(1);
7645   fprintf(f, "%d\n", sizeof(long long int));
7646   exit(0);
7647 }
7648 EOF
7649 if { (eval echo configure:7650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7650 then
7651   ac_cv_sizeof_long_long_int=`cat conftestval`
7652 else
7653   echo "configure: failed program was:" >&5
7654   cat conftest.$ac_ext >&5
7655   rm -fr conftest*
7656   ac_cv_sizeof_long_long_int=0
7657 fi
7658 rm -fr conftest*
7659 fi
7660
7661 fi
7662 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
7663 cat >> confdefs.h <<EOF
7664 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
7665 EOF
7666
7667
7668 echo $ac_n "checking size of int *""... $ac_c" 1>&6
7669 echo "configure:7670: checking size of int *" >&5
7670 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
7671   echo $ac_n "(cached) $ac_c" 1>&6
7672 else
7673   if test "$cross_compiling" = yes; then
7674   ac_cv_sizeof_int_p=4
7675 else
7676   cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 #include <stdio.h>
7680 main()
7681 {
7682   FILE *f=fopen("conftestval", "w");
7683   if (!f) exit(1);
7684   fprintf(f, "%d\n", sizeof(int *));
7685   exit(0);
7686 }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7689 then
7690   ac_cv_sizeof_int_p=`cat conftestval`
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -fr conftest*
7695   ac_cv_sizeof_int_p=0
7696 fi
7697 rm -fr conftest*
7698 fi
7699
7700 fi
7701 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
7702 cat >> confdefs.h <<EOF
7703 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
7704 EOF
7705
7706
7707
7708 # Check for sys/types.h types
7709 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
7710 echo "configure:7711: checking for u_int type" >&5
7711 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   
7715     cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718  #include <sys/types.h> 
7719 int main() {
7720  u_int a; a = 1;
7721 ; return 0; }
7722 EOF
7723 if { (eval echo configure:7724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7724   rm -rf conftest*
7725    ac_cv_have_u_int="yes" 
7726 else
7727   echo "configure: failed program was:" >&5
7728   cat conftest.$ac_ext >&5
7729   rm -rf conftest*
7730    ac_cv_have_u_int="no" 
7731     
7732 fi
7733 rm -f conftest*
7734
7735 fi
7736
7737 echo "$ac_t""$ac_cv_have_u_int" 1>&6
7738 if test "x$ac_cv_have_u_int" = "xyes" ; then
7739    cat >> confdefs.h <<\EOF
7740 #define HAVE_U_INT 1
7741 EOF
7742
7743    have_u_int=1
7744 fi
7745
7746 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
7747 echo "configure:7748: checking for intmax_t type" >&5
7748 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
7749   echo $ac_n "(cached) $ac_c" 1>&6
7750 else
7751   
7752    cat > conftest.$ac_ext <<EOF
7753 #line 7754 "configure"
7754 #include "confdefs.h"
7755  #include <sys/types.h> 
7756 int main() {
7757  intmax_t a; a = 1;
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7761   rm -rf conftest*
7762    ac_cv_have_intmax_t="yes" 
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767    
7768          cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771  #include <stdint.h> 
7772 int main() {
7773  intmax_t a; a = 1;
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7777   rm -rf conftest*
7778    ac_cv_have_intmax_t="yes" 
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783    ac_cv_have_intmax_t="no" 
7784          
7785 fi
7786 rm -f conftest*
7787       
7788    
7789 fi
7790 rm -f conftest*     
7791
7792
7793 fi
7794
7795 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
7796 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
7797    cat >> confdefs.h <<\EOF
7798 #define HAVE_INTMAX_T 1
7799 EOF
7800
7801    have_intmax_t=1
7802 fi
7803
7804
7805 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
7806 echo "configure:7807: checking for u_intmax_t type" >&5
7807 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
7808   echo $ac_n "(cached) $ac_c" 1>&6
7809 else
7810   
7811    cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814  #include <sys/types.h> 
7815 int main() {
7816  u_intmax_t a; a = 1;
7817 ; return 0; }
7818 EOF
7819 if { (eval echo configure:7820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7820   rm -rf conftest*
7821    ac_cv_have_u_intmax_t="yes" 
7822 else
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826    
7827          cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830  #include <stdint.h> 
7831 int main() {
7832  u_intmax_t a; a = 1;
7833 ; return 0; }
7834 EOF
7835 if { (eval echo configure:7836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7836   rm -rf conftest*
7837    ac_cv_have_u_intmax_t="yes" 
7838 else
7839   echo "configure: failed program was:" >&5
7840   cat conftest.$ac_ext >&5
7841   rm -rf conftest*
7842    ac_cv_have_u_intmax_t="no" 
7843          
7844 fi
7845 rm -f conftest*
7846       
7847    
7848 fi
7849 rm -f conftest*
7850
7851 fi
7852
7853 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
7854 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
7855    cat >> confdefs.h <<\EOF
7856 #define HAVE_U_INTMAX_T 1
7857 EOF
7858
7859    have_u_intmax_t=1
7860 fi
7861
7862
7863 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
7864 echo "configure:7865: checking for intXX_t types" >&5
7865 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
7866   echo $ac_n "(cached) $ac_c" 1>&6
7867 else
7868   
7869    cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872  #include <sys/types.h> 
7873 int main() {
7874  int8_t a; int16_t b; int32_t c; a = b = c = 1;
7875 ; return 0; }
7876 EOF
7877 if { (eval echo configure:7878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7878   rm -rf conftest*
7879    ac_cv_have_intxx_t="yes" 
7880 else
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -rf conftest*
7884    ac_cv_have_intxx_t="no" 
7885    
7886 fi
7887 rm -f conftest*
7888
7889 fi
7890
7891 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
7892 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
7893    cat >> confdefs.h <<\EOF
7894 #define HAVE_INTXX_T 1
7895 EOF
7896
7897    have_intxx_t=1
7898 fi
7899         
7900 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
7901 echo "configure:7902: checking for int64_t type" >&5
7902 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   
7906    cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909  #include <sys/types.h> 
7910 int main() {
7911  int64_t a; a = 1;
7912 ; return 0; }
7913 EOF
7914 if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7915   rm -rf conftest*
7916    ac_cv_have_int64_t="yes" 
7917 else
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921    ac_cv_have_int64_t="no" 
7922    
7923 fi
7924 rm -f conftest*
7925
7926 fi
7927
7928 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
7929 if test "x$ac_cv_have_int64_t" = "xyes" ; then
7930    cat >> confdefs.h <<\EOF
7931 #define HAVE_INT64_T 1
7932 EOF
7933
7934    have_int64_t=1
7935 fi
7936         
7937 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
7938 echo "configure:7939: checking for u_intXX_t types" >&5
7939 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   
7943    cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946  #include <sys/types.h> 
7947 int main() {
7948  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
7949 ; return 0; }
7950 EOF
7951 if { (eval echo configure:7952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7952   rm -rf conftest*
7953    ac_cv_have_u_intxx_t="yes" 
7954 else
7955   echo "configure: failed program was:" >&5
7956   cat conftest.$ac_ext >&5
7957   rm -rf conftest*
7958    ac_cv_have_u_intxx_t="no" 
7959    
7960 fi
7961 rm -f conftest*
7962
7963 fi
7964
7965 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
7966 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
7967    cat >> confdefs.h <<\EOF
7968 #define HAVE_U_INTXX_T 1
7969 EOF
7970
7971    have_u_intxx_t=1
7972 fi
7973
7974 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
7975 echo "configure:7976: checking for u_int64_t types" >&5
7976 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
7977   echo $ac_n "(cached) $ac_c" 1>&6
7978 else
7979   
7980    cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983  #include <sys/types.h> 
7984 int main() {
7985  u_int64_t a; a = 1;
7986 ; return 0; }
7987 EOF
7988 if { (eval echo configure:7989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7989   rm -rf conftest*
7990    ac_cv_have_u_int64_t="yes" 
7991 else
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995    ac_cv_have_u_int64_t="no" 
7996    
7997 fi
7998 rm -f conftest*
7999
8000 fi
8001
8002 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
8003 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
8004    cat >> confdefs.h <<\EOF
8005 #define HAVE_U_INT64_T 1
8006 EOF
8007
8008    have_u_int64_t=1
8009 fi
8010
8011 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
8012            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8013 then
8014    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
8015 echo "configure:8016: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
8016    cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019  #include <sys/bitypes.h>  
8020 int main() {
8021  int8_t a; int16_t b; int32_t c;
8022         u_int8_t e; u_int16_t f; u_int32_t g;
8023         a = b = c = e = f = g = 1;  
8024 ; return 0; }
8025 EOF
8026 if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8027   rm -rf conftest*
8028    cat >> confdefs.h <<\EOF
8029 #define HAVE_U_INTXX_T 1
8030 EOF
8031
8032         cat >> confdefs.h <<\EOF
8033 #define HAVE_INTXX_T 1
8034 EOF
8035
8036         cat >> confdefs.h <<\EOF
8037 #define HAVE_SYS_BITYPES_H 1
8038 EOF
8039
8040         echo "$ac_t""yes" 1>&6 
8041 else
8042   echo "configure: failed program was:" >&5
8043   cat conftest.$ac_ext >&5
8044   rm -rf conftest*
8045    echo "$ac_t""no" 1>&6
8046    
8047 fi
8048 rm -f conftest* 
8049 fi
8050
8051 if test -z "$have_u_intxx_t" ; then
8052    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
8053 echo "configure:8054: checking for uintXX_t types" >&5
8054 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   
8058       cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061  #include <sys/types.h> 
8062 int main() {
8063  uint8_t a; uint16_t b; 
8064            uint32_t c; a = b = c = 1; 
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8068   rm -rf conftest*
8069    ac_cv_have_uintxx_t="yes" 
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074    ac_cv_have_uintxx_t="no" 
8075       
8076 fi
8077 rm -f conftest*
8078    
8079 fi
8080
8081 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
8082    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
8083       cat >> confdefs.h <<\EOF
8084 #define HAVE_UINTXX_T 1
8085 EOF
8086
8087    fi
8088 fi
8089
8090 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
8091           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8092 then
8093    echo $ac_n "checking for int64_t and u_int64_t types in sys/bitypes.h""... $ac_c" 1>&6
8094 echo "configure:8095: checking for int64_t and u_int64_t types in sys/bitypes.h" >&5
8095    cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098  #include <sys/bitypes.h>  
8099 int main() {
8100  int64_t a; u_int64_t b; 
8101        a = b = 1;  
8102 ; return 0; }
8103 EOF
8104 if { (eval echo configure:8105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8105   rm -rf conftest*
8106    cat >> confdefs.h <<\EOF
8107 #define HAVE_U_INT64_T 1
8108 EOF
8109
8110        cat >> confdefs.h <<\EOF
8111 #define HAVE_INT64_T 1
8112 EOF
8113
8114        echo "$ac_t""yes" 1>&6 
8115 else
8116   echo "configure: failed program was:" >&5
8117   cat conftest.$ac_ext >&5
8118   rm -rf conftest*
8119    echo "$ac_t""no" 1>&6
8120    
8121 fi
8122 rm -f conftest* 
8123 fi
8124
8125 if (test -z "$have_uintxx_t" && \
8126           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8127 then
8128    echo $ac_n "checking for uintXX_t types in sys/bitypes.h""... $ac_c" 1>&6
8129 echo "configure:8130: checking for uintXX_t types in sys/bitypes.h" >&5
8130    cat > conftest.$ac_ext <<EOF
8131 #line 8132 "configure"
8132 #include "confdefs.h"
8133  #include <sys/bitypes.h>  
8134 int main() {
8135  uint8_t a; uint16_t b; 
8136           uint32_t c; a = b = c = 1; 
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8140   rm -rf conftest*
8141    cat >> confdefs.h <<\EOF
8142 #define HAVE_UINTXX_T 1
8143 EOF
8144
8145        echo "$ac_t""yes" 1>&6 
8146 else
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -rf conftest*
8150    echo "$ac_t""no" 1>&6
8151    
8152 fi
8153 rm -f conftest* 
8154
8155 fi
8156
8157
8158
8159
8160 for ac_func in \
8161         fork \
8162         getcwd \
8163         gethostname \
8164         getpid \
8165         gettimeofday \
8166         setpgid \
8167         setpgrp \
8168         setsid \
8169         signal \
8170         strerror \
8171         strncmp \
8172         strncpy \
8173         vfprintf \
8174         
8175 do
8176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8177 echo "configure:8178: checking for $ac_func" >&5
8178 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8179   echo $ac_n "(cached) $ac_c" 1>&6
8180 else
8181   cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 /* System header to define __stub macros and hopefully few prototypes,
8185     which can conflict with char $ac_func(); below.  */
8186 #include <assert.h>
8187 /* Override any gcc2 internal prototype to avoid an error.  */
8188 /* We use char because int might match the return type of a gcc2
8189     builtin and then its argument prototype would still apply.  */
8190 char $ac_func();
8191
8192 int main() {
8193
8194 /* The GNU C library defines this for functions which it implements
8195     to always fail with ENOSYS.  Some functions are actually named
8196     something starting with __ and the normal name is an alias.  */
8197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8198 choke me
8199 #else
8200 $ac_func();
8201 #endif
8202
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   eval "ac_cv_func_$ac_func=yes"
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_func_$ac_func=no"
8213 fi
8214 rm -f conftest*
8215 fi
8216
8217 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8218   echo "$ac_t""yes" 1>&6
8219     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8220   cat >> confdefs.h <<EOF
8221 #define $ac_tr_func 1
8222 EOF
8223  
8224 else
8225   echo "$ac_t""no" 1>&6
8226 echo 'configure: cannot find needed function.'; exit 1
8227
8228 fi
8229 done
8230
8231
8232 for ac_func in fchdir
8233 do
8234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8235 echo "configure:8236: checking for $ac_func" >&5
8236 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8237   echo $ac_n "(cached) $ac_c" 1>&6
8238 else
8239   cat > conftest.$ac_ext <<EOF
8240 #line 8241 "configure"
8241 #include "confdefs.h"
8242 /* System header to define __stub macros and hopefully few prototypes,
8243     which can conflict with char $ac_func(); below.  */
8244 #include <assert.h>
8245 /* Override any gcc2 internal prototype to avoid an error.  */
8246 /* We use char because int might match the return type of a gcc2
8247     builtin and then its argument prototype would still apply.  */
8248 char $ac_func();
8249
8250 int main() {
8251
8252 /* The GNU C library defines this for functions which it implements
8253     to always fail with ENOSYS.  Some functions are actually named
8254     something starting with __ and the normal name is an alias.  */
8255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8256 choke me
8257 #else
8258 $ac_func();
8259 #endif
8260
8261 ; return 0; }
8262 EOF
8263 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8264   rm -rf conftest*
8265   eval "ac_cv_func_$ac_func=yes"
8266 else
8267   echo "configure: failed program was:" >&5
8268   cat conftest.$ac_ext >&5
8269   rm -rf conftest*
8270   eval "ac_cv_func_$ac_func=no"
8271 fi
8272 rm -f conftest*
8273 fi
8274
8275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8276   echo "$ac_t""yes" 1>&6
8277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8278   cat >> confdefs.h <<EOF
8279 #define $ac_tr_func 1
8280 EOF
8281  cat >> confdefs.h <<\EOF
8282 #define HAVE_FCHDIR 1
8283 EOF
8284
8285 else
8286   echo "$ac_t""no" 1>&6
8287 fi
8288 done
8289
8290 for ac_func in strtoll
8291 do
8292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8293 echo "configure:8294: checking for $ac_func" >&5
8294 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8295   echo $ac_n "(cached) $ac_c" 1>&6
8296 else
8297   cat > conftest.$ac_ext <<EOF
8298 #line 8299 "configure"
8299 #include "confdefs.h"
8300 /* System header to define __stub macros and hopefully few prototypes,
8301     which can conflict with char $ac_func(); below.  */
8302 #include <assert.h>
8303 /* Override any gcc2 internal prototype to avoid an error.  */
8304 /* We use char because int might match the return type of a gcc2
8305     builtin and then its argument prototype would still apply.  */
8306 char $ac_func();
8307
8308 int main() {
8309
8310 /* The GNU C library defines this for functions which it implements
8311     to always fail with ENOSYS.  Some functions are actually named
8312     something starting with __ and the normal name is an alias.  */
8313 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8314 choke me
8315 #else
8316 $ac_func();
8317 #endif
8318
8319 ; return 0; }
8320 EOF
8321 if { (eval echo configure:8322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8322   rm -rf conftest*
8323   eval "ac_cv_func_$ac_func=yes"
8324 else
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   eval "ac_cv_func_$ac_func=no"
8329 fi
8330 rm -f conftest*
8331 fi
8332
8333 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8334   echo "$ac_t""yes" 1>&6
8335     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8336   cat >> confdefs.h <<EOF
8337 #define $ac_tr_func 1
8338 EOF
8339  cat >> confdefs.h <<\EOF
8340 #define HAVE_STRTOLL 1
8341 EOF
8342
8343 else
8344   echo "$ac_t""no" 1>&6
8345 fi
8346 done
8347
8348
8349 for ac_func in chflags
8350 do
8351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8352 echo "configure:8353: checking for $ac_func" >&5
8353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8354   echo $ac_n "(cached) $ac_c" 1>&6
8355 else
8356   cat > conftest.$ac_ext <<EOF
8357 #line 8358 "configure"
8358 #include "confdefs.h"
8359 /* System header to define __stub macros and hopefully few prototypes,
8360     which can conflict with char $ac_func(); below.  */
8361 #include <assert.h>
8362 /* Override any gcc2 internal prototype to avoid an error.  */
8363 /* We use char because int might match the return type of a gcc2
8364     builtin and then its argument prototype would still apply.  */
8365 char $ac_func();
8366
8367 int main() {
8368
8369 /* The GNU C library defines this for functions which it implements
8370     to always fail with ENOSYS.  Some functions are actually named
8371     something starting with __ and the normal name is an alias.  */
8372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8373 choke me
8374 #else
8375 $ac_func();
8376 #endif
8377
8378 ; return 0; }
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8381   rm -rf conftest*
8382   eval "ac_cv_func_$ac_func=yes"
8383 else
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   eval "ac_cv_func_$ac_func=no"
8388 fi
8389 rm -f conftest*
8390 fi
8391
8392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8393   echo "$ac_t""yes" 1>&6
8394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8395   cat >> confdefs.h <<EOF
8396 #define $ac_tr_func 1
8397 EOF
8398  
8399 else
8400   echo "$ac_t""no" 1>&6
8401 fi
8402 done
8403  
8404
8405 for ac_func in snprintf vsnprintf gethostid getdomainname
8406 do
8407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8408 echo "configure:8409: checking for $ac_func" >&5
8409 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8410   echo $ac_n "(cached) $ac_c" 1>&6
8411 else
8412   cat > conftest.$ac_ext <<EOF
8413 #line 8414 "configure"
8414 #include "confdefs.h"
8415 /* System header to define __stub macros and hopefully few prototypes,
8416     which can conflict with char $ac_func(); below.  */
8417 #include <assert.h>
8418 /* Override any gcc2 internal prototype to avoid an error.  */
8419 /* We use char because int might match the return type of a gcc2
8420     builtin and then its argument prototype would still apply.  */
8421 char $ac_func();
8422
8423 int main() {
8424
8425 /* The GNU C library defines this for functions which it implements
8426     to always fail with ENOSYS.  Some functions are actually named
8427     something starting with __ and the normal name is an alias.  */
8428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8429 choke me
8430 #else
8431 $ac_func();
8432 #endif
8433
8434 ; return 0; }
8435 EOF
8436 if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8437   rm -rf conftest*
8438   eval "ac_cv_func_$ac_func=yes"
8439 else
8440   echo "configure: failed program was:" >&5
8441   cat conftest.$ac_ext >&5
8442   rm -rf conftest*
8443   eval "ac_cv_func_$ac_func=no"
8444 fi
8445 rm -f conftest*
8446 fi
8447
8448 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8449   echo "$ac_t""yes" 1>&6
8450     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8451   cat >> confdefs.h <<EOF
8452 #define $ac_tr_func 1
8453 EOF
8454  
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458 done
8459
8460
8461 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
8462 do
8463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8464 echo "configure:8465: checking for $ac_func" >&5
8465 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8466   echo $ac_n "(cached) $ac_c" 1>&6
8467 else
8468   cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 /* System header to define __stub macros and hopefully few prototypes,
8472     which can conflict with char $ac_func(); below.  */
8473 #include <assert.h>
8474 /* Override any gcc2 internal prototype to avoid an error.  */
8475 /* We use char because int might match the return type of a gcc2
8476     builtin and then its argument prototype would still apply.  */
8477 char $ac_func();
8478
8479 int main() {
8480
8481 /* The GNU C library defines this for functions which it implements
8482     to always fail with ENOSYS.  Some functions are actually named
8483     something starting with __ and the normal name is an alias.  */
8484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8485 choke me
8486 #else
8487 $ac_func();
8488 #endif
8489
8490 ; return 0; }
8491 EOF
8492 if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8493   rm -rf conftest*
8494   eval "ac_cv_func_$ac_func=yes"
8495 else
8496   echo "configure: failed program was:" >&5
8497   cat conftest.$ac_ext >&5
8498   rm -rf conftest*
8499   eval "ac_cv_func_$ac_func=no"
8500 fi
8501 rm -f conftest*
8502 fi
8503
8504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8505   echo "$ac_t""yes" 1>&6
8506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8507   cat >> confdefs.h <<EOF
8508 #define $ac_tr_func 1
8509 EOF
8510  
8511 else
8512   echo "$ac_t""no" 1>&6
8513 fi
8514 done
8515
8516
8517 # If resolver functions are not in libc check for -lnsl or -lresolv.
8518 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
8519 echo "configure:8520: checking for gethostbyname_r" >&5
8520 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
8521   echo $ac_n "(cached) $ac_c" 1>&6
8522 else
8523   cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526 /* System header to define __stub macros and hopefully few prototypes,
8527     which can conflict with char gethostbyname_r(); below.  */
8528 #include <assert.h>
8529 /* Override any gcc2 internal prototype to avoid an error.  */
8530 /* We use char because int might match the return type of a gcc2
8531     builtin and then its argument prototype would still apply.  */
8532 char gethostbyname_r();
8533
8534 int main() {
8535
8536 /* The GNU C library defines this for functions which it implements
8537     to always fail with ENOSYS.  Some functions are actually named
8538     something starting with __ and the normal name is an alias.  */
8539 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
8540 choke me
8541 #else
8542 gethostbyname_r();
8543 #endif
8544
8545 ; return 0; }
8546 EOF
8547 if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8548   rm -rf conftest*
8549   eval "ac_cv_func_gethostbyname_r=yes"
8550 else
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -rf conftest*
8554   eval "ac_cv_func_gethostbyname_r=no"
8555 fi
8556 rm -f conftest*
8557 fi
8558
8559 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
8560   echo "$ac_t""yes" 1>&6
8561   echo "$ac_t""using libc's resolver" 1>&6
8562 else
8563   echo "$ac_t""no" 1>&6
8564 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
8565 echo "configure:8566: checking for gethostbyname_r in -lnsl" >&5
8566 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
8567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8568   echo $ac_n "(cached) $ac_c" 1>&6
8569 else
8570   ac_save_LIBS="$LIBS"
8571 LIBS="-lnsl  $LIBS"
8572 cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 /* Override any gcc2 internal prototype to avoid an error.  */
8576 /* We use char because int might match the return type of a gcc2
8577     builtin and then its argument prototype would still apply.  */
8578 char gethostbyname_r();
8579
8580 int main() {
8581 gethostbyname_r()
8582 ; return 0; }
8583 EOF
8584 if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8585   rm -rf conftest*
8586   eval "ac_cv_lib_$ac_lib_var=yes"
8587 else
8588   echo "configure: failed program was:" >&5
8589   cat conftest.$ac_ext >&5
8590   rm -rf conftest*
8591   eval "ac_cv_lib_$ac_lib_var=no"
8592 fi
8593 rm -f conftest*
8594 LIBS="$ac_save_LIBS"
8595
8596 fi
8597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8598   echo "$ac_t""yes" 1>&6
8599     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
8600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8601   cat >> confdefs.h <<EOF
8602 #define $ac_tr_lib 1
8603 EOF
8604
8605   LIBS="-lnsl $LIBS"
8606
8607 else
8608   echo "$ac_t""no" 1>&6
8609 fi
8610
8611     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
8612 echo "configure:8613: checking for gethostbyname_r in -lresolv" >&5
8613 ac_lib_var=`echo resolv'_'gethostbyname_r | sed 'y%./+-%__p_%'`
8614 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8615   echo $ac_n "(cached) $ac_c" 1>&6
8616 else
8617   ac_save_LIBS="$LIBS"
8618 LIBS="-lresolv  $LIBS"
8619 cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 /* Override any gcc2 internal prototype to avoid an error.  */
8623 /* We use char because int might match the return type of a gcc2
8624     builtin and then its argument prototype would still apply.  */
8625 char gethostbyname_r();
8626
8627 int main() {
8628 gethostbyname_r()
8629 ; return 0; }
8630 EOF
8631 if { (eval echo configure:8632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8632   rm -rf conftest*
8633   eval "ac_cv_lib_$ac_lib_var=yes"
8634 else
8635   echo "configure: failed program was:" >&5
8636   cat conftest.$ac_ext >&5
8637   rm -rf conftest*
8638   eval "ac_cv_lib_$ac_lib_var=no"
8639 fi
8640 rm -f conftest*
8641 LIBS="$ac_save_LIBS"
8642
8643 fi
8644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8645   echo "$ac_t""yes" 1>&6
8646     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
8647     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8648   cat >> confdefs.h <<EOF
8649 #define $ac_tr_lib 1
8650 EOF
8651
8652   LIBS="-lresolv $LIBS"
8653
8654 else
8655   echo "$ac_t""no" 1>&6
8656 fi
8657
8658 fi
8659
8660
8661
8662 # Find where sockets are (especially for Solaris)
8663 echo $ac_n "checking for socket""... $ac_c" 1>&6
8664 echo "configure:8665: checking for socket" >&5
8665 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 /* System header to define __stub macros and hopefully few prototypes,
8672     which can conflict with char socket(); below.  */
8673 #include <assert.h>
8674 /* Override any gcc2 internal prototype to avoid an error.  */
8675 /* We use char because int might match the return type of a gcc2
8676     builtin and then its argument prototype would still apply.  */
8677 char socket();
8678
8679 int main() {
8680
8681 /* The GNU C library defines this for functions which it implements
8682     to always fail with ENOSYS.  Some functions are actually named
8683     something starting with __ and the normal name is an alias.  */
8684 #if defined (__stub_socket) || defined (__stub___socket)
8685 choke me
8686 #else
8687 socket();
8688 #endif
8689
8690 ; return 0; }
8691 EOF
8692 if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8693   rm -rf conftest*
8694   eval "ac_cv_func_socket=yes"
8695 else
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   eval "ac_cv_func_socket=no"
8700 fi
8701 rm -f conftest*
8702 fi
8703
8704 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8705   echo "$ac_t""yes" 1>&6
8706   echo "$ac_t""using libc's socket" 1>&6
8707 else
8708   echo "$ac_t""no" 1>&6
8709 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
8710 echo "configure:8711: checking for socket in -lxnet" >&5
8711 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
8712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   ac_save_LIBS="$LIBS"
8716 LIBS="-lxnet  $LIBS"
8717 cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 /* Override any gcc2 internal prototype to avoid an error.  */
8721 /* We use char because int might match the return type of a gcc2
8722     builtin and then its argument prototype would still apply.  */
8723 char socket();
8724
8725 int main() {
8726 socket()
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8730   rm -rf conftest*
8731   eval "ac_cv_lib_$ac_lib_var=yes"
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_lib_$ac_lib_var=no"
8737 fi
8738 rm -f conftest*
8739 LIBS="$ac_save_LIBS"
8740
8741 fi
8742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8743   echo "$ac_t""yes" 1>&6
8744     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
8745     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8746   cat >> confdefs.h <<EOF
8747 #define $ac_tr_lib 1
8748 EOF
8749
8750   LIBS="-lxnet $LIBS"
8751
8752 else
8753   echo "$ac_t""no" 1>&6
8754 fi
8755
8756     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
8757 echo "configure:8758: checking for socket in -lsocket" >&5
8758 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
8759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   ac_save_LIBS="$LIBS"
8763 LIBS="-lsocket  $LIBS"
8764 cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 /* Override any gcc2 internal prototype to avoid an error.  */
8768 /* We use char because int might match the return type of a gcc2
8769     builtin and then its argument prototype would still apply.  */
8770 char socket();
8771
8772 int main() {
8773 socket()
8774 ; return 0; }
8775 EOF
8776 if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8777   rm -rf conftest*
8778   eval "ac_cv_lib_$ac_lib_var=yes"
8779 else
8780   echo "configure: failed program was:" >&5
8781   cat conftest.$ac_ext >&5
8782   rm -rf conftest*
8783   eval "ac_cv_lib_$ac_lib_var=no"
8784 fi
8785 rm -f conftest*
8786 LIBS="$ac_save_LIBS"
8787
8788 fi
8789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8790   echo "$ac_t""yes" 1>&6
8791     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
8792     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8793   cat >> confdefs.h <<EOF
8794 #define $ac_tr_lib 1
8795 EOF
8796
8797   LIBS="-lsocket $LIBS"
8798
8799 else
8800   echo "$ac_t""no" 1>&6
8801 fi
8802
8803     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8804 echo "configure:8805: checking for socket in -linet" >&5
8805 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
8806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   ac_save_LIBS="$LIBS"
8810 LIBS="-linet  $LIBS"
8811 cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 /* Override any gcc2 internal prototype to avoid an error.  */
8815 /* We use char because int might match the return type of a gcc2
8816     builtin and then its argument prototype would still apply.  */
8817 char socket();
8818
8819 int main() {
8820 socket()
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   eval "ac_cv_lib_$ac_lib_var=yes"
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_lib_$ac_lib_var=no"
8831 fi
8832 rm -f conftest*
8833 LIBS="$ac_save_LIBS"
8834
8835 fi
8836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8837   echo "$ac_t""yes" 1>&6
8838     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
8839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8840   cat >> confdefs.h <<EOF
8841 #define $ac_tr_lib 1
8842 EOF
8843
8844   LIBS="-linet $LIBS"
8845
8846 else
8847   echo "$ac_t""no" 1>&6
8848 fi
8849
8850 fi
8851
8852
8853 for ac_func in inet_pton
8854 do
8855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8856 echo "configure:8857: checking for $ac_func" >&5
8857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* System header to define __stub macros and hopefully few prototypes,
8864     which can conflict with char $ac_func(); below.  */
8865 #include <assert.h>
8866 /* Override any gcc2 internal prototype to avoid an error.  */
8867 /* We use char because int might match the return type of a gcc2
8868     builtin and then its argument prototype would still apply.  */
8869 char $ac_func();
8870
8871 int main() {
8872
8873 /* The GNU C library defines this for functions which it implements
8874     to always fail with ENOSYS.  Some functions are actually named
8875     something starting with __ and the normal name is an alias.  */
8876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8877 choke me
8878 #else
8879 $ac_func();
8880 #endif
8881
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   eval "ac_cv_func_$ac_func=yes"
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   eval "ac_cv_func_$ac_func=no"
8892 fi
8893 rm -f conftest*
8894 fi
8895
8896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8897   echo "$ac_t""yes" 1>&6
8898     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8899   cat >> confdefs.h <<EOF
8900 #define $ac_tr_func 1
8901 EOF
8902  cat >> confdefs.h <<\EOF
8903 #define HAVE_INET_PTON 1
8904 EOF
8905
8906 else
8907   echo "$ac_t""no" 1>&6
8908 fi
8909 done
8910
8911 for ac_func in inet_ntop
8912 do
8913 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8914 echo "configure:8915: checking for $ac_func" >&5
8915 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   cat > conftest.$ac_ext <<EOF
8919 #line 8920 "configure"
8920 #include "confdefs.h"
8921 /* System header to define __stub macros and hopefully few prototypes,
8922     which can conflict with char $ac_func(); below.  */
8923 #include <assert.h>
8924 /* Override any gcc2 internal prototype to avoid an error.  */
8925 /* We use char because int might match the return type of a gcc2
8926     builtin and then its argument prototype would still apply.  */
8927 char $ac_func();
8928
8929 int main() {
8930
8931 /* The GNU C library defines this for functions which it implements
8932     to always fail with ENOSYS.  Some functions are actually named
8933     something starting with __ and the normal name is an alias.  */
8934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8935 choke me
8936 #else
8937 $ac_func();
8938 #endif
8939
8940 ; return 0; }
8941 EOF
8942 if { (eval echo configure:8943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8943   rm -rf conftest*
8944   eval "ac_cv_func_$ac_func=yes"
8945 else
8946   echo "configure: failed program was:" >&5
8947   cat conftest.$ac_ext >&5
8948   rm -rf conftest*
8949   eval "ac_cv_func_$ac_func=no"
8950 fi
8951 rm -f conftest*
8952 fi
8953
8954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8955   echo "$ac_t""yes" 1>&6
8956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8957   cat >> confdefs.h <<EOF
8958 #define $ac_tr_func 1
8959 EOF
8960  cat >> confdefs.h <<\EOF
8961 #define HAVE_INET_NTOP 1
8962 EOF
8963
8964 else
8965   echo "$ac_t""no" 1>&6
8966 fi
8967 done
8968
8969 for ac_func in gethostbyname2
8970 do
8971 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8972 echo "configure:8973: checking for $ac_func" >&5
8973 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8974   echo $ac_n "(cached) $ac_c" 1>&6
8975 else
8976   cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8979 /* System header to define __stub macros and hopefully few prototypes,
8980     which can conflict with char $ac_func(); below.  */
8981 #include <assert.h>
8982 /* Override any gcc2 internal prototype to avoid an error.  */
8983 /* We use char because int might match the return type of a gcc2
8984     builtin and then its argument prototype would still apply.  */
8985 char $ac_func();
8986
8987 int main() {
8988
8989 /* The GNU C library defines this for functions which it implements
8990     to always fail with ENOSYS.  Some functions are actually named
8991     something starting with __ and the normal name is an alias.  */
8992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8993 choke me
8994 #else
8995 $ac_func();
8996 #endif
8997
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9001   rm -rf conftest*
9002   eval "ac_cv_func_$ac_func=yes"
9003 else
9004   echo "configure: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   rm -rf conftest*
9007   eval "ac_cv_func_$ac_func=no"
9008 fi
9009 rm -f conftest*
9010 fi
9011
9012 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9013   echo "$ac_t""yes" 1>&6
9014     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9015   cat >> confdefs.h <<EOF
9016 #define $ac_tr_func 1
9017 EOF
9018  cat >> confdefs.h <<\EOF
9019 #define HAVE_GETHOSTBYNAME2 1
9020 EOF
9021
9022 else
9023   echo "$ac_t""no" 1>&6
9024 fi
9025 done
9026
9027
9028 echo $ac_n "checking for struct sockaddr has a sa_len field""... $ac_c" 1>&6
9029 echo "configure:9030: checking for struct sockaddr has a sa_len field" >&5
9030 if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_sa_len'+set}'`\" = set"; then
9031   echo $ac_n "(cached) $ac_c" 1>&6
9032 else
9033   cat > conftest.$ac_ext <<EOF
9034 #line 9035 "configure"
9035 #include "confdefs.h"
9036 #include <sys/socket.h>
9037 int main() {
9038 struct sockaddr s; s.sa_len;
9039 ; return 0; }
9040 EOF
9041 if { (eval echo configure:9042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9042   rm -rf conftest*
9043   ac_cv_struct_sockaddr_sa_len=yes
9044 else
9045   echo "configure: failed program was:" >&5
9046   cat conftest.$ac_ext >&5
9047   rm -rf conftest*
9048   ac_cv_struct_sockaddr_sa_len=no
9049 fi
9050 rm -f conftest*
9051 fi
9052
9053 echo "$ac_t""$ac_cv_struct_sockaddr_sa_len" 1>&6
9054
9055  if test $ac_cv_struct_sockaddr_sa_len = yes; then
9056   cat >> confdefs.h <<\EOF
9057 #define HAVE_SA_LEN 1
9058 EOF
9059
9060  fi
9061
9062
9063 echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6
9064 echo "configure:9065: checking for IPv6 support" >&5
9065 if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then
9066   echo $ac_n "(cached) $ac_c" 1>&6
9067 else
9068   cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071  #include <sys/types.h>
9072 #include <sys/socket.h>
9073 #include <netinet/in.h>
9074 int main() {
9075 struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
9076  0;
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   ac_cv_ipv6_support=yes
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   ac_cv_ipv6_support=no
9087 fi
9088 rm -f conftest*
9089 fi
9090
9091 echo "$ac_t""$ac_cv_ipv6_support" 1>&6
9092
9093 if test "$ac_cv_ipv6_support" = yes; then
9094   cat >> confdefs.h <<\EOF
9095 #define HAVE_IPV6 1
9096 EOF
9097
9098 fi
9099
9100
9101
9102 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9103 echo "configure:9104: checking for strftime" >&5
9104 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110 /* System header to define __stub macros and hopefully few prototypes,
9111     which can conflict with char strftime(); below.  */
9112 #include <assert.h>
9113 /* Override any gcc2 internal prototype to avoid an error.  */
9114 /* We use char because int might match the return type of a gcc2
9115     builtin and then its argument prototype would still apply.  */
9116 char strftime();
9117
9118 int main() {
9119
9120 /* The GNU C library defines this for functions which it implements
9121     to always fail with ENOSYS.  Some functions are actually named
9122     something starting with __ and the normal name is an alias.  */
9123 #if defined (__stub_strftime) || defined (__stub___strftime)
9124 choke me
9125 #else
9126 strftime();
9127 #endif
9128
9129 ; return 0; }
9130 EOF
9131 if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9132   rm -rf conftest*
9133   eval "ac_cv_func_strftime=yes"
9134 else
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   eval "ac_cv_func_strftime=no"
9139 fi
9140 rm -f conftest*
9141 fi
9142
9143 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
9144   echo "$ac_t""yes" 1>&6
9145   cat >> confdefs.h <<\EOF
9146 #define HAVE_STRFTIME 1
9147 EOF
9148
9149 else
9150   echo "$ac_t""no" 1>&6
9151 # strftime is in -lintl on SCO UNIX.
9152 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
9153 echo "configure:9154: checking for strftime in -lintl" >&5
9154 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
9155 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9156   echo $ac_n "(cached) $ac_c" 1>&6
9157 else
9158   ac_save_LIBS="$LIBS"
9159 LIBS="-lintl  $LIBS"
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char strftime();
9167
9168 int main() {
9169 strftime()
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=yes"
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -rf conftest*
9179   eval "ac_cv_lib_$ac_lib_var=no"
9180 fi
9181 rm -f conftest*
9182 LIBS="$ac_save_LIBS"
9183
9184 fi
9185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187   cat >> confdefs.h <<\EOF
9188 #define HAVE_STRFTIME 1
9189 EOF
9190
9191 LIBS="-lintl $LIBS"
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195
9196 fi
9197
9198 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
9199 echo "configure:9200: checking for vprintf" >&5
9200 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 /* System header to define __stub macros and hopefully few prototypes,
9207     which can conflict with char vprintf(); below.  */
9208 #include <assert.h>
9209 /* Override any gcc2 internal prototype to avoid an error.  */
9210 /* We use char because int might match the return type of a gcc2
9211     builtin and then its argument prototype would still apply.  */
9212 char vprintf();
9213
9214 int main() {
9215
9216 /* The GNU C library defines this for functions which it implements
9217     to always fail with ENOSYS.  Some functions are actually named
9218     something starting with __ and the normal name is an alias.  */
9219 #if defined (__stub_vprintf) || defined (__stub___vprintf)
9220 choke me
9221 #else
9222 vprintf();
9223 #endif
9224
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_func_vprintf=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_func_vprintf=no"
9235 fi
9236 rm -f conftest*
9237 fi
9238
9239 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241   cat >> confdefs.h <<\EOF
9242 #define HAVE_VPRINTF 1
9243 EOF
9244
9245 else
9246   echo "$ac_t""no" 1>&6
9247 fi
9248
9249 if test "$ac_cv_func_vprintf" != yes; then
9250 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
9251 echo "configure:9252: checking for _doprnt" >&5
9252 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
9253   echo $ac_n "(cached) $ac_c" 1>&6
9254 else
9255   cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258 /* System header to define __stub macros and hopefully few prototypes,
9259     which can conflict with char _doprnt(); below.  */
9260 #include <assert.h>
9261 /* Override any gcc2 internal prototype to avoid an error.  */
9262 /* We use char because int might match the return type of a gcc2
9263     builtin and then its argument prototype would still apply.  */
9264 char _doprnt();
9265
9266 int main() {
9267
9268 /* The GNU C library defines this for functions which it implements
9269     to always fail with ENOSYS.  Some functions are actually named
9270     something starting with __ and the normal name is an alias.  */
9271 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9272 choke me
9273 #else
9274 _doprnt();
9275 #endif
9276
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_func__doprnt=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_func__doprnt=no"
9287 fi
9288 rm -f conftest*
9289 fi
9290
9291 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
9292   echo "$ac_t""yes" 1>&6
9293   cat >> confdefs.h <<\EOF
9294 #define HAVE_DOPRNT 1
9295 EOF
9296
9297 else
9298   echo "$ac_t""no" 1>&6
9299 fi
9300
9301 fi
9302
9303 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9304 # for constant arguments.  Useless!
9305 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9306 echo "configure:9307: checking for working alloca.h" >&5
9307 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
9308   echo $ac_n "(cached) $ac_c" 1>&6
9309 else
9310   cat > conftest.$ac_ext <<EOF
9311 #line 9312 "configure"
9312 #include "confdefs.h"
9313 #include <alloca.h>
9314 int main() {
9315 char *p = alloca(2 * sizeof(int));
9316 ; return 0; }
9317 EOF
9318 if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9319   rm -rf conftest*
9320   ac_cv_header_alloca_h=yes
9321 else
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -rf conftest*
9325   ac_cv_header_alloca_h=no
9326 fi
9327 rm -f conftest*
9328 fi
9329
9330 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9331 if test $ac_cv_header_alloca_h = yes; then
9332   cat >> confdefs.h <<\EOF
9333 #define HAVE_ALLOCA_H 1
9334 EOF
9335
9336 fi
9337
9338 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9339 echo "configure:9340: checking for alloca" >&5
9340 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346
9347 #ifdef __GNUC__
9348 # define alloca __builtin_alloca
9349 #else
9350 # ifdef _MSC_VER
9351 #  include <malloc.h>
9352 #  define alloca _alloca
9353 # else
9354 #  if HAVE_ALLOCA_H
9355 #   include <alloca.h>
9356 #  else
9357 #   ifdef _AIX
9358  #pragma alloca
9359 #   else
9360 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9361 char *alloca ();
9362 #    endif
9363 #   endif
9364 #  endif
9365 # endif
9366 #endif
9367
9368 int main() {
9369 char *p = (char *) alloca(1);
9370 ; return 0; }
9371 EOF
9372 if { (eval echo configure:9373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9373   rm -rf conftest*
9374   ac_cv_func_alloca_works=yes
9375 else
9376   echo "configure: failed program was:" >&5
9377   cat conftest.$ac_ext >&5
9378   rm -rf conftest*
9379   ac_cv_func_alloca_works=no
9380 fi
9381 rm -f conftest*
9382 fi
9383
9384 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9385 if test $ac_cv_func_alloca_works = yes; then
9386   cat >> confdefs.h <<\EOF
9387 #define HAVE_ALLOCA 1
9388 EOF
9389
9390 fi
9391
9392 if test $ac_cv_func_alloca_works = no; then
9393   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9394   # that cause trouble.  Some versions do not even contain alloca or
9395   # contain a buggy version.  If you still want to use their alloca,
9396   # use ar to extract alloca.o from them instead of compiling alloca.c.
9397   ALLOCA=alloca.${ac_objext}
9398   cat >> confdefs.h <<\EOF
9399 #define C_ALLOCA 1
9400 EOF
9401
9402
9403 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9404 echo "configure:9405: checking whether alloca needs Cray hooks" >&5
9405 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   cat > conftest.$ac_ext <<EOF
9409 #line 9410 "configure"
9410 #include "confdefs.h"
9411 #if defined(CRAY) && ! defined(CRAY2)
9412 webecray
9413 #else
9414 wenotbecray
9415 #endif
9416
9417 EOF
9418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9419   egrep "webecray" >/dev/null 2>&1; then
9420   rm -rf conftest*
9421   ac_cv_os_cray=yes
9422 else
9423   rm -rf conftest*
9424   ac_cv_os_cray=no
9425 fi
9426 rm -f conftest*
9427
9428 fi
9429
9430 echo "$ac_t""$ac_cv_os_cray" 1>&6
9431 if test $ac_cv_os_cray = yes; then
9432 for ac_func in _getb67 GETB67 getb67; do
9433   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9434 echo "configure:9435: checking for $ac_func" >&5
9435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 /* System header to define __stub macros and hopefully few prototypes,
9442     which can conflict with char $ac_func(); below.  */
9443 #include <assert.h>
9444 /* Override any gcc2 internal prototype to avoid an error.  */
9445 /* We use char because int might match the return type of a gcc2
9446     builtin and then its argument prototype would still apply.  */
9447 char $ac_func();
9448
9449 int main() {
9450
9451 /* The GNU C library defines this for functions which it implements
9452     to always fail with ENOSYS.  Some functions are actually named
9453     something starting with __ and the normal name is an alias.  */
9454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9455 choke me
9456 #else
9457 $ac_func();
9458 #endif
9459
9460 ; return 0; }
9461 EOF
9462 if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9463   rm -rf conftest*
9464   eval "ac_cv_func_$ac_func=yes"
9465 else
9466   echo "configure: failed program was:" >&5
9467   cat conftest.$ac_ext >&5
9468   rm -rf conftest*
9469   eval "ac_cv_func_$ac_func=no"
9470 fi
9471 rm -f conftest*
9472 fi
9473
9474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9475   echo "$ac_t""yes" 1>&6
9476   cat >> confdefs.h <<EOF
9477 #define CRAY_STACKSEG_END $ac_func
9478 EOF
9479
9480   break
9481 else
9482   echo "$ac_t""no" 1>&6
9483 fi
9484
9485 done
9486 fi
9487
9488 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9489 echo "configure:9490: checking stack direction for C alloca" >&5
9490 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
9491   echo $ac_n "(cached) $ac_c" 1>&6
9492 else
9493   if test "$cross_compiling" = yes; then
9494   ac_cv_c_stack_direction=0
9495 else
9496   cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 find_stack_direction ()
9500 {
9501   static char *addr = 0;
9502   auto char dummy;
9503   if (addr == 0)
9504     {
9505       addr = &dummy;
9506       return find_stack_direction ();
9507     }
9508   else
9509     return (&dummy > addr) ? 1 : -1;
9510 }
9511 main ()
9512 {
9513   exit (find_stack_direction() < 0);
9514 }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9517 then
9518   ac_cv_c_stack_direction=1
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -fr conftest*
9523   ac_cv_c_stack_direction=-1
9524 fi
9525 rm -fr conftest*
9526 fi
9527
9528 fi
9529
9530 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9531 cat >> confdefs.h <<EOF
9532 #define STACK_DIRECTION $ac_cv_c_stack_direction
9533 EOF
9534
9535 fi
9536
9537 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
9538 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
9539 echo "configure:9540: checking for getmntent in -lsun" >&5
9540 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
9541 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   ac_save_LIBS="$LIBS"
9545 LIBS="-lsun  $LIBS"
9546 cat > conftest.$ac_ext <<EOF
9547 #line 9548 "configure"
9548 #include "confdefs.h"
9549 /* Override any gcc2 internal prototype to avoid an error.  */
9550 /* We use char because int might match the return type of a gcc2
9551     builtin and then its argument prototype would still apply.  */
9552 char getmntent();
9553
9554 int main() {
9555 getmntent()
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9559   rm -rf conftest*
9560   eval "ac_cv_lib_$ac_lib_var=yes"
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   eval "ac_cv_lib_$ac_lib_var=no"
9566 fi
9567 rm -f conftest*
9568 LIBS="$ac_save_LIBS"
9569
9570 fi
9571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9572   echo "$ac_t""yes" 1>&6
9573   LIBS="-lsun $LIBS"
9574 else
9575   echo "$ac_t""no" 1>&6
9576 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
9577 echo "configure:9578: checking for getmntent in -lseq" >&5
9578 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
9579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9580   echo $ac_n "(cached) $ac_c" 1>&6
9581 else
9582   ac_save_LIBS="$LIBS"
9583 LIBS="-lseq  $LIBS"
9584 cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 /* Override any gcc2 internal prototype to avoid an error.  */
9588 /* We use char because int might match the return type of a gcc2
9589     builtin and then its argument prototype would still apply.  */
9590 char getmntent();
9591
9592 int main() {
9593 getmntent()
9594 ; return 0; }
9595 EOF
9596 if { (eval echo configure:9597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9597   rm -rf conftest*
9598   eval "ac_cv_lib_$ac_lib_var=yes"
9599 else
9600   echo "configure: failed program was:" >&5
9601   cat conftest.$ac_ext >&5
9602   rm -rf conftest*
9603   eval "ac_cv_lib_$ac_lib_var=no"
9604 fi
9605 rm -f conftest*
9606 LIBS="$ac_save_LIBS"
9607
9608 fi
9609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9610   echo "$ac_t""yes" 1>&6
9611   LIBS="-lseq $LIBS"
9612 else
9613   echo "$ac_t""no" 1>&6
9614 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
9615 echo "configure:9616: checking for getmntent in -lgen" >&5
9616 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
9617 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9618   echo $ac_n "(cached) $ac_c" 1>&6
9619 else
9620   ac_save_LIBS="$LIBS"
9621 LIBS="-lgen  $LIBS"
9622 cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625 /* Override any gcc2 internal prototype to avoid an error.  */
9626 /* We use char because int might match the return type of a gcc2
9627     builtin and then its argument prototype would still apply.  */
9628 char getmntent();
9629
9630 int main() {
9631 getmntent()
9632 ; return 0; }
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9635   rm -rf conftest*
9636   eval "ac_cv_lib_$ac_lib_var=yes"
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   eval "ac_cv_lib_$ac_lib_var=no"
9642 fi
9643 rm -f conftest*
9644 LIBS="$ac_save_LIBS"
9645
9646 fi
9647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9648   echo "$ac_t""yes" 1>&6
9649   LIBS="-lgen $LIBS"
9650 else
9651   echo "$ac_t""no" 1>&6
9652 fi
9653
9654 fi
9655
9656 fi
9657
9658 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
9659 echo "configure:9660: checking for getmntent" >&5
9660 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663   cat > conftest.$ac_ext <<EOF
9664 #line 9665 "configure"
9665 #include "confdefs.h"
9666 /* System header to define __stub macros and hopefully few prototypes,
9667     which can conflict with char getmntent(); below.  */
9668 #include <assert.h>
9669 /* Override any gcc2 internal prototype to avoid an error.  */
9670 /* We use char because int might match the return type of a gcc2
9671     builtin and then its argument prototype would still apply.  */
9672 char getmntent();
9673
9674 int main() {
9675
9676 /* The GNU C library defines this for functions which it implements
9677     to always fail with ENOSYS.  Some functions are actually named
9678     something starting with __ and the normal name is an alias.  */
9679 #if defined (__stub_getmntent) || defined (__stub___getmntent)
9680 choke me
9681 #else
9682 getmntent();
9683 #endif
9684
9685 ; return 0; }
9686 EOF
9687 if { (eval echo configure:9688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9688   rm -rf conftest*
9689   eval "ac_cv_func_getmntent=yes"
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693   rm -rf conftest*
9694   eval "ac_cv_func_getmntent=no"
9695 fi
9696 rm -f conftest*
9697 fi
9698
9699 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
9700   echo "$ac_t""yes" 1>&6
9701   cat >> confdefs.h <<\EOF
9702 #define HAVE_GETMNTENT 1
9703 EOF
9704
9705 else
9706   echo "$ac_t""no" 1>&6
9707 fi
9708
9709 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
9710 echo "configure:9711: checking whether closedir returns void" >&5
9711 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
9712   echo $ac_n "(cached) $ac_c" 1>&6
9713 else
9714   if test "$cross_compiling" = yes; then
9715   ac_cv_func_closedir_void=yes
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720 #include <sys/types.h>
9721 #include <$ac_header_dirent>
9722 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9725 then
9726   ac_cv_func_closedir_void=no
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -fr conftest*
9731   ac_cv_func_closedir_void=yes
9732 fi
9733 rm -fr conftest*
9734 fi
9735
9736 fi
9737
9738 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
9739 if test $ac_cv_func_closedir_void = yes; then
9740   cat >> confdefs.h <<\EOF
9741 #define CLOSEDIR_VOID 1
9742 EOF
9743
9744 fi
9745
9746 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9747 echo "configure:9748: checking whether setpgrp takes no argument" >&5
9748 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   if test "$cross_compiling" = yes; then
9752   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
9753 else
9754   cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757
9758 #ifdef HAVE_UNISTD_H
9759 #include <unistd.h>
9760 #endif
9761
9762 /*
9763  * If this system has a BSD-style setpgrp, which takes arguments, exit
9764  * successfully.
9765  */
9766 main()
9767 {
9768     if (setpgrp(1,1) == -1)
9769         exit(0);
9770     else
9771         exit(1);
9772 }
9773
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9776 then
9777   ac_cv_func_setpgrp_void=no
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -fr conftest*
9782   ac_cv_func_setpgrp_void=yes
9783 fi
9784 rm -fr conftest*
9785 fi
9786
9787
9788 fi
9789
9790 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
9791 if test $ac_cv_func_setpgrp_void = yes; then
9792   cat >> confdefs.h <<\EOF
9793 #define SETPGRP_VOID 1
9794 EOF
9795
9796 fi
9797                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
9798 echo "configure:9799: checking for working fnmatch" >&5
9799 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   # Some versions of Solaris or SCO have a broken fnmatch function.
9803 # So we run a test program.  If we are cross-compiling, take no chance.
9804 # Thanks to John Oleynick and Franc,ois Pinard for this test.
9805 if test "$cross_compiling" = yes; then
9806   ac_cv_func_fnmatch_works=no
9807 else
9808   cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9814 then
9815   ac_cv_func_fnmatch_works=yes
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819   rm -fr conftest*
9820   ac_cv_func_fnmatch_works=no
9821 fi
9822 rm -fr conftest*
9823 fi
9824
9825 fi
9826
9827 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
9828 if test $ac_cv_func_fnmatch_works = yes; then
9829   cat >> confdefs.h <<\EOF
9830 #define HAVE_FNMATCH 1
9831 EOF
9832
9833 fi
9834
9835
9836
9837 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
9838 echo "configure:9839: checking for setlocale in -lxpg4" >&5
9839 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
9840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9841   echo $ac_n "(cached) $ac_c" 1>&6
9842 else
9843   ac_save_LIBS="$LIBS"
9844 LIBS="-lxpg4  $LIBS"
9845 cat > conftest.$ac_ext <<EOF
9846 #line 9847 "configure"
9847 #include "confdefs.h"
9848 /* Override any gcc2 internal prototype to avoid an error.  */
9849 /* We use char because int might match the return type of a gcc2
9850     builtin and then its argument prototype would still apply.  */
9851 char setlocale();
9852
9853 int main() {
9854 setlocale()
9855 ; return 0; }
9856 EOF
9857 if { (eval echo configure:9858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9858   rm -rf conftest*
9859   eval "ac_cv_lib_$ac_lib_var=yes"
9860 else
9861   echo "configure: failed program was:" >&5
9862   cat conftest.$ac_ext >&5
9863   rm -rf conftest*
9864   eval "ac_cv_lib_$ac_lib_var=no"
9865 fi
9866 rm -f conftest*
9867 LIBS="$ac_save_LIBS"
9868
9869 fi
9870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9871   echo "$ac_t""yes" 1>&6
9872   LIBS="$LIBS -lxpg4"
9873 else
9874   echo "$ac_t""no" 1>&6
9875 fi
9876
9877
9878
9879 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
9880 echo "configure:9881: checking for getpwnam in -lsun" >&5
9881 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
9882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   ac_save_LIBS="$LIBS"
9886 LIBS="-lsun  $LIBS"
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char getpwnam();
9894
9895 int main() {
9896 getpwnam()
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   eval "ac_cv_lib_$ac_lib_var=yes"
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   eval "ac_cv_lib_$ac_lib_var=no"
9907 fi
9908 rm -f conftest*
9909 LIBS="$ac_save_LIBS"
9910
9911 fi
9912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9913   echo "$ac_t""yes" 1>&6
9914     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9915     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9916   cat >> confdefs.h <<EOF
9917 #define $ac_tr_lib 1
9918 EOF
9919
9920   LIBS="-lsun $LIBS"
9921
9922 else
9923   echo "$ac_t""no" 1>&6
9924 fi
9925
9926
9927 for ac_hdr in zlib.h
9928 do
9929 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9930 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9931 echo "configure:9932: checking for $ac_hdr" >&5
9932 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9933   echo $ac_n "(cached) $ac_c" 1>&6
9934 else
9935   cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 #include <$ac_hdr>
9939 EOF
9940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9941 { (eval echo configure:9942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9943 if test -z "$ac_err"; then
9944   rm -rf conftest*
9945   eval "ac_cv_header_$ac_safe=yes"
9946 else
9947   echo "$ac_err" >&5
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -rf conftest*
9951   eval "ac_cv_header_$ac_safe=no"
9952 fi
9953 rm -f conftest*
9954 fi
9955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9956   echo "$ac_t""yes" 1>&6
9957     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9958   cat >> confdefs.h <<EOF
9959 #define $ac_tr_hdr 1
9960 EOF
9961  
9962 else
9963   echo "$ac_t""no" 1>&6
9964 fi
9965 done
9966
9967 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
9968 echo "configure:9969: checking for deflate in -lz" >&5
9969 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
9970 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   ac_save_LIBS="$LIBS"
9974 LIBS="-lz  $LIBS"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char deflate();
9982
9983 int main() {
9984 deflate()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_lib_$ac_lib_var=no"
9995 fi
9996 rm -f conftest*
9997 LIBS="$ac_save_LIBS"
9998
9999 fi
10000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002   FDLIBS="-lz"
10003 else
10004   echo "$ac_t""no" 1>&6
10005 fi
10006
10007 have_zlib=no
10008 if test x$FDLIBS = x-lz; then
10009   cat >> confdefs.h <<\EOF
10010 #define HAVE_LIBZ 1
10011 EOF
10012
10013   have_zlib=yes
10014 fi
10015
10016 ac_safe=`echo "sys/acl.h" | sed 'y%./+-%__p_%'`
10017 echo $ac_n "checking for sys/acl.h""... $ac_c" 1>&6
10018 echo "configure:10019: checking for sys/acl.h" >&5
10019 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 #include <sys/acl.h>
10026 EOF
10027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10028 { (eval echo configure:10029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10030 if test -z "$ac_err"; then
10031   rm -rf conftest*
10032   eval "ac_cv_header_$ac_safe=yes"
10033 else
10034   echo "$ac_err" >&5
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_header_$ac_safe=no"
10039 fi
10040 rm -f conftest*
10041 fi
10042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044   :
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048
10049 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
10050 echo "configure:10051: checking for acl_get_file in -lacl" >&5
10051 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
10052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   ac_save_LIBS="$LIBS"
10056 LIBS="-lacl  $LIBS"
10057 cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 /* We use char because int might match the return type of a gcc2
10062     builtin and then its argument prototype would still apply.  */
10063 char acl_get_file();
10064
10065 int main() {
10066 acl_get_file()
10067 ; return 0; }
10068 EOF
10069 if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10070   rm -rf conftest*
10071   eval "ac_cv_lib_$ac_lib_var=yes"
10072 else
10073   echo "configure: failed program was:" >&5
10074   cat conftest.$ac_ext >&5
10075   rm -rf conftest*
10076   eval "ac_cv_lib_$ac_lib_var=no"
10077 fi
10078 rm -f conftest*
10079 LIBS="$ac_save_LIBS"
10080
10081 fi
10082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10083   echo "$ac_t""yes" 1>&6
10084   FDLIBS="-lacl $FDLIBS"
10085 else
10086   echo "$ac_t""no" 1>&6
10087 fi
10088
10089 have_acl=no
10090 if test $ac_cv_lib_acl_acl_get_file = yes; then
10091    cat >> confdefs.h <<\EOF
10092 #define HAVE_ACL 1
10093 EOF
10094
10095    have_acl=yes
10096 fi
10097
10098 PTHREAD_LIB=""
10099 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
10100 echo "configure:10101: checking for pthread_create in -lpthread" >&5
10101 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
10102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10103   echo $ac_n "(cached) $ac_c" 1>&6
10104 else
10105   ac_save_LIBS="$LIBS"
10106 LIBS="-lpthread  $LIBS"
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 /* Override any gcc2 internal prototype to avoid an error.  */
10111 /* We use char because int might match the return type of a gcc2
10112     builtin and then its argument prototype would still apply.  */
10113 char pthread_create();
10114
10115 int main() {
10116 pthread_create()
10117 ; return 0; }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10120   rm -rf conftest*
10121   eval "ac_cv_lib_$ac_lib_var=yes"
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=no"
10127 fi
10128 rm -f conftest*
10129 LIBS="$ac_save_LIBS"
10130
10131 fi
10132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10133   echo "$ac_t""yes" 1>&6
10134   PTHREAD_LIB="-lpthread"
10135 else
10136   echo "$ac_t""no" 1>&6
10137 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
10138 echo "configure:10139: checking for pthread_create in -lpthreads" >&5
10139 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
10140 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   ac_save_LIBS="$LIBS"
10144 LIBS="-lpthreads  $LIBS"
10145 cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 /* Override any gcc2 internal prototype to avoid an error.  */
10149 /* We use char because int might match the return type of a gcc2
10150     builtin and then its argument prototype would still apply.  */
10151 char pthread_create();
10152
10153 int main() {
10154 pthread_create()
10155 ; return 0; }
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10158   rm -rf conftest*
10159   eval "ac_cv_lib_$ac_lib_var=yes"
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -rf conftest*
10164   eval "ac_cv_lib_$ac_lib_var=no"
10165 fi
10166 rm -f conftest*
10167 LIBS="$ac_save_LIBS"
10168
10169 fi
10170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10171   echo "$ac_t""yes" 1>&6
10172   PTHREAD_LIB="-lpthreads"
10173 else
10174   echo "$ac_t""no" 1>&6
10175 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
10176 echo "configure:10177: checking for pthread_create in -lc_r" >&5
10177 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
10178 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10179   echo $ac_n "(cached) $ac_c" 1>&6
10180 else
10181   ac_save_LIBS="$LIBS"
10182 LIBS="-lc_r  $LIBS"
10183 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 /* Override any gcc2 internal prototype to avoid an error.  */
10187 /* We use char because int might match the return type of a gcc2
10188     builtin and then its argument prototype would still apply.  */
10189 char pthread_create();
10190
10191 int main() {
10192 pthread_create()
10193 ; return 0; }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10196   rm -rf conftest*
10197   eval "ac_cv_lib_$ac_lib_var=yes"
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -rf conftest*
10202   eval "ac_cv_lib_$ac_lib_var=no"
10203 fi
10204 rm -f conftest*
10205 LIBS="$ac_save_LIBS"
10206
10207 fi
10208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10209   echo "$ac_t""yes" 1>&6
10210   PTHREAD_LIB="-lc_r"
10211 else
10212   echo "$ac_t""no" 1>&6
10213 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
10214 echo "configure:10215: checking for pthread_create" >&5
10215 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 /* System header to define __stub macros and hopefully few prototypes,
10222     which can conflict with char pthread_create(); below.  */
10223 #include <assert.h>
10224 /* Override any gcc2 internal prototype to avoid an error.  */
10225 /* We use char because int might match the return type of a gcc2
10226     builtin and then its argument prototype would still apply.  */
10227 char pthread_create();
10228
10229 int main() {
10230
10231 /* The GNU C library defines this for functions which it implements
10232     to always fail with ENOSYS.  Some functions are actually named
10233     something starting with __ and the normal name is an alias.  */
10234 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
10235 choke me
10236 #else
10237 pthread_create();
10238 #endif
10239
10240 ; return 0; }
10241 EOF
10242 if { (eval echo configure:10243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10243   rm -rf conftest*
10244   eval "ac_cv_func_pthread_create=yes"
10245 else
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   eval "ac_cv_func_pthread_create=no"
10250 fi
10251 rm -f conftest*
10252 fi
10253
10254 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
10255   echo "$ac_t""yes" 1>&6
10256   :
10257 else
10258   echo "$ac_t""no" 1>&6
10259 fi
10260
10261             
10262 fi
10263
10264         
10265 fi
10266
10267
10268 fi
10269
10270
10271
10272 cat >> confdefs.h <<\EOF
10273 #define FDLIBS 1
10274 EOF
10275
10276
10277
10278 CFLAGS=${CFLAGS--O}
10279 LDFLAGS=${LDFLAGS--O}
10280 DB_LIBS="${SQL_LFLAGS}"
10281
10282 CPPFLAGS="$CPPFLAGS"
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297 OBJLIST=
10298
10299
10300 lld="lld"
10301 llu="llu"
10302
10303 WCFLAGS=
10304 WLDFLAGS=
10305
10306 #
10307 # Finally we set appropriate distribution specific
10308 #  variables and defaults
10309 #
10310 # PFILES are platform specific files
10311 PFILES="platforms/Makefile"
10312 PSCMD="ps -e"
10313 WIN32=
10314 MACOSX=
10315 hostname=`uname -n | cut -d '.' -f 1`
10316 case "$DISTNAME" in
10317 aix)
10318         DISTVER=`uname -r`
10319         PSCMD="ps -e -o pid,comm"
10320         PFILES="${PFILES} \
10321            platforms/aix/Makefile"
10322         TAPEDRIVE="/dev/rmt0.1" 
10323   ;;      
10324 alpha)
10325         DISTVER=`uname -r`
10326         PTHREAD_LIB="-lpthread -lexc"
10327         if test "${CC}" = "gcc" ; then
10328            lld="lld"
10329            llu="llu"
10330         else
10331            lld="ld"
10332            llu="lu"
10333         fi
10334         TAPEDRIVE="/dev/nrmt0"
10335   ;;
10336 bsdi)
10337         DISTVER=`uname -a |awk '{print $3}'`
10338         TAPEDRIVE="/dev/nrmt0"
10339         PTHREAD_LIB="-pthread"
10340         CFLAGS="${CFLAGS} -pthread"
10341         PSCMD="ps -x -o pid,command"
10342         lld="qd"
10343         llu="qu"
10344         PFILES="${PFILES} \
10345             platforms/bsdi/Makefile \
10346             platforms/bsdi/bacula-fd \
10347             platforms/bsdi/bacula-sd \
10348             platforms/bsdi/bacula-dir"
10349         largefile_support="yes"
10350   ;;
10351 cygwin)
10352         DISTVER=`uname -a |awk '{print $3}'`
10353         TAPEDRIVE="/dev/nrst0"
10354         WIN32=win32
10355         WCFLAGS="-mwindows"
10356         WLDFLAGS="-mwindows"
10357   ;;
10358 darwin)
10359         DISTVER=`uname -r`
10360         TAPEDRIVE="/dev/nst0"
10361         PSCMD="ps -e -o pid,command"
10362         MACOSX=macosx
10363         PFILES="${PFILES} \
10364            platforms/darwin/Makefile"
10365   ;;
10366 debian)
10367         DISTVER=`cat /etc/debian_version`
10368         TAPEDRIVE="/dev/nrst0"
10369         PSCMD="ps -e -o pid,command"
10370   ;;
10371 freebsd)
10372         DISTVER=`uname -a |awk '{print $3}'`
10373         VER=`echo $DISTVER | cut -c 1`
10374         if test x$VER = x4 ; then
10375            PTHREAD_LIB="-pthread"
10376            CFLAGS="${CFLAGS} -pthread"
10377         fi
10378         lld="qd"
10379         llu="qu"
10380         TAPEDRIVE="/dev/nrsa0"
10381         PSCMD="ps -x -o pid,command"
10382         PFILES="${PFILES} \
10383             platforms/freebsd/Makefile \
10384             platforms/freebsd/bacula-fd \
10385             platforms/freebsd/bacula-sd \
10386             platforms/freebsd/bacula-dir"
10387         largefile_support="yes"
10388   ;;
10389 hpux)
10390         PSCMD="UNIX95=1 ps -e -o pid,comm"
10391         CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
10392         DISTVER=`uname -r`
10393         TAPEDRIVE="/dev/rmt/0hnb"
10394   ;;
10395 irix)
10396         DISTVER=`uname -r`
10397         TAPEDRIVE="/dev/rmt/0cbn"
10398         PSCMD="ps -e -o pid,comm"
10399         PFILES="${PFILES} \
10400             platforms/irix/Makefile \
10401             platforms/irix/bacula-fd \
10402             platforms/irix/bacula-sd \
10403             platforms/irix/bacula-dir"
10404   ;;
10405 netbsd)
10406         DISTVER=`uname -a |awk '{print $3}'`
10407         lld="qd"
10408         llu="qu"
10409         TAPEDRIVE="/dev/nrst0"
10410         PSCMD="ps -a -o pid,command"
10411         PTHREAD_LIB="-pthread"
10412         CFLAGS="${CFLAGS} -pthread"
10413   ;;
10414 openbsd)
10415         DISTVER=`uname -a |awk '{print $3}'`
10416         lld="qd"
10417         llu="qu"
10418         TAPEDRIVE="/dev/nrst0"
10419         PSCMD="ps -a -o pid,command"
10420         PTHREAD_LIB="-pthread"
10421         CFLAGS="${CFLAGS} -pthread"
10422         PFILES="${PFILES} \
10423             platforms/openbsd/Makefile \
10424             platforms/openbsd/bacula-fd \
10425             platforms/openbsd/bacula-sd \
10426             platforms/openbsd/bacula-dir"
10427   ;;
10428 redhat)
10429         if test -f /etc/whitebox-release ; then
10430            f=/etc/whitebox-release
10431         else
10432            f=/etc/redhat-release
10433         fi
10434         if test `cat $f | grep release |\
10435                    cut -f 3 -d ' '`x = "Enterprise"x ; then
10436            DISTVER="Enterprise "`cat $f | grep release |\
10437                     cut -f 6 -d ' '`
10438         else
10439             DISTVER=`cat /etc/redhat-release | grep release |\
10440                      cut -f 5 -d ' '`
10441         fi
10442         TAPEDRIVE="/dev/nst0"
10443         PSCMD="ps -e -o pid,command"
10444         PFILES="${PFILES} \
10445             platforms/redhat/Makefile \
10446             platforms/redhat/bacula-fd \
10447             platforms/redhat/bacula-sd \
10448             platforms/redhat/bacula-dir \
10449             platforms/redhat/bacula.spec \
10450             "
10451         hostname=`hostname -s`
10452   ;;
10453 mandrake)
10454         DISTVER=`cat /etc/mandrake-release | grep release |\
10455            cut -f 5 -d ' '`
10456         TAPEDRIVE="/dev/nst0"
10457         PSCMD="ps -e -o pid,command"
10458         PFILES="${PFILES} \
10459             platforms/mandrake/Makefile \
10460             platforms/mandrake/bacula-fd \
10461             platforms/mandrake/bacula-sd \
10462             platforms/mandrake/bacula-dir \
10463             platforms/mandrake/bacula.spec \
10464             "
10465   ;;
10466 gentoo)
10467         DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
10468         TAPEDRIVE="/dev/nst0"
10469         PSCMD="ps -e -o pid,command"
10470         PFILES="${PFILES} \
10471             platforms/gentoo/Makefile \
10472             platforms/gentoo/bacula-fd \
10473             platforms/gentoo/bacula-sd \
10474             platforms/gentoo/bacula-dir"
10475   ;;
10476 slackware)
10477         DISTVER=`cat /etc/slackware-version`
10478         TAPEDRIVE="/dev/nst0"
10479         PSCMD="ps -e -o pid,command"
10480         PFILES="${PFILES} \
10481             platforms/slackware/Makefile \
10482             platforms/slackware/rc.bacula-fd \
10483             platforms/slackware/rc.bacula-sd \
10484             platforms/slackware/rc.bacula-dir\
10485             platforms/slackware/functions.bacula"
10486   ;;
10487 solaris)
10488         DISTVER=`uname -r`
10489         TAPEDRIVE="/dev/rmt/0cbn"
10490         PSCMD="ps -e -o pid,comm"
10491         PFILES="${PFILES} \
10492             platforms/solaris/Makefile \
10493             platforms/solaris/bacula-fd \
10494             platforms/solaris/bacula-sd \
10495             platforms/solaris/bacula-dir"
10496         if test x$DISTVER = x5.6 ; then
10497             cat >> confdefs.h <<\EOF
10498 #define HAVE_OLD_SOCKOPT 1
10499 EOF
10500
10501         fi
10502   ;;
10503 suse)
10504         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
10505             cut -f 3 -d ' '`
10506         TAPEDRIVE="/dev/nst0"
10507         PSCMD="ps -e -o pid,command"
10508         PFILES="${PFILES} \
10509             platforms/suse/Makefile \
10510             platforms/suse/bacula-fd \
10511             platforms/suse/bacula-sd \
10512             platforms/suse/bacula-dir \
10513             platforms/suse/bacula \
10514             platforms/suse/bacula.spec"
10515   ;;
10516 suse5)
10517         DISTNAME=suse
10518         DISTVER=5.x
10519         TAPEDRIVE="/dev/nst0"
10520         PSCMD="ps -e -o pid,command"
10521         PFILES="${PFILES} \
10522             platforms/suse/Makefile \
10523             platforms/suse/bacula-fd \
10524             platforms/suse/bacula-sd \
10525             platforms/suse/bacula-dir"
10526   ;;
10527 unknown)
10528         DISTVER=unknown
10529         TAPEDRIVE="/dev/nst0"
10530   ;;
10531 *)
10532   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
10533   ;;
10534 esac  
10535
10536
10537
10538 LIBS="$PTHREAD_LIB $LIBS"
10539
10540 cat >> confdefs.h <<EOF
10541 #define lld "$lld"
10542 EOF
10543
10544 cat >> confdefs.h <<EOF
10545 #define llu "$llu"
10546 EOF
10547
10548
10549
10550
10551
10552
10553
10554
10555 MCOMMON=./autoconf/Make.common
10556
10557
10558 if test "x${subsysdir}" = "x${sbindir}" ; then
10559    echo " "
10560    echo " "
10561    echo "You have set both --sbindir and --with-subsys-dir"
10562    echo "  equal to: ${subsysdir} "
10563    echo "This is not permitted. Please reconfigure."
10564    echo " "
10565    echo "Aborting configuration ..."
10566    echo " "
10567    echo " "
10568    exit 1
10569 fi 
10570
10571 trap '' 1 2 15
10572 cat > confcache <<\EOF
10573 # This file is a shell script that caches the results of configure
10574 # tests run on this system so they can be shared between configure
10575 # scripts and configure runs.  It is not useful on other systems.
10576 # If it contains results you don't want to keep, you may remove or edit it.
10577 #
10578 # By default, configure uses ./config.cache as the cache file,
10579 # creating it if it does not exist already.  You can give configure
10580 # the --cache-file=FILE option to use a different cache file; that is
10581 # what configure does when it calls configure scripts in
10582 # subdirectories, so they share the cache.
10583 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10584 # config.status only pays attention to the cache file if you give it the
10585 # --recheck option to rerun configure.
10586 #
10587 EOF
10588 # The following way of writing the cache mishandles newlines in values,
10589 # but we know of no workaround that is simple, portable, and efficient.
10590 # So, don't put newlines in cache variables' values.
10591 # Ultrix sh set writes to stderr and can't be redirected directly,
10592 # and sets the high bit in the cache file unless we assign to the vars.
10593 (set) 2>&1 |
10594   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10595   *ac_space=\ *)
10596     # `set' does not quote correctly, so add quotes (double-quote substitution
10597     # turns \\\\ into \\, and sed turns \\ into \).
10598     sed -n \
10599       -e "s/'/'\\\\''/g" \
10600       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10601     ;;
10602   *)
10603     # `set' quotes correctly as required by POSIX, so do not add quotes.
10604     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10605     ;;
10606   esac >> confcache
10607 if cmp -s $cache_file confcache; then
10608   :
10609 else
10610   if test -w $cache_file; then
10611     echo "updating cache $cache_file"
10612     cat confcache > $cache_file
10613   else
10614     echo "not updating unwritable cache $cache_file"
10615   fi
10616 fi
10617 rm -f confcache
10618
10619 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10620
10621 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10622 # Let make expand exec_prefix.
10623 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10624
10625 # Any assignment to VPATH causes Sun make to only execute
10626 # the first set of double-colon rules, so remove it if not needed.
10627 # If there is a colon in the path, we need to keep it.
10628 if test "x$srcdir" = x.; then
10629   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10630 fi
10631
10632 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10633
10634 DEFS=-DHAVE_CONFIG_H
10635
10636 # Without the "./", some shells look in PATH for config.status.
10637 : ${CONFIG_STATUS=./config.status}
10638
10639 echo creating $CONFIG_STATUS
10640 rm -f $CONFIG_STATUS
10641 cat > $CONFIG_STATUS <<EOF
10642 #! /bin/sh
10643 # Generated automatically by configure.
10644 # Run this file to recreate the current configuration.
10645 # This directory was configured as follows,
10646 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10647 #
10648 # $0 $ac_configure_args
10649 #
10650 # Compiler output produced by configure, useful for debugging
10651 # configure, is in ./config.log if it exists.
10652
10653 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10654 for ac_option
10655 do
10656   case "\$ac_option" in
10657   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10658     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10659     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10660   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10661     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10662     exit 0 ;;
10663   -help | --help | --hel | --he | --h)
10664     echo "\$ac_cs_usage"; exit 0 ;;
10665   *) echo "\$ac_cs_usage"; exit 1 ;;
10666   esac
10667 done
10668
10669 ac_given_srcdir=$srcdir
10670 ac_given_INSTALL="$INSTALL"
10671
10672 trap 'rm -fr `echo "autoconf/Make.common \
10673            Makefile \
10674            rescue/Makefile \
10675            rescue/linux/Makefile \
10676            rescue/freebsd/Makefile \
10677            rescue/solaris/Makefile \
10678            scripts/startmysql \
10679            scripts/stopmysql \
10680            scripts/btraceback \
10681            scripts/startit \
10682            scripts/stopit \
10683            scripts/bconsole \
10684            scripts/gconsole \
10685            scripts/bacula \
10686            scripts/devel_bacula \
10687            scripts/Makefile \
10688            scripts/logrotate \
10689            scripts/bacula.desktop.gnome1 \
10690            scripts/bacula.desktop.gnome2 \
10691            scripts/bacula.desktop.gnome1.consolehelper \
10692            scripts/bacula.desktop.gnome2.consolehelper \
10693            scripts/bacula.desktop.gnome1.xsu \
10694            scripts/bacula.desktop.gnome2.xsu \
10695            scripts/gnome-console.console_apps \
10696            scripts/mtx-changer \
10697            doc/Makefile \
10698            src/Makefile \
10699            src/host.h \
10700            src/console/Makefile \
10701            src/console/bconsole.conf \
10702            src/gnome-console/Makefile \
10703            src/gnome-console/gnome-console.conf \
10704            src/gnome2-console/Makefile \
10705            src/gnome2-console/gnome-console.conf \
10706            src/wx-console/Makefile \
10707            src/wx-console/wx-console.conf \
10708            src/tray-monitor/Makefile \
10709            src/tray-monitor/tray-monitor.conf \
10710            src/dird/Makefile \
10711            src/dird/bacula-dir.conf \
10712            src/lib/Makefile \
10713            src/stored/Makefile \
10714            src/stored/bacula-sd.conf \
10715            src/filed/Makefile \
10716            src/filed/bacula-fd.conf \
10717            src/filed/win32/Makefile \
10718            src/cats/Makefile \
10719            src/cats/make_catalog_backup \
10720            src/cats/delete_catalog_backup \
10721            src/cats/create_postgresql_database \
10722            src/cats/update_postgresql_tables \
10723            src/cats/make_postgresql_tables \
10724            src/cats/grant_postgresql_privileges \
10725            src/cats/drop_postgresql_tables \
10726            src/cats/drop_postgresql_database \
10727            src/cats/create_mysql_database \
10728            src/cats/update_mysql_tables \
10729            src/cats/make_mysql_tables \
10730            src/cats/grant_mysql_privileges \
10731            src/cats/drop_mysql_tables \
10732            src/cats/drop_mysql_database \
10733            src/cats/create_sqlite_database \
10734            src/cats/update_sqlite_tables \
10735            src/cats/make_sqlite_tables \
10736            src/cats/grant_sqlite_privileges \
10737            src/cats/drop_sqlite_tables \
10738            src/cats/drop_sqlite_database \
10739            src/cats/sqlite \
10740            src/cats/mysql \
10741            src/cats/create_bdb_database \
10742            src/cats/update_bdb_tables \
10743            src/cats/make_bdb_tables \
10744            src/cats/grant_bdb_privileges \
10745            src/cats/drop_bdb_tables \
10746            src/cats/drop_bdb_database \
10747            src/cats/create_bacula_database \
10748            src/cats/update_bacula_tables \
10749            src/cats/grant_bacula_privileges \
10750            src/cats/make_bacula_tables \
10751            src/cats/drop_bacula_tables \
10752            src/cats/drop_bacula_database \
10753            src/findlib/Makefile \
10754            src/tools/Makefile \
10755            src/win32/winbacula.nsi \
10756            src/win32/baculafd/bacula-fd.conf \
10757            src/win32/Makefile \
10758            src/win32/console/bconsole.conf \
10759            src/win32/wx-console/wx-console.conf \
10760            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10761 EOF
10762 cat >> $CONFIG_STATUS <<EOF
10763
10764 # Protect against being on the right side of a sed subst in config.status.
10765 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10766  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10767 $ac_vpsub
10768 $extrasub
10769 s%@SHELL@%$SHELL%g
10770 s%@CFLAGS@%$CFLAGS%g
10771 s%@CPPFLAGS@%$CPPFLAGS%g
10772 s%@CXXFLAGS@%$CXXFLAGS%g
10773 s%@FFLAGS@%$FFLAGS%g
10774 s%@DEFS@%$DEFS%g
10775 s%@LDFLAGS@%$LDFLAGS%g
10776 s%@LIBS@%$LIBS%g
10777 s%@exec_prefix@%$exec_prefix%g
10778 s%@prefix@%$prefix%g
10779 s%@program_transform_name@%$program_transform_name%g
10780 s%@bindir@%$bindir%g
10781 s%@sbindir@%$sbindir%g
10782 s%@libexecdir@%$libexecdir%g
10783 s%@datadir@%$datadir%g
10784 s%@sysconfdir@%$sysconfdir%g
10785 s%@sharedstatedir@%$sharedstatedir%g
10786 s%@localstatedir@%$localstatedir%g
10787 s%@libdir@%$libdir%g
10788 s%@includedir@%$includedir%g
10789 s%@oldincludedir@%$oldincludedir%g
10790 s%@infodir@%$infodir%g
10791 s%@mandir@%$mandir%g
10792 s%@BUILD_DIR@%$BUILD_DIR%g
10793 s%@TRUEPRG@%$TRUEPRG%g
10794 s%@FALSEPRG@%$FALSEPRG%g
10795 s%@VERSION@%$VERSION%g
10796 s%@DATE@%$DATE%g
10797 s%@LSMDATE@%$LSMDATE%g
10798 s%@CC@%$CC%g
10799 s%@CXX@%$CXX%g
10800 s%@CPP@%$CPP%g
10801 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10802 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10803 s%@INSTALL_DATA@%$INSTALL_DATA%g
10804 s%@RANLIB@%$RANLIB%g
10805 s%@MV@%$MV%g
10806 s%@RM@%$RM%g
10807 s%@CP@%$CP%g
10808 s%@SED@%$SED%g
10809 s%@AWK@%$AWK%g
10810 s%@ECHO@%$ECHO%g
10811 s%@CMP@%$CMP%g
10812 s%@TBL@%$TBL%g
10813 s%@AR@%$AR%g
10814 s%@OPENSSL@%$OPENSSL%g
10815 s%@MTX@%$MTX%g
10816 s%@PKGCONFIG@%$PKGCONFIG%g
10817 s%@WXCONFIG@%$WXCONFIG%g
10818 s%@ARFLAGS@%$ARFLAGS%g
10819 s%@MAKE_SHELL@%$MAKE_SHELL%g
10820 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
10821 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
10822 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
10823 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
10824 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
10825 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
10826 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
10827 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
10828 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
10829 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
10830 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
10831 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
10832 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
10833 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
10834 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
10835 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
10836 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
10837 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
10838 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
10839 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
10840 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
10841 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
10842 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
10843 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
10844 s%@HAVE_IRIX_OS_TRUE@%$HAVE_IRIX_OS_TRUE%g
10845 s%@HAVE_IRIX_OS_FALSE@%$HAVE_IRIX_OS_FALSE%g
10846 s%@HAVE_DARWIN_OS_TRUE@%$HAVE_DARWIN_OS_TRUE%g
10847 s%@HAVE_DARWIN_OS_FALSE@%$HAVE_DARWIN_OS_FALSE%g
10848 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
10849 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
10850 s%@MSGFMT@%$MSGFMT%g
10851 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
10852 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
10853 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
10854 s%@GNOME_LIBS@%$GNOME_LIBS%g
10855 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
10856 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
10857 s%@ZVT_LIBS@%$ZVT_LIBS%g
10858 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
10859 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
10860 s%@ORBIT_IDL@%$ORBIT_IDL%g
10861 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
10862 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
10863 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
10864 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
10865 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
10866 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
10867 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
10868 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
10869 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
10870 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
10871 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
10872 s%@GNOME_DIR@%$GNOME_DIR%g
10873 s%@WXCONS_CPPFLAGS@%$WXCONS_CPPFLAGS%g
10874 s%@WXCONS_LDFLAGS@%$WXCONS_LDFLAGS%g
10875 s%@WX_DIR@%$WX_DIR%g
10876 s%@TRAY_MONITOR_DIR@%$TRAY_MONITOR_DIR%g
10877 s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
10878 s%@STATIC_FD@%$STATIC_FD%g
10879 s%@STATIC_SD@%$STATIC_SD%g
10880 s%@STATIC_DIR@%$STATIC_DIR%g
10881 s%@STATIC_CONS@%$STATIC_CONS%g
10882 s%@STATIC_GNOME_CONS@%$STATIC_GNOME_CONS%g
10883 s%@STATIC_WX_CONS@%$STATIC_WX_CONS%g
10884 s%@ALL_DIRS@%$ALL_DIRS%g
10885 s%@CONS_INC@%$CONS_INC%g
10886 s%@CONS_OBJ@%$CONS_OBJ%g
10887 s%@CONS_SRC@%$CONS_SRC%g
10888 s%@CONS_LIBS@%$CONS_LIBS%g
10889 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
10890 s%@READLINE_SRC@%$READLINE_SRC%g
10891 s%@working_dir@%$working_dir%g
10892 s%@scriptdir@%$scriptdir%g
10893 s%@dump_email@%$dump_email%g
10894 s%@job_email@%$job_email%g
10895 s%@smtp_host@%$smtp_host%g
10896 s%@piddir@%$piddir%g
10897 s%@subsysdir@%$subsysdir%g
10898 s%@baseport@%$baseport%g
10899 s%@dir_port@%$dir_port%g
10900 s%@fd_port@%$fd_port%g
10901 s%@sd_port@%$sd_port%g
10902 s%@dir_password@%$dir_password%g
10903 s%@fd_password@%$fd_password%g
10904 s%@sd_password@%$sd_password%g
10905 s%@dir_user@%$dir_user%g
10906 s%@dir_group@%$dir_group%g
10907 s%@sd_user@%$sd_user%g
10908 s%@sd_group@%$sd_group%g
10909 s%@fd_user@%$fd_user%g
10910 s%@fd_group@%$fd_group%g
10911 s%@SBINPERM@%$SBINPERM%g
10912 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
10913 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
10914 s%@SQL_BINDIR@%$SQL_BINDIR%g
10915 s%@cats@%$cats%g
10916 s%@DB_NAME@%$DB_NAME%g
10917 s%@EXEEXT@%$EXEEXT%g
10918 s%@host@%$host%g
10919 s%@host_alias@%$host_alias%g
10920 s%@host_cpu@%$host_cpu%g
10921 s%@host_vendor@%$host_vendor%g
10922 s%@host_os@%$host_os%g
10923 s%@build@%$build%g
10924 s%@build_alias@%$build_alias%g
10925 s%@build_cpu@%$build_cpu%g
10926 s%@build_vendor@%$build_vendor%g
10927 s%@build_os@%$build_os%g
10928 s%@GETCONF@%$GETCONF%g
10929 s%@X_CFLAGS@%$X_CFLAGS%g
10930 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10931 s%@X_LIBS@%$X_LIBS%g
10932 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10933 s%@LIBOBJS@%$LIBOBJS%g
10934 s%@ALLOCA@%$ALLOCA%g
10935 s%@FDLIBS@%$FDLIBS%g
10936 s%@DEBUG@%$DEBUG%g
10937 s%@DINCLUDE@%$DINCLUDE%g
10938 s%@DLIB@%$DLIB%g
10939 s%@DB_LIBS@%$DB_LIBS%g
10940 s%@WCFLAGS@%$WCFLAGS%g
10941 s%@WLDFLAGS@%$WLDFLAGS%g
10942 s%@OBJLIST@%$OBJLIST%g
10943 s%@hostname@%$hostname%g
10944 s%@TAPEDRIVE@%$TAPEDRIVE%g
10945 s%@PSCMD@%$PSCMD%g
10946 s%@WIN32@%$WIN32%g
10947 s%@MACOSX@%$MACOSX%g
10948 s%@DISTNAME@%$DISTNAME%g
10949 s%@DISTVER@%$DISTVER%g
10950 /@MCOMMON@/r $MCOMMON
10951 s%@MCOMMON@%%g
10952
10953 CEOF
10954 EOF
10955
10956 cat >> $CONFIG_STATUS <<\EOF
10957
10958 # Split the substitutions into bite-sized pieces for seds with
10959 # small command number limits, like on Digital OSF/1 and HP-UX.
10960 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10961 ac_file=1 # Number of current file.
10962 ac_beg=1 # First line for current file.
10963 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10964 ac_more_lines=:
10965 ac_sed_cmds=""
10966 while $ac_more_lines; do
10967   if test $ac_beg -gt 1; then
10968     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10969   else
10970     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10971   fi
10972   if test ! -s conftest.s$ac_file; then
10973     ac_more_lines=false
10974     rm -f conftest.s$ac_file
10975   else
10976     if test -z "$ac_sed_cmds"; then
10977       ac_sed_cmds="sed -f conftest.s$ac_file"
10978     else
10979       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10980     fi
10981     ac_file=`expr $ac_file + 1`
10982     ac_beg=$ac_end
10983     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10984   fi
10985 done
10986 if test -z "$ac_sed_cmds"; then
10987   ac_sed_cmds=cat
10988 fi
10989 EOF
10990
10991 cat >> $CONFIG_STATUS <<EOF
10992
10993 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
10994            Makefile \
10995            rescue/Makefile \
10996            rescue/linux/Makefile \
10997            rescue/freebsd/Makefile \
10998            rescue/solaris/Makefile \
10999            scripts/startmysql \
11000            scripts/stopmysql \
11001            scripts/btraceback \
11002            scripts/startit \
11003            scripts/stopit \
11004            scripts/bconsole \
11005            scripts/gconsole \
11006            scripts/bacula \
11007            scripts/devel_bacula \
11008            scripts/Makefile \
11009            scripts/logrotate \
11010            scripts/bacula.desktop.gnome1 \
11011            scripts/bacula.desktop.gnome2 \
11012            scripts/bacula.desktop.gnome1.consolehelper \
11013            scripts/bacula.desktop.gnome2.consolehelper \
11014            scripts/bacula.desktop.gnome1.xsu \
11015            scripts/bacula.desktop.gnome2.xsu \
11016            scripts/gnome-console.console_apps \
11017            scripts/mtx-changer \
11018            doc/Makefile \
11019            src/Makefile \
11020            src/host.h \
11021            src/console/Makefile \
11022            src/console/bconsole.conf \
11023            src/gnome-console/Makefile \
11024            src/gnome-console/gnome-console.conf \
11025            src/gnome2-console/Makefile \
11026            src/gnome2-console/gnome-console.conf \
11027            src/wx-console/Makefile \
11028            src/wx-console/wx-console.conf \
11029            src/tray-monitor/Makefile \
11030            src/tray-monitor/tray-monitor.conf \
11031            src/dird/Makefile \
11032            src/dird/bacula-dir.conf \
11033            src/lib/Makefile \
11034            src/stored/Makefile \
11035            src/stored/bacula-sd.conf \
11036            src/filed/Makefile \
11037            src/filed/bacula-fd.conf \
11038            src/filed/win32/Makefile \
11039            src/cats/Makefile \
11040            src/cats/make_catalog_backup \
11041            src/cats/delete_catalog_backup \
11042            src/cats/create_postgresql_database \
11043            src/cats/update_postgresql_tables \
11044            src/cats/make_postgresql_tables \
11045            src/cats/grant_postgresql_privileges \
11046            src/cats/drop_postgresql_tables \
11047            src/cats/drop_postgresql_database \
11048            src/cats/create_mysql_database \
11049            src/cats/update_mysql_tables \
11050            src/cats/make_mysql_tables \
11051            src/cats/grant_mysql_privileges \
11052            src/cats/drop_mysql_tables \
11053            src/cats/drop_mysql_database \
11054            src/cats/create_sqlite_database \
11055            src/cats/update_sqlite_tables \
11056            src/cats/make_sqlite_tables \
11057            src/cats/grant_sqlite_privileges \
11058            src/cats/drop_sqlite_tables \
11059            src/cats/drop_sqlite_database \
11060            src/cats/sqlite \
11061            src/cats/mysql \
11062            src/cats/create_bdb_database \
11063            src/cats/update_bdb_tables \
11064            src/cats/make_bdb_tables \
11065            src/cats/grant_bdb_privileges \
11066            src/cats/drop_bdb_tables \
11067            src/cats/drop_bdb_database \
11068            src/cats/create_bacula_database \
11069            src/cats/update_bacula_tables \
11070            src/cats/grant_bacula_privileges \
11071            src/cats/make_bacula_tables \
11072            src/cats/drop_bacula_tables \
11073            src/cats/drop_bacula_database \
11074            src/findlib/Makefile \
11075            src/tools/Makefile \
11076            src/win32/winbacula.nsi \
11077            src/win32/baculafd/bacula-fd.conf \
11078            src/win32/Makefile \
11079            src/win32/console/bconsole.conf \
11080            src/win32/wx-console/wx-console.conf \
11081            $PFILES "}
11082 EOF
11083 cat >> $CONFIG_STATUS <<\EOF
11084 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11085   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11086   case "$ac_file" in
11087   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11088        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11089   *) ac_file_in="${ac_file}.in" ;;
11090   esac
11091
11092   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11093
11094   # Remove last slash and all that follows it.  Not all systems have dirname.
11095   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11096   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11097     # The file is in a subdirectory.
11098     test ! -d "$ac_dir" && mkdir "$ac_dir"
11099     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11100     # A "../" for each directory in $ac_dir_suffix.
11101     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11102   else
11103     ac_dir_suffix= ac_dots=
11104   fi
11105
11106   case "$ac_given_srcdir" in
11107   .)  srcdir=.
11108       if test -z "$ac_dots"; then top_srcdir=.
11109       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11110   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11111   *) # Relative path.
11112     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11113     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11114   esac
11115
11116   case "$ac_given_INSTALL" in
11117   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11118   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11119   esac
11120
11121   echo creating "$ac_file"
11122   rm -f "$ac_file"
11123   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11124   case "$ac_file" in
11125   *Makefile*) ac_comsub="1i\\
11126 # $configure_input" ;;
11127   *) ac_comsub= ;;
11128   esac
11129
11130   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11131   sed -e "$ac_comsub
11132 s%@configure_input@%$configure_input%g
11133 s%@srcdir@%$srcdir%g
11134 s%@top_srcdir@%$top_srcdir%g
11135 s%@INSTALL@%$INSTALL%g
11136 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11137 fi; done
11138 rm -f conftest.s*
11139
11140 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11141 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11142 #
11143 # ac_d sets the value in "#define NAME VALUE" lines.
11144 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11145 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11146 ac_dC='\3'
11147 ac_dD='%g'
11148 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11149 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11150 ac_uB='\([      ]\)%\1#\2define\3'
11151 ac_uC=' '
11152 ac_uD='\4%g'
11153 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11154 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11155 ac_eB='$%\1#\2define\3'
11156 ac_eC=' '
11157 ac_eD='%g'
11158
11159 if test "${CONFIG_HEADERS+set}" != set; then
11160 EOF
11161 cat >> $CONFIG_STATUS <<EOF
11162   CONFIG_HEADERS="src/config.h:autoconf/config.h.in"
11163 EOF
11164 cat >> $CONFIG_STATUS <<\EOF
11165 fi
11166 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11167   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11168   case "$ac_file" in
11169   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11170        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11171   *) ac_file_in="${ac_file}.in" ;;
11172   esac
11173
11174   echo creating $ac_file
11175
11176   rm -f conftest.frag conftest.in conftest.out
11177   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11178   cat $ac_file_inputs > conftest.in
11179
11180 EOF
11181
11182 # Transform confdefs.h into a sed script conftest.vals that substitutes
11183 # the proper values into config.h.in to produce config.h.  And first:
11184 # Protect against being on the right side of a sed subst in config.status.
11185 # Protect against being in an unquoted here document in config.status.
11186 rm -f conftest.vals
11187 cat > conftest.hdr <<\EOF
11188 s/[\\&%]/\\&/g
11189 s%[\\$`]%\\&%g
11190 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11191 s%ac_d%ac_u%gp
11192 s%ac_u%ac_e%gp
11193 EOF
11194 sed -n -f conftest.hdr confdefs.h > conftest.vals
11195 rm -f conftest.hdr
11196
11197 # This sed command replaces #undef with comments.  This is necessary, for
11198 # example, in the case of _POSIX_SOURCE, which is predefined and required
11199 # on some systems where configure will not decide to define it.
11200 cat >> conftest.vals <<\EOF
11201 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11202 EOF
11203
11204 # Break up conftest.vals because some shells have a limit on
11205 # the size of here documents, and old seds have small limits too.
11206
11207 rm -f conftest.tail
11208 while :
11209 do
11210   ac_lines=`grep -c . conftest.vals`
11211   # grep -c gives empty output for an empty file on some AIX systems.
11212   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11213   # Write a limited-size here document to conftest.frag.
11214   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11215   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11216   echo 'CEOF
11217   sed -f conftest.frag conftest.in > conftest.out
11218   rm -f conftest.in
11219   mv conftest.out conftest.in
11220 ' >> $CONFIG_STATUS
11221   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11222   rm -f conftest.vals
11223   mv conftest.tail conftest.vals
11224 done
11225 rm -f conftest.vals
11226
11227 cat >> $CONFIG_STATUS <<\EOF
11228   rm -f conftest.frag conftest.h
11229   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11230   cat conftest.in >> conftest.h
11231   rm -f conftest.in
11232   if cmp -s $ac_file conftest.h 2>/dev/null; then
11233     echo "$ac_file is unchanged"
11234     rm -f conftest.h
11235   else
11236     # Remove last slash and all that follows it.  Not all systems have dirname.
11237       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11238       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11239       # The file is in a subdirectory.
11240       test ! -d "$ac_dir" && mkdir "$ac_dir"
11241     fi
11242     rm -f $ac_file
11243     mv conftest.h $ac_file
11244   fi
11245 fi; done
11246
11247 EOF
11248 cat >> $CONFIG_STATUS <<EOF
11249
11250 EOF
11251 cat >> $CONFIG_STATUS <<\EOF
11252 (echo "Doing make of dependencies"; ${MAKE:-make} depend;) 
11253
11254 exit 0
11255 EOF
11256 chmod +x $CONFIG_STATUS
11257 rm -fr confdefs* $ac_clean_files
11258 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11259
11260
11261 cd scripts
11262 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
11263 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
11264 cd ..
11265
11266 c=src/cats
11267
11268 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
11269 chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
11270
11271 chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
11272 chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
11273
11274 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
11275 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
11276
11277 chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
11278 chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
11279
11280 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
11281 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
11282
11283 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
11284 chmod 755 $c/sqlite
11285 chmod 755 $c/mysql
11286
11287 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
11288    largefile_support="yes"
11289 fi
11290
11291 #
11292 # A whole lot of hand springs to get the compiler version.
11293 #  This is because gcc changed the output in version 3.0
11294 #
11295 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
11296 if test "x${CCVERSION}" = "x" ; then
11297   CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
11298 fi
11299 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
11300 if test x"${CXXVERSION}" = x ; then
11301   CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
11302 fi
11303
11304 if test "x${subsysdir}" = "x${sbindir}" ; then
11305    echo " "
11306    echo " "
11307    echo "You have set --sbindir and --with-subsys-dir"
11308    echo "  both equal to: ${subsysdir} "
11309    echo "  This is not permitted. Please reconfigure."
11310    echo " "
11311    echo "Aborting configuration ..."
11312    echo " "
11313    echo " "
11314    exit 1
11315 fi 
11316
11317 if test "x${db_name}" = "xInternal" ; then
11318    echo " "
11319    echo " "
11320    echo "You have not specified either --enable-client-only or one of the"
11321    echo "  supported databases: MySQL, PostgreSQL, or SQLite".
11322    echo "  This is not permitted. Please reconfigure."
11323    echo " "
11324    echo "Aborting the configuration ..."
11325    echo " "
11326    echo " "
11327    exit 1
11328 fi
11329
11330 echo "
11331 Configuration on `date`:
11332
11333   Host:                       $host -- ${DISTNAME} ${DISTVER}
11334   Bacula version:             ${VERSION} (${DATE})
11335   Source code location:       ${srcdir}
11336   Install binaries:           ${sbindir}
11337   Install config files:       ${sysconfdir}
11338   Scripts directory:          ${scriptdir}
11339   Working directory:          ${working_dir}
11340   PID directory:              ${piddir}
11341   Subsys directory:           ${subsysdir}
11342   C Compiler:                 ${CC} ${CCVERSION}
11343   C++ Compiler:               ${CXX} ${CXXVERSION}
11344   Compiler flags:             ${WCFLAGS} ${CFLAGS} 
11345   Linker flags:               ${WLDFLAGS} ${LDFLAGS}
11346   Libraries:                  ${LIBS}
11347   Statically Linked Tools:    ${support_static_tools}
11348   Statically Linked FD:       ${support_static_fd}
11349   Statically Linked SD:       ${support_static_sd}
11350   Statically Linked DIR:      ${support_static_dir}
11351   Statically Linked CONS:     ${support_static_cons}
11352   Database type:              ${db_name}
11353   Database lib:               ${DB_LIBS}
11354
11355   Job Output Email:           ${job_email}
11356   Traceback Email:            ${dump_email}
11357   SMTP Host Address:          ${smtp_host}
11358
11359   Director Port:              ${dir_port}
11360   File daemon Port:           ${fd_port}
11361   Storage daemon Port:        ${sd_port}
11362
11363   Director User:              ${dir_user}
11364   Director Group:             ${dir_group}
11365   Storage Daemon User:        ${sd_user}
11366   Storage DaemonGroup:        ${sd_group}
11367   File Daemon User:           ${fd_user}
11368   File Daemon Group:          ${fd_group}
11369
11370   SQL binaries Directory      ${SQL_BINDIR}
11371
11372   Large file support:         $largefile_support
11373   Bacula conio support:       ${got_conio} ${CONS_LIBS}
11374   readline support:           ${got_readline} ${PRTREADLINE_SRC}
11375   TCP Wrappers support:       ${TCPW_MSG}
11376   ZLIB support:               ${have_zlib}
11377   enable-smartalloc:          ${support_smartalloc} 
11378   enable-gnome:               ${support_gnome} ${gnome_version}
11379   enable-wx-console:          ${support_wx_console}
11380   enable-tray-monitor:        ${support_tray_monitor}
11381   client-only:                ${build_client_only}
11382   ACL support:                ${have_acl}
11383
11384   " > config.out
11385
11386 cat config.out
11387
11388 # old stuff
11389 # cweb support:               ${got_cweb} ${CWEB_SRC}
11390   # gmp support:                      ${got_gmp} ${GMP_SRC}