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