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