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