Fixed bug that made the frontend server crash when no attribute set
[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   --enable-shared[=PKGS]  build shared libraries [default=no]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25   --disable-comp          use old encoders, i.e. disable the YAZ ASN.1 Compiler"
26 ac_help="$ac_help
27   --with-openssl[=DIR]    OpenSSL library in DIR"
28 ac_help="$ac_help
29   --enable-tcpd[=PREFIX]  enable TCP wrapper for server if available"
30 ac_help="$ac_help
31   --disable-threads       disable POSIX threads"
32
33 # Initialize some variables set by options.
34 # The variables have the same names as the options, with
35 # dashes changed to underlines.
36 build=NONE
37 cache_file=./config.cache
38 exec_prefix=NONE
39 host=NONE
40 no_create=
41 nonopt=NONE
42 no_recursion=
43 prefix=NONE
44 program_prefix=NONE
45 program_suffix=NONE
46 program_transform_name=s,x,x,
47 silent=
48 site=
49 srcdir=
50 target=NONE
51 verbose=
52 x_includes=NONE
53 x_libraries=NONE
54 bindir='${exec_prefix}/bin'
55 sbindir='${exec_prefix}/sbin'
56 libexecdir='${exec_prefix}/libexec'
57 datadir='${prefix}/share'
58 sysconfdir='${prefix}/etc'
59 sharedstatedir='${prefix}/com'
60 localstatedir='${prefix}/var'
61 libdir='${exec_prefix}/lib'
62 includedir='${prefix}/include'
63 oldincludedir='/usr/include'
64 infodir='${prefix}/info'
65 mandir='${prefix}/man'
66
67 # Initialize some other variables.
68 subdirs=
69 MFLAGS= MAKEFLAGS=
70 SHELL=${CONFIG_SHELL-/bin/sh}
71 # Maximum number of lines to put in a shell here document.
72 ac_max_here_lines=12
73
74 ac_prev=
75 for ac_option
76 do
77
78   # If the previous option needs an argument, assign it.
79   if test -n "$ac_prev"; then
80     eval "$ac_prev=\$ac_option"
81     ac_prev=
82     continue
83   fi
84
85   case "$ac_option" in
86   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87   *) ac_optarg= ;;
88   esac
89
90   # Accept the important Cygnus configure options, so we can diagnose typos.
91
92   case "$ac_option" in
93
94   -bindir | --bindir | --bindi | --bind | --bin | --bi)
95     ac_prev=bindir ;;
96   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
97     bindir="$ac_optarg" ;;
98
99   -build | --build | --buil | --bui | --bu)
100     ac_prev=build ;;
101   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
102     build="$ac_optarg" ;;
103
104   -cache-file | --cache-file | --cache-fil | --cache-fi \
105   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
106     ac_prev=cache_file ;;
107   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
108   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
109     cache_file="$ac_optarg" ;;
110
111   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
112     ac_prev=datadir ;;
113   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
114   | --da=*)
115     datadir="$ac_optarg" ;;
116
117   -disable-* | --disable-*)
118     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
119     # Reject names that are not valid shell variable names.
120     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
121       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122     fi
123     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124     eval "enable_${ac_feature}=no" ;;
125
126   -enable-* | --enable-*)
127     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
128     # Reject names that are not valid shell variable names.
129     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
130       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131     fi
132     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133     case "$ac_option" in
134       *=*) ;;
135       *) ac_optarg=yes ;;
136     esac
137     eval "enable_${ac_feature}='$ac_optarg'" ;;
138
139   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
140   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
141   | --exec | --exe | --ex)
142     ac_prev=exec_prefix ;;
143   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
144   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
145   | --exec=* | --exe=* | --ex=*)
146     exec_prefix="$ac_optarg" ;;
147
148   -gas | --gas | --ga | --g)
149     # Obsolete; use --with-gas.
150     with_gas=yes ;;
151
152   -help | --help | --hel | --he)
153     # Omit some internal or obsolete options to make the list less imposing.
154     # This message is too long to be a string in the A/UX 3.1 sh.
155     cat << EOF
156 Usage: configure [options] [host]
157 Options: [defaults in brackets after descriptions]
158 Configuration:
159   --cache-file=FILE       cache test results in FILE
160   --help                  print this message
161   --no-create             do not create output files
162   --quiet, --silent       do not print \`checking...' messages
163   --version               print the version of autoconf that created configure
164 Directory and file names:
165   --prefix=PREFIX         install architecture-independent files in PREFIX
166                           [$ac_default_prefix]
167   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
168                           [same as prefix]
169   --bindir=DIR            user executables in DIR [EPREFIX/bin]
170   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
171   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
172   --datadir=DIR           read-only architecture-independent data in DIR
173                           [PREFIX/share]
174   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
175   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
176                           [PREFIX/com]
177   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
178   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
179   --includedir=DIR        C header files in DIR [PREFIX/include]
180   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
181   --infodir=DIR           info documentation in DIR [PREFIX/info]
182   --mandir=DIR            man documentation in DIR [PREFIX/man]
183   --srcdir=DIR            find the sources in DIR [configure dir or ..]
184   --program-prefix=PREFIX prepend PREFIX to installed program names
185   --program-suffix=SUFFIX append SUFFIX to installed program names
186   --program-transform-name=PROGRAM
187                           run sed PROGRAM on installed program names
188 EOF
189     cat << EOF
190 Host type:
191   --build=BUILD           configure for building on BUILD [BUILD=HOST]
192   --host=HOST             configure for HOST [guessed]
193   --target=TARGET         configure for TARGET [TARGET=HOST]
194 Features and packages:
195   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
196   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
197   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
198   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
199   --x-includes=DIR        X include files are in DIR
200   --x-libraries=DIR       X library files are in DIR
201 EOF
202     if test -n "$ac_help"; then
203       echo "--enable and --with options recognized:$ac_help"
204     fi
205     exit 0 ;;
206
207   -host | --host | --hos | --ho)
208     ac_prev=host ;;
209   -host=* | --host=* | --hos=* | --ho=*)
210     host="$ac_optarg" ;;
211
212   -includedir | --includedir | --includedi | --included | --include \
213   | --includ | --inclu | --incl | --inc)
214     ac_prev=includedir ;;
215   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216   | --includ=* | --inclu=* | --incl=* | --inc=*)
217     includedir="$ac_optarg" ;;
218
219   -infodir | --infodir | --infodi | --infod | --info | --inf)
220     ac_prev=infodir ;;
221   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222     infodir="$ac_optarg" ;;
223
224   -libdir | --libdir | --libdi | --libd)
225     ac_prev=libdir ;;
226   -libdir=* | --libdir=* | --libdi=* | --libd=*)
227     libdir="$ac_optarg" ;;
228
229   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230   | --libexe | --libex | --libe)
231     ac_prev=libexecdir ;;
232   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233   | --libexe=* | --libex=* | --libe=*)
234     libexecdir="$ac_optarg" ;;
235
236   -localstatedir | --localstatedir | --localstatedi | --localstated \
237   | --localstate | --localstat | --localsta | --localst \
238   | --locals | --local | --loca | --loc | --lo)
239     ac_prev=localstatedir ;;
240   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243     localstatedir="$ac_optarg" ;;
244
245   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246     ac_prev=mandir ;;
247   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248     mandir="$ac_optarg" ;;
249
250   -nfp | --nfp | --nf)
251     # Obsolete; use --without-fp.
252     with_fp=no ;;
253
254   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255   | --no-cr | --no-c)
256     no_create=yes ;;
257
258   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260     no_recursion=yes ;;
261
262   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264   | --oldin | --oldi | --old | --ol | --o)
265     ac_prev=oldincludedir ;;
266   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269     oldincludedir="$ac_optarg" ;;
270
271   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272     ac_prev=prefix ;;
273   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274     prefix="$ac_optarg" ;;
275
276   -program-prefix | --program-prefix | --program-prefi | --program-pref \
277   | --program-pre | --program-pr | --program-p)
278     ac_prev=program_prefix ;;
279   -program-prefix=* | --program-prefix=* | --program-prefi=* \
280   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281     program_prefix="$ac_optarg" ;;
282
283   -program-suffix | --program-suffix | --program-suffi | --program-suff \
284   | --program-suf | --program-su | --program-s)
285     ac_prev=program_suffix ;;
286   -program-suffix=* | --program-suffix=* | --program-suffi=* \
287   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288     program_suffix="$ac_optarg" ;;
289
290   -program-transform-name | --program-transform-name \
291   | --program-transform-nam | --program-transform-na \
292   | --program-transform-n | --program-transform- \
293   | --program-transform | --program-transfor \
294   | --program-transfo | --program-transf \
295   | --program-trans | --program-tran \
296   | --progr-tra | --program-tr | --program-t)
297     ac_prev=program_transform_name ;;
298   -program-transform-name=* | --program-transform-name=* \
299   | --program-transform-nam=* | --program-transform-na=* \
300   | --program-transform-n=* | --program-transform-=* \
301   | --program-transform=* | --program-transfor=* \
302   | --program-transfo=* | --program-transf=* \
303   | --program-trans=* | --program-tran=* \
304   | --progr-tra=* | --program-tr=* | --program-t=*)
305     program_transform_name="$ac_optarg" ;;
306
307   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308   | -silent | --silent | --silen | --sile | --sil)
309     silent=yes ;;
310
311   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312     ac_prev=sbindir ;;
313   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314   | --sbi=* | --sb=*)
315     sbindir="$ac_optarg" ;;
316
317   -sharedstatedir | --sharedstatedir | --sharedstatedi \
318   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319   | --sharedst | --shareds | --shared | --share | --shar \
320   | --sha | --sh)
321     ac_prev=sharedstatedir ;;
322   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325   | --sha=* | --sh=*)
326     sharedstatedir="$ac_optarg" ;;
327
328   -site | --site | --sit)
329     ac_prev=site ;;
330   -site=* | --site=* | --sit=*)
331     site="$ac_optarg" ;;
332
333   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334     ac_prev=srcdir ;;
335   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336     srcdir="$ac_optarg" ;;
337
338   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339   | --syscon | --sysco | --sysc | --sys | --sy)
340     ac_prev=sysconfdir ;;
341   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343     sysconfdir="$ac_optarg" ;;
344
345   -target | --target | --targe | --targ | --tar | --ta | --t)
346     ac_prev=target ;;
347   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348     target="$ac_optarg" ;;
349
350   -v | -verbose | --verbose | --verbos | --verbo | --verb)
351     verbose=yes ;;
352
353   -version | --version | --versio | --versi | --vers)
354     echo "configure generated by autoconf version 2.13"
355     exit 0 ;;
356
357   -with-* | --with-*)
358     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     case "$ac_option" in
365       *=*) ;;
366       *) ac_optarg=yes ;;
367     esac
368     eval "with_${ac_package}='$ac_optarg'" ;;
369
370   -without-* | --without-*)
371     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
372     # Reject names that are not valid shell variable names.
373     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
374       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375     fi
376     ac_package=`echo $ac_package| sed 's/-/_/g'`
377     eval "with_${ac_package}=no" ;;
378
379   --x)
380     # Obsolete; use --with-x.
381     with_x=yes ;;
382
383   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384   | --x-incl | --x-inc | --x-in | --x-i)
385     ac_prev=x_includes ;;
386   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388     x_includes="$ac_optarg" ;;
389
390   -x-libraries | --x-libraries | --x-librarie | --x-librari \
391   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392     ac_prev=x_libraries ;;
393   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395     x_libraries="$ac_optarg" ;;
396
397   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398     ;;
399
400   *)
401     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402       echo "configure: warning: $ac_option: invalid host type" 1>&2
403     fi
404     if test "x$nonopt" != xNONE; then
405       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406     fi
407     nonopt="$ac_option"
408     ;;
409
410   esac
411 done
412
413 if test -n "$ac_prev"; then
414   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415 fi
416
417 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419 # File descriptor usage:
420 # 0 standard input
421 # 1 file creation
422 # 2 errors and warnings
423 # 3 some systems may open it to /dev/tty
424 # 4 used on the Kubota Titan
425 # 6 checking for... messages and results
426 # 5 compiler messages saved in config.log
427 if test "$silent" = yes; then
428   exec 6>/dev/null
429 else
430   exec 6>&1
431 fi
432 exec 5>./config.log
433
434 echo "\
435 This file contains any messages produced by compilers while
436 running configure, to aid debugging if configure makes a mistake.
437 " 1>&5
438
439 # Strip out --no-create and --no-recursion so they do not pile up.
440 # Also quote any args containing shell metacharacters.
441 ac_configure_args=
442 for ac_arg
443 do
444   case "$ac_arg" in
445   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446   | --no-cr | --no-c) ;;
447   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452   esac
453 done
454
455 # NLS nuisances.
456 # Only set these to C if already set.  These must not be set unconditionally
457 # because not all systems understand e.g. LANG=C (notably SCO).
458 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459 # Non-C LC_CTYPE values break the ctype check.
460 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
461 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
464
465 # confdefs.h avoids OS command line length limits that DEFS can exceed.
466 rm -rf conftest* confdefs.h
467 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
468 echo > confdefs.h
469
470 # A filename unique to this package, relative to the directory that
471 # configure is in, which we can look for to find out if srcdir is correct.
472 ac_unique_file=include/yaz/yaz-version.h
473
474 # Find the source files, if location was not specified.
475 if test -z "$srcdir"; then
476   ac_srcdir_defaulted=yes
477   # Try the directory containing this script, then its parent.
478   ac_prog=$0
479   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481   srcdir=$ac_confdir
482   if test ! -r $srcdir/$ac_unique_file; then
483     srcdir=..
484   fi
485 else
486   ac_srcdir_defaulted=no
487 fi
488 if test ! -r $srcdir/$ac_unique_file; then
489   if test "$ac_srcdir_defaulted" = yes; then
490     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491   else
492     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493   fi
494 fi
495 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497 # Prefer explicitly selected file to automatically selected ones.
498 if test -z "$CONFIG_SITE"; then
499   if test "x$prefix" != xNONE; then
500     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
501   else
502     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
503   fi
504 fi
505 for ac_site_file in $CONFIG_SITE; do
506   if test -r "$ac_site_file"; then
507     echo "loading site script $ac_site_file"
508     . "$ac_site_file"
509   fi
510 done
511
512 if test -r "$cache_file"; then
513   echo "loading cache $cache_file"
514   . $cache_file
515 else
516   echo "creating cache $cache_file"
517   > $cache_file
518 fi
519
520 ac_ext=c
521 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
522 ac_cpp='$CPP $CPPFLAGS'
523 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
524 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
525 cross_compiling=$ac_cv_prog_cc_cross
526
527 ac_exeext=
528 ac_objext=o
529 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
530   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
531   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532     ac_n= ac_c='
533 ' ac_t='        '
534   else
535     ac_n=-n ac_c= ac_t=
536   fi
537 else
538   ac_n= ac_c='\c' ac_t=
539 fi
540
541
542 ac_aux_dir=
543 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
544   if test -f $ac_dir/install-sh; then
545     ac_aux_dir=$ac_dir
546     ac_install_sh="$ac_aux_dir/install-sh -c"
547     break
548   elif test -f $ac_dir/install.sh; then
549     ac_aux_dir=$ac_dir
550     ac_install_sh="$ac_aux_dir/install.sh -c"
551     break
552   fi
553 done
554 if test -z "$ac_aux_dir"; then
555   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
556 fi
557 ac_config_guess=$ac_aux_dir/config.guess
558 ac_config_sub=$ac_aux_dir/config.sub
559 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
560
561 # Find a good install program.  We prefer a C program (faster),
562 # so one script is as good as another.  But avoid the broken or
563 # incompatible versions:
564 # SysV /etc/install, /usr/sbin/install
565 # SunOS /usr/etc/install
566 # IRIX /sbin/install
567 # AIX /bin/install
568 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
569 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
570 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
571 # ./install, which can be erroneously created by make from ./install.sh.
572 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
573 echo "configure:574: checking for a BSD compatible install" >&5
574 if test -z "$INSTALL"; then
575 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
576   echo $ac_n "(cached) $ac_c" 1>&6
577 else
578     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
579   for ac_dir in $PATH; do
580     # Account for people who put trailing slashes in PATH elements.
581     case "$ac_dir/" in
582     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
583     *)
584       # OSF1 and SCO ODT 3.0 have their own names for install.
585       # Don't use installbsd from OSF since it installs stuff as root
586       # by default.
587       for ac_prog in ginstall scoinst install; do
588         if test -f $ac_dir/$ac_prog; then
589           if test $ac_prog = install &&
590             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
591             # AIX install.  It has an incompatible calling convention.
592             :
593           else
594             ac_cv_path_install="$ac_dir/$ac_prog -c"
595             break 2
596           fi
597         fi
598       done
599       ;;
600     esac
601   done
602   IFS="$ac_save_IFS"
603
604 fi
605   if test "${ac_cv_path_install+set}" = set; then
606     INSTALL="$ac_cv_path_install"
607   else
608     # As a last resort, use the slow shell script.  We don't cache a
609     # path for INSTALL within a source directory, because that will
610     # break other packages using the cache if that directory is
611     # removed, or if the path is relative.
612     INSTALL="$ac_install_sh"
613   fi
614 fi
615 echo "$ac_t""$INSTALL" 1>&6
616
617 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
618 # It thinks the first close brace ends the variable substitution.
619 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
620
621 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
622
623 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
624
625 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
626 echo "configure:627: checking whether build environment is sane" >&5
627 # Just in case
628 sleep 1
629 echo timestamp > conftestfile
630 # Do `set' in a subshell so we don't clobber the current shell's
631 # arguments.  Must try -L first in case configure is actually a
632 # symlink; some systems play weird games with the mod time of symlinks
633 # (eg FreeBSD returns the mod time of the symlink's containing
634 # directory).
635 if (
636    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
637    if test "$*" = "X"; then
638       # -L didn't work.
639       set X `ls -t $srcdir/configure conftestfile`
640    fi
641    if test "$*" != "X $srcdir/configure conftestfile" \
642       && test "$*" != "X conftestfile $srcdir/configure"; then
643
644       # If neither matched, then we have a broken ls.  This can happen
645       # if, for instance, CONFIG_SHELL is bash and it inherits a
646       # broken ls alias from the environment.  This has actually
647       # happened.  Such a system could not be considered "sane".
648       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
649 alias in your environment" 1>&2; exit 1; }
650    fi
651
652    test "$2" = conftestfile
653    )
654 then
655    # Ok.
656    :
657 else
658    { echo "configure: error: newly created file is older than distributed files!
659 Check your system clock" 1>&2; exit 1; }
660 fi
661 rm -f conftest*
662 echo "$ac_t""yes" 1>&6
663 if test "$program_transform_name" = s,x,x,; then
664   program_transform_name=
665 else
666   # Double any \ or $.  echo might interpret backslashes.
667   cat <<\EOF_SED > conftestsed
668 s,\\,\\\\,g; s,\$,$$,g
669 EOF_SED
670   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
671   rm -f conftestsed
672 fi
673 test "$program_prefix" != NONE &&
674   program_transform_name="s,^,${program_prefix},; $program_transform_name"
675 # Use a double $ so make ignores it.
676 test "$program_suffix" != NONE &&
677   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
678
679 # sed with no file args requires a program.
680 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
681
682 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
683 echo "configure:684: checking whether ${MAKE-make} sets \${MAKE}" >&5
684 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
685 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
686   echo $ac_n "(cached) $ac_c" 1>&6
687 else
688   cat > conftestmake <<\EOF
689 all:
690         @echo 'ac_maketemp="${MAKE}"'
691 EOF
692 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
693 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
694 if test -n "$ac_maketemp"; then
695   eval ac_cv_prog_make_${ac_make}_set=yes
696 else
697   eval ac_cv_prog_make_${ac_make}_set=no
698 fi
699 rm -f conftestmake
700 fi
701 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
702   echo "$ac_t""yes" 1>&6
703   SET_MAKE=
704 else
705   echo "$ac_t""no" 1>&6
706   SET_MAKE="MAKE=${MAKE-make}"
707 fi
708
709
710 PACKAGE=yaz
711
712 VERSION=1.7
713
714 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
715   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
716 fi
717 cat >> confdefs.h <<EOF
718 #define PACKAGE "$PACKAGE"
719 EOF
720
721 cat >> confdefs.h <<EOF
722 #define VERSION "$VERSION"
723 EOF
724
725
726
727 missing_dir=`cd $ac_aux_dir && pwd`
728 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
729 echo "configure:730: checking for working aclocal" >&5
730 # Run test in a subshell; some versions of sh will print an error if
731 # an executable is not found, even if stderr is redirected.
732 # Redirect stdin to placate older versions of autoconf.  Sigh.
733 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
734    ACLOCAL=aclocal
735    echo "$ac_t""found" 1>&6
736 else
737    ACLOCAL="$missing_dir/missing aclocal"
738    echo "$ac_t""missing" 1>&6
739 fi
740
741 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
742 echo "configure:743: checking for working autoconf" >&5
743 # Run test in a subshell; some versions of sh will print an error if
744 # an executable is not found, even if stderr is redirected.
745 # Redirect stdin to placate older versions of autoconf.  Sigh.
746 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
747    AUTOCONF=autoconf
748    echo "$ac_t""found" 1>&6
749 else
750    AUTOCONF="$missing_dir/missing autoconf"
751    echo "$ac_t""missing" 1>&6
752 fi
753
754 echo $ac_n "checking for working automake""... $ac_c" 1>&6
755 echo "configure:756: checking for working automake" >&5
756 # Run test in a subshell; some versions of sh will print an error if
757 # an executable is not found, even if stderr is redirected.
758 # Redirect stdin to placate older versions of autoconf.  Sigh.
759 if (automake --version) < /dev/null > /dev/null 2>&1; then
760    AUTOMAKE=automake
761    echo "$ac_t""found" 1>&6
762 else
763    AUTOMAKE="$missing_dir/missing automake"
764    echo "$ac_t""missing" 1>&6
765 fi
766
767 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
768 echo "configure:769: checking for working autoheader" >&5
769 # Run test in a subshell; some versions of sh will print an error if
770 # an executable is not found, even if stderr is redirected.
771 # Redirect stdin to placate older versions of autoconf.  Sigh.
772 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
773    AUTOHEADER=autoheader
774    echo "$ac_t""found" 1>&6
775 else
776    AUTOHEADER="$missing_dir/missing autoheader"
777    echo "$ac_t""missing" 1>&6
778 fi
779
780 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
781 echo "configure:782: checking for working makeinfo" >&5
782 # Run test in a subshell; some versions of sh will print an error if
783 # an executable is not found, even if stderr is redirected.
784 # Redirect stdin to placate older versions of autoconf.  Sigh.
785 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
786    MAKEINFO=makeinfo
787    echo "$ac_t""found" 1>&6
788 else
789    MAKEINFO="$missing_dir/missing makeinfo"
790    echo "$ac_t""missing" 1>&6
791 fi
792
793
794
795 # Extract the first word of "gcc", so it can be a program name with args.
796 set dummy gcc; ac_word=$2
797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
798 echo "configure:799: checking for $ac_word" >&5
799 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
800   echo $ac_n "(cached) $ac_c" 1>&6
801 else
802   if test -n "$CC"; then
803   ac_cv_prog_CC="$CC" # Let the user override the test.
804 else
805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
806   ac_dummy="$PATH"
807   for ac_dir in $ac_dummy; do
808     test -z "$ac_dir" && ac_dir=.
809     if test -f $ac_dir/$ac_word; then
810       ac_cv_prog_CC="gcc"
811       break
812     fi
813   done
814   IFS="$ac_save_ifs"
815 fi
816 fi
817 CC="$ac_cv_prog_CC"
818 if test -n "$CC"; then
819   echo "$ac_t""$CC" 1>&6
820 else
821   echo "$ac_t""no" 1>&6
822 fi
823
824 if test -z "$CC"; then
825   # Extract the first word of "cc", so it can be a program name with args.
826 set dummy cc; ac_word=$2
827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
828 echo "configure:829: checking for $ac_word" >&5
829 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832   if test -n "$CC"; then
833   ac_cv_prog_CC="$CC" # Let the user override the test.
834 else
835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
836   ac_prog_rejected=no
837   ac_dummy="$PATH"
838   for ac_dir in $ac_dummy; do
839     test -z "$ac_dir" && ac_dir=.
840     if test -f $ac_dir/$ac_word; then
841       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
842         ac_prog_rejected=yes
843         continue
844       fi
845       ac_cv_prog_CC="cc"
846       break
847     fi
848   done
849   IFS="$ac_save_ifs"
850 if test $ac_prog_rejected = yes; then
851   # We found a bogon in the path, so make sure we never use it.
852   set dummy $ac_cv_prog_CC
853   shift
854   if test $# -gt 0; then
855     # We chose a different compiler from the bogus one.
856     # However, it has the same basename, so the bogon will be chosen
857     # first if we set CC to just the basename; use the full file name.
858     shift
859     set dummy "$ac_dir/$ac_word" "$@"
860     shift
861     ac_cv_prog_CC="$@"
862   fi
863 fi
864 fi
865 fi
866 CC="$ac_cv_prog_CC"
867 if test -n "$CC"; then
868   echo "$ac_t""$CC" 1>&6
869 else
870   echo "$ac_t""no" 1>&6
871 fi
872
873   if test -z "$CC"; then
874     case "`uname -s`" in
875     *win32* | *WIN32*)
876       # Extract the first word of "cl", so it can be a program name with args.
877 set dummy cl; ac_word=$2
878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
879 echo "configure:880: checking for $ac_word" >&5
880 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
881   echo $ac_n "(cached) $ac_c" 1>&6
882 else
883   if test -n "$CC"; then
884   ac_cv_prog_CC="$CC" # Let the user override the test.
885 else
886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
887   ac_dummy="$PATH"
888   for ac_dir in $ac_dummy; do
889     test -z "$ac_dir" && ac_dir=.
890     if test -f $ac_dir/$ac_word; then
891       ac_cv_prog_CC="cl"
892       break
893     fi
894   done
895   IFS="$ac_save_ifs"
896 fi
897 fi
898 CC="$ac_cv_prog_CC"
899 if test -n "$CC"; then
900   echo "$ac_t""$CC" 1>&6
901 else
902   echo "$ac_t""no" 1>&6
903 fi
904  ;;
905     esac
906   fi
907   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
908 fi
909
910 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
911 echo "configure:912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
912
913 ac_ext=c
914 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
915 ac_cpp='$CPP $CPPFLAGS'
916 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
917 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
918 cross_compiling=$ac_cv_prog_cc_cross
919
920 cat > conftest.$ac_ext << EOF
921
922 #line 923 "configure"
923 #include "confdefs.h"
924
925 main(){return(0);}
926 EOF
927 if { (eval echo configure:928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
928   ac_cv_prog_cc_works=yes
929   # If we can't run a trivial program, we are probably using a cross compiler.
930   if (./conftest; exit) 2>/dev/null; then
931     ac_cv_prog_cc_cross=no
932   else
933     ac_cv_prog_cc_cross=yes
934   fi
935 else
936   echo "configure: failed program was:" >&5
937   cat conftest.$ac_ext >&5
938   ac_cv_prog_cc_works=no
939 fi
940 rm -fr conftest*
941 ac_ext=c
942 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
943 ac_cpp='$CPP $CPPFLAGS'
944 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
945 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
946 cross_compiling=$ac_cv_prog_cc_cross
947
948 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
949 if test $ac_cv_prog_cc_works = no; then
950   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
951 fi
952 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
953 echo "configure:954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
954 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
955 cross_compiling=$ac_cv_prog_cc_cross
956
957 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
958 echo "configure:959: checking whether we are using GNU C" >&5
959 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   cat > conftest.c <<EOF
963 #ifdef __GNUC__
964   yes;
965 #endif
966 EOF
967 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
968   ac_cv_prog_gcc=yes
969 else
970   ac_cv_prog_gcc=no
971 fi
972 fi
973
974 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
975
976 if test $ac_cv_prog_gcc = yes; then
977   GCC=yes
978 else
979   GCC=
980 fi
981
982 ac_test_CFLAGS="${CFLAGS+set}"
983 ac_save_CFLAGS="$CFLAGS"
984 CFLAGS=
985 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
986 echo "configure:987: checking whether ${CC-cc} accepts -g" >&5
987 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
988   echo $ac_n "(cached) $ac_c" 1>&6
989 else
990   echo 'void f(){}' > conftest.c
991 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
992   ac_cv_prog_cc_g=yes
993 else
994   ac_cv_prog_cc_g=no
995 fi
996 rm -f conftest*
997
998 fi
999
1000 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1001 if test "$ac_test_CFLAGS" = set; then
1002   CFLAGS="$ac_save_CFLAGS"
1003 elif test $ac_cv_prog_cc_g = yes; then
1004   if test "$GCC" = yes; then
1005     CFLAGS="-g -O2"
1006   else
1007     CFLAGS="-g"
1008   fi
1009 else
1010   if test "$GCC" = yes; then
1011     CFLAGS="-O2"
1012   else
1013     CFLAGS=
1014   fi
1015 fi
1016
1017 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1018 echo "configure:1019: checking how to run the C preprocessor" >&5
1019 # On Suns, sometimes $CPP names a directory.
1020 if test -n "$CPP" && test -d "$CPP"; then
1021   CPP=
1022 fi
1023 if test -z "$CPP"; then
1024 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027     # This must be in double quotes, not single quotes, because CPP may get
1028   # substituted into the Makefile and "${CC-cc}" will confuse make.
1029   CPP="${CC-cc} -E"
1030   # On the NeXT, cc -E runs the code through the compiler's parser,
1031   # not just through cpp.
1032   cat > conftest.$ac_ext <<EOF
1033 #line 1034 "configure"
1034 #include "confdefs.h"
1035 #include <assert.h>
1036 Syntax Error
1037 EOF
1038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1039 { (eval echo configure:1040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1041 if test -z "$ac_err"; then
1042   :
1043 else
1044   echo "$ac_err" >&5
1045   echo "configure: failed program was:" >&5
1046   cat conftest.$ac_ext >&5
1047   rm -rf conftest*
1048   CPP="${CC-cc} -E -traditional-cpp"
1049   cat > conftest.$ac_ext <<EOF
1050 #line 1051 "configure"
1051 #include "confdefs.h"
1052 #include <assert.h>
1053 Syntax Error
1054 EOF
1055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1056 { (eval echo configure:1057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1058 if test -z "$ac_err"; then
1059   :
1060 else
1061   echo "$ac_err" >&5
1062   echo "configure: failed program was:" >&5
1063   cat conftest.$ac_ext >&5
1064   rm -rf conftest*
1065   CPP="${CC-cc} -nologo -E"
1066   cat > conftest.$ac_ext <<EOF
1067 #line 1068 "configure"
1068 #include "confdefs.h"
1069 #include <assert.h>
1070 Syntax Error
1071 EOF
1072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1073 { (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1075 if test -z "$ac_err"; then
1076   :
1077 else
1078   echo "$ac_err" >&5
1079   echo "configure: failed program was:" >&5
1080   cat conftest.$ac_ext >&5
1081   rm -rf conftest*
1082   CPP=/lib/cpp
1083 fi
1084 rm -f conftest*
1085 fi
1086 rm -f conftest*
1087 fi
1088 rm -f conftest*
1089   ac_cv_prog_CPP="$CPP"
1090 fi
1091   CPP="$ac_cv_prog_CPP"
1092 else
1093   ac_cv_prog_CPP="$CPP"
1094 fi
1095 echo "$ac_t""$CPP" 1>&6
1096
1097 # Find a good install program.  We prefer a C program (faster),
1098 # so one script is as good as another.  But avoid the broken or
1099 # incompatible versions:
1100 # SysV /etc/install, /usr/sbin/install
1101 # SunOS /usr/etc/install
1102 # IRIX /sbin/install
1103 # AIX /bin/install
1104 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1105 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1106 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1107 # ./install, which can be erroneously created by make from ./install.sh.
1108 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1109 echo "configure:1110: checking for a BSD compatible install" >&5
1110 if test -z "$INSTALL"; then
1111 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1112   echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1115   for ac_dir in $PATH; do
1116     # Account for people who put trailing slashes in PATH elements.
1117     case "$ac_dir/" in
1118     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1119     *)
1120       # OSF1 and SCO ODT 3.0 have their own names for install.
1121       # Don't use installbsd from OSF since it installs stuff as root
1122       # by default.
1123       for ac_prog in ginstall scoinst install; do
1124         if test -f $ac_dir/$ac_prog; then
1125           if test $ac_prog = install &&
1126             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1127             # AIX install.  It has an incompatible calling convention.
1128             :
1129           else
1130             ac_cv_path_install="$ac_dir/$ac_prog -c"
1131             break 2
1132           fi
1133         fi
1134       done
1135       ;;
1136     esac
1137   done
1138   IFS="$ac_save_IFS"
1139
1140 fi
1141   if test "${ac_cv_path_install+set}" = set; then
1142     INSTALL="$ac_cv_path_install"
1143   else
1144     # As a last resort, use the slow shell script.  We don't cache a
1145     # path for INSTALL within a source directory, because that will
1146     # break other packages using the cache if that directory is
1147     # removed, or if the path is relative.
1148     INSTALL="$ac_install_sh"
1149   fi
1150 fi
1151 echo "$ac_t""$INSTALL" 1>&6
1152
1153 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1154 # It thinks the first close brace ends the variable substitution.
1155 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1156
1157 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1158
1159 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1160
1161 # Check whether --enable-shared or --disable-shared was given.
1162 if test "${enable_shared+set}" = set; then
1163   enableval="$enable_shared"
1164   p=${PACKAGE-default}
1165 case "$enableval" in
1166 yes) enable_shared=yes ;;
1167 no) enable_shared=no ;;
1168 *)
1169   enable_shared=no
1170   # Look at the argument we got.  We use all the common list separators.
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1172   for pkg in $enableval; do
1173     if test "X$pkg" = "X$p"; then
1174       enable_shared=yes
1175     fi
1176   done
1177   IFS="$ac_save_ifs"
1178   ;;
1179 esac
1180 else
1181   enable_shared=no
1182 fi
1183
1184 # Check whether --enable-static or --disable-static was given.
1185 if test "${enable_static+set}" = set; then
1186   enableval="$enable_static"
1187   p=${PACKAGE-default}
1188 case "$enableval" in
1189 yes) enable_static=yes ;;
1190 no) enable_static=no ;;
1191 *)
1192   enable_static=no
1193   # Look at the argument we got.  We use all the common list separators.
1194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1195   for pkg in $enableval; do
1196     if test "X$pkg" = "X$p"; then
1197       enable_static=yes
1198     fi
1199   done
1200   IFS="$ac_save_ifs"
1201   ;;
1202 esac
1203 else
1204   enable_static=yes
1205 fi
1206
1207 # Check whether --enable-fast-install or --disable-fast-install was given.
1208 if test "${enable_fast_install+set}" = set; then
1209   enableval="$enable_fast_install"
1210   p=${PACKAGE-default}
1211 case "$enableval" in
1212 yes) enable_fast_install=yes ;;
1213 no) enable_fast_install=no ;;
1214 *)
1215   enable_fast_install=no
1216   # Look at the argument we got.  We use all the common list separators.
1217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1218   for pkg in $enableval; do
1219     if test "X$pkg" = "X$p"; then
1220       enable_fast_install=yes
1221     fi
1222   done
1223   IFS="$ac_save_ifs"
1224   ;;
1225 esac
1226 else
1227   enable_fast_install=yes
1228 fi
1229
1230
1231 # Make sure we can run config.sub.
1232 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1233 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1234 fi
1235
1236 echo $ac_n "checking host system type""... $ac_c" 1>&6
1237 echo "configure:1238: checking host system type" >&5
1238
1239 host_alias=$host
1240 case "$host_alias" in
1241 NONE)
1242   case $nonopt in
1243   NONE)
1244     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1245     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1246     fi ;;
1247   *) host_alias=$nonopt ;;
1248   esac ;;
1249 esac
1250
1251 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1252 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1253 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1254 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1255 echo "$ac_t""$host" 1>&6
1256
1257 echo $ac_n "checking build system type""... $ac_c" 1>&6
1258 echo "configure:1259: checking build system type" >&5
1259
1260 build_alias=$build
1261 case "$build_alias" in
1262 NONE)
1263   case $nonopt in
1264   NONE) build_alias=$host_alias ;;
1265   *) build_alias=$nonopt ;;
1266   esac ;;
1267 esac
1268
1269 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1270 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1271 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1272 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1273 echo "$ac_t""$build" 1>&6
1274
1275 # Extract the first word of "ranlib", so it can be a program name with args.
1276 set dummy ranlib; ac_word=$2
1277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1278 echo "configure:1279: checking for $ac_word" >&5
1279 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1280   echo $ac_n "(cached) $ac_c" 1>&6
1281 else
1282   if test -n "$RANLIB"; then
1283   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1284 else
1285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1286   ac_dummy="$PATH"
1287   for ac_dir in $ac_dummy; do
1288     test -z "$ac_dir" && ac_dir=.
1289     if test -f $ac_dir/$ac_word; then
1290       ac_cv_prog_RANLIB="ranlib"
1291       break
1292     fi
1293   done
1294   IFS="$ac_save_ifs"
1295   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1296 fi
1297 fi
1298 RANLIB="$ac_cv_prog_RANLIB"
1299 if test -n "$RANLIB"; then
1300   echo "$ac_t""$RANLIB" 1>&6
1301 else
1302   echo "$ac_t""no" 1>&6
1303 fi
1304
1305 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1306 if test "${with_gnu_ld+set}" = set; then
1307   withval="$with_gnu_ld"
1308   test "$withval" = no || with_gnu_ld=yes
1309 else
1310   with_gnu_ld=no
1311 fi
1312
1313 ac_prog=ld
1314 if test "$ac_cv_prog_gcc" = yes; then
1315   # Check if gcc -print-prog-name=ld gives a path.
1316   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1317 echo "configure:1318: checking for ld used by GCC" >&5
1318   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1319   case "$ac_prog" in
1320     # Accept absolute paths.
1321     [\\/]* | [A-Za-z]:[\\/]*)
1322       re_direlt='/[^/][^/]*/\.\./'
1323       # Canonicalize the path of ld
1324       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1325       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1326         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1327       done
1328       test -z "$LD" && LD="$ac_prog"
1329       ;;
1330   "")
1331     # If it fails, then pretend we aren't using GCC.
1332     ac_prog=ld
1333     ;;
1334   *)
1335     # If it is relative, then search for the first ld in PATH.
1336     with_gnu_ld=unknown
1337     ;;
1338   esac
1339 elif test "$with_gnu_ld" = yes; then
1340   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1341 echo "configure:1342: checking for GNU ld" >&5
1342 else
1343   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1344 echo "configure:1345: checking for non-GNU ld" >&5
1345 fi
1346 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   if test -z "$LD"; then
1350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1351   for ac_dir in $PATH; do
1352     test -z "$ac_dir" && ac_dir=.
1353     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1354       ac_cv_path_LD="$ac_dir/$ac_prog"
1355       # Check to see if the program is GNU ld.  I'd rather use --version,
1356       # but apparently some GNU ld's only accept -v.
1357       # Break only if it was the GNU/non-GNU ld that we prefer.
1358       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1359         test "$with_gnu_ld" != no && break
1360       else
1361         test "$with_gnu_ld" != yes && break
1362       fi
1363     fi
1364   done
1365   IFS="$ac_save_ifs"
1366 else
1367   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1368 fi
1369 fi
1370
1371 LD="$ac_cv_path_LD"
1372 if test -n "$LD"; then
1373   echo "$ac_t""$LD" 1>&6
1374 else
1375   echo "$ac_t""no" 1>&6
1376 fi
1377 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1378
1379 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1380 echo "configure:1381: checking if the linker ($LD) is GNU ld" >&5
1381 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1382   echo $ac_n "(cached) $ac_c" 1>&6
1383 else
1384   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1385 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1386   ac_cv_prog_gnu_ld=yes
1387 else
1388   ac_cv_prog_gnu_ld=no
1389 fi
1390 fi
1391
1392 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1393
1394
1395 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1396 echo "configure:1397: checking for BSD-compatible nm" >&5
1397 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1398   echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400   if test -n "$NM"; then
1401   # Let the user override the test.
1402   ac_cv_path_NM="$NM"
1403 else
1404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1405   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1406     test -z "$ac_dir" && ac_dir=.
1407     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1408       # Check to see if the nm accepts a BSD-compat flag.
1409       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1410       #   nm: unknown option "B" ignored
1411       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1412         ac_cv_path_NM="$ac_dir/nm -B"
1413         break
1414       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1415         ac_cv_path_NM="$ac_dir/nm -p"
1416         break
1417       else
1418         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1419         continue # so that we can try to find one that supports BSD flags
1420       fi
1421     fi
1422   done
1423   IFS="$ac_save_ifs"
1424   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1425 fi
1426 fi
1427
1428 NM="$ac_cv_path_NM"
1429 echo "$ac_t""$NM" 1>&6
1430
1431
1432 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1433 echo "configure:1434: checking whether ln -s works" >&5
1434 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1435   echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437   rm -f conftestdata
1438 if ln -s X conftestdata 2>/dev/null
1439 then
1440   rm -f conftestdata
1441   ac_cv_prog_LN_S="ln -s"
1442 else
1443   ac_cv_prog_LN_S=ln
1444 fi
1445 fi
1446 LN_S="$ac_cv_prog_LN_S"
1447 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1448   echo "$ac_t""yes" 1>&6
1449 else
1450   echo "$ac_t""no" 1>&6
1451 fi
1452
1453
1454 # Check for any special flags to pass to ltconfig.
1455 #
1456 # the following will cause an existing older ltconfig to fail, so
1457 # we ignore this at the expense of the cache file... Checking this 
1458 # will just take longer ... bummer!
1459 #libtool_flags="--cache-file=$cache_file"
1460 #
1461 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1462 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1463 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1464 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1465 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1466
1467
1468 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1469 if test "${enable_libtool_lock+set}" = set; then
1470   enableval="$enable_libtool_lock"
1471   :
1472 fi
1473
1474 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1475 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1476
1477 # Some flags need to be propagated to the compiler or linker for good
1478 # libtool support.
1479 case "$host" in
1480 *-*-irix6*)
1481   # Find out which ABI we are using.
1482   echo '#line 1483 "configure"' > conftest.$ac_ext
1483   if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484     case "`/usr/bin/file conftest.o`" in
1485     *32-bit*)
1486       LD="${LD-ld} -32"
1487       ;;
1488     *N32*)
1489       LD="${LD-ld} -n32"
1490       ;;
1491     *64-bit*)
1492       LD="${LD-ld} -64"
1493       ;;
1494     esac
1495   fi
1496   rm -rf conftest*
1497   ;;
1498
1499 *-*-sco3.2v5*)
1500   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1501   SAVE_CFLAGS="$CFLAGS"
1502   CFLAGS="$CFLAGS -belf"
1503   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1504 echo "configure:1505: checking whether the C compiler needs -belf" >&5
1505 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1506   echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508   cat > conftest.$ac_ext <<EOF
1509 #line 1510 "configure"
1510 #include "confdefs.h"
1511
1512 int main() {
1513
1514 ; return 0; }
1515 EOF
1516 if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1517   rm -rf conftest*
1518   lt_cv_cc_needs_belf=yes
1519 else
1520   echo "configure: failed program was:" >&5
1521   cat conftest.$ac_ext >&5
1522   rm -rf conftest*
1523   lt_cv_cc_needs_belf=no
1524 fi
1525 rm -f conftest*
1526 fi
1527
1528 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1529   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1530     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1531     CFLAGS="$SAVE_CFLAGS"
1532   fi
1533   ;;
1534
1535
1536 esac
1537
1538
1539 # Save cache, so that ltconfig can load it
1540 cat > confcache <<\EOF
1541 # This file is a shell script that caches the results of configure
1542 # tests run on this system so they can be shared between configure
1543 # scripts and configure runs.  It is not useful on other systems.
1544 # If it contains results you don't want to keep, you may remove or edit it.
1545 #
1546 # By default, configure uses ./config.cache as the cache file,
1547 # creating it if it does not exist already.  You can give configure
1548 # the --cache-file=FILE option to use a different cache file; that is
1549 # what configure does when it calls configure scripts in
1550 # subdirectories, so they share the cache.
1551 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1552 # config.status only pays attention to the cache file if you give it the
1553 # --recheck option to rerun configure.
1554 #
1555 EOF
1556 # The following way of writing the cache mishandles newlines in values,
1557 # but we know of no workaround that is simple, portable, and efficient.
1558 # So, don't put newlines in cache variables' values.
1559 # Ultrix sh set writes to stderr and can't be redirected directly,
1560 # and sets the high bit in the cache file unless we assign to the vars.
1561 (set) 2>&1 |
1562   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1563   *ac_space=\ *)
1564     # `set' does not quote correctly, so add quotes (double-quote substitution
1565     # turns \\\\ into \\, and sed turns \\ into \).
1566     sed -n \
1567       -e "s/'/'\\\\''/g" \
1568       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1569     ;;
1570   *)
1571     # `set' quotes correctly as required by POSIX, so do not add quotes.
1572     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1573     ;;
1574   esac >> confcache
1575 if cmp -s $cache_file confcache; then
1576   :
1577 else
1578   if test -w $cache_file; then
1579     echo "updating cache $cache_file"
1580     cat confcache > $cache_file
1581   else
1582     echo "not updating unwritable cache $cache_file"
1583   fi
1584 fi
1585 rm -f confcache
1586
1587
1588 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1589 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1590 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1591 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1592 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1593 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1594 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1595 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1596
1597 # Reload cache, that may have been modified by ltconfig
1598 if test -r "$cache_file"; then
1599   echo "loading cache $cache_file"
1600   . $cache_file
1601 else
1602   echo "creating cache $cache_file"
1603   > $cache_file
1604 fi
1605
1606
1607 # This can be used to rebuild libtool when needed
1608 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1609
1610 # Always use our own libtool.
1611 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1612
1613 # Redirect the config.log output again, so that the ltconfig log is not
1614 # clobbered by the next message.
1615 exec 5>>./config.log
1616
1617
1618
1619
1620 # Check whether --enable-comp or --disable-comp was given.
1621 if test "${enable_comp+set}" = set; then
1622   enableval="$enable_comp"
1623   :
1624 else
1625   enable_comp=yes
1626 fi
1627
1628 if test "$enable_comp" = "yes"; then
1629         ASNMODULE="z39.50"
1630         ILLMODULE="ill"
1631         ILLLIB=../ill/libill.la
1632         ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
1633         HFILE=${srcdir}/include/yaz/z-proto.h
1634 else
1635         ILLMODULE=""
1636         ASNMODULE=asn
1637         ILLLIB=""
1638         ASN_MAKEFILES="asn/Makefile"
1639         HFILE=${srcdir}/asn/prt-proto.h
1640 fi
1641 echo $ac_n "checking whether proto.h needs to be generated""... $ac_c" 1>&6
1642 echo "configure:1643: checking whether proto.h needs to be generated" >&5
1643 yaz_include=${srcdir}/include/yaz
1644 if test -r ${yaz_include}/proto.h && cmp -s $HFILE ${yaz_include}/proto.h; then
1645         echo "$ac_t""no" 1>&6
1646 else
1647         echo "$ac_t""yes" 1>&6
1648         cp -f $HFILE ${yaz_include}/proto.h
1649         if test "$enable_comp" != "yes"; then
1650                 cp ${srcdir}/asn/*.h ${yaz_include}
1651         fi
1652 fi
1653 checkBoth=0
1654 echo $ac_n "checking for connect""... $ac_c" 1>&6
1655 echo "configure:1656: checking for connect" >&5
1656 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1657   echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659   cat > conftest.$ac_ext <<EOF
1660 #line 1661 "configure"
1661 #include "confdefs.h"
1662 /* System header to define __stub macros and hopefully few prototypes,
1663     which can conflict with char connect(); below.  */
1664 #include <assert.h>
1665 /* Override any gcc2 internal prototype to avoid an error.  */
1666 /* We use char because int might match the return type of a gcc2
1667     builtin and then its argument prototype would still apply.  */
1668 char connect();
1669
1670 int main() {
1671
1672 /* The GNU C library defines this for functions which it implements
1673     to always fail with ENOSYS.  Some functions are actually named
1674     something starting with __ and the normal name is an alias.  */
1675 #if defined (__stub_connect) || defined (__stub___connect)
1676 choke me
1677 #else
1678 connect();
1679 #endif
1680
1681 ; return 0; }
1682 EOF
1683 if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1684   rm -rf conftest*
1685   eval "ac_cv_func_connect=yes"
1686 else
1687   echo "configure: failed program was:" >&5
1688   cat conftest.$ac_ext >&5
1689   rm -rf conftest*
1690   eval "ac_cv_func_connect=no"
1691 fi
1692 rm -f conftest*
1693 fi
1694
1695 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1696   echo "$ac_t""yes" 1>&6
1697   :
1698 else
1699   echo "$ac_t""no" 1>&6
1700 fi
1701
1702 if test "$ac_cv_func_connect" = "no"; then
1703         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1704 echo "configure:1705: checking for main in -lsocket" >&5
1705 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1707   echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709   ac_save_LIBS="$LIBS"
1710 LIBS="-lsocket  $LIBS"
1711 cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714
1715 int main() {
1716 main()
1717 ; return 0; }
1718 EOF
1719 if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1720   rm -rf conftest*
1721   eval "ac_cv_lib_$ac_lib_var=yes"
1722 else
1723   echo "configure: failed program was:" >&5
1724   cat conftest.$ac_ext >&5
1725   rm -rf conftest*
1726   eval "ac_cv_lib_$ac_lib_var=no"
1727 fi
1728 rm -f conftest*
1729 LIBS="$ac_save_LIBS"
1730
1731 fi
1732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1733   echo "$ac_t""yes" 1>&6
1734   LIBS="$LIBS -lsocket"
1735 else
1736   echo "$ac_t""no" 1>&6
1737 checkBoth=1
1738 fi
1739
1740 fi
1741 if test "$checkBoth" = "1"; then
1742         oldLibs=$LIBS
1743         LIBS="$LIBS -lsocket -lnsl"
1744         echo $ac_n "checking for accept""... $ac_c" 1>&6
1745 echo "configure:1746: checking for accept" >&5
1746 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1747   echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749   cat > conftest.$ac_ext <<EOF
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752 /* System header to define __stub macros and hopefully few prototypes,
1753     which can conflict with char accept(); below.  */
1754 #include <assert.h>
1755 /* Override any gcc2 internal prototype to avoid an error.  */
1756 /* We use char because int might match the return type of a gcc2
1757     builtin and then its argument prototype would still apply.  */
1758 char accept();
1759
1760 int main() {
1761
1762 /* The GNU C library defines this for functions which it implements
1763     to always fail with ENOSYS.  Some functions are actually named
1764     something starting with __ and the normal name is an alias.  */
1765 #if defined (__stub_accept) || defined (__stub___accept)
1766 choke me
1767 #else
1768 accept();
1769 #endif
1770
1771 ; return 0; }
1772 EOF
1773 if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1774   rm -rf conftest*
1775   eval "ac_cv_func_accept=yes"
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779   rm -rf conftest*
1780   eval "ac_cv_func_accept=no"
1781 fi
1782 rm -f conftest*
1783 fi
1784
1785 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1786   echo "$ac_t""yes" 1>&6
1787   :
1788 else
1789   echo "$ac_t""no" 1>&6
1790 LIBS=$oldLibs
1791 fi
1792
1793 fi
1794 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1795 echo "configure:1796: checking for gethostbyname" >&5
1796 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1797   echo $ac_n "(cached) $ac_c" 1>&6
1798 else
1799   cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 /* System header to define __stub macros and hopefully few prototypes,
1803     which can conflict with char gethostbyname(); below.  */
1804 #include <assert.h>
1805 /* Override any gcc2 internal prototype to avoid an error.  */
1806 /* We use char because int might match the return type of a gcc2
1807     builtin and then its argument prototype would still apply.  */
1808 char gethostbyname();
1809
1810 int main() {
1811
1812 /* The GNU C library defines this for functions which it implements
1813     to always fail with ENOSYS.  Some functions are actually named
1814     something starting with __ and the normal name is an alias.  */
1815 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1816 choke me
1817 #else
1818 gethostbyname();
1819 #endif
1820
1821 ; return 0; }
1822 EOF
1823 if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1824   rm -rf conftest*
1825   eval "ac_cv_func_gethostbyname=yes"
1826 else
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   eval "ac_cv_func_gethostbyname=no"
1831 fi
1832 rm -f conftest*
1833 fi
1834
1835 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1836   echo "$ac_t""yes" 1>&6
1837   :
1838 else
1839   echo "$ac_t""no" 1>&6
1840 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1841 echo "configure:1842: checking for main in -lnsl" >&5
1842 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1844   echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846   ac_save_LIBS="$LIBS"
1847 LIBS="-lnsl  $LIBS"
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851
1852 int main() {
1853 main()
1854 ; return 0; }
1855 EOF
1856 if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1857   rm -rf conftest*
1858   eval "ac_cv_lib_$ac_lib_var=yes"
1859 else
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   eval "ac_cv_lib_$ac_lib_var=no"
1864 fi
1865 rm -f conftest*
1866 LIBS="$ac_save_LIBS"
1867
1868 fi
1869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1870   echo "$ac_t""yes" 1>&6
1871   LIBS="$LIBS -lnsl"
1872 else
1873   echo "$ac_t""no" 1>&6
1874 fi
1875
1876 fi
1877
1878 openssl=no
1879 # Check whether --with-openssl or --without-openssl was given.
1880 if test "${with_openssl+set}" = set; then
1881   withval="$with_openssl"
1882   openssl=$withval
1883 fi
1884
1885 if test "$openssl" = "yes"; then
1886         echo $ac_n "checking for main in -lcrypto""... $ac_c" 1>&6
1887 echo "configure:1888: checking for main in -lcrypto" >&5
1888 ac_lib_var=`echo crypto'_'main | sed 'y%./+-%__p_%'`
1889 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1890   echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892   ac_save_LIBS="$LIBS"
1893 LIBS="-lcrypto  $LIBS"
1894 cat > conftest.$ac_ext <<EOF
1895 #line 1896 "configure"
1896 #include "confdefs.h"
1897
1898 int main() {
1899 main()
1900 ; return 0; }
1901 EOF
1902 if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1903   rm -rf conftest*
1904   eval "ac_cv_lib_$ac_lib_var=yes"
1905 else
1906   echo "configure: failed program was:" >&5
1907   cat conftest.$ac_ext >&5
1908   rm -rf conftest*
1909   eval "ac_cv_lib_$ac_lib_var=no"
1910 fi
1911 rm -f conftest*
1912 LIBS="$ac_save_LIBS"
1913
1914 fi
1915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1916   echo "$ac_t""yes" 1>&6
1917     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1918     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1919   cat >> confdefs.h <<EOF
1920 #define $ac_tr_lib 1
1921 EOF
1922
1923   LIBS="-lcrypto $LIBS"
1924
1925 else
1926   echo "$ac_t""no" 1>&6
1927 fi
1928
1929         echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
1930 echo "configure:1931: checking for SSL_new in -lssl" >&5
1931 ac_lib_var=`echo ssl'_'SSL_new | sed 'y%./+-%__p_%'`
1932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1933   echo $ac_n "(cached) $ac_c" 1>&6
1934 else
1935   ac_save_LIBS="$LIBS"
1936 LIBS="-lssl  $LIBS"
1937 cat > conftest.$ac_ext <<EOF
1938 #line 1939 "configure"
1939 #include "confdefs.h"
1940 /* Override any gcc2 internal prototype to avoid an error.  */
1941 /* We use char because int might match the return type of a gcc2
1942     builtin and then its argument prototype would still apply.  */
1943 char SSL_new();
1944
1945 int main() {
1946 SSL_new()
1947 ; return 0; }
1948 EOF
1949 if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1950   rm -rf conftest*
1951   eval "ac_cv_lib_$ac_lib_var=yes"
1952 else
1953   echo "configure: failed program was:" >&5
1954   cat conftest.$ac_ext >&5
1955   rm -rf conftest*
1956   eval "ac_cv_lib_$ac_lib_var=no"
1957 fi
1958 rm -f conftest*
1959 LIBS="$ac_save_LIBS"
1960
1961 fi
1962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1963   echo "$ac_t""yes" 1>&6
1964     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1966   cat >> confdefs.h <<EOF
1967 #define $ac_tr_lib 1
1968 EOF
1969
1970   LIBS="-lssl $LIBS"
1971
1972 else
1973   echo "$ac_t""no" 1>&6
1974 fi
1975
1976         if test "$ac_cv_lib_ssl_SSL_new" = "yes"; then
1977                 for ac_hdr in openssl/ssl.h
1978 do
1979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1981 echo "configure:1982: checking for $ac_hdr" >&5
1982 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1983   echo $ac_n "(cached) $ac_c" 1>&6
1984 else
1985   cat > conftest.$ac_ext <<EOF
1986 #line 1987 "configure"
1987 #include "confdefs.h"
1988 #include <$ac_hdr>
1989 EOF
1990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1991 { (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1993 if test -z "$ac_err"; then
1994   rm -rf conftest*
1995   eval "ac_cv_header_$ac_safe=yes"
1996 else
1997   echo "$ac_err" >&5
1998   echo "configure: failed program was:" >&5
1999   cat conftest.$ac_ext >&5
2000   rm -rf conftest*
2001   eval "ac_cv_header_$ac_safe=no"
2002 fi
2003 rm -f conftest*
2004 fi
2005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2006   echo "$ac_t""yes" 1>&6
2007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2008   cat >> confdefs.h <<EOF
2009 #define $ac_tr_hdr 1
2010 EOF
2011  
2012 else
2013   echo "$ac_t""no" 1>&6
2014 fi
2015 done
2016
2017         fi
2018 fi
2019 READLINE_LIBS=""
2020 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2021 echo "configure:2022: checking for readline in -lreadline" >&5
2022 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2024   echo $ac_n "(cached) $ac_c" 1>&6
2025 else
2026   ac_save_LIBS="$LIBS"
2027 LIBS="-lreadline  $LIBS"
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031 /* Override any gcc2 internal prototype to avoid an error.  */
2032 /* We use char because int might match the return type of a gcc2
2033     builtin and then its argument prototype would still apply.  */
2034 char readline();
2035
2036 int main() {
2037 readline()
2038 ; return 0; }
2039 EOF
2040 if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2041   rm -rf conftest*
2042   eval "ac_cv_lib_$ac_lib_var=yes"
2043 else
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -rf conftest*
2047   eval "ac_cv_lib_$ac_lib_var=no"
2048 fi
2049 rm -f conftest*
2050 LIBS="$ac_save_LIBS"
2051
2052 fi
2053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2054   echo "$ac_t""yes" 1>&6
2055   READLINE_LIBS="$READLINE_LIBS -lreadline"
2056 else
2057   echo "$ac_t""no" 1>&6
2058 fi
2059
2060 if test "$ac_cv_lib_readline_readline" = "no"; then
2061         echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2062 echo "configure:2063: checking for readline in -lreadline" >&5
2063 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2064 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2065   echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067   ac_save_LIBS="$LIBS"
2068 LIBS="-lreadline  $LIBS"
2069 cat > conftest.$ac_ext <<EOF
2070 #line 2071 "configure"
2071 #include "confdefs.h"
2072 /* Override any gcc2 internal prototype to avoid an error.  */
2073 /* We use char because int might match the return type of a gcc2
2074     builtin and then its argument prototype would still apply.  */
2075 char readline();
2076
2077 int main() {
2078 readline()
2079 ; return 0; }
2080 EOF
2081 if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2082   rm -rf conftest*
2083   eval "ac_cv_lib_$ac_lib_var=yes"
2084 else
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   eval "ac_cv_lib_$ac_lib_var=no"
2089 fi
2090 rm -f conftest*
2091 LIBS="$ac_save_LIBS"
2092
2093 fi
2094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2095   echo "$ac_t""yes" 1>&6
2096   READLINE_LIBS="$READLINE_LIBS -lreadline -ltermcap"
2097 else
2098   echo "$ac_t""no" 1>&6
2099 fi
2100
2101 fi
2102 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
2103 echo "configure:2104: checking for add_history in -lhistory" >&5
2104 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
2105 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2106   echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108   ac_save_LIBS="$LIBS"
2109 LIBS="-lhistory  $LIBS"
2110 cat > conftest.$ac_ext <<EOF
2111 #line 2112 "configure"
2112 #include "confdefs.h"
2113 /* Override any gcc2 internal prototype to avoid an error.  */
2114 /* We use char because int might match the return type of a gcc2
2115     builtin and then its argument prototype would still apply.  */
2116 char add_history();
2117
2118 int main() {
2119 add_history()
2120 ; return 0; }
2121 EOF
2122 if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2123   rm -rf conftest*
2124   eval "ac_cv_lib_$ac_lib_var=yes"
2125 else
2126   echo "configure: failed program was:" >&5
2127   cat conftest.$ac_ext >&5
2128   rm -rf conftest*
2129   eval "ac_cv_lib_$ac_lib_var=no"
2130 fi
2131 rm -f conftest*
2132 LIBS="$ac_save_LIBS"
2133
2134 fi
2135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2136   echo "$ac_t""yes" 1>&6
2137   READLINE_LIBS="$READLINE_LIBS -lhistory"
2138 else
2139   echo "$ac_t""no" 1>&6
2140 fi
2141
2142 if test "$ac_cv_lib_readline_readline" = "yes"; then
2143         for ac_hdr in readline/readline.h readline/history.h
2144 do
2145 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2146 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2147 echo "configure:2148: checking for $ac_hdr" >&5
2148 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2149   echo $ac_n "(cached) $ac_c" 1>&6
2150 else
2151   cat > conftest.$ac_ext <<EOF
2152 #line 2153 "configure"
2153 #include "confdefs.h"
2154 #include <$ac_hdr>
2155 EOF
2156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2157 { (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2159 if test -z "$ac_err"; then
2160   rm -rf conftest*
2161   eval "ac_cv_header_$ac_safe=yes"
2162 else
2163   echo "$ac_err" >&5
2164   echo "configure: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   rm -rf conftest*
2167   eval "ac_cv_header_$ac_safe=no"
2168 fi
2169 rm -f conftest*
2170 fi
2171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2172   echo "$ac_t""yes" 1>&6
2173     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2174   cat >> confdefs.h <<EOF
2175 #define $ac_tr_hdr 1
2176 EOF
2177  
2178 else
2179   echo "$ac_t""no" 1>&6
2180 fi
2181 done
2182
2183 fi
2184 for ac_func in vsnprintf gettimeofday
2185 do
2186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2187 echo "configure:2188: checking for $ac_func" >&5
2188 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2189   echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191   cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 /* System header to define __stub macros and hopefully few prototypes,
2195     which can conflict with char $ac_func(); below.  */
2196 #include <assert.h>
2197 /* Override any gcc2 internal prototype to avoid an error.  */
2198 /* We use char because int might match the return type of a gcc2
2199     builtin and then its argument prototype would still apply.  */
2200 char $ac_func();
2201
2202 int main() {
2203
2204 /* The GNU C library defines this for functions which it implements
2205     to always fail with ENOSYS.  Some functions are actually named
2206     something starting with __ and the normal name is an alias.  */
2207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2208 choke me
2209 #else
2210 $ac_func();
2211 #endif
2212
2213 ; return 0; }
2214 EOF
2215 if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2216   rm -rf conftest*
2217   eval "ac_cv_func_$ac_func=yes"
2218 else
2219   echo "configure: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   rm -rf conftest*
2222   eval "ac_cv_func_$ac_func=no"
2223 fi
2224 rm -f conftest*
2225 fi
2226
2227 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2228   echo "$ac_t""yes" 1>&6
2229     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2230   cat >> confdefs.h <<EOF
2231 #define $ac_tr_func 1
2232 EOF
2233  
2234 else
2235   echo "$ac_t""no" 1>&6
2236 fi
2237 done
2238
2239 # Check whether --enable-tcpd or --disable-tcpd was given.
2240 if test "${enable_tcpd+set}" = set; then
2241   enableval="$enable_tcpd"
2242   :
2243 fi
2244
2245 if test "$enable_tcpd" != ""; then
2246         oldLibs=$LIBS
2247         oldCPPFLAGS=$CPPFLAGS
2248         if test "$enable_tcpd" != "yes"; then
2249                 LIBS="$LIBS -L$enable_tcpd/lib"
2250                 CPPFLAGS="$CPPFLAGS -I$enable_tcpd/include"
2251         fi
2252         echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
2253 echo "configure:2254: checking for working tcpd.h" >&5
2254         LIBS="$LIBS -lwrap -lnsl"
2255         cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 #include <syslog.h>
2259 #include <tcpd.h>
2260         int allow_severity = LOG_INFO;
2261         int deny_severity = LOG_WARNING;
2262 int main() {
2263 struct request_info request_info; int i;
2264         i = hosts_access(&request_info);
2265 ; return 0; }
2266 EOF
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2268   rm -rf conftest*
2269   tcpd_ok=1
2270 else
2271   echo "configure: failed program was:" >&5
2272   cat conftest.$ac_ext >&5
2273   rm -rf conftest*
2274   tcpd_ok=0
2275 fi
2276 rm -f conftest*
2277         if test "$tcpd_ok" = "0"; then
2278                 echo "$ac_t""no" 1>&6
2279                 LIBS=$oldLibs
2280                 CPPFLAGS=$oldCPPFLAGS
2281         else
2282                 echo "$ac_t""yes" 1>&6
2283                 cat >> confdefs.h <<\EOF
2284 #define HAVE_TCPD_H 1
2285 EOF
2286
2287         fi
2288 fi
2289 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2290 echo "configure:2291: checking for ANSI C header files" >&5
2291 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2292   echo $ac_n "(cached) $ac_c" 1>&6
2293 else
2294   cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 #include <stdlib.h>
2298 #include <stdarg.h>
2299 #include <string.h>
2300 #include <float.h>
2301 EOF
2302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2303 { (eval echo configure:2304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2305 if test -z "$ac_err"; then
2306   rm -rf conftest*
2307   ac_cv_header_stdc=yes
2308 else
2309   echo "$ac_err" >&5
2310   echo "configure: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   rm -rf conftest*
2313   ac_cv_header_stdc=no
2314 fi
2315 rm -f conftest*
2316
2317 if test $ac_cv_header_stdc = yes; then
2318   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2319 cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <string.h>
2323 EOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "memchr" >/dev/null 2>&1; then
2326   :
2327 else
2328   rm -rf conftest*
2329   ac_cv_header_stdc=no
2330 fi
2331 rm -f conftest*
2332
2333 fi
2334
2335 if test $ac_cv_header_stdc = yes; then
2336   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2337 cat > conftest.$ac_ext <<EOF
2338 #line 2339 "configure"
2339 #include "confdefs.h"
2340 #include <stdlib.h>
2341 EOF
2342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2343   egrep "free" >/dev/null 2>&1; then
2344   :
2345 else
2346   rm -rf conftest*
2347   ac_cv_header_stdc=no
2348 fi
2349 rm -f conftest*
2350
2351 fi
2352
2353 if test $ac_cv_header_stdc = yes; then
2354   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2355 if test "$cross_compiling" = yes; then
2356   :
2357 else
2358   cat > conftest.$ac_ext <<EOF
2359 #line 2360 "configure"
2360 #include "confdefs.h"
2361 #include <ctype.h>
2362 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2363 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2364 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2365 int main () { int i; for (i = 0; i < 256; i++)
2366 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2367 exit (0); }
2368
2369 EOF
2370 if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2371 then
2372   :
2373 else
2374   echo "configure: failed program was:" >&5
2375   cat conftest.$ac_ext >&5
2376   rm -fr conftest*
2377   ac_cv_header_stdc=no
2378 fi
2379 rm -fr conftest*
2380 fi
2381
2382 fi
2383 fi
2384
2385 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2386 if test $ac_cv_header_stdc = yes; then
2387   cat >> confdefs.h <<\EOF
2388 #define STDC_HEADERS 1
2389 EOF
2390
2391 fi
2392
2393 if test "$ac_cv_header_stdc" = "no"; then
2394         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
2395 fi
2396 # Check whether --enable-threads or --disable-threads was given.
2397 if test "${enable_threads+set}" = set; then
2398   enableval="$enable_threads"
2399   enable_threads=$enableval
2400 else
2401   enable_threads=yes
2402 fi
2403
2404
2405 if test "$enable_threads" = "yes"; then
2406         OLIBS=$LIBS
2407         echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
2408 echo "configure:2409: checking for main in -lpthread" >&5
2409 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
2410 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   ac_save_LIBS="$LIBS"
2414 LIBS="-lpthread  $LIBS"
2415 cat > conftest.$ac_ext <<EOF
2416 #line 2417 "configure"
2417 #include "confdefs.h"
2418
2419 int main() {
2420 main()
2421 ; return 0; }
2422 EOF
2423 if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2424   rm -rf conftest*
2425   eval "ac_cv_lib_$ac_lib_var=yes"
2426 else
2427   echo "configure: failed program was:" >&5
2428   cat conftest.$ac_ext >&5
2429   rm -rf conftest*
2430   eval "ac_cv_lib_$ac_lib_var=no"
2431 fi
2432 rm -f conftest*
2433 LIBS="$ac_save_LIBS"
2434
2435 fi
2436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2437   echo "$ac_t""yes" 1>&6
2438     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2439     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2440   cat >> confdefs.h <<EOF
2441 #define $ac_tr_lib 1
2442 EOF
2443
2444   LIBS="-lpthread $LIBS"
2445
2446 else
2447   echo "$ac_t""no" 1>&6
2448 fi
2449
2450         echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6
2451 echo "configure:2452: checking for working POSIX Threads" >&5
2452         cat > conftest.$ac_ext <<EOF
2453 #line 2454 "configure"
2454 #include "confdefs.h"
2455 #include <pthread.h>
2456         void *func(void *p) { return 0; }
2457         
2458 int main() {
2459
2460         pthread_t pthread_id;
2461         pthread_create (&pthread_id, 0, func, 0);
2462 ; return 0; }
2463 EOF
2464 if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2465   rm -rf conftest*
2466   thread_ok=yes
2467 else
2468   echo "configure: failed program was:" >&5
2469   cat conftest.$ac_ext >&5
2470   rm -rf conftest*
2471   thread_ok=no
2472 fi
2473 rm -f conftest*
2474         if test "$thread_ok" = "yes"; then
2475                 LIBTHREAD=-lpthread
2476                 echo "$ac_t""yes" 1>&6
2477                 HAVETHREADS=1
2478         else
2479                 LIBTHREAD=""
2480                 echo "$ac_t""no" 1>&6
2481                 HAVETHREADS=0
2482         fi
2483         LIBS=$OLIBS
2484 fi
2485
2486
2487 if test $HAVETHREADS = "1"; then
2488   ISTHR_TRUE=
2489   ISTHR_FALSE='#'
2490 else
2491   ISTHR_TRUE='#'
2492   ISTHR_FALSE=
2493 fi
2494
2495 YAZ_SRC_ROOT=`pwd`
2496 SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest"
2497
2498 if test -f lib/yaz-config.in; then
2499         rm lib/yaz-config.in
2500 fi
2501 sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config.in >lib/yaz-config.in
2502 trap '' 1 2 15
2503 cat > confcache <<\EOF
2504 # This file is a shell script that caches the results of configure
2505 # tests run on this system so they can be shared between configure
2506 # scripts and configure runs.  It is not useful on other systems.
2507 # If it contains results you don't want to keep, you may remove or edit it.
2508 #
2509 # By default, configure uses ./config.cache as the cache file,
2510 # creating it if it does not exist already.  You can give configure
2511 # the --cache-file=FILE option to use a different cache file; that is
2512 # what configure does when it calls configure scripts in
2513 # subdirectories, so they share the cache.
2514 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2515 # config.status only pays attention to the cache file if you give it the
2516 # --recheck option to rerun configure.
2517 #
2518 EOF
2519 # The following way of writing the cache mishandles newlines in values,
2520 # but we know of no workaround that is simple, portable, and efficient.
2521 # So, don't put newlines in cache variables' values.
2522 # Ultrix sh set writes to stderr and can't be redirected directly,
2523 # and sets the high bit in the cache file unless we assign to the vars.
2524 (set) 2>&1 |
2525   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2526   *ac_space=\ *)
2527     # `set' does not quote correctly, so add quotes (double-quote substitution
2528     # turns \\\\ into \\, and sed turns \\ into \).
2529     sed -n \
2530       -e "s/'/'\\\\''/g" \
2531       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2532     ;;
2533   *)
2534     # `set' quotes correctly as required by POSIX, so do not add quotes.
2535     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2536     ;;
2537   esac >> confcache
2538 if cmp -s $cache_file confcache; then
2539   :
2540 else
2541   if test -w $cache_file; then
2542     echo "updating cache $cache_file"
2543     cat confcache > $cache_file
2544   else
2545     echo "not updating unwritable cache $cache_file"
2546   fi
2547 fi
2548 rm -f confcache
2549
2550 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2551
2552 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2553 # Let make expand exec_prefix.
2554 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2555
2556 # Any assignment to VPATH causes Sun make to only execute
2557 # the first set of double-colon rules, so remove it if not needed.
2558 # If there is a colon in the path, we need to keep it.
2559 if test "x$srcdir" = x.; then
2560   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2561 fi
2562
2563 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2564
2565 # Transform confdefs.h into DEFS.
2566 # Protect against shell expansion while executing Makefile rules.
2567 # Protect against Makefile macro expansion.
2568 cat > conftest.defs <<\EOF
2569 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2570 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2571 s%\[%\\&%g
2572 s%\]%\\&%g
2573 s%\$%$$%g
2574 EOF
2575 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2576 rm -f conftest.defs
2577
2578
2579 # Without the "./", some shells look in PATH for config.status.
2580 : ${CONFIG_STATUS=./config.status}
2581
2582 echo creating $CONFIG_STATUS
2583 rm -f $CONFIG_STATUS
2584 cat > $CONFIG_STATUS <<EOF
2585 #! /bin/sh
2586 # Generated automatically by configure.
2587 # Run this file to recreate the current configuration.
2588 # This directory was configured as follows,
2589 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2590 #
2591 # $0 $ac_configure_args
2592 #
2593 # Compiler output produced by configure, useful for debugging
2594 # configure, is in ./config.log if it exists.
2595
2596 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2597 for ac_option
2598 do
2599   case "\$ac_option" in
2600   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2601     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2602     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2603   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2604     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2605     exit 0 ;;
2606   -help | --help | --hel | --he | --h)
2607     echo "\$ac_cs_usage"; exit 0 ;;
2608   *) echo "\$ac_cs_usage"; exit 1 ;;
2609   esac
2610 done
2611
2612 ac_given_srcdir=$srcdir
2613 ac_given_INSTALL="$INSTALL"
2614
2615 trap 'rm -fr `echo "
2616 Makefile
2617 util/Makefile
2618 odr/Makefile
2619 z39.50/Makefile
2620 asn/Makefile
2621 ill/Makefile
2622 zutil/Makefile
2623 comstack/Makefile
2624 ccl/Makefile
2625 tab/Makefile
2626 retrieval/Makefile
2627 server/Makefile
2628 include/Makefile
2629 include/yaz/Makefile
2630 lib/Makefile
2631 client/Makefile
2632 ztest/Makefile
2633 doc/Makefile
2634 yaz-config
2635 lib/yaz-config
2636 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2637 EOF
2638 cat >> $CONFIG_STATUS <<EOF
2639
2640 # Protect against being on the right side of a sed subst in config.status.
2641 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2642  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2643 $ac_vpsub
2644 $extrasub
2645 s%@SHELL@%$SHELL%g
2646 s%@CFLAGS@%$CFLAGS%g
2647 s%@CPPFLAGS@%$CPPFLAGS%g
2648 s%@CXXFLAGS@%$CXXFLAGS%g
2649 s%@FFLAGS@%$FFLAGS%g
2650 s%@DEFS@%$DEFS%g
2651 s%@LDFLAGS@%$LDFLAGS%g
2652 s%@LIBS@%$LIBS%g
2653 s%@exec_prefix@%$exec_prefix%g
2654 s%@prefix@%$prefix%g
2655 s%@program_transform_name@%$program_transform_name%g
2656 s%@bindir@%$bindir%g
2657 s%@sbindir@%$sbindir%g
2658 s%@libexecdir@%$libexecdir%g
2659 s%@datadir@%$datadir%g
2660 s%@sysconfdir@%$sysconfdir%g
2661 s%@sharedstatedir@%$sharedstatedir%g
2662 s%@localstatedir@%$localstatedir%g
2663 s%@libdir@%$libdir%g
2664 s%@includedir@%$includedir%g
2665 s%@oldincludedir@%$oldincludedir%g
2666 s%@infodir@%$infodir%g
2667 s%@mandir@%$mandir%g
2668 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2669 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2670 s%@INSTALL_DATA@%$INSTALL_DATA%g
2671 s%@PACKAGE@%$PACKAGE%g
2672 s%@VERSION@%$VERSION%g
2673 s%@ACLOCAL@%$ACLOCAL%g
2674 s%@AUTOCONF@%$AUTOCONF%g
2675 s%@AUTOMAKE@%$AUTOMAKE%g
2676 s%@AUTOHEADER@%$AUTOHEADER%g
2677 s%@MAKEINFO@%$MAKEINFO%g
2678 s%@SET_MAKE@%$SET_MAKE%g
2679 s%@READLINE_LIBS@%$READLINE_LIBS%g
2680 s%@CC@%$CC%g
2681 s%@CPP@%$CPP%g
2682 s%@host@%$host%g
2683 s%@host_alias@%$host_alias%g
2684 s%@host_cpu@%$host_cpu%g
2685 s%@host_vendor@%$host_vendor%g
2686 s%@host_os@%$host_os%g
2687 s%@build@%$build%g
2688 s%@build_alias@%$build_alias%g
2689 s%@build_cpu@%$build_cpu%g
2690 s%@build_vendor@%$build_vendor%g
2691 s%@build_os@%$build_os%g
2692 s%@RANLIB@%$RANLIB%g
2693 s%@LD@%$LD%g
2694 s%@NM@%$NM%g
2695 s%@LN_S@%$LN_S%g
2696 s%@LIBTOOL@%$LIBTOOL%g
2697 s%@ASNMODULE@%$ASNMODULE%g
2698 s%@ILLMODULE@%$ILLMODULE%g
2699 s%@ILLLIB@%$ILLLIB%g
2700 s%@LIBTHREAD@%$LIBTHREAD%g
2701 s%@ISTHR_TRUE@%$ISTHR_TRUE%g
2702 s%@ISTHR_FALSE@%$ISTHR_FALSE%g
2703 s%@YAZ_SRC_ROOT@%$YAZ_SRC_ROOT%g
2704 s%@SUBDIRS_VAR@%$SUBDIRS_VAR%g
2705
2706 CEOF
2707 EOF
2708
2709 cat >> $CONFIG_STATUS <<\EOF
2710
2711 # Split the substitutions into bite-sized pieces for seds with
2712 # small command number limits, like on Digital OSF/1 and HP-UX.
2713 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2714 ac_file=1 # Number of current file.
2715 ac_beg=1 # First line for current file.
2716 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2717 ac_more_lines=:
2718 ac_sed_cmds=""
2719 while $ac_more_lines; do
2720   if test $ac_beg -gt 1; then
2721     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2722   else
2723     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2724   fi
2725   if test ! -s conftest.s$ac_file; then
2726     ac_more_lines=false
2727     rm -f conftest.s$ac_file
2728   else
2729     if test -z "$ac_sed_cmds"; then
2730       ac_sed_cmds="sed -f conftest.s$ac_file"
2731     else
2732       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2733     fi
2734     ac_file=`expr $ac_file + 1`
2735     ac_beg=$ac_end
2736     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2737   fi
2738 done
2739 if test -z "$ac_sed_cmds"; then
2740   ac_sed_cmds=cat
2741 fi
2742 EOF
2743
2744 cat >> $CONFIG_STATUS <<EOF
2745
2746 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2747 util/Makefile
2748 odr/Makefile
2749 z39.50/Makefile
2750 asn/Makefile
2751 ill/Makefile
2752 zutil/Makefile
2753 comstack/Makefile
2754 ccl/Makefile
2755 tab/Makefile
2756 retrieval/Makefile
2757 server/Makefile
2758 include/Makefile
2759 include/yaz/Makefile
2760 lib/Makefile
2761 client/Makefile
2762 ztest/Makefile
2763 doc/Makefile
2764 yaz-config
2765 lib/yaz-config
2766 "}
2767 EOF
2768 cat >> $CONFIG_STATUS <<\EOF
2769 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2770   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2771   case "$ac_file" in
2772   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2773        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2774   *) ac_file_in="${ac_file}.in" ;;
2775   esac
2776
2777   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2778
2779   # Remove last slash and all that follows it.  Not all systems have dirname.
2780   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2781   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2782     # The file is in a subdirectory.
2783     test ! -d "$ac_dir" && mkdir "$ac_dir"
2784     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2785     # A "../" for each directory in $ac_dir_suffix.
2786     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2787   else
2788     ac_dir_suffix= ac_dots=
2789   fi
2790
2791   case "$ac_given_srcdir" in
2792   .)  srcdir=.
2793       if test -z "$ac_dots"; then top_srcdir=.
2794       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2795   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2796   *) # Relative path.
2797     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2798     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2799   esac
2800
2801   case "$ac_given_INSTALL" in
2802   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2803   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2804   esac
2805
2806   echo creating "$ac_file"
2807   rm -f "$ac_file"
2808   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2809   case "$ac_file" in
2810   *Makefile*) ac_comsub="1i\\
2811 # $configure_input" ;;
2812   *) ac_comsub= ;;
2813   esac
2814
2815   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2816   sed -e "$ac_comsub
2817 s%@configure_input@%$configure_input%g
2818 s%@srcdir@%$srcdir%g
2819 s%@top_srcdir@%$top_srcdir%g
2820 s%@INSTALL@%$INSTALL%g
2821 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2822 fi; done
2823 rm -f conftest.s*
2824
2825 EOF
2826 cat >> $CONFIG_STATUS <<EOF
2827
2828 EOF
2829 cat >> $CONFIG_STATUS <<\EOF
2830 chmod +x yaz-config lib/yaz-config
2831 exit 0
2832 EOF
2833 chmod +x $CONFIG_STATUS
2834 rm -fr confdefs* $ac_clean_files
2835 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2836