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