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