e52a21b6726f0cfe0927fd630b3b4c5cccb45fa5
[idzebra-moved-to-github.git] / 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   --with-yazconfig=DIR    yaz-config in DIR (example /home/yaz-1.7)"
16 ac_help="$ac_help
17   --disable-threads       disable threads"
18 ac_help="$ac_help
19   --with-tclconfig=DIR    tclConfig.sh in DIR"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 SHELL=${CONFIG_SHELL-/bin/sh}
59 # Maximum number of lines to put in a shell here document.
60 ac_max_here_lines=12
61
62 ac_prev=
63 for ac_option
64 do
65
66   # If the previous option needs an argument, assign it.
67   if test -n "$ac_prev"; then
68     eval "$ac_prev=\$ac_option"
69     ac_prev=
70     continue
71   fi
72
73   case "$ac_option" in
74   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
75   *) ac_optarg= ;;
76   esac
77
78   # Accept the important Cygnus configure options, so we can diagnose typos.
79
80   case "$ac_option" in
81
82   -bindir | --bindir | --bindi | --bind | --bin | --bi)
83     ac_prev=bindir ;;
84   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
85     bindir="$ac_optarg" ;;
86
87   -build | --build | --buil | --bui | --bu)
88     ac_prev=build ;;
89   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90     build="$ac_optarg" ;;
91
92   -cache-file | --cache-file | --cache-fil | --cache-fi \
93   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
94     ac_prev=cache_file ;;
95   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
96   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
97     cache_file="$ac_optarg" ;;
98
99   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
100     ac_prev=datadir ;;
101   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
102   | --da=*)
103     datadir="$ac_optarg" ;;
104
105   -disable-* | --disable-*)
106     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
107     # Reject names that are not valid shell variable names.
108     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
109       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
110     fi
111     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
112     eval "enable_${ac_feature}=no" ;;
113
114   -enable-* | --enable-*)
115     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
116     # Reject names that are not valid shell variable names.
117     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
118       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119     fi
120     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121     case "$ac_option" in
122       *=*) ;;
123       *) ac_optarg=yes ;;
124     esac
125     eval "enable_${ac_feature}='$ac_optarg'" ;;
126
127   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
128   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
129   | --exec | --exe | --ex)
130     ac_prev=exec_prefix ;;
131   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
132   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
133   | --exec=* | --exe=* | --ex=*)
134     exec_prefix="$ac_optarg" ;;
135
136   -gas | --gas | --ga | --g)
137     # Obsolete; use --with-gas.
138     with_gas=yes ;;
139
140   -help | --help | --hel | --he)
141     # Omit some internal or obsolete options to make the list less imposing.
142     # This message is too long to be a string in the A/UX 3.1 sh.
143     cat << EOF
144 Usage: configure [options] [host]
145 Options: [defaults in brackets after descriptions]
146 Configuration:
147   --cache-file=FILE       cache test results in FILE
148   --help                  print this message
149   --no-create             do not create output files
150   --quiet, --silent       do not print \`checking...' messages
151   --version               print the version of autoconf that created configure
152 Directory and file names:
153   --prefix=PREFIX         install architecture-independent files in PREFIX
154                           [$ac_default_prefix]
155   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
156                           [same as prefix]
157   --bindir=DIR            user executables in DIR [EPREFIX/bin]
158   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
159   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
160   --datadir=DIR           read-only architecture-independent data in DIR
161                           [PREFIX/share]
162   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
163   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
164                           [PREFIX/com]
165   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
166   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
167   --includedir=DIR        C header files in DIR [PREFIX/include]
168   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
169   --infodir=DIR           info documentation in DIR [PREFIX/info]
170   --mandir=DIR            man documentation in DIR [PREFIX/man]
171   --srcdir=DIR            find the sources in DIR [configure dir or ..]
172   --program-prefix=PREFIX prepend PREFIX to installed program names
173   --program-suffix=SUFFIX append SUFFIX to installed program names
174   --program-transform-name=PROGRAM
175                           run sed PROGRAM on installed program names
176 EOF
177     cat << EOF
178 Host type:
179   --build=BUILD           configure for building on BUILD [BUILD=HOST]
180   --host=HOST             configure for HOST [guessed]
181   --target=TARGET         configure for TARGET [TARGET=HOST]
182 Features and packages:
183   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
184   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
185   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
186   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
187   --x-includes=DIR        X include files are in DIR
188   --x-libraries=DIR       X library files are in DIR
189 EOF
190     if test -n "$ac_help"; then
191       echo "--enable and --with options recognized:$ac_help"
192     fi
193     exit 0 ;;
194
195   -host | --host | --hos | --ho)
196     ac_prev=host ;;
197   -host=* | --host=* | --hos=* | --ho=*)
198     host="$ac_optarg" ;;
199
200   -includedir | --includedir | --includedi | --included | --include \
201   | --includ | --inclu | --incl | --inc)
202     ac_prev=includedir ;;
203   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
204   | --includ=* | --inclu=* | --incl=* | --inc=*)
205     includedir="$ac_optarg" ;;
206
207   -infodir | --infodir | --infodi | --infod | --info | --inf)
208     ac_prev=infodir ;;
209   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
210     infodir="$ac_optarg" ;;
211
212   -libdir | --libdir | --libdi | --libd)
213     ac_prev=libdir ;;
214   -libdir=* | --libdir=* | --libdi=* | --libd=*)
215     libdir="$ac_optarg" ;;
216
217   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
218   | --libexe | --libex | --libe)
219     ac_prev=libexecdir ;;
220   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
221   | --libexe=* | --libex=* | --libe=*)
222     libexecdir="$ac_optarg" ;;
223
224   -localstatedir | --localstatedir | --localstatedi | --localstated \
225   | --localstate | --localstat | --localsta | --localst \
226   | --locals | --local | --loca | --loc | --lo)
227     ac_prev=localstatedir ;;
228   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
229   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
230   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
231     localstatedir="$ac_optarg" ;;
232
233   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
234     ac_prev=mandir ;;
235   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
236     mandir="$ac_optarg" ;;
237
238   -nfp | --nfp | --nf)
239     # Obsolete; use --without-fp.
240     with_fp=no ;;
241
242   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
243   | --no-cr | --no-c)
244     no_create=yes ;;
245
246   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
247   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248     no_recursion=yes ;;
249
250   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
251   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
252   | --oldin | --oldi | --old | --ol | --o)
253     ac_prev=oldincludedir ;;
254   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
255   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
256   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
257     oldincludedir="$ac_optarg" ;;
258
259   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
260     ac_prev=prefix ;;
261   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
262     prefix="$ac_optarg" ;;
263
264   -program-prefix | --program-prefix | --program-prefi | --program-pref \
265   | --program-pre | --program-pr | --program-p)
266     ac_prev=program_prefix ;;
267   -program-prefix=* | --program-prefix=* | --program-prefi=* \
268   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
269     program_prefix="$ac_optarg" ;;
270
271   -program-suffix | --program-suffix | --program-suffi | --program-suff \
272   | --program-suf | --program-su | --program-s)
273     ac_prev=program_suffix ;;
274   -program-suffix=* | --program-suffix=* | --program-suffi=* \
275   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
276     program_suffix="$ac_optarg" ;;
277
278   -program-transform-name | --program-transform-name \
279   | --program-transform-nam | --program-transform-na \
280   | --program-transform-n | --program-transform- \
281   | --program-transform | --program-transfor \
282   | --program-transfo | --program-transf \
283   | --program-trans | --program-tran \
284   | --progr-tra | --program-tr | --program-t)
285     ac_prev=program_transform_name ;;
286   -program-transform-name=* | --program-transform-name=* \
287   | --program-transform-nam=* | --program-transform-na=* \
288   | --program-transform-n=* | --program-transform-=* \
289   | --program-transform=* | --program-transfor=* \
290   | --program-transfo=* | --program-transf=* \
291   | --program-trans=* | --program-tran=* \
292   | --progr-tra=* | --program-tr=* | --program-t=*)
293     program_transform_name="$ac_optarg" ;;
294
295   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
296   | -silent | --silent | --silen | --sile | --sil)
297     silent=yes ;;
298
299   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
300     ac_prev=sbindir ;;
301   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
302   | --sbi=* | --sb=*)
303     sbindir="$ac_optarg" ;;
304
305   -sharedstatedir | --sharedstatedir | --sharedstatedi \
306   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
307   | --sharedst | --shareds | --shared | --share | --shar \
308   | --sha | --sh)
309     ac_prev=sharedstatedir ;;
310   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
311   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
312   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
313   | --sha=* | --sh=*)
314     sharedstatedir="$ac_optarg" ;;
315
316   -site | --site | --sit)
317     ac_prev=site ;;
318   -site=* | --site=* | --sit=*)
319     site="$ac_optarg" ;;
320
321   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
322     ac_prev=srcdir ;;
323   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
324     srcdir="$ac_optarg" ;;
325
326   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
327   | --syscon | --sysco | --sysc | --sys | --sy)
328     ac_prev=sysconfdir ;;
329   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
330   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
331     sysconfdir="$ac_optarg" ;;
332
333   -target | --target | --targe | --targ | --tar | --ta | --t)
334     ac_prev=target ;;
335   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
336     target="$ac_optarg" ;;
337
338   -v | -verbose | --verbose | --verbos | --verbo | --verb)
339     verbose=yes ;;
340
341   -version | --version | --versio | --versi | --vers)
342     echo "configure generated by autoconf version 2.13"
343     exit 0 ;;
344
345   -with-* | --with-*)
346     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
347     # Reject names that are not valid shell variable names.
348     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
349       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
350     fi
351     ac_package=`echo $ac_package| sed 's/-/_/g'`
352     case "$ac_option" in
353       *=*) ;;
354       *) ac_optarg=yes ;;
355     esac
356     eval "with_${ac_package}='$ac_optarg'" ;;
357
358   -without-* | --without-*)
359     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
360     # Reject names that are not valid shell variable names.
361     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
362       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363     fi
364     ac_package=`echo $ac_package| sed 's/-/_/g'`
365     eval "with_${ac_package}=no" ;;
366
367   --x)
368     # Obsolete; use --with-x.
369     with_x=yes ;;
370
371   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
372   | --x-incl | --x-inc | --x-in | --x-i)
373     ac_prev=x_includes ;;
374   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
375   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
376     x_includes="$ac_optarg" ;;
377
378   -x-libraries | --x-libraries | --x-librarie | --x-librari \
379   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
380     ac_prev=x_libraries ;;
381   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
382   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
383     x_libraries="$ac_optarg" ;;
384
385   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
386     ;;
387
388   *)
389     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
390       echo "configure: warning: $ac_option: invalid host type" 1>&2
391     fi
392     if test "x$nonopt" != xNONE; then
393       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
394     fi
395     nonopt="$ac_option"
396     ;;
397
398   esac
399 done
400
401 if test -n "$ac_prev"; then
402   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 fi
404
405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
406
407 # File descriptor usage:
408 # 0 standard input
409 # 1 file creation
410 # 2 errors and warnings
411 # 3 some systems may open it to /dev/tty
412 # 4 used on the Kubota Titan
413 # 6 checking for... messages and results
414 # 5 compiler messages saved in config.log
415 if test "$silent" = yes; then
416   exec 6>/dev/null
417 else
418   exec 6>&1
419 fi
420 exec 5>./config.log
421
422 echo "\
423 This file contains any messages produced by compilers while
424 running configure, to aid debugging if configure makes a mistake.
425 " 1>&5
426
427 # Strip out --no-create and --no-recursion so they do not pile up.
428 # Also quote any args containing shell metacharacters.
429 ac_configure_args=
430 for ac_arg
431 do
432   case "$ac_arg" in
433   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
434   | --no-cr | --no-c) ;;
435   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
436   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
437   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
438   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
439   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
440   esac
441 done
442
443 # NLS nuisances.
444 # Only set these to C if already set.  These must not be set unconditionally
445 # because not all systems understand e.g. LANG=C (notably SCO).
446 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
447 # Non-C LC_CTYPE values break the ctype check.
448 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
449 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
450 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
451 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
452
453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
454 rm -rf conftest* confdefs.h
455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 echo > confdefs.h
457
458 # A filename unique to this package, relative to the directory that
459 # configure is in, which we can look for to find out if srcdir is correct.
460 ac_unique_file=include/zebraver.h
461
462 # Find the source files, if location was not specified.
463 if test -z "$srcdir"; then
464   ac_srcdir_defaulted=yes
465   # Try the directory containing this script, then its parent.
466   ac_prog=$0
467   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
468   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
469   srcdir=$ac_confdir
470   if test ! -r $srcdir/$ac_unique_file; then
471     srcdir=..
472   fi
473 else
474   ac_srcdir_defaulted=no
475 fi
476 if test ! -r $srcdir/$ac_unique_file; then
477   if test "$ac_srcdir_defaulted" = yes; then
478     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
479   else
480     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481   fi
482 fi
483 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
484
485 # Prefer explicitly selected file to automatically selected ones.
486 if test -z "$CONFIG_SITE"; then
487   if test "x$prefix" != xNONE; then
488     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
489   else
490     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491   fi
492 fi
493 for ac_site_file in $CONFIG_SITE; do
494   if test -r "$ac_site_file"; then
495     echo "loading site script $ac_site_file"
496     . "$ac_site_file"
497   fi
498 done
499
500 if test -r "$cache_file"; then
501   echo "loading cache $cache_file"
502   . $cache_file
503 else
504   echo "creating cache $cache_file"
505   > $cache_file
506 fi
507
508 ac_ext=c
509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
510 ac_cpp='$CPP $CPPFLAGS'
511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
513 cross_compiling=$ac_cv_prog_cc_cross
514
515 ac_exeext=
516 ac_objext=o
517 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
518   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
519   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
520     ac_n= ac_c='
521 ' ac_t='        '
522   else
523     ac_n=-n ac_c= ac_t=
524   fi
525 else
526   ac_n= ac_c='\c' ac_t=
527 fi
528
529
530 echo $ac_n "checking for package""... $ac_c" 1>&6
531 echo "configure:532: checking for package" >&5
532 if test -r ${srcdir}/LICENSE.zmbol; then
533         echo "$ac_t""Z'mbol" 1>&6
534         PROGPREFIX=zmbol
535         cat >> confdefs.h <<\EOF
536 #define ZMBOL 1
537 EOF
538
539         ac_aux_dir=
540 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
541   if test -f $ac_dir/install-sh; then
542     ac_aux_dir=$ac_dir
543     ac_install_sh="$ac_aux_dir/install-sh -c"
544     break
545   elif test -f $ac_dir/install.sh; then
546     ac_aux_dir=$ac_dir
547     ac_install_sh="$ac_aux_dir/install.sh -c"
548     break
549   fi
550 done
551 if test -z "$ac_aux_dir"; then
552   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
553 fi
554 ac_config_guess=$ac_aux_dir/config.guess
555 ac_config_sub=$ac_aux_dir/config.sub
556 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
557
558 # Find a good install program.  We prefer a C program (faster),
559 # so one script is as good as another.  But avoid the broken or
560 # incompatible versions:
561 # SysV /etc/install, /usr/sbin/install
562 # SunOS /usr/etc/install
563 # IRIX /sbin/install
564 # AIX /bin/install
565 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
566 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
567 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
568 # ./install, which can be erroneously created by make from ./install.sh.
569 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
570 echo "configure:571: checking for a BSD compatible install" >&5
571 if test -z "$INSTALL"; then
572 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
573   echo $ac_n "(cached) $ac_c" 1>&6
574 else
575     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
576   for ac_dir in $PATH; do
577     # Account for people who put trailing slashes in PATH elements.
578     case "$ac_dir/" in
579     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
580     *)
581       # OSF1 and SCO ODT 3.0 have their own names for install.
582       # Don't use installbsd from OSF since it installs stuff as root
583       # by default.
584       for ac_prog in ginstall scoinst install; do
585         if test -f $ac_dir/$ac_prog; then
586           if test $ac_prog = install &&
587             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
588             # AIX install.  It has an incompatible calling convention.
589             :
590           else
591             ac_cv_path_install="$ac_dir/$ac_prog -c"
592             break 2
593           fi
594         fi
595       done
596       ;;
597     esac
598   done
599   IFS="$ac_save_IFS"
600
601 fi
602   if test "${ac_cv_path_install+set}" = set; then
603     INSTALL="$ac_cv_path_install"
604   else
605     # As a last resort, use the slow shell script.  We don't cache a
606     # path for INSTALL within a source directory, because that will
607     # break other packages using the cache if that directory is
608     # removed, or if the path is relative.
609     INSTALL="$ac_install_sh"
610   fi
611 fi
612 echo "$ac_t""$INSTALL" 1>&6
613
614 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
615 # It thinks the first close brace ends the variable substitution.
616 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
617
618 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
619
620 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
621
622 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
623 echo "configure:624: checking whether build environment is sane" >&5
624 # Just in case
625 sleep 1
626 echo timestamp > conftestfile
627 # Do `set' in a subshell so we don't clobber the current shell's
628 # arguments.  Must try -L first in case configure is actually a
629 # symlink; some systems play weird games with the mod time of symlinks
630 # (eg FreeBSD returns the mod time of the symlink's containing
631 # directory).
632 if (
633    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
634    if test "$*" = "X"; then
635       # -L didn't work.
636       set X `ls -t $srcdir/configure conftestfile`
637    fi
638    if test "$*" != "X $srcdir/configure conftestfile" \
639       && test "$*" != "X conftestfile $srcdir/configure"; then
640
641       # If neither matched, then we have a broken ls.  This can happen
642       # if, for instance, CONFIG_SHELL is bash and it inherits a
643       # broken ls alias from the environment.  This has actually
644       # happened.  Such a system could not be considered "sane".
645       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
646 alias in your environment" 1>&2; exit 1; }
647    fi
648
649    test "$2" = conftestfile
650    )
651 then
652    # Ok.
653    :
654 else
655    { echo "configure: error: newly created file is older than distributed files!
656 Check your system clock" 1>&2; exit 1; }
657 fi
658 rm -f conftest*
659 echo "$ac_t""yes" 1>&6
660 if test "$program_transform_name" = s,x,x,; then
661   program_transform_name=
662 else
663   # Double any \ or $.  echo might interpret backslashes.
664   cat <<\EOF_SED > conftestsed
665 s,\\,\\\\,g; s,\$,$$,g
666 EOF_SED
667   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
668   rm -f conftestsed
669 fi
670 test "$program_prefix" != NONE &&
671   program_transform_name="s,^,${program_prefix},; $program_transform_name"
672 # Use a double $ so make ignores it.
673 test "$program_suffix" != NONE &&
674   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
675
676 # sed with no file args requires a program.
677 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
678
679 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
680 echo "configure:681: checking whether ${MAKE-make} sets \${MAKE}" >&5
681 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
682 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
683   echo $ac_n "(cached) $ac_c" 1>&6
684 else
685   cat > conftestmake <<\EOF
686 all:
687         @echo 'ac_maketemp="${MAKE}"'
688 EOF
689 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
690 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
691 if test -n "$ac_maketemp"; then
692   eval ac_cv_prog_make_${ac_make}_set=yes
693 else
694   eval ac_cv_prog_make_${ac_make}_set=no
695 fi
696 rm -f conftestmake
697 fi
698 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
699   echo "$ac_t""yes" 1>&6
700   SET_MAKE=
701 else
702   echo "$ac_t""no" 1>&6
703   SET_MAKE="MAKE=${MAKE-make}"
704 fi
705
706
707 PACKAGE=zmbol
708
709 VERSION=1.1
710
711 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
712   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
713 fi
714 cat >> confdefs.h <<EOF
715 #define PACKAGE "$PACKAGE"
716 EOF
717
718 cat >> confdefs.h <<EOF
719 #define VERSION "$VERSION"
720 EOF
721
722
723
724 missing_dir=`cd $ac_aux_dir && pwd`
725 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
726 echo "configure:727: checking for working aclocal" >&5
727 # Run test in a subshell; some versions of sh will print an error if
728 # an executable is not found, even if stderr is redirected.
729 # Redirect stdin to placate older versions of autoconf.  Sigh.
730 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
731    ACLOCAL=aclocal
732    echo "$ac_t""found" 1>&6
733 else
734    ACLOCAL="$missing_dir/missing aclocal"
735    echo "$ac_t""missing" 1>&6
736 fi
737
738 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
739 echo "configure:740: checking for working autoconf" >&5
740 # Run test in a subshell; some versions of sh will print an error if
741 # an executable is not found, even if stderr is redirected.
742 # Redirect stdin to placate older versions of autoconf.  Sigh.
743 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
744    AUTOCONF=autoconf
745    echo "$ac_t""found" 1>&6
746 else
747    AUTOCONF="$missing_dir/missing autoconf"
748    echo "$ac_t""missing" 1>&6
749 fi
750
751 echo $ac_n "checking for working automake""... $ac_c" 1>&6
752 echo "configure:753: checking for working automake" >&5
753 # Run test in a subshell; some versions of sh will print an error if
754 # an executable is not found, even if stderr is redirected.
755 # Redirect stdin to placate older versions of autoconf.  Sigh.
756 if (automake --version) < /dev/null > /dev/null 2>&1; then
757    AUTOMAKE=automake
758    echo "$ac_t""found" 1>&6
759 else
760    AUTOMAKE="$missing_dir/missing automake"
761    echo "$ac_t""missing" 1>&6
762 fi
763
764 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
765 echo "configure:766: checking for working autoheader" >&5
766 # Run test in a subshell; some versions of sh will print an error if
767 # an executable is not found, even if stderr is redirected.
768 # Redirect stdin to placate older versions of autoconf.  Sigh.
769 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
770    AUTOHEADER=autoheader
771    echo "$ac_t""found" 1>&6
772 else
773    AUTOHEADER="$missing_dir/missing autoheader"
774    echo "$ac_t""missing" 1>&6
775 fi
776
777 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
778 echo "configure:779: checking for working makeinfo" >&5
779 # Run test in a subshell; some versions of sh will print an error if
780 # an executable is not found, even if stderr is redirected.
781 # Redirect stdin to placate older versions of autoconf.  Sigh.
782 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
783    MAKEINFO=makeinfo
784    echo "$ac_t""found" 1>&6
785 else
786    MAKEINFO="$missing_dir/missing makeinfo"
787    echo "$ac_t""missing" 1>&6
788 fi
789
790
791         SUBLIBS="../rset/librset.a \
792  ../dict/libdict.a \
793  ../isamb/libisamb.a \
794  ../isams/libisams.a \
795  ../isam/libisam.a \
796  ../isamc/libisamc.a \
797  ../recctrl/librecctrl.a \
798  ../bfile/libbfile.a \
799  ../dfa/libdfa.a \
800  ../util/libutil.a"
801 else
802         echo "$ac_t""Zebra" 1>&6
803         PROGPREFIX=zebra
804         cat >> confdefs.h <<\EOF
805 #define ZMBOL 0
806 EOF
807
808         
809 PACKAGE=zebra
810
811 VERSION=1.1
812
813 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
814   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
815 fi
816 cat >> confdefs.h <<EOF
817 #define PACKAGE "$PACKAGE"
818 EOF
819
820 cat >> confdefs.h <<EOF
821 #define VERSION "$VERSION"
822 EOF
823
824
825
826 missing_dir=`cd $ac_aux_dir && pwd`
827 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
828 echo "configure:829: checking for working aclocal" >&5
829 # Run test in a subshell; some versions of sh will print an error if
830 # an executable is not found, even if stderr is redirected.
831 # Redirect stdin to placate older versions of autoconf.  Sigh.
832 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
833    ACLOCAL=aclocal
834    echo "$ac_t""found" 1>&6
835 else
836    ACLOCAL="$missing_dir/missing aclocal"
837    echo "$ac_t""missing" 1>&6
838 fi
839
840 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
841 echo "configure:842: checking for working autoconf" >&5
842 # Run test in a subshell; some versions of sh will print an error if
843 # an executable is not found, even if stderr is redirected.
844 # Redirect stdin to placate older versions of autoconf.  Sigh.
845 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
846    AUTOCONF=autoconf
847    echo "$ac_t""found" 1>&6
848 else
849    AUTOCONF="$missing_dir/missing autoconf"
850    echo "$ac_t""missing" 1>&6
851 fi
852
853 echo $ac_n "checking for working automake""... $ac_c" 1>&6
854 echo "configure:855: checking for working automake" >&5
855 # Run test in a subshell; some versions of sh will print an error if
856 # an executable is not found, even if stderr is redirected.
857 # Redirect stdin to placate older versions of autoconf.  Sigh.
858 if (automake --version) < /dev/null > /dev/null 2>&1; then
859    AUTOMAKE=automake
860    echo "$ac_t""found" 1>&6
861 else
862    AUTOMAKE="$missing_dir/missing automake"
863    echo "$ac_t""missing" 1>&6
864 fi
865
866 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
867 echo "configure:868: checking for working autoheader" >&5
868 # Run test in a subshell; some versions of sh will print an error if
869 # an executable is not found, even if stderr is redirected.
870 # Redirect stdin to placate older versions of autoconf.  Sigh.
871 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
872    AUTOHEADER=autoheader
873    echo "$ac_t""found" 1>&6
874 else
875    AUTOHEADER="$missing_dir/missing autoheader"
876    echo "$ac_t""missing" 1>&6
877 fi
878
879 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
880 echo "configure:881: checking for working makeinfo" >&5
881 # Run test in a subshell; some versions of sh will print an error if
882 # an executable is not found, even if stderr is redirected.
883 # Redirect stdin to placate older versions of autoconf.  Sigh.
884 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
885    MAKEINFO=makeinfo
886    echo "$ac_t""found" 1>&6
887 else
888    MAKEINFO="$missing_dir/missing makeinfo"
889    echo "$ac_t""missing" 1>&6
890 fi
891
892
893         SUBLIBS="../rset/librset.a ../dict/libdict.a ../isams/libisams.a \
894         ../recctrl/librecctrl.a  \
895         ../bfile/libbfile.a ../dfa/libdfa.a \
896         ../util/libutil.a"
897         if test ! -r ${srcdir}/isam; then
898                 mkdir ${srcdir}/isam
899                 touch ${srcdir}/isam/Makefile.in
900         fi
901         if test ! -r ${srcdir}/isamc; then
902                 mkdir ${srcdir}/isamc
903                 touch ${srcdir}/isamc/Makefile.in
904         fi
905         if test ! -r ${srcdir}/isamb; then
906                 mkdir ${srcdir}/isamb
907                 touch ${srcdir}/isamb/Makefile.in
908         fi
909 fi
910
911
912 if test $PACKAGE = zmbol; then
913   ISZMBOL_TRUE=
914   ISZMBOL_FALSE='#'
915 else
916   ISZMBOL_TRUE='#'
917   ISZMBOL_FALSE=
918 fi
919
920
921
922
923
924 # Extract the first word of "gcc", so it can be a program name with args.
925 set dummy gcc; ac_word=$2
926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
927 echo "configure:928: checking for $ac_word" >&5
928 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
929   echo $ac_n "(cached) $ac_c" 1>&6
930 else
931   if test -n "$CC"; then
932   ac_cv_prog_CC="$CC" # Let the user override the test.
933 else
934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
935   ac_dummy="$PATH"
936   for ac_dir in $ac_dummy; do
937     test -z "$ac_dir" && ac_dir=.
938     if test -f $ac_dir/$ac_word; then
939       ac_cv_prog_CC="gcc"
940       break
941     fi
942   done
943   IFS="$ac_save_ifs"
944 fi
945 fi
946 CC="$ac_cv_prog_CC"
947 if test -n "$CC"; then
948   echo "$ac_t""$CC" 1>&6
949 else
950   echo "$ac_t""no" 1>&6
951 fi
952
953 if test -z "$CC"; then
954   # Extract the first word of "cc", so it can be a program name with args.
955 set dummy cc; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$CC"; then
962   ac_cv_prog_CC="$CC" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
965   ac_prog_rejected=no
966   ac_dummy="$PATH"
967   for ac_dir in $ac_dummy; do
968     test -z "$ac_dir" && ac_dir=.
969     if test -f $ac_dir/$ac_word; then
970       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
971         ac_prog_rejected=yes
972         continue
973       fi
974       ac_cv_prog_CC="cc"
975       break
976     fi
977   done
978   IFS="$ac_save_ifs"
979 if test $ac_prog_rejected = yes; then
980   # We found a bogon in the path, so make sure we never use it.
981   set dummy $ac_cv_prog_CC
982   shift
983   if test $# -gt 0; then
984     # We chose a different compiler from the bogus one.
985     # However, it has the same basename, so the bogon will be chosen
986     # first if we set CC to just the basename; use the full file name.
987     shift
988     set dummy "$ac_dir/$ac_word" "$@"
989     shift
990     ac_cv_prog_CC="$@"
991   fi
992 fi
993 fi
994 fi
995 CC="$ac_cv_prog_CC"
996 if test -n "$CC"; then
997   echo "$ac_t""$CC" 1>&6
998 else
999   echo "$ac_t""no" 1>&6
1000 fi
1001
1002   if test -z "$CC"; then
1003     case "`uname -s`" in
1004     *win32* | *WIN32*)
1005       # Extract the first word of "cl", so it can be a program name with args.
1006 set dummy cl; ac_word=$2
1007 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1008 echo "configure:1009: checking for $ac_word" >&5
1009 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1010   echo $ac_n "(cached) $ac_c" 1>&6
1011 else
1012   if test -n "$CC"; then
1013   ac_cv_prog_CC="$CC" # Let the user override the test.
1014 else
1015   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1016   ac_dummy="$PATH"
1017   for ac_dir in $ac_dummy; do
1018     test -z "$ac_dir" && ac_dir=.
1019     if test -f $ac_dir/$ac_word; then
1020       ac_cv_prog_CC="cl"
1021       break
1022     fi
1023   done
1024   IFS="$ac_save_ifs"
1025 fi
1026 fi
1027 CC="$ac_cv_prog_CC"
1028 if test -n "$CC"; then
1029   echo "$ac_t""$CC" 1>&6
1030 else
1031   echo "$ac_t""no" 1>&6
1032 fi
1033  ;;
1034     esac
1035   fi
1036   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1037 fi
1038
1039 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1040 echo "configure:1041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1041
1042 ac_ext=c
1043 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1044 ac_cpp='$CPP $CPPFLAGS'
1045 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1046 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1047 cross_compiling=$ac_cv_prog_cc_cross
1048
1049 cat > conftest.$ac_ext << EOF
1050
1051 #line 1052 "configure"
1052 #include "confdefs.h"
1053
1054 main(){return(0);}
1055 EOF
1056 if { (eval echo configure:1057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1057   ac_cv_prog_cc_works=yes
1058   # If we can't run a trivial program, we are probably using a cross compiler.
1059   if (./conftest; exit) 2>/dev/null; then
1060     ac_cv_prog_cc_cross=no
1061   else
1062     ac_cv_prog_cc_cross=yes
1063   fi
1064 else
1065   echo "configure: failed program was:" >&5
1066   cat conftest.$ac_ext >&5
1067   ac_cv_prog_cc_works=no
1068 fi
1069 rm -fr conftest*
1070 ac_ext=c
1071 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1072 ac_cpp='$CPP $CPPFLAGS'
1073 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1074 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1075 cross_compiling=$ac_cv_prog_cc_cross
1076
1077 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1078 if test $ac_cv_prog_cc_works = no; then
1079   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1080 fi
1081 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1082 echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1083 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1084 cross_compiling=$ac_cv_prog_cc_cross
1085
1086 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1087 echo "configure:1088: checking whether we are using GNU C" >&5
1088 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   cat > conftest.c <<EOF
1092 #ifdef __GNUC__
1093   yes;
1094 #endif
1095 EOF
1096 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1097   ac_cv_prog_gcc=yes
1098 else
1099   ac_cv_prog_gcc=no
1100 fi
1101 fi
1102
1103 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1104
1105 if test $ac_cv_prog_gcc = yes; then
1106   GCC=yes
1107 else
1108   GCC=
1109 fi
1110
1111 ac_test_CFLAGS="${CFLAGS+set}"
1112 ac_save_CFLAGS="$CFLAGS"
1113 CFLAGS=
1114 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1115 echo "configure:1116: checking whether ${CC-cc} accepts -g" >&5
1116 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1117   echo $ac_n "(cached) $ac_c" 1>&6
1118 else
1119   echo 'void f(){}' > conftest.c
1120 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1121   ac_cv_prog_cc_g=yes
1122 else
1123   ac_cv_prog_cc_g=no
1124 fi
1125 rm -f conftest*
1126
1127 fi
1128
1129 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1130 if test "$ac_test_CFLAGS" = set; then
1131   CFLAGS="$ac_save_CFLAGS"
1132 elif test $ac_cv_prog_cc_g = yes; then
1133   if test "$GCC" = yes; then
1134     CFLAGS="-g -O2"
1135   else
1136     CFLAGS="-g"
1137   fi
1138 else
1139   if test "$GCC" = yes; then
1140     CFLAGS="-O2"
1141   else
1142     CFLAGS=
1143   fi
1144 fi
1145
1146 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1147 echo "configure:1148: checking how to run the C preprocessor" >&5
1148 # On Suns, sometimes $CPP names a directory.
1149 if test -n "$CPP" && test -d "$CPP"; then
1150   CPP=
1151 fi
1152 if test -z "$CPP"; then
1153 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156     # This must be in double quotes, not single quotes, because CPP may get
1157   # substituted into the Makefile and "${CC-cc}" will confuse make.
1158   CPP="${CC-cc} -E"
1159   # On the NeXT, cc -E runs the code through the compiler's parser,
1160   # not just through cpp.
1161   cat > conftest.$ac_ext <<EOF
1162 #line 1163 "configure"
1163 #include "confdefs.h"
1164 #include <assert.h>
1165 Syntax Error
1166 EOF
1167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1168 { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1170 if test -z "$ac_err"; then
1171   :
1172 else
1173   echo "$ac_err" >&5
1174   echo "configure: failed program was:" >&5
1175   cat conftest.$ac_ext >&5
1176   rm -rf conftest*
1177   CPP="${CC-cc} -E -traditional-cpp"
1178   cat > conftest.$ac_ext <<EOF
1179 #line 1180 "configure"
1180 #include "confdefs.h"
1181 #include <assert.h>
1182 Syntax Error
1183 EOF
1184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1185 { (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1187 if test -z "$ac_err"; then
1188   :
1189 else
1190   echo "$ac_err" >&5
1191   echo "configure: failed program was:" >&5
1192   cat conftest.$ac_ext >&5
1193   rm -rf conftest*
1194   CPP="${CC-cc} -nologo -E"
1195   cat > conftest.$ac_ext <<EOF
1196 #line 1197 "configure"
1197 #include "confdefs.h"
1198 #include <assert.h>
1199 Syntax Error
1200 EOF
1201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1202 { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1204 if test -z "$ac_err"; then
1205   :
1206 else
1207   echo "$ac_err" >&5
1208   echo "configure: failed program was:" >&5
1209   cat conftest.$ac_ext >&5
1210   rm -rf conftest*
1211   CPP=/lib/cpp
1212 fi
1213 rm -f conftest*
1214 fi
1215 rm -f conftest*
1216 fi
1217 rm -f conftest*
1218   ac_cv_prog_CPP="$CPP"
1219 fi
1220   CPP="$ac_cv_prog_CPP"
1221 else
1222   ac_cv_prog_CPP="$CPP"
1223 fi
1224 echo "$ac_t""$CPP" 1>&6
1225
1226 # Find a good install program.  We prefer a C program (faster),
1227 # so one script is as good as another.  But avoid the broken or
1228 # incompatible versions:
1229 # SysV /etc/install, /usr/sbin/install
1230 # SunOS /usr/etc/install
1231 # IRIX /sbin/install
1232 # AIX /bin/install
1233 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1234 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1235 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1236 # ./install, which can be erroneously created by make from ./install.sh.
1237 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1238 echo "configure:1239: checking for a BSD compatible install" >&5
1239 if test -z "$INSTALL"; then
1240 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1241   echo $ac_n "(cached) $ac_c" 1>&6
1242 else
1243     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1244   for ac_dir in $PATH; do
1245     # Account for people who put trailing slashes in PATH elements.
1246     case "$ac_dir/" in
1247     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1248     *)
1249       # OSF1 and SCO ODT 3.0 have their own names for install.
1250       # Don't use installbsd from OSF since it installs stuff as root
1251       # by default.
1252       for ac_prog in ginstall scoinst install; do
1253         if test -f $ac_dir/$ac_prog; then
1254           if test $ac_prog = install &&
1255             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1256             # AIX install.  It has an incompatible calling convention.
1257             :
1258           else
1259             ac_cv_path_install="$ac_dir/$ac_prog -c"
1260             break 2
1261           fi
1262         fi
1263       done
1264       ;;
1265     esac
1266   done
1267   IFS="$ac_save_IFS"
1268
1269 fi
1270   if test "${ac_cv_path_install+set}" = set; then
1271     INSTALL="$ac_cv_path_install"
1272   else
1273     # As a last resort, use the slow shell script.  We don't cache a
1274     # path for INSTALL within a source directory, because that will
1275     # break other packages using the cache if that directory is
1276     # removed, or if the path is relative.
1277     INSTALL="$ac_install_sh"
1278   fi
1279 fi
1280 echo "$ac_t""$INSTALL" 1>&6
1281
1282 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1283 # It thinks the first close brace ends the variable substitution.
1284 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1285
1286 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1287
1288 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1289
1290 # Extract the first word of "ranlib", so it can be a program name with args.
1291 set dummy ranlib; ac_word=$2
1292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1293 echo "configure:1294: checking for $ac_word" >&5
1294 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1295   echo $ac_n "(cached) $ac_c" 1>&6
1296 else
1297   if test -n "$RANLIB"; then
1298   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1299 else
1300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1301   ac_dummy="$PATH"
1302   for ac_dir in $ac_dummy; do
1303     test -z "$ac_dir" && ac_dir=.
1304     if test -f $ac_dir/$ac_word; then
1305       ac_cv_prog_RANLIB="ranlib"
1306       break
1307     fi
1308   done
1309   IFS="$ac_save_ifs"
1310   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1311 fi
1312 fi
1313 RANLIB="$ac_cv_prog_RANLIB"
1314 if test -n "$RANLIB"; then
1315   echo "$ac_t""$RANLIB" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320
1321
1322         
1323         
1324         
1325         
1326         yazconfig=NONE
1327         yazpath=NONE
1328         # Check whether --with-yazconfig or --without-yazconfig was given.
1329 if test "${with_yazconfig+set}" = set; then
1330   withval="$with_yazconfig"
1331   yazpath=$withval
1332 fi
1333
1334         if test "x$yazpath" != "xNONE"; then
1335                 yazconfig=$yazpath/yaz-config
1336         else
1337                 for i in ../yaz* ../yaz; do
1338                         if test -d $i; then
1339                                 if test -r $i/yaz-config; then
1340                                         yazconfig=$i/yaz-config
1341                                 fi
1342                         fi
1343                 done
1344                 if test "x$yazconfig" = "xNONE"; then
1345                         # Extract the first word of "yaz-config", so it can be a program name with args.
1346 set dummy yaz-config; ac_word=$2
1347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1348 echo "configure:1349: checking for $ac_word" >&5
1349 if eval "test \"`echo '$''{'ac_cv_path_yazconfig'+set}'`\" = set"; then
1350   echo $ac_n "(cached) $ac_c" 1>&6
1351 else
1352   case "$yazconfig" in
1353   /*)
1354   ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a path.
1355   ;;
1356   ?:/*)                  
1357   ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a dos path.
1358   ;;
1359   *)
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_path_yazconfig="$ac_dir/$ac_word"
1366       break
1367     fi
1368   done
1369   IFS="$ac_save_ifs"
1370   test -z "$ac_cv_path_yazconfig" && ac_cv_path_yazconfig="NONE"
1371   ;;
1372 esac
1373 fi
1374 yazconfig="$ac_cv_path_yazconfig"
1375 if test -n "$yazconfig"; then
1376   echo "$ac_t""$yazconfig" 1>&6
1377 else
1378   echo "$ac_t""no" 1>&6
1379 fi
1380
1381                 fi
1382         fi
1383         echo $ac_n "checking for YAZ""... $ac_c" 1>&6
1384 echo "configure:1385: checking for YAZ" >&5
1385         if $yazconfig --version >/dev/null 2>&1; then
1386                 YAZLIB=`$yazconfig --libs`
1387                 YAZLALIB=`$yazconfig --lalibs`
1388                 YAZINC=`$yazconfig --cflags`
1389                 YAZVERSION=`$yazconfig --version`
1390                 echo "$ac_t""$yazconfig" 1>&6
1391         else
1392                 echo "$ac_t""Not found" 1>&6
1393                 YAZVERSION=NONE
1394         fi
1395
1396
1397 # Check whether --enable-threads or --disable-threads was given.
1398 if test "${enable_threads+set}" = set; then
1399   enableval="$enable_threads"
1400   enable_threads=$enableval
1401 else
1402   enable_threads=yes
1403 fi
1404
1405 if test "$enable_threads" = "yes"; then
1406         echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
1407 echo "configure:1408: checking for main in -lpthread" >&5
1408 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
1409 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1410   echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412   ac_save_LIBS="$LIBS"
1413 LIBS="-lpthread  $LIBS"
1414 cat > conftest.$ac_ext <<EOF
1415 #line 1416 "configure"
1416 #include "confdefs.h"
1417
1418 int main() {
1419 main()
1420 ; return 0; }
1421 EOF
1422 if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1423   rm -rf conftest*
1424   eval "ac_cv_lib_$ac_lib_var=yes"
1425 else
1426   echo "configure: failed program was:" >&5
1427   cat conftest.$ac_ext >&5
1428   rm -rf conftest*
1429   eval "ac_cv_lib_$ac_lib_var=no"
1430 fi
1431 rm -f conftest*
1432 LIBS="$ac_save_LIBS"
1433
1434 fi
1435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1436   echo "$ac_t""yes" 1>&6
1437     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1439   cat >> confdefs.h <<EOF
1440 #define $ac_tr_lib 1
1441 EOF
1442
1443   LIBS="-lpthread $LIBS"
1444
1445 else
1446   echo "$ac_t""no" 1>&6
1447 fi
1448
1449         echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6
1450 echo "configure:1451: checking for working POSIX Threads" >&5
1451         cat > conftest.$ac_ext <<EOF
1452 #line 1453 "configure"
1453 #include "confdefs.h"
1454 #include <pthread.h>
1455         int func(void *p) { return 0; }
1456         
1457 int main() {
1458
1459         pthread_t pthread_id;
1460         int r = pthread_create (&pthread_id, 0, func, 0);
1461 ; return 0; }
1462 EOF
1463 if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1464   rm -rf conftest*
1465   thread_ok=yes
1466 else
1467   echo "configure: failed program was:" >&5
1468   cat conftest.$ac_ext >&5
1469   rm -rf conftest*
1470   thread_ok=no
1471 fi
1472 rm -f conftest*
1473         if test "$thread_ok" = "yes"; then
1474                 echo "$ac_t""yes" 1>&6
1475                 cat >> confdefs.h <<\EOF
1476 #define HAVE_PTHREAD_H 1
1477 EOF
1478
1479                 cat >> confdefs.h <<\EOF
1480 #define _REENTRANT 1
1481 EOF
1482
1483         else
1484                 echo "$ac_t""no" 1>&6
1485         fi
1486 fi
1487 TCL_LIB=""
1488 TCL_INCLUDE=""
1489 tclconfig=NONE
1490 # Check whether --with-tclconfig or --without-tclconfig was given.
1491 if test "${with_tclconfig+set}" = set; then
1492   withval="$with_tclconfig"
1493   tclconfig=$withval
1494 fi
1495
1496 if test "x$tclconfig" = xNONE; then
1497         saveprefix=${prefix}
1498         if test "x$prefix" = xNONE; then
1499 echo $ac_n "checking for prefix by $ac_c" 1>&6
1500 # Extract the first word of "tclsh", so it can be a program name with args.
1501 set dummy tclsh; ac_word=$2
1502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1503 echo "configure:1504: checking for $ac_word" >&5
1504 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
1505   echo $ac_n "(cached) $ac_c" 1>&6
1506 else
1507   case "$TCLSH" in
1508   /*)
1509   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
1510   ;;
1511   ?:/*)                  
1512   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
1513   ;;
1514   *)
1515   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1516   ac_dummy="$PATH"
1517   for ac_dir in $ac_dummy; do 
1518     test -z "$ac_dir" && ac_dir=.
1519     if test -f $ac_dir/$ac_word; then
1520       ac_cv_path_TCLSH="$ac_dir/$ac_word"
1521       break
1522     fi
1523   done
1524   IFS="$ac_save_ifs"
1525   ;;
1526 esac
1527 fi
1528 TCLSH="$ac_cv_path_TCLSH"
1529 if test -n "$TCLSH"; then
1530   echo "$ac_t""$TCLSH" 1>&6
1531 else
1532   echo "$ac_t""no" 1>&6
1533 fi
1534
1535   if test -n "$ac_cv_path_TCLSH"; then
1536     prefix=`echo $ac_cv_path_TCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1537   fi
1538 fi
1539
1540         tclconfig=${prefix}/lib
1541         prefix=${saveprefix}
1542 fi
1543 echo $ac_n "checking for Tcl""... $ac_c" 1>&6
1544 echo "configure:1545: checking for Tcl" >&5
1545 if test -r ${tclconfig}/tclConfig.sh; then
1546         . ${tclconfig}/tclConfig.sh
1547         if test -r ${tclconfig}/../generic/tcl.h; then
1548                 TCL_INCLUDE=-I${tclconfig}/../generic
1549                 TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
1550         else
1551                 TCL_INCLUDE=-I${TCL_PREFIX}/include
1552                 TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
1553         fi
1554         SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
1555         SHLIB_LD=$TCL_SHLIB_LD
1556         SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
1557         SHLIB_VERSION=$TCL_SHLIB_VERSION
1558         echo "$ac_t""$TCL_VERSION" 1>&6
1559         cat >> confdefs.h <<\EOF
1560 #define HAVE_TCL_H 1
1561 EOF
1562
1563 else
1564         echo "$ac_t""Not found" 1>&6
1565         cat >> confdefs.h <<\EOF
1566 #define HAVE_TCL_H 0
1567 EOF
1568
1569 fi
1570 for ac_hdr in sys/times.h
1571 do
1572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1574 echo "configure:1575: checking for $ac_hdr" >&5
1575 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1576   echo $ac_n "(cached) $ac_c" 1>&6
1577 else
1578   cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1581 #include <$ac_hdr>
1582 EOF
1583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1584 { (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1586 if test -z "$ac_err"; then
1587   rm -rf conftest*
1588   eval "ac_cv_header_$ac_safe=yes"
1589 else
1590   echo "$ac_err" >&5
1591   echo "configure: failed program was:" >&5
1592   cat conftest.$ac_ext >&5
1593   rm -rf conftest*
1594   eval "ac_cv_header_$ac_safe=no"
1595 fi
1596 rm -f conftest*
1597 fi
1598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1599   echo "$ac_t""yes" 1>&6
1600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1601   cat >> confdefs.h <<EOF
1602 #define $ac_tr_hdr 1
1603 EOF
1604  
1605 else
1606   echo "$ac_t""no" 1>&6
1607 fi
1608 done
1609
1610 echo $ac_n "checking for bzCompressInit in -lbz2""... $ac_c" 1>&6
1611 echo "configure:1612: checking for bzCompressInit in -lbz2" >&5
1612 ac_lib_var=`echo bz2'_'bzCompressInit | sed 'y%./+-%__p_%'`
1613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1614   echo $ac_n "(cached) $ac_c" 1>&6
1615 else
1616   ac_save_LIBS="$LIBS"
1617 LIBS="-lbz2  $LIBS"
1618 cat > conftest.$ac_ext <<EOF
1619 #line 1620 "configure"
1620 #include "confdefs.h"
1621 /* Override any gcc2 internal prototype to avoid an error.  */
1622 /* We use char because int might match the return type of a gcc2
1623     builtin and then its argument prototype would still apply.  */
1624 char bzCompressInit();
1625
1626 int main() {
1627 bzCompressInit()
1628 ; return 0; }
1629 EOF
1630 if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1631   rm -rf conftest*
1632   eval "ac_cv_lib_$ac_lib_var=yes"
1633 else
1634   echo "configure: failed program was:" >&5
1635   cat conftest.$ac_ext >&5
1636   rm -rf conftest*
1637   eval "ac_cv_lib_$ac_lib_var=no"
1638 fi
1639 rm -f conftest*
1640 LIBS="$ac_save_LIBS"
1641
1642 fi
1643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1644   echo "$ac_t""yes" 1>&6
1645     ac_tr_lib=HAVE_LIB`echo bz2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1647   cat >> confdefs.h <<EOF
1648 #define $ac_tr_lib 1
1649 EOF
1650
1651   LIBS="-lbz2 $LIBS"
1652
1653 else
1654   echo "$ac_t""no" 1>&6
1655 fi
1656
1657 if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
1658         for ac_hdr in bzlib.h
1659 do
1660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1662 echo "configure:1663: checking for $ac_hdr" >&5
1663 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1664   echo $ac_n "(cached) $ac_c" 1>&6
1665 else
1666   cat > conftest.$ac_ext <<EOF
1667 #line 1668 "configure"
1668 #include "confdefs.h"
1669 #include <$ac_hdr>
1670 EOF
1671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1672 { (eval echo configure:1673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1674 if test -z "$ac_err"; then
1675   rm -rf conftest*
1676   eval "ac_cv_header_$ac_safe=yes"
1677 else
1678   echo "$ac_err" >&5
1679   echo "configure: failed program was:" >&5
1680   cat conftest.$ac_ext >&5
1681   rm -rf conftest*
1682   eval "ac_cv_header_$ac_safe=no"
1683 fi
1684 rm -f conftest*
1685 fi
1686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1687   echo "$ac_t""yes" 1>&6
1688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1689   cat >> confdefs.h <<EOF
1690 #define $ac_tr_hdr 1
1691 EOF
1692  
1693 else
1694   echo "$ac_t""no" 1>&6
1695 fi
1696 done
1697
1698 fi
1699 echo $ac_n "checking for LFS""... $ac_c" 1>&6
1700 echo "configure:1701: checking for LFS" >&5
1701 if test "$cross_compiling" = yes; then
1702   bits=32
1703 else
1704   cat > conftest.$ac_ext <<EOF
1705 #line 1706 "configure"
1706 #include "confdefs.h"
1707 #define _FILE_OFFSET_BITS 64
1708 #include <unistd.h>
1709 #include <string.h>
1710 #include <stdio.h>
1711 int main(int argc, char **argv)
1712 {
1713         off_t o;
1714         char tmp_str[32];
1715         if (sizeof(off_t) == 8) {
1716                 o = 2000000000;
1717                 sprintf (tmp_str, "%Ld", o+o+o);
1718                 if (!strcmp (tmp_str, "6000000000"))
1719                         exit (0);
1720         }
1721         exit (1);
1722 }
1723
1724 EOF
1725 if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1726 then
1727   bits=64
1728 else
1729   echo "configure: failed program was:" >&5
1730   cat conftest.$ac_ext >&5
1731   rm -fr conftest*
1732   bits=32
1733 fi
1734 rm -fr conftest*
1735 fi
1736
1737 if test "$bits" = "64"; then
1738         cat >> confdefs.h <<\EOF
1739 #define _FILE_OFFSET_BITS 64
1740 EOF
1741
1742         echo "$ac_t""yes" 1>&6
1743 else
1744         echo "$ac_t""no" 1>&6
1745 fi
1746 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1747 echo "configure:1748: checking for ANSI C header files" >&5
1748 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1749   echo $ac_n "(cached) $ac_c" 1>&6
1750 else
1751   cat > conftest.$ac_ext <<EOF
1752 #line 1753 "configure"
1753 #include "confdefs.h"
1754 #include <stdlib.h>
1755 #include <stdarg.h>
1756 #include <string.h>
1757 #include <float.h>
1758 EOF
1759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1760 { (eval echo configure:1761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1762 if test -z "$ac_err"; then
1763   rm -rf conftest*
1764   ac_cv_header_stdc=yes
1765 else
1766   echo "$ac_err" >&5
1767   echo "configure: failed program was:" >&5
1768   cat conftest.$ac_ext >&5
1769   rm -rf conftest*
1770   ac_cv_header_stdc=no
1771 fi
1772 rm -f conftest*
1773
1774 if test $ac_cv_header_stdc = yes; then
1775   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 #include <string.h>
1780 EOF
1781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1782   egrep "memchr" >/dev/null 2>&1; then
1783   :
1784 else
1785   rm -rf conftest*
1786   ac_cv_header_stdc=no
1787 fi
1788 rm -f conftest*
1789
1790 fi
1791
1792 if test $ac_cv_header_stdc = yes; then
1793   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1794 cat > conftest.$ac_ext <<EOF
1795 #line 1796 "configure"
1796 #include "confdefs.h"
1797 #include <stdlib.h>
1798 EOF
1799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1800   egrep "free" >/dev/null 2>&1; then
1801   :
1802 else
1803   rm -rf conftest*
1804   ac_cv_header_stdc=no
1805 fi
1806 rm -f conftest*
1807
1808 fi
1809
1810 if test $ac_cv_header_stdc = yes; then
1811   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1812 if test "$cross_compiling" = yes; then
1813   :
1814 else
1815   cat > conftest.$ac_ext <<EOF
1816 #line 1817 "configure"
1817 #include "confdefs.h"
1818 #include <ctype.h>
1819 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1820 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1821 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1822 int main () { int i; for (i = 0; i < 256; i++)
1823 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1824 exit (0); }
1825
1826 EOF
1827 if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1828 then
1829   :
1830 else
1831   echo "configure: failed program was:" >&5
1832   cat conftest.$ac_ext >&5
1833   rm -fr conftest*
1834   ac_cv_header_stdc=no
1835 fi
1836 rm -fr conftest*
1837 fi
1838
1839 fi
1840 fi
1841
1842 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1843 if test $ac_cv_header_stdc = yes; then
1844   cat >> confdefs.h <<\EOF
1845 #define STDC_HEADERS 1
1846 EOF
1847
1848 fi
1849
1850 if test "$ac_cv_header_stdc" = "no"; then
1851         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
1852 fi
1853 trap '' 1 2 15
1854 cat > confcache <<\EOF
1855 # This file is a shell script that caches the results of configure
1856 # tests run on this system so they can be shared between configure
1857 # scripts and configure runs.  It is not useful on other systems.
1858 # If it contains results you don't want to keep, you may remove or edit it.
1859 #
1860 # By default, configure uses ./config.cache as the cache file,
1861 # creating it if it does not exist already.  You can give configure
1862 # the --cache-file=FILE option to use a different cache file; that is
1863 # what configure does when it calls configure scripts in
1864 # subdirectories, so they share the cache.
1865 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1866 # config.status only pays attention to the cache file if you give it the
1867 # --recheck option to rerun configure.
1868 #
1869 EOF
1870 # The following way of writing the cache mishandles newlines in values,
1871 # but we know of no workaround that is simple, portable, and efficient.
1872 # So, don't put newlines in cache variables' values.
1873 # Ultrix sh set writes to stderr and can't be redirected directly,
1874 # and sets the high bit in the cache file unless we assign to the vars.
1875 (set) 2>&1 |
1876   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1877   *ac_space=\ *)
1878     # `set' does not quote correctly, so add quotes (double-quote substitution
1879     # turns \\\\ into \\, and sed turns \\ into \).
1880     sed -n \
1881       -e "s/'/'\\\\''/g" \
1882       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1883     ;;
1884   *)
1885     # `set' quotes correctly as required by POSIX, so do not add quotes.
1886     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1887     ;;
1888   esac >> confcache
1889 if cmp -s $cache_file confcache; then
1890   :
1891 else
1892   if test -w $cache_file; then
1893     echo "updating cache $cache_file"
1894     cat confcache > $cache_file
1895   else
1896     echo "not updating unwritable cache $cache_file"
1897   fi
1898 fi
1899 rm -f confcache
1900
1901 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1902
1903 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1904 # Let make expand exec_prefix.
1905 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1906
1907 # Any assignment to VPATH causes Sun make to only execute
1908 # the first set of double-colon rules, so remove it if not needed.
1909 # If there is a colon in the path, we need to keep it.
1910 if test "x$srcdir" = x.; then
1911   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1912 fi
1913
1914 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1915
1916 # Transform confdefs.h into DEFS.
1917 # Protect against shell expansion while executing Makefile rules.
1918 # Protect against Makefile macro expansion.
1919 cat > conftest.defs <<\EOF
1920 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1921 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1922 s%\[%\\&%g
1923 s%\]%\\&%g
1924 s%\$%$$%g
1925 EOF
1926 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1927 rm -f conftest.defs
1928
1929
1930 # Without the "./", some shells look in PATH for config.status.
1931 : ${CONFIG_STATUS=./config.status}
1932
1933 echo creating $CONFIG_STATUS
1934 rm -f $CONFIG_STATUS
1935 cat > $CONFIG_STATUS <<EOF
1936 #! /bin/sh
1937 # Generated automatically by configure.
1938 # Run this file to recreate the current configuration.
1939 # This directory was configured as follows,
1940 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1941 #
1942 # $0 $ac_configure_args
1943 #
1944 # Compiler output produced by configure, useful for debugging
1945 # configure, is in ./config.log if it exists.
1946
1947 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1948 for ac_option
1949 do
1950   case "\$ac_option" in
1951   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1952     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1953     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1954   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1955     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1956     exit 0 ;;
1957   -help | --help | --hel | --he | --h)
1958     echo "\$ac_cs_usage"; exit 0 ;;
1959   *) echo "\$ac_cs_usage"; exit 1 ;;
1960   esac
1961 done
1962
1963 ac_given_srcdir=$srcdir
1964 ac_given_INSTALL="$INSTALL"
1965
1966 trap 'rm -fr `echo "
1967   Makefile
1968   util/Makefile
1969   bfile/Makefile
1970   dfa/Makefile
1971   dict/Makefile
1972   isamb/Makefile
1973   isams/Makefile
1974   isamc/Makefile
1975   isam/Makefile
1976   rset/Makefile
1977   recctrl/Makefile
1978   index/Makefile
1979   include/Makefile
1980   tab/Makefile
1981   doc/Makefile
1982   test/Makefile test/gils/Makefile test/usmarc/Makefile
1983 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1984 EOF
1985 cat >> $CONFIG_STATUS <<EOF
1986
1987 # Protect against being on the right side of a sed subst in config.status.
1988 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1989  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1990 $ac_vpsub
1991 $extrasub
1992 s%@SHELL@%$SHELL%g
1993 s%@CFLAGS@%$CFLAGS%g
1994 s%@CPPFLAGS@%$CPPFLAGS%g
1995 s%@CXXFLAGS@%$CXXFLAGS%g
1996 s%@FFLAGS@%$FFLAGS%g
1997 s%@DEFS@%$DEFS%g
1998 s%@LDFLAGS@%$LDFLAGS%g
1999 s%@LIBS@%$LIBS%g
2000 s%@exec_prefix@%$exec_prefix%g
2001 s%@prefix@%$prefix%g
2002 s%@program_transform_name@%$program_transform_name%g
2003 s%@bindir@%$bindir%g
2004 s%@sbindir@%$sbindir%g
2005 s%@libexecdir@%$libexecdir%g
2006 s%@datadir@%$datadir%g
2007 s%@sysconfdir@%$sysconfdir%g
2008 s%@sharedstatedir@%$sharedstatedir%g
2009 s%@localstatedir@%$localstatedir%g
2010 s%@libdir@%$libdir%g
2011 s%@includedir@%$includedir%g
2012 s%@oldincludedir@%$oldincludedir%g
2013 s%@infodir@%$infodir%g
2014 s%@mandir@%$mandir%g
2015 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2016 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2017 s%@INSTALL_DATA@%$INSTALL_DATA%g
2018 s%@PACKAGE@%$PACKAGE%g
2019 s%@VERSION@%$VERSION%g
2020 s%@ACLOCAL@%$ACLOCAL%g
2021 s%@AUTOCONF@%$AUTOCONF%g
2022 s%@AUTOMAKE@%$AUTOMAKE%g
2023 s%@AUTOHEADER@%$AUTOHEADER%g
2024 s%@MAKEINFO@%$MAKEINFO%g
2025 s%@SET_MAKE@%$SET_MAKE%g
2026 s%@ISZMBOL_TRUE@%$ISZMBOL_TRUE%g
2027 s%@ISZMBOL_FALSE@%$ISZMBOL_FALSE%g
2028 s%@SUBLIBS@%$SUBLIBS%g
2029 s%@TCL_INCLUDE@%$TCL_INCLUDE%g
2030 s%@TCL_LIB@%$TCL_LIB%g
2031 s%@PROGPREFIX@%$PROGPREFIX%g
2032 s%@CC@%$CC%g
2033 s%@CPP@%$CPP%g
2034 s%@RANLIB@%$RANLIB%g
2035 s%@YAZLIB@%$YAZLIB%g
2036 s%@YAZLALIB@%$YAZLALIB%g
2037 s%@YAZINC@%$YAZINC%g
2038 s%@YAZVERSION@%$YAZVERSION%g
2039 s%@yazconfig@%$yazconfig%g
2040 s%@TCLSH@%$TCLSH%g
2041
2042 CEOF
2043 EOF
2044
2045 cat >> $CONFIG_STATUS <<\EOF
2046
2047 # Split the substitutions into bite-sized pieces for seds with
2048 # small command number limits, like on Digital OSF/1 and HP-UX.
2049 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2050 ac_file=1 # Number of current file.
2051 ac_beg=1 # First line for current file.
2052 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2053 ac_more_lines=:
2054 ac_sed_cmds=""
2055 while $ac_more_lines; do
2056   if test $ac_beg -gt 1; then
2057     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2058   else
2059     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2060   fi
2061   if test ! -s conftest.s$ac_file; then
2062     ac_more_lines=false
2063     rm -f conftest.s$ac_file
2064   else
2065     if test -z "$ac_sed_cmds"; then
2066       ac_sed_cmds="sed -f conftest.s$ac_file"
2067     else
2068       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2069     fi
2070     ac_file=`expr $ac_file + 1`
2071     ac_beg=$ac_end
2072     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2073   fi
2074 done
2075 if test -z "$ac_sed_cmds"; then
2076   ac_sed_cmds=cat
2077 fi
2078 EOF
2079
2080 cat >> $CONFIG_STATUS <<EOF
2081
2082 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2083   util/Makefile
2084   bfile/Makefile
2085   dfa/Makefile
2086   dict/Makefile
2087   isamb/Makefile
2088   isams/Makefile
2089   isamc/Makefile
2090   isam/Makefile
2091   rset/Makefile
2092   recctrl/Makefile
2093   index/Makefile
2094   include/Makefile
2095   tab/Makefile
2096   doc/Makefile
2097   test/Makefile test/gils/Makefile test/usmarc/Makefile
2098 "}
2099 EOF
2100 cat >> $CONFIG_STATUS <<\EOF
2101 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2102   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2103   case "$ac_file" in
2104   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2105        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2106   *) ac_file_in="${ac_file}.in" ;;
2107   esac
2108
2109   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2110
2111   # Remove last slash and all that follows it.  Not all systems have dirname.
2112   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2113   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2114     # The file is in a subdirectory.
2115     test ! -d "$ac_dir" && mkdir "$ac_dir"
2116     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2117     # A "../" for each directory in $ac_dir_suffix.
2118     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2119   else
2120     ac_dir_suffix= ac_dots=
2121   fi
2122
2123   case "$ac_given_srcdir" in
2124   .)  srcdir=.
2125       if test -z "$ac_dots"; then top_srcdir=.
2126       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2127   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2128   *) # Relative path.
2129     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2130     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2131   esac
2132
2133   case "$ac_given_INSTALL" in
2134   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2135   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2136   esac
2137
2138   echo creating "$ac_file"
2139   rm -f "$ac_file"
2140   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2141   case "$ac_file" in
2142   *Makefile*) ac_comsub="1i\\
2143 # $configure_input" ;;
2144   *) ac_comsub= ;;
2145   esac
2146
2147   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2148   sed -e "$ac_comsub
2149 s%@configure_input@%$configure_input%g
2150 s%@srcdir@%$srcdir%g
2151 s%@top_srcdir@%$top_srcdir%g
2152 s%@INSTALL@%$INSTALL%g
2153 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2154 fi; done
2155 rm -f conftest.s*
2156
2157 EOF
2158 cat >> $CONFIG_STATUS <<EOF
2159
2160 EOF
2161 cat >> $CONFIG_STATUS <<\EOF
2162
2163 exit 0
2164 EOF
2165 chmod +x $CONFIG_STATUS
2166 rm -fr confdefs* $ac_clean_files
2167 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2168