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