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