Updated makefiles (again).
[yaz-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   --disable-yc            use old encoders, i.e. disable YAZ ASN.1 Compiler"
16 ac_help="$ac_help
17   --enable-tcpd           enable TCP wrapper for server if available"
18 ac_help="$ac_help
19   --enable-threads        enable threads if available"
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/yaz/yaz-version.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 ac_aux_dir=
531 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
532   if test -f $ac_dir/install-sh; then
533     ac_aux_dir=$ac_dir
534     ac_install_sh="$ac_aux_dir/install-sh -c"
535     break
536   elif test -f $ac_dir/install.sh; then
537     ac_aux_dir=$ac_dir
538     ac_install_sh="$ac_aux_dir/install.sh -c"
539     break
540   fi
541 done
542 if test -z "$ac_aux_dir"; then
543   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
544 fi
545 ac_config_guess=$ac_aux_dir/config.guess
546 ac_config_sub=$ac_aux_dir/config.sub
547 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
548
549 # Find a good install program.  We prefer a C program (faster),
550 # so one script is as good as another.  But avoid the broken or
551 # incompatible versions:
552 # SysV /etc/install, /usr/sbin/install
553 # SunOS /usr/etc/install
554 # IRIX /sbin/install
555 # AIX /bin/install
556 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
557 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
558 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
559 # ./install, which can be erroneously created by make from ./install.sh.
560 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
561 echo "configure:562: checking for a BSD compatible install" >&5
562 if test -z "$INSTALL"; then
563 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
564   echo $ac_n "(cached) $ac_c" 1>&6
565 else
566     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
567   for ac_dir in $PATH; do
568     # Account for people who put trailing slashes in PATH elements.
569     case "$ac_dir/" in
570     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
571     *)
572       # OSF1 and SCO ODT 3.0 have their own names for install.
573       # Don't use installbsd from OSF since it installs stuff as root
574       # by default.
575       for ac_prog in ginstall scoinst install; do
576         if test -f $ac_dir/$ac_prog; then
577           if test $ac_prog = install &&
578             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
579             # AIX install.  It has an incompatible calling convention.
580             :
581           else
582             ac_cv_path_install="$ac_dir/$ac_prog -c"
583             break 2
584           fi
585         fi
586       done
587       ;;
588     esac
589   done
590   IFS="$ac_save_IFS"
591
592 fi
593   if test "${ac_cv_path_install+set}" = set; then
594     INSTALL="$ac_cv_path_install"
595   else
596     # As a last resort, use the slow shell script.  We don't cache a
597     # path for INSTALL within a source directory, because that will
598     # break other packages using the cache if that directory is
599     # removed, or if the path is relative.
600     INSTALL="$ac_install_sh"
601   fi
602 fi
603 echo "$ac_t""$INSTALL" 1>&6
604
605 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
606 # It thinks the first close brace ends the variable substitution.
607 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
608
609 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
610
611 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
612
613 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
614 echo "configure:615: checking whether build environment is sane" >&5
615 # Just in case
616 sleep 1
617 echo timestamp > conftestfile
618 # Do `set' in a subshell so we don't clobber the current shell's
619 # arguments.  Must try -L first in case configure is actually a
620 # symlink; some systems play weird games with the mod time of symlinks
621 # (eg FreeBSD returns the mod time of the symlink's containing
622 # directory).
623 if (
624    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
625    if test "$*" = "X"; then
626       # -L didn't work.
627       set X `ls -t $srcdir/configure conftestfile`
628    fi
629    if test "$*" != "X $srcdir/configure conftestfile" \
630       && test "$*" != "X conftestfile $srcdir/configure"; then
631
632       # If neither matched, then we have a broken ls.  This can happen
633       # if, for instance, CONFIG_SHELL is bash and it inherits a
634       # broken ls alias from the environment.  This has actually
635       # happened.  Such a system could not be considered "sane".
636       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
637 alias in your environment" 1>&2; exit 1; }
638    fi
639
640    test "$2" = conftestfile
641    )
642 then
643    # Ok.
644    :
645 else
646    { echo "configure: error: newly created file is older than distributed files!
647 Check your system clock" 1>&2; exit 1; }
648 fi
649 rm -f conftest*
650 echo "$ac_t""yes" 1>&6
651 if test "$program_transform_name" = s,x,x,; then
652   program_transform_name=
653 else
654   # Double any \ or $.  echo might interpret backslashes.
655   cat <<\EOF_SED > conftestsed
656 s,\\,\\\\,g; s,\$,$$,g
657 EOF_SED
658   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
659   rm -f conftestsed
660 fi
661 test "$program_prefix" != NONE &&
662   program_transform_name="s,^,${program_prefix},; $program_transform_name"
663 # Use a double $ so make ignores it.
664 test "$program_suffix" != NONE &&
665   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
666
667 # sed with no file args requires a program.
668 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
669
670 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
671 echo "configure:672: checking whether ${MAKE-make} sets \${MAKE}" >&5
672 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
673 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
674   echo $ac_n "(cached) $ac_c" 1>&6
675 else
676   cat > conftestmake <<\EOF
677 all:
678         @echo 'ac_maketemp="${MAKE}"'
679 EOF
680 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
681 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
682 if test -n "$ac_maketemp"; then
683   eval ac_cv_prog_make_${ac_make}_set=yes
684 else
685   eval ac_cv_prog_make_${ac_make}_set=no
686 fi
687 rm -f conftestmake
688 fi
689 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
690   echo "$ac_t""yes" 1>&6
691   SET_MAKE=
692 else
693   echo "$ac_t""no" 1>&6
694   SET_MAKE="MAKE=${MAKE-make}"
695 fi
696
697
698 PACKAGE=yaz
699
700 VERSION=1.6
701
702 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
703   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
704 fi
705 cat >> confdefs.h <<EOF
706 #define PACKAGE "$PACKAGE"
707 EOF
708
709 cat >> confdefs.h <<EOF
710 #define VERSION "$VERSION"
711 EOF
712
713
714
715 missing_dir=`cd $ac_aux_dir && pwd`
716 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
717 echo "configure:718: checking for working aclocal" >&5
718 # Run test in a subshell; some versions of sh will print an error if
719 # an executable is not found, even if stderr is redirected.
720 # Redirect stdin to placate older versions of autoconf.  Sigh.
721 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
722    ACLOCAL=aclocal
723    echo "$ac_t""found" 1>&6
724 else
725    ACLOCAL="$missing_dir/missing aclocal"
726    echo "$ac_t""missing" 1>&6
727 fi
728
729 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
730 echo "configure:731: checking for working autoconf" >&5
731 # Run test in a subshell; some versions of sh will print an error if
732 # an executable is not found, even if stderr is redirected.
733 # Redirect stdin to placate older versions of autoconf.  Sigh.
734 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
735    AUTOCONF=autoconf
736    echo "$ac_t""found" 1>&6
737 else
738    AUTOCONF="$missing_dir/missing autoconf"
739    echo "$ac_t""missing" 1>&6
740 fi
741
742 echo $ac_n "checking for working automake""... $ac_c" 1>&6
743 echo "configure:744: checking for working automake" >&5
744 # Run test in a subshell; some versions of sh will print an error if
745 # an executable is not found, even if stderr is redirected.
746 # Redirect stdin to placate older versions of autoconf.  Sigh.
747 if (automake --version) < /dev/null > /dev/null 2>&1; then
748    AUTOMAKE=automake
749    echo "$ac_t""found" 1>&6
750 else
751    AUTOMAKE="$missing_dir/missing automake"
752    echo "$ac_t""missing" 1>&6
753 fi
754
755 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
756 echo "configure:757: checking for working autoheader" >&5
757 # Run test in a subshell; some versions of sh will print an error if
758 # an executable is not found, even if stderr is redirected.
759 # Redirect stdin to placate older versions of autoconf.  Sigh.
760 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
761    AUTOHEADER=autoheader
762    echo "$ac_t""found" 1>&6
763 else
764    AUTOHEADER="$missing_dir/missing autoheader"
765    echo "$ac_t""missing" 1>&6
766 fi
767
768 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
769 echo "configure:770: checking for working makeinfo" >&5
770 # Run test in a subshell; some versions of sh will print an error if
771 # an executable is not found, even if stderr is redirected.
772 # Redirect stdin to placate older versions of autoconf.  Sigh.
773 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
774    MAKEINFO=makeinfo
775    echo "$ac_t""found" 1>&6
776 else
777    MAKEINFO="$missing_dir/missing makeinfo"
778    echo "$ac_t""missing" 1>&6
779 fi
780
781
782 # Extract the first word of "gcc", so it can be a program name with args.
783 set dummy gcc; ac_word=$2
784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
785 echo "configure:786: checking for $ac_word" >&5
786 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
787   echo $ac_n "(cached) $ac_c" 1>&6
788 else
789   if test -n "$CC"; then
790   ac_cv_prog_CC="$CC" # Let the user override the test.
791 else
792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
793   ac_dummy="$PATH"
794   for ac_dir in $ac_dummy; do
795     test -z "$ac_dir" && ac_dir=.
796     if test -f $ac_dir/$ac_word; then
797       ac_cv_prog_CC="gcc"
798       break
799     fi
800   done
801   IFS="$ac_save_ifs"
802 fi
803 fi
804 CC="$ac_cv_prog_CC"
805 if test -n "$CC"; then
806   echo "$ac_t""$CC" 1>&6
807 else
808   echo "$ac_t""no" 1>&6
809 fi
810
811 if test -z "$CC"; then
812   # Extract the first word of "cc", so it can be a program name with args.
813 set dummy cc; ac_word=$2
814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
815 echo "configure:816: checking for $ac_word" >&5
816 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
817   echo $ac_n "(cached) $ac_c" 1>&6
818 else
819   if test -n "$CC"; then
820   ac_cv_prog_CC="$CC" # Let the user override the test.
821 else
822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
823   ac_prog_rejected=no
824   ac_dummy="$PATH"
825   for ac_dir in $ac_dummy; do
826     test -z "$ac_dir" && ac_dir=.
827     if test -f $ac_dir/$ac_word; then
828       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
829         ac_prog_rejected=yes
830         continue
831       fi
832       ac_cv_prog_CC="cc"
833       break
834     fi
835   done
836   IFS="$ac_save_ifs"
837 if test $ac_prog_rejected = yes; then
838   # We found a bogon in the path, so make sure we never use it.
839   set dummy $ac_cv_prog_CC
840   shift
841   if test $# -gt 0; then
842     # We chose a different compiler from the bogus one.
843     # However, it has the same basename, so the bogon will be chosen
844     # first if we set CC to just the basename; use the full file name.
845     shift
846     set dummy "$ac_dir/$ac_word" "$@"
847     shift
848     ac_cv_prog_CC="$@"
849   fi
850 fi
851 fi
852 fi
853 CC="$ac_cv_prog_CC"
854 if test -n "$CC"; then
855   echo "$ac_t""$CC" 1>&6
856 else
857   echo "$ac_t""no" 1>&6
858 fi
859
860   if test -z "$CC"; then
861     case "`uname -s`" in
862     *win32* | *WIN32*)
863       # Extract the first word of "cl", so it can be a program name with args.
864 set dummy cl; ac_word=$2
865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
866 echo "configure:867: checking for $ac_word" >&5
867 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
868   echo $ac_n "(cached) $ac_c" 1>&6
869 else
870   if test -n "$CC"; then
871   ac_cv_prog_CC="$CC" # Let the user override the test.
872 else
873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
874   ac_dummy="$PATH"
875   for ac_dir in $ac_dummy; do
876     test -z "$ac_dir" && ac_dir=.
877     if test -f $ac_dir/$ac_word; then
878       ac_cv_prog_CC="cl"
879       break
880     fi
881   done
882   IFS="$ac_save_ifs"
883 fi
884 fi
885 CC="$ac_cv_prog_CC"
886 if test -n "$CC"; then
887   echo "$ac_t""$CC" 1>&6
888 else
889   echo "$ac_t""no" 1>&6
890 fi
891  ;;
892     esac
893   fi
894   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
895 fi
896
897 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
898 echo "configure:899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
899
900 ac_ext=c
901 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
902 ac_cpp='$CPP $CPPFLAGS'
903 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
904 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
905 cross_compiling=$ac_cv_prog_cc_cross
906
907 cat > conftest.$ac_ext << EOF
908
909 #line 910 "configure"
910 #include "confdefs.h"
911
912 main(){return(0);}
913 EOF
914 if { (eval echo configure:915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
915   ac_cv_prog_cc_works=yes
916   # If we can't run a trivial program, we are probably using a cross compiler.
917   if (./conftest; exit) 2>/dev/null; then
918     ac_cv_prog_cc_cross=no
919   else
920     ac_cv_prog_cc_cross=yes
921   fi
922 else
923   echo "configure: failed program was:" >&5
924   cat conftest.$ac_ext >&5
925   ac_cv_prog_cc_works=no
926 fi
927 rm -fr conftest*
928 ac_ext=c
929 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
930 ac_cpp='$CPP $CPPFLAGS'
931 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
932 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
933 cross_compiling=$ac_cv_prog_cc_cross
934
935 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
936 if test $ac_cv_prog_cc_works = no; then
937   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
938 fi
939 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
940 echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
941 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
942 cross_compiling=$ac_cv_prog_cc_cross
943
944 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
945 echo "configure:946: checking whether we are using GNU C" >&5
946 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
947   echo $ac_n "(cached) $ac_c" 1>&6
948 else
949   cat > conftest.c <<EOF
950 #ifdef __GNUC__
951   yes;
952 #endif
953 EOF
954 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
955   ac_cv_prog_gcc=yes
956 else
957   ac_cv_prog_gcc=no
958 fi
959 fi
960
961 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
962
963 if test $ac_cv_prog_gcc = yes; then
964   GCC=yes
965 else
966   GCC=
967 fi
968
969 ac_test_CFLAGS="${CFLAGS+set}"
970 ac_save_CFLAGS="$CFLAGS"
971 CFLAGS=
972 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
973 echo "configure:974: checking whether ${CC-cc} accepts -g" >&5
974 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   echo 'void f(){}' > conftest.c
978 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
979   ac_cv_prog_cc_g=yes
980 else
981   ac_cv_prog_cc_g=no
982 fi
983 rm -f conftest*
984
985 fi
986
987 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
988 if test "$ac_test_CFLAGS" = set; then
989   CFLAGS="$ac_save_CFLAGS"
990 elif test $ac_cv_prog_cc_g = yes; then
991   if test "$GCC" = yes; then
992     CFLAGS="-g -O2"
993   else
994     CFLAGS="-g"
995   fi
996 else
997   if test "$GCC" = yes; then
998     CFLAGS="-O2"
999   else
1000     CFLAGS=
1001   fi
1002 fi
1003
1004 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1005 echo "configure:1006: checking how to run the C preprocessor" >&5
1006 # On Suns, sometimes $CPP names a directory.
1007 if test -n "$CPP" && test -d "$CPP"; then
1008   CPP=
1009 fi
1010 if test -z "$CPP"; then
1011 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1012   echo $ac_n "(cached) $ac_c" 1>&6
1013 else
1014     # This must be in double quotes, not single quotes, because CPP may get
1015   # substituted into the Makefile and "${CC-cc}" will confuse make.
1016   CPP="${CC-cc} -E"
1017   # On the NeXT, cc -E runs the code through the compiler's parser,
1018   # not just through cpp.
1019   cat > conftest.$ac_ext <<EOF
1020 #line 1021 "configure"
1021 #include "confdefs.h"
1022 #include <assert.h>
1023 Syntax Error
1024 EOF
1025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1026 { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1028 if test -z "$ac_err"; then
1029   :
1030 else
1031   echo "$ac_err" >&5
1032   echo "configure: failed program was:" >&5
1033   cat conftest.$ac_ext >&5
1034   rm -rf conftest*
1035   CPP="${CC-cc} -E -traditional-cpp"
1036   cat > conftest.$ac_ext <<EOF
1037 #line 1038 "configure"
1038 #include "confdefs.h"
1039 #include <assert.h>
1040 Syntax Error
1041 EOF
1042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1043 { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1045 if test -z "$ac_err"; then
1046   :
1047 else
1048   echo "$ac_err" >&5
1049   echo "configure: failed program was:" >&5
1050   cat conftest.$ac_ext >&5
1051   rm -rf conftest*
1052   CPP="${CC-cc} -nologo -E"
1053   cat > conftest.$ac_ext <<EOF
1054 #line 1055 "configure"
1055 #include "confdefs.h"
1056 #include <assert.h>
1057 Syntax Error
1058 EOF
1059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1060 { (eval echo configure:1061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1062 if test -z "$ac_err"; then
1063   :
1064 else
1065   echo "$ac_err" >&5
1066   echo "configure: failed program was:" >&5
1067   cat conftest.$ac_ext >&5
1068   rm -rf conftest*
1069   CPP=/lib/cpp
1070 fi
1071 rm -f conftest*
1072 fi
1073 rm -f conftest*
1074 fi
1075 rm -f conftest*
1076   ac_cv_prog_CPP="$CPP"
1077 fi
1078   CPP="$ac_cv_prog_CPP"
1079 else
1080   ac_cv_prog_CPP="$CPP"
1081 fi
1082 echo "$ac_t""$CPP" 1>&6
1083
1084 # Find a good install program.  We prefer a C program (faster),
1085 # so one script is as good as another.  But avoid the broken or
1086 # incompatible versions:
1087 # SysV /etc/install, /usr/sbin/install
1088 # SunOS /usr/etc/install
1089 # IRIX /sbin/install
1090 # AIX /bin/install
1091 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1092 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1093 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1094 # ./install, which can be erroneously created by make from ./install.sh.
1095 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1096 echo "configure:1097: checking for a BSD compatible install" >&5
1097 if test -z "$INSTALL"; then
1098 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1102   for ac_dir in $PATH; do
1103     # Account for people who put trailing slashes in PATH elements.
1104     case "$ac_dir/" in
1105     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1106     *)
1107       # OSF1 and SCO ODT 3.0 have their own names for install.
1108       # Don't use installbsd from OSF since it installs stuff as root
1109       # by default.
1110       for ac_prog in ginstall scoinst install; do
1111         if test -f $ac_dir/$ac_prog; then
1112           if test $ac_prog = install &&
1113             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1114             # AIX install.  It has an incompatible calling convention.
1115             :
1116           else
1117             ac_cv_path_install="$ac_dir/$ac_prog -c"
1118             break 2
1119           fi
1120         fi
1121       done
1122       ;;
1123     esac
1124   done
1125   IFS="$ac_save_IFS"
1126
1127 fi
1128   if test "${ac_cv_path_install+set}" = set; then
1129     INSTALL="$ac_cv_path_install"
1130   else
1131     # As a last resort, use the slow shell script.  We don't cache a
1132     # path for INSTALL within a source directory, because that will
1133     # break other packages using the cache if that directory is
1134     # removed, or if the path is relative.
1135     INSTALL="$ac_install_sh"
1136   fi
1137 fi
1138 echo "$ac_t""$INSTALL" 1>&6
1139
1140 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1141 # It thinks the first close brace ends the variable substitution.
1142 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1143
1144 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1145
1146 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1147
1148 # Extract the first word of "ranlib", so it can be a program name with args.
1149 set dummy ranlib; ac_word=$2
1150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1151 echo "configure:1152: checking for $ac_word" >&5
1152 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1153   echo $ac_n "(cached) $ac_c" 1>&6
1154 else
1155   if test -n "$RANLIB"; then
1156   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1157 else
1158   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1159   ac_dummy="$PATH"
1160   for ac_dir in $ac_dummy; do
1161     test -z "$ac_dir" && ac_dir=.
1162     if test -f $ac_dir/$ac_word; then
1163       ac_cv_prog_RANLIB="ranlib"
1164       break
1165     fi
1166   done
1167   IFS="$ac_save_ifs"
1168   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1169 fi
1170 fi
1171 RANLIB="$ac_cv_prog_RANLIB"
1172 if test -n "$RANLIB"; then
1173   echo "$ac_t""$RANLIB" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 for ac_prog in sgml2txt
1179 do
1180 # Extract the first word of "$ac_prog", so it can be a program name with args.
1181 set dummy $ac_prog; ac_word=$2
1182 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1183 echo "configure:1184: checking for $ac_word" >&5
1184 if eval "test \"`echo '$''{'ac_cv_prog_have_sgml2txt'+set}'`\" = set"; then
1185   echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187   if test -n "$have_sgml2txt"; then
1188   ac_cv_prog_have_sgml2txt="$have_sgml2txt" # Let the user override the test.
1189 else
1190   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1191   ac_dummy="$PATH"
1192   for ac_dir in $ac_dummy; do
1193     test -z "$ac_dir" && ac_dir=.
1194     if test -f $ac_dir/$ac_word; then
1195       ac_cv_prog_have_sgml2txt="$ac_prog"
1196       break
1197     fi
1198   done
1199   IFS="$ac_save_ifs"
1200 fi
1201 fi
1202 have_sgml2txt="$ac_cv_prog_have_sgml2txt"
1203 if test -n "$have_sgml2txt"; then
1204   echo "$ac_t""$have_sgml2txt" 1>&6
1205 else
1206   echo "$ac_t""no" 1>&6
1207 fi
1208
1209 test -n "$have_sgml2txt" && break
1210 done
1211
1212 for ac_prog in sgml2latex
1213 do
1214 # Extract the first word of "$ac_prog", so it can be a program name with args.
1215 set dummy $ac_prog; ac_word=$2
1216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1217 echo "configure:1218: checking for $ac_word" >&5
1218 if eval "test \"`echo '$''{'ac_cv_prog_have_sgml2latex'+set}'`\" = set"; then
1219   echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221   if test -n "$have_sgml2latex"; then
1222   ac_cv_prog_have_sgml2latex="$have_sgml2latex" # Let the user override the test.
1223 else
1224   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1225   ac_dummy="$PATH"
1226   for ac_dir in $ac_dummy; do
1227     test -z "$ac_dir" && ac_dir=.
1228     if test -f $ac_dir/$ac_word; then
1229       ac_cv_prog_have_sgml2latex="$ac_prog"
1230       break
1231     fi
1232   done
1233   IFS="$ac_save_ifs"
1234 fi
1235 fi
1236 have_sgml2latex="$ac_cv_prog_have_sgml2latex"
1237 if test -n "$have_sgml2latex"; then
1238   echo "$ac_t""$have_sgml2latex" 1>&6
1239 else
1240   echo "$ac_t""no" 1>&6
1241 fi
1242
1243 test -n "$have_sgml2latex" && break
1244 done
1245
1246 for ac_prog in sgml2html
1247 do
1248 # Extract the first word of "$ac_prog", so it can be a program name with args.
1249 set dummy $ac_prog; ac_word=$2
1250 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1251 echo "configure:1252: checking for $ac_word" >&5
1252 if eval "test \"`echo '$''{'ac_cv_prog_have_sgml2html'+set}'`\" = set"; then
1253   echo $ac_n "(cached) $ac_c" 1>&6
1254 else
1255   if test -n "$have_sgml2html"; then
1256   ac_cv_prog_have_sgml2html="$have_sgml2html" # Let the user override the test.
1257 else
1258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1259   ac_dummy="$PATH"
1260   for ac_dir in $ac_dummy; do
1261     test -z "$ac_dir" && ac_dir=.
1262     if test -f $ac_dir/$ac_word; then
1263       ac_cv_prog_have_sgml2html="$ac_prog"
1264       break
1265     fi
1266   done
1267   IFS="$ac_save_ifs"
1268 fi
1269 fi
1270 have_sgml2html="$ac_cv_prog_have_sgml2html"
1271 if test -n "$have_sgml2html"; then
1272   echo "$ac_t""$have_sgml2html" 1>&6
1273 else
1274   echo "$ac_t""no" 1>&6
1275 fi
1276
1277 test -n "$have_sgml2html" && break
1278 done
1279
1280 if test "$have_sgml2txt" = "no" -o "$have_sgml2latex" = "no" - "$have_sgml2html" = "no"; then
1281         DOCMODULE=""
1282 else
1283         DOCMODULE="doc"
1284 fi
1285
1286
1287
1288 # Check whether --enable-yc or --disable-yc was given.
1289 if test "${enable_yc+set}" = set; then
1290   enableval="$enable_yc"
1291   :
1292 else
1293   enable_yc=yes
1294 fi
1295
1296 if test "$enable_yc" = "yes"; then
1297         ASNMODULE="z39.50"
1298         ILLMODULE="ill"
1299         ILLLIB=../ill/libill.a
1300         ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
1301         cp -f include/yaz/z-proto.h include/yaz/proto.h
1302 else
1303         ILLMODULE=""
1304         ASNMODULE=asn
1305         ILLLIB=""
1306         ASN_MAKEFILES="asn/Makefile"
1307         cp -f include/yaz/prt-proto.h include/yaz/proto.h
1308 fi
1309 checkBoth=0
1310 echo $ac_n "checking for connect""... $ac_c" 1>&6
1311 echo "configure:1312: checking for connect" >&5
1312 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1313   echo $ac_n "(cached) $ac_c" 1>&6
1314 else
1315   cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318 /* System header to define __stub macros and hopefully few prototypes,
1319     which can conflict with char connect(); below.  */
1320 #include <assert.h>
1321 /* Override any gcc2 internal prototype to avoid an error.  */
1322 /* We use char because int might match the return type of a gcc2
1323     builtin and then its argument prototype would still apply.  */
1324 char connect();
1325
1326 int main() {
1327
1328 /* The GNU C library defines this for functions which it implements
1329     to always fail with ENOSYS.  Some functions are actually named
1330     something starting with __ and the normal name is an alias.  */
1331 #if defined (__stub_connect) || defined (__stub___connect)
1332 choke me
1333 #else
1334 connect();
1335 #endif
1336
1337 ; return 0; }
1338 EOF
1339 if { (eval echo configure:1340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1340   rm -rf conftest*
1341   eval "ac_cv_func_connect=yes"
1342 else
1343   echo "configure: failed program was:" >&5
1344   cat conftest.$ac_ext >&5
1345   rm -rf conftest*
1346   eval "ac_cv_func_connect=no"
1347 fi
1348 rm -f conftest*
1349 fi
1350
1351 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1352   echo "$ac_t""yes" 1>&6
1353   :
1354 else
1355   echo "$ac_t""no" 1>&6
1356 fi
1357
1358 if test "$ac_cv_func_connect" = "no"; then
1359         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1360 echo "configure:1361: checking for main in -lsocket" >&5
1361 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1363   echo $ac_n "(cached) $ac_c" 1>&6
1364 else
1365   ac_save_LIBS="$LIBS"
1366 LIBS="-lsocket  $LIBS"
1367 cat > conftest.$ac_ext <<EOF
1368 #line 1369 "configure"
1369 #include "confdefs.h"
1370
1371 int main() {
1372 main()
1373 ; return 0; }
1374 EOF
1375 if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1376   rm -rf conftest*
1377   eval "ac_cv_lib_$ac_lib_var=yes"
1378 else
1379   echo "configure: failed program was:" >&5
1380   cat conftest.$ac_ext >&5
1381   rm -rf conftest*
1382   eval "ac_cv_lib_$ac_lib_var=no"
1383 fi
1384 rm -f conftest*
1385 LIBS="$ac_save_LIBS"
1386
1387 fi
1388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1389   echo "$ac_t""yes" 1>&6
1390   LIBS="$LIBS -lsocket"
1391 else
1392   echo "$ac_t""no" 1>&6
1393 checkBoth=1
1394 fi
1395
1396 fi
1397 if test "$checkBoth" = "1"; then
1398         oldLibs=$LIBS
1399         LIBS="$LIBS -lsocket -lnsl"
1400         echo $ac_n "checking for accept""... $ac_c" 1>&6
1401 echo "configure:1402: checking for accept" >&5
1402 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1403   echo $ac_n "(cached) $ac_c" 1>&6
1404 else
1405   cat > conftest.$ac_ext <<EOF
1406 #line 1407 "configure"
1407 #include "confdefs.h"
1408 /* System header to define __stub macros and hopefully few prototypes,
1409     which can conflict with char accept(); below.  */
1410 #include <assert.h>
1411 /* Override any gcc2 internal prototype to avoid an error.  */
1412 /* We use char because int might match the return type of a gcc2
1413     builtin and then its argument prototype would still apply.  */
1414 char accept();
1415
1416 int main() {
1417
1418 /* The GNU C library defines this for functions which it implements
1419     to always fail with ENOSYS.  Some functions are actually named
1420     something starting with __ and the normal name is an alias.  */
1421 #if defined (__stub_accept) || defined (__stub___accept)
1422 choke me
1423 #else
1424 accept();
1425 #endif
1426
1427 ; return 0; }
1428 EOF
1429 if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1430   rm -rf conftest*
1431   eval "ac_cv_func_accept=yes"
1432 else
1433   echo "configure: failed program was:" >&5
1434   cat conftest.$ac_ext >&5
1435   rm -rf conftest*
1436   eval "ac_cv_func_accept=no"
1437 fi
1438 rm -f conftest*
1439 fi
1440
1441 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1442   echo "$ac_t""yes" 1>&6
1443   :
1444 else
1445   echo "$ac_t""no" 1>&6
1446 LIBS=$oldLibs
1447 fi
1448
1449 fi
1450 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1451 echo "configure:1452: checking for gethostbyname" >&5
1452 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1453   echo $ac_n "(cached) $ac_c" 1>&6
1454 else
1455   cat > conftest.$ac_ext <<EOF
1456 #line 1457 "configure"
1457 #include "confdefs.h"
1458 /* System header to define __stub macros and hopefully few prototypes,
1459     which can conflict with char gethostbyname(); below.  */
1460 #include <assert.h>
1461 /* Override any gcc2 internal prototype to avoid an error.  */
1462 /* We use char because int might match the return type of a gcc2
1463     builtin and then its argument prototype would still apply.  */
1464 char gethostbyname();
1465
1466 int main() {
1467
1468 /* The GNU C library defines this for functions which it implements
1469     to always fail with ENOSYS.  Some functions are actually named
1470     something starting with __ and the normal name is an alias.  */
1471 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1472 choke me
1473 #else
1474 gethostbyname();
1475 #endif
1476
1477 ; return 0; }
1478 EOF
1479 if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1480   rm -rf conftest*
1481   eval "ac_cv_func_gethostbyname=yes"
1482 else
1483   echo "configure: failed program was:" >&5
1484   cat conftest.$ac_ext >&5
1485   rm -rf conftest*
1486   eval "ac_cv_func_gethostbyname=no"
1487 fi
1488 rm -f conftest*
1489 fi
1490
1491 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1492   echo "$ac_t""yes" 1>&6
1493   :
1494 else
1495   echo "$ac_t""no" 1>&6
1496 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1497 echo "configure:1498: checking for main in -lnsl" >&5
1498 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1499 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1500   echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502   ac_save_LIBS="$LIBS"
1503 LIBS="-lnsl  $LIBS"
1504 cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507
1508 int main() {
1509 main()
1510 ; return 0; }
1511 EOF
1512 if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1513   rm -rf conftest*
1514   eval "ac_cv_lib_$ac_lib_var=yes"
1515 else
1516   echo "configure: failed program was:" >&5
1517   cat conftest.$ac_ext >&5
1518   rm -rf conftest*
1519   eval "ac_cv_lib_$ac_lib_var=no"
1520 fi
1521 rm -f conftest*
1522 LIBS="$ac_save_LIBS"
1523
1524 fi
1525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1526   echo "$ac_t""yes" 1>&6
1527   LIBS="$LIBS -lnsl"
1528 else
1529   echo "$ac_t""no" 1>&6
1530 fi
1531
1532 fi
1533
1534 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1535 echo "configure:1536: checking for readline in -lreadline" >&5
1536 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1538   echo $ac_n "(cached) $ac_c" 1>&6
1539 else
1540   ac_save_LIBS="$LIBS"
1541 LIBS="-lreadline  $LIBS"
1542 cat > conftest.$ac_ext <<EOF
1543 #line 1544 "configure"
1544 #include "confdefs.h"
1545 /* Override any gcc2 internal prototype to avoid an error.  */
1546 /* We use char because int might match the return type of a gcc2
1547     builtin and then its argument prototype would still apply.  */
1548 char readline();
1549
1550 int main() {
1551 readline()
1552 ; return 0; }
1553 EOF
1554 if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1555   rm -rf conftest*
1556   eval "ac_cv_lib_$ac_lib_var=yes"
1557 else
1558   echo "configure: failed program was:" >&5
1559   cat conftest.$ac_ext >&5
1560   rm -rf conftest*
1561   eval "ac_cv_lib_$ac_lib_var=no"
1562 fi
1563 rm -f conftest*
1564 LIBS="$ac_save_LIBS"
1565
1566 fi
1567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1568   echo "$ac_t""yes" 1>&6
1569   LIBS="$LIBS -lreadline"
1570 else
1571   echo "$ac_t""no" 1>&6
1572 fi
1573
1574 if test "$ac_cv_lib_readline_readline" = "no"; then
1575         echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1576 echo "configure:1577: checking for readline in -lreadline" >&5
1577 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1578 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1579   echo $ac_n "(cached) $ac_c" 1>&6
1580 else
1581   ac_save_LIBS="$LIBS"
1582 LIBS="-lreadline  $LIBS"
1583 cat > conftest.$ac_ext <<EOF
1584 #line 1585 "configure"
1585 #include "confdefs.h"
1586 /* Override any gcc2 internal prototype to avoid an error.  */
1587 /* We use char because int might match the return type of a gcc2
1588     builtin and then its argument prototype would still apply.  */
1589 char readline();
1590
1591 int main() {
1592 readline()
1593 ; return 0; }
1594 EOF
1595 if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1596   rm -rf conftest*
1597   eval "ac_cv_lib_$ac_lib_var=yes"
1598 else
1599   echo "configure: failed program was:" >&5
1600   cat conftest.$ac_ext >&5
1601   rm -rf conftest*
1602   eval "ac_cv_lib_$ac_lib_var=no"
1603 fi
1604 rm -f conftest*
1605 LIBS="$ac_save_LIBS"
1606
1607 fi
1608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1609   echo "$ac_t""yes" 1>&6
1610   LIBS="$LIBS -lreadline -ltermcap"
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614
1615 fi
1616 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
1617 echo "configure:1618: checking for add_history in -lhistory" >&5
1618 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
1619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622   ac_save_LIBS="$LIBS"
1623 LIBS="-lhistory  $LIBS"
1624 cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 /* Override any gcc2 internal prototype to avoid an error.  */
1628 /* We use char because int might match the return type of a gcc2
1629     builtin and then its argument prototype would still apply.  */
1630 char add_history();
1631
1632 int main() {
1633 add_history()
1634 ; return 0; }
1635 EOF
1636 if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1637   rm -rf conftest*
1638   eval "ac_cv_lib_$ac_lib_var=yes"
1639 else
1640   echo "configure: failed program was:" >&5
1641   cat conftest.$ac_ext >&5
1642   rm -rf conftest*
1643   eval "ac_cv_lib_$ac_lib_var=no"
1644 fi
1645 rm -f conftest*
1646 LIBS="$ac_save_LIBS"
1647
1648 fi
1649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1650   echo "$ac_t""yes" 1>&6
1651   LIBS="$LIBS -lhistory"
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655
1656 if test "$ac_cv_lib_readline_readline" = "yes"; then
1657         for ac_hdr in readline/readline.h readline/history.h
1658 do
1659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1661 echo "configure:1662: checking for $ac_hdr" >&5
1662 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1663   echo $ac_n "(cached) $ac_c" 1>&6
1664 else
1665   cat > conftest.$ac_ext <<EOF
1666 #line 1667 "configure"
1667 #include "confdefs.h"
1668 #include <$ac_hdr>
1669 EOF
1670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1671 { (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1673 if test -z "$ac_err"; then
1674   rm -rf conftest*
1675   eval "ac_cv_header_$ac_safe=yes"
1676 else
1677   echo "$ac_err" >&5
1678   echo "configure: failed program was:" >&5
1679   cat conftest.$ac_ext >&5
1680   rm -rf conftest*
1681   eval "ac_cv_header_$ac_safe=no"
1682 fi
1683 rm -f conftest*
1684 fi
1685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1686   echo "$ac_t""yes" 1>&6
1687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1688   cat >> confdefs.h <<EOF
1689 #define $ac_tr_hdr 1
1690 EOF
1691  
1692 else
1693   echo "$ac_t""no" 1>&6
1694 fi
1695 done
1696
1697 fi
1698 # Check whether --enable-tcpd or --disable-tcpd was given.
1699 if test "${enable_tcpd+set}" = set; then
1700   enableval="$enable_tcpd"
1701   :
1702 fi
1703
1704 if test "$enable_tcpd" = "yes"; then
1705         echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
1706 echo "configure:1707: checking for working tcpd.h" >&5
1707         oldLibs=$LIBS
1708         LIBS="$LIBS -lwrap -lnsl"
1709         cat > conftest.$ac_ext <<EOF
1710 #line 1711 "configure"
1711 #include "confdefs.h"
1712 #include <syslog.h>
1713         #include <tcpd.h>
1714         int allow_severity = LOG_INFO;
1715         int deny_severity = LOG_WARNING;
1716 int main() {
1717 struct request_info request_info; int i;
1718         i = hosts_access(&request_info);
1719 ; return 0; }
1720 EOF
1721 if { (eval echo configure:1722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1722   rm -rf conftest*
1723   tcpd_ok=1
1724 else
1725   echo "configure: failed program was:" >&5
1726   cat conftest.$ac_ext >&5
1727   rm -rf conftest*
1728   tcpd_ok=0
1729 fi
1730 rm -f conftest*
1731         if test "$tcpd_ok" = "0"; then
1732                 echo "$ac_t""no" 1>&6
1733                 LIBS=$oldLibs
1734         else
1735                 echo "$ac_t""yes" 1>&6
1736                 cat >> confdefs.h <<\EOF
1737 #define HAVE_TCPD_H 1
1738 EOF
1739
1740         fi
1741 fi
1742 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1743 echo "configure:1744: checking for ANSI C header files" >&5
1744 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1745   echo $ac_n "(cached) $ac_c" 1>&6
1746 else
1747   cat > conftest.$ac_ext <<EOF
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750 #include <stdlib.h>
1751 #include <stdarg.h>
1752 #include <string.h>
1753 #include <float.h>
1754 EOF
1755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1756 { (eval echo configure:1757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1758 if test -z "$ac_err"; then
1759   rm -rf conftest*
1760   ac_cv_header_stdc=yes
1761 else
1762   echo "$ac_err" >&5
1763   echo "configure: failed program was:" >&5
1764   cat conftest.$ac_ext >&5
1765   rm -rf conftest*
1766   ac_cv_header_stdc=no
1767 fi
1768 rm -f conftest*
1769
1770 if test $ac_cv_header_stdc = yes; then
1771   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1772 cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775 #include <string.h>
1776 EOF
1777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1778   egrep "memchr" >/dev/null 2>&1; then
1779   :
1780 else
1781   rm -rf conftest*
1782   ac_cv_header_stdc=no
1783 fi
1784 rm -f conftest*
1785
1786 fi
1787
1788 if test $ac_cv_header_stdc = yes; then
1789   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1790 cat > conftest.$ac_ext <<EOF
1791 #line 1792 "configure"
1792 #include "confdefs.h"
1793 #include <stdlib.h>
1794 EOF
1795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1796   egrep "free" >/dev/null 2>&1; then
1797   :
1798 else
1799   rm -rf conftest*
1800   ac_cv_header_stdc=no
1801 fi
1802 rm -f conftest*
1803
1804 fi
1805
1806 if test $ac_cv_header_stdc = yes; then
1807   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1808 if test "$cross_compiling" = yes; then
1809   :
1810 else
1811   cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 #include <ctype.h>
1815 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1816 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1817 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1818 int main () { int i; for (i = 0; i < 256; i++)
1819 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1820 exit (0); }
1821
1822 EOF
1823 if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1824 then
1825   :
1826 else
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -fr conftest*
1830   ac_cv_header_stdc=no
1831 fi
1832 rm -fr conftest*
1833 fi
1834
1835 fi
1836 fi
1837
1838 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1839 if test $ac_cv_header_stdc = yes; then
1840   cat >> confdefs.h <<\EOF
1841 #define STDC_HEADERS 1
1842 EOF
1843
1844 fi
1845
1846 if test "$ac_cv_header_stdc" = "no"; then
1847         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
1848 fi
1849 # Check whether --enable-threads or --disable-threads was given.
1850 if test "${enable_threads+set}" = set; then
1851   enableval="$enable_threads"
1852   :
1853 fi
1854
1855 if test "$enable_threads" = "yes"; then
1856         for ac_hdr in pthread.h threads.h
1857 do
1858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1860 echo "configure:1861: checking for $ac_hdr" >&5
1861 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1862   echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864   cat > conftest.$ac_ext <<EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867 #include <$ac_hdr>
1868 EOF
1869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1870 { (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1872 if test -z "$ac_err"; then
1873   rm -rf conftest*
1874   eval "ac_cv_header_$ac_safe=yes"
1875 else
1876   echo "$ac_err" >&5
1877   echo "configure: failed program was:" >&5
1878   cat conftest.$ac_ext >&5
1879   rm -rf conftest*
1880   eval "ac_cv_header_$ac_safe=no"
1881 fi
1882 rm -f conftest*
1883 fi
1884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1885   echo "$ac_t""yes" 1>&6
1886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1887   cat >> confdefs.h <<EOF
1888 #define $ac_tr_hdr 1
1889 EOF
1890  
1891 else
1892   echo "$ac_t""no" 1>&6
1893 fi
1894 done
1895
1896         echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
1897 echo "configure:1898: checking for pthread_mutex_lock" >&5
1898 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
1899   echo $ac_n "(cached) $ac_c" 1>&6
1900 else
1901   cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 /* System header to define __stub macros and hopefully few prototypes,
1905     which can conflict with char pthread_mutex_lock(); below.  */
1906 #include <assert.h>
1907 /* Override any gcc2 internal prototype to avoid an error.  */
1908 /* We use char because int might match the return type of a gcc2
1909     builtin and then its argument prototype would still apply.  */
1910 char pthread_mutex_lock();
1911
1912 int main() {
1913
1914 /* The GNU C library defines this for functions which it implements
1915     to always fail with ENOSYS.  Some functions are actually named
1916     something starting with __ and the normal name is an alias.  */
1917 #if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
1918 choke me
1919 #else
1920 pthread_mutex_lock();
1921 #endif
1922
1923 ; return 0; }
1924 EOF
1925 if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1926   rm -rf conftest*
1927   eval "ac_cv_func_pthread_mutex_lock=yes"
1928 else
1929   echo "configure: failed program was:" >&5
1930   cat conftest.$ac_ext >&5
1931   rm -rf conftest*
1932   eval "ac_cv_func_pthread_mutex_lock=no"
1933 fi
1934 rm -f conftest*
1935 fi
1936
1937 if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
1938   echo "$ac_t""yes" 1>&6
1939   :
1940 else
1941   echo "$ac_t""no" 1>&6
1942 fi
1943
1944         if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
1945                 echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
1946 echo "configure:1947: checking for main in -lpthread" >&5
1947 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
1948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   ac_save_LIBS="$LIBS"
1952 LIBS="-lpthread  $LIBS"
1953 cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956
1957 int main() {
1958 main()
1959 ; return 0; }
1960 EOF
1961 if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1962   rm -rf conftest*
1963   eval "ac_cv_lib_$ac_lib_var=yes"
1964 else
1965   echo "configure: failed program was:" >&5
1966   cat conftest.$ac_ext >&5
1967   rm -rf conftest*
1968   eval "ac_cv_lib_$ac_lib_var=no"
1969 fi
1970 rm -f conftest*
1971 LIBS="$ac_save_LIBS"
1972
1973 fi
1974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1975   echo "$ac_t""yes" 1>&6
1976     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1977     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1978   cat >> confdefs.h <<EOF
1979 #define $ac_tr_lib 1
1980 EOF
1981
1982   LIBS="-lpthread $LIBS"
1983
1984 else
1985   echo "$ac_t""no" 1>&6
1986 fi
1987
1988         fi
1989         cat >> confdefs.h <<\EOF
1990 #define _REENTRANT 1
1991 EOF
1992
1993 fi
1994 SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest $DOCMODULE"
1995
1996 trap '' 1 2 15
1997 cat > confcache <<\EOF
1998 # This file is a shell script that caches the results of configure
1999 # tests run on this system so they can be shared between configure
2000 # scripts and configure runs.  It is not useful on other systems.
2001 # If it contains results you don't want to keep, you may remove or edit it.
2002 #
2003 # By default, configure uses ./config.cache as the cache file,
2004 # creating it if it does not exist already.  You can give configure
2005 # the --cache-file=FILE option to use a different cache file; that is
2006 # what configure does when it calls configure scripts in
2007 # subdirectories, so they share the cache.
2008 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2009 # config.status only pays attention to the cache file if you give it the
2010 # --recheck option to rerun configure.
2011 #
2012 EOF
2013 # The following way of writing the cache mishandles newlines in values,
2014 # but we know of no workaround that is simple, portable, and efficient.
2015 # So, don't put newlines in cache variables' values.
2016 # Ultrix sh set writes to stderr and can't be redirected directly,
2017 # and sets the high bit in the cache file unless we assign to the vars.
2018 (set) 2>&1 |
2019   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2020   *ac_space=\ *)
2021     # `set' does not quote correctly, so add quotes (double-quote substitution
2022     # turns \\\\ into \\, and sed turns \\ into \).
2023     sed -n \
2024       -e "s/'/'\\\\''/g" \
2025       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2026     ;;
2027   *)
2028     # `set' quotes correctly as required by POSIX, so do not add quotes.
2029     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2030     ;;
2031   esac >> confcache
2032 if cmp -s $cache_file confcache; then
2033   :
2034 else
2035   if test -w $cache_file; then
2036     echo "updating cache $cache_file"
2037     cat confcache > $cache_file
2038   else
2039     echo "not updating unwritable cache $cache_file"
2040   fi
2041 fi
2042 rm -f confcache
2043
2044 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2045
2046 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2047 # Let make expand exec_prefix.
2048 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2049
2050 # Any assignment to VPATH causes Sun make to only execute
2051 # the first set of double-colon rules, so remove it if not needed.
2052 # If there is a colon in the path, we need to keep it.
2053 if test "x$srcdir" = x.; then
2054   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2055 fi
2056
2057 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2058
2059 # Transform confdefs.h into DEFS.
2060 # Protect against shell expansion while executing Makefile rules.
2061 # Protect against Makefile macro expansion.
2062 cat > conftest.defs <<\EOF
2063 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2064 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2065 s%\[%\\&%g
2066 s%\]%\\&%g
2067 s%\$%$$%g
2068 EOF
2069 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2070 rm -f conftest.defs
2071
2072
2073 # Without the "./", some shells look in PATH for config.status.
2074 : ${CONFIG_STATUS=./config.status}
2075
2076 echo creating $CONFIG_STATUS
2077 rm -f $CONFIG_STATUS
2078 cat > $CONFIG_STATUS <<EOF
2079 #! /bin/sh
2080 # Generated automatically by configure.
2081 # Run this file to recreate the current configuration.
2082 # This directory was configured as follows,
2083 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2084 #
2085 # $0 $ac_configure_args
2086 #
2087 # Compiler output produced by configure, useful for debugging
2088 # configure, is in ./config.log if it exists.
2089
2090 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2091 for ac_option
2092 do
2093   case "\$ac_option" in
2094   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2095     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2096     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2097   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2098     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2099     exit 0 ;;
2100   -help | --help | --hel | --he | --h)
2101     echo "\$ac_cs_usage"; exit 0 ;;
2102   *) echo "\$ac_cs_usage"; exit 1 ;;
2103   esac
2104 done
2105
2106 ac_given_srcdir=$srcdir
2107 ac_given_INSTALL="$INSTALL"
2108
2109 trap 'rm -fr `echo "Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2110 EOF
2111 cat >> $CONFIG_STATUS <<EOF
2112
2113 # Protect against being on the right side of a sed subst in config.status.
2114 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2115  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2116 $ac_vpsub
2117 $extrasub
2118 s%@SHELL@%$SHELL%g
2119 s%@CFLAGS@%$CFLAGS%g
2120 s%@CPPFLAGS@%$CPPFLAGS%g
2121 s%@CXXFLAGS@%$CXXFLAGS%g
2122 s%@FFLAGS@%$FFLAGS%g
2123 s%@DEFS@%$DEFS%g
2124 s%@LDFLAGS@%$LDFLAGS%g
2125 s%@LIBS@%$LIBS%g
2126 s%@exec_prefix@%$exec_prefix%g
2127 s%@prefix@%$prefix%g
2128 s%@program_transform_name@%$program_transform_name%g
2129 s%@bindir@%$bindir%g
2130 s%@sbindir@%$sbindir%g
2131 s%@libexecdir@%$libexecdir%g
2132 s%@datadir@%$datadir%g
2133 s%@sysconfdir@%$sysconfdir%g
2134 s%@sharedstatedir@%$sharedstatedir%g
2135 s%@localstatedir@%$localstatedir%g
2136 s%@libdir@%$libdir%g
2137 s%@includedir@%$includedir%g
2138 s%@oldincludedir@%$oldincludedir%g
2139 s%@infodir@%$infodir%g
2140 s%@mandir@%$mandir%g
2141 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2142 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2143 s%@INSTALL_DATA@%$INSTALL_DATA%g
2144 s%@PACKAGE@%$PACKAGE%g
2145 s%@VERSION@%$VERSION%g
2146 s%@ACLOCAL@%$ACLOCAL%g
2147 s%@AUTOCONF@%$AUTOCONF%g
2148 s%@AUTOMAKE@%$AUTOMAKE%g
2149 s%@AUTOHEADER@%$AUTOHEADER%g
2150 s%@MAKEINFO@%$MAKEINFO%g
2151 s%@SET_MAKE@%$SET_MAKE%g
2152 s%@CC@%$CC%g
2153 s%@CPP@%$CPP%g
2154 s%@RANLIB@%$RANLIB%g
2155 s%@have_sgml2txt@%$have_sgml2txt%g
2156 s%@have_sgml2latex@%$have_sgml2latex%g
2157 s%@have_sgml2html@%$have_sgml2html%g
2158 s%@ASNMODULE@%$ASNMODULE%g
2159 s%@ILLMODULE@%$ILLMODULE%g
2160 s%@ILLLIB@%$ILLLIB%g
2161 s%@SUBDIRS_VAR@%$SUBDIRS_VAR%g
2162
2163 CEOF
2164 EOF
2165
2166 cat >> $CONFIG_STATUS <<\EOF
2167
2168 # Split the substitutions into bite-sized pieces for seds with
2169 # small command number limits, like on Digital OSF/1 and HP-UX.
2170 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2171 ac_file=1 # Number of current file.
2172 ac_beg=1 # First line for current file.
2173 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2174 ac_more_lines=:
2175 ac_sed_cmds=""
2176 while $ac_more_lines; do
2177   if test $ac_beg -gt 1; then
2178     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2179   else
2180     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2181   fi
2182   if test ! -s conftest.s$ac_file; then
2183     ac_more_lines=false
2184     rm -f conftest.s$ac_file
2185   else
2186     if test -z "$ac_sed_cmds"; then
2187       ac_sed_cmds="sed -f conftest.s$ac_file"
2188     else
2189       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2190     fi
2191     ac_file=`expr $ac_file + 1`
2192     ac_beg=$ac_end
2193     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2194   fi
2195 done
2196 if test -z "$ac_sed_cmds"; then
2197   ac_sed_cmds=cat
2198 fi
2199 EOF
2200
2201 cat >> $CONFIG_STATUS <<EOF
2202
2203 CONFIG_FILES=\${CONFIG_FILES-"Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile"}
2204 EOF
2205 cat >> $CONFIG_STATUS <<\EOF
2206 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2207   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2208   case "$ac_file" in
2209   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2210        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2211   *) ac_file_in="${ac_file}.in" ;;
2212   esac
2213
2214   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2215
2216   # Remove last slash and all that follows it.  Not all systems have dirname.
2217   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2218   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2219     # The file is in a subdirectory.
2220     test ! -d "$ac_dir" && mkdir "$ac_dir"
2221     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2222     # A "../" for each directory in $ac_dir_suffix.
2223     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2224   else
2225     ac_dir_suffix= ac_dots=
2226   fi
2227
2228   case "$ac_given_srcdir" in
2229   .)  srcdir=.
2230       if test -z "$ac_dots"; then top_srcdir=.
2231       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2232   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2233   *) # Relative path.
2234     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2235     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2236   esac
2237
2238   case "$ac_given_INSTALL" in
2239   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2240   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2241   esac
2242
2243   echo creating "$ac_file"
2244   rm -f "$ac_file"
2245   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2246   case "$ac_file" in
2247   *Makefile*) ac_comsub="1i\\
2248 # $configure_input" ;;
2249   *) ac_comsub= ;;
2250   esac
2251
2252   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2253   sed -e "$ac_comsub
2254 s%@configure_input@%$configure_input%g
2255 s%@srcdir@%$srcdir%g
2256 s%@top_srcdir@%$top_srcdir%g
2257 s%@INSTALL@%$INSTALL%g
2258 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2259 fi; done
2260 rm -f conftest.s*
2261
2262 EOF
2263 cat >> $CONFIG_STATUS <<EOF
2264
2265 EOF
2266 cat >> $CONFIG_STATUS <<\EOF
2267
2268 exit 0
2269 EOF
2270 chmod +x $CONFIG_STATUS
2271 rm -fr confdefs* $ac_clean_files
2272 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2273