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