]> git.sur5r.net Git - bacula/bacula/blob - bacula/configure
Add test for gtk+-2.0 in configure for tray-monitorcd '/home/nicolas/dev/bacula/autoconf'
[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   abc=`$PKGCONFIG --exists gtk+-2.0`
2821   pkg=$?
2822   if test $pkg = 0; then
2823      TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
2824      TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
2825      
2826      
2827      TRAY_MONITOR_DIR=src/tray-monitor
2828   fi
2829 fi
2830
2831
2832 # -------------------------------------------
2833 # smartalloc (default off)
2834 # -------------------------------------------
2835 # Check whether --enable-smartalloc or --disable-smartalloc was given.
2836 if test "${enable_smartalloc+set}" = set; then
2837   enableval="$enable_smartalloc"
2838   if test x$enableval = xno; then
2839     support_smartalloc=no
2840   fi
2841 fi
2842
2843
2844 if test x$support_smartalloc = xyes; then
2845    cat >> confdefs.h <<\EOF
2846 #define SMARTALLOC 1
2847 EOF
2848
2849 fi
2850
2851 # -------------------------------------------
2852 # static-tools (default off)
2853 # -------------------------------------------
2854 # Check whether --enable-static-tools or --disable-static-tools was given.
2855 if test "${enable_static_tools+set}" = set; then
2856   enableval="$enable_static_tools"
2857   if test x$enableval = xyes; then
2858      support_static_tools=yes
2859    fi
2860 fi
2861
2862
2863 TTOOL_LDFLAGS=
2864 if test x$support_static_tools = xyes; then
2865    TTOOL_LDFLAGS="-static"
2866 fi
2867
2868
2869 # -------------------------------------------
2870 # static-fd    (default off)
2871 # -------------------------------------------
2872 # Check whether --enable-static-fd or --disable-static-fd was given.
2873 if test "${enable_static_fd+set}" = set; then
2874   enableval="$enable_static_fd"
2875   if test x$enableval = xyes; then
2876      support_static_fd=yes
2877    fi
2878 fi
2879
2880
2881 STATIC_FD=
2882 if test x$support_static_fd = xyes; then
2883    STATIC_FD="static-bacula-fd"
2884 fi
2885
2886
2887 # -------------------------------------------
2888 # static-sd    (default off)
2889 # -------------------------------------------
2890 # Check whether --enable-static-sd or --disable-static-sd was given.
2891 if test "${enable_static_sd+set}" = set; then
2892   enableval="$enable_static_sd"
2893   if test x$enableval = xyes; then
2894      support_static_sd=yes
2895    fi
2896 fi
2897
2898
2899 STATIC_SD=
2900 if test x$support_static_sd = xyes; then
2901    STATIC_SD="static-bacula-sd"
2902 fi
2903
2904
2905 # -------------------------------------------
2906 # static-dir   (default off)
2907 # -------------------------------------------
2908 # Check whether --enable-static-dir or --disable-static-dir was given.
2909 if test "${enable_static_dir+set}" = set; then
2910   enableval="$enable_static_dir"
2911   if test x$enableval = xyes; then
2912      support_static_dir=yes
2913    fi
2914 fi
2915
2916
2917 STATIC_DIR=
2918 if test x$support_static_dir = xyes; then
2919    STATIC_DIR="static-bacula-dir"
2920 fi
2921
2922
2923 # -------------------------------------------
2924 # static-cons  (default off)
2925 # -------------------------------------------
2926 # Check whether --enable-static-cons or --disable-static-cons was given.
2927 if test "${enable_static_cons+set}" = set; then
2928   enableval="$enable_static_cons"
2929   if test x$enableval = xyes; then
2930      support_static_cons=yes
2931    fi
2932 fi
2933
2934
2935 STATIC_CONS=
2936 STATIC_GNOME_CONS=
2937 STATIC_WX_CONS=
2938 if test x$support_static_cons = xyes; then
2939    STATIC_CONS="static-bconsole"
2940    STATIC_GNOME_CONS="static-gnome-console"
2941    STATIC_WX_CONS="static-wx-console"
2942 fi
2943
2944
2945
2946
2947 # -------------------------------------------
2948 # client_only  (default off)
2949 # -------------------------------------------
2950 # Check whether --enable-client-only or --disable-client-only was given.
2951 if test "${enable_client_only+set}" = set; then
2952   enableval="$enable_client_only"
2953   if test x$enableval = xyes; then
2954      build_client_only=yes
2955     db_name=None
2956     DB_NAME=none
2957    fi
2958 fi
2959
2960 if test x$build_client_only = xno; then
2961    ALL_DIRS="subdirs"
2962 else
2963    ALL_DIRS=""
2964 fi
2965
2966
2967 # ---------------------------------------------------
2968 # Check for conio (Bacula readline substitute)(
2969 # ---------------------------------------------------
2970 # this allows you to turn it completely off
2971 # Check whether --enable-conio or --disable-conio was given.
2972 if test "${enable_conio+set}" = set; then
2973   enableval="$enable_conio"
2974   if test x$enableval = xno; then
2975     support_conio=no
2976   fi
2977 fi
2978
2979
2980 got_conio="no"
2981 if test x$support_conio = xyes; then
2982    ac_safe=`echo "termcap.h" | sed 'y%./+-%__p_%'`
2983 echo $ac_n "checking for termcap.h""... $ac_c" 1>&6
2984 echo "configure:2985: checking for termcap.h" >&5
2985 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 #include <termcap.h>
2992 EOF
2993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2994 { (eval echo configure:2995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2996 if test -z "$ac_err"; then
2997   rm -rf conftest*
2998   eval "ac_cv_header_$ac_safe=yes"
2999 else
3000   echo "$ac_err" >&5
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   eval "ac_cv_header_$ac_safe=no"
3005 fi
3006 rm -f conftest*
3007 fi
3008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3009   echo "$ac_t""yes" 1>&6
3010    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3011 echo "configure:3012: checking for tgetent in -ltermcap" >&5
3012 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3013 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   ac_save_LIBS="$LIBS"
3017 LIBS="-ltermcap  $LIBS"
3018 cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* Override any gcc2 internal prototype to avoid an error.  */
3022 /* We use char because int might match the return type of a gcc2
3023     builtin and then its argument prototype would still apply.  */
3024 char tgetent();
3025
3026 int main() {
3027 tgetent()
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=yes"
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   eval "ac_cv_lib_$ac_lib_var=no"
3038 fi
3039 rm -f conftest*
3040 LIBS="$ac_save_LIBS"
3041
3042 fi
3043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3044   echo "$ac_t""yes" 1>&6
3045    CONS_LIBS="-ltermcap"
3046          CONS_OBJ="conio.o"
3047          CONS_SRC="conio.c"
3048          got_conio="yes"
3049          support_readline=no
3050          cat >> confdefs.h <<\EOF
3051 #define HAVE_CONIO 1
3052 EOF
3053  
3054        
3055 else
3056   echo "$ac_t""no" 1>&6
3057  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3058 echo "configure:3059: checking for tgetent in -lncurses" >&5
3059 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   ac_save_LIBS="$LIBS"
3064 LIBS="-lncurses  $LIBS"
3065 cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 /* Override any gcc2 internal prototype to avoid an error.  */
3069 /* We use char because int might match the return type of a gcc2
3070     builtin and then its argument prototype would still apply.  */
3071 char tgetent();
3072
3073 int main() {
3074 tgetent()
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3078   rm -rf conftest*
3079   eval "ac_cv_lib_$ac_lib_var=yes"
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   eval "ac_cv_lib_$ac_lib_var=no"
3085 fi
3086 rm -f conftest*
3087 LIBS="$ac_save_LIBS"
3088
3089 fi
3090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3091   echo "$ac_t""yes" 1>&6
3092    CONS_LIBS="-lncurses"
3093            CONS_OBJ="conio.o"
3094            CONS_SRC="conio.c"
3095            got_conio="yes"
3096            support_readline=no
3097            cat >> confdefs.h <<\EOF
3098 #define HAVE_CONIO 1
3099 EOF
3100  
3101          
3102 else
3103   echo "$ac_t""no" 1>&6
3104  echo " "; echo "Neither termcap nor ncurses library found. CONIO turned off ..."; echo " "
3105 fi
3106
3107        
3108 fi
3109
3110     
3111 else
3112   echo "$ac_t""no" 1>&6
3113 echo " "; echo "termcap.h not found. CONIO turned off ..."; echo " "
3114 fi
3115
3116 fi
3117
3118
3119 # ---------------------------------------------------
3120 # Check for readline support/directory (default off)
3121 # ---------------------------------------------------
3122 # this allows you to turn it completely off
3123 # Check whether --enable-readline or --disable-readline was given.
3124 if test "${enable_readline+set}" = set; then
3125   enableval="$enable_readline"
3126   if test x$enableval = xno; then
3127     support_readline=no
3128   fi
3129 fi
3130
3131
3132 got_readline="no"
3133 READLINE_SRC=
3134 if test x$support_readline = xyes; then
3135    # Check whether --with-readline or --without-readline was given.
3136 if test "${with_readline+set}" = set; then
3137   withval="$with_readline"
3138   
3139         case "$with_readline" in
3140         no) : ;;
3141         yes|*)
3142           if test "$with_readline" != "yes"; then
3143             CONS_INC="-I${with_readline}"
3144             CONS_LDFLAGS="-L$with_readline"
3145           else
3146              with_readline="/usr/include/readline" 
3147           fi
3148           ac_safe=`echo "${with_readline}/readline.h" | sed 'y%./+-%__p_%'`
3149 echo $ac_n "checking for ${with_readline}/readline.h""... $ac_c" 1>&6
3150 echo "configure:3151: checking for ${with_readline}/readline.h" >&5
3151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3152   echo $ac_n "(cached) $ac_c" 1>&6
3153 else
3154   cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157 #include <${with_readline}/readline.h>
3158 EOF
3159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3160 { (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3162 if test -z "$ac_err"; then
3163   rm -rf conftest*
3164   eval "ac_cv_header_$ac_safe=yes"
3165 else
3166   echo "$ac_err" >&5
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169   rm -rf conftest*
3170   eval "ac_cv_header_$ac_safe=no"
3171 fi
3172 rm -f conftest*
3173 fi
3174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3175   echo "$ac_t""yes" 1>&6
3176    cat >> confdefs.h <<\EOF
3177 #define HAVE_READLINE 1
3178 EOF
3179  
3180                CONS_LIBS="-lreadline -ltermcap"
3181                got_readline="yes"   
3182              
3183 else
3184   echo "$ac_t""no" 1>&6
3185  echo " "
3186                echo "readline.h not found. readline turned off ..."
3187                echo " "
3188              
3189           
3190 fi
3191
3192           ;;
3193         esac
3194      
3195 else
3196   
3197        # check for standard readline library
3198        ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
3199 echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
3200 echo "configure:3201: checking for /usr/include/readline/readline.h" >&5
3201 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3202   echo $ac_n "(cached) $ac_c" 1>&6
3203 else
3204   cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207 #include </usr/include/readline/readline.h>
3208 EOF
3209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3210 { (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3212 if test -z "$ac_err"; then
3213   rm -rf conftest*
3214   eval "ac_cv_header_$ac_safe=yes"
3215 else
3216   echo "$ac_err" >&5
3217   echo "configure: failed program was:" >&5
3218   cat conftest.$ac_ext >&5
3219   rm -rf conftest*
3220   eval "ac_cv_header_$ac_safe=no"
3221 fi
3222 rm -f conftest*
3223 fi
3224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3225   echo "$ac_t""yes" 1>&6
3226    cat >> confdefs.h <<\EOF
3227 #define HAVE_READLINE 1
3228 EOF
3229
3230            got_readline="yes"
3231            CONS_INC="-I/usr/include/readline"
3232            CONS_LIBS="-lreadline -ltermcap"
3233          
3234 else
3235   echo "$ac_t""no" 1>&6
3236
3237            # Did not find standard library, so try Bacula's default
3238             ac_safe=`echo "${TOP_DIR}/depkgs/readline/readline.h" | sed 'y%./+-%__p_%'`
3239 echo $ac_n "checking for ${TOP_DIR}/depkgs/readline/readline.h""... $ac_c" 1>&6
3240 echo "configure:3241: checking for ${TOP_DIR}/depkgs/readline/readline.h" >&5
3241 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3242   echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244   cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 #include <${TOP_DIR}/depkgs/readline/readline.h>
3248 EOF
3249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3250 { (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3252 if test -z "$ac_err"; then
3253   rm -rf conftest*
3254   eval "ac_cv_header_$ac_safe=yes"
3255 else
3256   echo "$ac_err" >&5
3257   echo "configure: failed program was:" >&5
3258   cat conftest.$ac_ext >&5
3259   rm -rf conftest*
3260   eval "ac_cv_header_$ac_safe=no"
3261 fi
3262 rm -f conftest*
3263 fi
3264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3265   echo "$ac_t""yes" 1>&6
3266    cat >> confdefs.h <<\EOF
3267 #define HAVE_READLINE 1
3268 EOF
3269  
3270                  got_readline="yes"   
3271                  CONS_INC="-I${TOP_DIR}/depkgs/readline"
3272                  CONS_LIBS="-lreadline -lhistory -ltermcap"
3273                  CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
3274                  PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
3275               
3276 else
3277   echo "$ac_t""no" 1>&6
3278  echo " "
3279                 echo "readline.h not found. readline turned off ..."
3280                 echo " "
3281               
3282             
3283 fi
3284
3285          
3286        
3287 fi
3288
3289          
3290    
3291 fi
3292
3293 fi
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304 # Minimal stuff for readline Makefile configuration
3305 MAKE_SHELL=/bin/sh
3306
3307 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3308 echo "configure:3309: checking whether stat file-mode macros are broken" >&5
3309 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #include <sys/types.h>
3316 #include <sys/stat.h>
3317
3318 #if defined(S_ISBLK) && defined(S_IFDIR)
3319 # if S_ISBLK (S_IFDIR)
3320 You lose.
3321 # endif
3322 #endif
3323
3324 #if defined(S_ISBLK) && defined(S_IFCHR)
3325 # if S_ISBLK (S_IFCHR)
3326 You lose.
3327 # endif
3328 #endif
3329
3330 #if defined(S_ISLNK) && defined(S_IFREG)
3331 # if S_ISLNK (S_IFREG)
3332 You lose.
3333 # endif
3334 #endif
3335
3336 #if defined(S_ISSOCK) && defined(S_IFREG)
3337 # if S_ISSOCK (S_IFREG)
3338 You lose.
3339 # endif
3340 #endif
3341
3342 EOF
3343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3344   egrep "You lose" >/dev/null 2>&1; then
3345   rm -rf conftest*
3346   ac_cv_header_stat_broken=yes
3347 else
3348   rm -rf conftest*
3349   ac_cv_header_stat_broken=no
3350 fi
3351 rm -f conftest*
3352
3353 fi
3354
3355 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3356 if test $ac_cv_header_stat_broken = yes; then
3357   cat >> confdefs.h <<\EOF
3358 #define STAT_MACROS_BROKEN 1
3359 EOF
3360
3361 fi
3362
3363 ac_header_dirent=no
3364 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3365 do
3366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3367 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_hdr that defines DIR" >&5
3369 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <sys/types.h>
3376 #include <$ac_hdr>
3377 int main() {
3378 DIR *dirp = 0;
3379 ; return 0; }
3380 EOF
3381 if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3382   rm -rf conftest*
3383   eval "ac_cv_header_dirent_$ac_safe=yes"
3384 else
3385   echo "configure: failed program was:" >&5
3386   cat conftest.$ac_ext >&5
3387   rm -rf conftest*
3388   eval "ac_cv_header_dirent_$ac_safe=no"
3389 fi
3390 rm -f conftest*
3391 fi
3392 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3393   echo "$ac_t""yes" 1>&6
3394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3395   cat >> confdefs.h <<EOF
3396 #define $ac_tr_hdr 1
3397 EOF
3398  ac_header_dirent=$ac_hdr; break
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402 done
3403 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3404 if test $ac_header_dirent = dirent.h; then
3405 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3406 echo "configure:3407: checking for opendir in -ldir" >&5
3407 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   ac_save_LIBS="$LIBS"
3412 LIBS="-ldir  $LIBS"
3413 cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 /* Override any gcc2 internal prototype to avoid an error.  */
3417 /* We use char because int might match the return type of a gcc2
3418     builtin and then its argument prototype would still apply.  */
3419 char opendir();
3420
3421 int main() {
3422 opendir()
3423 ; return 0; }
3424 EOF
3425 if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3426   rm -rf conftest*
3427   eval "ac_cv_lib_$ac_lib_var=yes"
3428 else
3429   echo "configure: failed program was:" >&5
3430   cat conftest.$ac_ext >&5
3431   rm -rf conftest*
3432   eval "ac_cv_lib_$ac_lib_var=no"
3433 fi
3434 rm -f conftest*
3435 LIBS="$ac_save_LIBS"
3436
3437 fi
3438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3439   echo "$ac_t""yes" 1>&6
3440   LIBS="$LIBS -ldir"
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445 else
3446 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3447 echo "configure:3448: checking for opendir in -lx" >&5
3448 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3450   echo $ac_n "(cached) $ac_c" 1>&6
3451 else
3452   ac_save_LIBS="$LIBS"
3453 LIBS="-lx  $LIBS"
3454 cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3457 /* Override any gcc2 internal prototype to avoid an error.  */
3458 /* We use char because int might match the return type of a gcc2
3459     builtin and then its argument prototype would still apply.  */
3460 char opendir();
3461
3462 int main() {
3463 opendir()
3464 ; return 0; }
3465 EOF
3466 if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3467   rm -rf conftest*
3468   eval "ac_cv_lib_$ac_lib_var=yes"
3469 else
3470   echo "configure: failed program was:" >&5
3471   cat conftest.$ac_ext >&5
3472   rm -rf conftest*
3473   eval "ac_cv_lib_$ac_lib_var=no"
3474 fi
3475 rm -f conftest*
3476 LIBS="$ac_save_LIBS"
3477
3478 fi
3479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3480   echo "$ac_t""yes" 1>&6
3481   LIBS="$LIBS -lx"
3482 else
3483   echo "$ac_t""no" 1>&6
3484 fi
3485
3486 fi
3487
3488 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
3489 do
3490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3491 echo "configure:3492: checking for $ac_func" >&5
3492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   cat > conftest.$ac_ext <<EOF
3496 #line 3497 "configure"
3497 #include "confdefs.h"
3498 /* System header to define __stub macros and hopefully few prototypes,
3499     which can conflict with char $ac_func(); below.  */
3500 #include <assert.h>
3501 /* Override any gcc2 internal prototype to avoid an error.  */
3502 /* We use char because int might match the return type of a gcc2
3503     builtin and then its argument prototype would still apply.  */
3504 char $ac_func();
3505
3506 int main() {
3507
3508 /* The GNU C library defines this for functions which it implements
3509     to always fail with ENOSYS.  Some functions are actually named
3510     something starting with __ and the normal name is an alias.  */
3511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3512 choke me
3513 #else
3514 $ac_func();
3515 #endif
3516
3517 ; return 0; }
3518 EOF
3519 if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3520   rm -rf conftest*
3521   eval "ac_cv_func_$ac_func=yes"
3522 else
3523   echo "configure: failed program was:" >&5
3524   cat conftest.$ac_ext >&5
3525   rm -rf conftest*
3526   eval "ac_cv_func_$ac_func=no"
3527 fi
3528 rm -f conftest*
3529 fi
3530
3531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3532   echo "$ac_t""yes" 1>&6
3533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3534   cat >> confdefs.h <<EOF
3535 #define $ac_tr_func 1
3536 EOF
3537  
3538 else
3539   echo "$ac_t""no" 1>&6
3540 fi
3541 done
3542
3543 for ac_func in nanosleep nl_langinfo
3544 do
3545 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3546 echo "configure:3547: checking for $ac_func" >&5
3547 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 /* System header to define __stub macros and hopefully few prototypes,
3554     which can conflict with char $ac_func(); below.  */
3555 #include <assert.h>
3556 /* Override any gcc2 internal prototype to avoid an error.  */
3557 /* We use char because int might match the return type of a gcc2
3558     builtin and then its argument prototype would still apply.  */
3559 char $ac_func();
3560
3561 int main() {
3562
3563 /* The GNU C library defines this for functions which it implements
3564     to always fail with ENOSYS.  Some functions are actually named
3565     something starting with __ and the normal name is an alias.  */
3566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3567 choke me
3568 #else
3569 $ac_func();
3570 #endif
3571
3572 ; return 0; }
3573 EOF
3574 if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3575   rm -rf conftest*
3576   eval "ac_cv_func_$ac_func=yes"
3577 else
3578   echo "configure: failed program was:" >&5
3579   cat conftest.$ac_ext >&5
3580   rm -rf conftest*
3581   eval "ac_cv_func_$ac_func=no"
3582 fi
3583 rm -f conftest*
3584 fi
3585
3586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3587   echo "$ac_t""yes" 1>&6
3588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3589   cat >> confdefs.h <<EOF
3590 #define $ac_tr_func 1
3591 EOF
3592  
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596 done
3597
3598 for ac_hdr in varargs.h
3599 do
3600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $ac_hdr" >&5
3603 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 #include <$ac_hdr>
3610 EOF
3611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3612 { (eval echo configure:3613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3614 if test -z "$ac_err"; then
3615   rm -rf conftest*
3616   eval "ac_cv_header_$ac_safe=yes"
3617 else
3618   echo "$ac_err" >&5
3619   echo "configure: failed program was:" >&5
3620   cat conftest.$ac_ext >&5
3621   rm -rf conftest*
3622   eval "ac_cv_header_$ac_safe=no"
3623 fi
3624 rm -f conftest*
3625 fi
3626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3627   echo "$ac_t""yes" 1>&6
3628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3629   cat >> confdefs.h <<EOF
3630 #define $ac_tr_hdr 1
3631 EOF
3632  
3633 else
3634   echo "$ac_t""no" 1>&6
3635 fi
3636 done
3637
3638
3639 # End of readline/conio stuff
3640 # -----------------------------------------------------------------------
3641
3642
3643 # ---------------------------------------------------
3644 # Check for GMP support/directory
3645 # ---------------------------------------------------
3646 #GMP_SRC=
3647 #local_gmp="no"
3648 #AC_ARG_WITH(gmp,
3649 #  [  --with-gmp[=DIR]   Specify gmp library directory],
3650 #  [
3651 #     case "$with_gmp" in
3652 #     no) : ;;
3653 #     yes|*)
3654 #       if test "$with_gmp" != "yes"; then
3655 #         GMP_INC="-I$with_gmp"
3656 #         GMP_LIBS="-lgmp"
3657 #         GMP_LDFLAGS="-L$with_gmp"
3658 #       else
3659 #          with_gmp="/usr/include" 
3660 #       fi
3661 #       AC_CHECK_HEADER($with_gmp/gmp.h, 
3662 #          [ AC_MSG_RESULT(yes)
3663 #            AC_DEFINE(HAVE_GMP) 
3664 #            GMP_LIBS="-lgmp"
3665 #            got_gmp="yes"   
3666 #          ],
3667 #          [ AC_MSG_ERROR([*** gmp library missing]) 
3668 #          ]
3669 #       )
3670 #       ;;
3671 #     esac
3672 #  ],[
3673 #    # check for standard gmp library
3674 #    AC_CHECK_HEADER(/usr/include/gmp.h,
3675 #    [ AC_MSG_RESULT(yes)
3676 #      AC_DEFINE(HAVE_GMP)
3677 #      got_gmp="yes"
3678 #      GMP_INC=
3679 #      GMP_LIBS="-lgmp"
3680 #    ], [
3681 #      # Did not find standard library, so use our own
3682 #      AC_MSG_RESULT(yes)
3683 #      AC_DEFINE(HAVE_GMP)
3684 #      got_gmp="yes"
3685 #      local_gmp="yes"
3686 #      GMP_INC="-I${TOP_DIR}/depkgs/gmp"
3687 #      GMP_LIBS="-lgmp"
3688 #      GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
3689 #      GMP_SRC="${TOP_DIR}/depkgs/gmp"
3690 #    ])
3691 #  ]   
3692 #)
3693 #AC_SUBST(GMP_INC)
3694 #AC_SUBST(GMP_LIBS)
3695 #AC_SUBST(GMP_LDFLAGS)
3696 #AC_SUBST(GMP_SRC)
3697
3698 # End of GMP stuff
3699 # -----------------------------------------------------------------------
3700
3701
3702 # ---------------------------------------------------
3703 # Check for CWEB support/directory
3704 # ---------------------------------------------------
3705 #CWEB_SRC=
3706 #CWEB=/bin
3707 #local_cweb="no"
3708 #AC_ARG_WITH(cweb,
3709 #  [  --with-cweb[=DIR]   Specify cweb library directory],
3710 #  [
3711 #     case "$with_cweb" in
3712 #     no) : ;;
3713 #     yes|*)
3714 #       if test "$with_cweb" != "yes"; then
3715 #         CWEB_INC="-I$with_cweb"
3716 #         CWEB_LIBS="-lcweb"
3717 #         CWEB_LDFLAGS="-L$with_cweb"
3718 #       else
3719 #          with_cweb="/usr/include" 
3720 #       fi
3721 #       AC_CHECK_HEADER($with_cweb/cweb.h, 
3722 #          [ AC_MSG_RESULT(yes)
3723 #            AC_DEFINE(HAVE_CWEB) 
3724 #            CWEB_LIBS="-lcweb"
3725 #            got_cweb="yes"   
3726 #          ],
3727 #          [ AC_MSG_ERROR([*** cweb library missing]) 
3728 #          ]
3729 #       )
3730 #       ;;
3731 #     esac
3732 #  ],[
3733 #    # check for standard cweb library
3734 #    AC_CHECK_HEADER(/usr/include/cweb.h,
3735 #    [ AC_MSG_RESULT(yes)
3736 #      AC_DEFINE(HAVE_CWEB)
3737 #      got_cweb="yes"
3738 #      CWEB_INC=
3739 #      CWEB_LIBS="-lcweb"
3740 #    ], [
3741 #      # Did not find starndard library, so use our own
3742 #      AC_MSG_RESULT(yes)
3743 #      AC_DEFINE(HAVE_CWEB)
3744 #      got_cweb="yes"
3745 #      local_cweb="yes"
3746 #      CWEB=${TOP_DIR}/depkgs/cweb
3747 #      CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
3748 #      CWEB_LIBS="-lcweb"
3749 #      CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
3750 #      CWEB_SRC="${TOP_DIR}/depkgs/cweb"
3751 #    ])
3752 #  ]   
3753 #)
3754 #AC_SUBST(CWEB)
3755 #AC_SUBST(CWEB_INC)
3756 #AC_SUBST(CWEB_LIBS)
3757 #AC_SUBST(CWEB_LDFLAGS)
3758 #AC_SUBST(CWEB_SRC)
3759
3760 # End of CWEB stuff
3761 # -----------------------------------------------------------------------
3762
3763
3764
3765 # -----------------------------------------------------------
3766 # Check whether user wants TCP wrappers support (default off)
3767 # -----------------------------------------------------------
3768 TCPW_MSG="no" 
3769 # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
3770 if test "${with_tcp_wrappers+set}" = set; then
3771   withval="$with_tcp_wrappers"
3772   
3773     if test "x$withval" != "xno" ; then
3774        saved_LIBS="$LIBS"
3775        LIBS="$saved_LIBS -lwrap"
3776        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
3777 echo "configure:3778: checking for libwrap" >&5
3778        cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781  #include <tcpd.h>
3782              int deny_severity = 0;
3783              int allow_severity = 0;
3784              struct request_info *req; 
3785 int main() {
3786  hosts_access(req); 
3787 ; return 0; }
3788 EOF
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3790   rm -rf conftest*
3791   
3792             echo "$ac_t""yes" 1>&6
3793             cat >> confdefs.h <<\EOF
3794 #define HAVE_LIBWRAP 1
3795 EOF
3796
3797             TCPW_MSG="yes" 
3798           
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   
3804             LIBS="$saved_LIBS -lwrap -lnsl"
3805             cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808  #include <tcpd.h>
3809                  int deny_severity = 0;
3810                  int allow_severity = 0;
3811                  struct request_info *req; 
3812 int main() {
3813  hosts_access(req); 
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3817   rm -rf conftest*
3818   
3819                  echo "$ac_t""yes" 1>&6
3820                  cat >> confdefs.h <<\EOF
3821 #define HAVE_LIBWRAP 1
3822 EOF
3823
3824                  TCPW_MSG="yes" 
3825               
3826 else
3827   echo "configure: failed program was:" >&5
3828   cat conftest.$ac_ext >&5
3829   rm -rf conftest*
3830   { echo "configure: error: *** libwrap missing" 1>&2; exit 1; }  
3831             
3832 fi
3833 rm -f conftest*
3834        
3835 fi
3836 rm -f conftest*
3837     fi
3838   
3839
3840 fi
3841
3842
3843 # ------------------------------------------
3844 # Where to place working dir
3845 # ------------------------------------------
3846 working_dir=`eval echo ${prefix}/var/bacula/working`
3847 # Check whether --with-working-dir or --without-working-dir was given.
3848 if test "${with_working_dir+set}" = set; then
3849   withval="$with_working_dir"
3850   
3851        if test "x$withval" != "xno" ; then     
3852               working_dir=$withval
3853        fi
3854    
3855
3856 fi
3857
3858
3859
3860
3861
3862 # ------------------------------------------
3863 # Where to place scriptdir (script files)
3864 # ------------------------------------------
3865 scriptdir=`eval echo ${sysconfdir}`
3866 # Check whether --with-scriptdir or --without-scriptdir was given.
3867 if test "${with_scriptdir+set}" = set; then
3868   withval="$with_scriptdir"
3869   
3870        if test "x$withval" != "xno" ; then     
3871               scriptdir=$withval
3872        fi
3873    
3874
3875 fi
3876
3877
3878
3879
3880
3881 # ------------------------------------------
3882 # Where to send dump email
3883 # ------------------------------------------
3884 dump_email=root@localhost
3885 # Check whether --with-dump-email or --without-dump-email was given.
3886 if test "${with_dump_email+set}" = set; then
3887   withval="$with_dump_email"
3888   
3889        if test "x$withval" != "xno" ; then     
3890               dump_email=$withval
3891        fi
3892    
3893
3894 fi
3895
3896
3897
3898
3899 # ------------------------------------------
3900 # Where to send job email
3901 # ------------------------------------------
3902 job_email=root@localhost
3903 # Check whether --with-job-email or --without-job-email was given.
3904 if test "${with_job_email+set}" = set; then
3905   withval="$with_job_email"
3906   
3907        if test "x$withval" != "xno" ; then     
3908               job_email=$withval
3909        fi
3910    
3911
3912 fi
3913
3914
3915
3916
3917 # ------------------------------------------
3918 # Where to find smtp host
3919 # ------------------------------------------
3920 smtp_host=localhost
3921 # Check whether --with-smtp_host or --without-smtp_host was given.
3922 if test "${with_smtp_host+set}" = set; then
3923   withval="$with_smtp_host"
3924   
3925        if test "x$withval" != "xno" ; then     
3926               smtp_host=$withval
3927        fi
3928    
3929
3930 fi
3931
3932
3933
3934
3935
3936 # ------------------------------------
3937 # Where to place pid files
3938 # ------------------------------------
3939 piddir=/var/run
3940 # Check whether --with-pid-dir or --without-pid-dir was given.
3941 if test "${with_pid_dir+set}" = set; then
3942   withval="$with_pid_dir"
3943   
3944         if test "x$withval" != "xno" ; then     
3945             piddir=$withval
3946         fi
3947     
3948
3949 fi
3950
3951
3952 cat >> confdefs.h <<EOF
3953 #define _PATH_BACULA_PIDDIR "$piddir"
3954 EOF
3955
3956
3957
3958
3959 # ------------------------------------
3960 # Where to place subsys "lock file"
3961 # ------------------------------------
3962 subsysdir=/var/run/subsys
3963 # Check whether --with-subsys-dir or --without-subsys-dir was given.
3964 if test "${with_subsys_dir+set}" = set; then
3965   withval="$with_subsys_dir"
3966   
3967         if test "x$withval" != "xno" ; then     
3968             subsysdir=$withval
3969         fi
3970     
3971
3972 fi
3973
3974
3975
3976
3977
3978
3979 # ------------------------------------
3980 # Where to start assigning ports
3981 # ------------------------------------
3982 baseport=9101
3983 # Check whether --with-baseport or --without-baseport was given.
3984 if test "${with_baseport+set}" = set; then
3985   withval="$with_baseport"
3986   
3987         if test "x$withval" != "xno" ; then     
3988              baseport=$withval
3989         fi
3990     
3991
3992 fi
3993
3994
3995
3996 dir_port=`expr $baseport`
3997 fd_port=`expr $baseport + 1`
3998 sd_port=`expr $fd_port + 1`
3999
4000
4001
4002
4003
4004
4005 # ------------------------------------------
4006 # Generate passwords
4007 # ------------------------------------------
4008 dir_password=
4009 # Check whether --with-dir-password or --without-dir-password was given.
4010 if test "${with_dir_password+set}" = set; then
4011   withval="$with_dir_password"
4012   
4013        if test "x$withval" != "xno" ; then     
4014            dir_password=$withval
4015        fi
4016    
4017
4018 fi
4019
4020
4021 if test "x$dir_password" = "x" ; then
4022    if test "x$OPENSSL" = "xnone" ; then
4023 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
4024       key=`autoconf/randpass 33`
4025    else
4026       key=`openssl rand -base64 33`
4027    fi
4028    dir_password=$key
4029 fi
4030
4031 fd_password=
4032 # Check whether --with-fd-password or --without-fd-password was given.
4033 if test "${with_fd_password+set}" = set; then
4034   withval="$with_fd_password"
4035   
4036        if test "x$withval" != "xno" ; then     
4037            fd_password=$withval
4038        fi
4039    
4040
4041 fi
4042
4043
4044 if test "x$fd_password" = "x" ; then
4045    if test "x$OPENSSL" = "xnone" ; then
4046 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
4047       key=`autoconf/randpass 37`
4048    else
4049       key=`openssl rand -base64 33`
4050    fi
4051    fd_password=$key
4052 fi
4053
4054 sd_password=
4055 # Check whether --with-sd-password or --without-sd-password was given.
4056 if test "${with_sd_password+set}" = set; then
4057   withval="$with_sd_password"
4058   
4059        if test "x$withval" != "xno" ; then     
4060            sd_password=$withval
4061        fi
4062    
4063
4064 fi
4065
4066
4067 if test "x$sd_password" = "x" ; then
4068    if test "x$OPENSSL" = "xnone" ; then
4069 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
4070       key=`autoconf/randpass 41`
4071    else
4072       key=`openssl rand -base64 33`
4073    fi
4074    sd_password=$key
4075 fi
4076
4077
4078
4079
4080
4081
4082
4083 #
4084 # Handle users and groups for each daemon
4085 #
4086 dir_user=
4087 # Check whether --with-dir_user or --without-dir_user was given.
4088 if test "${with_dir_user+set}" = set; then
4089   withval="$with_dir_user"
4090   
4091         if test "x$withval" != "x" ; then       
4092              dir_user=$withval
4093         fi
4094     
4095
4096 fi
4097
4098
4099 dir_group=
4100 # Check whether --with-dir_group or --without-dir_group was given.
4101 if test "${with_dir_group+set}" = set; then
4102   withval="$with_dir_group"
4103   
4104         if test "x$withval" != "x" ; then       
4105              dir_group=$withval
4106         fi
4107     
4108
4109 fi
4110
4111
4112 sd_user=
4113 # Check whether --with-sd_user or --without-sd_user was given.
4114 if test "${with_sd_user+set}" = set; then
4115   withval="$with_sd_user"
4116   
4117         if test "x$withval" != "x" ; then       
4118              sd_user=$withval
4119         fi
4120     
4121
4122 fi
4123
4124
4125 sd_group=
4126 # Check whether --with-sd_group or --without-sd_group was given.
4127 if test "${with_sd_group+set}" = set; then
4128   withval="$with_sd_group"
4129   
4130         if test "x$withval" != "x" ; then       
4131              sd_group=$withval
4132         fi
4133     
4134
4135 fi
4136
4137
4138 fd_user=
4139 # Check whether --with-fd_user or --without-fd_user was given.
4140 if test "${with_fd_user+set}" = set; then
4141   withval="$with_fd_user"
4142   
4143         if test "x$withval" != "x" ; then       
4144              fd_user=$withval
4145         fi
4146     
4147
4148 fi
4149
4150
4151 fd_group=
4152 # Check whether --with-fd_group or --without-fd_group was given.
4153 if test "${with_fd_group+set}" = set; then
4154   withval="$with_fd_group"
4155   
4156         if test "x$withval" != "x" ; then       
4157              fd_group=$withval
4158         fi
4159     
4160
4161 fi
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174 #
4175 # allow setting default executable permissions
4176 #
4177 SBINPERM=0754
4178 # Check whether --with-sbin-perm or --without-sbin-perm was given.
4179 if test "${with_sbin_perm+set}" = set; then
4180   withval="$with_sbin_perm"
4181   
4182         if test "x$withval" != "x" ; then       
4183             SBINPERM=$withval
4184         fi
4185     
4186
4187 fi
4188
4189
4190
4191
4192 # ------------------------------------------------
4193 # Bacula check for various SQL database engines
4194 # ------------------------------------------------
4195
4196 db_found=no
4197 echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6
4198 echo "configure:4199: checking for PostgreSQL support" >&5
4199 # Check whether --with-postgresql or --without-postgresql was given.
4200 if test "${with_postgresql+set}" = set; then
4201   withval="$with_postgresql"
4202   
4203   if test "$withval" != "no"; then
4204       if test "$db_found" = "yes"; then
4205           echo "$ac_t""error" 1>&6
4206           { echo "configure: error: "You can configure for only one database."" 1>&2; exit 1; };
4207       fi
4208       if test "$withval" = "yes"; then
4209           if test -f /usr/local/include/libpq-fe.h; then
4210               POSTGRESQL_INCDIR=/usr/local/include
4211               POSTGRESQL_LIBDIR=/usr/local/lib
4212               POSTGRESQL_BINDIR=/usr/local/bin
4213           elif test -f /usr/include/libpq-fe.h; then
4214               POSTGRESQL_INCDIR=/usr/include
4215               POSTGRESQL_LIBDIR=/usr/lib
4216               POSTGRESQL_BINDIR=/usr/bin
4217           elif test -f /usr/include/pgsql/libpq-fe.h; then
4218               POSTGRESQL_INCDIR=/usr/include/pgsql
4219               POSTGRESQL_LIBDIR=/usr/lib/pgsql
4220               POSTGRESQL_BINDIR=/usr/bin
4221           elif test -f /usr/include/postgresql/libpq-fe.h; then
4222               POSTGRESQL_INCDIR=/usr/include/postgresql
4223               POSTGRESQL_LIBDIR=/usr/lib/postgresql
4224               POSTGRESQL_BINDIR=/usr/bin
4225           else
4226               echo "$ac_t""no" 1>&6
4227               { echo "configure: error: Unable to find libpq-fe.h in standard locations" 1>&2; exit 1; }
4228           fi
4229       elif test -f $withval/include/libpq-fe.h; then
4230           POSTGRESQL_INCDIR=$withval/include
4231           POSTGRESQL_LIBDIR=$withval/lib
4232           POSTGRESQL_BINDIR=$withval/bin
4233       else
4234           echo "$ac_t""no" 1>&6
4235           { echo "configure: error: Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval" 1>&2; exit 1; }
4236       fi
4237       POSTGRESQL_LFLAGS="-L$POSTGRESQL_LIBDIR -lpq"
4238       echo $ac_n "checking for crypt""... $ac_c" 1>&6
4239 echo "configure:4240: checking for crypt" >&5
4240 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246 /* System header to define __stub macros and hopefully few prototypes,
4247     which can conflict with char crypt(); below.  */
4248 #include <assert.h>
4249 /* Override any gcc2 internal prototype to avoid an error.  */
4250 /* We use char because int might match the return type of a gcc2
4251     builtin and then its argument prototype would still apply.  */
4252 char crypt();
4253
4254 int main() {
4255
4256 /* The GNU C library defines this for functions which it implements
4257     to always fail with ENOSYS.  Some functions are actually named
4258     something starting with __ and the normal name is an alias.  */
4259 #if defined (__stub_crypt) || defined (__stub___crypt)
4260 choke me
4261 #else
4262 crypt();
4263 #endif
4264
4265 ; return 0; }
4266 EOF
4267 if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4268   rm -rf conftest*
4269   eval "ac_cv_func_crypt=yes"
4270 else
4271   echo "configure: failed program was:" >&5
4272   cat conftest.$ac_ext >&5
4273   rm -rf conftest*
4274   eval "ac_cv_func_crypt=no"
4275 fi
4276 rm -f conftest*
4277 fi
4278
4279 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
4280   echo "$ac_t""yes" 1>&6
4281   :
4282 else
4283   echo "$ac_t""no" 1>&6
4284 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4285 echo "configure:4286: checking for crypt in -lcrypt" >&5
4286 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4287 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   ac_save_LIBS="$LIBS"
4291 LIBS="-lcrypt  $LIBS"
4292 cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 /* Override any gcc2 internal prototype to avoid an error.  */
4296 /* We use char because int might match the return type of a gcc2
4297     builtin and then its argument prototype would still apply.  */
4298 char crypt();
4299
4300 int main() {
4301 crypt()
4302 ; return 0; }
4303 EOF
4304 if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4305   rm -rf conftest*
4306   eval "ac_cv_lib_$ac_lib_var=yes"
4307 else
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   eval "ac_cv_lib_$ac_lib_var=no"
4312 fi
4313 rm -f conftest*
4314 LIBS="$ac_save_LIBS"
4315
4316 fi
4317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4318   echo "$ac_t""yes" 1>&6
4319   POSTGRESQL_LFLAGS="-lcrypt $POSTGRESQL_LFLAGS"
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323
4324 fi
4325
4326       SQL_INCLUDE=-I$POSTGRESQL_INCDIR
4327       SQL_LFLAGS=$POSTGRESQL_LFLAGS
4328       SQL_BINDIR=$POSTGRESQL_BINDIR
4329       cat >> confdefs.h <<\EOF
4330 #define HAVE_POSTGRESQL 1
4331 EOF
4332
4333       echo "$ac_t""yes" 1>&6
4334       db_found=yes
4335       support_postgresql=yes
4336       db_name=PostgreSQL
4337       DB_NAME=postgresql
4338   else
4339       echo "$ac_t""no" 1>&6
4340   fi
4341
4342 else
4343   
4344   echo "$ac_t""no" 1>&6
4345
4346 fi
4347
4348
4349
4350
4351
4352
4353
4354
4355 db_found=no
4356 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
4357 echo "configure:4358: checking for MySQL support" >&5
4358 # Check whether --with-mysql or --without-mysql was given.
4359 if test "${with_mysql+set}" = set; then
4360   withval="$with_mysql"
4361   
4362   if test "$withval" != "no"; then
4363         if test "$withval" = "yes"; then
4364                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
4365                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
4366                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
4367                         MYSQL_BINDIR=/usr/local/mysql/bin
4368                 elif test -f /usr/include/mysql/mysql.h; then
4369                         MYSQL_INCDIR=/usr/include/mysql
4370                         MYSQL_LIBDIR=/usr/lib/mysql
4371                         MYSQL_BINDIR=/usr/bin      
4372                 elif test -f /usr/include/mysql.h; then
4373                         MYSQL_INCDIR=/usr/include
4374                         MYSQL_LIBDIR=/usr/lib
4375                         MYSQL_BINDIR=/usr/bin
4376                 elif test -f /usr/local/include/mysql/mysql.h; then
4377                         MYSQL_INCDIR=/usr/local/include/mysql
4378                         MYSQL_LIBDIR=/usr/local/lib/mysql
4379                         MYSQL_BINDIR=/usr/local/bin
4380                 elif test -f /usr/local/include/mysql.h; then
4381                         MYSQL_INCDIR=/usr/local/include
4382                         MYSQL_LIBDIR=/usr/local/lib
4383                         MYSQL_BINDIR=/usr/local/bin
4384                 else
4385                    echo "$ac_t""no" 1>&6
4386                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
4387                 fi
4388         else
4389                 if test -f $withval/include/mysql/mysql.h; then
4390                         MYSQL_INCDIR=$withval/include/mysql
4391                         MYSQL_LIBDIR=$withval/lib/mysql
4392                         MYSQL_BINDIR=$withval/bin
4393                 elif test -f $withval/include/mysql.h; then
4394                         MYSQL_INCDIR=$withval/include
4395                         MYSQL_LIBDIR=$withval/lib
4396                         MYSQL_BINDIR=$withval/bin
4397                 else
4398                    echo "$ac_t""no" 1>&6
4399                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
4400                 fi
4401         fi
4402     SQL_INCLUDE=-I$MYSQL_INCDIR
4403     if test -f $MYSQL_LIBDIR/libmysqlclient_r.a; then
4404        SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
4405        cat >> confdefs.h <<\EOF
4406 #define HAVE_THREAD_SAFE_MYSQL 1
4407 EOF
4408
4409     else
4410        SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
4411     fi
4412     SQL_BINDIR=$MYSQL_BINDIR
4413
4414     cat >> confdefs.h <<\EOF
4415 #define HAVE_MYSQL 1
4416 EOF
4417
4418     echo "$ac_t""yes" 1>&6
4419     db_found=yes
4420     support_mysql=yes
4421     db_name=MySQL
4422     DB_NAME=mysql
4423
4424   else
4425         echo "$ac_t""no" 1>&6
4426   fi
4427
4428
4429 fi
4430
4431
4432 # Check whether --with-embedded-mysql or --without-embedded-mysql was given.
4433 if test "${with_embedded_mysql+set}" = set; then
4434   withval="$with_embedded_mysql"
4435   
4436   if test "$withval" != "no"; then
4437         if test "$withval" = "yes"; then
4438                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
4439                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
4440                         MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
4441                         MYSQL_BINDIR=/usr/local/mysql/bin
4442                 elif test -f /usr/include/mysql/mysql.h; then
4443                         MYSQL_INCDIR=/usr/include/mysql
4444                         MYSQL_LIBDIR=/usr/lib/mysql
4445                         MYSQL_BINDIR=/usr/bin      
4446                 elif test -f /usr/include/mysql.h; then
4447                         MYSQL_INCDIR=/usr/include
4448                         MYSQL_LIBDIR=/usr/lib
4449                         MYSQL_BINDIR=/usr/bin
4450                 elif test -f /usr/local/include/mysql/mysql.h; then
4451                         MYSQL_INCDIR=/usr/local/include/mysql
4452                         MYSQL_LIBDIR=/usr/local/lib/mysql
4453                         MYSQL_BINDIR=/usr/local/bin
4454                 elif test -f /usr/local/include/mysql.h; then
4455                         MYSQL_INCDIR=/usr/local/include
4456                         MYSQL_LIBDIR=/usr/local/lib
4457                         MYSQL_BINDIR=/usr/local/bin
4458                 else
4459                    echo "$ac_t""no" 1>&6
4460                    { echo "configure: error: Unable to find mysql.h in standard locations" 1>&2; exit 1; }
4461                 fi
4462         else
4463                 if test -f $withval/include/mysql/mysql.h; then
4464                         MYSQL_INCDIR=$withval/include/mysql
4465                         MYSQL_LIBDIR=$withval/lib/mysql
4466                         MYSQL_BINDIR=$withval/bin
4467                 elif test -f $withval/include/mysql.h; then
4468                         MYSQL_INCDIR=$withval/include
4469                         MYSQL_LIBDIR=$withval/lib
4470                         MYSQL_BINDIR=$withval/bin
4471                 else
4472                    echo "$ac_t""no" 1>&6
4473                    { echo "configure: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" 1>&2; exit 1; }
4474                 fi
4475         fi
4476     SQL_INCLUDE=-I$MYSQL_INCDIR
4477     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
4478     SQL_BINDIR=$MYSQL_BINDIR
4479
4480     cat >> confdefs.h <<\EOF
4481 #define HAVE_MYSQL 1
4482 EOF
4483
4484     cat >> confdefs.h <<\EOF
4485 #define HAVE_EMBEDDED_MYSQL 1
4486 EOF
4487
4488     echo "$ac_t""yes" 1>&6
4489     db_found=yes
4490     support_mysql=yes
4491     db_name=MySQL
4492     DB_NAME=mysql
4493
4494   else
4495         echo "$ac_t""no" 1>&6
4496   fi
4497
4498
4499 fi
4500
4501
4502
4503
4504
4505
4506   
4507
4508
4509
4510 db_found=no
4511 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
4512 echo "configure:4513: checking for SQLite support" >&5
4513 # Check whether --with-sqlite or --without-sqlite was given.
4514 if test "${with_sqlite+set}" = set; then
4515   withval="$with_sqlite"
4516   
4517   if test "$withval" != "no"; then
4518      if test "$withval" = "yes"; then
4519         if test -f /usr/local/include/sqlite.h; then
4520            SQLITE_INCDIR=/usr/local/include
4521            SQLITE_LIBDIR=/usr/local/lib
4522            SQLITE_BINDIR=/usr/local/bin
4523         elif test -f /usr/include/sqlite.h; then
4524            SQLITE_INCDIR=/usr/include
4525            SQLITE_LIBDIR=/usr/lib
4526            SQLITE_BINDIR=/usr/bin      
4527         else
4528            echo "$ac_t""no" 1>&6
4529            { echo "configure: error: Unable to find sqlite.h in standard locations" 1>&2; exit 1; }
4530         fi
4531      else
4532         if test -f $withval/sqlite.h; then
4533            SQLITE_INCDIR=$withval
4534            SQLITE_LIBDIR=$withval
4535            SQLITE_BINDIR=$withval
4536         else
4537            echo "$ac_t""no" 1>&6
4538            { echo "configure: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" 1>&2; exit 1; }
4539         fi
4540      fi
4541      SQL_INCLUDE=-I$SQLITE_INCDIR
4542      SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
4543      SQL_BINDIR=$SQLITE_BINDIR
4544
4545      cat >> confdefs.h <<\EOF
4546 #define HAVE_SQLITE 1
4547 EOF
4548
4549      echo "$ac_t""yes" 1>&6
4550      db_found=yes
4551      support_sqlite=yes
4552      db_name=SQLite
4553      DB_NAME=sqlite
4554
4555   else
4556      echo "$ac_t""no" 1>&6
4557   fi
4558
4559 else
4560   
4561   echo "$ac_t""no" 1>&6
4562
4563 fi
4564
4565
4566
4567
4568   
4569
4570
4571
4572
4573
4574 cat >> confdefs.h <<\EOF
4575 #define PROTOTYPES 1
4576 EOF
4577
4578
4579 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
4580     if test -z "$CCOPTS"; then
4581         CCOPTS='-g -O2 -Wall'
4582     fi
4583     CFLAGS="$CCOPTS"
4584 fi
4585
4586
4587 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4588 echo "configure:4589: checking for mingw32 environment" >&5
4589 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4590   echo $ac_n "(cached) $ac_c" 1>&6
4591 else
4592   cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595
4596 int main() {
4597 return __MINGW32__;
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4601   rm -rf conftest*
4602   ac_cv_mingw32=yes
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -rf conftest*
4607   ac_cv_mingw32=no
4608 fi
4609 rm -f conftest*
4610 rm -f conftest*
4611 fi
4612
4613 echo "$ac_t""$ac_cv_mingw32" 1>&6
4614 MINGW32=
4615 test "$ac_cv_mingw32" = yes && MINGW32=yes
4616
4617
4618 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4619 echo "configure:4620: checking for executable suffix" >&5
4620 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4624   ac_cv_exeext=.exe
4625 else
4626   rm -f conftest*
4627   echo 'int main () { return 0; }' > conftest.$ac_ext
4628   ac_cv_exeext=
4629   if { (eval echo configure:4630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4630     for file in conftest.*; do
4631       case $file in
4632       *.c | *.o | *.obj) ;;
4633       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4634       esac
4635     done
4636   else
4637     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4638   fi
4639   rm -f conftest*
4640   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4641 fi
4642 fi
4643
4644 EXEEXT=""
4645 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4646 echo "$ac_t""${ac_cv_exeext}" 1>&6
4647 ac_exeext=$EXEEXT
4648
4649
4650 largefile_support="no"
4651 echo $ac_n "checking build system type""... $ac_c" 1>&6
4652 echo "configure:4653: checking build system type" >&5
4653
4654 build_alias=$build
4655 case "$build_alias" in
4656 NONE)
4657   case $nonopt in
4658   NONE) build_alias=$host_alias ;;
4659   *) build_alias=$nonopt ;;
4660   esac ;;
4661 esac
4662
4663 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
4664 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4665 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4666 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4667 echo "$ac_t""$build" 1>&6
4668
4669
4670 # Make sure we can run config.sub.
4671 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
4672 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
4673 fi
4674
4675 echo $ac_n "checking host system type""... $ac_c" 1>&6
4676 echo "configure:4677: checking host system type" >&5
4677
4678 host_alias=$host
4679 case "$host_alias" in
4680 NONE)
4681   case $nonopt in
4682   NONE)
4683     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
4684     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
4685     fi ;;
4686   *) host_alias=$nonopt ;;
4687   esac ;;
4688 esac
4689
4690 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
4691 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4692 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4693 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4694 echo "$ac_t""$host" 1>&6
4695
4696 if test $host != $build; then
4697   ac_tool_prefix=${host_alias}-
4698 else
4699   ac_tool_prefix=
4700 fi
4701
4702
4703    # Check whether --enable-largefile or --disable-largefile was given.
4704 if test "${enable_largefile+set}" = set; then
4705   enableval="$enable_largefile"
4706   :
4707 fi
4708
4709    if test "$enable_largefile" != no; then
4710      # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
4711 set dummy ${ac_tool_prefix}getconf; ac_word=$2
4712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4713 echo "configure:4714: checking for $ac_word" >&5
4714 if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   if test -n "$GETCONF"; then
4718   ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
4719 else
4720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4721   ac_dummy="$PATH"
4722   for ac_dir in $ac_dummy; do
4723     test -z "$ac_dir" && ac_dir=.
4724     if test -f $ac_dir/$ac_word; then
4725       ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
4726       break
4727     fi
4728   done
4729   IFS="$ac_save_ifs"
4730   test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
4731 fi
4732 fi
4733 GETCONF="$ac_cv_prog_GETCONF"
4734 if test -n "$GETCONF"; then
4735   echo "$ac_t""$GETCONF" 1>&6
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739
4740
4741
4742      echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
4743 echo "configure:4744: checking for CFLAGS value to request large file support" >&5
4744 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
4748         ac_cv_sys_largefile_CFLAGS=no
4749         case "$host_os" in
4750            # IRIX 6.2 and later require cc -n32.
4751            irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
4752              if test "$GCC" != yes; then
4753                ac_cv_sys_largefile_CFLAGS=-n32
4754              fi
4755              ac_save_CC="$CC"
4756              CC="$CC $ac_cv_sys_largefile_CFLAGS"
4757              cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4760
4761 int main() {
4762
4763 ; return 0; }
4764 EOF
4765 if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4766   :
4767 else
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   ac_cv_sys_largefile_CFLAGS=no
4772 fi
4773 rm -f conftest*
4774              CC="$ac_save_CC"
4775            esac
4776       }
4777 fi
4778
4779 echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
4780      echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
4781 echo "configure:4782: checking for LDFLAGS value to request large file support" >&5
4782 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
4786         ac_cv_sys_largefile_LDFLAGS=no
4787         
4788       }
4789 fi
4790
4791 echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
4792      echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
4793 echo "configure:4794: checking for LIBS value to request large file support" >&5
4794 if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
4798         ac_cv_sys_largefile_LIBS=no
4799         
4800       }
4801 fi
4802
4803 echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
4804
4805      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4806        case "$ac_flag" in
4807        no) ;;
4808        -D_FILE_OFFSET_BITS=*) ;;
4809        -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
4810        -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
4811        -D?* | -I?*)
4812          case "$ac_flag" in
4813    no) ;;
4814    ?*)
4815      case "$CPPFLAGS" in
4816      '') CPPFLAGS="$ac_flag" ;;
4817      *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
4818      esac ;;
4819    esac ;;
4820        *)
4821          case "$ac_flag" in
4822    no) ;;
4823    ?*)
4824      case "$CFLAGS" in
4825      '') CFLAGS="$ac_flag" ;;
4826      *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
4827      esac ;;
4828    esac ;;
4829        esac
4830      done
4831      case "$ac_cv_sys_largefile_LDFLAGS" in
4832    no) ;;
4833    ?*)
4834      case "$LDFLAGS" in
4835      '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
4836      *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
4837      esac ;;
4838    esac
4839      case "$ac_cv_sys_largefile_LIBS" in
4840    no) ;;
4841    ?*)
4842      case "$LIBS" in
4843      '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
4844      *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
4845      esac ;;
4846    esac
4847      echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
4848 echo "configure:4849: checking for _FILE_OFFSET_BITS" >&5
4849 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
4850   echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852   ac_cv_sys_file_offset_bits=no
4853       case "$host_os" in
4854         # HP-UX 10.20 and later
4855         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4856           ac_cv_sys_file_offset_bits=64 ;;
4857         esac
4858       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4859         case "$ac_flag" in
4860         -D_FILE_OFFSET_BITS)
4861           ac_cv_sys_file_offset_bits=1 ;;
4862         -D_FILE_OFFSET_BITS=*)
4863           ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4864         esac
4865       done
4866       
4867 fi
4868
4869 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
4870    if test "$ac_cv_sys_file_offset_bits" != no; then
4871      cat >> confdefs.h <<EOF
4872 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4873 EOF
4874
4875    fi
4876      echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
4877 echo "configure:4878: checking for _LARGEFILE_SOURCE" >&5
4878 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_cv_sys_largefile_source=no
4882       case "$host_os" in
4883         # HP-UX 10.20 and later
4884         hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
4885           ac_cv_sys_largefile_source=1 ;;
4886         esac
4887       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4888         case "$ac_flag" in
4889         -D_LARGEFILE_SOURCE)
4890           ac_cv_sys_largefile_source=1 ;;
4891         -D_LARGEFILE_SOURCE=*)
4892           ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4893         esac
4894       done
4895       
4896 fi
4897
4898 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
4899    if test "$ac_cv_sys_largefile_source" != no; then
4900      cat >> confdefs.h <<EOF
4901 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4902 EOF
4903
4904    fi
4905      echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
4906 echo "configure:4907: checking for _LARGE_FILES" >&5
4907 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   ac_cv_sys_large_files=no
4911       case "$host_os" in
4912         # AIX 4.2 and later
4913         aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
4914           ac_cv_sys_large_files=1 ;;
4915         esac
4916       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
4917         case "$ac_flag" in
4918         -D_LARGE_FILES)
4919           ac_cv_sys_large_files=1 ;;
4920         -D_LARGE_FILES=*)
4921           ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
4922         esac
4923       done
4924       
4925 fi
4926
4927 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
4928    if test "$ac_cv_sys_large_files" != no; then
4929      cat >> confdefs.h <<EOF
4930 #define _LARGE_FILES $ac_cv_sys_large_files
4931 EOF
4932
4933    fi
4934    fi
4935   
4936
4937
4938 # If we find X, set shell vars x_includes and x_libraries to the
4939 # paths, otherwise set no_x=yes.
4940 # Uses ac_ vars as temps to allow command line to override cache and checks.
4941 # --without-x overrides everything else, but does not touch the cache.
4942 echo $ac_n "checking for X""... $ac_c" 1>&6
4943 echo "configure:4944: checking for X" >&5
4944
4945 # Check whether --with-x or --without-x was given.
4946 if test "${with_x+set}" = set; then
4947   withval="$with_x"
4948   :
4949 fi
4950
4951 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4952 if test "x$with_x" = xno; then
4953   # The user explicitly disabled X.
4954   have_x=disabled
4955 else
4956   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4957     # Both variables are already set.
4958     have_x=yes
4959   else
4960 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4961   echo $ac_n "(cached) $ac_c" 1>&6
4962 else
4963   # One or both of the vars are not set, and there is no cached value.
4964 ac_x_includes=NO ac_x_libraries=NO
4965 rm -fr conftestdir
4966 if mkdir conftestdir; then
4967   cd conftestdir
4968   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4969   cat > Imakefile <<'EOF'
4970 acfindx:
4971         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4972 EOF
4973   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4974     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4975     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4976     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4977     for ac_extension in a so sl; do
4978       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4979         test -f $ac_im_libdir/libX11.$ac_extension; then
4980         ac_im_usrlibdir=$ac_im_libdir; break
4981       fi
4982     done
4983     # Screen out bogus values from the imake configuration.  They are
4984     # bogus both because they are the default anyway, and because
4985     # using them would break gcc on systems where it needs fixed includes.
4986     case "$ac_im_incroot" in
4987         /usr/include) ;;
4988         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4989     esac
4990     case "$ac_im_usrlibdir" in
4991         /usr/lib | /lib) ;;
4992         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4993     esac
4994   fi
4995   cd ..
4996   rm -fr conftestdir
4997 fi
4998
4999 if test "$ac_x_includes" = NO; then
5000   # Guess where to find include files, by looking for this one X11 .h file.
5001   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5002
5003   # First, try using that file with no special directory specified.
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 #include <$x_direct_test_include>
5008 EOF
5009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5010 { (eval echo configure:5011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5012 if test -z "$ac_err"; then
5013   rm -rf conftest*
5014   # We can compile using X headers with no special include directory.
5015 ac_x_includes=
5016 else
5017   echo "$ac_err" >&5
5018   echo "configure: failed program was:" >&5
5019   cat conftest.$ac_ext >&5
5020   rm -rf conftest*
5021   # Look for the header file in a standard set of common directories.
5022 # Check X11 before X11Rn because it is often a symlink to the current release.
5023   for ac_dir in               \
5024     /usr/X11/include          \
5025     /usr/X11R6/include        \
5026     /usr/X11R5/include        \
5027     /usr/X11R4/include        \
5028                               \
5029     /usr/include/X11          \
5030     /usr/include/X11R6        \
5031     /usr/include/X11R5        \
5032     /usr/include/X11R4        \
5033                               \
5034     /usr/local/X11/include    \
5035     /usr/local/X11R6/include  \
5036     /usr/local/X11R5/include  \
5037     /usr/local/X11R4/include  \
5038                               \
5039     /usr/local/include/X11    \
5040     /usr/local/include/X11R6  \
5041     /usr/local/include/X11R5  \
5042     /usr/local/include/X11R4  \
5043                               \
5044     /usr/X386/include         \
5045     /usr/x386/include         \
5046     /usr/XFree86/include/X11  \
5047                               \
5048     /usr/include              \
5049     /usr/local/include        \
5050     /usr/unsupported/include  \
5051     /usr/athena/include       \
5052     /usr/local/x11r5/include  \
5053     /usr/lpp/Xamples/include  \
5054                               \
5055     /usr/openwin/include      \
5056     /usr/openwin/share/include \
5057     ; \
5058   do
5059     if test -r "$ac_dir/$x_direct_test_include"; then
5060       ac_x_includes=$ac_dir
5061       break
5062     fi
5063   done
5064 fi
5065 rm -f conftest*
5066 fi # $ac_x_includes = NO
5067
5068 if test "$ac_x_libraries" = NO; then
5069   # Check for the libraries.
5070
5071   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5072   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5073
5074   # See if we find them without any special options.
5075   # Don't add to $LIBS permanently.
5076   ac_save_LIBS="$LIBS"
5077   LIBS="-l$x_direct_test_library $LIBS"
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081
5082 int main() {
5083 ${x_direct_test_function}()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   LIBS="$ac_save_LIBS"
5089 # We can link X programs with no special library path.
5090 ac_x_libraries=
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   LIBS="$ac_save_LIBS"
5096 # First see if replacing the include by lib works.
5097 # Check X11 before X11Rn because it is often a symlink to the current release.
5098 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5099     /usr/X11/lib          \
5100     /usr/X11R6/lib        \
5101     /usr/X11R5/lib        \
5102     /usr/X11R4/lib        \
5103                           \
5104     /usr/lib/X11          \
5105     /usr/lib/X11R6        \
5106     /usr/lib/X11R5        \
5107     /usr/lib/X11R4        \
5108                           \
5109     /usr/local/X11/lib    \
5110     /usr/local/X11R6/lib  \
5111     /usr/local/X11R5/lib  \
5112     /usr/local/X11R4/lib  \
5113                           \
5114     /usr/local/lib/X11    \
5115     /usr/local/lib/X11R6  \
5116     /usr/local/lib/X11R5  \
5117     /usr/local/lib/X11R4  \
5118                           \
5119     /usr/X386/lib         \
5120     /usr/x386/lib         \
5121     /usr/XFree86/lib/X11  \
5122                           \
5123     /usr/lib              \
5124     /usr/local/lib        \
5125     /usr/unsupported/lib  \
5126     /usr/athena/lib       \
5127     /usr/local/x11r5/lib  \
5128     /usr/lpp/Xamples/lib  \
5129     /lib/usr/lib/X11      \
5130                           \
5131     /usr/openwin/lib      \
5132     /usr/openwin/share/lib \
5133     ; \
5134 do
5135   for ac_extension in a so sl; do
5136     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5137       ac_x_libraries=$ac_dir
5138       break 2
5139     fi
5140   done
5141 done
5142 fi
5143 rm -f conftest*
5144 fi # $ac_x_libraries = NO
5145
5146 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5147   # Didn't find X anywhere.  Cache the known absence of X.
5148   ac_cv_have_x="have_x=no"
5149 else
5150   # Record where we found X for the cache.
5151   ac_cv_have_x="have_x=yes \
5152                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5153 fi
5154 fi
5155   fi
5156   eval "$ac_cv_have_x"
5157 fi # $with_x != no
5158
5159 if test "$have_x" != yes; then
5160   echo "$ac_t""$have_x" 1>&6
5161   no_x=yes
5162 else
5163   # If each of the values was on the command line, it overrides each guess.
5164   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5165   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5166   # Update the cache value to reflect the command line values.
5167   ac_cv_have_x="have_x=yes \
5168                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5169   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5170 fi
5171
5172 if test "$no_x" = yes; then
5173   # Not all programs may use this symbol, but it does not hurt to define it.
5174   cat >> confdefs.h <<\EOF
5175 #define X_DISPLAY_MISSING 1
5176 EOF
5177
5178   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5179 else
5180   if test -n "$x_includes"; then
5181     X_CFLAGS="$X_CFLAGS -I$x_includes"
5182   fi
5183
5184   # It would also be nice to do this for all -L options, not just this one.
5185   if test -n "$x_libraries"; then
5186     X_LIBS="$X_LIBS -L$x_libraries"
5187     # For Solaris; some versions of Sun CC require a space after -R and
5188     # others require no space.  Words are not sufficient . . . .
5189     case "`(uname -sr) 2>/dev/null`" in
5190     "SunOS 5"*)
5191       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5192 echo "configure:5193: checking whether -R must be followed by a space" >&5
5193       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5194       cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197
5198 int main() {
5199
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203   rm -rf conftest*
5204   ac_R_nospace=yes
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -rf conftest*
5209   ac_R_nospace=no
5210 fi
5211 rm -f conftest*
5212       if test $ac_R_nospace = yes; then
5213         echo "$ac_t""no" 1>&6
5214         X_LIBS="$X_LIBS -R$x_libraries"
5215       else
5216         LIBS="$ac_xsave_LIBS -R $x_libraries"
5217         cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220
5221 int main() {
5222
5223 ; return 0; }
5224 EOF
5225 if { (eval echo configure:5226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5226   rm -rf conftest*
5227   ac_R_space=yes
5228 else
5229   echo "configure: failed program was:" >&5
5230   cat conftest.$ac_ext >&5
5231   rm -rf conftest*
5232   ac_R_space=no
5233 fi
5234 rm -f conftest*
5235         if test $ac_R_space = yes; then
5236           echo "$ac_t""yes" 1>&6
5237           X_LIBS="$X_LIBS -R $x_libraries"
5238         else
5239           echo "$ac_t""neither works" 1>&6
5240         fi
5241       fi
5242       LIBS="$ac_xsave_LIBS"
5243     esac
5244   fi
5245
5246   # Check for system-dependent libraries X programs must link with.
5247   # Do this before checking for the system-independent R6 libraries
5248   # (-lICE), since we may need -lsocket or whatever for X linking.
5249
5250   if test "$ISC" = yes; then
5251     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5252   else
5253     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5254     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5255     # the Alpha needs dnet_stub (dnet does not exist).
5256     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5257 echo "configure:5258: checking for dnet_ntoa in -ldnet" >&5
5258 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5260   echo $ac_n "(cached) $ac_c" 1>&6
5261 else
5262   ac_save_LIBS="$LIBS"
5263 LIBS="-ldnet  $LIBS"
5264 cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267 /* Override any gcc2 internal prototype to avoid an error.  */
5268 /* We use char because int might match the return type of a gcc2
5269     builtin and then its argument prototype would still apply.  */
5270 char dnet_ntoa();
5271
5272 int main() {
5273 dnet_ntoa()
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5277   rm -rf conftest*
5278   eval "ac_cv_lib_$ac_lib_var=yes"
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -rf conftest*
5283   eval "ac_cv_lib_$ac_lib_var=no"
5284 fi
5285 rm -f conftest*
5286 LIBS="$ac_save_LIBS"
5287
5288 fi
5289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5290   echo "$ac_t""yes" 1>&6
5291   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5292 else
5293   echo "$ac_t""no" 1>&6
5294 fi
5295
5296     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5297       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5298 echo "configure:5299: checking for dnet_ntoa in -ldnet_stub" >&5
5299 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5301   echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303   ac_save_LIBS="$LIBS"
5304 LIBS="-ldnet_stub  $LIBS"
5305 cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308 /* Override any gcc2 internal prototype to avoid an error.  */
5309 /* We use char because int might match the return type of a gcc2
5310     builtin and then its argument prototype would still apply.  */
5311 char dnet_ntoa();
5312
5313 int main() {
5314 dnet_ntoa()
5315 ; return 0; }
5316 EOF
5317 if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5318   rm -rf conftest*
5319   eval "ac_cv_lib_$ac_lib_var=yes"
5320 else
5321   echo "configure: failed program was:" >&5
5322   cat conftest.$ac_ext >&5
5323   rm -rf conftest*
5324   eval "ac_cv_lib_$ac_lib_var=no"
5325 fi
5326 rm -f conftest*
5327 LIBS="$ac_save_LIBS"
5328
5329 fi
5330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5331   echo "$ac_t""yes" 1>&6
5332   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5333 else
5334   echo "$ac_t""no" 1>&6
5335 fi
5336
5337     fi
5338
5339     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5340     # to get the SysV transport functions.
5341     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5342     # needs -lnsl.
5343     # The nsl library prevents programs from opening the X display
5344     # on Irix 5.2, according to dickey@clark.net.
5345     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5346 echo "configure:5347: checking for gethostbyname" >&5
5347 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5348   echo $ac_n "(cached) $ac_c" 1>&6
5349 else
5350   cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353 /* System header to define __stub macros and hopefully few prototypes,
5354     which can conflict with char gethostbyname(); below.  */
5355 #include <assert.h>
5356 /* Override any gcc2 internal prototype to avoid an error.  */
5357 /* We use char because int might match the return type of a gcc2
5358     builtin and then its argument prototype would still apply.  */
5359 char gethostbyname();
5360
5361 int main() {
5362
5363 /* The GNU C library defines this for functions which it implements
5364     to always fail with ENOSYS.  Some functions are actually named
5365     something starting with __ and the normal name is an alias.  */
5366 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5367 choke me
5368 #else
5369 gethostbyname();
5370 #endif
5371
5372 ; return 0; }
5373 EOF
5374 if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5375   rm -rf conftest*
5376   eval "ac_cv_func_gethostbyname=yes"
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380   rm -rf conftest*
5381   eval "ac_cv_func_gethostbyname=no"
5382 fi
5383 rm -f conftest*
5384 fi
5385
5386 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5387   echo "$ac_t""yes" 1>&6
5388   :
5389 else
5390   echo "$ac_t""no" 1>&6
5391 fi
5392
5393     if test $ac_cv_func_gethostbyname = no; then
5394       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5395 echo "configure:5396: checking for gethostbyname in -lnsl" >&5
5396 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5397 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5398   echo $ac_n "(cached) $ac_c" 1>&6
5399 else
5400   ac_save_LIBS="$LIBS"
5401 LIBS="-lnsl  $LIBS"
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 /* Override any gcc2 internal prototype to avoid an error.  */
5406 /* We use char because int might match the return type of a gcc2
5407     builtin and then its argument prototype would still apply.  */
5408 char gethostbyname();
5409
5410 int main() {
5411 gethostbyname()
5412 ; return 0; }
5413 EOF
5414 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5415   rm -rf conftest*
5416   eval "ac_cv_lib_$ac_lib_var=yes"
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420   rm -rf conftest*
5421   eval "ac_cv_lib_$ac_lib_var=no"
5422 fi
5423 rm -f conftest*
5424 LIBS="$ac_save_LIBS"
5425
5426 fi
5427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5428   echo "$ac_t""yes" 1>&6
5429   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5430 else
5431   echo "$ac_t""no" 1>&6
5432 fi
5433
5434     fi
5435
5436     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5437     # socket/setsockopt and other routines are undefined under SCO ODT
5438     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5439     # on later versions), says simon@lia.di.epfl.ch: it contains
5440     # gethostby* variants that don't use the nameserver (or something).
5441     # -lsocket must be given before -lnsl if both are needed.
5442     # We assume that if connect needs -lnsl, so does gethostbyname.
5443     echo $ac_n "checking for connect""... $ac_c" 1>&6
5444 echo "configure:5445: checking for connect" >&5
5445 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5446   echo $ac_n "(cached) $ac_c" 1>&6
5447 else
5448   cat > conftest.$ac_ext <<EOF
5449 #line 5450 "configure"
5450 #include "confdefs.h"
5451 /* System header to define __stub macros and hopefully few prototypes,
5452     which can conflict with char connect(); below.  */
5453 #include <assert.h>
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 /* We use char because int might match the return type of a gcc2
5456     builtin and then its argument prototype would still apply.  */
5457 char connect();
5458
5459 int main() {
5460
5461 /* The GNU C library defines this for functions which it implements
5462     to always fail with ENOSYS.  Some functions are actually named
5463     something starting with __ and the normal name is an alias.  */
5464 #if defined (__stub_connect) || defined (__stub___connect)
5465 choke me
5466 #else
5467 connect();
5468 #endif
5469
5470 ; return 0; }
5471 EOF
5472 if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5473   rm -rf conftest*
5474   eval "ac_cv_func_connect=yes"
5475 else
5476   echo "configure: failed program was:" >&5
5477   cat conftest.$ac_ext >&5
5478   rm -rf conftest*
5479   eval "ac_cv_func_connect=no"
5480 fi
5481 rm -f conftest*
5482 fi
5483
5484 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5485   echo "$ac_t""yes" 1>&6
5486   :
5487 else
5488   echo "$ac_t""no" 1>&6
5489 fi
5490
5491     if test $ac_cv_func_connect = no; then
5492       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5493 echo "configure:5494: checking for connect in -lsocket" >&5
5494 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   ac_save_LIBS="$LIBS"
5499 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5500 cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* Override any gcc2 internal prototype to avoid an error.  */
5504 /* We use char because int might match the return type of a gcc2
5505     builtin and then its argument prototype would still apply.  */
5506 char connect();
5507
5508 int main() {
5509 connect()
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5513   rm -rf conftest*
5514   eval "ac_cv_lib_$ac_lib_var=yes"
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   eval "ac_cv_lib_$ac_lib_var=no"
5520 fi
5521 rm -f conftest*
5522 LIBS="$ac_save_LIBS"
5523
5524 fi
5525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5526   echo "$ac_t""yes" 1>&6
5527   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5528 else
5529   echo "$ac_t""no" 1>&6
5530 fi
5531
5532     fi
5533
5534     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5535     echo $ac_n "checking for remove""... $ac_c" 1>&6
5536 echo "configure:5537: checking for remove" >&5
5537 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 /* System header to define __stub macros and hopefully few prototypes,
5544     which can conflict with char remove(); below.  */
5545 #include <assert.h>
5546 /* Override any gcc2 internal prototype to avoid an error.  */
5547 /* We use char because int might match the return type of a gcc2
5548     builtin and then its argument prototype would still apply.  */
5549 char remove();
5550
5551 int main() {
5552
5553 /* The GNU C library defines this for functions which it implements
5554     to always fail with ENOSYS.  Some functions are actually named
5555     something starting with __ and the normal name is an alias.  */
5556 #if defined (__stub_remove) || defined (__stub___remove)
5557 choke me
5558 #else
5559 remove();
5560 #endif
5561
5562 ; return 0; }
5563 EOF
5564 if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5565   rm -rf conftest*
5566   eval "ac_cv_func_remove=yes"
5567 else
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   eval "ac_cv_func_remove=no"
5572 fi
5573 rm -f conftest*
5574 fi
5575
5576 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5577   echo "$ac_t""yes" 1>&6
5578   :
5579 else
5580   echo "$ac_t""no" 1>&6
5581 fi
5582
5583     if test $ac_cv_func_remove = no; then
5584       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5585 echo "configure:5586: checking for remove in -lposix" >&5
5586 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5587 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5588   echo $ac_n "(cached) $ac_c" 1>&6
5589 else
5590   ac_save_LIBS="$LIBS"
5591 LIBS="-lposix  $LIBS"
5592 cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char remove();
5599
5600 int main() {
5601 remove()
5602 ; return 0; }
5603 EOF
5604 if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5605   rm -rf conftest*
5606   eval "ac_cv_lib_$ac_lib_var=yes"
5607 else
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -rf conftest*
5611   eval "ac_cv_lib_$ac_lib_var=no"
5612 fi
5613 rm -f conftest*
5614 LIBS="$ac_save_LIBS"
5615
5616 fi
5617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5618   echo "$ac_t""yes" 1>&6
5619   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5620 else
5621   echo "$ac_t""no" 1>&6
5622 fi
5623
5624     fi
5625
5626     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5627     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5628 echo "configure:5629: checking for shmat" >&5
5629 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 /* System header to define __stub macros and hopefully few prototypes,
5636     which can conflict with char shmat(); below.  */
5637 #include <assert.h>
5638 /* Override any gcc2 internal prototype to avoid an error.  */
5639 /* We use char because int might match the return type of a gcc2
5640     builtin and then its argument prototype would still apply.  */
5641 char shmat();
5642
5643 int main() {
5644
5645 /* The GNU C library defines this for functions which it implements
5646     to always fail with ENOSYS.  Some functions are actually named
5647     something starting with __ and the normal name is an alias.  */
5648 #if defined (__stub_shmat) || defined (__stub___shmat)
5649 choke me
5650 #else
5651 shmat();
5652 #endif
5653
5654 ; return 0; }
5655 EOF
5656 if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5657   rm -rf conftest*
5658   eval "ac_cv_func_shmat=yes"
5659 else
5660   echo "configure: failed program was:" >&5
5661   cat conftest.$ac_ext >&5
5662   rm -rf conftest*
5663   eval "ac_cv_func_shmat=no"
5664 fi
5665 rm -f conftest*
5666 fi
5667
5668 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670   :
5671 else
5672   echo "$ac_t""no" 1>&6
5673 fi
5674
5675     if test $ac_cv_func_shmat = no; then
5676       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5677 echo "configure:5678: checking for shmat in -lipc" >&5
5678 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5680   echo $ac_n "(cached) $ac_c" 1>&6
5681 else
5682   ac_save_LIBS="$LIBS"
5683 LIBS="-lipc  $LIBS"
5684 cat > conftest.$ac_ext <<EOF
5685 #line 5686 "configure"
5686 #include "confdefs.h"
5687 /* Override any gcc2 internal prototype to avoid an error.  */
5688 /* We use char because int might match the return type of a gcc2
5689     builtin and then its argument prototype would still apply.  */
5690 char shmat();
5691
5692 int main() {
5693 shmat()
5694 ; return 0; }
5695 EOF
5696 if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5697   rm -rf conftest*
5698   eval "ac_cv_lib_$ac_lib_var=yes"
5699 else
5700   echo "configure: failed program was:" >&5
5701   cat conftest.$ac_ext >&5
5702   rm -rf conftest*
5703   eval "ac_cv_lib_$ac_lib_var=no"
5704 fi
5705 rm -f conftest*
5706 LIBS="$ac_save_LIBS"
5707
5708 fi
5709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5712 else
5713   echo "$ac_t""no" 1>&6
5714 fi
5715
5716     fi
5717   fi
5718
5719   # Check for libraries that X11R6 Xt/Xaw programs need.
5720   ac_save_LDFLAGS="$LDFLAGS"
5721   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5722   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5723   # check for ICE first), but we must link in the order -lSM -lICE or
5724   # we get undefined symbols.  So assume we have SM if we have ICE.
5725   # These have to be linked with before -lX11, unlike the other
5726   # libraries we check for below, so use a different variable.
5727   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5728   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5729 echo "configure:5730: checking for IceConnectionNumber in -lICE" >&5
5730 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5732   echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734   ac_save_LIBS="$LIBS"
5735 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5736 cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* Override any gcc2 internal prototype to avoid an error.  */
5740 /* We use char because int might match the return type of a gcc2
5741     builtin and then its argument prototype would still apply.  */
5742 char IceConnectionNumber();
5743
5744 int main() {
5745 IceConnectionNumber()
5746 ; return 0; }
5747 EOF
5748 if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5749   rm -rf conftest*
5750   eval "ac_cv_lib_$ac_lib_var=yes"
5751 else
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   eval "ac_cv_lib_$ac_lib_var=no"
5756 fi
5757 rm -f conftest*
5758 LIBS="$ac_save_LIBS"
5759
5760 fi
5761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5762   echo "$ac_t""yes" 1>&6
5763   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767
5768   LDFLAGS="$ac_save_LDFLAGS"
5769
5770 fi
5771
5772
5773 for ac_hdr in \
5774         assert.h \
5775         fcntl.h \
5776         grp.h \
5777         pwd.h \
5778         libc.h \
5779         limits.h \
5780         stdarg.h \
5781         stdlib.h \
5782         stdint.h \
5783         string.h \
5784         termios.h \
5785         unistd.h \
5786         sys/bitypes.h \
5787         sys/byteorder.h \
5788         sys/ioctl.h \
5789         sys/select.h \
5790         sys/sockio.h \
5791         sys/time.h \
5792         sys/socket.h \
5793         arpa/nameser.h \
5794         resolv.h \
5795         mtio.h \
5796         sys/mtio.h \
5797         sys/tape.h \
5798         regex.h \
5799
5800 do
5801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5803 echo "configure:5804: checking for $ac_hdr" >&5
5804 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5805   echo $ac_n "(cached) $ac_c" 1>&6
5806 else
5807   cat > conftest.$ac_ext <<EOF
5808 #line 5809 "configure"
5809 #include "confdefs.h"
5810 #include <$ac_hdr>
5811 EOF
5812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5813 { (eval echo configure:5814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5815 if test -z "$ac_err"; then
5816   rm -rf conftest*
5817   eval "ac_cv_header_$ac_safe=yes"
5818 else
5819   echo "$ac_err" >&5
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -rf conftest*
5823   eval "ac_cv_header_$ac_safe=no"
5824 fi
5825 rm -f conftest*
5826 fi
5827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5828   echo "$ac_t""yes" 1>&6
5829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5830   cat >> confdefs.h <<EOF
5831 #define $ac_tr_hdr 1
5832 EOF
5833  
5834 else
5835   echo "$ac_t""no" 1>&6
5836 fi
5837 done
5838
5839 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5840 echo "configure:5841: checking for ANSI C header files" >&5
5841 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5842   echo $ac_n "(cached) $ac_c" 1>&6
5843 else
5844   cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 #include <stdlib.h>
5848 #include <stdarg.h>
5849 #include <string.h>
5850 #include <float.h>
5851 EOF
5852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5853 { (eval echo configure:5854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5855 if test -z "$ac_err"; then
5856   rm -rf conftest*
5857   ac_cv_header_stdc=yes
5858 else
5859   echo "$ac_err" >&5
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   ac_cv_header_stdc=no
5864 fi
5865 rm -f conftest*
5866
5867 if test $ac_cv_header_stdc = yes; then
5868   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 #include <string.h>
5873 EOF
5874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5875   egrep "memchr" >/dev/null 2>&1; then
5876   :
5877 else
5878   rm -rf conftest*
5879   ac_cv_header_stdc=no
5880 fi
5881 rm -f conftest*
5882
5883 fi
5884
5885 if test $ac_cv_header_stdc = yes; then
5886   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5887 cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 #include <stdlib.h>
5891 EOF
5892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5893   egrep "free" >/dev/null 2>&1; then
5894   :
5895 else
5896   rm -rf conftest*
5897   ac_cv_header_stdc=no
5898 fi
5899 rm -f conftest*
5900
5901 fi
5902
5903 if test $ac_cv_header_stdc = yes; then
5904   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5905 if test "$cross_compiling" = yes; then
5906   :
5907 else
5908   cat > conftest.$ac_ext <<EOF
5909 #line 5910 "configure"
5910 #include "confdefs.h"
5911 #include <ctype.h>
5912 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5913 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5914 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5915 int main () { int i; for (i = 0; i < 256; i++)
5916 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5917 exit (0); }
5918
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5921 then
5922   :
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -fr conftest*
5927   ac_cv_header_stdc=no
5928 fi
5929 rm -fr conftest*
5930 fi
5931
5932 fi
5933 fi
5934
5935 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5936 if test $ac_cv_header_stdc = yes; then
5937   cat >> confdefs.h <<\EOF
5938 #define STDC_HEADERS 1
5939 EOF
5940
5941 fi
5942
5943 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
5944 echo "configure:5945: checking whether sys/types.h defines makedev" >&5
5945 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
5946   echo $ac_n "(cached) $ac_c" 1>&6
5947 else
5948   cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951 #include <sys/types.h>
5952 int main() {
5953 return makedev(0, 0);
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   ac_cv_header_sys_types_h_makedev=yes
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   ac_cv_header_sys_types_h_makedev=no
5964 fi
5965 rm -f conftest*
5966
5967 fi
5968
5969 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
5970
5971 if test $ac_cv_header_sys_types_h_makedev = no; then
5972 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
5973 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
5974 echo "configure:5975: checking for sys/mkdev.h" >&5
5975 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5976   echo $ac_n "(cached) $ac_c" 1>&6
5977 else
5978   cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 #include <sys/mkdev.h>
5982 EOF
5983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5984 { (eval echo configure:5985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5986 if test -z "$ac_err"; then
5987   rm -rf conftest*
5988   eval "ac_cv_header_$ac_safe=yes"
5989 else
5990   echo "$ac_err" >&5
5991   echo "configure: failed program was:" >&5
5992   cat conftest.$ac_ext >&5
5993   rm -rf conftest*
5994   eval "ac_cv_header_$ac_safe=no"
5995 fi
5996 rm -f conftest*
5997 fi
5998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5999   echo "$ac_t""yes" 1>&6
6000   cat >> confdefs.h <<\EOF
6001 #define MAJOR_IN_MKDEV 1
6002 EOF
6003
6004 else
6005   echo "$ac_t""no" 1>&6
6006 fi
6007
6008
6009   if test $ac_cv_header_sys_mkdev_h = no; then
6010 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
6011 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
6012 echo "configure:6013: checking for sys/sysmacros.h" >&5
6013 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6014   echo $ac_n "(cached) $ac_c" 1>&6
6015 else
6016   cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 #include <sys/sysmacros.h>
6020 EOF
6021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6022 { (eval echo configure:6023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6024 if test -z "$ac_err"; then
6025   rm -rf conftest*
6026   eval "ac_cv_header_$ac_safe=yes"
6027 else
6028   echo "$ac_err" >&5
6029   echo "configure: failed program was:" >&5
6030   cat conftest.$ac_ext >&5
6031   rm -rf conftest*
6032   eval "ac_cv_header_$ac_safe=no"
6033 fi
6034 rm -f conftest*
6035 fi
6036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6037   echo "$ac_t""yes" 1>&6
6038   cat >> confdefs.h <<\EOF
6039 #define MAJOR_IN_SYSMACROS 1
6040 EOF
6041
6042 else
6043   echo "$ac_t""no" 1>&6
6044 fi
6045
6046   fi
6047 fi
6048
6049 ac_header_dirent=no
6050 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6051 do
6052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6053 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6054 echo "configure:6055: checking for $ac_hdr that defines DIR" >&5
6055 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
6056   echo $ac_n "(cached) $ac_c" 1>&6
6057 else
6058   cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 #include <sys/types.h>
6062 #include <$ac_hdr>
6063 int main() {
6064 DIR *dirp = 0;
6065 ; return 0; }
6066 EOF
6067 if { (eval echo configure:6068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6068   rm -rf conftest*
6069   eval "ac_cv_header_dirent_$ac_safe=yes"
6070 else
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_header_dirent_$ac_safe=no"
6075 fi
6076 rm -f conftest*
6077 fi
6078 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6081   cat >> confdefs.h <<EOF
6082 #define $ac_tr_hdr 1
6083 EOF
6084  ac_header_dirent=$ac_hdr; break
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088 done
6089 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6090 if test $ac_header_dirent = dirent.h; then
6091 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6092 echo "configure:6093: checking for opendir in -ldir" >&5
6093 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6094 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   ac_save_LIBS="$LIBS"
6098 LIBS="-ldir  $LIBS"
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char opendir();
6106
6107 int main() {
6108 opendir()
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_lib_$ac_lib_var=no"
6119 fi
6120 rm -f conftest*
6121 LIBS="$ac_save_LIBS"
6122
6123 fi
6124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6125   echo "$ac_t""yes" 1>&6
6126   LIBS="$LIBS -ldir"
6127 else
6128   echo "$ac_t""no" 1>&6
6129 fi
6130
6131 else
6132 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6133 echo "configure:6134: checking for opendir in -lx" >&5
6134 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6136   echo $ac_n "(cached) $ac_c" 1>&6
6137 else
6138   ac_save_LIBS="$LIBS"
6139 LIBS="-lx  $LIBS"
6140 cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char opendir();
6147
6148 int main() {
6149 opendir()
6150 ; return 0; }
6151 EOF
6152 if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6153   rm -rf conftest*
6154   eval "ac_cv_lib_$ac_lib_var=yes"
6155 else
6156   echo "configure: failed program was:" >&5
6157   cat conftest.$ac_ext >&5
6158   rm -rf conftest*
6159   eval "ac_cv_lib_$ac_lib_var=no"
6160 fi
6161 rm -f conftest*
6162 LIBS="$ac_save_LIBS"
6163
6164 fi
6165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6166   echo "$ac_t""yes" 1>&6
6167   LIBS="$LIBS -lx"
6168 else
6169   echo "$ac_t""no" 1>&6
6170 fi
6171
6172 fi
6173
6174 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
6175 echo "configure:6176: checking whether stat file-mode macros are broken" >&5
6176 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 #include <sys/types.h>
6183 #include <sys/stat.h>
6184
6185 #if defined(S_ISBLK) && defined(S_IFDIR)
6186 # if S_ISBLK (S_IFDIR)
6187 You lose.
6188 # endif
6189 #endif
6190
6191 #if defined(S_ISBLK) && defined(S_IFCHR)
6192 # if S_ISBLK (S_IFCHR)
6193 You lose.
6194 # endif
6195 #endif
6196
6197 #if defined(S_ISLNK) && defined(S_IFREG)
6198 # if S_ISLNK (S_IFREG)
6199 You lose.
6200 # endif
6201 #endif
6202
6203 #if defined(S_ISSOCK) && defined(S_IFREG)
6204 # if S_ISSOCK (S_IFREG)
6205 You lose.
6206 # endif
6207 #endif
6208
6209 EOF
6210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6211   egrep "You lose" >/dev/null 2>&1; then
6212   rm -rf conftest*
6213   ac_cv_header_stat_broken=yes
6214 else
6215   rm -rf conftest*
6216   ac_cv_header_stat_broken=no
6217 fi
6218 rm -f conftest*
6219
6220 fi
6221
6222 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
6223 if test $ac_cv_header_stat_broken = yes; then
6224   cat >> confdefs.h <<\EOF
6225 #define STAT_MACROS_BROKEN 1
6226 EOF
6227
6228 fi
6229
6230 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
6231 echo "configure:6232: checking for sys/wait.h that is POSIX.1 compatible" >&5
6232 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6233   echo $ac_n "(cached) $ac_c" 1>&6
6234 else
6235   cat > conftest.$ac_ext <<EOF
6236 #line 6237 "configure"
6237 #include "confdefs.h"
6238 #include <sys/types.h>
6239 #include <sys/wait.h>
6240 #ifndef WEXITSTATUS
6241 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6242 #endif
6243 #ifndef WIFEXITED
6244 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6245 #endif
6246 int main() {
6247 int s;
6248 wait (&s);
6249 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6250 ; return 0; }
6251 EOF
6252 if { (eval echo configure:6253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6253   rm -rf conftest*
6254   ac_cv_header_sys_wait_h=yes
6255 else
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   ac_cv_header_sys_wait_h=no
6260 fi
6261 rm -f conftest*
6262 fi
6263
6264 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6265 if test $ac_cv_header_sys_wait_h = yes; then
6266   cat >> confdefs.h <<\EOF
6267 #define HAVE_SYS_WAIT_H 1
6268 EOF
6269
6270 fi
6271
6272 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6273 echo "configure:6274: checking whether time.h and sys/time.h may both be included" >&5
6274 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6275   echo $ac_n "(cached) $ac_c" 1>&6
6276 else
6277   cat > conftest.$ac_ext <<EOF
6278 #line 6279 "configure"
6279 #include "confdefs.h"
6280 #include <sys/types.h>
6281 #include <sys/time.h>
6282 #include <time.h>
6283 int main() {
6284 struct tm *tp;
6285 ; return 0; }
6286 EOF
6287 if { (eval echo configure:6288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6288   rm -rf conftest*
6289   ac_cv_header_time=yes
6290 else
6291   echo "configure: failed program was:" >&5
6292   cat conftest.$ac_ext >&5
6293   rm -rf conftest*
6294   ac_cv_header_time=no
6295 fi
6296 rm -f conftest*
6297 fi
6298
6299 echo "$ac_t""$ac_cv_header_time" 1>&6
6300 if test $ac_cv_header_time = yes; then
6301   cat >> confdefs.h <<\EOF
6302 #define TIME_WITH_SYS_TIME 1
6303 EOF
6304
6305 fi
6306
6307 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
6308 echo "configure:6309: checking for st_blksize in struct stat" >&5
6309 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
6310   echo $ac_n "(cached) $ac_c" 1>&6
6311 else
6312   cat > conftest.$ac_ext <<EOF
6313 #line 6314 "configure"
6314 #include "confdefs.h"
6315 #include <sys/types.h>
6316 #include <sys/stat.h>
6317 int main() {
6318 struct stat s; s.st_blksize;
6319 ; return 0; }
6320 EOF
6321 if { (eval echo configure:6322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6322   rm -rf conftest*
6323   ac_cv_struct_st_blksize=yes
6324 else
6325   echo "configure: failed program was:" >&5
6326   cat conftest.$ac_ext >&5
6327   rm -rf conftest*
6328   ac_cv_struct_st_blksize=no
6329 fi
6330 rm -f conftest*
6331 fi
6332
6333 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6334 if test $ac_cv_struct_st_blksize = yes; then
6335   cat >> confdefs.h <<\EOF
6336 #define HAVE_ST_BLKSIZE 1
6337 EOF
6338
6339 fi
6340
6341 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
6342 echo "configure:6343: checking for st_blocks in struct stat" >&5
6343 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6344   echo $ac_n "(cached) $ac_c" 1>&6
6345 else
6346   cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6349 #include <sys/types.h>
6350 #include <sys/stat.h>
6351 int main() {
6352 struct stat s; s.st_blocks;
6353 ; return 0; }
6354 EOF
6355 if { (eval echo configure:6356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6356   rm -rf conftest*
6357   ac_cv_struct_st_blocks=yes
6358 else
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -rf conftest*
6362   ac_cv_struct_st_blocks=no
6363 fi
6364 rm -f conftest*
6365 fi
6366
6367 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6368 if test $ac_cv_struct_st_blocks = yes; then
6369   cat >> confdefs.h <<\EOF
6370 #define HAVE_ST_BLOCKS 1
6371 EOF
6372
6373 else
6374   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
6375 fi
6376
6377 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6378 echo "configure:6379: checking whether struct tm is in sys/time.h or time.h" >&5
6379 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6380   echo $ac_n "(cached) $ac_c" 1>&6
6381 else
6382   cat > conftest.$ac_ext <<EOF
6383 #line 6384 "configure"
6384 #include "confdefs.h"
6385 #include <sys/types.h>
6386 #include <time.h>
6387 int main() {
6388 struct tm *tp; tp->tm_sec;
6389 ; return 0; }
6390 EOF
6391 if { (eval echo configure:6392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6392   rm -rf conftest*
6393   ac_cv_struct_tm=time.h
6394 else
6395   echo "configure: failed program was:" >&5
6396   cat conftest.$ac_ext >&5
6397   rm -rf conftest*
6398   ac_cv_struct_tm=sys/time.h
6399 fi
6400 rm -f conftest*
6401 fi
6402
6403 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6404 if test $ac_cv_struct_tm = sys/time.h; then
6405   cat >> confdefs.h <<\EOF
6406 #define TM_IN_SYS_TIME 1
6407 EOF
6408
6409 fi
6410
6411 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
6412 echo "configure:6413: checking for tm_zone in struct tm" >&5
6413 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
6414   echo $ac_n "(cached) $ac_c" 1>&6
6415 else
6416   cat > conftest.$ac_ext <<EOF
6417 #line 6418 "configure"
6418 #include "confdefs.h"
6419 #include <sys/types.h>
6420 #include <$ac_cv_struct_tm>
6421 int main() {
6422 struct tm tm; tm.tm_zone;
6423 ; return 0; }
6424 EOF
6425 if { (eval echo configure:6426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6426   rm -rf conftest*
6427   ac_cv_struct_tm_zone=yes
6428 else
6429   echo "configure: failed program was:" >&5
6430   cat conftest.$ac_ext >&5
6431   rm -rf conftest*
6432   ac_cv_struct_tm_zone=no
6433 fi
6434 rm -f conftest*
6435 fi
6436
6437 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
6438 if test "$ac_cv_struct_tm_zone" = yes; then
6439   cat >> confdefs.h <<\EOF
6440 #define HAVE_TM_ZONE 1
6441 EOF
6442
6443 else
6444   echo $ac_n "checking for tzname""... $ac_c" 1>&6
6445 echo "configure:6446: checking for tzname" >&5
6446 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
6447   echo $ac_n "(cached) $ac_c" 1>&6
6448 else
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <time.h>
6453 #ifndef tzname /* For SGI.  */
6454 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
6455 #endif
6456 int main() {
6457 atoi(*tzname);
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461   rm -rf conftest*
6462   ac_cv_var_tzname=yes
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   ac_cv_var_tzname=no
6468 fi
6469 rm -f conftest*
6470 fi
6471
6472 echo "$ac_t""$ac_cv_var_tzname" 1>&6
6473   if test $ac_cv_var_tzname = yes; then
6474     cat >> confdefs.h <<\EOF
6475 #define HAVE_TZNAME 1
6476 EOF
6477
6478   fi
6479 fi
6480
6481
6482 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
6483 echo "configure:6484: checking for utime.h" >&5
6484 if eval "test \"`echo '$''{'ba_cv_header_utime_h'+set}'`\" = set"; then
6485   echo $ac_n "(cached) $ac_c" 1>&6
6486 else
6487   cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490
6491 #include <sys/types.h>
6492 #include <utime.h>
6493 int main() {
6494 struct utimbuf foo
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6498   rm -rf conftest*
6499   ba_cv_header_utime_h=yes
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   ba_cv_header_utime_h=no
6505 fi
6506 rm -f conftest*
6507 fi
6508
6509 echo "$ac_t""$ba_cv_header_utime_h" 1>&6
6510 test $ba_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
6511 #define HAVE_UTIME_H 1
6512 EOF
6513
6514
6515 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
6516 echo "configure:6517: checking for socklen_t" >&5
6517 if eval "test \"`echo '$''{'ba_cv_header_socklen_t'+set}'`\" = set"; then
6518   echo $ac_n "(cached) $ac_c" 1>&6
6519 else
6520   cat > conftest.$ac_ext <<EOF
6521 #line 6522 "configure"
6522 #include "confdefs.h"
6523
6524 #include <sys/types.h>
6525 #include <sys/socket.h>
6526 int main() {
6527 socklen_t x
6528 ; return 0; }
6529 EOF
6530 if { (eval echo configure:6531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6531   rm -rf conftest*
6532   ba_cv_header_socklen_t=yes
6533 else
6534   echo "configure: failed program was:" >&5
6535   cat conftest.$ac_ext >&5
6536   rm -rf conftest*
6537   ba_cv_header_socklen_t=no
6538 fi
6539 rm -f conftest*
6540 fi
6541
6542 echo "$ac_t""$ba_cv_header_socklen_t" 1>&6
6543 test $ba_cv_header_socklen_t = yes && cat >> confdefs.h <<\EOF
6544 #define HAVE_SOCKLEN_T 1
6545 EOF
6546
6547
6548 echo $ac_n "checking for bigendian""... $ac_c" 1>&6
6549 echo "configure:6550: checking for bigendian" >&5
6550 if eval "test \"`echo '$''{'ba_cv_bigendian'+set}'`\" = set"; then
6551   echo $ac_n "(cached) $ac_c" 1>&6
6552 else
6553   if test "$cross_compiling" = yes; then
6554   ba_cv_bigendian=no
6555 else
6556   cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 main(){long a=1L; char *p=(char *)&a; exit(*p);}
6560 EOF
6561 if { (eval echo configure:6562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6562 then
6563   ba_cv_bigendian=yes
6564 else
6565   echo "configure: failed program was:" >&5
6566   cat conftest.$ac_ext >&5
6567   rm -fr conftest*
6568   ba_cv_bigendian=no
6569 fi
6570 rm -fr conftest*
6571 fi
6572
6573 fi
6574
6575 echo "$ac_t""$ba_cv_bigendian" 1>&6
6576 test $ba_cv_bigendian = yes && cat >> confdefs.h <<\EOF
6577 #define HAVE_BIGENDIAN 1
6578 EOF
6579
6580
6581
6582 echo $ac_n "checking for working const""... $ac_c" 1>&6
6583 echo "configure:6584: checking for working const" >&5
6584 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6585   echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587   cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590
6591 int main() {
6592
6593 /* Ultrix mips cc rejects this.  */
6594 typedef int charset[2]; const charset x;
6595 /* SunOS 4.1.1 cc rejects this.  */
6596 char const *const *ccp;
6597 char **p;
6598 /* NEC SVR4.0.2 mips cc rejects this.  */
6599 struct point {int x, y;};
6600 static struct point const zero = {0,0};
6601 /* AIX XL C 1.02.0.0 rejects this.
6602    It does not let you subtract one const X* pointer from another in an arm
6603    of an if-expression whose if-part is not a constant expression */
6604 const char *g = "string";
6605 ccp = &g + (g ? g-g : 0);
6606 /* HPUX 7.0 cc rejects these. */
6607 ++ccp;
6608 p = (char**) ccp;
6609 ccp = (char const *const *) p;
6610 { /* SCO 3.2v4 cc rejects this.  */
6611   char *t;
6612   char const *s = 0 ? (char *) 0 : (char const *) 0;
6613
6614   *t++ = 0;
6615 }
6616 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6617   int x[] = {25, 17};
6618   const int *foo = &x[0];
6619   ++foo;
6620 }
6621 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6622   typedef const int *iptr;
6623   iptr p = 0;
6624   ++p;
6625 }
6626 { /* AIX XL C 1.02.0.0 rejects this saying
6627      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6628   struct s { int j; const int *ap[3]; };
6629   struct s *b; b->j = 5;
6630 }
6631 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6632   const int foo = 10;
6633 }
6634
6635 ; return 0; }
6636 EOF
6637 if { (eval echo configure:6638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6638   rm -rf conftest*
6639   ac_cv_c_const=yes
6640 else
6641   echo "configure: failed program was:" >&5
6642   cat conftest.$ac_ext >&5
6643   rm -rf conftest*
6644   ac_cv_c_const=no
6645 fi
6646 rm -f conftest*
6647 fi
6648
6649 echo "$ac_t""$ac_cv_c_const" 1>&6
6650 if test $ac_cv_c_const = no; then
6651   cat >> confdefs.h <<\EOF
6652 #define const 
6653 EOF
6654
6655 fi
6656
6657
6658
6659 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
6660 echo "configure:6661: checking how to get filesystem type" >&5
6661 fstype=no
6662 # The order of these tests is important.
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <sys/statvfs.h>
6667 #include <sys/fstyp.h>
6668 EOF
6669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6670 { (eval echo configure:6671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6672 if test -z "$ac_err"; then
6673   rm -rf conftest*
6674   cat >> confdefs.h <<\EOF
6675 #define FSTYPE_STATVFS 1
6676 EOF
6677  fstype=SVR4
6678 else
6679   echo "$ac_err" >&5
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682 fi
6683 rm -f conftest*
6684 if test $fstype = no; then
6685 cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 #include <sys/statfs.h>
6689 #include <sys/fstyp.h>
6690 EOF
6691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6692 { (eval echo configure:6693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6694 if test -z "$ac_err"; then
6695   rm -rf conftest*
6696   cat >> confdefs.h <<\EOF
6697 #define FSTYPE_USG_STATFS 1
6698 EOF
6699  fstype=SVR3
6700 else
6701   echo "$ac_err" >&5
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704 fi
6705 rm -f conftest*
6706 fi
6707 if test $fstype = no; then
6708 cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 #include <sys/statfs.h>
6712 #include <sys/vmount.h>
6713 EOF
6714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6715 { (eval echo configure:6716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6717 if test -z "$ac_err"; then
6718   rm -rf conftest*
6719   cat >> confdefs.h <<\EOF
6720 #define FSTYPE_AIX_STATFS 1
6721 EOF
6722  fstype=AIX
6723 else
6724   echo "$ac_err" >&5
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727 fi
6728 rm -f conftest*
6729 fi
6730 if test $fstype = no; then  
6731 cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 #include <mntent.h>
6735 EOF
6736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6737 { (eval echo configure:6738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6739 if test -z "$ac_err"; then
6740   rm -rf conftest*
6741   cat >> confdefs.h <<\EOF
6742 #define FSTYPE_MNTENT 1
6743 EOF
6744  fstype=4.3BSD
6745 else
6746   echo "$ac_err" >&5
6747   echo "configure: failed program was:" >&5
6748   cat conftest.$ac_ext >&5
6749 fi
6750 rm -f conftest*
6751 fi
6752 if test $fstype = no; then  
6753 cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 #include <sys/mount.h>
6757 EOF
6758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6759   egrep "f_type;" >/dev/null 2>&1; then
6760   rm -rf conftest*
6761   cat >> confdefs.h <<\EOF
6762 #define FSTYPE_STATFS 1
6763 EOF
6764  fstype=4.4BSD/OSF1
6765 fi
6766 rm -f conftest*
6767
6768 fi
6769 if test $fstype = no; then  
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 #include <sys/mount.h>
6774 #include <sys/fs_types.h>
6775 EOF
6776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6777 { (eval echo configure:6778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6779 if test -z "$ac_err"; then
6780   rm -rf conftest*
6781   cat >> confdefs.h <<\EOF
6782 #define FSTYPE_GETMNT 1
6783 EOF
6784  fstype=Ultrix
6785 else
6786   echo "$ac_err" >&5
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789 fi
6790 rm -f conftest*
6791 fi
6792 echo "$ac_t""$fstype" 1>&6
6793
6794 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6795 echo "configure:6796: checking return type of signal handlers" >&5
6796 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6797   echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799   cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 #include <sys/types.h>
6803 #include <signal.h>
6804 #ifdef signal
6805 #undef signal
6806 #endif
6807 #ifdef __cplusplus
6808 extern "C" void (*signal (int, void (*)(int)))(int);
6809 #else
6810 void (*signal ()) ();
6811 #endif
6812
6813 int main() {
6814 int i;
6815 ; return 0; }
6816 EOF
6817 if { (eval echo configure:6818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6818   rm -rf conftest*
6819   ac_cv_type_signal=void
6820 else
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   ac_cv_type_signal=int
6825 fi
6826 rm -f conftest*
6827 fi
6828
6829 echo "$ac_t""$ac_cv_type_signal" 1>&6
6830 cat >> confdefs.h <<EOF
6831 #define RETSIGTYPE $ac_cv_type_signal
6832 EOF
6833
6834
6835
6836 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
6837 echo "configure:6838: checking for type of signal functions" >&5
6838 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
6839   echo $ac_n "(cached) $ac_c" 1>&6
6840 else
6841   
6842   cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 #include <signal.h>
6846 int main() {
6847
6848     sigset_t ss;
6849     struct sigaction sa;
6850     sigemptyset(&ss); sigsuspend(&ss);
6851     sigaction(SIGINT, &sa, (struct sigaction *) 0);
6852     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
6853   
6854 ; return 0; }
6855 EOF
6856 if { (eval echo configure:6857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6857   rm -rf conftest*
6858   bash_cv_signal_vintage=posix
6859 else
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   
6864     cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 #include <signal.h>
6868 int main() {
6869
6870         int mask = sigmask(SIGINT);
6871         sigsetmask(mask); sigblock(mask); sigpause(mask);
6872     
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6876   rm -rf conftest*
6877   bash_cv_signal_vintage=4.2bsd
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   
6883       cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886
6887         #include <signal.h>
6888         RETSIGTYPE foo() { }
6889 int main() {
6890
6891                 int mask = sigmask(SIGINT);
6892                 sigset(SIGINT, foo); sigrelse(SIGINT);
6893                 sighold(SIGINT); sigpause(SIGINT);
6894         
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   bash_cv_signal_vintage=svr3
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   bash_cv_signal_vintage=v7
6905     
6906 fi
6907 rm -f conftest*
6908   
6909 fi
6910 rm -f conftest*
6911
6912 fi
6913 rm -f conftest*
6914
6915 fi
6916
6917 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
6918 if test "$bash_cv_signal_vintage" = posix; then
6919 cat >> confdefs.h <<\EOF
6920 #define HAVE_POSIX_SIGNALS 1
6921 EOF
6922
6923 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
6924 cat >> confdefs.h <<\EOF
6925 #define HAVE_BSD_SIGNALS 1
6926 EOF
6927
6928 elif test "$bash_cv_signal_vintage" = svr3; then
6929 cat >> confdefs.h <<\EOF
6930 #define HAVE_USG_SIGHOLD 1
6931 EOF
6932
6933 fi
6934
6935 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6936 echo "configure:6937: checking for mode_t" >&5
6937 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6938   echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940   cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 #include <sys/types.h>
6944 #if STDC_HEADERS
6945 #include <stdlib.h>
6946 #include <stddef.h>
6947 #endif
6948 EOF
6949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6950   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6951   rm -rf conftest*
6952   ac_cv_type_mode_t=yes
6953 else
6954   rm -rf conftest*
6955   ac_cv_type_mode_t=no
6956 fi
6957 rm -f conftest*
6958
6959 fi
6960 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6961 if test $ac_cv_type_mode_t = no; then
6962   cat >> confdefs.h <<\EOF
6963 #define mode_t int
6964 EOF
6965
6966 fi
6967
6968 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6969 echo "configure:6970: checking for uid_t in sys/types.h" >&5
6970 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6971   echo $ac_n "(cached) $ac_c" 1>&6
6972 else
6973   cat > conftest.$ac_ext <<EOF
6974 #line 6975 "configure"
6975 #include "confdefs.h"
6976 #include <sys/types.h>
6977 EOF
6978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6979   egrep "uid_t" >/dev/null 2>&1; then
6980   rm -rf conftest*
6981   ac_cv_type_uid_t=yes
6982 else
6983   rm -rf conftest*
6984   ac_cv_type_uid_t=no
6985 fi
6986 rm -f conftest*
6987
6988 fi
6989
6990 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6991 if test $ac_cv_type_uid_t = no; then
6992   cat >> confdefs.h <<\EOF
6993 #define uid_t int
6994 EOF
6995
6996   cat >> confdefs.h <<\EOF
6997 #define gid_t int
6998 EOF
6999
7000 fi
7001
7002 echo $ac_n "checking for size_t""... $ac_c" 1>&6
7003 echo "configure:7004: checking for size_t" >&5
7004 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
7005   echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007   cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010 #include <sys/types.h>
7011 #if STDC_HEADERS
7012 #include <stdlib.h>
7013 #include <stddef.h>
7014 #endif
7015 EOF
7016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7017   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7018   rm -rf conftest*
7019   ac_cv_type_size_t=yes
7020 else
7021   rm -rf conftest*
7022   ac_cv_type_size_t=no
7023 fi
7024 rm -f conftest*
7025
7026 fi
7027 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7028 if test $ac_cv_type_size_t = no; then
7029   cat >> confdefs.h <<\EOF
7030 #define size_t unsigned
7031 EOF
7032
7033 fi
7034
7035 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7036 echo "configure:7037: checking for pid_t" >&5
7037 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 #include <sys/types.h>
7044 #if STDC_HEADERS
7045 #include <stdlib.h>
7046 #include <stddef.h>
7047 #endif
7048 EOF
7049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7050   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7051   rm -rf conftest*
7052   ac_cv_type_pid_t=yes
7053 else
7054   rm -rf conftest*
7055   ac_cv_type_pid_t=no
7056 fi
7057 rm -f conftest*
7058
7059 fi
7060 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7061 if test $ac_cv_type_pid_t = no; then
7062   cat >> confdefs.h <<\EOF
7063 #define pid_t int
7064 EOF
7065
7066 fi
7067
7068 echo $ac_n "checking for off_t""... $ac_c" 1>&6
7069 echo "configure:7070: checking for off_t" >&5
7070 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
7071   echo $ac_n "(cached) $ac_c" 1>&6
7072 else
7073   cat > conftest.$ac_ext <<EOF
7074 #line 7075 "configure"
7075 #include "confdefs.h"
7076 #include <sys/types.h>
7077 #if STDC_HEADERS
7078 #include <stdlib.h>
7079 #include <stddef.h>
7080 #endif
7081 EOF
7082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7083   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7084   rm -rf conftest*
7085   ac_cv_type_off_t=yes
7086 else
7087   rm -rf conftest*
7088   ac_cv_type_off_t=no
7089 fi
7090 rm -f conftest*
7091
7092 fi
7093 echo "$ac_t""$ac_cv_type_off_t" 1>&6
7094 if test $ac_cv_type_off_t = no; then
7095   cat >> confdefs.h <<\EOF
7096 #define off_t long
7097 EOF
7098
7099 fi
7100
7101 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
7102 echo "configure:7103: checking for ino_t" >&5
7103 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
7104   echo $ac_n "(cached) $ac_c" 1>&6
7105 else
7106   cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109 #include <sys/types.h>
7110 #if STDC_HEADERS
7111 #include <stdlib.h>
7112 #include <stddef.h>
7113 #endif
7114 EOF
7115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7116   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7117   rm -rf conftest*
7118   ac_cv_type_ino_t=yes
7119 else
7120   rm -rf conftest*
7121   ac_cv_type_ino_t=no
7122 fi
7123 rm -f conftest*
7124
7125 fi
7126 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
7127 if test $ac_cv_type_ino_t = no; then
7128   cat >> confdefs.h <<\EOF
7129 #define ino_t unsigned long
7130 EOF
7131
7132 fi
7133
7134 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
7135 echo "configure:7136: checking for dev_t" >&5
7136 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
7137   echo $ac_n "(cached) $ac_c" 1>&6
7138 else
7139   cat > conftest.$ac_ext <<EOF
7140 #line 7141 "configure"
7141 #include "confdefs.h"
7142 #include <sys/types.h>
7143 #if STDC_HEADERS
7144 #include <stdlib.h>
7145 #include <stddef.h>
7146 #endif
7147 EOF
7148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7149   egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7150   rm -rf conftest*
7151   ac_cv_type_dev_t=yes
7152 else
7153   rm -rf conftest*
7154   ac_cv_type_dev_t=no
7155 fi
7156 rm -f conftest*
7157
7158 fi
7159 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
7160 if test $ac_cv_type_dev_t = no; then
7161   cat >> confdefs.h <<\EOF
7162 #define dev_t unsigned long
7163 EOF
7164
7165 fi
7166
7167 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
7168 echo "configure:7169: checking for daddr_t" >&5
7169 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
7170   echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 #include <sys/types.h>
7176 #if STDC_HEADERS
7177 #include <stdlib.h>
7178 #include <stddef.h>
7179 #endif
7180 EOF
7181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7182   egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7183   rm -rf conftest*
7184   ac_cv_type_daddr_t=yes
7185 else
7186   rm -rf conftest*
7187   ac_cv_type_daddr_t=no
7188 fi
7189 rm -f conftest*
7190
7191 fi
7192 echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
7193 if test $ac_cv_type_daddr_t = no; then
7194   cat >> confdefs.h <<\EOF
7195 #define daddr_t long
7196 EOF
7197
7198 fi
7199
7200 echo $ac_n "checking for major_t""... $ac_c" 1>&6
7201 echo "configure:7202: checking for major_t" >&5
7202 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
7203   echo $ac_n "(cached) $ac_c" 1>&6
7204 else
7205   cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 #include <sys/types.h>
7209 #if STDC_HEADERS
7210 #include <stdlib.h>
7211 #include <stddef.h>
7212 #endif
7213 EOF
7214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7215   egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7216   rm -rf conftest*
7217   ac_cv_type_major_t=yes
7218 else
7219   rm -rf conftest*
7220   ac_cv_type_major_t=no
7221 fi
7222 rm -f conftest*
7223
7224 fi
7225 echo "$ac_t""$ac_cv_type_major_t" 1>&6
7226 if test $ac_cv_type_major_t = no; then
7227   cat >> confdefs.h <<\EOF
7228 #define major_t int
7229 EOF
7230
7231 fi
7232
7233 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
7234 echo "configure:7235: checking for minor_t" >&5
7235 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
7236   echo $ac_n "(cached) $ac_c" 1>&6
7237 else
7238   cat > conftest.$ac_ext <<EOF
7239 #line 7240 "configure"
7240 #include "confdefs.h"
7241 #include <sys/types.h>
7242 #if STDC_HEADERS
7243 #include <stdlib.h>
7244 #include <stddef.h>
7245 #endif
7246 EOF
7247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7248   egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7249   rm -rf conftest*
7250   ac_cv_type_minor_t=yes
7251 else
7252   rm -rf conftest*
7253   ac_cv_type_minor_t=no
7254 fi
7255 rm -f conftest*
7256
7257 fi
7258 echo "$ac_t""$ac_cv_type_minor_t" 1>&6
7259 if test $ac_cv_type_minor_t = no; then
7260   cat >> confdefs.h <<\EOF
7261 #define minor_t int
7262 EOF
7263
7264 fi
7265
7266 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
7267 echo "configure:7268: checking for ssize_t" >&5
7268 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
7269   echo $ac_n "(cached) $ac_c" 1>&6
7270 else
7271   cat > conftest.$ac_ext <<EOF
7272 #line 7273 "configure"
7273 #include "confdefs.h"
7274 #include <sys/types.h>
7275 #if STDC_HEADERS
7276 #include <stdlib.h>
7277 #include <stddef.h>
7278 #endif
7279 EOF
7280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7281   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7282   rm -rf conftest*
7283   ac_cv_type_ssize_t=yes
7284 else
7285   rm -rf conftest*
7286   ac_cv_type_ssize_t=no
7287 fi
7288 rm -f conftest*
7289
7290 fi
7291 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
7292 if test $ac_cv_type_ssize_t = no; then
7293   cat >> confdefs.h <<\EOF
7294 #define ssize_t int
7295 EOF
7296
7297 fi
7298
7299 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
7300 echo "configure:7301: checking for st_blocks in struct stat" >&5
7301 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
7302   echo $ac_n "(cached) $ac_c" 1>&6
7303 else
7304   cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307 #include <sys/types.h>
7308 #include <sys/stat.h>
7309 int main() {
7310 struct stat s; s.st_blocks;
7311 ; return 0; }
7312 EOF
7313 if { (eval echo configure:7314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7314   rm -rf conftest*
7315   ac_cv_struct_st_blocks=yes
7316 else
7317   echo "configure: failed program was:" >&5
7318   cat conftest.$ac_ext >&5
7319   rm -rf conftest*
7320   ac_cv_struct_st_blocks=no
7321 fi
7322 rm -f conftest*
7323 fi
7324
7325 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
7326 if test $ac_cv_struct_st_blocks = yes; then
7327   cat >> confdefs.h <<\EOF
7328 #define HAVE_ST_BLOCKS 1
7329 EOF
7330
7331 else
7332   LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
7333 fi
7334
7335 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
7336 echo "configure:7337: checking for st_rdev in struct stat" >&5
7337 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
7338   echo $ac_n "(cached) $ac_c" 1>&6
7339 else
7340   cat > conftest.$ac_ext <<EOF
7341 #line 7342 "configure"
7342 #include "confdefs.h"
7343 #include <sys/types.h>
7344 #include <sys/stat.h>
7345 int main() {
7346 struct stat s; s.st_rdev;
7347 ; return 0; }
7348 EOF
7349 if { (eval echo configure:7350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7350   rm -rf conftest*
7351   ac_cv_struct_st_rdev=yes
7352 else
7353   echo "configure: failed program was:" >&5
7354   cat conftest.$ac_ext >&5
7355   rm -rf conftest*
7356   ac_cv_struct_st_rdev=no
7357 fi
7358 rm -f conftest*
7359 fi
7360
7361 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
7362 if test $ac_cv_struct_st_rdev = yes; then
7363   cat >> confdefs.h <<\EOF
7364 #define HAVE_ST_RDEV 1
7365 EOF
7366
7367 fi
7368
7369 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
7370 echo "configure:7371: checking whether struct tm is in sys/time.h or time.h" >&5
7371 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
7372   echo $ac_n "(cached) $ac_c" 1>&6
7373 else
7374   cat > conftest.$ac_ext <<EOF
7375 #line 7376 "configure"
7376 #include "confdefs.h"
7377 #include <sys/types.h>
7378 #include <time.h>
7379 int main() {
7380 struct tm *tp; tp->tm_sec;
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7384   rm -rf conftest*
7385   ac_cv_struct_tm=time.h
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   ac_cv_struct_tm=sys/time.h
7391 fi
7392 rm -f conftest*
7393 fi
7394
7395 echo "$ac_t""$ac_cv_struct_tm" 1>&6
7396 if test $ac_cv_struct_tm = sys/time.h; then
7397   cat >> confdefs.h <<\EOF
7398 #define TM_IN_SYS_TIME 1
7399 EOF
7400
7401 fi
7402
7403 echo $ac_n "checking for working const""... $ac_c" 1>&6
7404 echo "configure:7405: checking for working const" >&5
7405 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411
7412 int main() {
7413
7414 /* Ultrix mips cc rejects this.  */
7415 typedef int charset[2]; const charset x;
7416 /* SunOS 4.1.1 cc rejects this.  */
7417 char const *const *ccp;
7418 char **p;
7419 /* NEC SVR4.0.2 mips cc rejects this.  */
7420 struct point {int x, y;};
7421 static struct point const zero = {0,0};
7422 /* AIX XL C 1.02.0.0 rejects this.
7423    It does not let you subtract one const X* pointer from another in an arm
7424    of an if-expression whose if-part is not a constant expression */
7425 const char *g = "string";
7426 ccp = &g + (g ? g-g : 0);
7427 /* HPUX 7.0 cc rejects these. */
7428 ++ccp;
7429 p = (char**) ccp;
7430 ccp = (char const *const *) p;
7431 { /* SCO 3.2v4 cc rejects this.  */
7432   char *t;
7433   char const *s = 0 ? (char *) 0 : (char const *) 0;
7434
7435   *t++ = 0;
7436 }
7437 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7438   int x[] = {25, 17};
7439   const int *foo = &x[0];
7440   ++foo;
7441 }
7442 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7443   typedef const int *iptr;
7444   iptr p = 0;
7445   ++p;
7446 }
7447 { /* AIX XL C 1.02.0.0 rejects this saying
7448      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7449   struct s { int j; const int *ap[3]; };
7450   struct s *b; b->j = 5;
7451 }
7452 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7453   const int foo = 10;
7454 }
7455
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7459   rm -rf conftest*
7460   ac_cv_c_const=yes
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   ac_cv_c_const=no
7466 fi
7467 rm -f conftest*
7468 fi
7469
7470 echo "$ac_t""$ac_cv_c_const" 1>&6
7471 if test $ac_cv_c_const = no; then
7472   cat >> confdefs.h <<\EOF
7473 #define const 
7474 EOF
7475
7476 fi
7477
7478
7479
7480 echo $ac_n "checking size of char""... $ac_c" 1>&6
7481 echo "configure:7482: checking size of char" >&5
7482 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
7483   echo $ac_n "(cached) $ac_c" 1>&6
7484 else
7485   if test "$cross_compiling" = yes; then
7486   ac_cv_sizeof_char=1
7487 else
7488   cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7491 #include <stdio.h>
7492 main()
7493 {
7494   FILE *f=fopen("conftestval", "w");
7495   if (!f) exit(1);
7496   fprintf(f, "%d\n", sizeof(char));
7497   exit(0);
7498 }
7499 EOF
7500 if { (eval echo configure:7501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7501 then
7502   ac_cv_sizeof_char=`cat conftestval`
7503 else
7504   echo "configure: failed program was:" >&5
7505   cat conftest.$ac_ext >&5
7506   rm -fr conftest*
7507   ac_cv_sizeof_char=0
7508 fi
7509 rm -fr conftest*
7510 fi
7511
7512 fi
7513 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
7514 cat >> confdefs.h <<EOF
7515 #define SIZEOF_CHAR $ac_cv_sizeof_char
7516 EOF
7517
7518
7519 echo $ac_n "checking size of short int""... $ac_c" 1>&6
7520 echo "configure:7521: checking size of short int" >&5
7521 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
7522   echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7524   if test "$cross_compiling" = yes; then
7525   ac_cv_sizeof_short_int=2
7526 else
7527   cat > conftest.$ac_ext <<EOF
7528 #line 7529 "configure"
7529 #include "confdefs.h"
7530 #include <stdio.h>
7531 main()
7532 {
7533   FILE *f=fopen("conftestval", "w");
7534   if (!f) exit(1);
7535   fprintf(f, "%d\n", sizeof(short int));
7536   exit(0);
7537 }
7538 EOF
7539 if { (eval echo configure:7540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7540 then
7541   ac_cv_sizeof_short_int=`cat conftestval`
7542 else
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -fr conftest*
7546   ac_cv_sizeof_short_int=0
7547 fi
7548 rm -fr conftest*
7549 fi
7550
7551 fi
7552 echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
7553 cat >> confdefs.h <<EOF
7554 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
7555 EOF
7556
7557
7558 echo $ac_n "checking size of int""... $ac_c" 1>&6
7559 echo "configure:7560: checking size of int" >&5
7560 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7561   echo $ac_n "(cached) $ac_c" 1>&6
7562 else
7563   if test "$cross_compiling" = yes; then
7564   ac_cv_sizeof_int=4
7565 else
7566   cat > conftest.$ac_ext <<EOF
7567 #line 7568 "configure"
7568 #include "confdefs.h"
7569 #include <stdio.h>
7570 main()
7571 {
7572   FILE *f=fopen("conftestval", "w");
7573   if (!f) exit(1);
7574   fprintf(f, "%d\n", sizeof(int));
7575   exit(0);
7576 }
7577 EOF
7578 if { (eval echo configure:7579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7579 then
7580   ac_cv_sizeof_int=`cat conftestval`
7581 else
7582   echo "configure: failed program was:" >&5
7583   cat conftest.$ac_ext >&5
7584   rm -fr conftest*
7585   ac_cv_sizeof_int=0
7586 fi
7587 rm -fr conftest*
7588 fi
7589
7590 fi
7591 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
7592 cat >> confdefs.h <<EOF
7593 #define SIZEOF_INT $ac_cv_sizeof_int
7594 EOF
7595
7596
7597 echo $ac_n "checking size of long int""... $ac_c" 1>&6
7598 echo "configure:7599: checking size of long int" >&5
7599 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
7600   echo $ac_n "(cached) $ac_c" 1>&6
7601 else
7602   if test "$cross_compiling" = yes; then
7603   ac_cv_sizeof_long_int=4
7604 else
7605   cat > conftest.$ac_ext <<EOF
7606 #line 7607 "configure"
7607 #include "confdefs.h"
7608 #include <stdio.h>
7609 main()
7610 {
7611   FILE *f=fopen("conftestval", "w");
7612   if (!f) exit(1);
7613   fprintf(f, "%d\n", sizeof(long int));
7614   exit(0);
7615 }
7616 EOF
7617 if { (eval echo configure:7618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7618 then
7619   ac_cv_sizeof_long_int=`cat conftestval`
7620 else
7621   echo "configure: failed program was:" >&5
7622   cat conftest.$ac_ext >&5
7623   rm -fr conftest*
7624   ac_cv_sizeof_long_int=0
7625 fi
7626 rm -fr conftest*
7627 fi
7628
7629 fi
7630 echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
7631 cat >> confdefs.h <<EOF
7632 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
7633 EOF
7634
7635
7636 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
7637 echo "configure:7638: checking size of long long int" >&5
7638 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
7639   echo $ac_n "(cached) $ac_c" 1>&6
7640 else
7641   if test "$cross_compiling" = yes; then
7642   ac_cv_sizeof_long_long_int=8
7643 else
7644   cat > conftest.$ac_ext <<EOF
7645 #line 7646 "configure"
7646 #include "confdefs.h"
7647 #include <stdio.h>
7648 main()
7649 {
7650   FILE *f=fopen("conftestval", "w");
7651   if (!f) exit(1);
7652   fprintf(f, "%d\n", sizeof(long long int));
7653   exit(0);
7654 }
7655 EOF
7656 if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7657 then
7658   ac_cv_sizeof_long_long_int=`cat conftestval`
7659 else
7660   echo "configure: failed program was:" >&5
7661   cat conftest.$ac_ext >&5
7662   rm -fr conftest*
7663   ac_cv_sizeof_long_long_int=0
7664 fi
7665 rm -fr conftest*
7666 fi
7667
7668 fi
7669 echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
7670 cat >> confdefs.h <<EOF
7671 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
7672 EOF
7673
7674
7675 echo $ac_n "checking size of int *""... $ac_c" 1>&6
7676 echo "configure:7677: checking size of int *" >&5
7677 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
7678   echo $ac_n "(cached) $ac_c" 1>&6
7679 else
7680   if test "$cross_compiling" = yes; then
7681   ac_cv_sizeof_int_p=4
7682 else
7683   cat > conftest.$ac_ext <<EOF
7684 #line 7685 "configure"
7685 #include "confdefs.h"
7686 #include <stdio.h>
7687 main()
7688 {
7689   FILE *f=fopen("conftestval", "w");
7690   if (!f) exit(1);
7691   fprintf(f, "%d\n", sizeof(int *));
7692   exit(0);
7693 }
7694 EOF
7695 if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7696 then
7697   ac_cv_sizeof_int_p=`cat conftestval`
7698 else
7699   echo "configure: failed program was:" >&5
7700   cat conftest.$ac_ext >&5
7701   rm -fr conftest*
7702   ac_cv_sizeof_int_p=0
7703 fi
7704 rm -fr conftest*
7705 fi
7706
7707 fi
7708 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
7709 cat >> confdefs.h <<EOF
7710 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
7711 EOF
7712
7713
7714
7715 # Check for sys/types.h types
7716 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
7717 echo "configure:7718: checking for u_int type" >&5
7718 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then
7719   echo $ac_n "(cached) $ac_c" 1>&6
7720 else
7721   
7722     cat > conftest.$ac_ext <<EOF
7723 #line 7724 "configure"
7724 #include "confdefs.h"
7725  #include <sys/types.h> 
7726 int main() {
7727  u_int a; a = 1;
7728 ; return 0; }
7729 EOF
7730 if { (eval echo configure:7731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7731   rm -rf conftest*
7732    ac_cv_have_u_int="yes" 
7733 else
7734   echo "configure: failed program was:" >&5
7735   cat conftest.$ac_ext >&5
7736   rm -rf conftest*
7737    ac_cv_have_u_int="no" 
7738     
7739 fi
7740 rm -f conftest*
7741
7742 fi
7743
7744 echo "$ac_t""$ac_cv_have_u_int" 1>&6
7745 if test "x$ac_cv_have_u_int" = "xyes" ; then
7746    cat >> confdefs.h <<\EOF
7747 #define HAVE_U_INT 1
7748 EOF
7749
7750    have_u_int=1
7751 fi
7752
7753 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
7754 echo "configure:7755: checking for intmax_t type" >&5
7755 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then
7756   echo $ac_n "(cached) $ac_c" 1>&6
7757 else
7758   
7759    cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762  #include <sys/types.h> 
7763 int main() {
7764  intmax_t a; a = 1;
7765 ; return 0; }
7766 EOF
7767 if { (eval echo configure:7768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7768   rm -rf conftest*
7769    ac_cv_have_intmax_t="yes" 
7770 else
7771   echo "configure: failed program was:" >&5
7772   cat conftest.$ac_ext >&5
7773   rm -rf conftest*
7774    
7775          cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778  #include <stdint.h> 
7779 int main() {
7780  intmax_t a; a = 1;
7781 ; return 0; }
7782 EOF
7783 if { (eval echo configure:7784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7784   rm -rf conftest*
7785    ac_cv_have_intmax_t="yes" 
7786 else
7787   echo "configure: failed program was:" >&5
7788   cat conftest.$ac_ext >&5
7789   rm -rf conftest*
7790    ac_cv_have_intmax_t="no" 
7791          
7792 fi
7793 rm -f conftest*
7794       
7795    
7796 fi
7797 rm -f conftest*     
7798
7799
7800 fi
7801
7802 echo "$ac_t""$ac_cv_have_intmax_t" 1>&6
7803 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
7804    cat >> confdefs.h <<\EOF
7805 #define HAVE_INTMAX_T 1
7806 EOF
7807
7808    have_intmax_t=1
7809 fi
7810
7811
7812 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
7813 echo "configure:7814: checking for u_intmax_t type" >&5
7814 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   
7818    cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821  #include <sys/types.h> 
7822 int main() {
7823  u_intmax_t a; a = 1;
7824 ; return 0; }
7825 EOF
7826 if { (eval echo configure:7827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7827   rm -rf conftest*
7828    ac_cv_have_u_intmax_t="yes" 
7829 else
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833    
7834          cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837  #include <stdint.h> 
7838 int main() {
7839  u_intmax_t a; a = 1;
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7843   rm -rf conftest*
7844    ac_cv_have_u_intmax_t="yes" 
7845 else
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849    ac_cv_have_u_intmax_t="no" 
7850          
7851 fi
7852 rm -f conftest*
7853       
7854    
7855 fi
7856 rm -f conftest*
7857
7858 fi
7859
7860 echo "$ac_t""$ac_cv_have_u_intmax_t" 1>&6
7861 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
7862    cat >> confdefs.h <<\EOF
7863 #define HAVE_U_INTMAX_T 1
7864 EOF
7865
7866    have_u_intmax_t=1
7867 fi
7868
7869
7870 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
7871 echo "configure:7872: checking for intXX_t types" >&5
7872 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then
7873   echo $ac_n "(cached) $ac_c" 1>&6
7874 else
7875   
7876    cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879  #include <sys/types.h> 
7880 int main() {
7881  int8_t a; int16_t b; int32_t c; a = b = c = 1;
7882 ; return 0; }
7883 EOF
7884 if { (eval echo configure:7885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7885   rm -rf conftest*
7886    ac_cv_have_intxx_t="yes" 
7887 else
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891    ac_cv_have_intxx_t="no" 
7892    
7893 fi
7894 rm -f conftest*
7895
7896 fi
7897
7898 echo "$ac_t""$ac_cv_have_intxx_t" 1>&6
7899 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
7900    cat >> confdefs.h <<\EOF
7901 #define HAVE_INTXX_T 1
7902 EOF
7903
7904    have_intxx_t=1
7905 fi
7906         
7907 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
7908 echo "configure:7909: checking for int64_t type" >&5
7909 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then
7910   echo $ac_n "(cached) $ac_c" 1>&6
7911 else
7912   
7913    cat > conftest.$ac_ext <<EOF
7914 #line 7915 "configure"
7915 #include "confdefs.h"
7916  #include <sys/types.h> 
7917 int main() {
7918  int64_t a; a = 1;
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7922   rm -rf conftest*
7923    ac_cv_have_int64_t="yes" 
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928    ac_cv_have_int64_t="no" 
7929    
7930 fi
7931 rm -f conftest*
7932
7933 fi
7934
7935 echo "$ac_t""$ac_cv_have_int64_t" 1>&6
7936 if test "x$ac_cv_have_int64_t" = "xyes" ; then
7937    cat >> confdefs.h <<\EOF
7938 #define HAVE_INT64_T 1
7939 EOF
7940
7941    have_int64_t=1
7942 fi
7943         
7944 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
7945 echo "configure:7946: checking for u_intXX_t types" >&5
7946 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then
7947   echo $ac_n "(cached) $ac_c" 1>&6
7948 else
7949   
7950    cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953  #include <sys/types.h> 
7954 int main() {
7955  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
7956 ; return 0; }
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7959   rm -rf conftest*
7960    ac_cv_have_u_intxx_t="yes" 
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965    ac_cv_have_u_intxx_t="no" 
7966    
7967 fi
7968 rm -f conftest*
7969
7970 fi
7971
7972 echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6
7973 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
7974    cat >> confdefs.h <<\EOF
7975 #define HAVE_U_INTXX_T 1
7976 EOF
7977
7978    have_u_intxx_t=1
7979 fi
7980
7981 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
7982 echo "configure:7983: checking for u_int64_t types" >&5
7983 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986   
7987    cat > conftest.$ac_ext <<EOF
7988 #line 7989 "configure"
7989 #include "confdefs.h"
7990  #include <sys/types.h> 
7991 int main() {
7992  u_int64_t a; a = 1;
7993 ; return 0; }
7994 EOF
7995 if { (eval echo configure:7996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7996   rm -rf conftest*
7997    ac_cv_have_u_int64_t="yes" 
7998 else
7999   echo "configure: failed program was:" >&5
8000   cat conftest.$ac_ext >&5
8001   rm -rf conftest*
8002    ac_cv_have_u_int64_t="no" 
8003    
8004 fi
8005 rm -f conftest*
8006
8007 fi
8008
8009 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
8010 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
8011    cat >> confdefs.h <<\EOF
8012 #define HAVE_U_INT64_T 1
8013 EOF
8014
8015    have_u_int64_t=1
8016 fi
8017
8018 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
8019            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8020 then
8021    echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6
8022 echo "configure:8023: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
8023    cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026  #include <sys/bitypes.h>  
8027 int main() {
8028  int8_t a; int16_t b; int32_t c;
8029         u_int8_t e; u_int16_t f; u_int32_t g;
8030         a = b = c = e = f = g = 1;  
8031 ; return 0; }
8032 EOF
8033 if { (eval echo configure:8034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8034   rm -rf conftest*
8035    cat >> confdefs.h <<\EOF
8036 #define HAVE_U_INTXX_T 1
8037 EOF
8038
8039         cat >> confdefs.h <<\EOF
8040 #define HAVE_INTXX_T 1
8041 EOF
8042
8043         cat >> confdefs.h <<\EOF
8044 #define HAVE_SYS_BITYPES_H 1
8045 EOF
8046
8047         echo "$ac_t""yes" 1>&6 
8048 else
8049   echo "configure: failed program was:" >&5
8050   cat conftest.$ac_ext >&5
8051   rm -rf conftest*
8052    echo "$ac_t""no" 1>&6
8053    
8054 fi
8055 rm -f conftest* 
8056 fi
8057
8058 if test -z "$have_u_intxx_t" ; then
8059    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
8060 echo "configure:8061: checking for uintXX_t types" >&5
8061 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then
8062   echo $ac_n "(cached) $ac_c" 1>&6
8063 else
8064   
8065       cat > conftest.$ac_ext <<EOF
8066 #line 8067 "configure"
8067 #include "confdefs.h"
8068  #include <sys/types.h> 
8069 int main() {
8070  uint8_t a; uint16_t b; 
8071            uint32_t c; a = b = c = 1; 
8072 ; return 0; }
8073 EOF
8074 if { (eval echo configure:8075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8075   rm -rf conftest*
8076    ac_cv_have_uintxx_t="yes" 
8077 else
8078   echo "configure: failed program was:" >&5
8079   cat conftest.$ac_ext >&5
8080   rm -rf conftest*
8081    ac_cv_have_uintxx_t="no" 
8082       
8083 fi
8084 rm -f conftest*
8085    
8086 fi
8087
8088 echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6
8089    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
8090       cat >> confdefs.h <<\EOF
8091 #define HAVE_UINTXX_T 1
8092 EOF
8093
8094    fi
8095 fi
8096
8097 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
8098           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8099 then
8100    echo $ac_n "checking for int64_t and u_int64_t types in sys/bitypes.h""... $ac_c" 1>&6
8101 echo "configure:8102: checking for int64_t and u_int64_t types in sys/bitypes.h" >&5
8102    cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105  #include <sys/bitypes.h>  
8106 int main() {
8107  int64_t a; u_int64_t b; 
8108        a = b = 1;  
8109 ; return 0; }
8110 EOF
8111 if { (eval echo configure:8112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8112   rm -rf conftest*
8113    cat >> confdefs.h <<\EOF
8114 #define HAVE_U_INT64_T 1
8115 EOF
8116
8117        cat >> confdefs.h <<\EOF
8118 #define HAVE_INT64_T 1
8119 EOF
8120
8121        echo "$ac_t""yes" 1>&6 
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -rf conftest*
8126    echo "$ac_t""no" 1>&6
8127    
8128 fi
8129 rm -f conftest* 
8130 fi
8131
8132 if (test -z "$have_uintxx_t" && \
8133           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
8134 then
8135    echo $ac_n "checking for uintXX_t types in sys/bitypes.h""... $ac_c" 1>&6
8136 echo "configure:8137: checking for uintXX_t types in sys/bitypes.h" >&5
8137    cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140  #include <sys/bitypes.h>  
8141 int main() {
8142  uint8_t a; uint16_t b; 
8143           uint32_t c; a = b = c = 1; 
8144 ; return 0; }
8145 EOF
8146 if { (eval echo configure:8147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8147   rm -rf conftest*
8148    cat >> confdefs.h <<\EOF
8149 #define HAVE_UINTXX_T 1
8150 EOF
8151
8152        echo "$ac_t""yes" 1>&6 
8153 else
8154   echo "configure: failed program was:" >&5
8155   cat conftest.$ac_ext >&5
8156   rm -rf conftest*
8157    echo "$ac_t""no" 1>&6
8158    
8159 fi
8160 rm -f conftest* 
8161
8162 fi
8163
8164
8165
8166
8167 for ac_func in \
8168         fork \
8169         getcwd \
8170         gethostname \
8171         getpid \
8172         gettimeofday \
8173         setpgid \
8174         setpgrp \
8175         setsid \
8176         signal \
8177         strerror \
8178         strncmp \
8179         strncpy \
8180         vfprintf \
8181         
8182 do
8183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8184 echo "configure:8185: checking for $ac_func" >&5
8185 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8186   echo $ac_n "(cached) $ac_c" 1>&6
8187 else
8188   cat > conftest.$ac_ext <<EOF
8189 #line 8190 "configure"
8190 #include "confdefs.h"
8191 /* System header to define __stub macros and hopefully few prototypes,
8192     which can conflict with char $ac_func(); below.  */
8193 #include <assert.h>
8194 /* Override any gcc2 internal prototype to avoid an error.  */
8195 /* We use char because int might match the return type of a gcc2
8196     builtin and then its argument prototype would still apply.  */
8197 char $ac_func();
8198
8199 int main() {
8200
8201 /* The GNU C library defines this for functions which it implements
8202     to always fail with ENOSYS.  Some functions are actually named
8203     something starting with __ and the normal name is an alias.  */
8204 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8205 choke me
8206 #else
8207 $ac_func();
8208 #endif
8209
8210 ; return 0; }
8211 EOF
8212 if { (eval echo configure:8213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8213   rm -rf conftest*
8214   eval "ac_cv_func_$ac_func=yes"
8215 else
8216   echo "configure: failed program was:" >&5
8217   cat conftest.$ac_ext >&5
8218   rm -rf conftest*
8219   eval "ac_cv_func_$ac_func=no"
8220 fi
8221 rm -f conftest*
8222 fi
8223
8224 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8225   echo "$ac_t""yes" 1>&6
8226     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8227   cat >> confdefs.h <<EOF
8228 #define $ac_tr_func 1
8229 EOF
8230  
8231 else
8232   echo "$ac_t""no" 1>&6
8233 echo 'configure: cannot find needed function.'; exit 1
8234
8235 fi
8236 done
8237
8238
8239 for ac_func in fchdir
8240 do
8241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8242 echo "configure:8243: checking for $ac_func" >&5
8243 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8244   echo $ac_n "(cached) $ac_c" 1>&6
8245 else
8246   cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 /* System header to define __stub macros and hopefully few prototypes,
8250     which can conflict with char $ac_func(); below.  */
8251 #include <assert.h>
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char $ac_func();
8256
8257 int main() {
8258
8259 /* The GNU C library defines this for functions which it implements
8260     to always fail with ENOSYS.  Some functions are actually named
8261     something starting with __ and the normal name is an alias.  */
8262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8263 choke me
8264 #else
8265 $ac_func();
8266 #endif
8267
8268 ; return 0; }
8269 EOF
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271   rm -rf conftest*
8272   eval "ac_cv_func_$ac_func=yes"
8273 else
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   eval "ac_cv_func_$ac_func=no"
8278 fi
8279 rm -f conftest*
8280 fi
8281
8282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8283   echo "$ac_t""yes" 1>&6
8284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8285   cat >> confdefs.h <<EOF
8286 #define $ac_tr_func 1
8287 EOF
8288  cat >> confdefs.h <<\EOF
8289 #define HAVE_FCHDIR 1
8290 EOF
8291
8292 else
8293   echo "$ac_t""no" 1>&6
8294 fi
8295 done
8296
8297 for ac_func in strtoll
8298 do
8299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8300 echo "configure:8301: checking for $ac_func" >&5
8301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   cat > conftest.$ac_ext <<EOF
8305 #line 8306 "configure"
8306 #include "confdefs.h"
8307 /* System header to define __stub macros and hopefully few prototypes,
8308     which can conflict with char $ac_func(); below.  */
8309 #include <assert.h>
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char $ac_func();
8314
8315 int main() {
8316
8317 /* The GNU C library defines this for functions which it implements
8318     to always fail with ENOSYS.  Some functions are actually named
8319     something starting with __ and the normal name is an alias.  */
8320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8321 choke me
8322 #else
8323 $ac_func();
8324 #endif
8325
8326 ; return 0; }
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8329   rm -rf conftest*
8330   eval "ac_cv_func_$ac_func=yes"
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_func_$ac_func=no"
8336 fi
8337 rm -f conftest*
8338 fi
8339
8340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8343   cat >> confdefs.h <<EOF
8344 #define $ac_tr_func 1
8345 EOF
8346  cat >> confdefs.h <<\EOF
8347 #define HAVE_STRTOLL 1
8348 EOF
8349
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353 done
8354
8355
8356 for ac_func in chflags
8357 do
8358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8359 echo "configure:8360: checking for $ac_func" >&5
8360 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8361   echo $ac_n "(cached) $ac_c" 1>&6
8362 else
8363   cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* System header to define __stub macros and hopefully few prototypes,
8367     which can conflict with char $ac_func(); below.  */
8368 #include <assert.h>
8369 /* Override any gcc2 internal prototype to avoid an error.  */
8370 /* We use char because int might match the return type of a gcc2
8371     builtin and then its argument prototype would still apply.  */
8372 char $ac_func();
8373
8374 int main() {
8375
8376 /* The GNU C library defines this for functions which it implements
8377     to always fail with ENOSYS.  Some functions are actually named
8378     something starting with __ and the normal name is an alias.  */
8379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8380 choke me
8381 #else
8382 $ac_func();
8383 #endif
8384
8385 ; return 0; }
8386 EOF
8387 if { (eval echo configure:8388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8388   rm -rf conftest*
8389   eval "ac_cv_func_$ac_func=yes"
8390 else
8391   echo "configure: failed program was:" >&5
8392   cat conftest.$ac_ext >&5
8393   rm -rf conftest*
8394   eval "ac_cv_func_$ac_func=no"
8395 fi
8396 rm -f conftest*
8397 fi
8398
8399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8400   echo "$ac_t""yes" 1>&6
8401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8402   cat >> confdefs.h <<EOF
8403 #define $ac_tr_func 1
8404 EOF
8405  
8406 else
8407   echo "$ac_t""no" 1>&6
8408 fi
8409 done
8410  
8411
8412 for ac_func in snprintf vsnprintf gethostid getdomainname
8413 do
8414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8415 echo "configure:8416: checking for $ac_func" >&5
8416 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 /* System header to define __stub macros and hopefully few prototypes,
8423     which can conflict with char $ac_func(); below.  */
8424 #include <assert.h>
8425 /* Override any gcc2 internal prototype to avoid an error.  */
8426 /* We use char because int might match the return type of a gcc2
8427     builtin and then its argument prototype would still apply.  */
8428 char $ac_func();
8429
8430 int main() {
8431
8432 /* The GNU C library defines this for functions which it implements
8433     to always fail with ENOSYS.  Some functions are actually named
8434     something starting with __ and the normal name is an alias.  */
8435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8436 choke me
8437 #else
8438 $ac_func();
8439 #endif
8440
8441 ; return 0; }
8442 EOF
8443 if { (eval echo configure:8444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8444   rm -rf conftest*
8445   eval "ac_cv_func_$ac_func=yes"
8446 else
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   eval "ac_cv_func_$ac_func=no"
8451 fi
8452 rm -f conftest*
8453 fi
8454
8455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8456   echo "$ac_t""yes" 1>&6
8457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8458   cat >> confdefs.h <<EOF
8459 #define $ac_tr_func 1
8460 EOF
8461  
8462 else
8463   echo "$ac_t""no" 1>&6
8464 fi
8465 done
8466
8467
8468 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
8469 do
8470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8471 echo "configure:8472: checking for $ac_func" >&5
8472 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8473   echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475   cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 /* System header to define __stub macros and hopefully few prototypes,
8479     which can conflict with char $ac_func(); below.  */
8480 #include <assert.h>
8481 /* Override any gcc2 internal prototype to avoid an error.  */
8482 /* We use char because int might match the return type of a gcc2
8483     builtin and then its argument prototype would still apply.  */
8484 char $ac_func();
8485
8486 int main() {
8487
8488 /* The GNU C library defines this for functions which it implements
8489     to always fail with ENOSYS.  Some functions are actually named
8490     something starting with __ and the normal name is an alias.  */
8491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8492 choke me
8493 #else
8494 $ac_func();
8495 #endif
8496
8497 ; return 0; }
8498 EOF
8499 if { (eval echo configure:8500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8500   rm -rf conftest*
8501   eval "ac_cv_func_$ac_func=yes"
8502 else
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   eval "ac_cv_func_$ac_func=no"
8507 fi
8508 rm -f conftest*
8509 fi
8510
8511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8512   echo "$ac_t""yes" 1>&6
8513     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8514   cat >> confdefs.h <<EOF
8515 #define $ac_tr_func 1
8516 EOF
8517  
8518 else
8519   echo "$ac_t""no" 1>&6
8520 fi
8521 done
8522
8523
8524 # If resolver functions are not in libc check for -lnsl or -lresolv.
8525 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
8526 echo "configure:8527: checking for gethostbyname_r" >&5
8527 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
8528   echo $ac_n "(cached) $ac_c" 1>&6
8529 else
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 /* System header to define __stub macros and hopefully few prototypes,
8534     which can conflict with char gethostbyname_r(); below.  */
8535 #include <assert.h>
8536 /* Override any gcc2 internal prototype to avoid an error.  */
8537 /* We use char because int might match the return type of a gcc2
8538     builtin and then its argument prototype would still apply.  */
8539 char gethostbyname_r();
8540
8541 int main() {
8542
8543 /* The GNU C library defines this for functions which it implements
8544     to always fail with ENOSYS.  Some functions are actually named
8545     something starting with __ and the normal name is an alias.  */
8546 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
8547 choke me
8548 #else
8549 gethostbyname_r();
8550 #endif
8551
8552 ; return 0; }
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8555   rm -rf conftest*
8556   eval "ac_cv_func_gethostbyname_r=yes"
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -rf conftest*
8561   eval "ac_cv_func_gethostbyname_r=no"
8562 fi
8563 rm -f conftest*
8564 fi
8565
8566 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
8567   echo "$ac_t""yes" 1>&6
8568   echo "$ac_t""using libc's resolver" 1>&6
8569 else
8570   echo "$ac_t""no" 1>&6
8571 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
8572 echo "configure:8573: checking for gethostbyname_r in -lnsl" >&5
8573 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
8574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8575   echo $ac_n "(cached) $ac_c" 1>&6
8576 else
8577   ac_save_LIBS="$LIBS"
8578 LIBS="-lnsl  $LIBS"
8579 cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 /* Override any gcc2 internal prototype to avoid an error.  */
8583 /* We use char because int might match the return type of a gcc2
8584     builtin and then its argument prototype would still apply.  */
8585 char gethostbyname_r();
8586
8587 int main() {
8588 gethostbyname_r()
8589 ; return 0; }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=yes"
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   eval "ac_cv_lib_$ac_lib_var=no"
8599 fi
8600 rm -f conftest*
8601 LIBS="$ac_save_LIBS"
8602
8603 fi
8604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8605   echo "$ac_t""yes" 1>&6
8606     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
8607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8608   cat >> confdefs.h <<EOF
8609 #define $ac_tr_lib 1
8610 EOF
8611
8612   LIBS="-lnsl $LIBS"
8613
8614 else
8615   echo "$ac_t""no" 1>&6
8616 fi
8617
8618     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
8619 echo "configure:8620: checking for gethostbyname_r in -lresolv" >&5
8620 ac_lib_var=`echo resolv'_'gethostbyname_r | sed 'y%./+-%__p_%'`
8621 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   ac_save_LIBS="$LIBS"
8625 LIBS="-lresolv  $LIBS"
8626 cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 /* Override any gcc2 internal prototype to avoid an error.  */
8630 /* We use char because int might match the return type of a gcc2
8631     builtin and then its argument prototype would still apply.  */
8632 char gethostbyname_r();
8633
8634 int main() {
8635 gethostbyname_r()
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=no"
8646 fi
8647 rm -f conftest*
8648 LIBS="$ac_save_LIBS"
8649
8650 fi
8651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
8654     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8655   cat >> confdefs.h <<EOF
8656 #define $ac_tr_lib 1
8657 EOF
8658
8659   LIBS="-lresolv $LIBS"
8660
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 fi
8666
8667
8668
8669 # Find where sockets are (especially for Solaris)
8670 echo $ac_n "checking for socket""... $ac_c" 1>&6
8671 echo "configure:8672: checking for socket" >&5
8672 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8673   echo $ac_n "(cached) $ac_c" 1>&6
8674 else
8675   cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 /* System header to define __stub macros and hopefully few prototypes,
8679     which can conflict with char socket(); below.  */
8680 #include <assert.h>
8681 /* Override any gcc2 internal prototype to avoid an error.  */
8682 /* We use char because int might match the return type of a gcc2
8683     builtin and then its argument prototype would still apply.  */
8684 char socket();
8685
8686 int main() {
8687
8688 /* The GNU C library defines this for functions which it implements
8689     to always fail with ENOSYS.  Some functions are actually named
8690     something starting with __ and the normal name is an alias.  */
8691 #if defined (__stub_socket) || defined (__stub___socket)
8692 choke me
8693 #else
8694 socket();
8695 #endif
8696
8697 ; return 0; }
8698 EOF
8699 if { (eval echo configure:8700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8700   rm -rf conftest*
8701   eval "ac_cv_func_socket=yes"
8702 else
8703   echo "configure: failed program was:" >&5
8704   cat conftest.$ac_ext >&5
8705   rm -rf conftest*
8706   eval "ac_cv_func_socket=no"
8707 fi
8708 rm -f conftest*
8709 fi
8710
8711 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8712   echo "$ac_t""yes" 1>&6
8713   echo "$ac_t""using libc's socket" 1>&6
8714 else
8715   echo "$ac_t""no" 1>&6
8716 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
8717 echo "configure:8718: checking for socket in -lxnet" >&5
8718 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'`
8719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8720   echo $ac_n "(cached) $ac_c" 1>&6
8721 else
8722   ac_save_LIBS="$LIBS"
8723 LIBS="-lxnet  $LIBS"
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* Override any gcc2 internal prototype to avoid an error.  */
8728 /* We use char because int might match the return type of a gcc2
8729     builtin and then its argument prototype would still apply.  */
8730 char socket();
8731
8732 int main() {
8733 socket()
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_lib_$ac_lib_var=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_lib_$ac_lib_var=no"
8744 fi
8745 rm -f conftest*
8746 LIBS="$ac_save_LIBS"
8747
8748 fi
8749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8750   echo "$ac_t""yes" 1>&6
8751     ac_tr_lib=HAVE_LIB`echo xnet | sed -e 's/^a-zA-Z0-9_/_/g' \
8752     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8753   cat >> confdefs.h <<EOF
8754 #define $ac_tr_lib 1
8755 EOF
8756
8757   LIBS="-lxnet $LIBS"
8758
8759 else
8760   echo "$ac_t""no" 1>&6
8761 fi
8762
8763     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
8764 echo "configure:8765: checking for socket in -lsocket" >&5
8765 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
8766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8767   echo $ac_n "(cached) $ac_c" 1>&6
8768 else
8769   ac_save_LIBS="$LIBS"
8770 LIBS="-lsocket  $LIBS"
8771 cat > conftest.$ac_ext <<EOF
8772 #line 8773 "configure"
8773 #include "confdefs.h"
8774 /* Override any gcc2 internal prototype to avoid an error.  */
8775 /* We use char because int might match the return type of a gcc2
8776     builtin and then its argument prototype would still apply.  */
8777 char socket();
8778
8779 int main() {
8780 socket()
8781 ; return 0; }
8782 EOF
8783 if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8784   rm -rf conftest*
8785   eval "ac_cv_lib_$ac_lib_var=yes"
8786 else
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -rf conftest*
8790   eval "ac_cv_lib_$ac_lib_var=no"
8791 fi
8792 rm -f conftest*
8793 LIBS="$ac_save_LIBS"
8794
8795 fi
8796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8797   echo "$ac_t""yes" 1>&6
8798     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
8799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8800   cat >> confdefs.h <<EOF
8801 #define $ac_tr_lib 1
8802 EOF
8803
8804   LIBS="-lsocket $LIBS"
8805
8806 else
8807   echo "$ac_t""no" 1>&6
8808 fi
8809
8810     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8811 echo "configure:8812: checking for socket in -linet" >&5
8812 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
8813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8814   echo $ac_n "(cached) $ac_c" 1>&6
8815 else
8816   ac_save_LIBS="$LIBS"
8817 LIBS="-linet  $LIBS"
8818 cat > conftest.$ac_ext <<EOF
8819 #line 8820 "configure"
8820 #include "confdefs.h"
8821 /* Override any gcc2 internal prototype to avoid an error.  */
8822 /* We use char because int might match the return type of a gcc2
8823     builtin and then its argument prototype would still apply.  */
8824 char socket();
8825
8826 int main() {
8827 socket()
8828 ; return 0; }
8829 EOF
8830 if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8831   rm -rf conftest*
8832   eval "ac_cv_lib_$ac_lib_var=yes"
8833 else
8834   echo "configure: failed program was:" >&5
8835   cat conftest.$ac_ext >&5
8836   rm -rf conftest*
8837   eval "ac_cv_lib_$ac_lib_var=no"
8838 fi
8839 rm -f conftest*
8840 LIBS="$ac_save_LIBS"
8841
8842 fi
8843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8844   echo "$ac_t""yes" 1>&6
8845     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/^a-zA-Z0-9_/_/g' \
8846     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8847   cat >> confdefs.h <<EOF
8848 #define $ac_tr_lib 1
8849 EOF
8850
8851   LIBS="-linet $LIBS"
8852
8853 else
8854   echo "$ac_t""no" 1>&6
8855 fi
8856
8857 fi
8858
8859
8860 for ac_func in inet_pton
8861 do
8862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8863 echo "configure:8864: checking for $ac_func" >&5
8864 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* System header to define __stub macros and hopefully few prototypes,
8871     which can conflict with char $ac_func(); below.  */
8872 #include <assert.h>
8873 /* Override any gcc2 internal prototype to avoid an error.  */
8874 /* We use char because int might match the return type of a gcc2
8875     builtin and then its argument prototype would still apply.  */
8876 char $ac_func();
8877
8878 int main() {
8879
8880 /* The GNU C library defines this for functions which it implements
8881     to always fail with ENOSYS.  Some functions are actually named
8882     something starting with __ and the normal name is an alias.  */
8883 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8884 choke me
8885 #else
8886 $ac_func();
8887 #endif
8888
8889 ; return 0; }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8892   rm -rf conftest*
8893   eval "ac_cv_func_$ac_func=yes"
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_func_$ac_func=no"
8899 fi
8900 rm -f conftest*
8901 fi
8902
8903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8904   echo "$ac_t""yes" 1>&6
8905     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8906   cat >> confdefs.h <<EOF
8907 #define $ac_tr_func 1
8908 EOF
8909  cat >> confdefs.h <<\EOF
8910 #define HAVE_INET_PTON 1
8911 EOF
8912
8913 else
8914   echo "$ac_t""no" 1>&6
8915 fi
8916 done
8917
8918 for ac_func in inet_ntop
8919 do
8920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8921 echo "configure:8922: checking for $ac_func" >&5
8922 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8923   echo $ac_n "(cached) $ac_c" 1>&6
8924 else
8925   cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8928 /* System header to define __stub macros and hopefully few prototypes,
8929     which can conflict with char $ac_func(); below.  */
8930 #include <assert.h>
8931 /* Override any gcc2 internal prototype to avoid an error.  */
8932 /* We use char because int might match the return type of a gcc2
8933     builtin and then its argument prototype would still apply.  */
8934 char $ac_func();
8935
8936 int main() {
8937
8938 /* The GNU C library defines this for functions which it implements
8939     to always fail with ENOSYS.  Some functions are actually named
8940     something starting with __ and the normal name is an alias.  */
8941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8942 choke me
8943 #else
8944 $ac_func();
8945 #endif
8946
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8950   rm -rf conftest*
8951   eval "ac_cv_func_$ac_func=yes"
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_func_$ac_func=no"
8957 fi
8958 rm -f conftest*
8959 fi
8960
8961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8962   echo "$ac_t""yes" 1>&6
8963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8964   cat >> confdefs.h <<EOF
8965 #define $ac_tr_func 1
8966 EOF
8967  cat >> confdefs.h <<\EOF
8968 #define HAVE_INET_NTOP 1
8969 EOF
8970
8971 else
8972   echo "$ac_t""no" 1>&6
8973 fi
8974 done
8975
8976 for ac_func in gethostbyname2
8977 do
8978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8979 echo "configure:8980: checking for $ac_func" >&5
8980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8981   echo $ac_n "(cached) $ac_c" 1>&6
8982 else
8983   cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 /* System header to define __stub macros and hopefully few prototypes,
8987     which can conflict with char $ac_func(); below.  */
8988 #include <assert.h>
8989 /* Override any gcc2 internal prototype to avoid an error.  */
8990 /* We use char because int might match the return type of a gcc2
8991     builtin and then its argument prototype would still apply.  */
8992 char $ac_func();
8993
8994 int main() {
8995
8996 /* The GNU C library defines this for functions which it implements
8997     to always fail with ENOSYS.  Some functions are actually named
8998     something starting with __ and the normal name is an alias.  */
8999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9000 choke me
9001 #else
9002 $ac_func();
9003 #endif
9004
9005 ; return 0; }
9006 EOF
9007 if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9008   rm -rf conftest*
9009   eval "ac_cv_func_$ac_func=yes"
9010 else
9011   echo "configure: failed program was:" >&5
9012   cat conftest.$ac_ext >&5
9013   rm -rf conftest*
9014   eval "ac_cv_func_$ac_func=no"
9015 fi
9016 rm -f conftest*
9017 fi
9018
9019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9020   echo "$ac_t""yes" 1>&6
9021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9022   cat >> confdefs.h <<EOF
9023 #define $ac_tr_func 1
9024 EOF
9025  cat >> confdefs.h <<\EOF
9026 #define HAVE_GETHOSTBYNAME2 1
9027 EOF
9028
9029 else
9030   echo "$ac_t""no" 1>&6
9031 fi
9032 done
9033
9034
9035 echo $ac_n "checking for struct sockaddr has a sa_len field""... $ac_c" 1>&6
9036 echo "configure:9037: checking for struct sockaddr has a sa_len field" >&5
9037 if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_sa_len'+set}'`\" = set"; then
9038   echo $ac_n "(cached) $ac_c" 1>&6
9039 else
9040   cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 #include <sys/socket.h>
9044 int main() {
9045 struct sockaddr s; s.sa_len;
9046 ; return 0; }
9047 EOF
9048 if { (eval echo configure:9049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9049   rm -rf conftest*
9050   ac_cv_struct_sockaddr_sa_len=yes
9051 else
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -rf conftest*
9055   ac_cv_struct_sockaddr_sa_len=no
9056 fi
9057 rm -f conftest*
9058 fi
9059
9060 echo "$ac_t""$ac_cv_struct_sockaddr_sa_len" 1>&6
9061
9062  if test $ac_cv_struct_sockaddr_sa_len = yes; then
9063   cat >> confdefs.h <<\EOF
9064 #define HAVE_SA_LEN 1
9065 EOF
9066
9067  fi
9068
9069
9070 echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6
9071 echo "configure:9072: checking for IPv6 support" >&5
9072 if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   cat > conftest.$ac_ext <<EOF
9076 #line 9077 "configure"
9077 #include "confdefs.h"
9078  #include <sys/types.h>
9079 #include <sys/socket.h>
9080 #include <netinet/in.h>
9081 int main() {
9082 struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
9083  0;
9084 ; return 0; }
9085 EOF
9086 if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9087   rm -rf conftest*
9088   ac_cv_ipv6_support=yes
9089 else
9090   echo "configure: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   rm -rf conftest*
9093   ac_cv_ipv6_support=no
9094 fi
9095 rm -f conftest*
9096 fi
9097
9098 echo "$ac_t""$ac_cv_ipv6_support" 1>&6
9099
9100 if test "$ac_cv_ipv6_support" = yes; then
9101   cat >> confdefs.h <<\EOF
9102 #define HAVE_IPV6 1
9103 EOF
9104
9105 fi
9106
9107
9108
9109 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9110 echo "configure:9111: checking for strftime" >&5
9111 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
9112   echo $ac_n "(cached) $ac_c" 1>&6
9113 else
9114   cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 /* System header to define __stub macros and hopefully few prototypes,
9118     which can conflict with char strftime(); below.  */
9119 #include <assert.h>
9120 /* Override any gcc2 internal prototype to avoid an error.  */
9121 /* We use char because int might match the return type of a gcc2
9122     builtin and then its argument prototype would still apply.  */
9123 char strftime();
9124
9125 int main() {
9126
9127 /* The GNU C library defines this for functions which it implements
9128     to always fail with ENOSYS.  Some functions are actually named
9129     something starting with __ and the normal name is an alias.  */
9130 #if defined (__stub_strftime) || defined (__stub___strftime)
9131 choke me
9132 #else
9133 strftime();
9134 #endif
9135
9136 ; return 0; }
9137 EOF
9138 if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9139   rm -rf conftest*
9140   eval "ac_cv_func_strftime=yes"
9141 else
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   eval "ac_cv_func_strftime=no"
9146 fi
9147 rm -f conftest*
9148 fi
9149
9150 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
9151   echo "$ac_t""yes" 1>&6
9152   cat >> confdefs.h <<\EOF
9153 #define HAVE_STRFTIME 1
9154 EOF
9155
9156 else
9157   echo "$ac_t""no" 1>&6
9158 # strftime is in -lintl on SCO UNIX.
9159 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
9160 echo "configure:9161: checking for strftime in -lintl" >&5
9161 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
9162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9163   echo $ac_n "(cached) $ac_c" 1>&6
9164 else
9165   ac_save_LIBS="$LIBS"
9166 LIBS="-lintl  $LIBS"
9167 cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 /* Override any gcc2 internal prototype to avoid an error.  */
9171 /* We use char because int might match the return type of a gcc2
9172     builtin and then its argument prototype would still apply.  */
9173 char strftime();
9174
9175 int main() {
9176 strftime()
9177 ; return 0; }
9178 EOF
9179 if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9180   rm -rf conftest*
9181   eval "ac_cv_lib_$ac_lib_var=yes"
9182 else
9183   echo "configure: failed program was:" >&5
9184   cat conftest.$ac_ext >&5
9185   rm -rf conftest*
9186   eval "ac_cv_lib_$ac_lib_var=no"
9187 fi
9188 rm -f conftest*
9189 LIBS="$ac_save_LIBS"
9190
9191 fi
9192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9193   echo "$ac_t""yes" 1>&6
9194   cat >> confdefs.h <<\EOF
9195 #define HAVE_STRFTIME 1
9196 EOF
9197
9198 LIBS="-lintl $LIBS"
9199 else
9200   echo "$ac_t""no" 1>&6
9201 fi
9202
9203 fi
9204
9205 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
9206 echo "configure:9207: checking for vprintf" >&5
9207 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
9208   echo $ac_n "(cached) $ac_c" 1>&6
9209 else
9210   cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213 /* System header to define __stub macros and hopefully few prototypes,
9214     which can conflict with char vprintf(); below.  */
9215 #include <assert.h>
9216 /* Override any gcc2 internal prototype to avoid an error.  */
9217 /* We use char because int might match the return type of a gcc2
9218     builtin and then its argument prototype would still apply.  */
9219 char vprintf();
9220
9221 int main() {
9222
9223 /* The GNU C library defines this for functions which it implements
9224     to always fail with ENOSYS.  Some functions are actually named
9225     something starting with __ and the normal name is an alias.  */
9226 #if defined (__stub_vprintf) || defined (__stub___vprintf)
9227 choke me
9228 #else
9229 vprintf();
9230 #endif
9231
9232 ; return 0; }
9233 EOF
9234 if { (eval echo configure:9235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9235   rm -rf conftest*
9236   eval "ac_cv_func_vprintf=yes"
9237 else
9238   echo "configure: failed program was:" >&5
9239   cat conftest.$ac_ext >&5
9240   rm -rf conftest*
9241   eval "ac_cv_func_vprintf=no"
9242 fi
9243 rm -f conftest*
9244 fi
9245
9246 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248   cat >> confdefs.h <<\EOF
9249 #define HAVE_VPRINTF 1
9250 EOF
9251
9252 else
9253   echo "$ac_t""no" 1>&6
9254 fi
9255
9256 if test "$ac_cv_func_vprintf" != yes; then
9257 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
9258 echo "configure:9259: checking for _doprnt" >&5
9259 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
9260   echo $ac_n "(cached) $ac_c" 1>&6
9261 else
9262   cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 /* System header to define __stub macros and hopefully few prototypes,
9266     which can conflict with char _doprnt(); below.  */
9267 #include <assert.h>
9268 /* Override any gcc2 internal prototype to avoid an error.  */
9269 /* We use char because int might match the return type of a gcc2
9270     builtin and then its argument prototype would still apply.  */
9271 char _doprnt();
9272
9273 int main() {
9274
9275 /* The GNU C library defines this for functions which it implements
9276     to always fail with ENOSYS.  Some functions are actually named
9277     something starting with __ and the normal name is an alias.  */
9278 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9279 choke me
9280 #else
9281 _doprnt();
9282 #endif
9283
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9287   rm -rf conftest*
9288   eval "ac_cv_func__doprnt=yes"
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   eval "ac_cv_func__doprnt=no"
9294 fi
9295 rm -f conftest*
9296 fi
9297
9298 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300   cat >> confdefs.h <<\EOF
9301 #define HAVE_DOPRNT 1
9302 EOF
9303
9304 else
9305   echo "$ac_t""no" 1>&6
9306 fi
9307
9308 fi
9309
9310 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9311 # for constant arguments.  Useless!
9312 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9313 echo "configure:9314: checking for working alloca.h" >&5
9314 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 #include <alloca.h>
9321 int main() {
9322 char *p = alloca(2 * sizeof(int));
9323 ; return 0; }
9324 EOF
9325 if { (eval echo configure:9326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9326   rm -rf conftest*
9327   ac_cv_header_alloca_h=yes
9328 else
9329   echo "configure: failed program was:" >&5
9330   cat conftest.$ac_ext >&5
9331   rm -rf conftest*
9332   ac_cv_header_alloca_h=no
9333 fi
9334 rm -f conftest*
9335 fi
9336
9337 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9338 if test $ac_cv_header_alloca_h = yes; then
9339   cat >> confdefs.h <<\EOF
9340 #define HAVE_ALLOCA_H 1
9341 EOF
9342
9343 fi
9344
9345 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9346 echo "configure:9347: checking for alloca" >&5
9347 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
9348   echo $ac_n "(cached) $ac_c" 1>&6
9349 else
9350   cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353
9354 #ifdef __GNUC__
9355 # define alloca __builtin_alloca
9356 #else
9357 # ifdef _MSC_VER
9358 #  include <malloc.h>
9359 #  define alloca _alloca
9360 # else
9361 #  if HAVE_ALLOCA_H
9362 #   include <alloca.h>
9363 #  else
9364 #   ifdef _AIX
9365  #pragma alloca
9366 #   else
9367 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9368 char *alloca ();
9369 #    endif
9370 #   endif
9371 #  endif
9372 # endif
9373 #endif
9374
9375 int main() {
9376 char *p = (char *) alloca(1);
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   ac_cv_func_alloca_works=yes
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   ac_cv_func_alloca_works=no
9387 fi
9388 rm -f conftest*
9389 fi
9390
9391 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9392 if test $ac_cv_func_alloca_works = yes; then
9393   cat >> confdefs.h <<\EOF
9394 #define HAVE_ALLOCA 1
9395 EOF
9396
9397 fi
9398
9399 if test $ac_cv_func_alloca_works = no; then
9400   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9401   # that cause trouble.  Some versions do not even contain alloca or
9402   # contain a buggy version.  If you still want to use their alloca,
9403   # use ar to extract alloca.o from them instead of compiling alloca.c.
9404   ALLOCA=alloca.${ac_objext}
9405   cat >> confdefs.h <<\EOF
9406 #define C_ALLOCA 1
9407 EOF
9408
9409
9410 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9411 echo "configure:9412: checking whether alloca needs Cray hooks" >&5
9412 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
9413   echo $ac_n "(cached) $ac_c" 1>&6
9414 else
9415   cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418 #if defined(CRAY) && ! defined(CRAY2)
9419 webecray
9420 #else
9421 wenotbecray
9422 #endif
9423
9424 EOF
9425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9426   egrep "webecray" >/dev/null 2>&1; then
9427   rm -rf conftest*
9428   ac_cv_os_cray=yes
9429 else
9430   rm -rf conftest*
9431   ac_cv_os_cray=no
9432 fi
9433 rm -f conftest*
9434
9435 fi
9436
9437 echo "$ac_t""$ac_cv_os_cray" 1>&6
9438 if test $ac_cv_os_cray = yes; then
9439 for ac_func in _getb67 GETB67 getb67; do
9440   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9441 echo "configure:9442: checking for $ac_func" >&5
9442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9443   echo $ac_n "(cached) $ac_c" 1>&6
9444 else
9445   cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 /* System header to define __stub macros and hopefully few prototypes,
9449     which can conflict with char $ac_func(); below.  */
9450 #include <assert.h>
9451 /* Override any gcc2 internal prototype to avoid an error.  */
9452 /* We use char because int might match the return type of a gcc2
9453     builtin and then its argument prototype would still apply.  */
9454 char $ac_func();
9455
9456 int main() {
9457
9458 /* The GNU C library defines this for functions which it implements
9459     to always fail with ENOSYS.  Some functions are actually named
9460     something starting with __ and the normal name is an alias.  */
9461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9462 choke me
9463 #else
9464 $ac_func();
9465 #endif
9466
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9470   rm -rf conftest*
9471   eval "ac_cv_func_$ac_func=yes"
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   eval "ac_cv_func_$ac_func=no"
9477 fi
9478 rm -f conftest*
9479 fi
9480
9481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9482   echo "$ac_t""yes" 1>&6
9483   cat >> confdefs.h <<EOF
9484 #define CRAY_STACKSEG_END $ac_func
9485 EOF
9486
9487   break
9488 else
9489   echo "$ac_t""no" 1>&6
9490 fi
9491
9492 done
9493 fi
9494
9495 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9496 echo "configure:9497: checking stack direction for C alloca" >&5
9497 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   if test "$cross_compiling" = yes; then
9501   ac_cv_c_stack_direction=0
9502 else
9503   cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 find_stack_direction ()
9507 {
9508   static char *addr = 0;
9509   auto char dummy;
9510   if (addr == 0)
9511     {
9512       addr = &dummy;
9513       return find_stack_direction ();
9514     }
9515   else
9516     return (&dummy > addr) ? 1 : -1;
9517 }
9518 main ()
9519 {
9520   exit (find_stack_direction() < 0);
9521 }
9522 EOF
9523 if { (eval echo configure:9524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9524 then
9525   ac_cv_c_stack_direction=1
9526 else
9527   echo "configure: failed program was:" >&5
9528   cat conftest.$ac_ext >&5
9529   rm -fr conftest*
9530   ac_cv_c_stack_direction=-1
9531 fi
9532 rm -fr conftest*
9533 fi
9534
9535 fi
9536
9537 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9538 cat >> confdefs.h <<EOF
9539 #define STACK_DIRECTION $ac_cv_c_stack_direction
9540 EOF
9541
9542 fi
9543
9544 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
9545 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
9546 echo "configure:9547: checking for getmntent in -lsun" >&5
9547 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
9548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   ac_save_LIBS="$LIBS"
9552 LIBS="-lsun  $LIBS"
9553 cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 /* Override any gcc2 internal prototype to avoid an error.  */
9557 /* We use char because int might match the return type of a gcc2
9558     builtin and then its argument prototype would still apply.  */
9559 char getmntent();
9560
9561 int main() {
9562 getmntent()
9563 ; return 0; }
9564 EOF
9565 if { (eval echo configure:9566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9566   rm -rf conftest*
9567   eval "ac_cv_lib_$ac_lib_var=yes"
9568 else
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   eval "ac_cv_lib_$ac_lib_var=no"
9573 fi
9574 rm -f conftest*
9575 LIBS="$ac_save_LIBS"
9576
9577 fi
9578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9579   echo "$ac_t""yes" 1>&6
9580   LIBS="-lsun $LIBS"
9581 else
9582   echo "$ac_t""no" 1>&6
9583 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
9584 echo "configure:9585: checking for getmntent in -lseq" >&5
9585 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
9586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9587   echo $ac_n "(cached) $ac_c" 1>&6
9588 else
9589   ac_save_LIBS="$LIBS"
9590 LIBS="-lseq  $LIBS"
9591 cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 /* Override any gcc2 internal prototype to avoid an error.  */
9595 /* We use char because int might match the return type of a gcc2
9596     builtin and then its argument prototype would still apply.  */
9597 char getmntent();
9598
9599 int main() {
9600 getmntent()
9601 ; return 0; }
9602 EOF
9603 if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9604   rm -rf conftest*
9605   eval "ac_cv_lib_$ac_lib_var=yes"
9606 else
9607   echo "configure: failed program was:" >&5
9608   cat conftest.$ac_ext >&5
9609   rm -rf conftest*
9610   eval "ac_cv_lib_$ac_lib_var=no"
9611 fi
9612 rm -f conftest*
9613 LIBS="$ac_save_LIBS"
9614
9615 fi
9616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9617   echo "$ac_t""yes" 1>&6
9618   LIBS="-lseq $LIBS"
9619 else
9620   echo "$ac_t""no" 1>&6
9621 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
9622 echo "configure:9623: checking for getmntent in -lgen" >&5
9623 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
9624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   ac_save_LIBS="$LIBS"
9628 LIBS="-lgen  $LIBS"
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 /* Override any gcc2 internal prototype to avoid an error.  */
9633 /* We use char because int might match the return type of a gcc2
9634     builtin and then its argument prototype would still apply.  */
9635 char getmntent();
9636
9637 int main() {
9638 getmntent()
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9642   rm -rf conftest*
9643   eval "ac_cv_lib_$ac_lib_var=yes"
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   eval "ac_cv_lib_$ac_lib_var=no"
9649 fi
9650 rm -f conftest*
9651 LIBS="$ac_save_LIBS"
9652
9653 fi
9654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9655   echo "$ac_t""yes" 1>&6
9656   LIBS="-lgen $LIBS"
9657 else
9658   echo "$ac_t""no" 1>&6
9659 fi
9660
9661 fi
9662
9663 fi
9664
9665 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
9666 echo "configure:9667: checking for getmntent" >&5
9667 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
9668   echo $ac_n "(cached) $ac_c" 1>&6
9669 else
9670   cat > conftest.$ac_ext <<EOF
9671 #line 9672 "configure"
9672 #include "confdefs.h"
9673 /* System header to define __stub macros and hopefully few prototypes,
9674     which can conflict with char getmntent(); below.  */
9675 #include <assert.h>
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 /* We use char because int might match the return type of a gcc2
9678     builtin and then its argument prototype would still apply.  */
9679 char getmntent();
9680
9681 int main() {
9682
9683 /* The GNU C library defines this for functions which it implements
9684     to always fail with ENOSYS.  Some functions are actually named
9685     something starting with __ and the normal name is an alias.  */
9686 #if defined (__stub_getmntent) || defined (__stub___getmntent)
9687 choke me
9688 #else
9689 getmntent();
9690 #endif
9691
9692 ; return 0; }
9693 EOF
9694 if { (eval echo configure:9695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9695   rm -rf conftest*
9696   eval "ac_cv_func_getmntent=yes"
9697 else
9698   echo "configure: failed program was:" >&5
9699   cat conftest.$ac_ext >&5
9700   rm -rf conftest*
9701   eval "ac_cv_func_getmntent=no"
9702 fi
9703 rm -f conftest*
9704 fi
9705
9706 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
9707   echo "$ac_t""yes" 1>&6
9708   cat >> confdefs.h <<\EOF
9709 #define HAVE_GETMNTENT 1
9710 EOF
9711
9712 else
9713   echo "$ac_t""no" 1>&6
9714 fi
9715
9716 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
9717 echo "configure:9718: checking whether closedir returns void" >&5
9718 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
9719   echo $ac_n "(cached) $ac_c" 1>&6
9720 else
9721   if test "$cross_compiling" = yes; then
9722   ac_cv_func_closedir_void=yes
9723 else
9724   cat > conftest.$ac_ext <<EOF
9725 #line 9726 "configure"
9726 #include "confdefs.h"
9727 #include <sys/types.h>
9728 #include <$ac_header_dirent>
9729 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9732 then
9733   ac_cv_func_closedir_void=no
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737   rm -fr conftest*
9738   ac_cv_func_closedir_void=yes
9739 fi
9740 rm -fr conftest*
9741 fi
9742
9743 fi
9744
9745 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
9746 if test $ac_cv_func_closedir_void = yes; then
9747   cat >> confdefs.h <<\EOF
9748 #define CLOSEDIR_VOID 1
9749 EOF
9750
9751 fi
9752
9753 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9754 echo "configure:9755: checking whether setpgrp takes no argument" >&5
9755 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   if test "$cross_compiling" = yes; then
9759   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
9760 else
9761   cat > conftest.$ac_ext <<EOF
9762 #line 9763 "configure"
9763 #include "confdefs.h"
9764
9765 #ifdef HAVE_UNISTD_H
9766 #include <unistd.h>
9767 #endif
9768
9769 /*
9770  * If this system has a BSD-style setpgrp, which takes arguments, exit
9771  * successfully.
9772  */
9773 main()
9774 {
9775     if (setpgrp(1,1) == -1)
9776         exit(0);
9777     else
9778         exit(1);
9779 }
9780
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9783 then
9784   ac_cv_func_setpgrp_void=no
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -fr conftest*
9789   ac_cv_func_setpgrp_void=yes
9790 fi
9791 rm -fr conftest*
9792 fi
9793
9794
9795 fi
9796
9797 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
9798 if test $ac_cv_func_setpgrp_void = yes; then
9799   cat >> confdefs.h <<\EOF
9800 #define SETPGRP_VOID 1
9801 EOF
9802
9803 fi
9804                       echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
9805 echo "configure:9806: checking for working fnmatch" >&5
9806 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   # Some versions of Solaris or SCO have a broken fnmatch function.
9810 # So we run a test program.  If we are cross-compiling, take no chance.
9811 # Thanks to John Oleynick and Franc,ois Pinard for this test.
9812 if test "$cross_compiling" = yes; then
9813   ac_cv_func_fnmatch_works=no
9814 else
9815   cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9821 then
9822   ac_cv_func_fnmatch_works=yes
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -fr conftest*
9827   ac_cv_func_fnmatch_works=no
9828 fi
9829 rm -fr conftest*
9830 fi
9831
9832 fi
9833
9834 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
9835 if test $ac_cv_func_fnmatch_works = yes; then
9836   cat >> confdefs.h <<\EOF
9837 #define HAVE_FNMATCH 1
9838 EOF
9839
9840 fi
9841
9842
9843
9844 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
9845 echo "configure:9846: checking for setlocale in -lxpg4" >&5
9846 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
9847 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9848   echo $ac_n "(cached) $ac_c" 1>&6
9849 else
9850   ac_save_LIBS="$LIBS"
9851 LIBS="-lxpg4  $LIBS"
9852 cat > conftest.$ac_ext <<EOF
9853 #line 9854 "configure"
9854 #include "confdefs.h"
9855 /* Override any gcc2 internal prototype to avoid an error.  */
9856 /* We use char because int might match the return type of a gcc2
9857     builtin and then its argument prototype would still apply.  */
9858 char setlocale();
9859
9860 int main() {
9861 setlocale()
9862 ; return 0; }
9863 EOF
9864 if { (eval echo configure:9865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9865   rm -rf conftest*
9866   eval "ac_cv_lib_$ac_lib_var=yes"
9867 else
9868   echo "configure: failed program was:" >&5
9869   cat conftest.$ac_ext >&5
9870   rm -rf conftest*
9871   eval "ac_cv_lib_$ac_lib_var=no"
9872 fi
9873 rm -f conftest*
9874 LIBS="$ac_save_LIBS"
9875
9876 fi
9877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9878   echo "$ac_t""yes" 1>&6
9879   LIBS="$LIBS -lxpg4"
9880 else
9881   echo "$ac_t""no" 1>&6
9882 fi
9883
9884
9885
9886 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
9887 echo "configure:9888: checking for getpwnam in -lsun" >&5
9888 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
9889 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9890   echo $ac_n "(cached) $ac_c" 1>&6
9891 else
9892   ac_save_LIBS="$LIBS"
9893 LIBS="-lsun  $LIBS"
9894 cat > conftest.$ac_ext <<EOF
9895 #line 9896 "configure"
9896 #include "confdefs.h"
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 /* We use char because int might match the return type of a gcc2
9899     builtin and then its argument prototype would still apply.  */
9900 char getpwnam();
9901
9902 int main() {
9903 getpwnam()
9904 ; return 0; }
9905 EOF
9906 if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9907   rm -rf conftest*
9908   eval "ac_cv_lib_$ac_lib_var=yes"
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912   rm -rf conftest*
9913   eval "ac_cv_lib_$ac_lib_var=no"
9914 fi
9915 rm -f conftest*
9916 LIBS="$ac_save_LIBS"
9917
9918 fi
9919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921     ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9922     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9923   cat >> confdefs.h <<EOF
9924 #define $ac_tr_lib 1
9925 EOF
9926
9927   LIBS="-lsun $LIBS"
9928
9929 else
9930   echo "$ac_t""no" 1>&6
9931 fi
9932
9933
9934 for ac_hdr in zlib.h
9935 do
9936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9938 echo "configure:9939: checking for $ac_hdr" >&5
9939 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9940   echo $ac_n "(cached) $ac_c" 1>&6
9941 else
9942   cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 #include <$ac_hdr>
9946 EOF
9947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9948 { (eval echo configure:9949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9950 if test -z "$ac_err"; then
9951   rm -rf conftest*
9952   eval "ac_cv_header_$ac_safe=yes"
9953 else
9954   echo "$ac_err" >&5
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   eval "ac_cv_header_$ac_safe=no"
9959 fi
9960 rm -f conftest*
9961 fi
9962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9963   echo "$ac_t""yes" 1>&6
9964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9965   cat >> confdefs.h <<EOF
9966 #define $ac_tr_hdr 1
9967 EOF
9968  
9969 else
9970   echo "$ac_t""no" 1>&6
9971 fi
9972 done
9973
9974 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
9975 echo "configure:9976: checking for deflate in -lz" >&5
9976 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
9977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9978   echo $ac_n "(cached) $ac_c" 1>&6
9979 else
9980   ac_save_LIBS="$LIBS"
9981 LIBS="-lz  $LIBS"
9982 cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 /* Override any gcc2 internal prototype to avoid an error.  */
9986 /* We use char because int might match the return type of a gcc2
9987     builtin and then its argument prototype would still apply.  */
9988 char deflate();
9989
9990 int main() {
9991 deflate()
9992 ; return 0; }
9993 EOF
9994 if { (eval echo configure:9995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9995   rm -rf conftest*
9996   eval "ac_cv_lib_$ac_lib_var=yes"
9997 else
9998   echo "configure: failed program was:" >&5
9999   cat conftest.$ac_ext >&5
10000   rm -rf conftest*
10001   eval "ac_cv_lib_$ac_lib_var=no"
10002 fi
10003 rm -f conftest*
10004 LIBS="$ac_save_LIBS"
10005
10006 fi
10007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10008   echo "$ac_t""yes" 1>&6
10009   FDLIBS="-lz"
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014 have_zlib=no
10015 if test x$FDLIBS = x-lz; then
10016   cat >> confdefs.h <<\EOF
10017 #define HAVE_LIBZ 1
10018 EOF
10019
10020   have_zlib=yes
10021 fi
10022
10023 ac_safe=`echo "sys/acl.h" | sed 'y%./+-%__p_%'`
10024 echo $ac_n "checking for sys/acl.h""... $ac_c" 1>&6
10025 echo "configure:10026: checking for sys/acl.h" >&5
10026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 #include <sys/acl.h>
10033 EOF
10034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10035 { (eval echo configure:10036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10037 if test -z "$ac_err"; then
10038   rm -rf conftest*
10039   eval "ac_cv_header_$ac_safe=yes"
10040 else
10041   echo "$ac_err" >&5
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_header_$ac_safe=no"
10046 fi
10047 rm -f conftest*
10048 fi
10049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051   :
10052 else
10053   echo "$ac_t""no" 1>&6
10054 fi
10055
10056 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
10057 echo "configure:10058: checking for acl_get_file in -lacl" >&5
10058 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
10059 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   ac_save_LIBS="$LIBS"
10063 LIBS="-lacl  $LIBS"
10064 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* Override any gcc2 internal prototype to avoid an error.  */
10068 /* We use char because int might match the return type of a gcc2
10069     builtin and then its argument prototype would still apply.  */
10070 char acl_get_file();
10071
10072 int main() {
10073 acl_get_file()
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=no"
10084 fi
10085 rm -f conftest*
10086 LIBS="$ac_save_LIBS"
10087
10088 fi
10089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10090   echo "$ac_t""yes" 1>&6
10091   FDLIBS="-lacl $FDLIBS"
10092 else
10093   echo "$ac_t""no" 1>&6
10094 fi
10095
10096 have_acl=no
10097 if test $ac_cv_lib_acl_acl_get_file = yes; then
10098    cat >> confdefs.h <<\EOF
10099 #define HAVE_ACL 1
10100 EOF
10101
10102    have_acl=yes
10103 fi
10104
10105 PTHREAD_LIB=""
10106 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
10107 echo "configure:10108: checking for pthread_create in -lpthread" >&5
10108 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
10109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   ac_save_LIBS="$LIBS"
10113 LIBS="-lpthread  $LIBS"
10114 cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 /* Override any gcc2 internal prototype to avoid an error.  */
10118 /* We use char because int might match the return type of a gcc2
10119     builtin and then its argument prototype would still apply.  */
10120 char pthread_create();
10121
10122 int main() {
10123 pthread_create()
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10127   rm -rf conftest*
10128   eval "ac_cv_lib_$ac_lib_var=yes"
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   eval "ac_cv_lib_$ac_lib_var=no"
10134 fi
10135 rm -f conftest*
10136 LIBS="$ac_save_LIBS"
10137
10138 fi
10139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10140   echo "$ac_t""yes" 1>&6
10141   PTHREAD_LIB="-lpthread"
10142 else
10143   echo "$ac_t""no" 1>&6
10144 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
10145 echo "configure:10146: checking for pthread_create in -lpthreads" >&5
10146 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
10147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10148   echo $ac_n "(cached) $ac_c" 1>&6
10149 else
10150   ac_save_LIBS="$LIBS"
10151 LIBS="-lpthreads  $LIBS"
10152 cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155 /* Override any gcc2 internal prototype to avoid an error.  */
10156 /* We use char because int might match the return type of a gcc2
10157     builtin and then its argument prototype would still apply.  */
10158 char pthread_create();
10159
10160 int main() {
10161 pthread_create()
10162 ; return 0; }
10163 EOF
10164 if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10165   rm -rf conftest*
10166   eval "ac_cv_lib_$ac_lib_var=yes"
10167 else
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_lib_$ac_lib_var=no"
10172 fi
10173 rm -f conftest*
10174 LIBS="$ac_save_LIBS"
10175
10176 fi
10177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10178   echo "$ac_t""yes" 1>&6
10179   PTHREAD_LIB="-lpthreads"
10180 else
10181   echo "$ac_t""no" 1>&6
10182 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
10183 echo "configure:10184: checking for pthread_create in -lc_r" >&5
10184 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
10185 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10186   echo $ac_n "(cached) $ac_c" 1>&6
10187 else
10188   ac_save_LIBS="$LIBS"
10189 LIBS="-lc_r  $LIBS"
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 /* We use char because int might match the return type of a gcc2
10195     builtin and then its argument prototype would still apply.  */
10196 char pthread_create();
10197
10198 int main() {
10199 pthread_create()
10200 ; return 0; }
10201 EOF
10202 if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10203   rm -rf conftest*
10204   eval "ac_cv_lib_$ac_lib_var=yes"
10205 else
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   eval "ac_cv_lib_$ac_lib_var=no"
10210 fi
10211 rm -f conftest*
10212 LIBS="$ac_save_LIBS"
10213
10214 fi
10215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10216   echo "$ac_t""yes" 1>&6
10217   PTHREAD_LIB="-lc_r"
10218 else
10219   echo "$ac_t""no" 1>&6
10220 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
10221 echo "configure:10222: checking for pthread_create" >&5
10222 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* System header to define __stub macros and hopefully few prototypes,
10229     which can conflict with char pthread_create(); below.  */
10230 #include <assert.h>
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char pthread_create();
10235
10236 int main() {
10237
10238 /* The GNU C library defines this for functions which it implements
10239     to always fail with ENOSYS.  Some functions are actually named
10240     something starting with __ and the normal name is an alias.  */
10241 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
10242 choke me
10243 #else
10244 pthread_create();
10245 #endif
10246
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10250   rm -rf conftest*
10251   eval "ac_cv_func_pthread_create=yes"
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_func_pthread_create=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263   :
10264 else
10265   echo "$ac_t""no" 1>&6
10266 fi
10267
10268             
10269 fi
10270
10271         
10272 fi
10273
10274
10275 fi
10276
10277
10278
10279 cat >> confdefs.h <<\EOF
10280 #define FDLIBS 1
10281 EOF
10282
10283
10284
10285 CFLAGS=${CFLAGS--O}
10286 LDFLAGS=${LDFLAGS--O}
10287 DB_LIBS="${SQL_LFLAGS}"
10288
10289 CPPFLAGS="$CPPFLAGS"
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304 OBJLIST=
10305
10306
10307 lld="lld"
10308 llu="llu"
10309
10310 WCFLAGS=
10311 WLDFLAGS=
10312
10313 #
10314 # Finally we set appropriate distribution specific
10315 #  variables and defaults
10316 #
10317 # PFILES are platform specific files
10318 PFILES="platforms/Makefile"
10319 PSCMD="ps -e"
10320 WIN32=
10321 MACOSX=
10322 hostname=`uname -n | cut -d '.' -f 1`
10323 case "$DISTNAME" in
10324 aix)
10325         DISTVER=`uname -r`
10326         PSCMD="ps -e -o pid,comm"
10327         PFILES="${PFILES} \
10328            platforms/aix/Makefile"
10329         TAPEDRIVE="/dev/rmt0.1" 
10330   ;;      
10331 alpha)
10332         DISTVER=`uname -r`
10333         PTHREAD_LIB="-lpthread -lexc"
10334         if test "${CC}" = "gcc" ; then
10335            lld="lld"
10336            llu="llu"
10337         else
10338            lld="ld"
10339            llu="lu"
10340         fi
10341         TAPEDRIVE="/dev/nrmt0"
10342   ;;
10343 bsdi)
10344         DISTVER=`uname -a |awk '{print $3}'`
10345         TAPEDRIVE="/dev/nrmt0"
10346         PTHREAD_LIB="-pthread"
10347         CFLAGS="${CFLAGS} -pthread"
10348         PSCMD="ps -x -o pid,command"
10349         lld="qd"
10350         llu="qu"
10351         PFILES="${PFILES} \
10352             platforms/bsdi/Makefile \
10353             platforms/bsdi/bacula-fd \
10354             platforms/bsdi/bacula-sd \
10355             platforms/bsdi/bacula-dir"
10356         largefile_support="yes"
10357   ;;
10358 cygwin)
10359         DISTVER=`uname -a |awk '{print $3}'`
10360         TAPEDRIVE="/dev/nrst0"
10361         WIN32=win32
10362         WCFLAGS="-mwindows"
10363         WLDFLAGS="-mwindows"
10364   ;;
10365 darwin)
10366         DISTVER=`uname -r`
10367         TAPEDRIVE="/dev/nst0"
10368         PSCMD="ps -e -o pid,command"
10369         MACOSX=macosx
10370         PFILES="${PFILES} \
10371            platforms/darwin/Makefile"
10372   ;;
10373 debian)
10374         DISTVER=`cat /etc/debian_version`
10375         TAPEDRIVE="/dev/nrst0"
10376         PSCMD="ps -e -o pid,command"
10377   ;;
10378 freebsd)
10379         DISTVER=`uname -a |awk '{print $3}'`
10380         VER=`echo $DISTVER | cut -c 1`
10381         if test x$VER = x4 ; then
10382            PTHREAD_LIB="-pthread"
10383            CFLAGS="${CFLAGS} -pthread"
10384         fi
10385         lld="qd"
10386         llu="qu"
10387         TAPEDRIVE="/dev/nrsa0"
10388         PSCMD="ps -x -o pid,command"
10389         PFILES="${PFILES} \
10390             platforms/freebsd/Makefile \
10391             platforms/freebsd/bacula-fd \
10392             platforms/freebsd/bacula-sd \
10393             platforms/freebsd/bacula-dir"
10394         largefile_support="yes"
10395   ;;
10396 hpux)
10397         PSCMD="UNIX95=1 ps -e -o pid,comm"
10398         CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
10399         DISTVER=`uname -r`
10400         TAPEDRIVE="/dev/rmt/0hnb"
10401   ;;
10402 irix)
10403         DISTVER=`uname -r`
10404         TAPEDRIVE="/dev/rmt/0cbn"
10405         PSCMD="ps -e -o pid,comm"
10406         PFILES="${PFILES} \
10407             platforms/irix/Makefile \
10408             platforms/irix/bacula-fd \
10409             platforms/irix/bacula-sd \
10410             platforms/irix/bacula-dir"
10411   ;;
10412 netbsd)
10413         DISTVER=`uname -a |awk '{print $3}'`
10414         lld="qd"
10415         llu="qu"
10416         TAPEDRIVE="/dev/nrst0"
10417         PSCMD="ps -a -o pid,command"
10418         PTHREAD_LIB="-pthread"
10419         CFLAGS="${CFLAGS} -pthread"
10420   ;;
10421 openbsd)
10422         DISTVER=`uname -a |awk '{print $3}'`
10423         lld="qd"
10424         llu="qu"
10425         TAPEDRIVE="/dev/nrst0"
10426         PSCMD="ps -a -o pid,command"
10427         PTHREAD_LIB="-pthread"
10428         CFLAGS="${CFLAGS} -pthread"
10429         PFILES="${PFILES} \
10430             platforms/openbsd/Makefile \
10431             platforms/openbsd/bacula-fd \
10432             platforms/openbsd/bacula-sd \
10433             platforms/openbsd/bacula-dir"
10434   ;;
10435 redhat)
10436         if test -f /etc/whitebox-release ; then
10437            f=/etc/whitebox-release
10438         else
10439            f=/etc/redhat-release
10440         fi
10441         if test `cat $f | grep release |\
10442                    cut -f 3 -d ' '`x = "Enterprise"x ; then
10443            DISTVER="Enterprise "`cat $f | grep release |\
10444                     cut -f 6 -d ' '`
10445         else
10446             DISTVER=`cat /etc/redhat-release | grep release |\
10447                      cut -f 5 -d ' '`
10448         fi
10449         TAPEDRIVE="/dev/nst0"
10450         PSCMD="ps -e -o pid,command"
10451         PFILES="${PFILES} \
10452             platforms/redhat/Makefile \
10453             platforms/redhat/bacula-fd \
10454             platforms/redhat/bacula-sd \
10455             platforms/redhat/bacula-dir \
10456             platforms/redhat/bacula.spec \
10457             "
10458         hostname=`hostname -s`
10459   ;;
10460 mandrake)
10461         DISTVER=`cat /etc/mandrake-release | grep release |\
10462            cut -f 5 -d ' '`
10463         TAPEDRIVE="/dev/nst0"
10464         PSCMD="ps -e -o pid,command"
10465         PFILES="${PFILES} \
10466             platforms/mandrake/Makefile \
10467             platforms/mandrake/bacula-fd \
10468             platforms/mandrake/bacula-sd \
10469             platforms/mandrake/bacula-dir \
10470             platforms/mandrake/bacula.spec \
10471             "
10472   ;;
10473 gentoo)
10474         DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
10475         TAPEDRIVE="/dev/nst0"
10476         PSCMD="ps -e -o pid,command"
10477         PFILES="${PFILES} \
10478             platforms/gentoo/Makefile \
10479             platforms/gentoo/bacula-fd \
10480             platforms/gentoo/bacula-sd \
10481             platforms/gentoo/bacula-dir"
10482   ;;
10483 slackware)
10484         DISTVER=`cat /etc/slackware-version`
10485         TAPEDRIVE="/dev/nst0"
10486         PSCMD="ps -e -o pid,command"
10487         PFILES="${PFILES} \
10488             platforms/slackware/Makefile \
10489             platforms/slackware/rc.bacula-fd \
10490             platforms/slackware/rc.bacula-sd \
10491             platforms/slackware/rc.bacula-dir\
10492             platforms/slackware/functions.bacula"
10493   ;;
10494 solaris)
10495         DISTVER=`uname -r`
10496         TAPEDRIVE="/dev/rmt/0cbn"
10497         PSCMD="ps -e -o pid,comm"
10498         PFILES="${PFILES} \
10499             platforms/solaris/Makefile \
10500             platforms/solaris/bacula-fd \
10501             platforms/solaris/bacula-sd \
10502             platforms/solaris/bacula-dir"
10503         if test x$DISTVER = x5.6 ; then
10504             cat >> confdefs.h <<\EOF
10505 #define HAVE_OLD_SOCKOPT 1
10506 EOF
10507
10508         fi
10509   ;;
10510 suse)
10511         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
10512             cut -f 3 -d ' '`
10513         TAPEDRIVE="/dev/nst0"
10514         PSCMD="ps -e -o pid,command"
10515         PFILES="${PFILES} \
10516             platforms/suse/Makefile \
10517             platforms/suse/bacula-fd \
10518             platforms/suse/bacula-sd \
10519             platforms/suse/bacula-dir \
10520             platforms/suse/bacula \
10521             platforms/suse/bacula.spec"
10522   ;;
10523 suse5)
10524         DISTNAME=suse
10525         DISTVER=5.x
10526         TAPEDRIVE="/dev/nst0"
10527         PSCMD="ps -e -o pid,command"
10528         PFILES="${PFILES} \
10529             platforms/suse/Makefile \
10530             platforms/suse/bacula-fd \
10531             platforms/suse/bacula-sd \
10532             platforms/suse/bacula-dir"
10533   ;;
10534 unknown)
10535         DISTVER=unknown
10536         TAPEDRIVE="/dev/nst0"
10537   ;;
10538 *)
10539   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
10540   ;;
10541 esac  
10542
10543
10544
10545 LIBS="$PTHREAD_LIB $LIBS"
10546
10547 cat >> confdefs.h <<EOF
10548 #define lld "$lld"
10549 EOF
10550
10551 cat >> confdefs.h <<EOF
10552 #define llu "$llu"
10553 EOF
10554
10555
10556
10557
10558
10559
10560
10561
10562 MCOMMON=./autoconf/Make.common
10563
10564
10565 if test "x${subsysdir}" = "x${sbindir}" ; then
10566    echo " "
10567    echo " "
10568    echo "You have set both --sbindir and --with-subsys-dir"
10569    echo "  equal to: ${subsysdir} "
10570    echo "This is not permitted. Please reconfigure."
10571    echo " "
10572    echo "Aborting configuration ..."
10573    echo " "
10574    echo " "
10575    exit 1
10576 fi 
10577
10578 trap '' 1 2 15
10579 cat > confcache <<\EOF
10580 # This file is a shell script that caches the results of configure
10581 # tests run on this system so they can be shared between configure
10582 # scripts and configure runs.  It is not useful on other systems.
10583 # If it contains results you don't want to keep, you may remove or edit it.
10584 #
10585 # By default, configure uses ./config.cache as the cache file,
10586 # creating it if it does not exist already.  You can give configure
10587 # the --cache-file=FILE option to use a different cache file; that is
10588 # what configure does when it calls configure scripts in
10589 # subdirectories, so they share the cache.
10590 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10591 # config.status only pays attention to the cache file if you give it the
10592 # --recheck option to rerun configure.
10593 #
10594 EOF
10595 # The following way of writing the cache mishandles newlines in values,
10596 # but we know of no workaround that is simple, portable, and efficient.
10597 # So, don't put newlines in cache variables' values.
10598 # Ultrix sh set writes to stderr and can't be redirected directly,
10599 # and sets the high bit in the cache file unless we assign to the vars.
10600 (set) 2>&1 |
10601   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10602   *ac_space=\ *)
10603     # `set' does not quote correctly, so add quotes (double-quote substitution
10604     # turns \\\\ into \\, and sed turns \\ into \).
10605     sed -n \
10606       -e "s/'/'\\\\''/g" \
10607       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10608     ;;
10609   *)
10610     # `set' quotes correctly as required by POSIX, so do not add quotes.
10611     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10612     ;;
10613   esac >> confcache
10614 if cmp -s $cache_file confcache; then
10615   :
10616 else
10617   if test -w $cache_file; then
10618     echo "updating cache $cache_file"
10619     cat confcache > $cache_file
10620   else
10621     echo "not updating unwritable cache $cache_file"
10622   fi
10623 fi
10624 rm -f confcache
10625
10626 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10627
10628 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10629 # Let make expand exec_prefix.
10630 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10631
10632 # Any assignment to VPATH causes Sun make to only execute
10633 # the first set of double-colon rules, so remove it if not needed.
10634 # If there is a colon in the path, we need to keep it.
10635 if test "x$srcdir" = x.; then
10636   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10637 fi
10638
10639 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10640
10641 DEFS=-DHAVE_CONFIG_H
10642
10643 # Without the "./", some shells look in PATH for config.status.
10644 : ${CONFIG_STATUS=./config.status}
10645
10646 echo creating $CONFIG_STATUS
10647 rm -f $CONFIG_STATUS
10648 cat > $CONFIG_STATUS <<EOF
10649 #! /bin/sh
10650 # Generated automatically by configure.
10651 # Run this file to recreate the current configuration.
10652 # This directory was configured as follows,
10653 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10654 #
10655 # $0 $ac_configure_args
10656 #
10657 # Compiler output produced by configure, useful for debugging
10658 # configure, is in ./config.log if it exists.
10659
10660 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10661 for ac_option
10662 do
10663   case "\$ac_option" in
10664   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10665     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10666     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10667   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10668     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10669     exit 0 ;;
10670   -help | --help | --hel | --he | --h)
10671     echo "\$ac_cs_usage"; exit 0 ;;
10672   *) echo "\$ac_cs_usage"; exit 1 ;;
10673   esac
10674 done
10675
10676 ac_given_srcdir=$srcdir
10677 ac_given_INSTALL="$INSTALL"
10678
10679 trap 'rm -fr `echo "autoconf/Make.common \
10680            Makefile \
10681            rescue/Makefile \
10682            rescue/linux/Makefile \
10683            rescue/freebsd/Makefile \
10684            rescue/solaris/Makefile \
10685            scripts/startmysql \
10686            scripts/stopmysql \
10687            scripts/btraceback \
10688            scripts/startit \
10689            scripts/stopit \
10690            scripts/bconsole \
10691            scripts/gconsole \
10692            scripts/bacula \
10693            scripts/devel_bacula \
10694            scripts/Makefile \
10695            scripts/logrotate \
10696            scripts/bacula.desktop.gnome1 \
10697            scripts/bacula.desktop.gnome2 \
10698            scripts/bacula.desktop.gnome1.consolehelper \
10699            scripts/bacula.desktop.gnome2.consolehelper \
10700            scripts/bacula.desktop.gnome1.xsu \
10701            scripts/bacula.desktop.gnome2.xsu \
10702            scripts/gnome-console.console_apps \
10703            scripts/mtx-changer \
10704            doc/Makefile \
10705            src/Makefile \
10706            src/host.h \
10707            src/console/Makefile \
10708            src/console/bconsole.conf \
10709            src/gnome-console/Makefile \
10710            src/gnome-console/gnome-console.conf \
10711            src/gnome2-console/Makefile \
10712            src/gnome2-console/gnome-console.conf \
10713            src/wx-console/Makefile \
10714            src/wx-console/wx-console.conf \
10715            src/tray-monitor/Makefile \
10716            src/tray-monitor/tray-monitor.conf \
10717            src/dird/Makefile \
10718            src/dird/bacula-dir.conf \
10719            src/lib/Makefile \
10720            src/stored/Makefile \
10721            src/stored/bacula-sd.conf \
10722            src/filed/Makefile \
10723            src/filed/bacula-fd.conf \
10724            src/filed/win32/Makefile \
10725            src/cats/Makefile \
10726            src/cats/make_catalog_backup \
10727            src/cats/delete_catalog_backup \
10728            src/cats/create_postgresql_database \
10729            src/cats/update_postgresql_tables \
10730            src/cats/make_postgresql_tables \
10731            src/cats/grant_postgresql_privileges \
10732            src/cats/drop_postgresql_tables \
10733            src/cats/drop_postgresql_database \
10734            src/cats/create_mysql_database \
10735            src/cats/update_mysql_tables \
10736            src/cats/make_mysql_tables \
10737            src/cats/grant_mysql_privileges \
10738            src/cats/drop_mysql_tables \
10739            src/cats/drop_mysql_database \
10740            src/cats/create_sqlite_database \
10741            src/cats/update_sqlite_tables \
10742            src/cats/make_sqlite_tables \
10743            src/cats/grant_sqlite_privileges \
10744            src/cats/drop_sqlite_tables \
10745            src/cats/drop_sqlite_database \
10746            src/cats/sqlite \
10747            src/cats/mysql \
10748            src/cats/create_bdb_database \
10749            src/cats/update_bdb_tables \
10750            src/cats/make_bdb_tables \
10751            src/cats/grant_bdb_privileges \
10752            src/cats/drop_bdb_tables \
10753            src/cats/drop_bdb_database \
10754            src/cats/create_bacula_database \
10755            src/cats/update_bacula_tables \
10756            src/cats/grant_bacula_privileges \
10757            src/cats/make_bacula_tables \
10758            src/cats/drop_bacula_tables \
10759            src/cats/drop_bacula_database \
10760            src/findlib/Makefile \
10761            src/tools/Makefile \
10762            src/win32/winbacula.nsi \
10763            src/win32/baculafd/bacula-fd.conf \
10764            src/win32/Makefile \
10765            src/win32/console/bconsole.conf \
10766            src/win32/wx-console/wx-console.conf \
10767            $PFILES  src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10768 EOF
10769 cat >> $CONFIG_STATUS <<EOF
10770
10771 # Protect against being on the right side of a sed subst in config.status.
10772 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10773  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10774 $ac_vpsub
10775 $extrasub
10776 s%@SHELL@%$SHELL%g
10777 s%@CFLAGS@%$CFLAGS%g
10778 s%@CPPFLAGS@%$CPPFLAGS%g
10779 s%@CXXFLAGS@%$CXXFLAGS%g
10780 s%@FFLAGS@%$FFLAGS%g
10781 s%@DEFS@%$DEFS%g
10782 s%@LDFLAGS@%$LDFLAGS%g
10783 s%@LIBS@%$LIBS%g
10784 s%@exec_prefix@%$exec_prefix%g
10785 s%@prefix@%$prefix%g
10786 s%@program_transform_name@%$program_transform_name%g
10787 s%@bindir@%$bindir%g
10788 s%@sbindir@%$sbindir%g
10789 s%@libexecdir@%$libexecdir%g
10790 s%@datadir@%$datadir%g
10791 s%@sysconfdir@%$sysconfdir%g
10792 s%@sharedstatedir@%$sharedstatedir%g
10793 s%@localstatedir@%$localstatedir%g
10794 s%@libdir@%$libdir%g
10795 s%@includedir@%$includedir%g
10796 s%@oldincludedir@%$oldincludedir%g
10797 s%@infodir@%$infodir%g
10798 s%@mandir@%$mandir%g
10799 s%@BUILD_DIR@%$BUILD_DIR%g
10800 s%@TRUEPRG@%$TRUEPRG%g
10801 s%@FALSEPRG@%$FALSEPRG%g
10802 s%@VERSION@%$VERSION%g
10803 s%@DATE@%$DATE%g
10804 s%@LSMDATE@%$LSMDATE%g
10805 s%@CC@%$CC%g
10806 s%@CXX@%$CXX%g
10807 s%@CPP@%$CPP%g
10808 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10809 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10810 s%@INSTALL_DATA@%$INSTALL_DATA%g
10811 s%@RANLIB@%$RANLIB%g
10812 s%@MV@%$MV%g
10813 s%@RM@%$RM%g
10814 s%@CP@%$CP%g
10815 s%@SED@%$SED%g
10816 s%@AWK@%$AWK%g
10817 s%@ECHO@%$ECHO%g
10818 s%@CMP@%$CMP%g
10819 s%@TBL@%$TBL%g
10820 s%@AR@%$AR%g
10821 s%@OPENSSL@%$OPENSSL%g
10822 s%@MTX@%$MTX%g
10823 s%@PKGCONFIG@%$PKGCONFIG%g
10824 s%@WXCONFIG@%$WXCONFIG%g
10825 s%@ARFLAGS@%$ARFLAGS%g
10826 s%@MAKE_SHELL@%$MAKE_SHELL%g
10827 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
10828 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
10829 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
10830 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
10831 s%@HAVE_SUN_OS_TRUE@%$HAVE_SUN_OS_TRUE%g
10832 s%@HAVE_SUN_OS_FALSE@%$HAVE_SUN_OS_FALSE%g
10833 s%@HAVE_OSF1_OS_TRUE@%$HAVE_OSF1_OS_TRUE%g
10834 s%@HAVE_OSF1_OS_FALSE@%$HAVE_OSF1_OS_FALSE%g
10835 s%@HAVE_AIX_OS_TRUE@%$HAVE_AIX_OS_TRUE%g
10836 s%@HAVE_AIX_OS_FALSE@%$HAVE_AIX_OS_FALSE%g
10837 s%@HAVE_HPUX_OS_TRUE@%$HAVE_HPUX_OS_TRUE%g
10838 s%@HAVE_HPUX_OS_FALSE@%$HAVE_HPUX_OS_FALSE%g
10839 s%@HAVE_LINUX_OS_TRUE@%$HAVE_LINUX_OS_TRUE%g
10840 s%@HAVE_LINUX_OS_FALSE@%$HAVE_LINUX_OS_FALSE%g
10841 s%@HAVE_FREEBSD_OS_TRUE@%$HAVE_FREEBSD_OS_TRUE%g
10842 s%@HAVE_FREEBSD_OS_FALSE@%$HAVE_FREEBSD_OS_FALSE%g
10843 s%@HAVE_NETBSD_OS_TRUE@%$HAVE_NETBSD_OS_TRUE%g
10844 s%@HAVE_NETBSD_OS_FALSE@%$HAVE_NETBSD_OS_FALSE%g
10845 s%@HAVE_OPENBSD_OS_TRUE@%$HAVE_OPENBSD_OS_TRUE%g
10846 s%@HAVE_OPENBSD_OS_FALSE@%$HAVE_OPENBSD_OS_FALSE%g
10847 s%@HAVE_BSDI_OS_TRUE@%$HAVE_BSDI_OS_TRUE%g
10848 s%@HAVE_BSDI_OS_FALSE@%$HAVE_BSDI_OS_FALSE%g
10849 s%@HAVE_SGI_OS_TRUE@%$HAVE_SGI_OS_TRUE%g
10850 s%@HAVE_SGI_OS_FALSE@%$HAVE_SGI_OS_FALSE%g
10851 s%@HAVE_IRIX_OS_TRUE@%$HAVE_IRIX_OS_TRUE%g
10852 s%@HAVE_IRIX_OS_FALSE@%$HAVE_IRIX_OS_FALSE%g
10853 s%@HAVE_DARWIN_OS_TRUE@%$HAVE_DARWIN_OS_TRUE%g
10854 s%@HAVE_DARWIN_OS_FALSE@%$HAVE_DARWIN_OS_FALSE%g
10855 s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g
10856 s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g
10857 s%@MSGFMT@%$MSGFMT%g
10858 s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
10859 s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g
10860 s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
10861 s%@GNOME_LIBS@%$GNOME_LIBS%g
10862 s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g
10863 s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g
10864 s%@ZVT_LIBS@%$ZVT_LIBS%g
10865 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
10866 s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
10867 s%@ORBIT_IDL@%$ORBIT_IDL%g
10868 s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g
10869 s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g
10870 s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g
10871 s%@ORBIT_LIBS@%$ORBIT_LIBS%g
10872 s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g
10873 s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g
10874 s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g
10875 s%@GNORBA_LIBS@%$GNORBA_LIBS%g
10876 s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g
10877 s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
10878 s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
10879 s%@GNOME_DIR@%$GNOME_DIR%g
10880 s%@WXCONS_CPPFLAGS@%$WXCONS_CPPFLAGS%g
10881 s%@WXCONS_LDFLAGS@%$WXCONS_LDFLAGS%g
10882 s%@WX_DIR@%$WX_DIR%g
10883 s%@TRAY_MONITOR_CPPFLAGS@%$TRAY_MONITOR_CPPFLAGS%g
10884 s%@TRAY_MONITOR_LDFLAGS@%$TRAY_MONITOR_LDFLAGS%g
10885 s%@TRAY_MONITOR_DIR@%$TRAY_MONITOR_DIR%g
10886 s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
10887 s%@STATIC_FD@%$STATIC_FD%g
10888 s%@STATIC_SD@%$STATIC_SD%g
10889 s%@STATIC_DIR@%$STATIC_DIR%g
10890 s%@STATIC_CONS@%$STATIC_CONS%g
10891 s%@STATIC_GNOME_CONS@%$STATIC_GNOME_CONS%g
10892 s%@STATIC_WX_CONS@%$STATIC_WX_CONS%g
10893 s%@ALL_DIRS@%$ALL_DIRS%g
10894 s%@CONS_INC@%$CONS_INC%g
10895 s%@CONS_OBJ@%$CONS_OBJ%g
10896 s%@CONS_SRC@%$CONS_SRC%g
10897 s%@CONS_LIBS@%$CONS_LIBS%g
10898 s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
10899 s%@READLINE_SRC@%$READLINE_SRC%g
10900 s%@working_dir@%$working_dir%g
10901 s%@scriptdir@%$scriptdir%g
10902 s%@dump_email@%$dump_email%g
10903 s%@job_email@%$job_email%g
10904 s%@smtp_host@%$smtp_host%g
10905 s%@piddir@%$piddir%g
10906 s%@subsysdir@%$subsysdir%g
10907 s%@baseport@%$baseport%g
10908 s%@dir_port@%$dir_port%g
10909 s%@fd_port@%$fd_port%g
10910 s%@sd_port@%$sd_port%g
10911 s%@dir_password@%$dir_password%g
10912 s%@fd_password@%$fd_password%g
10913 s%@sd_password@%$sd_password%g
10914 s%@dir_user@%$dir_user%g
10915 s%@dir_group@%$dir_group%g
10916 s%@sd_user@%$sd_user%g
10917 s%@sd_group@%$sd_group%g
10918 s%@fd_user@%$fd_user%g
10919 s%@fd_group@%$fd_group%g
10920 s%@SBINPERM@%$SBINPERM%g
10921 s%@SQL_LFLAGS@%$SQL_LFLAGS%g
10922 s%@SQL_INCLUDE@%$SQL_INCLUDE%g
10923 s%@SQL_BINDIR@%$SQL_BINDIR%g
10924 s%@cats@%$cats%g
10925 s%@DB_NAME@%$DB_NAME%g
10926 s%@EXEEXT@%$EXEEXT%g
10927 s%@host@%$host%g
10928 s%@host_alias@%$host_alias%g
10929 s%@host_cpu@%$host_cpu%g
10930 s%@host_vendor@%$host_vendor%g
10931 s%@host_os@%$host_os%g
10932 s%@build@%$build%g
10933 s%@build_alias@%$build_alias%g
10934 s%@build_cpu@%$build_cpu%g
10935 s%@build_vendor@%$build_vendor%g
10936 s%@build_os@%$build_os%g
10937 s%@GETCONF@%$GETCONF%g
10938 s%@X_CFLAGS@%$X_CFLAGS%g
10939 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10940 s%@X_LIBS@%$X_LIBS%g
10941 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10942 s%@LIBOBJS@%$LIBOBJS%g
10943 s%@ALLOCA@%$ALLOCA%g
10944 s%@FDLIBS@%$FDLIBS%g
10945 s%@DEBUG@%$DEBUG%g
10946 s%@DINCLUDE@%$DINCLUDE%g
10947 s%@DLIB@%$DLIB%g
10948 s%@DB_LIBS@%$DB_LIBS%g
10949 s%@WCFLAGS@%$WCFLAGS%g
10950 s%@WLDFLAGS@%$WLDFLAGS%g
10951 s%@OBJLIST@%$OBJLIST%g
10952 s%@hostname@%$hostname%g
10953 s%@TAPEDRIVE@%$TAPEDRIVE%g
10954 s%@PSCMD@%$PSCMD%g
10955 s%@WIN32@%$WIN32%g
10956 s%@MACOSX@%$MACOSX%g
10957 s%@DISTNAME@%$DISTNAME%g
10958 s%@DISTVER@%$DISTVER%g
10959 /@MCOMMON@/r $MCOMMON
10960 s%@MCOMMON@%%g
10961
10962 CEOF
10963 EOF
10964
10965 cat >> $CONFIG_STATUS <<\EOF
10966
10967 # Split the substitutions into bite-sized pieces for seds with
10968 # small command number limits, like on Digital OSF/1 and HP-UX.
10969 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10970 ac_file=1 # Number of current file.
10971 ac_beg=1 # First line for current file.
10972 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10973 ac_more_lines=:
10974 ac_sed_cmds=""
10975 while $ac_more_lines; do
10976   if test $ac_beg -gt 1; then
10977     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10978   else
10979     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10980   fi
10981   if test ! -s conftest.s$ac_file; then
10982     ac_more_lines=false
10983     rm -f conftest.s$ac_file
10984   else
10985     if test -z "$ac_sed_cmds"; then
10986       ac_sed_cmds="sed -f conftest.s$ac_file"
10987     else
10988       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10989     fi
10990     ac_file=`expr $ac_file + 1`
10991     ac_beg=$ac_end
10992     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10993   fi
10994 done
10995 if test -z "$ac_sed_cmds"; then
10996   ac_sed_cmds=cat
10997 fi
10998 EOF
10999
11000 cat >> $CONFIG_STATUS <<EOF
11001
11002 CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \
11003            Makefile \
11004            rescue/Makefile \
11005            rescue/linux/Makefile \
11006            rescue/freebsd/Makefile \
11007            rescue/solaris/Makefile \
11008            scripts/startmysql \
11009            scripts/stopmysql \
11010            scripts/btraceback \
11011            scripts/startit \
11012            scripts/stopit \
11013            scripts/bconsole \
11014            scripts/gconsole \
11015            scripts/bacula \
11016            scripts/devel_bacula \
11017            scripts/Makefile \
11018            scripts/logrotate \
11019            scripts/bacula.desktop.gnome1 \
11020            scripts/bacula.desktop.gnome2 \
11021            scripts/bacula.desktop.gnome1.consolehelper \
11022            scripts/bacula.desktop.gnome2.consolehelper \
11023            scripts/bacula.desktop.gnome1.xsu \
11024            scripts/bacula.desktop.gnome2.xsu \
11025            scripts/gnome-console.console_apps \
11026            scripts/mtx-changer \
11027            doc/Makefile \
11028            src/Makefile \
11029            src/host.h \
11030            src/console/Makefile \
11031            src/console/bconsole.conf \
11032            src/gnome-console/Makefile \
11033            src/gnome-console/gnome-console.conf \
11034            src/gnome2-console/Makefile \
11035            src/gnome2-console/gnome-console.conf \
11036            src/wx-console/Makefile \
11037            src/wx-console/wx-console.conf \
11038            src/tray-monitor/Makefile \
11039            src/tray-monitor/tray-monitor.conf \
11040            src/dird/Makefile \
11041            src/dird/bacula-dir.conf \
11042            src/lib/Makefile \
11043            src/stored/Makefile \
11044            src/stored/bacula-sd.conf \
11045            src/filed/Makefile \
11046            src/filed/bacula-fd.conf \
11047            src/filed/win32/Makefile \
11048            src/cats/Makefile \
11049            src/cats/make_catalog_backup \
11050            src/cats/delete_catalog_backup \
11051            src/cats/create_postgresql_database \
11052            src/cats/update_postgresql_tables \
11053            src/cats/make_postgresql_tables \
11054            src/cats/grant_postgresql_privileges \
11055            src/cats/drop_postgresql_tables \
11056            src/cats/drop_postgresql_database \
11057            src/cats/create_mysql_database \
11058            src/cats/update_mysql_tables \
11059            src/cats/make_mysql_tables \
11060            src/cats/grant_mysql_privileges \
11061            src/cats/drop_mysql_tables \
11062            src/cats/drop_mysql_database \
11063            src/cats/create_sqlite_database \
11064            src/cats/update_sqlite_tables \
11065            src/cats/make_sqlite_tables \
11066            src/cats/grant_sqlite_privileges \
11067            src/cats/drop_sqlite_tables \
11068            src/cats/drop_sqlite_database \
11069            src/cats/sqlite \
11070            src/cats/mysql \
11071            src/cats/create_bdb_database \
11072            src/cats/update_bdb_tables \
11073            src/cats/make_bdb_tables \
11074            src/cats/grant_bdb_privileges \
11075            src/cats/drop_bdb_tables \
11076            src/cats/drop_bdb_database \
11077            src/cats/create_bacula_database \
11078            src/cats/update_bacula_tables \
11079            src/cats/grant_bacula_privileges \
11080            src/cats/make_bacula_tables \
11081            src/cats/drop_bacula_tables \
11082            src/cats/drop_bacula_database \
11083            src/findlib/Makefile \
11084            src/tools/Makefile \
11085            src/win32/winbacula.nsi \
11086            src/win32/baculafd/bacula-fd.conf \
11087            src/win32/Makefile \
11088            src/win32/console/bconsole.conf \
11089            src/win32/wx-console/wx-console.conf \
11090            $PFILES "}
11091 EOF
11092 cat >> $CONFIG_STATUS <<\EOF
11093 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11094   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11095   case "$ac_file" in
11096   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11097        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11098   *) ac_file_in="${ac_file}.in" ;;
11099   esac
11100
11101   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11102
11103   # Remove last slash and all that follows it.  Not all systems have dirname.
11104   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11105   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11106     # The file is in a subdirectory.
11107     test ! -d "$ac_dir" && mkdir "$ac_dir"
11108     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11109     # A "../" for each directory in $ac_dir_suffix.
11110     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11111   else
11112     ac_dir_suffix= ac_dots=
11113   fi
11114
11115   case "$ac_given_srcdir" in
11116   .)  srcdir=.
11117       if test -z "$ac_dots"; then top_srcdir=.
11118       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11119   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11120   *) # Relative path.
11121     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11122     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11123   esac
11124
11125   case "$ac_given_INSTALL" in
11126   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11127   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11128   esac
11129
11130   echo creating "$ac_file"
11131   rm -f "$ac_file"
11132   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11133   case "$ac_file" in
11134   *Makefile*) ac_comsub="1i\\
11135 # $configure_input" ;;
11136   *) ac_comsub= ;;
11137   esac
11138
11139   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11140   sed -e "$ac_comsub
11141 s%@configure_input@%$configure_input%g
11142 s%@srcdir@%$srcdir%g
11143 s%@top_srcdir@%$top_srcdir%g
11144 s%@INSTALL@%$INSTALL%g
11145 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11146 fi; done
11147 rm -f conftest.s*
11148
11149 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11150 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11151 #
11152 # ac_d sets the value in "#define NAME VALUE" lines.
11153 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11154 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11155 ac_dC='\3'
11156 ac_dD='%g'
11157 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11158 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11159 ac_uB='\([      ]\)%\1#\2define\3'
11160 ac_uC=' '
11161 ac_uD='\4%g'
11162 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11163 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11164 ac_eB='$%\1#\2define\3'
11165 ac_eC=' '
11166 ac_eD='%g'
11167
11168 if test "${CONFIG_HEADERS+set}" != set; then
11169 EOF
11170 cat >> $CONFIG_STATUS <<EOF
11171   CONFIG_HEADERS="src/config.h:autoconf/config.h.in"
11172 EOF
11173 cat >> $CONFIG_STATUS <<\EOF
11174 fi
11175 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11176   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11177   case "$ac_file" in
11178   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11179        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11180   *) ac_file_in="${ac_file}.in" ;;
11181   esac
11182
11183   echo creating $ac_file
11184
11185   rm -f conftest.frag conftest.in conftest.out
11186   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11187   cat $ac_file_inputs > conftest.in
11188
11189 EOF
11190
11191 # Transform confdefs.h into a sed script conftest.vals that substitutes
11192 # the proper values into config.h.in to produce config.h.  And first:
11193 # Protect against being on the right side of a sed subst in config.status.
11194 # Protect against being in an unquoted here document in config.status.
11195 rm -f conftest.vals
11196 cat > conftest.hdr <<\EOF
11197 s/[\\&%]/\\&/g
11198 s%[\\$`]%\\&%g
11199 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11200 s%ac_d%ac_u%gp
11201 s%ac_u%ac_e%gp
11202 EOF
11203 sed -n -f conftest.hdr confdefs.h > conftest.vals
11204 rm -f conftest.hdr
11205
11206 # This sed command replaces #undef with comments.  This is necessary, for
11207 # example, in the case of _POSIX_SOURCE, which is predefined and required
11208 # on some systems where configure will not decide to define it.
11209 cat >> conftest.vals <<\EOF
11210 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11211 EOF
11212
11213 # Break up conftest.vals because some shells have a limit on
11214 # the size of here documents, and old seds have small limits too.
11215
11216 rm -f conftest.tail
11217 while :
11218 do
11219   ac_lines=`grep -c . conftest.vals`
11220   # grep -c gives empty output for an empty file on some AIX systems.
11221   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11222   # Write a limited-size here document to conftest.frag.
11223   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11224   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11225   echo 'CEOF
11226   sed -f conftest.frag conftest.in > conftest.out
11227   rm -f conftest.in
11228   mv conftest.out conftest.in
11229 ' >> $CONFIG_STATUS
11230   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11231   rm -f conftest.vals
11232   mv conftest.tail conftest.vals
11233 done
11234 rm -f conftest.vals
11235
11236 cat >> $CONFIG_STATUS <<\EOF
11237   rm -f conftest.frag conftest.h
11238   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11239   cat conftest.in >> conftest.h
11240   rm -f conftest.in
11241   if cmp -s $ac_file conftest.h 2>/dev/null; then
11242     echo "$ac_file is unchanged"
11243     rm -f conftest.h
11244   else
11245     # Remove last slash and all that follows it.  Not all systems have dirname.
11246       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11247       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11248       # The file is in a subdirectory.
11249       test ! -d "$ac_dir" && mkdir "$ac_dir"
11250     fi
11251     rm -f $ac_file
11252     mv conftest.h $ac_file
11253   fi
11254 fi; done
11255
11256 EOF
11257 cat >> $CONFIG_STATUS <<EOF
11258
11259 EOF
11260 cat >> $CONFIG_STATUS <<\EOF
11261 (echo "Doing make of dependencies"; ${MAKE:-make} depend;) 
11262
11263 exit 0
11264 EOF
11265 chmod +x $CONFIG_STATUS
11266 rm -fr confdefs* $ac_clean_files
11267 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11268
11269
11270 cd scripts
11271 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
11272 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
11273 cd ..
11274
11275 c=src/cats
11276
11277 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
11278 chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
11279
11280 chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
11281 chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
11282
11283 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
11284 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
11285
11286 chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
11287 chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
11288
11289 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
11290 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
11291
11292 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
11293 chmod 755 $c/sqlite
11294 chmod 755 $c/mysql
11295
11296 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
11297    largefile_support="yes"
11298 fi
11299
11300 #
11301 # A whole lot of hand springs to get the compiler version.
11302 #  This is because gcc changed the output in version 3.0
11303 #
11304 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
11305 if test "x${CCVERSION}" = "x" ; then
11306   CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
11307 fi
11308 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
11309 if test x"${CXXVERSION}" = x ; then
11310   CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
11311 fi
11312
11313 if test "x${subsysdir}" = "x${sbindir}" ; then
11314    echo " "
11315    echo " "
11316    echo "You have set --sbindir and --with-subsys-dir"
11317    echo "  both equal to: ${subsysdir} "
11318    echo "  This is not permitted. Please reconfigure."
11319    echo " "
11320    echo "Aborting configuration ..."
11321    echo " "
11322    echo " "
11323    exit 1
11324 fi 
11325
11326 if test "x${db_name}" = "xInternal" ; then
11327    echo " "
11328    echo " "
11329    echo "You have not specified either --enable-client-only or one of the"
11330    echo "  supported databases: MySQL, PostgreSQL, or SQLite".
11331    echo "  This is not permitted. Please reconfigure."
11332    echo " "
11333    echo "Aborting the configuration ..."
11334    echo " "
11335    echo " "
11336    exit 1
11337 fi
11338
11339 echo "
11340 Configuration on `date`:
11341
11342   Host:                       $host -- ${DISTNAME} ${DISTVER}
11343   Bacula version:             ${VERSION} (${DATE})
11344   Source code location:       ${srcdir}
11345   Install binaries:           ${sbindir}
11346   Install config files:       ${sysconfdir}
11347   Scripts directory:          ${scriptdir}
11348   Working directory:          ${working_dir}
11349   PID directory:              ${piddir}
11350   Subsys directory:           ${subsysdir}
11351   C Compiler:                 ${CC} ${CCVERSION}
11352   C++ Compiler:               ${CXX} ${CXXVERSION}
11353   Compiler flags:             ${WCFLAGS} ${CFLAGS} 
11354   Linker flags:               ${WLDFLAGS} ${LDFLAGS}
11355   Libraries:                  ${LIBS}
11356   Statically Linked Tools:    ${support_static_tools}
11357   Statically Linked FD:       ${support_static_fd}
11358   Statically Linked SD:       ${support_static_sd}
11359   Statically Linked DIR:      ${support_static_dir}
11360   Statically Linked CONS:     ${support_static_cons}
11361   Database type:              ${db_name}
11362   Database lib:               ${DB_LIBS}
11363
11364   Job Output Email:           ${job_email}
11365   Traceback Email:            ${dump_email}
11366   SMTP Host Address:          ${smtp_host}
11367
11368   Director Port:              ${dir_port}
11369   File daemon Port:           ${fd_port}
11370   Storage daemon Port:        ${sd_port}
11371
11372   Director User:              ${dir_user}
11373   Director Group:             ${dir_group}
11374   Storage Daemon User:        ${sd_user}
11375   Storage DaemonGroup:        ${sd_group}
11376   File Daemon User:           ${fd_user}
11377   File Daemon Group:          ${fd_group}
11378
11379   SQL binaries Directory      ${SQL_BINDIR}
11380
11381   Large file support:         $largefile_support
11382   Bacula conio support:       ${got_conio} ${CONS_LIBS}
11383   readline support:           ${got_readline} ${PRTREADLINE_SRC}
11384   TCP Wrappers support:       ${TCPW_MSG}
11385   ZLIB support:               ${have_zlib}
11386   enable-smartalloc:          ${support_smartalloc} 
11387   enable-gnome:               ${support_gnome} ${gnome_version}
11388   enable-wx-console:          ${support_wx_console}
11389   enable-tray-monitor:        ${support_tray_monitor}
11390   client-only:                ${build_client_only}
11391   ACL support:                ${have_acl}
11392
11393   " > config.out
11394
11395 cat config.out
11396
11397 # old stuff
11398 # cweb support:               ${got_cweb} ${CWEB_SRC}
11399   # gmp support:                      ${got_gmp} ${GMP_SRC}