On Unix, zebra/z'mbol uses automake.
[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.5)"
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  ../isams/libisams.a \
794  ../isam/libisam.a \
795  ../isamc/libisamc.a \
796  ../recctrl/librecctrl.a \
797  ../bfile/libbfile.a \
798  ../dfa/libdfa.a \
799  ../util/libutil.a"
800 else
801         echo "$ac_t""Zebra" 1>&6
802         PROGPREFIX=zebra
803         cat >> confdefs.h <<\EOF
804 #define ZMBOL 0
805 EOF
806
807         
808 PACKAGE=zebra
809
810 VERSION=1.1
811
812 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
813   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
814 fi
815 cat >> confdefs.h <<EOF
816 #define PACKAGE "$PACKAGE"
817 EOF
818
819 cat >> confdefs.h <<EOF
820 #define VERSION "$VERSION"
821 EOF
822
823
824
825 missing_dir=`cd $ac_aux_dir && pwd`
826 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
827 echo "configure:828: checking for working aclocal" >&5
828 # Run test in a subshell; some versions of sh will print an error if
829 # an executable is not found, even if stderr is redirected.
830 # Redirect stdin to placate older versions of autoconf.  Sigh.
831 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
832    ACLOCAL=aclocal
833    echo "$ac_t""found" 1>&6
834 else
835    ACLOCAL="$missing_dir/missing aclocal"
836    echo "$ac_t""missing" 1>&6
837 fi
838
839 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
840 echo "configure:841: checking for working autoconf" >&5
841 # Run test in a subshell; some versions of sh will print an error if
842 # an executable is not found, even if stderr is redirected.
843 # Redirect stdin to placate older versions of autoconf.  Sigh.
844 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
845    AUTOCONF=autoconf
846    echo "$ac_t""found" 1>&6
847 else
848    AUTOCONF="$missing_dir/missing autoconf"
849    echo "$ac_t""missing" 1>&6
850 fi
851
852 echo $ac_n "checking for working automake""... $ac_c" 1>&6
853 echo "configure:854: checking for working automake" >&5
854 # Run test in a subshell; some versions of sh will print an error if
855 # an executable is not found, even if stderr is redirected.
856 # Redirect stdin to placate older versions of autoconf.  Sigh.
857 if (automake --version) < /dev/null > /dev/null 2>&1; then
858    AUTOMAKE=automake
859    echo "$ac_t""found" 1>&6
860 else
861    AUTOMAKE="$missing_dir/missing automake"
862    echo "$ac_t""missing" 1>&6
863 fi
864
865 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
866 echo "configure:867: checking for working autoheader" >&5
867 # Run test in a subshell; some versions of sh will print an error if
868 # an executable is not found, even if stderr is redirected.
869 # Redirect stdin to placate older versions of autoconf.  Sigh.
870 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
871    AUTOHEADER=autoheader
872    echo "$ac_t""found" 1>&6
873 else
874    AUTOHEADER="$missing_dir/missing autoheader"
875    echo "$ac_t""missing" 1>&6
876 fi
877
878 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
879 echo "configure:880: checking for working makeinfo" >&5
880 # Run test in a subshell; some versions of sh will print an error if
881 # an executable is not found, even if stderr is redirected.
882 # Redirect stdin to placate older versions of autoconf.  Sigh.
883 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
884    MAKEINFO=makeinfo
885    echo "$ac_t""found" 1>&6
886 else
887    MAKEINFO="$missing_dir/missing makeinfo"
888    echo "$ac_t""missing" 1>&6
889 fi
890
891
892         SUBLIBS="../rset/librset.a ../dict/libdict.a ../isams/libisams.a \
893         ../recctrl/librecctrl.a  \
894         ../bfile/libbfile.a ../dfa/libdfa.a \
895         ../util/libutil.a"
896         if test ! -r ${srcdir}/isam; then
897                 mkdir ${srcdir}/isam
898                 touch ${srcdir}/isam/Makefile.in
899         fi
900         if test ! -r ${srcdir}/isamc; then
901                 mkdir ${srcdir}/isamc
902                 touch ${srcdir}/isamc/Makefile.in
903         fi
904 fi
905
906
907 if test $PACKAGE = zmbol; then
908   ISZMBOL_TRUE=
909   ISZMBOL_FALSE='#'
910 else
911   ISZMBOL_TRUE='#'
912   ISZMBOL_FALSE=
913 fi
914
915
916
917
918
919
920
921
922 # Extract the first word of "gcc", so it can be a program name with args.
923 set dummy gcc; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$CC"; then
930   ac_cv_prog_CC="$CC" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_CC="gcc"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 CC="$ac_cv_prog_CC"
945 if test -n "$CC"; then
946   echo "$ac_t""$CC" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 if test -z "$CC"; then
952   # Extract the first word of "cc", so it can be a program name with args.
953 set dummy cc; ac_word=$2
954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955 echo "configure:956: checking for $ac_word" >&5
956 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   if test -n "$CC"; then
960   ac_cv_prog_CC="$CC" # Let the user override the test.
961 else
962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
963   ac_prog_rejected=no
964   ac_dummy="$PATH"
965   for ac_dir in $ac_dummy; do
966     test -z "$ac_dir" && ac_dir=.
967     if test -f $ac_dir/$ac_word; then
968       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
969         ac_prog_rejected=yes
970         continue
971       fi
972       ac_cv_prog_CC="cc"
973       break
974     fi
975   done
976   IFS="$ac_save_ifs"
977 if test $ac_prog_rejected = yes; then
978   # We found a bogon in the path, so make sure we never use it.
979   set dummy $ac_cv_prog_CC
980   shift
981   if test $# -gt 0; then
982     # We chose a different compiler from the bogus one.
983     # However, it has the same basename, so the bogon will be chosen
984     # first if we set CC to just the basename; use the full file name.
985     shift
986     set dummy "$ac_dir/$ac_word" "$@"
987     shift
988     ac_cv_prog_CC="$@"
989   fi
990 fi
991 fi
992 fi
993 CC="$ac_cv_prog_CC"
994 if test -n "$CC"; then
995   echo "$ac_t""$CC" 1>&6
996 else
997   echo "$ac_t""no" 1>&6
998 fi
999
1000   if test -z "$CC"; then
1001     case "`uname -s`" in
1002     *win32* | *WIN32*)
1003       # Extract the first word of "cl", so it can be a program name with args.
1004 set dummy cl; ac_word=$2
1005 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1006 echo "configure:1007: checking for $ac_word" >&5
1007 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1008   echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010   if test -n "$CC"; then
1011   ac_cv_prog_CC="$CC" # Let the user override the test.
1012 else
1013   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1014   ac_dummy="$PATH"
1015   for ac_dir in $ac_dummy; do
1016     test -z "$ac_dir" && ac_dir=.
1017     if test -f $ac_dir/$ac_word; then
1018       ac_cv_prog_CC="cl"
1019       break
1020     fi
1021   done
1022   IFS="$ac_save_ifs"
1023 fi
1024 fi
1025 CC="$ac_cv_prog_CC"
1026 if test -n "$CC"; then
1027   echo "$ac_t""$CC" 1>&6
1028 else
1029   echo "$ac_t""no" 1>&6
1030 fi
1031  ;;
1032     esac
1033   fi
1034   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1035 fi
1036
1037 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1038 echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1039
1040 ac_ext=c
1041 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1042 ac_cpp='$CPP $CPPFLAGS'
1043 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1044 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1045 cross_compiling=$ac_cv_prog_cc_cross
1046
1047 cat > conftest.$ac_ext << EOF
1048
1049 #line 1050 "configure"
1050 #include "confdefs.h"
1051
1052 main(){return(0);}
1053 EOF
1054 if { (eval echo configure:1055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1055   ac_cv_prog_cc_works=yes
1056   # If we can't run a trivial program, we are probably using a cross compiler.
1057   if (./conftest; exit) 2>/dev/null; then
1058     ac_cv_prog_cc_cross=no
1059   else
1060     ac_cv_prog_cc_cross=yes
1061   fi
1062 else
1063   echo "configure: failed program was:" >&5
1064   cat conftest.$ac_ext >&5
1065   ac_cv_prog_cc_works=no
1066 fi
1067 rm -fr conftest*
1068 ac_ext=c
1069 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1070 ac_cpp='$CPP $CPPFLAGS'
1071 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1072 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1073 cross_compiling=$ac_cv_prog_cc_cross
1074
1075 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1076 if test $ac_cv_prog_cc_works = no; then
1077   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1078 fi
1079 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1080 echo "configure:1081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1081 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1082 cross_compiling=$ac_cv_prog_cc_cross
1083
1084 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1085 echo "configure:1086: checking whether we are using GNU C" >&5
1086 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1087   echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089   cat > conftest.c <<EOF
1090 #ifdef __GNUC__
1091   yes;
1092 #endif
1093 EOF
1094 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1095   ac_cv_prog_gcc=yes
1096 else
1097   ac_cv_prog_gcc=no
1098 fi
1099 fi
1100
1101 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1102
1103 if test $ac_cv_prog_gcc = yes; then
1104   GCC=yes
1105 else
1106   GCC=
1107 fi
1108
1109 ac_test_CFLAGS="${CFLAGS+set}"
1110 ac_save_CFLAGS="$CFLAGS"
1111 CFLAGS=
1112 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1113 echo "configure:1114: checking whether ${CC-cc} accepts -g" >&5
1114 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1115   echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117   echo 'void f(){}' > conftest.c
1118 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1119   ac_cv_prog_cc_g=yes
1120 else
1121   ac_cv_prog_cc_g=no
1122 fi
1123 rm -f conftest*
1124
1125 fi
1126
1127 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1128 if test "$ac_test_CFLAGS" = set; then
1129   CFLAGS="$ac_save_CFLAGS"
1130 elif test $ac_cv_prog_cc_g = yes; then
1131   if test "$GCC" = yes; then
1132     CFLAGS="-g -O2"
1133   else
1134     CFLAGS="-g"
1135   fi
1136 else
1137   if test "$GCC" = yes; then
1138     CFLAGS="-O2"
1139   else
1140     CFLAGS=
1141   fi
1142 fi
1143
1144 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1145 echo "configure:1146: checking how to run the C preprocessor" >&5
1146 # On Suns, sometimes $CPP names a directory.
1147 if test -n "$CPP" && test -d "$CPP"; then
1148   CPP=
1149 fi
1150 if test -z "$CPP"; then
1151 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1152   echo $ac_n "(cached) $ac_c" 1>&6
1153 else
1154     # This must be in double quotes, not single quotes, because CPP may get
1155   # substituted into the Makefile and "${CC-cc}" will confuse make.
1156   CPP="${CC-cc} -E"
1157   # On the NeXT, cc -E runs the code through the compiler's parser,
1158   # not just through cpp.
1159   cat > conftest.$ac_ext <<EOF
1160 #line 1161 "configure"
1161 #include "confdefs.h"
1162 #include <assert.h>
1163 Syntax Error
1164 EOF
1165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1166 { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1168 if test -z "$ac_err"; then
1169   :
1170 else
1171   echo "$ac_err" >&5
1172   echo "configure: failed program was:" >&5
1173   cat conftest.$ac_ext >&5
1174   rm -rf conftest*
1175   CPP="${CC-cc} -E -traditional-cpp"
1176   cat > conftest.$ac_ext <<EOF
1177 #line 1178 "configure"
1178 #include "confdefs.h"
1179 #include <assert.h>
1180 Syntax Error
1181 EOF
1182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1183 { (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1185 if test -z "$ac_err"; then
1186   :
1187 else
1188   echo "$ac_err" >&5
1189   echo "configure: failed program was:" >&5
1190   cat conftest.$ac_ext >&5
1191   rm -rf conftest*
1192   CPP="${CC-cc} -nologo -E"
1193   cat > conftest.$ac_ext <<EOF
1194 #line 1195 "configure"
1195 #include "confdefs.h"
1196 #include <assert.h>
1197 Syntax Error
1198 EOF
1199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1200 { (eval echo configure:1201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1202 if test -z "$ac_err"; then
1203   :
1204 else
1205   echo "$ac_err" >&5
1206   echo "configure: failed program was:" >&5
1207   cat conftest.$ac_ext >&5
1208   rm -rf conftest*
1209   CPP=/lib/cpp
1210 fi
1211 rm -f conftest*
1212 fi
1213 rm -f conftest*
1214 fi
1215 rm -f conftest*
1216   ac_cv_prog_CPP="$CPP"
1217 fi
1218   CPP="$ac_cv_prog_CPP"
1219 else
1220   ac_cv_prog_CPP="$CPP"
1221 fi
1222 echo "$ac_t""$CPP" 1>&6
1223
1224 # Find a good install program.  We prefer a C program (faster),
1225 # so one script is as good as another.  But avoid the broken or
1226 # incompatible versions:
1227 # SysV /etc/install, /usr/sbin/install
1228 # SunOS /usr/etc/install
1229 # IRIX /sbin/install
1230 # AIX /bin/install
1231 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1232 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1233 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1234 # ./install, which can be erroneously created by make from ./install.sh.
1235 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1236 echo "configure:1237: checking for a BSD compatible install" >&5
1237 if test -z "$INSTALL"; then
1238 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1239   echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1242   for ac_dir in $PATH; do
1243     # Account for people who put trailing slashes in PATH elements.
1244     case "$ac_dir/" in
1245     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1246     *)
1247       # OSF1 and SCO ODT 3.0 have their own names for install.
1248       # Don't use installbsd from OSF since it installs stuff as root
1249       # by default.
1250       for ac_prog in ginstall scoinst install; do
1251         if test -f $ac_dir/$ac_prog; then
1252           if test $ac_prog = install &&
1253             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1254             # AIX install.  It has an incompatible calling convention.
1255             :
1256           else
1257             ac_cv_path_install="$ac_dir/$ac_prog -c"
1258             break 2
1259           fi
1260         fi
1261       done
1262       ;;
1263     esac
1264   done
1265   IFS="$ac_save_IFS"
1266
1267 fi
1268   if test "${ac_cv_path_install+set}" = set; then
1269     INSTALL="$ac_cv_path_install"
1270   else
1271     # As a last resort, use the slow shell script.  We don't cache a
1272     # path for INSTALL within a source directory, because that will
1273     # break other packages using the cache if that directory is
1274     # removed, or if the path is relative.
1275     INSTALL="$ac_install_sh"
1276   fi
1277 fi
1278 echo "$ac_t""$INSTALL" 1>&6
1279
1280 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1281 # It thinks the first close brace ends the variable substitution.
1282 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1283
1284 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1285
1286 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1287
1288 # Extract the first word of "ranlib", so it can be a program name with args.
1289 set dummy ranlib; ac_word=$2
1290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1291 echo "configure:1292: checking for $ac_word" >&5
1292 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1293   echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295   if test -n "$RANLIB"; then
1296   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1297 else
1298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1299   ac_dummy="$PATH"
1300   for ac_dir in $ac_dummy; do
1301     test -z "$ac_dir" && ac_dir=.
1302     if test -f $ac_dir/$ac_word; then
1303       ac_cv_prog_RANLIB="ranlib"
1304       break
1305     fi
1306   done
1307   IFS="$ac_save_ifs"
1308   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1309 fi
1310 fi
1311 RANLIB="$ac_cv_prog_RANLIB"
1312 if test -n "$RANLIB"; then
1313   echo "$ac_t""$RANLIB" 1>&6
1314 else
1315   echo "$ac_t""no" 1>&6
1316 fi
1317
1318 yazconfig=NONE
1319 yazpath=NONE
1320 # Check whether --with-yazconfig or --without-yazconfig was given.
1321 if test "${with_yazconfig+set}" = set; then
1322   withval="$with_yazconfig"
1323   yazpath=$withval
1324 fi
1325
1326 if test "x$yazpath" != "xNONE"; then
1327         yazconfig=$yazpath/yaz-config
1328 else
1329         for i in ../yaz* ../yaz; do
1330                 if test -d $i; then
1331                         if test -r $i/yaz-config; then
1332                                 yazconfig=$i/yaz-config
1333                         fi
1334                 fi
1335         done
1336         if test "x$yazconfig" = "xNONE"; then
1337                 # Extract the first word of "yaz-config", so it can be a program name with args.
1338 set dummy yaz-config; ac_word=$2
1339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1340 echo "configure:1341: checking for $ac_word" >&5
1341 if eval "test \"`echo '$''{'ac_cv_path_yazconfig'+set}'`\" = set"; then
1342   echo $ac_n "(cached) $ac_c" 1>&6
1343 else
1344   case "$yazconfig" in
1345   /*)
1346   ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a path.
1347   ;;
1348   ?:/*)                  
1349   ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a dos path.
1350   ;;
1351   *)
1352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1353   ac_dummy="$PATH"
1354   for ac_dir in $ac_dummy; do 
1355     test -z "$ac_dir" && ac_dir=.
1356     if test -f $ac_dir/$ac_word; then
1357       ac_cv_path_yazconfig="$ac_dir/$ac_word"
1358       break
1359     fi
1360   done
1361   IFS="$ac_save_ifs"
1362   test -z "$ac_cv_path_yazconfig" && ac_cv_path_yazconfig="NONE"
1363   ;;
1364 esac
1365 fi
1366 yazconfig="$ac_cv_path_yazconfig"
1367 if test -n "$yazconfig"; then
1368   echo "$ac_t""$yazconfig" 1>&6
1369 else
1370   echo "$ac_t""no" 1>&6
1371 fi
1372
1373         fi
1374 fi
1375 echo $ac_n "checking for YAZ""... $ac_c" 1>&6
1376 echo "configure:1377: checking for YAZ" >&5
1377 if test -r $yazconfig; then
1378         . $yazconfig
1379         echo "$ac_t""$yazconfig" 1>&6
1380 else
1381         echo "$ac_t""Not found" 1>&6
1382 fi
1383 # Check whether --enable-threads or --disable-threads was given.
1384 if test "${enable_threads+set}" = set; then
1385   enableval="$enable_threads"
1386   enable_threads=$enableval
1387 else
1388   enable_threads=yes
1389 fi
1390
1391 if test "$enable_threads" = "yes"; then
1392         echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
1393 echo "configure:1394: checking for main in -lpthread" >&5
1394 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
1395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1396   echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398   ac_save_LIBS="$LIBS"
1399 LIBS="-lpthread  $LIBS"
1400 cat > conftest.$ac_ext <<EOF
1401 #line 1402 "configure"
1402 #include "confdefs.h"
1403
1404 int main() {
1405 main()
1406 ; return 0; }
1407 EOF
1408 if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1409   rm -rf conftest*
1410   eval "ac_cv_lib_$ac_lib_var=yes"
1411 else
1412   echo "configure: failed program was:" >&5
1413   cat conftest.$ac_ext >&5
1414   rm -rf conftest*
1415   eval "ac_cv_lib_$ac_lib_var=no"
1416 fi
1417 rm -f conftest*
1418 LIBS="$ac_save_LIBS"
1419
1420 fi
1421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1422   echo "$ac_t""yes" 1>&6
1423     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1424     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1425   cat >> confdefs.h <<EOF
1426 #define $ac_tr_lib 1
1427 EOF
1428
1429   LIBS="-lpthread $LIBS"
1430
1431 else
1432   echo "$ac_t""no" 1>&6
1433 fi
1434
1435         echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6
1436 echo "configure:1437: checking for working POSIX Threads" >&5
1437         cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440 #include <pthread.h>
1441         int func(void *p) { return 0; }
1442         
1443 int main() {
1444
1445         pthread_t pthread_id;
1446         int r = pthread_create (&pthread_id, 0, func, 0);
1447 ; return 0; }
1448 EOF
1449 if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1450   rm -rf conftest*
1451   thread_ok=yes
1452 else
1453   echo "configure: failed program was:" >&5
1454   cat conftest.$ac_ext >&5
1455   rm -rf conftest*
1456   thread_ok=no
1457 fi
1458 rm -f conftest*
1459         if test "$thread_ok" = "yes"; then
1460                 echo "$ac_t""yes" 1>&6
1461                 cat >> confdefs.h <<\EOF
1462 #define HAVE_PTHREAD_H 1
1463 EOF
1464
1465                 cat >> confdefs.h <<\EOF
1466 #define _REENTRANT 1
1467 EOF
1468
1469         else
1470                 echo "$ac_t""no" 1>&6
1471         fi
1472 fi
1473 TCL_LIB=""
1474 TCL_INCLUDE=""
1475 tclconfig=NONE
1476 # Check whether --with-tclconfig or --without-tclconfig was given.
1477 if test "${with_tclconfig+set}" = set; then
1478   withval="$with_tclconfig"
1479   tclconfig=$withval
1480 fi
1481
1482 if test "x$tclconfig" = xNONE; then
1483         saveprefix=${prefix}
1484         if test "x$prefix" = xNONE; then
1485 echo $ac_n "checking for prefix by $ac_c" 1>&6
1486 # Extract the first word of "tclsh", so it can be a program name with args.
1487 set dummy tclsh; ac_word=$2
1488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1489 echo "configure:1490: checking for $ac_word" >&5
1490 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
1491   echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493   case "$TCLSH" in
1494   /*)
1495   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
1496   ;;
1497   ?:/*)                  
1498   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
1499   ;;
1500   *)
1501   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1502   ac_dummy="$PATH"
1503   for ac_dir in $ac_dummy; do 
1504     test -z "$ac_dir" && ac_dir=.
1505     if test -f $ac_dir/$ac_word; then
1506       ac_cv_path_TCLSH="$ac_dir/$ac_word"
1507       break
1508     fi
1509   done
1510   IFS="$ac_save_ifs"
1511   ;;
1512 esac
1513 fi
1514 TCLSH="$ac_cv_path_TCLSH"
1515 if test -n "$TCLSH"; then
1516   echo "$ac_t""$TCLSH" 1>&6
1517 else
1518   echo "$ac_t""no" 1>&6
1519 fi
1520
1521   if test -n "$ac_cv_path_TCLSH"; then
1522     prefix=`echo $ac_cv_path_TCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1523   fi
1524 fi
1525
1526         tclconfig=${prefix}/lib
1527         prefix=${saveprefix}
1528 fi
1529 echo $ac_n "checking for Tcl""... $ac_c" 1>&6
1530 echo "configure:1531: checking for Tcl" >&5
1531 if test -r ${tclconfig}/tclConfig.sh; then
1532         . ${tclconfig}/tclConfig.sh
1533         if test -r ${tclconfig}/../generic/tcl.h; then
1534                 TCL_INCLUDE=-I${tclconfig}/../generic
1535                 TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
1536         else
1537                 TCL_INCLUDE=-I${TCL_PREFIX}/include
1538                 TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
1539         fi
1540         SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
1541         SHLIB_LD=$TCL_SHLIB_LD
1542         SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
1543         SHLIB_VERSION=$TCL_SHLIB_VERSION
1544         echo "$ac_t""$TCL_VERSION" 1>&6
1545         ODEFS="-DHAVE_TCL_H=1"
1546 else
1547         echo "$ac_t""Not found" 1>&6
1548         ODEFS="-DHAVE_TCL_H=0"
1549 fi
1550 for ac_hdr in sys/times.h
1551 do
1552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1554 echo "configure:1555: checking for $ac_hdr" >&5
1555 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1556   echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558   cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 #include <$ac_hdr>
1562 EOF
1563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1564 { (eval echo configure:1565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1566 if test -z "$ac_err"; then
1567   rm -rf conftest*
1568   eval "ac_cv_header_$ac_safe=yes"
1569 else
1570   echo "$ac_err" >&5
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   eval "ac_cv_header_$ac_safe=no"
1575 fi
1576 rm -f conftest*
1577 fi
1578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1579   echo "$ac_t""yes" 1>&6
1580     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1581   cat >> confdefs.h <<EOF
1582 #define $ac_tr_hdr 1
1583 EOF
1584  
1585 else
1586   echo "$ac_t""no" 1>&6
1587 fi
1588 done
1589
1590 echo $ac_n "checking for bzCompressInit in -lbz2""... $ac_c" 1>&6
1591 echo "configure:1592: checking for bzCompressInit in -lbz2" >&5
1592 ac_lib_var=`echo bz2'_'bzCompressInit | sed 'y%./+-%__p_%'`
1593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1594   echo $ac_n "(cached) $ac_c" 1>&6
1595 else
1596   ac_save_LIBS="$LIBS"
1597 LIBS="-lbz2  $LIBS"
1598 cat > conftest.$ac_ext <<EOF
1599 #line 1600 "configure"
1600 #include "confdefs.h"
1601 /* Override any gcc2 internal prototype to avoid an error.  */
1602 /* We use char because int might match the return type of a gcc2
1603     builtin and then its argument prototype would still apply.  */
1604 char bzCompressInit();
1605
1606 int main() {
1607 bzCompressInit()
1608 ; return 0; }
1609 EOF
1610 if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1611   rm -rf conftest*
1612   eval "ac_cv_lib_$ac_lib_var=yes"
1613 else
1614   echo "configure: failed program was:" >&5
1615   cat conftest.$ac_ext >&5
1616   rm -rf conftest*
1617   eval "ac_cv_lib_$ac_lib_var=no"
1618 fi
1619 rm -f conftest*
1620 LIBS="$ac_save_LIBS"
1621
1622 fi
1623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1624   echo "$ac_t""yes" 1>&6
1625     ac_tr_lib=HAVE_LIB`echo bz2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1627   cat >> confdefs.h <<EOF
1628 #define $ac_tr_lib 1
1629 EOF
1630
1631   LIBS="-lbz2 $LIBS"
1632
1633 else
1634   echo "$ac_t""no" 1>&6
1635 fi
1636
1637 if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
1638         for ac_hdr in bzlib.h
1639 do
1640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1642 echo "configure:1643: checking for $ac_hdr" >&5
1643 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1644   echo $ac_n "(cached) $ac_c" 1>&6
1645 else
1646   cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649 #include <$ac_hdr>
1650 EOF
1651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1652 { (eval echo configure:1653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1654 if test -z "$ac_err"; then
1655   rm -rf conftest*
1656   eval "ac_cv_header_$ac_safe=yes"
1657 else
1658   echo "$ac_err" >&5
1659   echo "configure: failed program was:" >&5
1660   cat conftest.$ac_ext >&5
1661   rm -rf conftest*
1662   eval "ac_cv_header_$ac_safe=no"
1663 fi
1664 rm -f conftest*
1665 fi
1666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1667   echo "$ac_t""yes" 1>&6
1668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1669   cat >> confdefs.h <<EOF
1670 #define $ac_tr_hdr 1
1671 EOF
1672  
1673 else
1674   echo "$ac_t""no" 1>&6
1675 fi
1676 done
1677
1678 fi
1679 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1680 echo "configure:1681: checking for ANSI C header files" >&5
1681 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   cat > conftest.$ac_ext <<EOF
1685 #line 1686 "configure"
1686 #include "confdefs.h"
1687 #include <stdlib.h>
1688 #include <stdarg.h>
1689 #include <string.h>
1690 #include <float.h>
1691 EOF
1692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1693 { (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1695 if test -z "$ac_err"; then
1696   rm -rf conftest*
1697   ac_cv_header_stdc=yes
1698 else
1699   echo "$ac_err" >&5
1700   echo "configure: failed program was:" >&5
1701   cat conftest.$ac_ext >&5
1702   rm -rf conftest*
1703   ac_cv_header_stdc=no
1704 fi
1705 rm -f conftest*
1706
1707 if test $ac_cv_header_stdc = yes; then
1708   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1709 cat > conftest.$ac_ext <<EOF
1710 #line 1711 "configure"
1711 #include "confdefs.h"
1712 #include <string.h>
1713 EOF
1714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1715   egrep "memchr" >/dev/null 2>&1; then
1716   :
1717 else
1718   rm -rf conftest*
1719   ac_cv_header_stdc=no
1720 fi
1721 rm -f conftest*
1722
1723 fi
1724
1725 if test $ac_cv_header_stdc = yes; then
1726   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 #include <stdlib.h>
1731 EOF
1732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1733   egrep "free" >/dev/null 2>&1; then
1734   :
1735 else
1736   rm -rf conftest*
1737   ac_cv_header_stdc=no
1738 fi
1739 rm -f conftest*
1740
1741 fi
1742
1743 if test $ac_cv_header_stdc = yes; then
1744   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1745 if test "$cross_compiling" = yes; then
1746   :
1747 else
1748   cat > conftest.$ac_ext <<EOF
1749 #line 1750 "configure"
1750 #include "confdefs.h"
1751 #include <ctype.h>
1752 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1753 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1754 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1755 int main () { int i; for (i = 0; i < 256; i++)
1756 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1757 exit (0); }
1758
1759 EOF
1760 if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1761 then
1762   :
1763 else
1764   echo "configure: failed program was:" >&5
1765   cat conftest.$ac_ext >&5
1766   rm -fr conftest*
1767   ac_cv_header_stdc=no
1768 fi
1769 rm -fr conftest*
1770 fi
1771
1772 fi
1773 fi
1774
1775 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1776 if test $ac_cv_header_stdc = yes; then
1777   cat >> confdefs.h <<\EOF
1778 #define STDC_HEADERS 1
1779 EOF
1780
1781 fi
1782
1783 if test "$ac_cv_header_stdc" = "no"; then
1784         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
1785 fi
1786 trap '' 1 2 15
1787 cat > confcache <<\EOF
1788 # This file is a shell script that caches the results of configure
1789 # tests run on this system so they can be shared between configure
1790 # scripts and configure runs.  It is not useful on other systems.
1791 # If it contains results you don't want to keep, you may remove or edit it.
1792 #
1793 # By default, configure uses ./config.cache as the cache file,
1794 # creating it if it does not exist already.  You can give configure
1795 # the --cache-file=FILE option to use a different cache file; that is
1796 # what configure does when it calls configure scripts in
1797 # subdirectories, so they share the cache.
1798 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1799 # config.status only pays attention to the cache file if you give it the
1800 # --recheck option to rerun configure.
1801 #
1802 EOF
1803 # The following way of writing the cache mishandles newlines in values,
1804 # but we know of no workaround that is simple, portable, and efficient.
1805 # So, don't put newlines in cache variables' values.
1806 # Ultrix sh set writes to stderr and can't be redirected directly,
1807 # and sets the high bit in the cache file unless we assign to the vars.
1808 (set) 2>&1 |
1809   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1810   *ac_space=\ *)
1811     # `set' does not quote correctly, so add quotes (double-quote substitution
1812     # turns \\\\ into \\, and sed turns \\ into \).
1813     sed -n \
1814       -e "s/'/'\\\\''/g" \
1815       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1816     ;;
1817   *)
1818     # `set' quotes correctly as required by POSIX, so do not add quotes.
1819     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1820     ;;
1821   esac >> confcache
1822 if cmp -s $cache_file confcache; then
1823   :
1824 else
1825   if test -w $cache_file; then
1826     echo "updating cache $cache_file"
1827     cat confcache > $cache_file
1828   else
1829     echo "not updating unwritable cache $cache_file"
1830   fi
1831 fi
1832 rm -f confcache
1833
1834 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1835
1836 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1837 # Let make expand exec_prefix.
1838 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1839
1840 # Any assignment to VPATH causes Sun make to only execute
1841 # the first set of double-colon rules, so remove it if not needed.
1842 # If there is a colon in the path, we need to keep it.
1843 if test "x$srcdir" = x.; then
1844   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1845 fi
1846
1847 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1848
1849 # Transform confdefs.h into DEFS.
1850 # Protect against shell expansion while executing Makefile rules.
1851 # Protect against Makefile macro expansion.
1852 cat > conftest.defs <<\EOF
1853 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1854 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1855 s%\[%\\&%g
1856 s%\]%\\&%g
1857 s%\$%$$%g
1858 EOF
1859 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1860 rm -f conftest.defs
1861
1862
1863 # Without the "./", some shells look in PATH for config.status.
1864 : ${CONFIG_STATUS=./config.status}
1865
1866 echo creating $CONFIG_STATUS
1867 rm -f $CONFIG_STATUS
1868 cat > $CONFIG_STATUS <<EOF
1869 #! /bin/sh
1870 # Generated automatically by configure.
1871 # Run this file to recreate the current configuration.
1872 # This directory was configured as follows,
1873 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1874 #
1875 # $0 $ac_configure_args
1876 #
1877 # Compiler output produced by configure, useful for debugging
1878 # configure, is in ./config.log if it exists.
1879
1880 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1881 for ac_option
1882 do
1883   case "\$ac_option" in
1884   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1885     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1886     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1887   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1888     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1889     exit 0 ;;
1890   -help | --help | --hel | --he | --h)
1891     echo "\$ac_cs_usage"; exit 0 ;;
1892   *) echo "\$ac_cs_usage"; exit 1 ;;
1893   esac
1894 done
1895
1896 ac_given_srcdir=$srcdir
1897 ac_given_INSTALL="$INSTALL"
1898
1899 trap 'rm -fr `echo "
1900   Makefile
1901   util/Makefile
1902   bfile/Makefile
1903   dfa/Makefile
1904   dict/Makefile
1905   isams/Makefile
1906   isamc/Makefile
1907   isam/Makefile
1908   rset/Makefile
1909   recctrl/Makefile
1910   index/Makefile
1911   include/Makefile
1912   tab/Makefile
1913   test/Makefile test/gils/Makefile test/usmarc/Makefile
1914 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1915 EOF
1916 cat >> $CONFIG_STATUS <<EOF
1917
1918 # Protect against being on the right side of a sed subst in config.status.
1919 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1920  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1921 $ac_vpsub
1922 $extrasub
1923 s%@SHELL@%$SHELL%g
1924 s%@CFLAGS@%$CFLAGS%g
1925 s%@CPPFLAGS@%$CPPFLAGS%g
1926 s%@CXXFLAGS@%$CXXFLAGS%g
1927 s%@FFLAGS@%$FFLAGS%g
1928 s%@DEFS@%$DEFS%g
1929 s%@LDFLAGS@%$LDFLAGS%g
1930 s%@LIBS@%$LIBS%g
1931 s%@exec_prefix@%$exec_prefix%g
1932 s%@prefix@%$prefix%g
1933 s%@program_transform_name@%$program_transform_name%g
1934 s%@bindir@%$bindir%g
1935 s%@sbindir@%$sbindir%g
1936 s%@libexecdir@%$libexecdir%g
1937 s%@datadir@%$datadir%g
1938 s%@sysconfdir@%$sysconfdir%g
1939 s%@sharedstatedir@%$sharedstatedir%g
1940 s%@localstatedir@%$localstatedir%g
1941 s%@libdir@%$libdir%g
1942 s%@includedir@%$includedir%g
1943 s%@oldincludedir@%$oldincludedir%g
1944 s%@infodir@%$infodir%g
1945 s%@mandir@%$mandir%g
1946 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1947 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1948 s%@INSTALL_DATA@%$INSTALL_DATA%g
1949 s%@PACKAGE@%$PACKAGE%g
1950 s%@VERSION@%$VERSION%g
1951 s%@ACLOCAL@%$ACLOCAL%g
1952 s%@AUTOCONF@%$AUTOCONF%g
1953 s%@AUTOMAKE@%$AUTOMAKE%g
1954 s%@AUTOHEADER@%$AUTOHEADER%g
1955 s%@MAKEINFO@%$MAKEINFO%g
1956 s%@SET_MAKE@%$SET_MAKE%g
1957 s%@ISZMBOL_TRUE@%$ISZMBOL_TRUE%g
1958 s%@ISZMBOL_FALSE@%$ISZMBOL_FALSE%g
1959 s%@SUBLIBS@%$SUBLIBS%g
1960 s%@ODEFS@%$ODEFS%g
1961 s%@TCL_INCLUDE@%$TCL_INCLUDE%g
1962 s%@TCL_LIB@%$TCL_LIB%g
1963 s%@YAZLIB@%$YAZLIB%g
1964 s%@YAZINC@%$YAZINC%g
1965 s%@PROGPREFIX@%$PROGPREFIX%g
1966 s%@CC@%$CC%g
1967 s%@CPP@%$CPP%g
1968 s%@RANLIB@%$RANLIB%g
1969 s%@yazconfig@%$yazconfig%g
1970 s%@TCLSH@%$TCLSH%g
1971
1972 CEOF
1973 EOF
1974
1975 cat >> $CONFIG_STATUS <<\EOF
1976
1977 # Split the substitutions into bite-sized pieces for seds with
1978 # small command number limits, like on Digital OSF/1 and HP-UX.
1979 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1980 ac_file=1 # Number of current file.
1981 ac_beg=1 # First line for current file.
1982 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1983 ac_more_lines=:
1984 ac_sed_cmds=""
1985 while $ac_more_lines; do
1986   if test $ac_beg -gt 1; then
1987     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1988   else
1989     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1990   fi
1991   if test ! -s conftest.s$ac_file; then
1992     ac_more_lines=false
1993     rm -f conftest.s$ac_file
1994   else
1995     if test -z "$ac_sed_cmds"; then
1996       ac_sed_cmds="sed -f conftest.s$ac_file"
1997     else
1998       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1999     fi
2000     ac_file=`expr $ac_file + 1`
2001     ac_beg=$ac_end
2002     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2003   fi
2004 done
2005 if test -z "$ac_sed_cmds"; then
2006   ac_sed_cmds=cat
2007 fi
2008 EOF
2009
2010 cat >> $CONFIG_STATUS <<EOF
2011
2012 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2013   util/Makefile
2014   bfile/Makefile
2015   dfa/Makefile
2016   dict/Makefile
2017   isams/Makefile
2018   isamc/Makefile
2019   isam/Makefile
2020   rset/Makefile
2021   recctrl/Makefile
2022   index/Makefile
2023   include/Makefile
2024   tab/Makefile
2025   test/Makefile test/gils/Makefile test/usmarc/Makefile
2026 "}
2027 EOF
2028 cat >> $CONFIG_STATUS <<\EOF
2029 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2030   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2031   case "$ac_file" in
2032   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2033        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2034   *) ac_file_in="${ac_file}.in" ;;
2035   esac
2036
2037   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2038
2039   # Remove last slash and all that follows it.  Not all systems have dirname.
2040   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2041   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2042     # The file is in a subdirectory.
2043     test ! -d "$ac_dir" && mkdir "$ac_dir"
2044     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2045     # A "../" for each directory in $ac_dir_suffix.
2046     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2047   else
2048     ac_dir_suffix= ac_dots=
2049   fi
2050
2051   case "$ac_given_srcdir" in
2052   .)  srcdir=.
2053       if test -z "$ac_dots"; then top_srcdir=.
2054       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2055   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2056   *) # Relative path.
2057     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2058     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2059   esac
2060
2061   case "$ac_given_INSTALL" in
2062   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2063   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2064   esac
2065
2066   echo creating "$ac_file"
2067   rm -f "$ac_file"
2068   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2069   case "$ac_file" in
2070   *Makefile*) ac_comsub="1i\\
2071 # $configure_input" ;;
2072   *) ac_comsub= ;;
2073   esac
2074
2075   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2076   sed -e "$ac_comsub
2077 s%@configure_input@%$configure_input%g
2078 s%@srcdir@%$srcdir%g
2079 s%@top_srcdir@%$top_srcdir%g
2080 s%@INSTALL@%$INSTALL%g
2081 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2082 fi; done
2083 rm -f conftest.s*
2084
2085 EOF
2086 cat >> $CONFIG_STATUS <<EOF
2087
2088 EOF
2089 cat >> $CONFIG_STATUS <<\EOF
2090
2091 exit 0
2092 EOF
2093 chmod +x $CONFIG_STATUS
2094 rm -fr confdefs* $ac_clean_files
2095 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2096