1b14d048957308139873f419dfb18b88858cb39c
[pspp-builds.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --disable-nls           do not use Native Language Support"
16 ac_help="$ac_help
17   --with-included-gettext use the GNU gettext library included here"
18 ac_help="$ac_help
19   --with-catgets          use catgets functions if available"
20 ac_help="$ac_help
21   --with-checker          compile with Checker (for debugging)"
22 ac_help="$ac_help
23   --enable-debugging      turn on debugging options"
24
25 # Initialize some variables set by options.
26 # The variables have the same names as the options, with
27 # dashes changed to underlines.
28 build=NONE
29 cache_file=./config.cache
30 exec_prefix=NONE
31 host=NONE
32 no_create=
33 nonopt=NONE
34 no_recursion=
35 prefix=NONE
36 program_prefix=NONE
37 program_suffix=NONE
38 program_transform_name=s,x,x,
39 silent=
40 site=
41 srcdir=
42 target=NONE
43 verbose=
44 x_includes=NONE
45 x_libraries=NONE
46 bindir='${exec_prefix}/bin'
47 sbindir='${exec_prefix}/sbin'
48 libexecdir='${exec_prefix}/libexec'
49 datadir='${prefix}/share'
50 sysconfdir='${prefix}/etc'
51 sharedstatedir='${prefix}/com'
52 localstatedir='${prefix}/var'
53 libdir='${exec_prefix}/lib'
54 includedir='${prefix}/include'
55 oldincludedir='/usr/include'
56 infodir='${prefix}/info'
57 mandir='${prefix}/man'
58
59 # Initialize some other variables.
60 subdirs=
61 MFLAGS= MAKEFLAGS=
62 SHELL=${CONFIG_SHELL-/bin/sh}
63 # Maximum number of lines to put in a shell here document.
64 ac_max_here_lines=12
65
66 ac_prev=
67 for ac_option
68 do
69
70   # If the previous option needs an argument, assign it.
71   if test -n "$ac_prev"; then
72     eval "$ac_prev=\$ac_option"
73     ac_prev=
74     continue
75   fi
76
77   case "$ac_option" in
78   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
79   *) ac_optarg= ;;
80   esac
81
82   # Accept the important Cygnus configure options, so we can diagnose typos.
83
84   case "$ac_option" in
85
86   -bindir | --bindir | --bindi | --bind | --bin | --bi)
87     ac_prev=bindir ;;
88   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89     bindir="$ac_optarg" ;;
90
91   -build | --build | --buil | --bui | --bu)
92     ac_prev=build ;;
93   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94     build="$ac_optarg" ;;
95
96   -cache-file | --cache-file | --cache-fil | --cache-fi \
97   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
98     ac_prev=cache_file ;;
99   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101     cache_file="$ac_optarg" ;;
102
103   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
104     ac_prev=datadir ;;
105   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
106   | --da=*)
107     datadir="$ac_optarg" ;;
108
109   -disable-* | --disable-*)
110     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111     # Reject names that are not valid shell variable names.
112     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     eval "enable_${ac_feature}=no" ;;
117
118   -enable-* | --enable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     case "$ac_option" in
126       *=*) ;;
127       *) ac_optarg=yes ;;
128     esac
129     eval "enable_${ac_feature}='$ac_optarg'" ;;
130
131   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133   | --exec | --exe | --ex)
134     ac_prev=exec_prefix ;;
135   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137   | --exec=* | --exe=* | --ex=*)
138     exec_prefix="$ac_optarg" ;;
139
140   -gas | --gas | --ga | --g)
141     # Obsolete; use --with-gas.
142     with_gas=yes ;;
143
144   -help | --help | --hel | --he)
145     # Omit some internal or obsolete options to make the list less imposing.
146     # This message is too long to be a string in the A/UX 3.1 sh.
147     cat << EOF
148 Usage: configure [options] [host]
149 Options: [defaults in brackets after descriptions]
150 Configuration:
151   --cache-file=FILE       cache test results in FILE
152   --help                  print this message
153   --no-create             do not create output files
154   --quiet, --silent       do not print \`checking...' messages
155   --version               print the version of autoconf that created configure
156 Directory and file names:
157   --prefix=PREFIX         install architecture-independent files in PREFIX
158                           [$ac_default_prefix]
159   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
160                           [same as prefix]
161   --bindir=DIR            user executables in DIR [EPREFIX/bin]
162   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
163   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
164   --datadir=DIR           read-only architecture-independent data in DIR
165                           [PREFIX/share]
166   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
167   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
168                           [PREFIX/com]
169   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
170   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
171   --includedir=DIR        C header files in DIR [PREFIX/include]
172   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
173   --infodir=DIR           info documentation in DIR [PREFIX/info]
174   --mandir=DIR            man documentation in DIR [PREFIX/man]
175   --srcdir=DIR            find the sources in DIR [configure dir or ..]
176   --program-prefix=PREFIX prepend PREFIX to installed program names
177   --program-suffix=SUFFIX append SUFFIX to installed program names
178   --program-transform-name=PROGRAM
179                           run sed PROGRAM on installed program names
180 EOF
181     cat << EOF
182 Host type:
183   --build=BUILD           configure for building on BUILD [BUILD=HOST]
184   --host=HOST             configure for HOST [guessed]
185   --target=TARGET         configure for TARGET [TARGET=HOST]
186 Features and packages:
187   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
188   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
189   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
190   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
191   --x-includes=DIR        X include files are in DIR
192   --x-libraries=DIR       X library files are in DIR
193 EOF
194     if test -n "$ac_help"; then
195       echo "--enable and --with options recognized:$ac_help"
196     fi
197     exit 0 ;;
198
199   -host | --host | --hos | --ho)
200     ac_prev=host ;;
201   -host=* | --host=* | --hos=* | --ho=*)
202     host="$ac_optarg" ;;
203
204   -includedir | --includedir | --includedi | --included | --include \
205   | --includ | --inclu | --incl | --inc)
206     ac_prev=includedir ;;
207   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208   | --includ=* | --inclu=* | --incl=* | --inc=*)
209     includedir="$ac_optarg" ;;
210
211   -infodir | --infodir | --infodi | --infod | --info | --inf)
212     ac_prev=infodir ;;
213   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214     infodir="$ac_optarg" ;;
215
216   -libdir | --libdir | --libdi | --libd)
217     ac_prev=libdir ;;
218   -libdir=* | --libdir=* | --libdi=* | --libd=*)
219     libdir="$ac_optarg" ;;
220
221   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222   | --libexe | --libex | --libe)
223     ac_prev=libexecdir ;;
224   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225   | --libexe=* | --libex=* | --libe=*)
226     libexecdir="$ac_optarg" ;;
227
228   -localstatedir | --localstatedir | --localstatedi | --localstated \
229   | --localstate | --localstat | --localsta | --localst \
230   | --locals | --local | --loca | --loc | --lo)
231     ac_prev=localstatedir ;;
232   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235     localstatedir="$ac_optarg" ;;
236
237   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
238     ac_prev=mandir ;;
239   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240     mandir="$ac_optarg" ;;
241
242   -nfp | --nfp | --nf)
243     # Obsolete; use --without-fp.
244     with_fp=no ;;
245
246   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
247   | --no-cr | --no-c)
248     no_create=yes ;;
249
250   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252     no_recursion=yes ;;
253
254   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256   | --oldin | --oldi | --old | --ol | --o)
257     ac_prev=oldincludedir ;;
258   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261     oldincludedir="$ac_optarg" ;;
262
263   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
264     ac_prev=prefix ;;
265   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266     prefix="$ac_optarg" ;;
267
268   -program-prefix | --program-prefix | --program-prefi | --program-pref \
269   | --program-pre | --program-pr | --program-p)
270     ac_prev=program_prefix ;;
271   -program-prefix=* | --program-prefix=* | --program-prefi=* \
272   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273     program_prefix="$ac_optarg" ;;
274
275   -program-suffix | --program-suffix | --program-suffi | --program-suff \
276   | --program-suf | --program-su | --program-s)
277     ac_prev=program_suffix ;;
278   -program-suffix=* | --program-suffix=* | --program-suffi=* \
279   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280     program_suffix="$ac_optarg" ;;
281
282   -program-transform-name | --program-transform-name \
283   | --program-transform-nam | --program-transform-na \
284   | --program-transform-n | --program-transform- \
285   | --program-transform | --program-transfor \
286   | --program-transfo | --program-transf \
287   | --program-trans | --program-tran \
288   | --progr-tra | --program-tr | --program-t)
289     ac_prev=program_transform_name ;;
290   -program-transform-name=* | --program-transform-name=* \
291   | --program-transform-nam=* | --program-transform-na=* \
292   | --program-transform-n=* | --program-transform-=* \
293   | --program-transform=* | --program-transfor=* \
294   | --program-transfo=* | --program-transf=* \
295   | --program-trans=* | --program-tran=* \
296   | --progr-tra=* | --program-tr=* | --program-t=*)
297     program_transform_name="$ac_optarg" ;;
298
299   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300   | -silent | --silent | --silen | --sile | --sil)
301     silent=yes ;;
302
303   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
304     ac_prev=sbindir ;;
305   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
306   | --sbi=* | --sb=*)
307     sbindir="$ac_optarg" ;;
308
309   -sharedstatedir | --sharedstatedir | --sharedstatedi \
310   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311   | --sharedst | --shareds | --shared | --share | --shar \
312   | --sha | --sh)
313     ac_prev=sharedstatedir ;;
314   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
317   | --sha=* | --sh=*)
318     sharedstatedir="$ac_optarg" ;;
319
320   -site | --site | --sit)
321     ac_prev=site ;;
322   -site=* | --site=* | --sit=*)
323     site="$ac_optarg" ;;
324
325   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
326     ac_prev=srcdir ;;
327   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328     srcdir="$ac_optarg" ;;
329
330   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331   | --syscon | --sysco | --sysc | --sys | --sy)
332     ac_prev=sysconfdir ;;
333   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335     sysconfdir="$ac_optarg" ;;
336
337   -target | --target | --targe | --targ | --tar | --ta | --t)
338     ac_prev=target ;;
339   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340     target="$ac_optarg" ;;
341
342   -v | -verbose | --verbose | --verbos | --verbo | --verb)
343     verbose=yes ;;
344
345   -version | --version | --versio | --versi | --vers)
346     echo "configure generated by autoconf version 2.13"
347     exit 0 ;;
348
349   -with-* | --with-*)
350     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351     # Reject names that are not valid shell variable names.
352     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354     fi
355     ac_package=`echo $ac_package| sed 's/-/_/g'`
356     case "$ac_option" in
357       *=*) ;;
358       *) ac_optarg=yes ;;
359     esac
360     eval "with_${ac_package}='$ac_optarg'" ;;
361
362   -without-* | --without-*)
363     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364     # Reject names that are not valid shell variable names.
365     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367     fi
368     ac_package=`echo $ac_package| sed 's/-/_/g'`
369     eval "with_${ac_package}=no" ;;
370
371   --x)
372     # Obsolete; use --with-x.
373     with_x=yes ;;
374
375   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376   | --x-incl | --x-inc | --x-in | --x-i)
377     ac_prev=x_includes ;;
378   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380     x_includes="$ac_optarg" ;;
381
382   -x-libraries | --x-libraries | --x-librarie | --x-librari \
383   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384     ac_prev=x_libraries ;;
385   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387     x_libraries="$ac_optarg" ;;
388
389   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
390     ;;
391
392   *)
393     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394       echo "configure: warning: $ac_option: invalid host type" 1>&2
395     fi
396     if test "x$nonopt" != xNONE; then
397       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
398     fi
399     nonopt="$ac_option"
400     ;;
401
402   esac
403 done
404
405 if test -n "$ac_prev"; then
406   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 fi
408
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
410
411 # File descriptor usage:
412 # 0 standard input
413 # 1 file creation
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
420   exec 6>/dev/null
421 else
422   exec 6>&1
423 fi
424 exec 5>./config.log
425
426 echo "\
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
429 " 1>&5
430
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
433 ac_configure_args=
434 for ac_arg
435 do
436   case "$ac_arg" in
437   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438   | --no-cr | --no-c) ;;
439   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444   esac
445 done
446
447 # NLS nuisances.
448 # Only set these to C if already set.  These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
456
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
461
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=src/q2c.c
465
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468   ac_srcdir_defaulted=yes
469   # Try the directory containing this script, then its parent.
470   ac_prog=$0
471   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473   srcdir=$ac_confdir
474   if test ! -r $srcdir/$ac_unique_file; then
475     srcdir=..
476   fi
477 else
478   ac_srcdir_defaulted=no
479 fi
480 if test ! -r $srcdir/$ac_unique_file; then
481   if test "$ac_srcdir_defaulted" = yes; then
482     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483   else
484     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485   fi
486 fi
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491   if test "x$prefix" != xNONE; then
492     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493   else
494     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495   fi
496 fi
497 for ac_site_file in $CONFIG_SITE; do
498   if test -r "$ac_site_file"; then
499     echo "loading site script $ac_site_file"
500     . "$ac_site_file"
501   fi
502 done
503
504 if test -r "$cache_file"; then
505   echo "loading cache $cache_file"
506   . $cache_file
507 else
508   echo "creating cache $cache_file"
509   > $cache_file
510 fi
511
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
518
519 ac_exeext=
520 ac_objext=o
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524     ac_n= ac_c='
525 ' ac_t='        '
526   else
527     ac_n=-n ac_c= ac_t=
528   fi
529 else
530   ac_n= ac_c='\c' ac_t=
531 fi
532
533
534
535
536
537
538 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE=1"
539 # Extract the first word of "gcc", so it can be a program name with args.
540 set dummy gcc; ac_word=$2
541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
542 echo "configure:543: checking for $ac_word" >&5
543 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
544   echo $ac_n "(cached) $ac_c" 1>&6
545 else
546   if test -n "$CC"; then
547   ac_cv_prog_CC="$CC" # Let the user override the test.
548 else
549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
550   ac_dummy="$PATH"
551   for ac_dir in $ac_dummy; do
552     test -z "$ac_dir" && ac_dir=.
553     if test -f $ac_dir/$ac_word; then
554       ac_cv_prog_CC="gcc"
555       break
556     fi
557   done
558   IFS="$ac_save_ifs"
559 fi
560 fi
561 CC="$ac_cv_prog_CC"
562 if test -n "$CC"; then
563   echo "$ac_t""$CC" 1>&6
564 else
565   echo "$ac_t""no" 1>&6
566 fi
567
568 if test -z "$CC"; then
569   # Extract the first word of "cc", so it can be a program name with args.
570 set dummy cc; ac_word=$2
571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
572 echo "configure:573: checking for $ac_word" >&5
573 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
574   echo $ac_n "(cached) $ac_c" 1>&6
575 else
576   if test -n "$CC"; then
577   ac_cv_prog_CC="$CC" # Let the user override the test.
578 else
579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
580   ac_prog_rejected=no
581   ac_dummy="$PATH"
582   for ac_dir in $ac_dummy; do
583     test -z "$ac_dir" && ac_dir=.
584     if test -f $ac_dir/$ac_word; then
585       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
586         ac_prog_rejected=yes
587         continue
588       fi
589       ac_cv_prog_CC="cc"
590       break
591     fi
592   done
593   IFS="$ac_save_ifs"
594 if test $ac_prog_rejected = yes; then
595   # We found a bogon in the path, so make sure we never use it.
596   set dummy $ac_cv_prog_CC
597   shift
598   if test $# -gt 0; then
599     # We chose a different compiler from the bogus one.
600     # However, it has the same basename, so the bogon will be chosen
601     # first if we set CC to just the basename; use the full file name.
602     shift
603     set dummy "$ac_dir/$ac_word" "$@"
604     shift
605     ac_cv_prog_CC="$@"
606   fi
607 fi
608 fi
609 fi
610 CC="$ac_cv_prog_CC"
611 if test -n "$CC"; then
612   echo "$ac_t""$CC" 1>&6
613 else
614   echo "$ac_t""no" 1>&6
615 fi
616
617   if test -z "$CC"; then
618     case "`uname -s`" in
619     *win32* | *WIN32*)
620       # Extract the first word of "cl", so it can be a program name with args.
621 set dummy cl; ac_word=$2
622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
623 echo "configure:624: checking for $ac_word" >&5
624 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
625   echo $ac_n "(cached) $ac_c" 1>&6
626 else
627   if test -n "$CC"; then
628   ac_cv_prog_CC="$CC" # Let the user override the test.
629 else
630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
631   ac_dummy="$PATH"
632   for ac_dir in $ac_dummy; do
633     test -z "$ac_dir" && ac_dir=.
634     if test -f $ac_dir/$ac_word; then
635       ac_cv_prog_CC="cl"
636       break
637     fi
638   done
639   IFS="$ac_save_ifs"
640 fi
641 fi
642 CC="$ac_cv_prog_CC"
643 if test -n "$CC"; then
644   echo "$ac_t""$CC" 1>&6
645 else
646   echo "$ac_t""no" 1>&6
647 fi
648  ;;
649     esac
650   fi
651   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
652 fi
653
654 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
655 echo "configure:656: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
656
657 ac_ext=c
658 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
659 ac_cpp='$CPP $CPPFLAGS'
660 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
661 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
662 cross_compiling=$ac_cv_prog_cc_cross
663
664 cat > conftest.$ac_ext << EOF
665
666 #line 667 "configure"
667 #include "confdefs.h"
668
669 main(){return(0);}
670 EOF
671 if { (eval echo configure:672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
672   ac_cv_prog_cc_works=yes
673   # If we can't run a trivial program, we are probably using a cross compiler.
674   if (./conftest; exit) 2>/dev/null; then
675     ac_cv_prog_cc_cross=no
676   else
677     ac_cv_prog_cc_cross=yes
678   fi
679 else
680   echo "configure: failed program was:" >&5
681   cat conftest.$ac_ext >&5
682   ac_cv_prog_cc_works=no
683 fi
684 rm -fr conftest*
685 ac_ext=c
686 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
687 ac_cpp='$CPP $CPPFLAGS'
688 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
689 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
690 cross_compiling=$ac_cv_prog_cc_cross
691
692 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
693 if test $ac_cv_prog_cc_works = no; then
694   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
695 fi
696 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
697 echo "configure:698: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
698 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
699 cross_compiling=$ac_cv_prog_cc_cross
700
701 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
702 echo "configure:703: checking whether we are using GNU C" >&5
703 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
704   echo $ac_n "(cached) $ac_c" 1>&6
705 else
706   cat > conftest.c <<EOF
707 #ifdef __GNUC__
708   yes;
709 #endif
710 EOF
711 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
712   ac_cv_prog_gcc=yes
713 else
714   ac_cv_prog_gcc=no
715 fi
716 fi
717
718 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
719
720 if test $ac_cv_prog_gcc = yes; then
721   GCC=yes
722 else
723   GCC=
724 fi
725
726 ac_test_CFLAGS="${CFLAGS+set}"
727 ac_save_CFLAGS="$CFLAGS"
728 CFLAGS=
729 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
730 echo "configure:731: checking whether ${CC-cc} accepts -g" >&5
731 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
732   echo $ac_n "(cached) $ac_c" 1>&6
733 else
734   echo 'void f(){}' > conftest.c
735 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
736   ac_cv_prog_cc_g=yes
737 else
738   ac_cv_prog_cc_g=no
739 fi
740 rm -f conftest*
741
742 fi
743
744 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
745 if test "$ac_test_CFLAGS" = set; then
746   CFLAGS="$ac_save_CFLAGS"
747 elif test $ac_cv_prog_cc_g = yes; then
748   if test "$GCC" = yes; then
749     CFLAGS="-g -O2"
750   else
751     CFLAGS="-g"
752   fi
753 else
754   if test "$GCC" = yes; then
755     CFLAGS="-O2"
756   else
757     CFLAGS=
758   fi
759 fi
760
761 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
762 echo "configure:763: checking for POSIXized ISC" >&5
763 if test -d /etc/conf/kconfig.d &&
764   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
765 then
766   echo "$ac_t""yes" 1>&6
767   ISC=yes # If later tests want to check for ISC.
768   cat >> confdefs.h <<\EOF
769 #define _POSIX_SOURCE 1
770 EOF
771
772   if test "$GCC" = yes; then
773     CC="$CC -posix"
774   else
775     CC="$CC -Xp"
776   fi
777 else
778   echo "$ac_t""no" 1>&6
779   ISC=
780 fi
781
782 # Extract the first word of "gcc", so it can be a program name with args.
783 set dummy gcc; ac_word=$2
784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
785 echo "configure:786: checking for $ac_word" >&5
786 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
787   echo $ac_n "(cached) $ac_c" 1>&6
788 else
789   if test -n "$CC"; then
790   ac_cv_prog_CC="$CC" # Let the user override the test.
791 else
792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
793   ac_dummy="$PATH"
794   for ac_dir in $ac_dummy; do
795     test -z "$ac_dir" && ac_dir=.
796     if test -f $ac_dir/$ac_word; then
797       ac_cv_prog_CC="gcc"
798       break
799     fi
800   done
801   IFS="$ac_save_ifs"
802 fi
803 fi
804 CC="$ac_cv_prog_CC"
805 if test -n "$CC"; then
806   echo "$ac_t""$CC" 1>&6
807 else
808   echo "$ac_t""no" 1>&6
809 fi
810
811 if test -z "$CC"; then
812   # Extract the first word of "cc", so it can be a program name with args.
813 set dummy cc; ac_word=$2
814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
815 echo "configure:816: checking for $ac_word" >&5
816 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
817   echo $ac_n "(cached) $ac_c" 1>&6
818 else
819   if test -n "$CC"; then
820   ac_cv_prog_CC="$CC" # Let the user override the test.
821 else
822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
823   ac_prog_rejected=no
824   ac_dummy="$PATH"
825   for ac_dir in $ac_dummy; do
826     test -z "$ac_dir" && ac_dir=.
827     if test -f $ac_dir/$ac_word; then
828       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
829         ac_prog_rejected=yes
830         continue
831       fi
832       ac_cv_prog_CC="cc"
833       break
834     fi
835   done
836   IFS="$ac_save_ifs"
837 if test $ac_prog_rejected = yes; then
838   # We found a bogon in the path, so make sure we never use it.
839   set dummy $ac_cv_prog_CC
840   shift
841   if test $# -gt 0; then
842     # We chose a different compiler from the bogus one.
843     # However, it has the same basename, so the bogon will be chosen
844     # first if we set CC to just the basename; use the full file name.
845     shift
846     set dummy "$ac_dir/$ac_word" "$@"
847     shift
848     ac_cv_prog_CC="$@"
849   fi
850 fi
851 fi
852 fi
853 CC="$ac_cv_prog_CC"
854 if test -n "$CC"; then
855   echo "$ac_t""$CC" 1>&6
856 else
857   echo "$ac_t""no" 1>&6
858 fi
859
860   if test -z "$CC"; then
861     case "`uname -s`" in
862     *win32* | *WIN32*)
863       # Extract the first word of "cl", so it can be a program name with args.
864 set dummy cl; ac_word=$2
865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
866 echo "configure:867: checking for $ac_word" >&5
867 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
868   echo $ac_n "(cached) $ac_c" 1>&6
869 else
870   if test -n "$CC"; then
871   ac_cv_prog_CC="$CC" # Let the user override the test.
872 else
873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
874   ac_dummy="$PATH"
875   for ac_dir in $ac_dummy; do
876     test -z "$ac_dir" && ac_dir=.
877     if test -f $ac_dir/$ac_word; then
878       ac_cv_prog_CC="cl"
879       break
880     fi
881   done
882   IFS="$ac_save_ifs"
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     esac
893   fi
894   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
895 fi
896
897 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
898 echo "configure:899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
899
900 ac_ext=c
901 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
902 ac_cpp='$CPP $CPPFLAGS'
903 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
904 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
905 cross_compiling=$ac_cv_prog_cc_cross
906
907 cat > conftest.$ac_ext << EOF
908
909 #line 910 "configure"
910 #include "confdefs.h"
911
912 main(){return(0);}
913 EOF
914 if { (eval echo configure:915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
915   ac_cv_prog_cc_works=yes
916   # If we can't run a trivial program, we are probably using a cross compiler.
917   if (./conftest; exit) 2>/dev/null; then
918     ac_cv_prog_cc_cross=no
919   else
920     ac_cv_prog_cc_cross=yes
921   fi
922 else
923   echo "configure: failed program was:" >&5
924   cat conftest.$ac_ext >&5
925   ac_cv_prog_cc_works=no
926 fi
927 rm -fr conftest*
928 ac_ext=c
929 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
930 ac_cpp='$CPP $CPPFLAGS'
931 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
932 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
933 cross_compiling=$ac_cv_prog_cc_cross
934
935 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
936 if test $ac_cv_prog_cc_works = no; then
937   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
938 fi
939 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
940 echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
941 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
942 cross_compiling=$ac_cv_prog_cc_cross
943
944 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
945 echo "configure:946: checking whether we are using GNU C" >&5
946 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
947   echo $ac_n "(cached) $ac_c" 1>&6
948 else
949   cat > conftest.c <<EOF
950 #ifdef __GNUC__
951   yes;
952 #endif
953 EOF
954 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
955   ac_cv_prog_gcc=yes
956 else
957   ac_cv_prog_gcc=no
958 fi
959 fi
960
961 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
962
963 if test $ac_cv_prog_gcc = yes; then
964   GCC=yes
965 else
966   GCC=
967 fi
968
969 ac_test_CFLAGS="${CFLAGS+set}"
970 ac_save_CFLAGS="$CFLAGS"
971 CFLAGS=
972 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
973 echo "configure:974: checking whether ${CC-cc} accepts -g" >&5
974 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   echo 'void f(){}' > conftest.c
978 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
979   ac_cv_prog_cc_g=yes
980 else
981   ac_cv_prog_cc_g=no
982 fi
983 rm -f conftest*
984
985 fi
986
987 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
988 if test "$ac_test_CFLAGS" = set; then
989   CFLAGS="$ac_save_CFLAGS"
990 elif test $ac_cv_prog_cc_g = yes; then
991   if test "$GCC" = yes; then
992     CFLAGS="-g -O2"
993   else
994     CFLAGS="-g"
995   fi
996 else
997   if test "$GCC" = yes; then
998     CFLAGS="-O2"
999   else
1000     CFLAGS=
1001   fi
1002 fi
1003
1004
1005
1006
1007 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1008 echo "configure:1009: checking for ${CC-cc} option to accept ANSI C" >&5
1009 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1010   echo $ac_n "(cached) $ac_c" 1>&6
1011 else
1012   am_cv_prog_cc_stdc=no
1013 ac_save_CC="$CC"
1014 # Don't try gcc -ansi; that turns off useful extensions and
1015 # breaks some systems' header files.
1016 # AIX                   -qlanglvl=ansi
1017 # Ultrix and OSF/1      -std1
1018 # HP-UX                 -Aa -D_HPUX_SOURCE
1019 # SVR4                  -Xc -D__EXTENSIONS__
1020 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1021 do
1022   CC="$ac_save_CC $ac_arg"
1023   cat > conftest.$ac_ext <<EOF
1024 #line 1025 "configure"
1025 #include "confdefs.h"
1026 #include <stdarg.h>
1027 #include <stdio.h>
1028 #include <sys/types.h>
1029 #include <sys/stat.h>
1030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1031 struct buf { int x; };
1032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1033 static char *e (p, i)
1034      char **p;
1035      int i;
1036 {
1037   return p[i];
1038 }
1039 static char *f (char * (*g) (char **, int), char **p, ...)
1040 {
1041   char *s;
1042   va_list v;
1043   va_start (v,p);
1044   s = g (p, va_arg (v,int));
1045   va_end (v);
1046   return s;
1047 }
1048 int test (int i, double x);
1049 struct s1 {int (*f) (int a);};
1050 struct s2 {int (*f) (double a);};
1051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1052 int argc;
1053 char **argv;
1054
1055 int main() {
1056
1057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1058
1059 ; return 0; }
1060 EOF
1061 if { (eval echo configure:1062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1062   rm -rf conftest*
1063   am_cv_prog_cc_stdc="$ac_arg"; break
1064 else
1065   echo "configure: failed program was:" >&5
1066   cat conftest.$ac_ext >&5
1067 fi
1068 rm -f conftest*
1069 done
1070 CC="$ac_save_CC"
1071
1072 fi
1073
1074 if test -z "$am_cv_prog_cc_stdc"; then
1075   echo "$ac_t""none needed" 1>&6
1076 else
1077   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1078 fi
1079 case "x$am_cv_prog_cc_stdc" in
1080   x|xno) ;;
1081   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1082 esac
1083
1084 ac_aux_dir=
1085 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1086   if test -f $ac_dir/install-sh; then
1087     ac_aux_dir=$ac_dir
1088     ac_install_sh="$ac_aux_dir/install-sh -c"
1089     break
1090   elif test -f $ac_dir/install.sh; then
1091     ac_aux_dir=$ac_dir
1092     ac_install_sh="$ac_aux_dir/install.sh -c"
1093     break
1094   fi
1095 done
1096 if test -z "$ac_aux_dir"; then
1097   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1098 fi
1099 ac_config_guess=$ac_aux_dir/config.guess
1100 ac_config_sub=$ac_aux_dir/config.sub
1101 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1102
1103
1104 # Do some error checking and defaulting for the host and target type.
1105 # The inputs are:
1106 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1107 #
1108 # The rules are:
1109 # 1. You are not allowed to specify --host, --target, and nonopt at the
1110 #    same time.
1111 # 2. Host defaults to nonopt.
1112 # 3. If nonopt is not specified, then host defaults to the current host,
1113 #    as determined by config.guess.
1114 # 4. Target and build default to nonopt.
1115 # 5. If nonopt is not specified, then target and build default to host.
1116
1117 # The aliases save the names the user supplied, while $host etc.
1118 # will get canonicalized.
1119 case $host---$target---$nonopt in
1120 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1121 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1122 esac
1123
1124
1125 # Make sure we can run config.sub.
1126 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1127 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1128 fi
1129
1130 echo $ac_n "checking host system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking host system type" >&5
1132
1133 host_alias=$host
1134 case "$host_alias" in
1135 NONE)
1136   case $nonopt in
1137   NONE)
1138     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1139     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1140     fi ;;
1141   *) host_alias=$nonopt ;;
1142   esac ;;
1143 esac
1144
1145 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1146 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1149 echo "$ac_t""$host" 1>&6
1150
1151 echo $ac_n "checking target system type""... $ac_c" 1>&6
1152 echo "configure:1153: checking target system type" >&5
1153
1154 target_alias=$target
1155 case "$target_alias" in
1156 NONE)
1157   case $nonopt in
1158   NONE) target_alias=$host_alias ;;
1159   *) target_alias=$nonopt ;;
1160   esac ;;
1161 esac
1162
1163 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1164 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1165 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1166 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1167 echo "$ac_t""$target" 1>&6
1168
1169 echo $ac_n "checking build system type""... $ac_c" 1>&6
1170 echo "configure:1171: checking build system type" >&5
1171
1172 build_alias=$build
1173 case "$build_alias" in
1174 NONE)
1175   case $nonopt in
1176   NONE) build_alias=$host_alias ;;
1177   *) build_alias=$nonopt ;;
1178   esac ;;
1179 esac
1180
1181 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1182 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1183 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1184 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1185 echo "$ac_t""$build" 1>&6
1186
1187 test "$host_alias" != "$target_alias" &&
1188   test "$program_prefix$program_suffix$program_transform_name" = \
1189     NONENONEs,x,x, &&
1190   program_prefix=${target_alias}-
1191
1192 # Find a good install program.  We prefer a C program (faster),
1193 # so one script is as good as another.  But avoid the broken or
1194 # incompatible versions:
1195 # SysV /etc/install, /usr/sbin/install
1196 # SunOS /usr/etc/install
1197 # IRIX /sbin/install
1198 # AIX /bin/install
1199 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1200 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1201 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1202 # ./install, which can be erroneously created by make from ./install.sh.
1203 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1204 echo "configure:1205: checking for a BSD compatible install" >&5
1205 if test -z "$INSTALL"; then
1206 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1207   echo $ac_n "(cached) $ac_c" 1>&6
1208 else
1209     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1210   for ac_dir in $PATH; do
1211     # Account for people who put trailing slashes in PATH elements.
1212     case "$ac_dir/" in
1213     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1214     *)
1215       # OSF1 and SCO ODT 3.0 have their own names for install.
1216       # Don't use installbsd from OSF since it installs stuff as root
1217       # by default.
1218       for ac_prog in ginstall scoinst install; do
1219         if test -f $ac_dir/$ac_prog; then
1220           if test $ac_prog = install &&
1221             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1222             # AIX install.  It has an incompatible calling convention.
1223             :
1224           else
1225             ac_cv_path_install="$ac_dir/$ac_prog -c"
1226             break 2
1227           fi
1228         fi
1229       done
1230       ;;
1231     esac
1232   done
1233   IFS="$ac_save_IFS"
1234
1235 fi
1236   if test "${ac_cv_path_install+set}" = set; then
1237     INSTALL="$ac_cv_path_install"
1238   else
1239     # As a last resort, use the slow shell script.  We don't cache a
1240     # path for INSTALL within a source directory, because that will
1241     # break other packages using the cache if that directory is
1242     # removed, or if the path is relative.
1243     INSTALL="$ac_install_sh"
1244   fi
1245 fi
1246 echo "$ac_t""$INSTALL" 1>&6
1247
1248 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1249 # It thinks the first close brace ends the variable substitution.
1250 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1251
1252 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1253
1254 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1255
1256 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1257 echo "configure:1258: checking whether build environment is sane" >&5
1258 # Just in case
1259 sleep 1
1260 echo timestamp > conftestfile
1261 # Do `set' in a subshell so we don't clobber the current shell's
1262 # arguments.  Must try -L first in case configure is actually a
1263 # symlink; some systems play weird games with the mod time of symlinks
1264 # (eg FreeBSD returns the mod time of the symlink's containing
1265 # directory).
1266 if (
1267    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1268    if test "$*" = "X"; then
1269       # -L didn't work.
1270       set X `ls -t $srcdir/configure conftestfile`
1271    fi
1272    if test "$*" != "X $srcdir/configure conftestfile" \
1273       && test "$*" != "X conftestfile $srcdir/configure"; then
1274
1275       # If neither matched, then we have a broken ls.  This can happen
1276       # if, for instance, CONFIG_SHELL is bash and it inherits a
1277       # broken ls alias from the environment.  This has actually
1278       # happened.  Such a system could not be considered "sane".
1279       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1280 alias in your environment" 1>&2; exit 1; }
1281    fi
1282
1283    test "$2" = conftestfile
1284    )
1285 then
1286    # Ok.
1287    :
1288 else
1289    { echo "configure: error: newly created file is older than distributed files!
1290 Check your system clock" 1>&2; exit 1; }
1291 fi
1292 rm -f conftest*
1293 echo "$ac_t""yes" 1>&6
1294 if test "$program_transform_name" = s,x,x,; then
1295   program_transform_name=
1296 else
1297   # Double any \ or $.  echo might interpret backslashes.
1298   cat <<\EOF_SED > conftestsed
1299 s,\\,\\\\,g; s,\$,$$,g
1300 EOF_SED
1301   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1302   rm -f conftestsed
1303 fi
1304 test "$program_prefix" != NONE &&
1305   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1306 # Use a double $ so make ignores it.
1307 test "$program_suffix" != NONE &&
1308   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1309
1310 # sed with no file args requires a program.
1311 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1312
1313 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1314 echo "configure:1315: checking whether ${MAKE-make} sets \${MAKE}" >&5
1315 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1316 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1317   echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319   cat > conftestmake <<\EOF
1320 all:
1321         @echo 'ac_maketemp="${MAKE}"'
1322 EOF
1323 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1324 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1325 if test -n "$ac_maketemp"; then
1326   eval ac_cv_prog_make_${ac_make}_set=yes
1327 else
1328   eval ac_cv_prog_make_${ac_make}_set=no
1329 fi
1330 rm -f conftestmake
1331 fi
1332 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1333   echo "$ac_t""yes" 1>&6
1334   SET_MAKE=
1335 else
1336   echo "$ac_t""no" 1>&6
1337   SET_MAKE="MAKE=${MAKE-make}"
1338 fi
1339
1340
1341 PACKAGE=pspp
1342
1343 VERSION=0.3.0
1344
1345 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1346   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1347 fi
1348 cat >> confdefs.h <<EOF
1349 #define PACKAGE "$PACKAGE"
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define VERSION "$VERSION"
1354 EOF
1355
1356
1357
1358 missing_dir=`cd $ac_aux_dir && pwd`
1359 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1360 echo "configure:1361: checking for working aclocal" >&5
1361 # Run test in a subshell; some versions of sh will print an error if
1362 # an executable is not found, even if stderr is redirected.
1363 # Redirect stdin to placate older versions of autoconf.  Sigh.
1364 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1365    ACLOCAL=aclocal
1366    echo "$ac_t""found" 1>&6
1367 else
1368    ACLOCAL="$missing_dir/missing aclocal"
1369    echo "$ac_t""missing" 1>&6
1370 fi
1371
1372 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1373 echo "configure:1374: checking for working autoconf" >&5
1374 # Run test in a subshell; some versions of sh will print an error if
1375 # an executable is not found, even if stderr is redirected.
1376 # Redirect stdin to placate older versions of autoconf.  Sigh.
1377 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1378    AUTOCONF=autoconf
1379    echo "$ac_t""found" 1>&6
1380 else
1381    AUTOCONF="$missing_dir/missing autoconf"
1382    echo "$ac_t""missing" 1>&6
1383 fi
1384
1385 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1386 echo "configure:1387: checking for working automake" >&5
1387 # Run test in a subshell; some versions of sh will print an error if
1388 # an executable is not found, even if stderr is redirected.
1389 # Redirect stdin to placate older versions of autoconf.  Sigh.
1390 if (automake --version) < /dev/null > /dev/null 2>&1; then
1391    AUTOMAKE=automake
1392    echo "$ac_t""found" 1>&6
1393 else
1394    AUTOMAKE="$missing_dir/missing automake"
1395    echo "$ac_t""missing" 1>&6
1396 fi
1397
1398 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1399 echo "configure:1400: checking for working autoheader" >&5
1400 # Run test in a subshell; some versions of sh will print an error if
1401 # an executable is not found, even if stderr is redirected.
1402 # Redirect stdin to placate older versions of autoconf.  Sigh.
1403 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1404    AUTOHEADER=autoheader
1405    echo "$ac_t""found" 1>&6
1406 else
1407    AUTOHEADER="$missing_dir/missing autoheader"
1408    echo "$ac_t""missing" 1>&6
1409 fi
1410
1411 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1412 echo "configure:1413: checking for working makeinfo" >&5
1413 # Run test in a subshell; some versions of sh will print an error if
1414 # an executable is not found, even if stderr is redirected.
1415 # Redirect stdin to placate older versions of autoconf.  Sigh.
1416 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1417    MAKEINFO=makeinfo
1418    echo "$ac_t""found" 1>&6
1419 else
1420    MAKEINFO="$missing_dir/missing makeinfo"
1421    echo "$ac_t""missing" 1>&6
1422 fi
1423
1424
1425
1426 #AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
1427 cat >> confdefs.h <<EOF
1428 #define VERSION "$VERSION"
1429 EOF
1430
1431
1432 #GNU_PACKAGE="GNU $PACKAGE"
1433 #AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE")
1434
1435 ALL_LINGUAS=""
1436
1437 if test "$program_transform_name" = s,x,x,; then
1438   program_transform_name=
1439 else
1440   # Double any \ or $.  echo might interpret backslashes.
1441   cat <<\EOF_SED > conftestsed
1442 s,\\,\\\\,g; s,\$,$$,g
1443 EOF_SED
1444   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1445   rm -f conftestsed
1446 fi
1447 test "$program_prefix" != NONE &&
1448   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1449 # Use a double $ so make ignores it.
1450 test "$program_suffix" != NONE &&
1451   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1452
1453 # sed with no file args requires a program.
1454 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1455
1456 # Find a good install program.  We prefer a C program (faster),
1457 # so one script is as good as another.  But avoid the broken or
1458 # incompatible versions:
1459 # SysV /etc/install, /usr/sbin/install
1460 # SunOS /usr/etc/install
1461 # IRIX /sbin/install
1462 # AIX /bin/install
1463 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1464 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1465 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1466 # ./install, which can be erroneously created by make from ./install.sh.
1467 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1468 echo "configure:1469: checking for a BSD compatible install" >&5
1469 if test -z "$INSTALL"; then
1470 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1471   echo $ac_n "(cached) $ac_c" 1>&6
1472 else
1473     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1474   for ac_dir in $PATH; do
1475     # Account for people who put trailing slashes in PATH elements.
1476     case "$ac_dir/" in
1477     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1478     *)
1479       # OSF1 and SCO ODT 3.0 have their own names for install.
1480       # Don't use installbsd from OSF since it installs stuff as root
1481       # by default.
1482       for ac_prog in ginstall scoinst install; do
1483         if test -f $ac_dir/$ac_prog; then
1484           if test $ac_prog = install &&
1485             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1486             # AIX install.  It has an incompatible calling convention.
1487             :
1488           else
1489             ac_cv_path_install="$ac_dir/$ac_prog -c"
1490             break 2
1491           fi
1492         fi
1493       done
1494       ;;
1495     esac
1496   done
1497   IFS="$ac_save_IFS"
1498
1499 fi
1500   if test "${ac_cv_path_install+set}" = set; then
1501     INSTALL="$ac_cv_path_install"
1502   else
1503     # As a last resort, use the slow shell script.  We don't cache a
1504     # path for INSTALL within a source directory, because that will
1505     # break other packages using the cache if that directory is
1506     # removed, or if the path is relative.
1507     INSTALL="$ac_install_sh"
1508   fi
1509 fi
1510 echo "$ac_t""$INSTALL" 1>&6
1511
1512 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1513 # It thinks the first close brace ends the variable substitution.
1514 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1515
1516 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1517
1518 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1519
1520 # Extract the first word of "ranlib", so it can be a program name with args.
1521 set dummy ranlib; ac_word=$2
1522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1523 echo "configure:1524: checking for $ac_word" >&5
1524 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527   if test -n "$RANLIB"; then
1528   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1529 else
1530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1531   ac_dummy="$PATH"
1532   for ac_dir in $ac_dummy; do
1533     test -z "$ac_dir" && ac_dir=.
1534     if test -f $ac_dir/$ac_word; then
1535       ac_cv_prog_RANLIB="ranlib"
1536       break
1537     fi
1538   done
1539   IFS="$ac_save_ifs"
1540   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1541 fi
1542 fi
1543 RANLIB="$ac_cv_prog_RANLIB"
1544 if test -n "$RANLIB"; then
1545   echo "$ac_t""$RANLIB" 1>&6
1546 else
1547   echo "$ac_t""no" 1>&6
1548 fi
1549
1550
1551 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1552 echo "configure:1553: checking how to run the C preprocessor" >&5
1553 # On Suns, sometimes $CPP names a directory.
1554 if test -n "$CPP" && test -d "$CPP"; then
1555   CPP=
1556 fi
1557 if test -z "$CPP"; then
1558 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1559   echo $ac_n "(cached) $ac_c" 1>&6
1560 else
1561     # This must be in double quotes, not single quotes, because CPP may get
1562   # substituted into the Makefile and "${CC-cc}" will confuse make.
1563   CPP="${CC-cc} -E"
1564   # On the NeXT, cc -E runs the code through the compiler's parser,
1565   # not just through cpp.
1566   cat > conftest.$ac_ext <<EOF
1567 #line 1568 "configure"
1568 #include "confdefs.h"
1569 #include <assert.h>
1570 Syntax Error
1571 EOF
1572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1573 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1575 if test -z "$ac_err"; then
1576   :
1577 else
1578   echo "$ac_err" >&5
1579   echo "configure: failed program was:" >&5
1580   cat conftest.$ac_ext >&5
1581   rm -rf conftest*
1582   CPP="${CC-cc} -E -traditional-cpp"
1583   cat > conftest.$ac_ext <<EOF
1584 #line 1585 "configure"
1585 #include "confdefs.h"
1586 #include <assert.h>
1587 Syntax Error
1588 EOF
1589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1590 { (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1592 if test -z "$ac_err"; then
1593   :
1594 else
1595   echo "$ac_err" >&5
1596   echo "configure: failed program was:" >&5
1597   cat conftest.$ac_ext >&5
1598   rm -rf conftest*
1599   CPP="${CC-cc} -nologo -E"
1600   cat > conftest.$ac_ext <<EOF
1601 #line 1602 "configure"
1602 #include "confdefs.h"
1603 #include <assert.h>
1604 Syntax Error
1605 EOF
1606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1607 { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1609 if test -z "$ac_err"; then
1610   :
1611 else
1612   echo "$ac_err" >&5
1613   echo "configure: failed program was:" >&5
1614   cat conftest.$ac_ext >&5
1615   rm -rf conftest*
1616   CPP=/lib/cpp
1617 fi
1618 rm -f conftest*
1619 fi
1620 rm -f conftest*
1621 fi
1622 rm -f conftest*
1623   ac_cv_prog_CPP="$CPP"
1624 fi
1625   CPP="$ac_cv_prog_CPP"
1626 else
1627   ac_cv_prog_CPP="$CPP"
1628 fi
1629 echo "$ac_t""$CPP" 1>&6
1630
1631 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1632 echo "configure:1633: checking for ANSI C header files" >&5
1633 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1634   echo $ac_n "(cached) $ac_c" 1>&6
1635 else
1636   cat > conftest.$ac_ext <<EOF
1637 #line 1638 "configure"
1638 #include "confdefs.h"
1639 #include <stdlib.h>
1640 #include <stdarg.h>
1641 #include <string.h>
1642 #include <float.h>
1643 EOF
1644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1645 { (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1647 if test -z "$ac_err"; then
1648   rm -rf conftest*
1649   ac_cv_header_stdc=yes
1650 else
1651   echo "$ac_err" >&5
1652   echo "configure: failed program was:" >&5
1653   cat conftest.$ac_ext >&5
1654   rm -rf conftest*
1655   ac_cv_header_stdc=no
1656 fi
1657 rm -f conftest*
1658
1659 if test $ac_cv_header_stdc = yes; then
1660   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1661 cat > conftest.$ac_ext <<EOF
1662 #line 1663 "configure"
1663 #include "confdefs.h"
1664 #include <string.h>
1665 EOF
1666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1667   egrep "memchr" >/dev/null 2>&1; then
1668   :
1669 else
1670   rm -rf conftest*
1671   ac_cv_header_stdc=no
1672 fi
1673 rm -f conftest*
1674
1675 fi
1676
1677 if test $ac_cv_header_stdc = yes; then
1678   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1679 cat > conftest.$ac_ext <<EOF
1680 #line 1681 "configure"
1681 #include "confdefs.h"
1682 #include <stdlib.h>
1683 EOF
1684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1685   egrep "free" >/dev/null 2>&1; then
1686   :
1687 else
1688   rm -rf conftest*
1689   ac_cv_header_stdc=no
1690 fi
1691 rm -f conftest*
1692
1693 fi
1694
1695 if test $ac_cv_header_stdc = yes; then
1696   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1697 if test "$cross_compiling" = yes; then
1698   :
1699 else
1700   cat > conftest.$ac_ext <<EOF
1701 #line 1702 "configure"
1702 #include "confdefs.h"
1703 #include <ctype.h>
1704 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1705 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1706 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1707 int main () { int i; for (i = 0; i < 256; i++)
1708 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1709 exit (0); }
1710
1711 EOF
1712 if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1713 then
1714   :
1715 else
1716   echo "configure: failed program was:" >&5
1717   cat conftest.$ac_ext >&5
1718   rm -fr conftest*
1719   ac_cv_header_stdc=no
1720 fi
1721 rm -fr conftest*
1722 fi
1723
1724 fi
1725 fi
1726
1727 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1728 if test $ac_cv_header_stdc = yes; then
1729   cat >> confdefs.h <<\EOF
1730 #define STDC_HEADERS 1
1731 EOF
1732
1733 fi
1734
1735 echo $ac_n "checking for working const""... $ac_c" 1>&6
1736 echo "configure:1737: checking for working const" >&5
1737 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1738   echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740   cat > conftest.$ac_ext <<EOF
1741 #line 1742 "configure"
1742 #include "confdefs.h"
1743
1744 int main() {
1745
1746 /* Ultrix mips cc rejects this.  */
1747 typedef int charset[2]; const charset x = {0,0};
1748 /* SunOS 4.1.1 cc rejects this.  */
1749 char const *const *ccp;
1750 char **p;
1751 /* NEC SVR4.0.2 mips cc rejects this.  */
1752 struct point {int x, y;};
1753 static struct point const zero = {0,0};
1754 /* AIX XL C 1.02.0.0 rejects this.
1755    It does not let you subtract one const X* pointer from another in an arm
1756    of an if-expression whose if-part is not a constant expression */
1757 const char *g = "string";
1758 ccp = &g + (g ? g-g : 0);
1759 /* HPUX 7.0 cc rejects these. */
1760 ++ccp;
1761 p = (char**) ccp;
1762 ccp = (char const *const *) p;
1763 { /* SCO 3.2v4 cc rejects this.  */
1764   char *t;
1765   char const *s = 0 ? (char *) 0 : (char const *) 0;
1766
1767   *t++ = 0;
1768 }
1769 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1770   int x[] = {25, 17};
1771   const int *foo = &x[0];
1772   ++foo;
1773 }
1774 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1775   typedef const int *iptr;
1776   iptr p = 0;
1777   ++p;
1778 }
1779 { /* AIX XL C 1.02.0.0 rejects this saying
1780      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1781   struct s { int j; const int *ap[3]; };
1782   struct s *b; b->j = 5;
1783 }
1784 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1785   const int foo = 10;
1786 }
1787
1788 ; return 0; }
1789 EOF
1790 if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1791   rm -rf conftest*
1792   ac_cv_c_const=yes
1793 else
1794   echo "configure: failed program was:" >&5
1795   cat conftest.$ac_ext >&5
1796   rm -rf conftest*
1797   ac_cv_c_const=no
1798 fi
1799 rm -f conftest*
1800 fi
1801
1802 echo "$ac_t""$ac_cv_c_const" 1>&6
1803 if test $ac_cv_c_const = no; then
1804   cat >> confdefs.h <<\EOF
1805 #define const 
1806 EOF
1807
1808 fi
1809
1810 echo $ac_n "checking for inline""... $ac_c" 1>&6
1811 echo "configure:1812: checking for inline" >&5
1812 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1813   echo $ac_n "(cached) $ac_c" 1>&6
1814 else
1815   ac_cv_c_inline=no
1816 for ac_kw in inline __inline__ __inline; do
1817   cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820
1821 int main() {
1822 } $ac_kw foo() {
1823 ; return 0; }
1824 EOF
1825 if { (eval echo configure:1826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1826   rm -rf conftest*
1827   ac_cv_c_inline=$ac_kw; break
1828 else
1829   echo "configure: failed program was:" >&5
1830   cat conftest.$ac_ext >&5
1831 fi
1832 rm -f conftest*
1833 done
1834
1835 fi
1836
1837 echo "$ac_t""$ac_cv_c_inline" 1>&6
1838 case "$ac_cv_c_inline" in
1839   inline | yes) ;;
1840   no) cat >> confdefs.h <<\EOF
1841 #define inline 
1842 EOF
1843  ;;
1844   *)  cat >> confdefs.h <<EOF
1845 #define inline $ac_cv_c_inline
1846 EOF
1847  ;;
1848 esac
1849
1850 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1851 echo "configure:1852: checking for off_t" >&5
1852 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1853   echo $ac_n "(cached) $ac_c" 1>&6
1854 else
1855   cat > conftest.$ac_ext <<EOF
1856 #line 1857 "configure"
1857 #include "confdefs.h"
1858 #include <sys/types.h>
1859 #if STDC_HEADERS
1860 #include <stdlib.h>
1861 #include <stddef.h>
1862 #endif
1863 EOF
1864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1865   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1866   rm -rf conftest*
1867   ac_cv_type_off_t=yes
1868 else
1869   rm -rf conftest*
1870   ac_cv_type_off_t=no
1871 fi
1872 rm -f conftest*
1873
1874 fi
1875 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1876 if test $ac_cv_type_off_t = no; then
1877   cat >> confdefs.h <<\EOF
1878 #define off_t long
1879 EOF
1880
1881 fi
1882
1883 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1884 echo "configure:1885: checking for size_t" >&5
1885 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1886   echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888   cat > conftest.$ac_ext <<EOF
1889 #line 1890 "configure"
1890 #include "confdefs.h"
1891 #include <sys/types.h>
1892 #if STDC_HEADERS
1893 #include <stdlib.h>
1894 #include <stddef.h>
1895 #endif
1896 EOF
1897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1898   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1899   rm -rf conftest*
1900   ac_cv_type_size_t=yes
1901 else
1902   rm -rf conftest*
1903   ac_cv_type_size_t=no
1904 fi
1905 rm -f conftest*
1906
1907 fi
1908 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1909 if test $ac_cv_type_size_t = no; then
1910   cat >> confdefs.h <<\EOF
1911 #define size_t unsigned
1912 EOF
1913
1914 fi
1915
1916 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1917 # for constant arguments.  Useless!
1918 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1919 echo "configure:1920: checking for working alloca.h" >&5
1920 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1921   echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923   cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926 #include <alloca.h>
1927 int main() {
1928 char *p = alloca(2 * sizeof(int));
1929 ; return 0; }
1930 EOF
1931 if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1932   rm -rf conftest*
1933   ac_cv_header_alloca_h=yes
1934 else
1935   echo "configure: failed program was:" >&5
1936   cat conftest.$ac_ext >&5
1937   rm -rf conftest*
1938   ac_cv_header_alloca_h=no
1939 fi
1940 rm -f conftest*
1941 fi
1942
1943 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1944 if test $ac_cv_header_alloca_h = yes; then
1945   cat >> confdefs.h <<\EOF
1946 #define HAVE_ALLOCA_H 1
1947 EOF
1948
1949 fi
1950
1951 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1952 echo "configure:1953: checking for alloca" >&5
1953 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1954   echo $ac_n "(cached) $ac_c" 1>&6
1955 else
1956   cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959
1960 #ifdef __GNUC__
1961 # define alloca __builtin_alloca
1962 #else
1963 # ifdef _MSC_VER
1964 #  include <malloc.h>
1965 #  define alloca _alloca
1966 # else
1967 #  if HAVE_ALLOCA_H
1968 #   include <alloca.h>
1969 #  else
1970 #   ifdef _AIX
1971  #pragma alloca
1972 #   else
1973 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1974 char *alloca ();
1975 #    endif
1976 #   endif
1977 #  endif
1978 # endif
1979 #endif
1980
1981 int main() {
1982 char *p = (char *) alloca(1);
1983 ; return 0; }
1984 EOF
1985 if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1986   rm -rf conftest*
1987   ac_cv_func_alloca_works=yes
1988 else
1989   echo "configure: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991   rm -rf conftest*
1992   ac_cv_func_alloca_works=no
1993 fi
1994 rm -f conftest*
1995 fi
1996
1997 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1998 if test $ac_cv_func_alloca_works = yes; then
1999   cat >> confdefs.h <<\EOF
2000 #define HAVE_ALLOCA 1
2001 EOF
2002
2003 fi
2004
2005 if test $ac_cv_func_alloca_works = no; then
2006   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2007   # that cause trouble.  Some versions do not even contain alloca or
2008   # contain a buggy version.  If you still want to use their alloca,
2009   # use ar to extract alloca.o from them instead of compiling alloca.c.
2010   ALLOCA=alloca.${ac_objext}
2011   cat >> confdefs.h <<\EOF
2012 #define C_ALLOCA 1
2013 EOF
2014
2015
2016 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2017 echo "configure:2018: checking whether alloca needs Cray hooks" >&5
2018 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2019   echo $ac_n "(cached) $ac_c" 1>&6
2020 else
2021   cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2024 #if defined(CRAY) && ! defined(CRAY2)
2025 webecray
2026 #else
2027 wenotbecray
2028 #endif
2029
2030 EOF
2031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2032   egrep "webecray" >/dev/null 2>&1; then
2033   rm -rf conftest*
2034   ac_cv_os_cray=yes
2035 else
2036   rm -rf conftest*
2037   ac_cv_os_cray=no
2038 fi
2039 rm -f conftest*
2040
2041 fi
2042
2043 echo "$ac_t""$ac_cv_os_cray" 1>&6
2044 if test $ac_cv_os_cray = yes; then
2045 for ac_func in _getb67 GETB67 getb67; do
2046   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_func" >&5
2048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2049   echo $ac_n "(cached) $ac_c" 1>&6
2050 else
2051   cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 /* System header to define __stub macros and hopefully few prototypes,
2055     which can conflict with char $ac_func(); below.  */
2056 #include <assert.h>
2057 /* Override any gcc2 internal prototype to avoid an error.  */
2058 /* We use char because int might match the return type of a gcc2
2059     builtin and then its argument prototype would still apply.  */
2060 char $ac_func();
2061
2062 int main() {
2063
2064 /* The GNU C library defines this for functions which it implements
2065     to always fail with ENOSYS.  Some functions are actually named
2066     something starting with __ and the normal name is an alias.  */
2067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2068 choke me
2069 #else
2070 $ac_func();
2071 #endif
2072
2073 ; return 0; }
2074 EOF
2075 if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2076   rm -rf conftest*
2077   eval "ac_cv_func_$ac_func=yes"
2078 else
2079   echo "configure: failed program was:" >&5
2080   cat conftest.$ac_ext >&5
2081   rm -rf conftest*
2082   eval "ac_cv_func_$ac_func=no"
2083 fi
2084 rm -f conftest*
2085 fi
2086
2087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2088   echo "$ac_t""yes" 1>&6
2089   cat >> confdefs.h <<EOF
2090 #define CRAY_STACKSEG_END $ac_func
2091 EOF
2092
2093   break
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097
2098 done
2099 fi
2100
2101 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2102 echo "configure:2103: checking stack direction for C alloca" >&5
2103 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   if test "$cross_compiling" = yes; then
2107   ac_cv_c_stack_direction=0
2108 else
2109   cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 find_stack_direction ()
2113 {
2114   static char *addr = 0;
2115   auto char dummy;
2116   if (addr == 0)
2117     {
2118       addr = &dummy;
2119       return find_stack_direction ();
2120     }
2121   else
2122     return (&dummy > addr) ? 1 : -1;
2123 }
2124 main ()
2125 {
2126   exit (find_stack_direction() < 0);
2127 }
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2130 then
2131   ac_cv_c_stack_direction=1
2132 else
2133   echo "configure: failed program was:" >&5
2134   cat conftest.$ac_ext >&5
2135   rm -fr conftest*
2136   ac_cv_c_stack_direction=-1
2137 fi
2138 rm -fr conftest*
2139 fi
2140
2141 fi
2142
2143 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2144 cat >> confdefs.h <<EOF
2145 #define STACK_DIRECTION $ac_cv_c_stack_direction
2146 EOF
2147
2148 fi
2149
2150 for ac_hdr in unistd.h
2151 do
2152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2154 echo "configure:2155: checking for $ac_hdr" >&5
2155 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2156   echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158   cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2161 #include <$ac_hdr>
2162 EOF
2163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2164 { (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2166 if test -z "$ac_err"; then
2167   rm -rf conftest*
2168   eval "ac_cv_header_$ac_safe=yes"
2169 else
2170   echo "$ac_err" >&5
2171   echo "configure: failed program was:" >&5
2172   cat conftest.$ac_ext >&5
2173   rm -rf conftest*
2174   eval "ac_cv_header_$ac_safe=no"
2175 fi
2176 rm -f conftest*
2177 fi
2178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2179   echo "$ac_t""yes" 1>&6
2180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2181   cat >> confdefs.h <<EOF
2182 #define $ac_tr_hdr 1
2183 EOF
2184  
2185 else
2186   echo "$ac_t""no" 1>&6
2187 fi
2188 done
2189
2190 for ac_func in getpagesize
2191 do
2192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2193 echo "configure:2194: checking for $ac_func" >&5
2194 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2195   echo $ac_n "(cached) $ac_c" 1>&6
2196 else
2197   cat > conftest.$ac_ext <<EOF
2198 #line 2199 "configure"
2199 #include "confdefs.h"
2200 /* System header to define __stub macros and hopefully few prototypes,
2201     which can conflict with char $ac_func(); below.  */
2202 #include <assert.h>
2203 /* Override any gcc2 internal prototype to avoid an error.  */
2204 /* We use char because int might match the return type of a gcc2
2205     builtin and then its argument prototype would still apply.  */
2206 char $ac_func();
2207
2208 int main() {
2209
2210 /* The GNU C library defines this for functions which it implements
2211     to always fail with ENOSYS.  Some functions are actually named
2212     something starting with __ and the normal name is an alias.  */
2213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2214 choke me
2215 #else
2216 $ac_func();
2217 #endif
2218
2219 ; return 0; }
2220 EOF
2221 if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2222   rm -rf conftest*
2223   eval "ac_cv_func_$ac_func=yes"
2224 else
2225   echo "configure: failed program was:" >&5
2226   cat conftest.$ac_ext >&5
2227   rm -rf conftest*
2228   eval "ac_cv_func_$ac_func=no"
2229 fi
2230 rm -f conftest*
2231 fi
2232
2233 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2234   echo "$ac_t""yes" 1>&6
2235     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2236   cat >> confdefs.h <<EOF
2237 #define $ac_tr_func 1
2238 EOF
2239  
2240 else
2241   echo "$ac_t""no" 1>&6
2242 fi
2243 done
2244
2245 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2246 echo "configure:2247: checking for working mmap" >&5
2247 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2248   echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250   if test "$cross_compiling" = yes; then
2251   ac_cv_func_mmap_fixed_mapped=no
2252 else
2253   cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256
2257 /* Thanks to Mike Haertel and Jim Avera for this test.
2258    Here is a matrix of mmap possibilities:
2259         mmap private not fixed
2260         mmap private fixed at somewhere currently unmapped
2261         mmap private fixed at somewhere already mapped
2262         mmap shared not fixed
2263         mmap shared fixed at somewhere currently unmapped
2264         mmap shared fixed at somewhere already mapped
2265    For private mappings, we should verify that changes cannot be read()
2266    back from the file, nor mmap's back from the file at a different
2267    address.  (There have been systems where private was not correctly
2268    implemented like the infamous i386 svr4.0, and systems where the
2269    VM page cache was not coherent with the filesystem buffer cache
2270    like early versions of FreeBSD and possibly contemporary NetBSD.)
2271    For shared mappings, we should conversely verify that changes get
2272    propogated back to all the places they're supposed to be.
2273
2274    Grep wants private fixed already mapped.
2275    The main things grep needs to know about mmap are:
2276    * does it exist and is it safe to write into the mmap'd area
2277    * how to use it (BSD variants)  */
2278 #include <sys/types.h>
2279 #include <fcntl.h>
2280 #include <sys/mman.h>
2281
2282 /* This mess was copied from the GNU getpagesize.h.  */
2283 #ifndef HAVE_GETPAGESIZE
2284 # ifdef HAVE_UNISTD_H
2285 #  include <unistd.h>
2286 # endif
2287
2288 /* Assume that all systems that can run configure have sys/param.h.  */
2289 # ifndef HAVE_SYS_PARAM_H
2290 #  define HAVE_SYS_PARAM_H 1
2291 # endif
2292
2293 # ifdef _SC_PAGESIZE
2294 #  define getpagesize() sysconf(_SC_PAGESIZE)
2295 # else /* no _SC_PAGESIZE */
2296 #  ifdef HAVE_SYS_PARAM_H
2297 #   include <sys/param.h>
2298 #   ifdef EXEC_PAGESIZE
2299 #    define getpagesize() EXEC_PAGESIZE
2300 #   else /* no EXEC_PAGESIZE */
2301 #    ifdef NBPG
2302 #     define getpagesize() NBPG * CLSIZE
2303 #     ifndef CLSIZE
2304 #      define CLSIZE 1
2305 #     endif /* no CLSIZE */
2306 #    else /* no NBPG */
2307 #     ifdef NBPC
2308 #      define getpagesize() NBPC
2309 #     else /* no NBPC */
2310 #      ifdef PAGESIZE
2311 #       define getpagesize() PAGESIZE
2312 #      endif /* PAGESIZE */
2313 #     endif /* no NBPC */
2314 #    endif /* no NBPG */
2315 #   endif /* no EXEC_PAGESIZE */
2316 #  else /* no HAVE_SYS_PARAM_H */
2317 #   define getpagesize() 8192   /* punt totally */
2318 #  endif /* no HAVE_SYS_PARAM_H */
2319 # endif /* no _SC_PAGESIZE */
2320
2321 #endif /* no HAVE_GETPAGESIZE */
2322
2323 #ifdef __cplusplus
2324 extern "C" { void *malloc(unsigned); }
2325 #else
2326 char *malloc();
2327 #endif
2328
2329 int
2330 main()
2331 {
2332         char *data, *data2, *data3;
2333         int i, pagesize;
2334         int fd;
2335
2336         pagesize = getpagesize();
2337
2338         /*
2339          * First, make a file with some known garbage in it.
2340          */
2341         data = malloc(pagesize);
2342         if (!data)
2343                 exit(1);
2344         for (i = 0; i < pagesize; ++i)
2345                 *(data + i) = rand();
2346         umask(0);
2347         fd = creat("conftestmmap", 0600);
2348         if (fd < 0)
2349                 exit(1);
2350         if (write(fd, data, pagesize) != pagesize)
2351                 exit(1);
2352         close(fd);
2353
2354         /*
2355          * Next, try to mmap the file at a fixed address which
2356          * already has something else allocated at it.  If we can,
2357          * also make sure that we see the same garbage.
2358          */
2359         fd = open("conftestmmap", O_RDWR);
2360         if (fd < 0)
2361                 exit(1);
2362         data2 = malloc(2 * pagesize);
2363         if (!data2)
2364                 exit(1);
2365         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2366         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2367             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2368                 exit(1);
2369         for (i = 0; i < pagesize; ++i)
2370                 if (*(data + i) != *(data2 + i))
2371                         exit(1);
2372
2373         /*
2374          * Finally, make sure that changes to the mapped area
2375          * do not percolate back to the file as seen by read().
2376          * (This is a bug on some variants of i386 svr4.0.)
2377          */
2378         for (i = 0; i < pagesize; ++i)
2379                 *(data2 + i) = *(data2 + i) + 1;
2380         data3 = malloc(pagesize);
2381         if (!data3)
2382                 exit(1);
2383         if (read(fd, data3, pagesize) != pagesize)
2384                 exit(1);
2385         for (i = 0; i < pagesize; ++i)
2386                 if (*(data + i) != *(data3 + i))
2387                         exit(1);
2388         close(fd);
2389         unlink("conftestmmap");
2390         exit(0);
2391 }
2392
2393 EOF
2394 if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2395 then
2396   ac_cv_func_mmap_fixed_mapped=yes
2397 else
2398   echo "configure: failed program was:" >&5
2399   cat conftest.$ac_ext >&5
2400   rm -fr conftest*
2401   ac_cv_func_mmap_fixed_mapped=no
2402 fi
2403 rm -fr conftest*
2404 fi
2405
2406 fi
2407
2408 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2409 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2410   cat >> confdefs.h <<\EOF
2411 #define HAVE_MMAP 1
2412 EOF
2413
2414 fi
2415
2416                            
2417    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2418 unistd.h values.h
2419 do
2420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2422 echo "configure:2423: checking for $ac_hdr" >&5
2423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   cat > conftest.$ac_ext <<EOF
2427 #line 2428 "configure"
2428 #include "confdefs.h"
2429 #include <$ac_hdr>
2430 EOF
2431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432 { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2434 if test -z "$ac_err"; then
2435   rm -rf conftest*
2436   eval "ac_cv_header_$ac_safe=yes"
2437 else
2438   echo "$ac_err" >&5
2439   echo "configure: failed program was:" >&5
2440   cat conftest.$ac_ext >&5
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=no"
2443 fi
2444 rm -f conftest*
2445 fi
2446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2447   echo "$ac_t""yes" 1>&6
2448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2449   cat >> confdefs.h <<EOF
2450 #define $ac_tr_hdr 1
2451 EOF
2452  
2453 else
2454   echo "$ac_t""no" 1>&6
2455 fi
2456 done
2457
2458    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2459 __argz_count __argz_stringify __argz_next
2460 do
2461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2462 echo "configure:2463: checking for $ac_func" >&5
2463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 /* System header to define __stub macros and hopefully few prototypes,
2470     which can conflict with char $ac_func(); below.  */
2471 #include <assert.h>
2472 /* Override any gcc2 internal prototype to avoid an error.  */
2473 /* We use char because int might match the return type of a gcc2
2474     builtin and then its argument prototype would still apply.  */
2475 char $ac_func();
2476
2477 int main() {
2478
2479 /* The GNU C library defines this for functions which it implements
2480     to always fail with ENOSYS.  Some functions are actually named
2481     something starting with __ and the normal name is an alias.  */
2482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2483 choke me
2484 #else
2485 $ac_func();
2486 #endif
2487
2488 ; return 0; }
2489 EOF
2490 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2491   rm -rf conftest*
2492   eval "ac_cv_func_$ac_func=yes"
2493 else
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -rf conftest*
2497   eval "ac_cv_func_$ac_func=no"
2498 fi
2499 rm -f conftest*
2500 fi
2501
2502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2503   echo "$ac_t""yes" 1>&6
2504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2505   cat >> confdefs.h <<EOF
2506 #define $ac_tr_func 1
2507 EOF
2508  
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512 done
2513
2514
2515    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2516      for ac_func in stpcpy
2517 do
2518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_func" >&5
2520 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 /* System header to define __stub macros and hopefully few prototypes,
2527     which can conflict with char $ac_func(); below.  */
2528 #include <assert.h>
2529 /* Override any gcc2 internal prototype to avoid an error.  */
2530 /* We use char because int might match the return type of a gcc2
2531     builtin and then its argument prototype would still apply.  */
2532 char $ac_func();
2533
2534 int main() {
2535
2536 /* The GNU C library defines this for functions which it implements
2537     to always fail with ENOSYS.  Some functions are actually named
2538     something starting with __ and the normal name is an alias.  */
2539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2540 choke me
2541 #else
2542 $ac_func();
2543 #endif
2544
2545 ; return 0; }
2546 EOF
2547 if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2548   rm -rf conftest*
2549   eval "ac_cv_func_$ac_func=yes"
2550 else
2551   echo "configure: failed program was:" >&5
2552   cat conftest.$ac_ext >&5
2553   rm -rf conftest*
2554   eval "ac_cv_func_$ac_func=no"
2555 fi
2556 rm -f conftest*
2557 fi
2558
2559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2560   echo "$ac_t""yes" 1>&6
2561     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2562   cat >> confdefs.h <<EOF
2563 #define $ac_tr_func 1
2564 EOF
2565  
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569 done
2570
2571    fi
2572    if test "${ac_cv_func_stpcpy}" = "yes"; then
2573      cat >> confdefs.h <<\EOF
2574 #define HAVE_STPCPY 1
2575 EOF
2576
2577    fi
2578
2579    if test $ac_cv_header_locale_h = yes; then
2580     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2581 echo "configure:2582: checking for LC_MESSAGES" >&5
2582 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #include <locale.h>
2589 int main() {
2590 return LC_MESSAGES
2591 ; return 0; }
2592 EOF
2593 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2594   rm -rf conftest*
2595   am_cv_val_LC_MESSAGES=yes
2596 else
2597   echo "configure: failed program was:" >&5
2598   cat conftest.$ac_ext >&5
2599   rm -rf conftest*
2600   am_cv_val_LC_MESSAGES=no
2601 fi
2602 rm -f conftest*
2603 fi
2604
2605 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2606     if test $am_cv_val_LC_MESSAGES = yes; then
2607       cat >> confdefs.h <<\EOF
2608 #define HAVE_LC_MESSAGES 1
2609 EOF
2610
2611     fi
2612   fi
2613    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2614 echo "configure:2615: checking whether NLS is requested" >&5
2615         # Check whether --enable-nls or --disable-nls was given.
2616 if test "${enable_nls+set}" = set; then
2617   enableval="$enable_nls"
2618   USE_NLS=$enableval
2619 else
2620   USE_NLS=yes
2621 fi
2622
2623     echo "$ac_t""$USE_NLS" 1>&6
2624     
2625
2626     USE_INCLUDED_LIBINTL=no
2627
2628         if test "$USE_NLS" = "yes"; then
2629       cat >> confdefs.h <<\EOF
2630 #define ENABLE_NLS 1
2631 EOF
2632
2633       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2634 echo "configure:2635: checking whether included gettext is requested" >&5
2635       # Check whether --with-included-gettext or --without-included-gettext was given.
2636 if test "${with_included_gettext+set}" = set; then
2637   withval="$with_included_gettext"
2638   nls_cv_force_use_gnu_gettext=$withval
2639 else
2640   nls_cv_force_use_gnu_gettext=no
2641 fi
2642
2643       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2644
2645       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2646       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2647                                         nls_cv_header_intl=
2648         nls_cv_header_libgt=
2649         CATOBJEXT=NONE
2650
2651         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2652 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2653 echo "configure:2654: checking for libintl.h" >&5
2654 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2655   echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657   cat > conftest.$ac_ext <<EOF
2658 #line 2659 "configure"
2659 #include "confdefs.h"
2660 #include <libintl.h>
2661 EOF
2662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2663 { (eval echo configure:2664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2665 if test -z "$ac_err"; then
2666   rm -rf conftest*
2667   eval "ac_cv_header_$ac_safe=yes"
2668 else
2669   echo "$ac_err" >&5
2670   echo "configure: failed program was:" >&5
2671   cat conftest.$ac_ext >&5
2672   rm -rf conftest*
2673   eval "ac_cv_header_$ac_safe=no"
2674 fi
2675 rm -f conftest*
2676 fi
2677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2678   echo "$ac_t""yes" 1>&6
2679   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2680 echo "configure:2681: checking for gettext in libc" >&5
2681 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 #include <libintl.h>
2688 int main() {
2689 return (int) gettext ("")
2690 ; return 0; }
2691 EOF
2692 if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2693   rm -rf conftest*
2694   gt_cv_func_gettext_libc=yes
2695 else
2696   echo "configure: failed program was:" >&5
2697   cat conftest.$ac_ext >&5
2698   rm -rf conftest*
2699   gt_cv_func_gettext_libc=no
2700 fi
2701 rm -f conftest*
2702 fi
2703
2704 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2705
2706            if test "$gt_cv_func_gettext_libc" != "yes"; then
2707              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2708 echo "configure:2709: checking for bindtextdomain in -lintl" >&5
2709 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   ac_save_LIBS="$LIBS"
2714 LIBS="-lintl  $LIBS"
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 /* Override any gcc2 internal prototype to avoid an error.  */
2719 /* We use char because int might match the return type of a gcc2
2720     builtin and then its argument prototype would still apply.  */
2721 char bindtextdomain();
2722
2723 int main() {
2724 bindtextdomain()
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2728   rm -rf conftest*
2729   eval "ac_cv_lib_$ac_lib_var=yes"
2730 else
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733   rm -rf conftest*
2734   eval "ac_cv_lib_$ac_lib_var=no"
2735 fi
2736 rm -f conftest*
2737 LIBS="$ac_save_LIBS"
2738
2739 fi
2740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2741   echo "$ac_t""yes" 1>&6
2742   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2743 echo "configure:2744: checking for gettext in libintl" >&5
2744 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2745   echo $ac_n "(cached) $ac_c" 1>&6
2746 else
2747   cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750
2751 int main() {
2752 return (int) gettext ("")
2753 ; return 0; }
2754 EOF
2755 if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756   rm -rf conftest*
2757   gt_cv_func_gettext_libintl=yes
2758 else
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   rm -rf conftest*
2762   gt_cv_func_gettext_libintl=no
2763 fi
2764 rm -f conftest*
2765 fi
2766
2767 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2768 else
2769   echo "$ac_t""no" 1>&6
2770 fi
2771
2772            fi
2773
2774            if test "$gt_cv_func_gettext_libc" = "yes" \
2775               || test "$gt_cv_func_gettext_libintl" = "yes"; then
2776               cat >> confdefs.h <<\EOF
2777 #define HAVE_GETTEXT 1
2778 EOF
2779
2780               # Extract the first word of "msgfmt", so it can be a program name with args.
2781 set dummy msgfmt; ac_word=$2
2782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2783 echo "configure:2784: checking for $ac_word" >&5
2784 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2785   echo $ac_n "(cached) $ac_c" 1>&6
2786 else
2787   case "$MSGFMT" in
2788   /*)
2789   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2790   ;;
2791   *)
2792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2793   for ac_dir in $PATH; do
2794     test -z "$ac_dir" && ac_dir=.
2795     if test -f $ac_dir/$ac_word; then
2796       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2797         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2798         break
2799       fi
2800     fi
2801   done
2802   IFS="$ac_save_ifs"
2803   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2804   ;;
2805 esac
2806 fi
2807 MSGFMT="$ac_cv_path_MSGFMT"
2808 if test -n "$MSGFMT"; then
2809   echo "$ac_t""$MSGFMT" 1>&6
2810 else
2811   echo "$ac_t""no" 1>&6
2812 fi
2813               if test "$MSGFMT" != "no"; then
2814                 for ac_func in dcgettext
2815 do
2816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2817 echo "configure:2818: checking for $ac_func" >&5
2818 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   cat > conftest.$ac_ext <<EOF
2822 #line 2823 "configure"
2823 #include "confdefs.h"
2824 /* System header to define __stub macros and hopefully few prototypes,
2825     which can conflict with char $ac_func(); below.  */
2826 #include <assert.h>
2827 /* Override any gcc2 internal prototype to avoid an error.  */
2828 /* We use char because int might match the return type of a gcc2
2829     builtin and then its argument prototype would still apply.  */
2830 char $ac_func();
2831
2832 int main() {
2833
2834 /* The GNU C library defines this for functions which it implements
2835     to always fail with ENOSYS.  Some functions are actually named
2836     something starting with __ and the normal name is an alias.  */
2837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2838 choke me
2839 #else
2840 $ac_func();
2841 #endif
2842
2843 ; return 0; }
2844 EOF
2845 if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2846   rm -rf conftest*
2847   eval "ac_cv_func_$ac_func=yes"
2848 else
2849   echo "configure: failed program was:" >&5
2850   cat conftest.$ac_ext >&5
2851   rm -rf conftest*
2852   eval "ac_cv_func_$ac_func=no"
2853 fi
2854 rm -f conftest*
2855 fi
2856
2857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2858   echo "$ac_t""yes" 1>&6
2859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2860   cat >> confdefs.h <<EOF
2861 #define $ac_tr_func 1
2862 EOF
2863  
2864 else
2865   echo "$ac_t""no" 1>&6
2866 fi
2867 done
2868
2869                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2870 set dummy gmsgfmt; ac_word=$2
2871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2872 echo "configure:2873: checking for $ac_word" >&5
2873 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   case "$GMSGFMT" in
2877   /*)
2878   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2879   ;;
2880   ?:/*)                  
2881   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2882   ;;
2883   *)
2884   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2885   ac_dummy="$PATH"
2886   for ac_dir in $ac_dummy; do 
2887     test -z "$ac_dir" && ac_dir=.
2888     if test -f $ac_dir/$ac_word; then
2889       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2890       break
2891     fi
2892   done
2893   IFS="$ac_save_ifs"
2894   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2895   ;;
2896 esac
2897 fi
2898 GMSGFMT="$ac_cv_path_GMSGFMT"
2899 if test -n "$GMSGFMT"; then
2900   echo "$ac_t""$GMSGFMT" 1>&6
2901 else
2902   echo "$ac_t""no" 1>&6
2903 fi
2904
2905                 # Extract the first word of "xgettext", so it can be a program name with args.
2906 set dummy xgettext; ac_word=$2
2907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2908 echo "configure:2909: checking for $ac_word" >&5
2909 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2910   echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912   case "$XGETTEXT" in
2913   /*)
2914   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2915   ;;
2916   *)
2917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2918   for ac_dir in $PATH; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/$ac_word; then
2921       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2922         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2923         break
2924       fi
2925     fi
2926   done
2927   IFS="$ac_save_ifs"
2928   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2929   ;;
2930 esac
2931 fi
2932 XGETTEXT="$ac_cv_path_XGETTEXT"
2933 if test -n "$XGETTEXT"; then
2934   echo "$ac_t""$XGETTEXT" 1>&6
2935 else
2936   echo "$ac_t""no" 1>&6
2937 fi
2938
2939                 cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942
2943 int main() {
2944 extern int _nl_msg_cat_cntr;
2945                                return _nl_msg_cat_cntr
2946 ; return 0; }
2947 EOF
2948 if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2949   rm -rf conftest*
2950   CATOBJEXT=.gmo
2951                    DATADIRNAME=share
2952 else
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   CATOBJEXT=.mo
2957                    DATADIRNAME=lib
2958 fi
2959 rm -f conftest*
2960                 INSTOBJEXT=.mo
2961               fi
2962             fi
2963         
2964 else
2965   echo "$ac_t""no" 1>&6
2966 fi
2967
2968
2969         if test "$CATOBJEXT" = "NONE"; then
2970           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
2971 echo "configure:2972: checking whether catgets can be used" >&5
2972           # Check whether --with-catgets or --without-catgets was given.
2973 if test "${with_catgets+set}" = set; then
2974   withval="$with_catgets"
2975   nls_cv_use_catgets=$withval
2976 else
2977   nls_cv_use_catgets=no
2978 fi
2979
2980           echo "$ac_t""$nls_cv_use_catgets" 1>&6
2981
2982           if test "$nls_cv_use_catgets" = "yes"; then
2983                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
2984 echo "configure:2985: checking for main in -li" >&5
2985 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
2986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   ac_save_LIBS="$LIBS"
2990 LIBS="-li  $LIBS"
2991 cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994
2995 int main() {
2996 main()
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3000   rm -rf conftest*
3001   eval "ac_cv_lib_$ac_lib_var=yes"
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -rf conftest*
3006   eval "ac_cv_lib_$ac_lib_var=no"
3007 fi
3008 rm -f conftest*
3009 LIBS="$ac_save_LIBS"
3010
3011 fi
3012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3013   echo "$ac_t""yes" 1>&6
3014     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3015     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3016   cat >> confdefs.h <<EOF
3017 #define $ac_tr_lib 1
3018 EOF
3019
3020   LIBS="-li $LIBS"
3021
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025
3026             echo $ac_n "checking for catgets""... $ac_c" 1>&6
3027 echo "configure:3028: checking for catgets" >&5
3028 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 /* System header to define __stub macros and hopefully few prototypes,
3035     which can conflict with char catgets(); below.  */
3036 #include <assert.h>
3037 /* Override any gcc2 internal prototype to avoid an error.  */
3038 /* We use char because int might match the return type of a gcc2
3039     builtin and then its argument prototype would still apply.  */
3040 char catgets();
3041
3042 int main() {
3043
3044 /* The GNU C library defines this for functions which it implements
3045     to always fail with ENOSYS.  Some functions are actually named
3046     something starting with __ and the normal name is an alias.  */
3047 #if defined (__stub_catgets) || defined (__stub___catgets)
3048 choke me
3049 #else
3050 catgets();
3051 #endif
3052
3053 ; return 0; }
3054 EOF
3055 if { (eval echo configure:3056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3056   rm -rf conftest*
3057   eval "ac_cv_func_catgets=yes"
3058 else
3059   echo "configure: failed program was:" >&5
3060   cat conftest.$ac_ext >&5
3061   rm -rf conftest*
3062   eval "ac_cv_func_catgets=no"
3063 fi
3064 rm -f conftest*
3065 fi
3066
3067 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
3068   echo "$ac_t""yes" 1>&6
3069   cat >> confdefs.h <<\EOF
3070 #define HAVE_CATGETS 1
3071 EOF
3072
3073                INTLOBJS="\$(CATOBJS)"
3074                # Extract the first word of "gencat", so it can be a program name with args.
3075 set dummy gencat; ac_word=$2
3076 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3077 echo "configure:3078: checking for $ac_word" >&5
3078 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   case "$GENCAT" in
3082   /*)
3083   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
3084   ;;
3085   ?:/*)                  
3086   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3087   ;;
3088   *)
3089   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3090   ac_dummy="$PATH"
3091   for ac_dir in $ac_dummy; do 
3092     test -z "$ac_dir" && ac_dir=.
3093     if test -f $ac_dir/$ac_word; then
3094       ac_cv_path_GENCAT="$ac_dir/$ac_word"
3095       break
3096     fi
3097   done
3098   IFS="$ac_save_ifs"
3099   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3100   ;;
3101 esac
3102 fi
3103 GENCAT="$ac_cv_path_GENCAT"
3104 if test -n "$GENCAT"; then
3105   echo "$ac_t""$GENCAT" 1>&6
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109                if test "$GENCAT" != "no"; then
3110                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
3111 set dummy gmsgfmt; ac_word=$2
3112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3113 echo "configure:3114: checking for $ac_word" >&5
3114 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   case "$GMSGFMT" in
3118   /*)
3119   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3120   ;;
3121   ?:/*)                  
3122   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3123   ;;
3124   *)
3125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3126   ac_dummy="$PATH"
3127   for ac_dir in $ac_dummy; do 
3128     test -z "$ac_dir" && ac_dir=.
3129     if test -f $ac_dir/$ac_word; then
3130       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3131       break
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3136   ;;
3137 esac
3138 fi
3139 GMSGFMT="$ac_cv_path_GMSGFMT"
3140 if test -n "$GMSGFMT"; then
3141   echo "$ac_t""$GMSGFMT" 1>&6
3142 else
3143   echo "$ac_t""no" 1>&6
3144 fi
3145
3146                  if test "$GMSGFMT" = "no"; then
3147                    # Extract the first word of "msgfmt", so it can be a program name with args.
3148 set dummy msgfmt; ac_word=$2
3149 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3150 echo "configure:3151: checking for $ac_word" >&5
3151 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3152   echo $ac_n "(cached) $ac_c" 1>&6
3153 else
3154   case "$GMSGFMT" in
3155   /*)
3156   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3157   ;;
3158   *)
3159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3160   for ac_dir in $PATH; do
3161     test -z "$ac_dir" && ac_dir=.
3162     if test -f $ac_dir/$ac_word; then
3163       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3164         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3165         break
3166       fi
3167     fi
3168   done
3169   IFS="$ac_save_ifs"
3170   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3171   ;;
3172 esac
3173 fi
3174 GMSGFMT="$ac_cv_path_GMSGFMT"
3175 if test -n "$GMSGFMT"; then
3176   echo "$ac_t""$GMSGFMT" 1>&6
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180
3181                  fi
3182                  # Extract the first word of "xgettext", so it can be a program name with args.
3183 set dummy xgettext; ac_word=$2
3184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3185 echo "configure:3186: checking for $ac_word" >&5
3186 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   case "$XGETTEXT" in
3190   /*)
3191   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3192   ;;
3193   *)
3194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3195   for ac_dir in $PATH; do
3196     test -z "$ac_dir" && ac_dir=.
3197     if test -f $ac_dir/$ac_word; then
3198       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3199         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3200         break
3201       fi
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3206   ;;
3207 esac
3208 fi
3209 XGETTEXT="$ac_cv_path_XGETTEXT"
3210 if test -n "$XGETTEXT"; then
3211   echo "$ac_t""$XGETTEXT" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216                  USE_INCLUDED_LIBINTL=yes
3217                  CATOBJEXT=.cat
3218                  INSTOBJEXT=.cat
3219                  DATADIRNAME=lib
3220                  INTLDEPS="../intl/libintl.a"
3221                  INTLLIBS=$INTLDEPS
3222                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3223                  nls_cv_header_intl=intl/libintl.h
3224                  nls_cv_header_libgt=intl/libgettext.h
3225                fi
3226 else
3227   echo "$ac_t""no" 1>&6
3228 fi
3229
3230           fi
3231         fi
3232
3233         if test "$CATOBJEXT" = "NONE"; then
3234                           nls_cv_use_gnu_gettext=yes
3235         fi
3236       fi
3237
3238       if test "$nls_cv_use_gnu_gettext" = "yes"; then
3239                 INTLOBJS="\$(GETTOBJS)"
3240         # Extract the first word of "msgfmt", so it can be a program name with args.
3241 set dummy msgfmt; ac_word=$2
3242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3243 echo "configure:3244: checking for $ac_word" >&5
3244 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   case "$MSGFMT" in
3248   /*)
3249   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3250   ;;
3251   *)
3252   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3253   for ac_dir in $PATH; do
3254     test -z "$ac_dir" && ac_dir=.
3255     if test -f $ac_dir/$ac_word; then
3256       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3257         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3258         break
3259       fi
3260     fi
3261   done
3262   IFS="$ac_save_ifs"
3263   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3264   ;;
3265 esac
3266 fi
3267 MSGFMT="$ac_cv_path_MSGFMT"
3268 if test -n "$MSGFMT"; then
3269   echo "$ac_t""$MSGFMT" 1>&6
3270 else
3271   echo "$ac_t""no" 1>&6
3272 fi
3273
3274         # Extract the first word of "gmsgfmt", so it can be a program name with args.
3275 set dummy gmsgfmt; ac_word=$2
3276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_word" >&5
3278 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   case "$GMSGFMT" in
3282   /*)
3283   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3284   ;;
3285   ?:/*)                  
3286   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3287   ;;
3288   *)
3289   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3290   ac_dummy="$PATH"
3291   for ac_dir in $ac_dummy; do 
3292     test -z "$ac_dir" && ac_dir=.
3293     if test -f $ac_dir/$ac_word; then
3294       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3295       break
3296     fi
3297   done
3298   IFS="$ac_save_ifs"
3299   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3300   ;;
3301 esac
3302 fi
3303 GMSGFMT="$ac_cv_path_GMSGFMT"
3304 if test -n "$GMSGFMT"; then
3305   echo "$ac_t""$GMSGFMT" 1>&6
3306 else
3307   echo "$ac_t""no" 1>&6
3308 fi
3309
3310         # Extract the first word of "xgettext", so it can be a program name with args.
3311 set dummy xgettext; ac_word=$2
3312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_word" >&5
3314 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3315   echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317   case "$XGETTEXT" in
3318   /*)
3319   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3320   ;;
3321   *)
3322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3323   for ac_dir in $PATH; do
3324     test -z "$ac_dir" && ac_dir=.
3325     if test -f $ac_dir/$ac_word; then
3326       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3327         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3328         break
3329       fi
3330     fi
3331   done
3332   IFS="$ac_save_ifs"
3333   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3334   ;;
3335 esac
3336 fi
3337 XGETTEXT="$ac_cv_path_XGETTEXT"
3338 if test -n "$XGETTEXT"; then
3339   echo "$ac_t""$XGETTEXT" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344         
3345         USE_INCLUDED_LIBINTL=yes
3346         CATOBJEXT=.gmo
3347         INSTOBJEXT=.mo
3348         DATADIRNAME=share
3349         INTLDEPS="../intl/libintl.a"
3350         INTLLIBS=$INTLDEPS
3351         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3352         nls_cv_header_intl=intl/libintl.h
3353         nls_cv_header_libgt=intl/libgettext.h
3354       fi
3355
3356             if test "$XGETTEXT" != ":"; then
3357                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3358           : ;
3359         else
3360           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3361           XGETTEXT=":"
3362         fi
3363       fi
3364
3365       # We need to process the po/ directory.
3366       POSUB=po
3367     else
3368       DATADIRNAME=share
3369       nls_cv_header_intl=intl/libintl.h
3370       nls_cv_header_libgt=intl/libgettext.h
3371     fi
3372
3373     # If this is used in GNU gettext we have to set USE_NLS to `yes'
3374     # because some of the sources are only built for this goal.
3375     if test "$PACKAGE" = gettext; then
3376       USE_NLS=yes
3377       USE_INCLUDED_LIBINTL=yes
3378     fi
3379
3380                 for lang in $ALL_LINGUAS; do
3381       GMOFILES="$GMOFILES $lang.gmo"
3382       POFILES="$POFILES $lang.po"
3383     done
3384
3385         
3386     
3387     
3388     
3389     
3390     
3391     
3392     
3393     
3394     
3395     
3396   
3397
3398    if test "x$CATOBJEXT" != "x"; then
3399      if test "x$ALL_LINGUAS" = "x"; then
3400        LINGUAS=
3401      else
3402        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3403 echo "configure:3404: checking for catalogs to be installed" >&5
3404        NEW_LINGUAS=
3405        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3406          case "$ALL_LINGUAS" in
3407           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3408          esac
3409        done
3410        LINGUAS=$NEW_LINGUAS
3411        echo "$ac_t""$LINGUAS" 1>&6
3412      fi
3413
3414           if test -n "$LINGUAS"; then
3415        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3416      fi
3417    fi
3418
3419             test -d intl || mkdir intl
3420    if test "$CATOBJEXT" = ".cat"; then
3421      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3422 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3423 echo "configure:3424: checking for linux/version.h" >&5
3424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3425   echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <linux/version.h>
3431 EOF
3432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3433 { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3435 if test -z "$ac_err"; then
3436   rm -rf conftest*
3437   eval "ac_cv_header_$ac_safe=yes"
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   eval "ac_cv_header_$ac_safe=no"
3444 fi
3445 rm -f conftest*
3446 fi
3447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449   msgformat=linux
3450 else
3451   echo "$ac_t""no" 1>&6
3452 msgformat=xopen
3453 fi
3454
3455
3456                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
3457    fi
3458       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3459      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
3460
3461             if test "$PACKAGE" = "gettext"; then
3462      GT_NO="#NO#"
3463      GT_YES=
3464    else
3465      GT_NO=
3466      GT_YES="#YES#"
3467    fi
3468    
3469    
3470
3471             MKINSTALLDIRS=
3472    if test $ac_aux_dir; then
3473      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
3474    fi
3475    if test -z $MKINSTALLDIRS; then
3476      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
3477    fi
3478    
3479
3480       if test "${enable_shared+set}" = set; then
3481      l=l
3482    else
3483      l=
3484    fi
3485    
3486
3487          test -d po || mkdir po
3488    if test "x$srcdir" != "x."; then
3489      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3490        posrcprefix="$srcdir/"
3491      else
3492        posrcprefix="../$srcdir/"
3493      fi
3494    else
3495      posrcprefix="../"
3496    fi
3497    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3498         < $srcdir/po/POTFILES.in > po/POTFILES
3499   
3500
3501
3502
3503 # Check whether --with-checker or --without-checker was given.
3504 if test "${with_checker+set}" = set; then
3505   withval="$with_checker"
3506   CC="checkergcc" LOCAL_CC="gcc" CC_OPTIONS="-Werror"
3507 fi
3508
3509 # Check whether --enable-debugging or --disable-debugging was given.
3510 if test "${enable_debugging+set}" = set; then
3511   enableval="$enable_debugging"
3512   CC_OPTIONS="-DDEBUGGING=1"
3513 fi
3514
3515
3516 # LOCAL_CC runs on the build system, targets the build system.
3517 # CC runs on the build system, targets the host system.
3518 if test -z "$LOCAL_CC"; then
3519   LOCAL_CC="$CC"
3520 fi
3521
3522
3523 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
3524 echo "configure:3525: checking for sin in -lm" >&5
3525 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
3526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   ac_save_LIBS="$LIBS"
3530 LIBS="-lm  $LIBS"
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* Override any gcc2 internal prototype to avoid an error.  */
3535 /* We use char because int might match the return type of a gcc2
3536     builtin and then its argument prototype would still apply.  */
3537 char sin();
3538
3539 int main() {
3540 sin()
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544   rm -rf conftest*
3545   eval "ac_cv_lib_$ac_lib_var=yes"
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   eval "ac_cv_lib_$ac_lib_var=no"
3551 fi
3552 rm -f conftest*
3553 LIBS="$ac_save_LIBS"
3554
3555 fi
3556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3559     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3560   cat >> confdefs.h <<EOF
3561 #define $ac_tr_lib 1
3562 EOF
3563
3564   LIBS="-lm $LIBS"
3565
3566 else
3567   echo "$ac_t""no" 1>&6
3568 fi
3569
3570 echo $ac_n "checking for mpf_get_str in -lgmp""... $ac_c" 1>&6
3571 echo "configure:3572: checking for mpf_get_str in -lgmp" >&5
3572 ac_lib_var=`echo gmp'_'mpf_get_str | sed 'y%./+-%__p_%'`
3573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   ac_save_LIBS="$LIBS"
3577 LIBS="-lgmp  $LIBS"
3578 cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
3580 #include "confdefs.h"
3581 /* Override any gcc2 internal prototype to avoid an error.  */
3582 /* We use char because int might match the return type of a gcc2
3583     builtin and then its argument prototype would still apply.  */
3584 char mpf_get_str();
3585
3586 int main() {
3587 mpf_get_str()
3588 ; return 0; }
3589 EOF
3590 if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3591   rm -rf conftest*
3592   eval "ac_cv_lib_$ac_lib_var=yes"
3593 else
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -rf conftest*
3597   eval "ac_cv_lib_$ac_lib_var=no"
3598 fi
3599 rm -f conftest*
3600 LIBS="$ac_save_LIBS"
3601
3602 fi
3603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3604   echo "$ac_t""yes" 1>&6
3605   LIBS="-lgmp $LIBS" GMP_SUBDIRS= GMP_LIBS=
3606 else
3607   echo "$ac_t""no" 1>&6
3608 GMP_SUBDIRS=gmp GMP_LIBS='$(GMP_LIBS)'
3609 fi
3610
3611
3612
3613
3614 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3615 echo "configure:3616: checking for tgetent in -lncurses" >&5
3616 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3617 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3618   echo $ac_n "(cached) $ac_c" 1>&6
3619 else
3620   ac_save_LIBS="$LIBS"
3621 LIBS="-lncurses  $LIBS"
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 /* Override any gcc2 internal prototype to avoid an error.  */
3626 /* We use char because int might match the return type of a gcc2
3627     builtin and then its argument prototype would still apply.  */
3628 char tgetent();
3629
3630 int main() {
3631 tgetent()
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3635   rm -rf conftest*
3636   eval "ac_cv_lib_$ac_lib_var=yes"
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   eval "ac_cv_lib_$ac_lib_var=no"
3642 fi
3643 rm -f conftest*
3644 LIBS="$ac_save_LIBS"
3645
3646 fi
3647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3648   echo "$ac_t""yes" 1>&6
3649   LIBS="-lncurses $LIBS" termcap=yes
3650 else
3651   echo "$ac_t""no" 1>&6
3652 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3653 echo "configure:3654: checking for tgetent in -ltermcap" >&5
3654 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3655 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   ac_save_LIBS="$LIBS"
3659 LIBS="-ltermcap  $LIBS"
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 /* Override any gcc2 internal prototype to avoid an error.  */
3664 /* We use char because int might match the return type of a gcc2
3665     builtin and then its argument prototype would still apply.  */
3666 char tgetent();
3667
3668 int main() {
3669 tgetent()
3670 ; return 0; }
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3673   rm -rf conftest*
3674   eval "ac_cv_lib_$ac_lib_var=yes"
3675 else
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   eval "ac_cv_lib_$ac_lib_var=no"
3680 fi
3681 rm -f conftest*
3682 LIBS="$ac_save_LIBS"
3683
3684 fi
3685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3686   echo "$ac_t""yes" 1>&6
3687   LIBS="-ltermcap $LIBS" termcap=yes
3688 else
3689   echo "$ac_t""no" 1>&6
3690 termcap=no
3691 fi
3692
3693 fi
3694
3695 if test "$termcap" = yes; then
3696   for ac_hdr in termcap.h
3697 do
3698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3700 echo "configure:3701: checking for $ac_hdr" >&5
3701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <$ac_hdr>
3708 EOF
3709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3710 { (eval echo configure:3711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3712 if test -z "$ac_err"; then
3713   rm -rf conftest*
3714   eval "ac_cv_header_$ac_safe=yes"
3715 else
3716   echo "$ac_err" >&5
3717   echo "configure: failed program was:" >&5
3718   cat conftest.$ac_ext >&5
3719   rm -rf conftest*
3720   eval "ac_cv_header_$ac_safe=no"
3721 fi
3722 rm -f conftest*
3723 fi
3724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3725   echo "$ac_t""yes" 1>&6
3726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3727   cat >> confdefs.h <<EOF
3728 #define $ac_tr_hdr 1
3729 EOF
3730  
3731 else
3732   echo "$ac_t""no" 1>&6
3733 fi
3734 done
3735
3736   cat >> confdefs.h <<\EOF
3737 #define HAVE_LIBTERMCAP 1
3738 EOF
3739
3740 fi
3741
3742 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3743 echo "configure:3744: checking for readline in -lreadline" >&5
3744 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   ac_save_LIBS="$LIBS"
3749 LIBS="-lreadline  $LIBS"
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 /* Override any gcc2 internal prototype to avoid an error.  */
3754 /* We use char because int might match the return type of a gcc2
3755     builtin and then its argument prototype would still apply.  */
3756 char readline();
3757
3758 int main() {
3759 readline()
3760 ; return 0; }
3761 EOF
3762 if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3763   rm -rf conftest*
3764   eval "ac_cv_lib_$ac_lib_var=yes"
3765 else
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -rf conftest*
3769   eval "ac_cv_lib_$ac_lib_var=no"
3770 fi
3771 rm -f conftest*
3772 LIBS="$ac_save_LIBS"
3773
3774 fi
3775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3776   echo "$ac_t""yes" 1>&6
3777     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3778     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3779   cat >> confdefs.h <<EOF
3780 #define $ac_tr_lib 1
3781 EOF
3782
3783   LIBS="-lreadline $LIBS"
3784
3785 else
3786   echo "$ac_t""no" 1>&6
3787 fi
3788
3789 if test "$ac_cv_lib_readline_readline" = yes; then
3790   for ac_hdr in readline/readline.h
3791 do
3792 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3793 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3794 echo "configure:3795: checking for $ac_hdr" >&5
3795 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 #include <$ac_hdr>
3802 EOF
3803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3804 { (eval echo configure:3805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3806 if test -z "$ac_err"; then
3807   rm -rf conftest*
3808   eval "ac_cv_header_$ac_safe=yes"
3809 else
3810   echo "$ac_err" >&5
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   eval "ac_cv_header_$ac_safe=no"
3815 fi
3816 rm -f conftest*
3817 fi
3818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3819   echo "$ac_t""yes" 1>&6
3820     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3821   cat >> confdefs.h <<EOF
3822 #define $ac_tr_hdr 1
3823 EOF
3824  
3825 else
3826   echo "$ac_t""no" 1>&6
3827 fi
3828 done
3829
3830   echo $ac_n "checking for add_history in -lreadline""... $ac_c" 1>&6
3831 echo "configure:3832: checking for add_history in -lreadline" >&5
3832 ac_lib_var=`echo readline'_'add_history | sed 'y%./+-%__p_%'`
3833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   ac_save_LIBS="$LIBS"
3837 LIBS="-lreadline  $LIBS"
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 /* Override any gcc2 internal prototype to avoid an error.  */
3842 /* We use char because int might match the return type of a gcc2
3843     builtin and then its argument prototype would still apply.  */
3844 char add_history();
3845
3846 int main() {
3847 add_history()
3848 ; return 0; }
3849 EOF
3850 if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3851   rm -rf conftest*
3852   eval "ac_cv_lib_$ac_lib_var=yes"
3853 else
3854   echo "configure: failed program was:" >&5
3855   cat conftest.$ac_ext >&5
3856   rm -rf conftest*
3857   eval "ac_cv_lib_$ac_lib_var=no"
3858 fi
3859 rm -f conftest*
3860 LIBS="$ac_save_LIBS"
3861
3862 fi
3863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3864   echo "$ac_t""yes" 1>&6
3865   history=yes
3866 else
3867   echo "$ac_t""no" 1>&6
3868 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
3869 echo "configure:3870: checking for add_history in -lhistory" >&5
3870 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
3871 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   ac_save_LIBS="$LIBS"
3875 LIBS="-lhistory  $LIBS"
3876 cat > conftest.$ac_ext <<EOF
3877 #line 3878 "configure"
3878 #include "confdefs.h"
3879 /* Override any gcc2 internal prototype to avoid an error.  */
3880 /* We use char because int might match the return type of a gcc2
3881     builtin and then its argument prototype would still apply.  */
3882 char add_history();
3883
3884 int main() {
3885 add_history()
3886 ; return 0; }
3887 EOF
3888 if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3889   rm -rf conftest*
3890   eval "ac_cv_lib_$ac_lib_var=yes"
3891 else
3892   echo "configure: failed program was:" >&5
3893   cat conftest.$ac_ext >&5
3894   rm -rf conftest*
3895   eval "ac_cv_lib_$ac_lib_var=no"
3896 fi
3897 rm -f conftest*
3898 LIBS="$ac_save_LIBS"
3899
3900 fi
3901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3902   echo "$ac_t""yes" 1>&6
3903   LIBS="-lhistory" history=yes
3904 else
3905   echo "$ac_t""no" 1>&6
3906 history=no
3907 fi
3908
3909 fi
3910
3911   if test "$history" = yes; then
3912     for ac_hdr in readline/history.h
3913 do
3914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3916 echo "configure:3917: checking for $ac_hdr" >&5
3917 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3918   echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <$ac_hdr>
3924 EOF
3925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3926 { (eval echo configure:3927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3928 if test -z "$ac_err"; then
3929   rm -rf conftest*
3930   eval "ac_cv_header_$ac_safe=yes"
3931 else
3932   echo "$ac_err" >&5
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   eval "ac_cv_header_$ac_safe=no"
3937 fi
3938 rm -f conftest*
3939 fi
3940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3943   cat >> confdefs.h <<EOF
3944 #define $ac_tr_hdr 1
3945 EOF
3946  
3947 else
3948   echo "$ac_t""no" 1>&6
3949 fi
3950 done
3951
3952     cat >> confdefs.h <<\EOF
3953 #define HAVE_LIBHISTORY 1
3954 EOF
3955
3956   fi
3957 fi
3958
3959 for ac_hdr in limits.h memory.h sys/stat.h sys/time.h sys/types.h \
3960                  fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h
3961 do
3962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3964 echo "configure:3965: checking for $ac_hdr" >&5
3965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3966   echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968   cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 #include <$ac_hdr>
3972 EOF
3973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3974 { (eval echo configure:3975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3976 if test -z "$ac_err"; then
3977   rm -rf conftest*
3978   eval "ac_cv_header_$ac_safe=yes"
3979 else
3980   echo "$ac_err" >&5
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   eval "ac_cv_header_$ac_safe=no"
3985 fi
3986 rm -f conftest*
3987 fi
3988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3989   echo "$ac_t""yes" 1>&6
3990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3991   cat >> confdefs.h <<EOF
3992 #define $ac_tr_hdr 1
3993 EOF
3994  
3995 else
3996   echo "$ac_t""no" 1>&6
3997 fi
3998 done
3999
4000 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4001 echo "configure:4002: checking whether stat file-mode macros are broken" >&5
4002 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4003   echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005   cat > conftest.$ac_ext <<EOF
4006 #line 4007 "configure"
4007 #include "confdefs.h"
4008 #include <sys/types.h>
4009 #include <sys/stat.h>
4010
4011 #if defined(S_ISBLK) && defined(S_IFDIR)
4012 # if S_ISBLK (S_IFDIR)
4013 You lose.
4014 # endif
4015 #endif
4016
4017 #if defined(S_ISBLK) && defined(S_IFCHR)
4018 # if S_ISBLK (S_IFCHR)
4019 You lose.
4020 # endif
4021 #endif
4022
4023 #if defined(S_ISLNK) && defined(S_IFREG)
4024 # if S_ISLNK (S_IFREG)
4025 You lose.
4026 # endif
4027 #endif
4028
4029 #if defined(S_ISSOCK) && defined(S_IFREG)
4030 # if S_ISSOCK (S_IFREG)
4031 You lose.
4032 # endif
4033 #endif
4034
4035 EOF
4036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4037   egrep "You lose" >/dev/null 2>&1; then
4038   rm -rf conftest*
4039   ac_cv_header_stat_broken=yes
4040 else
4041   rm -rf conftest*
4042   ac_cv_header_stat_broken=no
4043 fi
4044 rm -f conftest*
4045
4046 fi
4047
4048 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4049 if test $ac_cv_header_stat_broken = yes; then
4050   cat >> confdefs.h <<\EOF
4051 #define STAT_MACROS_BROKEN 1
4052 EOF
4053
4054 fi
4055
4056 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4057 echo "configure:4058: checking for ANSI C header files" >&5
4058 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4059   echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061   cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064 #include <stdlib.h>
4065 #include <stdarg.h>
4066 #include <string.h>
4067 #include <float.h>
4068 EOF
4069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4070 { (eval echo configure:4071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4072 if test -z "$ac_err"; then
4073   rm -rf conftest*
4074   ac_cv_header_stdc=yes
4075 else
4076   echo "$ac_err" >&5
4077   echo "configure: failed program was:" >&5
4078   cat conftest.$ac_ext >&5
4079   rm -rf conftest*
4080   ac_cv_header_stdc=no
4081 fi
4082 rm -f conftest*
4083
4084 if test $ac_cv_header_stdc = yes; then
4085   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4086 cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4089 #include <string.h>
4090 EOF
4091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4092   egrep "memchr" >/dev/null 2>&1; then
4093   :
4094 else
4095   rm -rf conftest*
4096   ac_cv_header_stdc=no
4097 fi
4098 rm -f conftest*
4099
4100 fi
4101
4102 if test $ac_cv_header_stdc = yes; then
4103   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #include <stdlib.h>
4108 EOF
4109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4110   egrep "free" >/dev/null 2>&1; then
4111   :
4112 else
4113   rm -rf conftest*
4114   ac_cv_header_stdc=no
4115 fi
4116 rm -f conftest*
4117
4118 fi
4119
4120 if test $ac_cv_header_stdc = yes; then
4121   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4122 if test "$cross_compiling" = yes; then
4123   :
4124 else
4125   cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 #include <ctype.h>
4129 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4130 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4131 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4132 int main () { int i; for (i = 0; i < 256; i++)
4133 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4134 exit (0); }
4135
4136 EOF
4137 if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4138 then
4139   :
4140 else
4141   echo "configure: failed program was:" >&5
4142   cat conftest.$ac_ext >&5
4143   rm -fr conftest*
4144   ac_cv_header_stdc=no
4145 fi
4146 rm -fr conftest*
4147 fi
4148
4149 fi
4150 fi
4151
4152 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4153 if test $ac_cv_header_stdc = yes; then
4154   cat >> confdefs.h <<\EOF
4155 #define STDC_HEADERS 1
4156 EOF
4157
4158 fi
4159
4160 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4161 echo "configure:4162: checking whether time.h and sys/time.h may both be included" >&5
4162 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4163   echo $ac_n "(cached) $ac_c" 1>&6
4164 else
4165   cat > conftest.$ac_ext <<EOF
4166 #line 4167 "configure"
4167 #include "confdefs.h"
4168 #include <sys/types.h>
4169 #include <sys/time.h>
4170 #include <time.h>
4171 int main() {
4172 struct tm *tp;
4173 ; return 0; }
4174 EOF
4175 if { (eval echo configure:4176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4176   rm -rf conftest*
4177   ac_cv_header_time=yes
4178 else
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   ac_cv_header_time=no
4183 fi
4184 rm -f conftest*
4185 fi
4186
4187 echo "$ac_t""$ac_cv_header_time" 1>&6
4188 if test $ac_cv_header_time = yes; then
4189   cat >> confdefs.h <<\EOF
4190 #define TIME_WITH_SYS_TIME 1
4191 EOF
4192
4193 fi
4194
4195
4196
4197
4198 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
4199 echo "configure:4200: checking for function prototypes" >&5
4200 if test "$am_cv_prog_cc_stdc" != no; then
4201   echo "$ac_t""yes" 1>&6
4202   cat >> confdefs.h <<\EOF
4203 #define PROTOTYPES 1
4204 EOF
4205
4206   U= ANSI2KNR=
4207 else
4208   echo "$ac_t""no" 1>&6
4209   U=_ ANSI2KNR=./ansi2knr
4210   # Ensure some checks needed by ansi2knr itself.
4211   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4212 echo "configure:4213: checking for ANSI C header files" >&5
4213 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4214   echo $ac_n "(cached) $ac_c" 1>&6
4215 else
4216   cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <stdlib.h>
4220 #include <stdarg.h>
4221 #include <string.h>
4222 #include <float.h>
4223 EOF
4224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4225 { (eval echo configure:4226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4227 if test -z "$ac_err"; then
4228   rm -rf conftest*
4229   ac_cv_header_stdc=yes
4230 else
4231   echo "$ac_err" >&5
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   ac_cv_header_stdc=no
4236 fi
4237 rm -f conftest*
4238
4239 if test $ac_cv_header_stdc = yes; then
4240   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4241 cat > conftest.$ac_ext <<EOF
4242 #line 4243 "configure"
4243 #include "confdefs.h"
4244 #include <string.h>
4245 EOF
4246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4247   egrep "memchr" >/dev/null 2>&1; then
4248   :
4249 else
4250   rm -rf conftest*
4251   ac_cv_header_stdc=no
4252 fi
4253 rm -f conftest*
4254
4255 fi
4256
4257 if test $ac_cv_header_stdc = yes; then
4258   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4259 cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262 #include <stdlib.h>
4263 EOF
4264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4265   egrep "free" >/dev/null 2>&1; then
4266   :
4267 else
4268   rm -rf conftest*
4269   ac_cv_header_stdc=no
4270 fi
4271 rm -f conftest*
4272
4273 fi
4274
4275 if test $ac_cv_header_stdc = yes; then
4276   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4277 if test "$cross_compiling" = yes; then
4278   :
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <ctype.h>
4284 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4285 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4286 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4287 int main () { int i; for (i = 0; i < 256; i++)
4288 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4289 exit (0); }
4290
4291 EOF
4292 if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4293 then
4294   :
4295 else
4296   echo "configure: failed program was:" >&5
4297   cat conftest.$ac_ext >&5
4298   rm -fr conftest*
4299   ac_cv_header_stdc=no
4300 fi
4301 rm -fr conftest*
4302 fi
4303
4304 fi
4305 fi
4306
4307 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4308 if test $ac_cv_header_stdc = yes; then
4309   cat >> confdefs.h <<\EOF
4310 #define STDC_HEADERS 1
4311 EOF
4312
4313 fi
4314
4315   for ac_hdr in string.h
4316 do
4317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4319 echo "configure:4320: checking for $ac_hdr" >&5
4320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <$ac_hdr>
4327 EOF
4328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4329 { (eval echo configure:4330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4331 if test -z "$ac_err"; then
4332   rm -rf conftest*
4333   eval "ac_cv_header_$ac_safe=yes"
4334 else
4335   echo "$ac_err" >&5
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_header_$ac_safe=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4346   cat >> confdefs.h <<EOF
4347 #define $ac_tr_hdr 1
4348 EOF
4349  
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353 done
4354
4355 fi
4356
4357
4358 echo $ac_n "checking for working const""... $ac_c" 1>&6
4359 echo "configure:4360: checking for working const" >&5
4360 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366
4367 int main() {
4368
4369 /* Ultrix mips cc rejects this.  */
4370 typedef int charset[2]; const charset x = {0,0};
4371 /* SunOS 4.1.1 cc rejects this.  */
4372 char const *const *ccp;
4373 char **p;
4374 /* NEC SVR4.0.2 mips cc rejects this.  */
4375 struct point {int x, y;};
4376 static struct point const zero = {0,0};
4377 /* AIX XL C 1.02.0.0 rejects this.
4378    It does not let you subtract one const X* pointer from another in an arm
4379    of an if-expression whose if-part is not a constant expression */
4380 const char *g = "string";
4381 ccp = &g + (g ? g-g : 0);
4382 /* HPUX 7.0 cc rejects these. */
4383 ++ccp;
4384 p = (char**) ccp;
4385 ccp = (char const *const *) p;
4386 { /* SCO 3.2v4 cc rejects this.  */
4387   char *t;
4388   char const *s = 0 ? (char *) 0 : (char const *) 0;
4389
4390   *t++ = 0;
4391 }
4392 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4393   int x[] = {25, 17};
4394   const int *foo = &x[0];
4395   ++foo;
4396 }
4397 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4398   typedef const int *iptr;
4399   iptr p = 0;
4400   ++p;
4401 }
4402 { /* AIX XL C 1.02.0.0 rejects this saying
4403      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4404   struct s { int j; const int *ap[3]; };
4405   struct s *b; b->j = 5;
4406 }
4407 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4408   const int foo = 10;
4409 }
4410
4411 ; return 0; }
4412 EOF
4413 if { (eval echo configure:4414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4414   rm -rf conftest*
4415   ac_cv_c_const=yes
4416 else
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -rf conftest*
4420   ac_cv_c_const=no
4421 fi
4422 rm -f conftest*
4423 fi
4424
4425 echo "$ac_t""$ac_cv_c_const" 1>&6
4426 if test $ac_cv_c_const = no; then
4427   cat >> confdefs.h <<\EOF
4428 #define const 
4429 EOF
4430
4431 fi
4432
4433 echo $ac_n "checking for inline""... $ac_c" 1>&6
4434 echo "configure:4435: checking for inline" >&5
4435 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   ac_cv_c_inline=no
4439 for ac_kw in inline __inline__ __inline; do
4440   cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443
4444 int main() {
4445 } $ac_kw foo() {
4446 ; return 0; }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4449   rm -rf conftest*
4450   ac_cv_c_inline=$ac_kw; break
4451 else
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454 fi
4455 rm -f conftest*
4456 done
4457
4458 fi
4459
4460 echo "$ac_t""$ac_cv_c_inline" 1>&6
4461 case "$ac_cv_c_inline" in
4462   inline | yes) ;;
4463   no) cat >> confdefs.h <<\EOF
4464 #define inline 
4465 EOF
4466  ;;
4467   *)  cat >> confdefs.h <<EOF
4468 #define inline $ac_cv_c_inline
4469 EOF
4470  ;;
4471 esac
4472
4473 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4474 echo "configure:4475: checking for size_t" >&5
4475 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 #include <sys/types.h>
4482 #if STDC_HEADERS
4483 #include <stdlib.h>
4484 #include <stddef.h>
4485 #endif
4486 EOF
4487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4488   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4489   rm -rf conftest*
4490   ac_cv_type_size_t=yes
4491 else
4492   rm -rf conftest*
4493   ac_cv_type_size_t=no
4494 fi
4495 rm -f conftest*
4496
4497 fi
4498 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4499 if test $ac_cv_type_size_t = no; then
4500   cat >> confdefs.h <<\EOF
4501 #define size_t unsigned
4502 EOF
4503
4504 fi
4505
4506 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4507 echo "configure:4508: checking whether struct tm is in sys/time.h or time.h" >&5
4508 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <sys/types.h>
4515 #include <time.h>
4516 int main() {
4517 struct tm *tp; tp->tm_sec;
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4521   rm -rf conftest*
4522   ac_cv_struct_tm=time.h
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   ac_cv_struct_tm=sys/time.h
4528 fi
4529 rm -f conftest*
4530 fi
4531
4532 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4533 if test $ac_cv_struct_tm = sys/time.h; then
4534   cat >> confdefs.h <<\EOF
4535 #define TM_IN_SYS_TIME 1
4536 EOF
4537
4538 fi
4539
4540
4541 echo $ac_n "checking size of short""... $ac_c" 1>&6
4542 echo "configure:4543: checking size of short" >&5
4543 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
4544   echo $ac_n "(cached) $ac_c" 1>&6
4545 else
4546   if test "$cross_compiling" = yes; then
4547   ac_cv_sizeof_short=2
4548 else
4549   cat > conftest.$ac_ext <<EOF
4550 #line 4551 "configure"
4551 #include "confdefs.h"
4552 #include <stdio.h>
4553 main()
4554 {
4555   FILE *f=fopen("conftestval", "w");
4556   if (!f) exit(1);
4557   fprintf(f, "%d\n", sizeof(short));
4558   exit(0);
4559 }
4560 EOF
4561 if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4562 then
4563   ac_cv_sizeof_short=`cat conftestval`
4564 else
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -fr conftest*
4568   ac_cv_sizeof_short=0
4569 fi
4570 rm -fr conftest*
4571 fi
4572
4573 fi
4574 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4575 cat >> confdefs.h <<EOF
4576 #define SIZEOF_SHORT $ac_cv_sizeof_short
4577 EOF
4578
4579
4580 echo $ac_n "checking size of int""... $ac_c" 1>&6
4581 echo "configure:4582: checking size of int" >&5
4582 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
4583   echo $ac_n "(cached) $ac_c" 1>&6
4584 else
4585   if test "$cross_compiling" = yes; then
4586   ac_cv_sizeof_int=4
4587 else
4588   cat > conftest.$ac_ext <<EOF
4589 #line 4590 "configure"
4590 #include "confdefs.h"
4591 #include <stdio.h>
4592 main()
4593 {
4594   FILE *f=fopen("conftestval", "w");
4595   if (!f) exit(1);
4596   fprintf(f, "%d\n", sizeof(int));
4597   exit(0);
4598 }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4601 then
4602   ac_cv_sizeof_int=`cat conftestval`
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -fr conftest*
4607   ac_cv_sizeof_int=0
4608 fi
4609 rm -fr conftest*
4610 fi
4611
4612 fi
4613 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4614 cat >> confdefs.h <<EOF
4615 #define SIZEOF_INT $ac_cv_sizeof_int
4616 EOF
4617
4618
4619 echo $ac_n "checking size of long""... $ac_c" 1>&6
4620 echo "configure:4621: checking size of long" >&5
4621 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   if test "$cross_compiling" = yes; then
4625   ac_cv_sizeof_long=4
4626 else
4627   cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630 #include <stdio.h>
4631 main()
4632 {
4633   FILE *f=fopen("conftestval", "w");
4634   if (!f) exit(1);
4635   fprintf(f, "%d\n", sizeof(long));
4636   exit(0);
4637 }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4640 then
4641   ac_cv_sizeof_long=`cat conftestval`
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -fr conftest*
4646   ac_cv_sizeof_long=0
4647 fi
4648 rm -fr conftest*
4649 fi
4650
4651 fi
4652 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4653 cat >> confdefs.h <<EOF
4654 #define SIZEOF_LONG $ac_cv_sizeof_long
4655 EOF
4656
4657
4658 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4659 echo "configure:4660: checking size of long long" >&5
4660 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
4661   echo $ac_n "(cached) $ac_c" 1>&6
4662 else
4663   if test "$cross_compiling" = yes; then
4664   ac_cv_sizeof_long_long=0
4665 else
4666   cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669 #include <stdio.h>
4670 main()
4671 {
4672   FILE *f=fopen("conftestval", "w");
4673   if (!f) exit(1);
4674   fprintf(f, "%d\n", sizeof(long long));
4675   exit(0);
4676 }
4677 EOF
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4679 then
4680   ac_cv_sizeof_long_long=`cat conftestval`
4681 else
4682   echo "configure: failed program was:" >&5
4683   cat conftest.$ac_ext >&5
4684   rm -fr conftest*
4685   ac_cv_sizeof_long_long=0
4686 fi
4687 rm -fr conftest*
4688 fi
4689
4690 fi
4691 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4692 cat >> confdefs.h <<EOF
4693 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4694 EOF
4695
4696
4697 echo $ac_n "checking size of float""... $ac_c" 1>&6
4698 echo "configure:4699: checking size of float" >&5
4699 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
4700   echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702   if test "$cross_compiling" = yes; then
4703   ac_cv_sizeof_float=0
4704 else
4705   cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4708 #include <stdio.h>
4709 main()
4710 {
4711   FILE *f=fopen("conftestval", "w");
4712   if (!f) exit(1);
4713   fprintf(f, "%d\n", sizeof(float));
4714   exit(0);
4715 }
4716 EOF
4717 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4718 then
4719   ac_cv_sizeof_float=`cat conftestval`
4720 else
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -fr conftest*
4724   ac_cv_sizeof_float=0
4725 fi
4726 rm -fr conftest*
4727 fi
4728
4729 fi
4730 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
4731 cat >> confdefs.h <<EOF
4732 #define SIZEOF_FLOAT $ac_cv_sizeof_float
4733 EOF
4734
4735
4736 echo $ac_n "checking size of double""... $ac_c" 1>&6
4737 echo "configure:4738: checking size of double" >&5
4738 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   if test "$cross_compiling" = yes; then
4742   ac_cv_sizeof_double=8
4743 else
4744   cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <stdio.h>
4748 main()
4749 {
4750   FILE *f=fopen("conftestval", "w");
4751   if (!f) exit(1);
4752   fprintf(f, "%d\n", sizeof(double));
4753   exit(0);
4754 }
4755 EOF
4756 if { (eval echo configure:4757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4757 then
4758   ac_cv_sizeof_double=`cat conftestval`
4759 else
4760   echo "configure: failed program was:" >&5
4761   cat conftest.$ac_ext >&5
4762   rm -fr conftest*
4763   ac_cv_sizeof_double=0
4764 fi
4765 rm -fr conftest*
4766 fi
4767
4768 fi
4769 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
4770 cat >> confdefs.h <<EOF
4771 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
4772 EOF
4773
4774
4775 echo $ac_n "checking size of long double""... $ac_c" 1>&6
4776 echo "configure:4777: checking size of long double" >&5
4777 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
4778   echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780   if test "$cross_compiling" = yes; then
4781   ac_cv_sizeof_long_double=0
4782 else
4783   cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4786 #include <stdio.h>
4787 main()
4788 {
4789   FILE *f=fopen("conftestval", "w");
4790   if (!f) exit(1);
4791   fprintf(f, "%d\n", sizeof(long double));
4792   exit(0);
4793 }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4796 then
4797   ac_cv_sizeof_long_double=`cat conftestval`
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -fr conftest*
4802   ac_cv_sizeof_long_double=0
4803 fi
4804 rm -fr conftest*
4805 fi
4806
4807 fi
4808 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
4809 cat >> confdefs.h <<EOF
4810 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
4811 EOF
4812
4813
4814
4815
4816 cat >> confdefs.h <<\EOF
4817 #define FPREP FPREP_IEEE754
4818 EOF
4819
4820
4821
4822 if test "$cross_compiling" = no; then
4823       echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4824 echo "configure:4825: checking whether byte ordering is bigendian" >&5
4825 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   ac_cv_c_bigendian=unknown
4829        # See if sys/param.h defines the BYTE_ORDER macro.
4830        cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 #include <sys/types.h>
4834             #include <sys/param.h>
4835 int main() {
4836 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4837             bogus endian macros
4838             #endif
4839 ; return 0; }
4840 EOF
4841 if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4842   rm -rf conftest*
4843   # It does; now see whether it defined to BIG_ENDIAN or not.
4844             cat > conftest.$ac_ext <<EOF
4845 #line 4846 "configure"
4846 #include "confdefs.h"
4847 #include <sys/types.h>
4848                  #include <sys/param.h>
4849 int main() {
4850 #if BYTE_ORDER != BIG_ENDIAN
4851                  not big endian
4852                  #endif
4853 ; return 0; }
4854 EOF
4855 if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4856   rm -rf conftest*
4857   ac_cv_c_bigendian=yes
4858 else
4859   echo "configure: failed program was:" >&5
4860   cat conftest.$ac_ext >&5
4861   rm -rf conftest*
4862   ac_cv_c_bigendian=no
4863 fi
4864 rm -f conftest*
4865 else
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868 fi
4869 rm -f conftest*
4870        if test $ac_cv_c_bigendian = unknown; then
4871            if test "$cross_compiling" = yes; then
4872   { echo "configure: error: Internal error determining endianness." 1>&2; exit 1; }
4873 else
4874   cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 main () {
4878                 /* Are we little or big endian?  From Harbison&Steele.  */
4879                 union
4880                   {
4881                     long l;
4882                     char c[sizeof (long)];
4883                   } u;
4884                 u.l = 1;
4885                 exit (u.c[sizeof (long) - 1] == 1);
4886                 }
4887 EOF
4888 if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4889 then
4890   ac_cv_c_bigendian=no
4891 else
4892   echo "configure: failed program was:" >&5
4893   cat conftest.$ac_ext >&5
4894   rm -fr conftest*
4895   ac_cv_c_bigendian=yes
4896 fi
4897 rm -fr conftest*
4898 fi
4899
4900        fi
4901 fi
4902
4903 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4904
4905   if test "$ac_cv_c_bigendian" = yes; then
4906     cat >> confdefs.h <<\EOF
4907 #define ENDIAN BIG
4908 EOF
4909
4910   elif test "$ac_cv_c_bigendian" = no; then
4911     cat >> confdefs.h <<\EOF
4912 #define ENDIAN LITTLE
4913 EOF
4914
4915   else
4916     { echo "configure: error: Machine's endianness is unknown." 1>&2; exit 1; }
4917   fi
4918 else
4919   cat >> confdefs.h <<\EOF
4920 #define ENDIAN UNKNOWN
4921 EOF
4922
4923
4924   echo "configure: warning: Optionally set value for endianness for best performance." 1>&2
4925 fi
4926
4927
4928 echo $ac_n "checking if sprintf returns a char count""... $ac_c" 1>&6
4929 echo "configure:4930: checking if sprintf returns a char count" >&5
4930 if eval "test \"`echo '$''{'blp_is_sprintf_good'+set}'`\" = set"; then
4931   echo $ac_n "(cached) $ac_c" 1>&6
4932 else
4933   if test "$cross_compiling" = yes; then
4934   eval "blp_is_sprintf_good=no"
4935 else
4936   cat > conftest.$ac_ext <<EOF
4937 #line 4938 "configure"
4938 #include "confdefs.h"
4939 #include <stdio.h>
4940                           int 
4941                           main()
4942                           {
4943                             char s[8];
4944                             exit((int)sprintf(s, "abcdefg")!=7);
4945                           }
4946                          
4947 EOF
4948 if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4949 then
4950   eval "blp_is_sprintf_good=yes"
4951 else
4952   echo "configure: failed program was:" >&5
4953   cat conftest.$ac_ext >&5
4954   rm -fr conftest*
4955   eval "blp_is_sprintf_good=no"
4956 fi
4957 rm -fr conftest*
4958 fi
4959
4960              
4961 fi
4962
4963 if test "$blp_is_sprintf_good" = yes; then
4964   cat >> confdefs.h <<\EOF
4965 #define HAVE_GOOD_SPRINTF 1
4966 EOF
4967
4968   echo "$ac_t""yes" 1>&6
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973
4974 echo $ac_n "checking number of digits in LONG_MIN (incl. sign)""... $ac_c" 1>&6
4975 echo "configure:4976: checking number of digits in LONG_MIN (incl. sign)" >&5
4976 if eval "test \"`echo '$''{'blp_int_digits'+set}'`\" = set"; then
4977   echo $ac_n "(cached) $ac_c" 1>&6
4978 else
4979   if test "$cross_compiling" = yes; then
4980   eval "blp_int_digits=19"
4981 else
4982   cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 #include <stdio.h>
4986                           #include <limits.h>
4987                           int
4988                           main()
4989                           {
4990                             int len;
4991                             char s[80];
4992                             sprintf(s, "%ld", LONG_MAX);
4993                             len = strlen(s);
4994                             sprintf(s, "%ld", LONG_MIN);
4995                             if(strlen(s)>len) len=strlen(s);
4996                             sprintf(s, "%lu", ULONG_MAX);
4997                             if(strlen(s)>len) len=strlen(s);
4998                             exit(len);
4999                           }
5000                          
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5003 then
5004   eval "blp_int_digits=19"
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -fr conftest*
5009   eval "blp_int_digits=$?"
5010                          if test "$blp_int_digits" -lt 11; then
5011                            blp_int_digits=11
5012                          fi
5013 fi
5014 rm -fr conftest*
5015 fi
5016
5017              
5018 fi
5019
5020 cat >> confdefs.h <<EOF
5021 #define INT_DIGITS $blp_int_digits
5022 EOF
5023
5024 echo "$ac_t""$blp_int_digits" 1>&6
5025
5026
5027 echo $ac_n "checking random number generator""... $ac_c" 1>&6
5028 echo "configure:5029: checking random number generator" >&5
5029 if eval "test \"`echo '$''{'blp_random_good'+set}'`\" = set"; then
5030   echo $ac_n "(cached) $ac_c" 1>&6
5031 else
5032   cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 #include <stdlib.h>
5036 int main() {
5037 int x=RAND_MAX;
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5041   rm -rf conftest*
5042   blp_random_good=yes
5043 else
5044   echo "configure: failed program was:" >&5
5045   cat conftest.$ac_ext >&5
5046   rm -rf conftest*
5047   blp_random_good=no
5048 fi
5049 rm -f conftest*
5050 fi
5051
5052 if test "$blp_random_good" = yes; then
5053   cat >> confdefs.h <<\EOF
5054 #define HAVE_GOOD_RANDOM 1
5055 EOF
5056
5057   echo "$ac_t""good" 1>&6
5058 else
5059   echo "$ac_t""bad" 1>&6
5060 fi
5061
5062
5063 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5064 # for constant arguments.  Useless!
5065 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5066 echo "configure:5067: checking for working alloca.h" >&5
5067 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5068   echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070   cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073 #include <alloca.h>
5074 int main() {
5075 char *p = alloca(2 * sizeof(int));
5076 ; return 0; }
5077 EOF
5078 if { (eval echo configure:5079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5079   rm -rf conftest*
5080   ac_cv_header_alloca_h=yes
5081 else
5082   echo "configure: failed program was:" >&5
5083   cat conftest.$ac_ext >&5
5084   rm -rf conftest*
5085   ac_cv_header_alloca_h=no
5086 fi
5087 rm -f conftest*
5088 fi
5089
5090 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5091 if test $ac_cv_header_alloca_h = yes; then
5092   cat >> confdefs.h <<\EOF
5093 #define HAVE_ALLOCA_H 1
5094 EOF
5095
5096 fi
5097
5098 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5099 echo "configure:5100: checking for alloca" >&5
5100 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5101   echo $ac_n "(cached) $ac_c" 1>&6
5102 else
5103   cat > conftest.$ac_ext <<EOF
5104 #line 5105 "configure"
5105 #include "confdefs.h"
5106
5107 #ifdef __GNUC__
5108 # define alloca __builtin_alloca
5109 #else
5110 # ifdef _MSC_VER
5111 #  include <malloc.h>
5112 #  define alloca _alloca
5113 # else
5114 #  if HAVE_ALLOCA_H
5115 #   include <alloca.h>
5116 #  else
5117 #   ifdef _AIX
5118  #pragma alloca
5119 #   else
5120 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5121 char *alloca ();
5122 #    endif
5123 #   endif
5124 #  endif
5125 # endif
5126 #endif
5127
5128 int main() {
5129 char *p = (char *) alloca(1);
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   ac_cv_func_alloca_works=yes
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   ac_cv_func_alloca_works=no
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5145 if test $ac_cv_func_alloca_works = yes; then
5146   cat >> confdefs.h <<\EOF
5147 #define HAVE_ALLOCA 1
5148 EOF
5149
5150 fi
5151
5152 if test $ac_cv_func_alloca_works = no; then
5153   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5154   # that cause trouble.  Some versions do not even contain alloca or
5155   # contain a buggy version.  If you still want to use their alloca,
5156   # use ar to extract alloca.o from them instead of compiling alloca.c.
5157   ALLOCA=alloca.${ac_objext}
5158   cat >> confdefs.h <<\EOF
5159 #define C_ALLOCA 1
5160 EOF
5161
5162
5163 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5164 echo "configure:5165: checking whether alloca needs Cray hooks" >&5
5165 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #if defined(CRAY) && ! defined(CRAY2)
5172 webecray
5173 #else
5174 wenotbecray
5175 #endif
5176
5177 EOF
5178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5179   egrep "webecray" >/dev/null 2>&1; then
5180   rm -rf conftest*
5181   ac_cv_os_cray=yes
5182 else
5183   rm -rf conftest*
5184   ac_cv_os_cray=no
5185 fi
5186 rm -f conftest*
5187
5188 fi
5189
5190 echo "$ac_t""$ac_cv_os_cray" 1>&6
5191 if test $ac_cv_os_cray = yes; then
5192 for ac_func in _getb67 GETB67 getb67; do
5193   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5194 echo "configure:5195: checking for $ac_func" >&5
5195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5196   echo $ac_n "(cached) $ac_c" 1>&6
5197 else
5198   cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201 /* System header to define __stub macros and hopefully few prototypes,
5202     which can conflict with char $ac_func(); below.  */
5203 #include <assert.h>
5204 /* Override any gcc2 internal prototype to avoid an error.  */
5205 /* We use char because int might match the return type of a gcc2
5206     builtin and then its argument prototype would still apply.  */
5207 char $ac_func();
5208
5209 int main() {
5210
5211 /* The GNU C library defines this for functions which it implements
5212     to always fail with ENOSYS.  Some functions are actually named
5213     something starting with __ and the normal name is an alias.  */
5214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5215 choke me
5216 #else
5217 $ac_func();
5218 #endif
5219
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_func_$ac_func=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_func_$ac_func=no"
5230 fi
5231 rm -f conftest*
5232 fi
5233
5234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5235   echo "$ac_t""yes" 1>&6
5236   cat >> confdefs.h <<EOF
5237 #define CRAY_STACKSEG_END $ac_func
5238 EOF
5239
5240   break
5241 else
5242   echo "$ac_t""no" 1>&6
5243 fi
5244
5245 done
5246 fi
5247
5248 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5249 echo "configure:5250: checking stack direction for C alloca" >&5
5250 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5251   echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253   if test "$cross_compiling" = yes; then
5254   ac_cv_c_stack_direction=0
5255 else
5256   cat > conftest.$ac_ext <<EOF
5257 #line 5258 "configure"
5258 #include "confdefs.h"
5259 find_stack_direction ()
5260 {
5261   static char *addr = 0;
5262   auto char dummy;
5263   if (addr == 0)
5264     {
5265       addr = &dummy;
5266       return find_stack_direction ();
5267     }
5268   else
5269     return (&dummy > addr) ? 1 : -1;
5270 }
5271 main ()
5272 {
5273   exit (find_stack_direction() < 0);
5274 }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5277 then
5278   ac_cv_c_stack_direction=1
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -fr conftest*
5283   ac_cv_c_stack_direction=-1
5284 fi
5285 rm -fr conftest*
5286 fi
5287
5288 fi
5289
5290 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5291 cat >> confdefs.h <<EOF
5292 #define STACK_DIRECTION $ac_cv_c_stack_direction
5293 EOF
5294
5295 fi
5296
5297 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
5298 echo "configure:5299: checking for 8-bit clean memcmp" >&5
5299 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   if test "$cross_compiling" = yes; then
5303   ac_cv_func_memcmp_clean=no
5304 else
5305   cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308
5309 main()
5310 {
5311   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5312   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
5313 }
5314
5315 EOF
5316 if { (eval echo configure:5317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5317 then
5318   ac_cv_func_memcmp_clean=yes
5319 else
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322   rm -fr conftest*
5323   ac_cv_func_memcmp_clean=no
5324 fi
5325 rm -fr conftest*
5326 fi
5327
5328 fi
5329
5330 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
5331 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
5332
5333 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
5334 echo "configure:5335: checking for vprintf" >&5
5335 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
5336   echo $ac_n "(cached) $ac_c" 1>&6
5337 else
5338   cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341 /* System header to define __stub macros and hopefully few prototypes,
5342     which can conflict with char vprintf(); below.  */
5343 #include <assert.h>
5344 /* Override any gcc2 internal prototype to avoid an error.  */
5345 /* We use char because int might match the return type of a gcc2
5346     builtin and then its argument prototype would still apply.  */
5347 char vprintf();
5348
5349 int main() {
5350
5351 /* The GNU C library defines this for functions which it implements
5352     to always fail with ENOSYS.  Some functions are actually named
5353     something starting with __ and the normal name is an alias.  */
5354 #if defined (__stub_vprintf) || defined (__stub___vprintf)
5355 choke me
5356 #else
5357 vprintf();
5358 #endif
5359
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5363   rm -rf conftest*
5364   eval "ac_cv_func_vprintf=yes"
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   eval "ac_cv_func_vprintf=no"
5370 fi
5371 rm -f conftest*
5372 fi
5373
5374 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
5375   echo "$ac_t""yes" 1>&6
5376   cat >> confdefs.h <<\EOF
5377 #define HAVE_VPRINTF 1
5378 EOF
5379
5380 else
5381   echo "$ac_t""no" 1>&6
5382 fi
5383
5384 if test "$ac_cv_func_vprintf" != yes; then
5385 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
5386 echo "configure:5387: checking for _doprnt" >&5
5387 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
5388   echo $ac_n "(cached) $ac_c" 1>&6
5389 else
5390   cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 /* System header to define __stub macros and hopefully few prototypes,
5394     which can conflict with char _doprnt(); below.  */
5395 #include <assert.h>
5396 /* Override any gcc2 internal prototype to avoid an error.  */
5397 /* We use char because int might match the return type of a gcc2
5398     builtin and then its argument prototype would still apply.  */
5399 char _doprnt();
5400
5401 int main() {
5402
5403 /* The GNU C library defines this for functions which it implements
5404     to always fail with ENOSYS.  Some functions are actually named
5405     something starting with __ and the normal name is an alias.  */
5406 #if defined (__stub__doprnt) || defined (__stub____doprnt)
5407 choke me
5408 #else
5409 _doprnt();
5410 #endif
5411
5412 ; return 0; }
5413 EOF
5414 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5415   rm -rf conftest*
5416   eval "ac_cv_func__doprnt=yes"
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420   rm -rf conftest*
5421   eval "ac_cv_func__doprnt=no"
5422 fi
5423 rm -f conftest*
5424 fi
5425
5426 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
5427   echo "$ac_t""yes" 1>&6
5428   cat >> confdefs.h <<\EOF
5429 #define HAVE_DOPRNT 1
5430 EOF
5431
5432 else
5433   echo "$ac_t""no" 1>&6
5434 fi
5435
5436 fi
5437
5438 for ac_func in memmove memset stpcpy strpbrk strerror strtol strtoul memchr \
5439                  getline getdelim strcasecmp strncasecmp memmem strtok_r
5440 do
5441 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5442 echo "configure:5443: checking for $ac_func" >&5
5443 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5444   echo $ac_n "(cached) $ac_c" 1>&6
5445 else
5446   cat > conftest.$ac_ext <<EOF
5447 #line 5448 "configure"
5448 #include "confdefs.h"
5449 /* System header to define __stub macros and hopefully few prototypes,
5450     which can conflict with char $ac_func(); below.  */
5451 #include <assert.h>
5452 /* Override any gcc2 internal prototype to avoid an error.  */
5453 /* We use char because int might match the return type of a gcc2
5454     builtin and then its argument prototype would still apply.  */
5455 char $ac_func();
5456
5457 int main() {
5458
5459 /* The GNU C library defines this for functions which it implements
5460     to always fail with ENOSYS.  Some functions are actually named
5461     something starting with __ and the normal name is an alias.  */
5462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5463 choke me
5464 #else
5465 $ac_func();
5466 #endif
5467
5468 ; return 0; }
5469 EOF
5470 if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5471   rm -rf conftest*
5472   eval "ac_cv_func_$ac_func=yes"
5473 else
5474   echo "configure: failed program was:" >&5
5475   cat conftest.$ac_ext >&5
5476   rm -rf conftest*
5477   eval "ac_cv_func_$ac_func=no"
5478 fi
5479 rm -f conftest*
5480 fi
5481
5482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5483   echo "$ac_t""yes" 1>&6
5484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5485   cat >> confdefs.h <<EOF
5486 #define $ac_tr_func 1
5487 EOF
5488  
5489 else
5490   echo "$ac_t""no" 1>&6
5491 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5492 fi
5493 done
5494
5495
5496 for ac_func in gethostname strstr strtod __setfpucw isinf isnan finite getpid \
5497                feholdexcept
5498 do
5499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5500 echo "configure:5501: checking for $ac_func" >&5
5501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5502   echo $ac_n "(cached) $ac_c" 1>&6
5503 else
5504   cat > conftest.$ac_ext <<EOF
5505 #line 5506 "configure"
5506 #include "confdefs.h"
5507 /* System header to define __stub macros and hopefully few prototypes,
5508     which can conflict with char $ac_func(); below.  */
5509 #include <assert.h>
5510 /* Override any gcc2 internal prototype to avoid an error.  */
5511 /* We use char because int might match the return type of a gcc2
5512     builtin and then its argument prototype would still apply.  */
5513 char $ac_func();
5514
5515 int main() {
5516
5517 /* The GNU C library defines this for functions which it implements
5518     to always fail with ENOSYS.  Some functions are actually named
5519     something starting with __ and the normal name is an alias.  */
5520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5521 choke me
5522 #else
5523 $ac_func();
5524 #endif
5525
5526 ; return 0; }
5527 EOF
5528 if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5529   rm -rf conftest*
5530   eval "ac_cv_func_$ac_func=yes"
5531 else
5532   echo "configure: failed program was:" >&5
5533   cat conftest.$ac_ext >&5
5534   rm -rf conftest*
5535   eval "ac_cv_func_$ac_func=no"
5536 fi
5537 rm -f conftest*
5538 fi
5539
5540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5541   echo "$ac_t""yes" 1>&6
5542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5543   cat >> confdefs.h <<EOF
5544 #define $ac_tr_func 1
5545 EOF
5546  
5547 else
5548   echo "$ac_t""no" 1>&6
5549 fi
5550 done
5551
5552
5553 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
5554 echo "configure:5555: checking whether ln -s works" >&5
5555 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
5556   echo $ac_n "(cached) $ac_c" 1>&6
5557 else
5558   rm -f conftestdata
5559 if ln -s X conftestdata 2>/dev/null
5560 then
5561   rm -f conftestdata
5562   ac_cv_prog_LN_S="ln -s"
5563 else
5564   ac_cv_prog_LN_S=ln
5565 fi
5566 fi
5567 LN_S="$ac_cv_prog_LN_S"
5568 if test "$ac_cv_prog_LN_S" = "ln -s"; then
5569   echo "$ac_t""yes" 1>&6
5570 else
5571   echo "$ac_t""no" 1>&6
5572 fi
5573
5574
5575 if test "$ac_cv_prog_gcc" = yes; then
5576         CFLAGS="-g -Wall -W -Wno-uninitialized -Wwrite-strings \
5577 -Wstrict-prototypes -Wpointer-arith"
5578         if test "$CC_OPTIONS" != ""; then
5579                 CFLAGS="$CFLAGS $CC_OPTIONS"
5580         fi
5581 fi
5582
5583
5584 trap '' 1 2 15
5585 cat > confcache <<\EOF
5586 # This file is a shell script that caches the results of configure
5587 # tests run on this system so they can be shared between configure
5588 # scripts and configure runs.  It is not useful on other systems.
5589 # If it contains results you don't want to keep, you may remove or edit it.
5590 #
5591 # By default, configure uses ./config.cache as the cache file,
5592 # creating it if it does not exist already.  You can give configure
5593 # the --cache-file=FILE option to use a different cache file; that is
5594 # what configure does when it calls configure scripts in
5595 # subdirectories, so they share the cache.
5596 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5597 # config.status only pays attention to the cache file if you give it the
5598 # --recheck option to rerun configure.
5599 #
5600 EOF
5601 # The following way of writing the cache mishandles newlines in values,
5602 # but we know of no workaround that is simple, portable, and efficient.
5603 # So, don't put newlines in cache variables' values.
5604 # Ultrix sh set writes to stderr and can't be redirected directly,
5605 # and sets the high bit in the cache file unless we assign to the vars.
5606 (set) 2>&1 |
5607   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5608   *ac_space=\ *)
5609     # `set' does not quote correctly, so add quotes (double-quote substitution
5610     # turns \\\\ into \\, and sed turns \\ into \).
5611     sed -n \
5612       -e "s/'/'\\\\''/g" \
5613       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5614     ;;
5615   *)
5616     # `set' quotes correctly as required by POSIX, so do not add quotes.
5617     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5618     ;;
5619   esac >> confcache
5620 if cmp -s $cache_file confcache; then
5621   :
5622 else
5623   if test -w $cache_file; then
5624     echo "updating cache $cache_file"
5625     cat confcache > $cache_file
5626   else
5627     echo "not updating unwritable cache $cache_file"
5628   fi
5629 fi
5630 rm -f confcache
5631
5632 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5633
5634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5635 # Let make expand exec_prefix.
5636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5637
5638 # Any assignment to VPATH causes Sun make to only execute
5639 # the first set of double-colon rules, so remove it if not needed.
5640 # If there is a colon in the path, we need to keep it.
5641 if test "x$srcdir" = x.; then
5642   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5643 fi
5644
5645 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5646
5647 DEFS=-DHAVE_CONFIG_H
5648
5649 # Without the "./", some shells look in PATH for config.status.
5650 : ${CONFIG_STATUS=./config.status}
5651
5652 echo creating $CONFIG_STATUS
5653 rm -f $CONFIG_STATUS
5654 cat > $CONFIG_STATUS <<EOF
5655 #! /bin/sh
5656 # Generated automatically by configure.
5657 # Run this file to recreate the current configuration.
5658 # This directory was configured as follows,
5659 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5660 #
5661 # $0 $ac_configure_args
5662 #
5663 # Compiler output produced by configure, useful for debugging
5664 # configure, is in ./config.log if it exists.
5665
5666 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5667 for ac_option
5668 do
5669   case "\$ac_option" in
5670   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5671     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5672     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5673   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5674     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5675     exit 0 ;;
5676   -help | --help | --hel | --he | --h)
5677     echo "\$ac_cs_usage"; exit 0 ;;
5678   *) echo "\$ac_cs_usage"; exit 1 ;;
5679   esac
5680 done
5681
5682 ac_given_srcdir=$srcdir
5683 ac_given_INSTALL="$INSTALL"
5684
5685 trap 'rm -fr `echo "Makefile                            \
5686           intl/Makefile                         \
5687           po/Makefile.in                        \
5688           lib/Makefile                          \
5689           lib/gmp/Makefile                      \
5690           lib/gmp/mpn/Makefile                  \
5691           lib/gmp/mpf/Makefile                  \
5692           lib/julcal/Makefile                   \
5693           lib/misc/Makefile                     \
5694           lib/dcdflib/Makefile                  \
5695           doc/Makefile                          \
5696           src/Makefile                          \
5697           config/Makefile                       \
5698           tests/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5699 EOF
5700 cat >> $CONFIG_STATUS <<EOF
5701
5702 # Protect against being on the right side of a sed subst in config.status.
5703 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5704  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5705 $ac_vpsub
5706 $extrasub
5707 s%@SHELL@%$SHELL%g
5708 s%@CFLAGS@%$CFLAGS%g
5709 s%@CPPFLAGS@%$CPPFLAGS%g
5710 s%@CXXFLAGS@%$CXXFLAGS%g
5711 s%@FFLAGS@%$FFLAGS%g
5712 s%@DEFS@%$DEFS%g
5713 s%@LDFLAGS@%$LDFLAGS%g
5714 s%@LIBS@%$LIBS%g
5715 s%@exec_prefix@%$exec_prefix%g
5716 s%@prefix@%$prefix%g
5717 s%@program_transform_name@%$program_transform_name%g
5718 s%@bindir@%$bindir%g
5719 s%@sbindir@%$sbindir%g
5720 s%@libexecdir@%$libexecdir%g
5721 s%@datadir@%$datadir%g
5722 s%@sysconfdir@%$sysconfdir%g
5723 s%@sharedstatedir@%$sharedstatedir%g
5724 s%@localstatedir@%$localstatedir%g
5725 s%@libdir@%$libdir%g
5726 s%@includedir@%$includedir%g
5727 s%@oldincludedir@%$oldincludedir%g
5728 s%@infodir@%$infodir%g
5729 s%@mandir@%$mandir%g
5730 s%@CC@%$CC%g
5731 s%@host@%$host%g
5732 s%@host_alias@%$host_alias%g
5733 s%@host_cpu@%$host_cpu%g
5734 s%@host_vendor@%$host_vendor%g
5735 s%@host_os@%$host_os%g
5736 s%@target@%$target%g
5737 s%@target_alias@%$target_alias%g
5738 s%@target_cpu@%$target_cpu%g
5739 s%@target_vendor@%$target_vendor%g
5740 s%@target_os@%$target_os%g
5741 s%@build@%$build%g
5742 s%@build_alias@%$build_alias%g
5743 s%@build_cpu@%$build_cpu%g
5744 s%@build_vendor@%$build_vendor%g
5745 s%@build_os@%$build_os%g
5746 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5747 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5748 s%@INSTALL_DATA@%$INSTALL_DATA%g
5749 s%@PACKAGE@%$PACKAGE%g
5750 s%@VERSION@%$VERSION%g
5751 s%@ACLOCAL@%$ACLOCAL%g
5752 s%@AUTOCONF@%$AUTOCONF%g
5753 s%@AUTOMAKE@%$AUTOMAKE%g
5754 s%@AUTOHEADER@%$AUTOHEADER%g
5755 s%@MAKEINFO@%$MAKEINFO%g
5756 s%@SET_MAKE@%$SET_MAKE%g
5757 s%@RANLIB@%$RANLIB%g
5758 s%@CPP@%$CPP%g
5759 s%@ALLOCA@%$ALLOCA%g
5760 s%@USE_NLS@%$USE_NLS%g
5761 s%@MSGFMT@%$MSGFMT%g
5762 s%@GMSGFMT@%$GMSGFMT%g
5763 s%@XGETTEXT@%$XGETTEXT%g
5764 s%@GENCAT@%$GENCAT%g
5765 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5766 s%@CATALOGS@%$CATALOGS%g
5767 s%@CATOBJEXT@%$CATOBJEXT%g
5768 s%@DATADIRNAME@%$DATADIRNAME%g
5769 s%@GMOFILES@%$GMOFILES%g
5770 s%@INSTOBJEXT@%$INSTOBJEXT%g
5771 s%@INTLDEPS@%$INTLDEPS%g
5772 s%@INTLLIBS@%$INTLLIBS%g
5773 s%@INTLOBJS@%$INTLOBJS%g
5774 s%@POFILES@%$POFILES%g
5775 s%@POSUB@%$POSUB%g
5776 s%@GT_NO@%$GT_NO%g
5777 s%@GT_YES@%$GT_YES%g
5778 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5779 s%@l@%$l%g
5780 s%@LOCAL_CC@%$LOCAL_CC%g
5781 s%@GMP_SUBDIRS@%$GMP_SUBDIRS%g
5782 s%@GMP_LIBS@%$GMP_LIBS%g
5783 s%@U@%$U%g
5784 s%@ANSI2KNR@%$ANSI2KNR%g
5785 s%@LIBOBJS@%$LIBOBJS%g
5786 s%@LN_S@%$LN_S%g
5787
5788 CEOF
5789 EOF
5790
5791 cat >> $CONFIG_STATUS <<\EOF
5792
5793 # Split the substitutions into bite-sized pieces for seds with
5794 # small command number limits, like on Digital OSF/1 and HP-UX.
5795 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5796 ac_file=1 # Number of current file.
5797 ac_beg=1 # First line for current file.
5798 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5799 ac_more_lines=:
5800 ac_sed_cmds=""
5801 while $ac_more_lines; do
5802   if test $ac_beg -gt 1; then
5803     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5804   else
5805     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5806   fi
5807   if test ! -s conftest.s$ac_file; then
5808     ac_more_lines=false
5809     rm -f conftest.s$ac_file
5810   else
5811     if test -z "$ac_sed_cmds"; then
5812       ac_sed_cmds="sed -f conftest.s$ac_file"
5813     else
5814       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5815     fi
5816     ac_file=`expr $ac_file + 1`
5817     ac_beg=$ac_end
5818     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5819   fi
5820 done
5821 if test -z "$ac_sed_cmds"; then
5822   ac_sed_cmds=cat
5823 fi
5824 EOF
5825
5826 cat >> $CONFIG_STATUS <<EOF
5827
5828 CONFIG_FILES=\${CONFIG_FILES-"Makefile                          \
5829           intl/Makefile                         \
5830           po/Makefile.in                        \
5831           lib/Makefile                          \
5832           lib/gmp/Makefile                      \
5833           lib/gmp/mpn/Makefile                  \
5834           lib/gmp/mpf/Makefile                  \
5835           lib/julcal/Makefile                   \
5836           lib/misc/Makefile                     \
5837           lib/dcdflib/Makefile                  \
5838           doc/Makefile                          \
5839           src/Makefile                          \
5840           config/Makefile                       \
5841           tests/Makefile"}
5842 EOF
5843 cat >> $CONFIG_STATUS <<\EOF
5844 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5845   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5846   case "$ac_file" in
5847   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5848        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5849   *) ac_file_in="${ac_file}.in" ;;
5850   esac
5851
5852   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5853
5854   # Remove last slash and all that follows it.  Not all systems have dirname.
5855   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5856   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5857     # The file is in a subdirectory.
5858     test ! -d "$ac_dir" && mkdir "$ac_dir"
5859     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5860     # A "../" for each directory in $ac_dir_suffix.
5861     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5862   else
5863     ac_dir_suffix= ac_dots=
5864   fi
5865
5866   case "$ac_given_srcdir" in
5867   .)  srcdir=.
5868       if test -z "$ac_dots"; then top_srcdir=.
5869       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5870   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5871   *) # Relative path.
5872     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5873     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5874   esac
5875
5876   case "$ac_given_INSTALL" in
5877   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5878   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5879   esac
5880
5881   echo creating "$ac_file"
5882   rm -f "$ac_file"
5883   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5884   case "$ac_file" in
5885   *Makefile*) ac_comsub="1i\\
5886 # $configure_input" ;;
5887   *) ac_comsub= ;;
5888   esac
5889
5890   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5891   sed -e "$ac_comsub
5892 s%@configure_input@%$configure_input%g
5893 s%@srcdir@%$srcdir%g
5894 s%@top_srcdir@%$top_srcdir%g
5895 s%@INSTALL@%$INSTALL%g
5896 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5897 fi; done
5898 rm -f conftest.s*
5899
5900 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5901 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5902 #
5903 # ac_d sets the value in "#define NAME VALUE" lines.
5904 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5905 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5906 ac_dC='\3'
5907 ac_dD='%g'
5908 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5909 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5910 ac_uB='\([      ]\)%\1#\2define\3'
5911 ac_uC=' '
5912 ac_uD='\4%g'
5913 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5914 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5915 ac_eB='$%\1#\2define\3'
5916 ac_eC=' '
5917 ac_eD='%g'
5918
5919 if test "${CONFIG_HEADERS+set}" != set; then
5920 EOF
5921 cat >> $CONFIG_STATUS <<EOF
5922   CONFIG_HEADERS="config.h"
5923 EOF
5924 cat >> $CONFIG_STATUS <<\EOF
5925 fi
5926 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5927   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5928   case "$ac_file" in
5929   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5930        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5931   *) ac_file_in="${ac_file}.in" ;;
5932   esac
5933
5934   echo creating $ac_file
5935
5936   rm -f conftest.frag conftest.in conftest.out
5937   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5938   cat $ac_file_inputs > conftest.in
5939
5940 EOF
5941
5942 # Transform confdefs.h into a sed script conftest.vals that substitutes
5943 # the proper values into config.h.in to produce config.h.  And first:
5944 # Protect against being on the right side of a sed subst in config.status.
5945 # Protect against being in an unquoted here document in config.status.
5946 rm -f conftest.vals
5947 cat > conftest.hdr <<\EOF
5948 s/[\\&%]/\\&/g
5949 s%[\\$`]%\\&%g
5950 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5951 s%ac_d%ac_u%gp
5952 s%ac_u%ac_e%gp
5953 EOF
5954 sed -n -f conftest.hdr confdefs.h > conftest.vals
5955 rm -f conftest.hdr
5956
5957 # This sed command replaces #undef with comments.  This is necessary, for
5958 # example, in the case of _POSIX_SOURCE, which is predefined and required
5959 # on some systems where configure will not decide to define it.
5960 cat >> conftest.vals <<\EOF
5961 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5962 EOF
5963
5964 # Break up conftest.vals because some shells have a limit on
5965 # the size of here documents, and old seds have small limits too.
5966
5967 rm -f conftest.tail
5968 while :
5969 do
5970   ac_lines=`grep -c . conftest.vals`
5971   # grep -c gives empty output for an empty file on some AIX systems.
5972   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5973   # Write a limited-size here document to conftest.frag.
5974   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5975   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5976   echo 'CEOF
5977   sed -f conftest.frag conftest.in > conftest.out
5978   rm -f conftest.in
5979   mv conftest.out conftest.in
5980 ' >> $CONFIG_STATUS
5981   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5982   rm -f conftest.vals
5983   mv conftest.tail conftest.vals
5984 done
5985 rm -f conftest.vals
5986
5987 cat >> $CONFIG_STATUS <<\EOF
5988   rm -f conftest.frag conftest.h
5989   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5990   cat conftest.in >> conftest.h
5991   rm -f conftest.in
5992   if cmp -s $ac_file conftest.h 2>/dev/null; then
5993     echo "$ac_file is unchanged"
5994     rm -f conftest.h
5995   else
5996     # Remove last slash and all that follows it.  Not all systems have dirname.
5997       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5998       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5999       # The file is in a subdirectory.
6000       test ! -d "$ac_dir" && mkdir "$ac_dir"
6001     fi
6002     rm -f $ac_file
6003     mv conftest.h $ac_file
6004   fi
6005 fi; done
6006
6007 EOF
6008
6009 cat >> $CONFIG_STATUS <<EOF
6010 ac_sources="$nls_cv_header_libgt"
6011 ac_dests="$nls_cv_header_intl"
6012 EOF
6013
6014 cat >> $CONFIG_STATUS <<\EOF
6015 srcdir=$ac_given_srcdir
6016 while test -n "$ac_sources"; do
6017   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6018   set $ac_sources; ac_source=$1; shift; ac_sources=$*
6019
6020   echo "linking $srcdir/$ac_source to $ac_dest"
6021
6022   if test ! -r $srcdir/$ac_source; then
6023     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6024   fi
6025   rm -f $ac_dest
6026
6027   # Make relative symlinks.
6028   # Remove last slash and all that follows it.  Not all systems have dirname.
6029   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6030   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6031     # The dest file is in a subdirectory.
6032     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6033     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6034     # A "../" for each directory in $ac_dest_dir_suffix.
6035     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6036   else
6037     ac_dest_dir_suffix= ac_dots=
6038   fi
6039
6040   case "$srcdir" in
6041   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6042   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6043   esac
6044
6045   # Make a symlink if possible; otherwise try a hard link.
6046   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6047     ln $srcdir/$ac_source $ac_dest; then :
6048   else
6049     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6050   fi
6051 done
6052 EOF
6053 cat >> $CONFIG_STATUS <<EOF
6054
6055
6056 EOF
6057 cat >> $CONFIG_STATUS <<\EOF
6058 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6059 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
6060
6061            # Copy pref.h from pref.h.orig if prudent
6062            if test ! -f pref.h; then
6063              echo "creating pref.h"
6064              cp $ac_given_srcdir/pref.h.orig pref.h
6065            elif test "`ls -t pref.h.orig pref.h 2>/dev/null | sed 1q`" = pref.h.orig; then
6066              echo "replacing pref.h with newer pref.h.orig"
6067              cp $ac_given_srcdir/pref.h.orig pref.h
6068            else
6069              echo "pref.h exists"
6070            fi
6071            if test -f pref.h; then touch pref.h; fi
6072           
6073 exit 0
6074 EOF
6075 chmod +x $CONFIG_STATUS
6076 rm -fr confdefs* $ac_clean_files
6077 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6078
6079