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