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