1e941e00132fd48c137025f78e2a27b714db239d
[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           enable TCP wrapper for server if available"
28 ac_help="$ac_help
29   --disable-threads       disable 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 # Extract the first word of "gcc", so it can be a program name with args.
793 set dummy gcc; ac_word=$2
794 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
795 echo "configure:796: checking for $ac_word" >&5
796 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
797   echo $ac_n "(cached) $ac_c" 1>&6
798 else
799   if test -n "$CC"; then
800   ac_cv_prog_CC="$CC" # Let the user override the test.
801 else
802   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
803   ac_dummy="$PATH"
804   for ac_dir in $ac_dummy; do
805     test -z "$ac_dir" && ac_dir=.
806     if test -f $ac_dir/$ac_word; then
807       ac_cv_prog_CC="gcc"
808       break
809     fi
810   done
811   IFS="$ac_save_ifs"
812 fi
813 fi
814 CC="$ac_cv_prog_CC"
815 if test -n "$CC"; then
816   echo "$ac_t""$CC" 1>&6
817 else
818   echo "$ac_t""no" 1>&6
819 fi
820
821 if test -z "$CC"; then
822   # Extract the first word of "cc", so it can be a program name with args.
823 set dummy cc; ac_word=$2
824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
825 echo "configure:826: checking for $ac_word" >&5
826 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
827   echo $ac_n "(cached) $ac_c" 1>&6
828 else
829   if test -n "$CC"; then
830   ac_cv_prog_CC="$CC" # Let the user override the test.
831 else
832   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
833   ac_prog_rejected=no
834   ac_dummy="$PATH"
835   for ac_dir in $ac_dummy; do
836     test -z "$ac_dir" && ac_dir=.
837     if test -f $ac_dir/$ac_word; then
838       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
839         ac_prog_rejected=yes
840         continue
841       fi
842       ac_cv_prog_CC="cc"
843       break
844     fi
845   done
846   IFS="$ac_save_ifs"
847 if test $ac_prog_rejected = yes; then
848   # We found a bogon in the path, so make sure we never use it.
849   set dummy $ac_cv_prog_CC
850   shift
851   if test $# -gt 0; then
852     # We chose a different compiler from the bogus one.
853     # However, it has the same basename, so the bogon will be chosen
854     # first if we set CC to just the basename; use the full file name.
855     shift
856     set dummy "$ac_dir/$ac_word" "$@"
857     shift
858     ac_cv_prog_CC="$@"
859   fi
860 fi
861 fi
862 fi
863 CC="$ac_cv_prog_CC"
864 if test -n "$CC"; then
865   echo "$ac_t""$CC" 1>&6
866 else
867   echo "$ac_t""no" 1>&6
868 fi
869
870   if test -z "$CC"; then
871     case "`uname -s`" in
872     *win32* | *WIN32*)
873       # Extract the first word of "cl", so it can be a program name with args.
874 set dummy cl; ac_word=$2
875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
876 echo "configure:877: checking for $ac_word" >&5
877 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
878   echo $ac_n "(cached) $ac_c" 1>&6
879 else
880   if test -n "$CC"; then
881   ac_cv_prog_CC="$CC" # Let the user override the test.
882 else
883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
884   ac_dummy="$PATH"
885   for ac_dir in $ac_dummy; do
886     test -z "$ac_dir" && ac_dir=.
887     if test -f $ac_dir/$ac_word; then
888       ac_cv_prog_CC="cl"
889       break
890     fi
891   done
892   IFS="$ac_save_ifs"
893 fi
894 fi
895 CC="$ac_cv_prog_CC"
896 if test -n "$CC"; then
897   echo "$ac_t""$CC" 1>&6
898 else
899   echo "$ac_t""no" 1>&6
900 fi
901  ;;
902     esac
903   fi
904   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
905 fi
906
907 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
908 echo "configure:909: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
909
910 ac_ext=c
911 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
912 ac_cpp='$CPP $CPPFLAGS'
913 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
914 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
915 cross_compiling=$ac_cv_prog_cc_cross
916
917 cat > conftest.$ac_ext << EOF
918
919 #line 920 "configure"
920 #include "confdefs.h"
921
922 main(){return(0);}
923 EOF
924 if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
925   ac_cv_prog_cc_works=yes
926   # If we can't run a trivial program, we are probably using a cross compiler.
927   if (./conftest; exit) 2>/dev/null; then
928     ac_cv_prog_cc_cross=no
929   else
930     ac_cv_prog_cc_cross=yes
931   fi
932 else
933   echo "configure: failed program was:" >&5
934   cat conftest.$ac_ext >&5
935   ac_cv_prog_cc_works=no
936 fi
937 rm -fr conftest*
938 ac_ext=c
939 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940 ac_cpp='$CPP $CPPFLAGS'
941 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943 cross_compiling=$ac_cv_prog_cc_cross
944
945 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
946 if test $ac_cv_prog_cc_works = no; then
947   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
948 fi
949 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
950 echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
951 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
952 cross_compiling=$ac_cv_prog_cc_cross
953
954 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
955 echo "configure:956: checking whether we are using GNU C" >&5
956 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   cat > conftest.c <<EOF
960 #ifdef __GNUC__
961   yes;
962 #endif
963 EOF
964 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
965   ac_cv_prog_gcc=yes
966 else
967   ac_cv_prog_gcc=no
968 fi
969 fi
970
971 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
972
973 if test $ac_cv_prog_gcc = yes; then
974   GCC=yes
975 else
976   GCC=
977 fi
978
979 ac_test_CFLAGS="${CFLAGS+set}"
980 ac_save_CFLAGS="$CFLAGS"
981 CFLAGS=
982 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${CC-cc} accepts -g" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
985   echo $ac_n "(cached) $ac_c" 1>&6
986 else
987   echo 'void f(){}' > conftest.c
988 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
989   ac_cv_prog_cc_g=yes
990 else
991   ac_cv_prog_cc_g=no
992 fi
993 rm -f conftest*
994
995 fi
996
997 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
998 if test "$ac_test_CFLAGS" = set; then
999   CFLAGS="$ac_save_CFLAGS"
1000 elif test $ac_cv_prog_cc_g = yes; then
1001   if test "$GCC" = yes; then
1002     CFLAGS="-g -O2"
1003   else
1004     CFLAGS="-g"
1005   fi
1006 else
1007   if test "$GCC" = yes; then
1008     CFLAGS="-O2"
1009   else
1010     CFLAGS=
1011   fi
1012 fi
1013
1014 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1015 echo "configure:1016: checking how to run the C preprocessor" >&5
1016 # On Suns, sometimes $CPP names a directory.
1017 if test -n "$CPP" && test -d "$CPP"; then
1018   CPP=
1019 fi
1020 if test -z "$CPP"; then
1021 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1022   echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024     # This must be in double quotes, not single quotes, because CPP may get
1025   # substituted into the Makefile and "${CC-cc}" will confuse make.
1026   CPP="${CC-cc} -E"
1027   # On the NeXT, cc -E runs the code through the compiler's parser,
1028   # not just through cpp.
1029   cat > conftest.$ac_ext <<EOF
1030 #line 1031 "configure"
1031 #include "confdefs.h"
1032 #include <assert.h>
1033 Syntax Error
1034 EOF
1035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1036 { (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1038 if test -z "$ac_err"; then
1039   :
1040 else
1041   echo "$ac_err" >&5
1042   echo "configure: failed program was:" >&5
1043   cat conftest.$ac_ext >&5
1044   rm -rf conftest*
1045   CPP="${CC-cc} -E -traditional-cpp"
1046   cat > conftest.$ac_ext <<EOF
1047 #line 1048 "configure"
1048 #include "confdefs.h"
1049 #include <assert.h>
1050 Syntax Error
1051 EOF
1052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1055 if test -z "$ac_err"; then
1056   :
1057 else
1058   echo "$ac_err" >&5
1059   echo "configure: failed program was:" >&5
1060   cat conftest.$ac_ext >&5
1061   rm -rf conftest*
1062   CPP="${CC-cc} -nologo -E"
1063   cat > conftest.$ac_ext <<EOF
1064 #line 1065 "configure"
1065 #include "confdefs.h"
1066 #include <assert.h>
1067 Syntax Error
1068 EOF
1069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1070 { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1072 if test -z "$ac_err"; then
1073   :
1074 else
1075   echo "$ac_err" >&5
1076   echo "configure: failed program was:" >&5
1077   cat conftest.$ac_ext >&5
1078   rm -rf conftest*
1079   CPP=/lib/cpp
1080 fi
1081 rm -f conftest*
1082 fi
1083 rm -f conftest*
1084 fi
1085 rm -f conftest*
1086   ac_cv_prog_CPP="$CPP"
1087 fi
1088   CPP="$ac_cv_prog_CPP"
1089 else
1090   ac_cv_prog_CPP="$CPP"
1091 fi
1092 echo "$ac_t""$CPP" 1>&6
1093
1094 # Find a good install program.  We prefer a C program (faster),
1095 # so one script is as good as another.  But avoid the broken or
1096 # incompatible versions:
1097 # SysV /etc/install, /usr/sbin/install
1098 # SunOS /usr/etc/install
1099 # IRIX /sbin/install
1100 # AIX /bin/install
1101 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1102 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1103 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1104 # ./install, which can be erroneously created by make from ./install.sh.
1105 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1106 echo "configure:1107: checking for a BSD compatible install" >&5
1107 if test -z "$INSTALL"; then
1108 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1112   for ac_dir in $PATH; do
1113     # Account for people who put trailing slashes in PATH elements.
1114     case "$ac_dir/" in
1115     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1116     *)
1117       # OSF1 and SCO ODT 3.0 have their own names for install.
1118       # Don't use installbsd from OSF since it installs stuff as root
1119       # by default.
1120       for ac_prog in ginstall scoinst install; do
1121         if test -f $ac_dir/$ac_prog; then
1122           if test $ac_prog = install &&
1123             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1124             # AIX install.  It has an incompatible calling convention.
1125             :
1126           else
1127             ac_cv_path_install="$ac_dir/$ac_prog -c"
1128             break 2
1129           fi
1130         fi
1131       done
1132       ;;
1133     esac
1134   done
1135   IFS="$ac_save_IFS"
1136
1137 fi
1138   if test "${ac_cv_path_install+set}" = set; then
1139     INSTALL="$ac_cv_path_install"
1140   else
1141     # As a last resort, use the slow shell script.  We don't cache a
1142     # path for INSTALL within a source directory, because that will
1143     # break other packages using the cache if that directory is
1144     # removed, or if the path is relative.
1145     INSTALL="$ac_install_sh"
1146   fi
1147 fi
1148 echo "$ac_t""$INSTALL" 1>&6
1149
1150 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1151 # It thinks the first close brace ends the variable substitution.
1152 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1153
1154 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1155
1156 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1157
1158 # Check whether --enable-shared or --disable-shared was given.
1159 if test "${enable_shared+set}" = set; then
1160   enableval="$enable_shared"
1161   p=${PACKAGE-default}
1162 case "$enableval" in
1163 yes) enable_shared=yes ;;
1164 no) enable_shared=no ;;
1165 *)
1166   enable_shared=no
1167   # Look at the argument we got.  We use all the common list separators.
1168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1169   for pkg in $enableval; do
1170     if test "X$pkg" = "X$p"; then
1171       enable_shared=yes
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175   ;;
1176 esac
1177 else
1178   enable_shared=no
1179 fi
1180
1181 # Check whether --enable-static or --disable-static was given.
1182 if test "${enable_static+set}" = set; then
1183   enableval="$enable_static"
1184   p=${PACKAGE-default}
1185 case "$enableval" in
1186 yes) enable_static=yes ;;
1187 no) enable_static=no ;;
1188 *)
1189   enable_static=no
1190   # Look at the argument we got.  We use all the common list separators.
1191   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1192   for pkg in $enableval; do
1193     if test "X$pkg" = "X$p"; then
1194       enable_static=yes
1195     fi
1196   done
1197   IFS="$ac_save_ifs"
1198   ;;
1199 esac
1200 else
1201   enable_static=yes
1202 fi
1203
1204 # Check whether --enable-fast-install or --disable-fast-install was given.
1205 if test "${enable_fast_install+set}" = set; then
1206   enableval="$enable_fast_install"
1207   p=${PACKAGE-default}
1208 case "$enableval" in
1209 yes) enable_fast_install=yes ;;
1210 no) enable_fast_install=no ;;
1211 *)
1212   enable_fast_install=no
1213   # Look at the argument we got.  We use all the common list separators.
1214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1215   for pkg in $enableval; do
1216     if test "X$pkg" = "X$p"; then
1217       enable_fast_install=yes
1218     fi
1219   done
1220   IFS="$ac_save_ifs"
1221   ;;
1222 esac
1223 else
1224   enable_fast_install=yes
1225 fi
1226
1227
1228 # Make sure we can run config.sub.
1229 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1230 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1231 fi
1232
1233 echo $ac_n "checking host system type""... $ac_c" 1>&6
1234 echo "configure:1235: checking host system type" >&5
1235
1236 host_alias=$host
1237 case "$host_alias" in
1238 NONE)
1239   case $nonopt in
1240   NONE)
1241     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1242     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1243     fi ;;
1244   *) host_alias=$nonopt ;;
1245   esac ;;
1246 esac
1247
1248 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1249 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1250 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1251 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1252 echo "$ac_t""$host" 1>&6
1253
1254 echo $ac_n "checking build system type""... $ac_c" 1>&6
1255 echo "configure:1256: checking build system type" >&5
1256
1257 build_alias=$build
1258 case "$build_alias" in
1259 NONE)
1260   case $nonopt in
1261   NONE) build_alias=$host_alias ;;
1262   *) build_alias=$nonopt ;;
1263   esac ;;
1264 esac
1265
1266 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1267 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270 echo "$ac_t""$build" 1>&6
1271
1272 # Extract the first word of "ranlib", so it can be a program name with args.
1273 set dummy ranlib; ac_word=$2
1274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_word" >&5
1276 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1277   echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279   if test -n "$RANLIB"; then
1280   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1281 else
1282   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1283   ac_dummy="$PATH"
1284   for ac_dir in $ac_dummy; do
1285     test -z "$ac_dir" && ac_dir=.
1286     if test -f $ac_dir/$ac_word; then
1287       ac_cv_prog_RANLIB="ranlib"
1288       break
1289     fi
1290   done
1291   IFS="$ac_save_ifs"
1292   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1293 fi
1294 fi
1295 RANLIB="$ac_cv_prog_RANLIB"
1296 if test -n "$RANLIB"; then
1297   echo "$ac_t""$RANLIB" 1>&6
1298 else
1299   echo "$ac_t""no" 1>&6
1300 fi
1301
1302 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1303 if test "${with_gnu_ld+set}" = set; then
1304   withval="$with_gnu_ld"
1305   test "$withval" = no || with_gnu_ld=yes
1306 else
1307   with_gnu_ld=no
1308 fi
1309
1310 ac_prog=ld
1311 if test "$ac_cv_prog_gcc" = yes; then
1312   # Check if gcc -print-prog-name=ld gives a path.
1313   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1314 echo "configure:1315: checking for ld used by GCC" >&5
1315   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1316   case "$ac_prog" in
1317     # Accept absolute paths.
1318     [\\/]* | [A-Za-z]:[\\/]*)
1319       re_direlt='/[^/][^/]*/\.\./'
1320       # Canonicalize the path of ld
1321       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1322       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1323         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1324       done
1325       test -z "$LD" && LD="$ac_prog"
1326       ;;
1327   "")
1328     # If it fails, then pretend we aren't using GCC.
1329     ac_prog=ld
1330     ;;
1331   *)
1332     # If it is relative, then search for the first ld in PATH.
1333     with_gnu_ld=unknown
1334     ;;
1335   esac
1336 elif test "$with_gnu_ld" = yes; then
1337   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1338 echo "configure:1339: checking for GNU ld" >&5
1339 else
1340   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1341 echo "configure:1342: checking for non-GNU ld" >&5
1342 fi
1343 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1344   echo $ac_n "(cached) $ac_c" 1>&6
1345 else
1346   if test -z "$LD"; then
1347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1348   for ac_dir in $PATH; do
1349     test -z "$ac_dir" && ac_dir=.
1350     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1351       ac_cv_path_LD="$ac_dir/$ac_prog"
1352       # Check to see if the program is GNU ld.  I'd rather use --version,
1353       # but apparently some GNU ld's only accept -v.
1354       # Break only if it was the GNU/non-GNU ld that we prefer.
1355       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1356         test "$with_gnu_ld" != no && break
1357       else
1358         test "$with_gnu_ld" != yes && break
1359       fi
1360     fi
1361   done
1362   IFS="$ac_save_ifs"
1363 else
1364   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1365 fi
1366 fi
1367
1368 LD="$ac_cv_path_LD"
1369 if test -n "$LD"; then
1370   echo "$ac_t""$LD" 1>&6
1371 else
1372   echo "$ac_t""no" 1>&6
1373 fi
1374 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1375
1376 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1377 echo "configure:1378: checking if the linker ($LD) is GNU ld" >&5
1378 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1379   echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1382 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1383   ac_cv_prog_gnu_ld=yes
1384 else
1385   ac_cv_prog_gnu_ld=no
1386 fi
1387 fi
1388
1389 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1390
1391
1392 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1393 echo "configure:1394: checking for BSD-compatible nm" >&5
1394 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1395   echo $ac_n "(cached) $ac_c" 1>&6
1396 else
1397   if test -n "$NM"; then
1398   # Let the user override the test.
1399   ac_cv_path_NM="$NM"
1400 else
1401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1402   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1403     test -z "$ac_dir" && ac_dir=.
1404     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1405       # Check to see if the nm accepts a BSD-compat flag.
1406       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1407       #   nm: unknown option "B" ignored
1408       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1409         ac_cv_path_NM="$ac_dir/nm -B"
1410         break
1411       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1412         ac_cv_path_NM="$ac_dir/nm -p"
1413         break
1414       else
1415         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1416         continue # so that we can try to find one that supports BSD flags
1417       fi
1418     fi
1419   done
1420   IFS="$ac_save_ifs"
1421   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1422 fi
1423 fi
1424
1425 NM="$ac_cv_path_NM"
1426 echo "$ac_t""$NM" 1>&6
1427
1428
1429 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1430 echo "configure:1431: checking whether ln -s works" >&5
1431 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1432   echo $ac_n "(cached) $ac_c" 1>&6
1433 else
1434   rm -f conftestdata
1435 if ln -s X conftestdata 2>/dev/null
1436 then
1437   rm -f conftestdata
1438   ac_cv_prog_LN_S="ln -s"
1439 else
1440   ac_cv_prog_LN_S=ln
1441 fi
1442 fi
1443 LN_S="$ac_cv_prog_LN_S"
1444 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1445   echo "$ac_t""yes" 1>&6
1446 else
1447   echo "$ac_t""no" 1>&6
1448 fi
1449
1450
1451 # Check for any special flags to pass to ltconfig.
1452 #
1453 # the following will cause an existing older ltconfig to fail, so
1454 # we ignore this at the expense of the cache file... Checking this 
1455 # will just take longer ... bummer!
1456 #libtool_flags="--cache-file=$cache_file"
1457 #
1458 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1459 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1460 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1461 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1462 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1463
1464
1465 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1466 if test "${enable_libtool_lock+set}" = set; then
1467   enableval="$enable_libtool_lock"
1468   :
1469 fi
1470
1471 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1472 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1473
1474 # Some flags need to be propagated to the compiler or linker for good
1475 # libtool support.
1476 case "$host" in
1477 *-*-irix6*)
1478   # Find out which ABI we are using.
1479   echo '#line 1480 "configure"' > conftest.$ac_ext
1480   if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1481     case "`/usr/bin/file conftest.o`" in
1482     *32-bit*)
1483       LD="${LD-ld} -32"
1484       ;;
1485     *N32*)
1486       LD="${LD-ld} -n32"
1487       ;;
1488     *64-bit*)
1489       LD="${LD-ld} -64"
1490       ;;
1491     esac
1492   fi
1493   rm -rf conftest*
1494   ;;
1495
1496 *-*-sco3.2v5*)
1497   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1498   SAVE_CFLAGS="$CFLAGS"
1499   CFLAGS="$CFLAGS -belf"
1500   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1501 echo "configure:1502: checking whether the C compiler needs -belf" >&5
1502 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508
1509 int main() {
1510
1511 ; return 0; }
1512 EOF
1513 if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1514   rm -rf conftest*
1515   lt_cv_cc_needs_belf=yes
1516 else
1517   echo "configure: failed program was:" >&5
1518   cat conftest.$ac_ext >&5
1519   rm -rf conftest*
1520   lt_cv_cc_needs_belf=no
1521 fi
1522 rm -f conftest*
1523 fi
1524
1525 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1526   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1527     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1528     CFLAGS="$SAVE_CFLAGS"
1529   fi
1530   ;;
1531
1532
1533 esac
1534
1535
1536 # Save cache, so that ltconfig can load it
1537 cat > confcache <<\EOF
1538 # This file is a shell script that caches the results of configure
1539 # tests run on this system so they can be shared between configure
1540 # scripts and configure runs.  It is not useful on other systems.
1541 # If it contains results you don't want to keep, you may remove or edit it.
1542 #
1543 # By default, configure uses ./config.cache as the cache file,
1544 # creating it if it does not exist already.  You can give configure
1545 # the --cache-file=FILE option to use a different cache file; that is
1546 # what configure does when it calls configure scripts in
1547 # subdirectories, so they share the cache.
1548 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1549 # config.status only pays attention to the cache file if you give it the
1550 # --recheck option to rerun configure.
1551 #
1552 EOF
1553 # The following way of writing the cache mishandles newlines in values,
1554 # but we know of no workaround that is simple, portable, and efficient.
1555 # So, don't put newlines in cache variables' values.
1556 # Ultrix sh set writes to stderr and can't be redirected directly,
1557 # and sets the high bit in the cache file unless we assign to the vars.
1558 (set) 2>&1 |
1559   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1560   *ac_space=\ *)
1561     # `set' does not quote correctly, so add quotes (double-quote substitution
1562     # turns \\\\ into \\, and sed turns \\ into \).
1563     sed -n \
1564       -e "s/'/'\\\\''/g" \
1565       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1566     ;;
1567   *)
1568     # `set' quotes correctly as required by POSIX, so do not add quotes.
1569     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1570     ;;
1571   esac >> confcache
1572 if cmp -s $cache_file confcache; then
1573   :
1574 else
1575   if test -w $cache_file; then
1576     echo "updating cache $cache_file"
1577     cat confcache > $cache_file
1578   else
1579     echo "not updating unwritable cache $cache_file"
1580   fi
1581 fi
1582 rm -f confcache
1583
1584
1585 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1586 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1587 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1588 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1589 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1590 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1591 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1592 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1593
1594 # Reload cache, that may have been modified by ltconfig
1595 if test -r "$cache_file"; then
1596   echo "loading cache $cache_file"
1597   . $cache_file
1598 else
1599   echo "creating cache $cache_file"
1600   > $cache_file
1601 fi
1602
1603
1604 # This can be used to rebuild libtool when needed
1605 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1606
1607 # Always use our own libtool.
1608 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1609
1610 # Redirect the config.log output again, so that the ltconfig log is not
1611 # clobbered by the next message.
1612 exec 5>>./config.log
1613
1614
1615
1616
1617 # Check whether --enable-comp or --disable-comp was given.
1618 if test "${enable_comp+set}" = set; then
1619   enableval="$enable_comp"
1620   :
1621 else
1622   enable_comp=yes
1623 fi
1624
1625 if test "$enable_comp" = "yes"; then
1626         ASNMODULE="z39.50"
1627         ILLMODULE="ill"
1628         ILLLIB=../ill/libill.la
1629         ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
1630         HFILE=z-proto.h
1631 else
1632         ILLMODULE=""
1633         ASNMODULE=asn
1634         ILLLIB=""
1635         ASN_MAKEFILES="asn/Makefile"
1636         HFILE=prt-proto.h
1637 fi
1638 echo $ac_n "checking whether proto.h needs to be generated""... $ac_c" 1>&6
1639 echo "configure:1640: checking whether proto.h needs to be generated" >&5
1640 yaz_include=${srcdir}/include/yaz
1641 if test -r ${yaz_include}/proto.h && cmp -s ${yaz_include}/$HFILE ${yaz_include}/proto.h; then
1642         echo "$ac_t""no" 1>&6
1643 else
1644         echo "$ac_t""yes" 1>&6
1645         cp -f ${yaz_include}/$HFILE ${yaz_include}/proto.h
1646 fi
1647 checkBoth=0
1648 echo $ac_n "checking for connect""... $ac_c" 1>&6
1649 echo "configure:1650: checking for connect" >&5
1650 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1651   echo $ac_n "(cached) $ac_c" 1>&6
1652 else
1653   cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1656 /* System header to define __stub macros and hopefully few prototypes,
1657     which can conflict with char connect(); below.  */
1658 #include <assert.h>
1659 /* Override any gcc2 internal prototype to avoid an error.  */
1660 /* We use char because int might match the return type of a gcc2
1661     builtin and then its argument prototype would still apply.  */
1662 char connect();
1663
1664 int main() {
1665
1666 /* The GNU C library defines this for functions which it implements
1667     to always fail with ENOSYS.  Some functions are actually named
1668     something starting with __ and the normal name is an alias.  */
1669 #if defined (__stub_connect) || defined (__stub___connect)
1670 choke me
1671 #else
1672 connect();
1673 #endif
1674
1675 ; return 0; }
1676 EOF
1677 if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1678   rm -rf conftest*
1679   eval "ac_cv_func_connect=yes"
1680 else
1681   echo "configure: failed program was:" >&5
1682   cat conftest.$ac_ext >&5
1683   rm -rf conftest*
1684   eval "ac_cv_func_connect=no"
1685 fi
1686 rm -f conftest*
1687 fi
1688
1689 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1690   echo "$ac_t""yes" 1>&6
1691   :
1692 else
1693   echo "$ac_t""no" 1>&6
1694 fi
1695
1696 if test "$ac_cv_func_connect" = "no"; then
1697         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1698 echo "configure:1699: checking for main in -lsocket" >&5
1699 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1701   echo $ac_n "(cached) $ac_c" 1>&6
1702 else
1703   ac_save_LIBS="$LIBS"
1704 LIBS="-lsocket  $LIBS"
1705 cat > conftest.$ac_ext <<EOF
1706 #line 1707 "configure"
1707 #include "confdefs.h"
1708
1709 int main() {
1710 main()
1711 ; return 0; }
1712 EOF
1713 if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1714   rm -rf conftest*
1715   eval "ac_cv_lib_$ac_lib_var=yes"
1716 else
1717   echo "configure: failed program was:" >&5
1718   cat conftest.$ac_ext >&5
1719   rm -rf conftest*
1720   eval "ac_cv_lib_$ac_lib_var=no"
1721 fi
1722 rm -f conftest*
1723 LIBS="$ac_save_LIBS"
1724
1725 fi
1726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1727   echo "$ac_t""yes" 1>&6
1728   LIBS="$LIBS -lsocket"
1729 else
1730   echo "$ac_t""no" 1>&6
1731 checkBoth=1
1732 fi
1733
1734 fi
1735 if test "$checkBoth" = "1"; then
1736         oldLibs=$LIBS
1737         LIBS="$LIBS -lsocket -lnsl"
1738         echo $ac_n "checking for accept""... $ac_c" 1>&6
1739 echo "configure:1740: checking for accept" >&5
1740 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1741   echo $ac_n "(cached) $ac_c" 1>&6
1742 else
1743   cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 /* System header to define __stub macros and hopefully few prototypes,
1747     which can conflict with char accept(); below.  */
1748 #include <assert.h>
1749 /* Override any gcc2 internal prototype to avoid an error.  */
1750 /* We use char because int might match the return type of a gcc2
1751     builtin and then its argument prototype would still apply.  */
1752 char accept();
1753
1754 int main() {
1755
1756 /* The GNU C library defines this for functions which it implements
1757     to always fail with ENOSYS.  Some functions are actually named
1758     something starting with __ and the normal name is an alias.  */
1759 #if defined (__stub_accept) || defined (__stub___accept)
1760 choke me
1761 #else
1762 accept();
1763 #endif
1764
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1768   rm -rf conftest*
1769   eval "ac_cv_func_accept=yes"
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   eval "ac_cv_func_accept=no"
1775 fi
1776 rm -f conftest*
1777 fi
1778
1779 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1780   echo "$ac_t""yes" 1>&6
1781   :
1782 else
1783   echo "$ac_t""no" 1>&6
1784 LIBS=$oldLibs
1785 fi
1786
1787 fi
1788 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1789 echo "configure:1790: checking for gethostbyname" >&5
1790 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1791   echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793   cat > conftest.$ac_ext <<EOF
1794 #line 1795 "configure"
1795 #include "confdefs.h"
1796 /* System header to define __stub macros and hopefully few prototypes,
1797     which can conflict with char gethostbyname(); below.  */
1798 #include <assert.h>
1799 /* Override any gcc2 internal prototype to avoid an error.  */
1800 /* We use char because int might match the return type of a gcc2
1801     builtin and then its argument prototype would still apply.  */
1802 char gethostbyname();
1803
1804 int main() {
1805
1806 /* The GNU C library defines this for functions which it implements
1807     to always fail with ENOSYS.  Some functions are actually named
1808     something starting with __ and the normal name is an alias.  */
1809 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1810 choke me
1811 #else
1812 gethostbyname();
1813 #endif
1814
1815 ; return 0; }
1816 EOF
1817 if { (eval echo configure:1818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1818   rm -rf conftest*
1819   eval "ac_cv_func_gethostbyname=yes"
1820 else
1821   echo "configure: failed program was:" >&5
1822   cat conftest.$ac_ext >&5
1823   rm -rf conftest*
1824   eval "ac_cv_func_gethostbyname=no"
1825 fi
1826 rm -f conftest*
1827 fi
1828
1829 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1830   echo "$ac_t""yes" 1>&6
1831   :
1832 else
1833   echo "$ac_t""no" 1>&6
1834 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1835 echo "configure:1836: checking for main in -lnsl" >&5
1836 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1837 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   ac_save_LIBS="$LIBS"
1841 LIBS="-lnsl  $LIBS"
1842 cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845
1846 int main() {
1847 main()
1848 ; return 0; }
1849 EOF
1850 if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1851   rm -rf conftest*
1852   eval "ac_cv_lib_$ac_lib_var=yes"
1853 else
1854   echo "configure: failed program was:" >&5
1855   cat conftest.$ac_ext >&5
1856   rm -rf conftest*
1857   eval "ac_cv_lib_$ac_lib_var=no"
1858 fi
1859 rm -f conftest*
1860 LIBS="$ac_save_LIBS"
1861
1862 fi
1863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1864   echo "$ac_t""yes" 1>&6
1865   LIBS="$LIBS -lnsl"
1866 else
1867   echo "$ac_t""no" 1>&6
1868 fi
1869
1870 fi
1871
1872 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1873 echo "configure:1874: checking for readline in -lreadline" >&5
1874 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1876   echo $ac_n "(cached) $ac_c" 1>&6
1877 else
1878   ac_save_LIBS="$LIBS"
1879 LIBS="-lreadline  $LIBS"
1880 cat > conftest.$ac_ext <<EOF
1881 #line 1882 "configure"
1882 #include "confdefs.h"
1883 /* Override any gcc2 internal prototype to avoid an error.  */
1884 /* We use char because int might match the return type of a gcc2
1885     builtin and then its argument prototype would still apply.  */
1886 char readline();
1887
1888 int main() {
1889 readline()
1890 ; return 0; }
1891 EOF
1892 if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1893   rm -rf conftest*
1894   eval "ac_cv_lib_$ac_lib_var=yes"
1895 else
1896   echo "configure: failed program was:" >&5
1897   cat conftest.$ac_ext >&5
1898   rm -rf conftest*
1899   eval "ac_cv_lib_$ac_lib_var=no"
1900 fi
1901 rm -f conftest*
1902 LIBS="$ac_save_LIBS"
1903
1904 fi
1905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1906   echo "$ac_t""yes" 1>&6
1907   LIBS="$LIBS -lreadline"
1908 else
1909   echo "$ac_t""no" 1>&6
1910 fi
1911
1912 if test "$ac_cv_lib_readline_readline" = "no"; then
1913         echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1914 echo "configure:1915: checking for readline in -lreadline" >&5
1915 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1917   echo $ac_n "(cached) $ac_c" 1>&6
1918 else
1919   ac_save_LIBS="$LIBS"
1920 LIBS="-lreadline  $LIBS"
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 /* Override any gcc2 internal prototype to avoid an error.  */
1925 /* We use char because int might match the return type of a gcc2
1926     builtin and then its argument prototype would still apply.  */
1927 char readline();
1928
1929 int main() {
1930 readline()
1931 ; return 0; }
1932 EOF
1933 if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1934   rm -rf conftest*
1935   eval "ac_cv_lib_$ac_lib_var=yes"
1936 else
1937   echo "configure: failed program was:" >&5
1938   cat conftest.$ac_ext >&5
1939   rm -rf conftest*
1940   eval "ac_cv_lib_$ac_lib_var=no"
1941 fi
1942 rm -f conftest*
1943 LIBS="$ac_save_LIBS"
1944
1945 fi
1946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1947   echo "$ac_t""yes" 1>&6
1948   LIBS="$LIBS -lreadline -ltermcap"
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952
1953 fi
1954 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
1955 echo "configure:1956: checking for add_history in -lhistory" >&5
1956 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
1957 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1958   echo $ac_n "(cached) $ac_c" 1>&6
1959 else
1960   ac_save_LIBS="$LIBS"
1961 LIBS="-lhistory  $LIBS"
1962 cat > conftest.$ac_ext <<EOF
1963 #line 1964 "configure"
1964 #include "confdefs.h"
1965 /* Override any gcc2 internal prototype to avoid an error.  */
1966 /* We use char because int might match the return type of a gcc2
1967     builtin and then its argument prototype would still apply.  */
1968 char add_history();
1969
1970 int main() {
1971 add_history()
1972 ; return 0; }
1973 EOF
1974 if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1975   rm -rf conftest*
1976   eval "ac_cv_lib_$ac_lib_var=yes"
1977 else
1978   echo "configure: failed program was:" >&5
1979   cat conftest.$ac_ext >&5
1980   rm -rf conftest*
1981   eval "ac_cv_lib_$ac_lib_var=no"
1982 fi
1983 rm -f conftest*
1984 LIBS="$ac_save_LIBS"
1985
1986 fi
1987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1988   echo "$ac_t""yes" 1>&6
1989   LIBS="$LIBS -lhistory"
1990 else
1991   echo "$ac_t""no" 1>&6
1992 fi
1993
1994 if test "$ac_cv_lib_readline_readline" = "yes"; then
1995         for ac_hdr in readline/readline.h readline/history.h
1996 do
1997 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1998 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1999 echo "configure:2000: checking for $ac_hdr" >&5
2000 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2001   echo $ac_n "(cached) $ac_c" 1>&6
2002 else
2003   cat > conftest.$ac_ext <<EOF
2004 #line 2005 "configure"
2005 #include "confdefs.h"
2006 #include <$ac_hdr>
2007 EOF
2008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2009 { (eval echo configure:2010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2011 if test -z "$ac_err"; then
2012   rm -rf conftest*
2013   eval "ac_cv_header_$ac_safe=yes"
2014 else
2015   echo "$ac_err" >&5
2016   echo "configure: failed program was:" >&5
2017   cat conftest.$ac_ext >&5
2018   rm -rf conftest*
2019   eval "ac_cv_header_$ac_safe=no"
2020 fi
2021 rm -f conftest*
2022 fi
2023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2024   echo "$ac_t""yes" 1>&6
2025     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2026   cat >> confdefs.h <<EOF
2027 #define $ac_tr_hdr 1
2028 EOF
2029  
2030 else
2031   echo "$ac_t""no" 1>&6
2032 fi
2033 done
2034
2035 fi
2036 for ac_func in vsnprintf
2037 do
2038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2039 echo "configure:2040: checking for $ac_func" >&5
2040 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2041   echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043   cat > conftest.$ac_ext <<EOF
2044 #line 2045 "configure"
2045 #include "confdefs.h"
2046 /* System header to define __stub macros and hopefully few prototypes,
2047     which can conflict with char $ac_func(); below.  */
2048 #include <assert.h>
2049 /* Override any gcc2 internal prototype to avoid an error.  */
2050 /* We use char because int might match the return type of a gcc2
2051     builtin and then its argument prototype would still apply.  */
2052 char $ac_func();
2053
2054 int main() {
2055
2056 /* The GNU C library defines this for functions which it implements
2057     to always fail with ENOSYS.  Some functions are actually named
2058     something starting with __ and the normal name is an alias.  */
2059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2060 choke me
2061 #else
2062 $ac_func();
2063 #endif
2064
2065 ; return 0; }
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2068   rm -rf conftest*
2069   eval "ac_cv_func_$ac_func=yes"
2070 else
2071   echo "configure: failed program was:" >&5
2072   cat conftest.$ac_ext >&5
2073   rm -rf conftest*
2074   eval "ac_cv_func_$ac_func=no"
2075 fi
2076 rm -f conftest*
2077 fi
2078
2079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2080   echo "$ac_t""yes" 1>&6
2081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2082   cat >> confdefs.h <<EOF
2083 #define $ac_tr_func 1
2084 EOF
2085  
2086 else
2087   echo "$ac_t""no" 1>&6
2088 fi
2089 done
2090
2091 # Check whether --enable-tcpd or --disable-tcpd was given.
2092 if test "${enable_tcpd+set}" = set; then
2093   enableval="$enable_tcpd"
2094   :
2095 fi
2096
2097 if test "$enable_tcpd" = "yes"; then
2098         echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
2099 echo "configure:2100: checking for working tcpd.h" >&5
2100         oldLibs=$LIBS
2101         LIBS="$LIBS -lwrap -lnsl"
2102         cat > conftest.$ac_ext <<EOF
2103 #line 2104 "configure"
2104 #include "confdefs.h"
2105 #include <syslog.h>
2106         #include <tcpd.h>
2107         int allow_severity = LOG_INFO;
2108         int deny_severity = LOG_WARNING;
2109 int main() {
2110 struct request_info request_info; int i;
2111         i = hosts_access(&request_info);
2112 ; return 0; }
2113 EOF
2114 if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2115   rm -rf conftest*
2116   tcpd_ok=1
2117 else
2118   echo "configure: failed program was:" >&5
2119   cat conftest.$ac_ext >&5
2120   rm -rf conftest*
2121   tcpd_ok=0
2122 fi
2123 rm -f conftest*
2124         if test "$tcpd_ok" = "0"; then
2125                 echo "$ac_t""no" 1>&6
2126                 LIBS=$oldLibs
2127         else
2128                 echo "$ac_t""yes" 1>&6
2129                 cat >> confdefs.h <<\EOF
2130 #define HAVE_TCPD_H 1
2131 EOF
2132
2133         fi
2134 fi
2135 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2136 echo "configure:2137: checking for ANSI C header files" >&5
2137 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2138   echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140   cat > conftest.$ac_ext <<EOF
2141 #line 2142 "configure"
2142 #include "confdefs.h"
2143 #include <stdlib.h>
2144 #include <stdarg.h>
2145 #include <string.h>
2146 #include <float.h>
2147 EOF
2148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2149 { (eval echo configure:2150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2151 if test -z "$ac_err"; then
2152   rm -rf conftest*
2153   ac_cv_header_stdc=yes
2154 else
2155   echo "$ac_err" >&5
2156   echo "configure: failed program was:" >&5
2157   cat conftest.$ac_ext >&5
2158   rm -rf conftest*
2159   ac_cv_header_stdc=no
2160 fi
2161 rm -f conftest*
2162
2163 if test $ac_cv_header_stdc = yes; then
2164   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2165 cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 #include <string.h>
2169 EOF
2170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2171   egrep "memchr" >/dev/null 2>&1; then
2172   :
2173 else
2174   rm -rf conftest*
2175   ac_cv_header_stdc=no
2176 fi
2177 rm -f conftest*
2178
2179 fi
2180
2181 if test $ac_cv_header_stdc = yes; then
2182   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2183 cat > conftest.$ac_ext <<EOF
2184 #line 2185 "configure"
2185 #include "confdefs.h"
2186 #include <stdlib.h>
2187 EOF
2188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2189   egrep "free" >/dev/null 2>&1; then
2190   :
2191 else
2192   rm -rf conftest*
2193   ac_cv_header_stdc=no
2194 fi
2195 rm -f conftest*
2196
2197 fi
2198
2199 if test $ac_cv_header_stdc = yes; then
2200   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2201 if test "$cross_compiling" = yes; then
2202   :
2203 else
2204   cat > conftest.$ac_ext <<EOF
2205 #line 2206 "configure"
2206 #include "confdefs.h"
2207 #include <ctype.h>
2208 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2209 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2210 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2211 int main () { int i; for (i = 0; i < 256; i++)
2212 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2213 exit (0); }
2214
2215 EOF
2216 if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2217 then
2218   :
2219 else
2220   echo "configure: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   rm -fr conftest*
2223   ac_cv_header_stdc=no
2224 fi
2225 rm -fr conftest*
2226 fi
2227
2228 fi
2229 fi
2230
2231 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2232 if test $ac_cv_header_stdc = yes; then
2233   cat >> confdefs.h <<\EOF
2234 #define STDC_HEADERS 1
2235 EOF
2236
2237 fi
2238
2239 if test "$ac_cv_header_stdc" = "no"; then
2240         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
2241 fi
2242 # Check whether --enable-threads or --disable-threads was given.
2243 if test "${enable_threads+set}" = set; then
2244   enableval="$enable_threads"
2245   enable_threads=$enableval
2246 else
2247   enable_threads=yes
2248 fi
2249
2250 if test "$enable_threads" = "yes"; then
2251         echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
2252 echo "configure:2253: checking for main in -lpthread" >&5
2253 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
2254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2255   echo $ac_n "(cached) $ac_c" 1>&6
2256 else
2257   ac_save_LIBS="$LIBS"
2258 LIBS="-lpthread  $LIBS"
2259 cat > conftest.$ac_ext <<EOF
2260 #line 2261 "configure"
2261 #include "confdefs.h"
2262
2263 int main() {
2264 main()
2265 ; return 0; }
2266 EOF
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2268   rm -rf conftest*
2269   eval "ac_cv_lib_$ac_lib_var=yes"
2270 else
2271   echo "configure: failed program was:" >&5
2272   cat conftest.$ac_ext >&5
2273   rm -rf conftest*
2274   eval "ac_cv_lib_$ac_lib_var=no"
2275 fi
2276 rm -f conftest*
2277 LIBS="$ac_save_LIBS"
2278
2279 fi
2280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2281   echo "$ac_t""yes" 1>&6
2282     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2284   cat >> confdefs.h <<EOF
2285 #define $ac_tr_lib 1
2286 EOF
2287
2288   LIBS="-lpthread $LIBS"
2289
2290 else
2291   echo "$ac_t""no" 1>&6
2292 fi
2293
2294         echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6
2295 echo "configure:2296: checking for working POSIX Threads" >&5
2296         cat > conftest.$ac_ext <<EOF
2297 #line 2298 "configure"
2298 #include "confdefs.h"
2299 #include <pthread.h>
2300         int func(void *p) { return 0; }
2301         
2302 int main() {
2303
2304         pthread_t pthread_id;
2305         int r = pthread_create (&pthread_id, 0, func, 0);
2306 ; return 0; }
2307 EOF
2308 if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2309   rm -rf conftest*
2310   thread_ok=yes
2311 else
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -rf conftest*
2315   thread_ok=no
2316 fi
2317 rm -f conftest*
2318         if test "$thread_ok" = "yes"; then
2319                 echo "$ac_t""yes" 1>&6
2320                 cat >> confdefs.h <<\EOF
2321 #define HAVE_PTHREAD_H 1
2322 EOF
2323
2324                 cat >> confdefs.h <<\EOF
2325 #define _REENTRANT 1
2326 EOF
2327
2328         else
2329                 echo "$ac_t""no" 1>&6
2330         fi
2331 fi
2332 SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest"
2333
2334 trap '' 1 2 15
2335 cat > confcache <<\EOF
2336 # This file is a shell script that caches the results of configure
2337 # tests run on this system so they can be shared between configure
2338 # scripts and configure runs.  It is not useful on other systems.
2339 # If it contains results you don't want to keep, you may remove or edit it.
2340 #
2341 # By default, configure uses ./config.cache as the cache file,
2342 # creating it if it does not exist already.  You can give configure
2343 # the --cache-file=FILE option to use a different cache file; that is
2344 # what configure does when it calls configure scripts in
2345 # subdirectories, so they share the cache.
2346 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2347 # config.status only pays attention to the cache file if you give it the
2348 # --recheck option to rerun configure.
2349 #
2350 EOF
2351 # The following way of writing the cache mishandles newlines in values,
2352 # but we know of no workaround that is simple, portable, and efficient.
2353 # So, don't put newlines in cache variables' values.
2354 # Ultrix sh set writes to stderr and can't be redirected directly,
2355 # and sets the high bit in the cache file unless we assign to the vars.
2356 (set) 2>&1 |
2357   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2358   *ac_space=\ *)
2359     # `set' does not quote correctly, so add quotes (double-quote substitution
2360     # turns \\\\ into \\, and sed turns \\ into \).
2361     sed -n \
2362       -e "s/'/'\\\\''/g" \
2363       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2364     ;;
2365   *)
2366     # `set' quotes correctly as required by POSIX, so do not add quotes.
2367     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2368     ;;
2369   esac >> confcache
2370 if cmp -s $cache_file confcache; then
2371   :
2372 else
2373   if test -w $cache_file; then
2374     echo "updating cache $cache_file"
2375     cat confcache > $cache_file
2376   else
2377     echo "not updating unwritable cache $cache_file"
2378   fi
2379 fi
2380 rm -f confcache
2381
2382 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2383
2384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2385 # Let make expand exec_prefix.
2386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2387
2388 # Any assignment to VPATH causes Sun make to only execute
2389 # the first set of double-colon rules, so remove it if not needed.
2390 # If there is a colon in the path, we need to keep it.
2391 if test "x$srcdir" = x.; then
2392   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2393 fi
2394
2395 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2396
2397 # Transform confdefs.h into DEFS.
2398 # Protect against shell expansion while executing Makefile rules.
2399 # Protect against Makefile macro expansion.
2400 cat > conftest.defs <<\EOF
2401 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2402 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2403 s%\[%\\&%g
2404 s%\]%\\&%g
2405 s%\$%$$%g
2406 EOF
2407 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2408 rm -f conftest.defs
2409
2410
2411 # Without the "./", some shells look in PATH for config.status.
2412 : ${CONFIG_STATUS=./config.status}
2413
2414 echo creating $CONFIG_STATUS
2415 rm -f $CONFIG_STATUS
2416 cat > $CONFIG_STATUS <<EOF
2417 #! /bin/sh
2418 # Generated automatically by configure.
2419 # Run this file to recreate the current configuration.
2420 # This directory was configured as follows,
2421 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2422 #
2423 # $0 $ac_configure_args
2424 #
2425 # Compiler output produced by configure, useful for debugging
2426 # configure, is in ./config.log if it exists.
2427
2428 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2429 for ac_option
2430 do
2431   case "\$ac_option" in
2432   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2433     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2434     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2435   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2436     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2437     exit 0 ;;
2438   -help | --help | --hel | --he | --h)
2439     echo "\$ac_cs_usage"; exit 0 ;;
2440   *) echo "\$ac_cs_usage"; exit 1 ;;
2441   esac
2442 done
2443
2444 ac_given_srcdir=$srcdir
2445 ac_given_INSTALL="$INSTALL"
2446
2447 trap 'rm -fr `echo "Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2448 EOF
2449 cat >> $CONFIG_STATUS <<EOF
2450
2451 # Protect against being on the right side of a sed subst in config.status.
2452 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2453  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2454 $ac_vpsub
2455 $extrasub
2456 s%@SHELL@%$SHELL%g
2457 s%@CFLAGS@%$CFLAGS%g
2458 s%@CPPFLAGS@%$CPPFLAGS%g
2459 s%@CXXFLAGS@%$CXXFLAGS%g
2460 s%@FFLAGS@%$FFLAGS%g
2461 s%@DEFS@%$DEFS%g
2462 s%@LDFLAGS@%$LDFLAGS%g
2463 s%@LIBS@%$LIBS%g
2464 s%@exec_prefix@%$exec_prefix%g
2465 s%@prefix@%$prefix%g
2466 s%@program_transform_name@%$program_transform_name%g
2467 s%@bindir@%$bindir%g
2468 s%@sbindir@%$sbindir%g
2469 s%@libexecdir@%$libexecdir%g
2470 s%@datadir@%$datadir%g
2471 s%@sysconfdir@%$sysconfdir%g
2472 s%@sharedstatedir@%$sharedstatedir%g
2473 s%@localstatedir@%$localstatedir%g
2474 s%@libdir@%$libdir%g
2475 s%@includedir@%$includedir%g
2476 s%@oldincludedir@%$oldincludedir%g
2477 s%@infodir@%$infodir%g
2478 s%@mandir@%$mandir%g
2479 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2480 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2481 s%@INSTALL_DATA@%$INSTALL_DATA%g
2482 s%@PACKAGE@%$PACKAGE%g
2483 s%@VERSION@%$VERSION%g
2484 s%@ACLOCAL@%$ACLOCAL%g
2485 s%@AUTOCONF@%$AUTOCONF%g
2486 s%@AUTOMAKE@%$AUTOMAKE%g
2487 s%@AUTOHEADER@%$AUTOHEADER%g
2488 s%@MAKEINFO@%$MAKEINFO%g
2489 s%@SET_MAKE@%$SET_MAKE%g
2490 s%@CC@%$CC%g
2491 s%@CPP@%$CPP%g
2492 s%@host@%$host%g
2493 s%@host_alias@%$host_alias%g
2494 s%@host_cpu@%$host_cpu%g
2495 s%@host_vendor@%$host_vendor%g
2496 s%@host_os@%$host_os%g
2497 s%@build@%$build%g
2498 s%@build_alias@%$build_alias%g
2499 s%@build_cpu@%$build_cpu%g
2500 s%@build_vendor@%$build_vendor%g
2501 s%@build_os@%$build_os%g
2502 s%@RANLIB@%$RANLIB%g
2503 s%@LD@%$LD%g
2504 s%@NM@%$NM%g
2505 s%@LN_S@%$LN_S%g
2506 s%@LIBTOOL@%$LIBTOOL%g
2507 s%@ASNMODULE@%$ASNMODULE%g
2508 s%@ILLMODULE@%$ILLMODULE%g
2509 s%@ILLLIB@%$ILLLIB%g
2510 s%@SUBDIRS_VAR@%$SUBDIRS_VAR%g
2511
2512 CEOF
2513 EOF
2514
2515 cat >> $CONFIG_STATUS <<\EOF
2516
2517 # Split the substitutions into bite-sized pieces for seds with
2518 # small command number limits, like on Digital OSF/1 and HP-UX.
2519 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2520 ac_file=1 # Number of current file.
2521 ac_beg=1 # First line for current file.
2522 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2523 ac_more_lines=:
2524 ac_sed_cmds=""
2525 while $ac_more_lines; do
2526   if test $ac_beg -gt 1; then
2527     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2528   else
2529     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2530   fi
2531   if test ! -s conftest.s$ac_file; then
2532     ac_more_lines=false
2533     rm -f conftest.s$ac_file
2534   else
2535     if test -z "$ac_sed_cmds"; then
2536       ac_sed_cmds="sed -f conftest.s$ac_file"
2537     else
2538       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2539     fi
2540     ac_file=`expr $ac_file + 1`
2541     ac_beg=$ac_end
2542     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2543   fi
2544 done
2545 if test -z "$ac_sed_cmds"; then
2546   ac_sed_cmds=cat
2547 fi
2548 EOF
2549
2550 cat >> $CONFIG_STATUS <<EOF
2551
2552 CONFIG_FILES=\${CONFIG_FILES-"Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile"}
2553 EOF
2554 cat >> $CONFIG_STATUS <<\EOF
2555 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2556   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2557   case "$ac_file" in
2558   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2559        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2560   *) ac_file_in="${ac_file}.in" ;;
2561   esac
2562
2563   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2564
2565   # Remove last slash and all that follows it.  Not all systems have dirname.
2566   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2567   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2568     # The file is in a subdirectory.
2569     test ! -d "$ac_dir" && mkdir "$ac_dir"
2570     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2571     # A "../" for each directory in $ac_dir_suffix.
2572     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2573   else
2574     ac_dir_suffix= ac_dots=
2575   fi
2576
2577   case "$ac_given_srcdir" in
2578   .)  srcdir=.
2579       if test -z "$ac_dots"; then top_srcdir=.
2580       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2581   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2582   *) # Relative path.
2583     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2584     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2585   esac
2586
2587   case "$ac_given_INSTALL" in
2588   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2589   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2590   esac
2591
2592   echo creating "$ac_file"
2593   rm -f "$ac_file"
2594   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2595   case "$ac_file" in
2596   *Makefile*) ac_comsub="1i\\
2597 # $configure_input" ;;
2598   *) ac_comsub= ;;
2599   esac
2600
2601   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2602   sed -e "$ac_comsub
2603 s%@configure_input@%$configure_input%g
2604 s%@srcdir@%$srcdir%g
2605 s%@top_srcdir@%$top_srcdir%g
2606 s%@INSTALL@%$INSTALL%g
2607 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2608 fi; done
2609 rm -f conftest.s*
2610
2611 EOF
2612 cat >> $CONFIG_STATUS <<EOF
2613
2614 EOF
2615 cat >> $CONFIG_STATUS <<\EOF
2616
2617 exit 0
2618 EOF
2619 chmod +x $CONFIG_STATUS
2620 rm -fr confdefs* $ac_clean_files
2621 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2622