]> git.ipfire.org Git - thirdparty/gcc.git/blame - intl/configure
Makefile.tpl (configure-gcc): Depend on maybe-configure-intl.
[thirdparty/gcc.git] / intl / configure
CommitLineData
6eb95e99 1#! /bin/sh
56694dd9 2
6eb95e99 3# Guess values for system-dependent variables and create Makefiles.
56694dd9
ZW
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6eb95e99 6#
6eb95e99
ZW
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
6eb95e99 9
56694dd9
ZW
10# Defaults:
11ac_help=
6eb95e99 12ac_default_prefix=/usr/local
56694dd9
ZW
13# Any additions from configure.in:
14ac_help="$ac_help
15 --disable-nls do not use Native Language Support"
16ac_help="$ac_help
17 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
18ac_help="$ac_help
19 --disable-rpath do not hardcode runtime library paths"
20ac_help="$ac_help
21 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
22 --without-libiconv-prefix don't search for libiconv in includedir and libdir"
23ac_help="$ac_help
24 --disable-nls do not use Native Language Support"
25ac_help="$ac_help
26 --with-included-gettext use the GNU gettext library included here"
27ac_help="$ac_help
28 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
29 --without-libintl-prefix don't search for libintl in includedir and libdir"
6eb95e99
ZW
30
31# Initialize some variables set by options.
6eb95e99
ZW
32# The variables have the same names as the options, with
33# dashes changed to underlines.
56694dd9
ZW
34build=NONE
35cache_file=./config.cache
6eb95e99 36exec_prefix=NONE
56694dd9 37host=NONE
6eb95e99 38no_create=
56694dd9 39nonopt=NONE
6eb95e99
ZW
40no_recursion=
41prefix=NONE
42program_prefix=NONE
43program_suffix=NONE
44program_transform_name=s,x,x,
45silent=
46site=
47srcdir=
56694dd9 48target=NONE
6eb95e99
ZW
49verbose=
50x_includes=NONE
51x_libraries=NONE
6eb95e99
ZW
52bindir='${exec_prefix}/bin'
53sbindir='${exec_prefix}/sbin'
54libexecdir='${exec_prefix}/libexec'
55datadir='${prefix}/share'
56sysconfdir='${prefix}/etc'
57sharedstatedir='${prefix}/com'
58localstatedir='${prefix}/var'
59libdir='${exec_prefix}/lib'
60includedir='${prefix}/include'
61oldincludedir='/usr/include'
62infodir='${prefix}/info'
63mandir='${prefix}/man'
64
56694dd9
ZW
65# Initialize some other variables.
66subdirs=
67MFLAGS= MAKEFLAGS=
68SHELL=${CONFIG_SHELL-/bin/sh}
69# Maximum number of lines to put in a shell here document.
70ac_max_here_lines=12
71
6eb95e99
ZW
72ac_prev=
73for ac_option
74do
56694dd9 75
6eb95e99
ZW
76 # If the previous option needs an argument, assign it.
77 if test -n "$ac_prev"; then
78 eval "$ac_prev=\$ac_option"
79 ac_prev=
80 continue
81 fi
82
56694dd9
ZW
83 case "$ac_option" in
84 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
85 *) ac_optarg= ;;
86 esac
6eb95e99
ZW
87
88 # Accept the important Cygnus configure options, so we can diagnose typos.
89
56694dd9 90 case "$ac_option" in
6eb95e99
ZW
91
92 -bindir | --bindir | --bindi | --bind | --bin | --bi)
93 ac_prev=bindir ;;
94 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
56694dd9 95 bindir="$ac_optarg" ;;
6eb95e99
ZW
96
97 -build | --build | --buil | --bui | --bu)
56694dd9 98 ac_prev=build ;;
6eb95e99 99 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
56694dd9 100 build="$ac_optarg" ;;
6eb95e99
ZW
101
102 -cache-file | --cache-file | --cache-fil | --cache-fi \
103 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104 ac_prev=cache_file ;;
105 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
56694dd9 107 cache_file="$ac_optarg" ;;
6eb95e99
ZW
108
109 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
110 ac_prev=datadir ;;
111 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
112 | --da=*)
56694dd9 113 datadir="$ac_optarg" ;;
6eb95e99
ZW
114
115 -disable-* | --disable-*)
56694dd9 116 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
6eb95e99 117 # Reject names that are not valid shell variable names.
56694dd9
ZW
118 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120 fi
121 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122 eval "enable_${ac_feature}=no" ;;
6eb95e99
ZW
123
124 -enable-* | --enable-*)
56694dd9 125 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
6eb95e99 126 # Reject names that are not valid shell variable names.
56694dd9
ZW
127 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 case "$ac_option" in
132 *=*) ;;
6eb95e99
ZW
133 *) ac_optarg=yes ;;
134 esac
56694dd9 135 eval "enable_${ac_feature}='$ac_optarg'" ;;
6eb95e99
ZW
136
137 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139 | --exec | --exe | --ex)
140 ac_prev=exec_prefix ;;
141 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143 | --exec=* | --exe=* | --ex=*)
56694dd9 144 exec_prefix="$ac_optarg" ;;
6eb95e99
ZW
145
146 -gas | --gas | --ga | --g)
147 # Obsolete; use --with-gas.
148 with_gas=yes ;;
149
56694dd9
ZW
150 -help | --help | --hel | --he)
151 # Omit some internal or obsolete options to make the list less imposing.
152 # This message is too long to be a string in the A/UX 3.1 sh.
153 cat << EOF
154Usage: configure [options] [host]
155Options: [defaults in brackets after descriptions]
156Configuration:
157 --cache-file=FILE cache test results in FILE
158 --help print this message
159 --no-create do not create output files
160 --quiet, --silent do not print \`checking...' messages
161 --version print the version of autoconf that created configure
162Directory and file names:
163 --prefix=PREFIX install architecture-independent files in PREFIX
164 [$ac_default_prefix]
165 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
166 [same as prefix]
167 --bindir=DIR user executables in DIR [EPREFIX/bin]
168 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
169 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
170 --datadir=DIR read-only architecture-independent data in DIR
171 [PREFIX/share]
172 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
173 --sharedstatedir=DIR modifiable architecture-independent data in DIR
174 [PREFIX/com]
175 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
176 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
177 --includedir=DIR C header files in DIR [PREFIX/include]
178 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
179 --infodir=DIR info documentation in DIR [PREFIX/info]
180 --mandir=DIR man documentation in DIR [PREFIX/man]
181 --srcdir=DIR find the sources in DIR [configure dir or ..]
182 --program-prefix=PREFIX prepend PREFIX to installed program names
183 --program-suffix=SUFFIX append SUFFIX to installed program names
184 --program-transform-name=PROGRAM
185 run sed PROGRAM on installed program names
186EOF
187 cat << EOF
188Host type:
189 --build=BUILD configure for building on BUILD [BUILD=HOST]
190 --host=HOST configure for HOST [guessed]
191 --target=TARGET configure for TARGET [TARGET=HOST]
192Features and packages:
193 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
194 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
195 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
196 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
197 --x-includes=DIR X include files are in DIR
198 --x-libraries=DIR X library files are in DIR
199EOF
200 if test -n "$ac_help"; then
201 echo "--enable and --with options recognized:$ac_help"
202 fi
203 exit 0 ;;
6eb95e99
ZW
204
205 -host | --host | --hos | --ho)
56694dd9 206 ac_prev=host ;;
6eb95e99 207 -host=* | --host=* | --hos=* | --ho=*)
56694dd9 208 host="$ac_optarg" ;;
6eb95e99
ZW
209
210 -includedir | --includedir | --includedi | --included | --include \
211 | --includ | --inclu | --incl | --inc)
212 ac_prev=includedir ;;
213 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214 | --includ=* | --inclu=* | --incl=* | --inc=*)
56694dd9 215 includedir="$ac_optarg" ;;
6eb95e99
ZW
216
217 -infodir | --infodir | --infodi | --infod | --info | --inf)
218 ac_prev=infodir ;;
219 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
56694dd9 220 infodir="$ac_optarg" ;;
6eb95e99
ZW
221
222 -libdir | --libdir | --libdi | --libd)
223 ac_prev=libdir ;;
224 -libdir=* | --libdir=* | --libdi=* | --libd=*)
56694dd9 225 libdir="$ac_optarg" ;;
6eb95e99
ZW
226
227 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228 | --libexe | --libex | --libe)
229 ac_prev=libexecdir ;;
230 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231 | --libexe=* | --libex=* | --libe=*)
56694dd9 232 libexecdir="$ac_optarg" ;;
6eb95e99
ZW
233
234 -localstatedir | --localstatedir | --localstatedi | --localstated \
235 | --localstate | --localstat | --localsta | --localst \
236 | --locals | --local | --loca | --loc | --lo)
237 ac_prev=localstatedir ;;
238 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
56694dd9 241 localstatedir="$ac_optarg" ;;
6eb95e99
ZW
242
243 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244 ac_prev=mandir ;;
245 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
56694dd9 246 mandir="$ac_optarg" ;;
6eb95e99
ZW
247
248 -nfp | --nfp | --nf)
249 # Obsolete; use --without-fp.
250 with_fp=no ;;
251
252 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
56694dd9 253 | --no-cr | --no-c)
6eb95e99
ZW
254 no_create=yes ;;
255
256 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
258 no_recursion=yes ;;
259
260 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262 | --oldin | --oldi | --old | --ol | --o)
263 ac_prev=oldincludedir ;;
264 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
56694dd9 267 oldincludedir="$ac_optarg" ;;
6eb95e99
ZW
268
269 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270 ac_prev=prefix ;;
271 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
56694dd9 272 prefix="$ac_optarg" ;;
6eb95e99
ZW
273
274 -program-prefix | --program-prefix | --program-prefi | --program-pref \
275 | --program-pre | --program-pr | --program-p)
276 ac_prev=program_prefix ;;
277 -program-prefix=* | --program-prefix=* | --program-prefi=* \
278 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
56694dd9 279 program_prefix="$ac_optarg" ;;
6eb95e99
ZW
280
281 -program-suffix | --program-suffix | --program-suffi | --program-suff \
282 | --program-suf | --program-su | --program-s)
283 ac_prev=program_suffix ;;
284 -program-suffix=* | --program-suffix=* | --program-suffi=* \
285 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
56694dd9 286 program_suffix="$ac_optarg" ;;
6eb95e99
ZW
287
288 -program-transform-name | --program-transform-name \
289 | --program-transform-nam | --program-transform-na \
290 | --program-transform-n | --program-transform- \
291 | --program-transform | --program-transfor \
292 | --program-transfo | --program-transf \
293 | --program-trans | --program-tran \
294 | --progr-tra | --program-tr | --program-t)
295 ac_prev=program_transform_name ;;
296 -program-transform-name=* | --program-transform-name=* \
297 | --program-transform-nam=* | --program-transform-na=* \
298 | --program-transform-n=* | --program-transform-=* \
299 | --program-transform=* | --program-transfor=* \
300 | --program-transfo=* | --program-transf=* \
301 | --program-trans=* | --program-tran=* \
302 | --progr-tra=* | --program-tr=* | --program-t=*)
56694dd9 303 program_transform_name="$ac_optarg" ;;
6eb95e99
ZW
304
305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306 | -silent | --silent | --silen | --sile | --sil)
307 silent=yes ;;
308
309 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310 ac_prev=sbindir ;;
311 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312 | --sbi=* | --sb=*)
56694dd9 313 sbindir="$ac_optarg" ;;
6eb95e99
ZW
314
315 -sharedstatedir | --sharedstatedir | --sharedstatedi \
316 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317 | --sharedst | --shareds | --shared | --share | --shar \
318 | --sha | --sh)
319 ac_prev=sharedstatedir ;;
320 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323 | --sha=* | --sh=*)
56694dd9 324 sharedstatedir="$ac_optarg" ;;
6eb95e99
ZW
325
326 -site | --site | --sit)
327 ac_prev=site ;;
328 -site=* | --site=* | --sit=*)
56694dd9 329 site="$ac_optarg" ;;
6eb95e99
ZW
330
331 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332 ac_prev=srcdir ;;
333 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
56694dd9 334 srcdir="$ac_optarg" ;;
6eb95e99
ZW
335
336 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337 | --syscon | --sysco | --sysc | --sys | --sy)
338 ac_prev=sysconfdir ;;
339 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
56694dd9 341 sysconfdir="$ac_optarg" ;;
6eb95e99
ZW
342
343 -target | --target | --targe | --targ | --tar | --ta | --t)
56694dd9 344 ac_prev=target ;;
6eb95e99 345 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
56694dd9 346 target="$ac_optarg" ;;
6eb95e99
ZW
347
348 -v | -verbose | --verbose | --verbos | --verbo | --verb)
349 verbose=yes ;;
350
56694dd9
ZW
351 -version | --version | --versio | --versi | --vers)
352 echo "configure generated by autoconf version 2.13"
353 exit 0 ;;
6eb95e99
ZW
354
355 -with-* | --with-*)
56694dd9 356 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
6eb95e99 357 # Reject names that are not valid shell variable names.
56694dd9
ZW
358 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360 fi
6eb95e99 361 ac_package=`echo $ac_package| sed 's/-/_/g'`
56694dd9
ZW
362 case "$ac_option" in
363 *=*) ;;
6eb95e99
ZW
364 *) ac_optarg=yes ;;
365 esac
56694dd9 366 eval "with_${ac_package}='$ac_optarg'" ;;
6eb95e99
ZW
367
368 -without-* | --without-*)
56694dd9 369 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
6eb95e99 370 # Reject names that are not valid shell variable names.
56694dd9
ZW
371 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 fi
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
375 eval "with_${ac_package}=no" ;;
6eb95e99
ZW
376
377 --x)
378 # Obsolete; use --with-x.
379 with_x=yes ;;
380
381 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382 | --x-incl | --x-inc | --x-in | --x-i)
383 ac_prev=x_includes ;;
384 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
56694dd9 386 x_includes="$ac_optarg" ;;
6eb95e99
ZW
387
388 -x-libraries | --x-libraries | --x-librarie | --x-librari \
389 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390 ac_prev=x_libraries ;;
391 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
56694dd9 393 x_libraries="$ac_optarg" ;;
6eb95e99 394
56694dd9 395 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
6eb95e99
ZW
396 ;;
397
6eb95e99 398 *)
56694dd9
ZW
399 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400 echo "configure: warning: $ac_option: invalid host type" 1>&2
401 fi
402 if test "x$nonopt" != xNONE; then
403 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
404 fi
405 nonopt="$ac_option"
6eb95e99
ZW
406 ;;
407
408 esac
409done
410
411if test -n "$ac_prev"; then
56694dd9 412 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
6eb95e99
ZW
413fi
414
56694dd9
ZW
415trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416
417# File descriptor usage:
418# 0 standard input
419# 1 file creation
420# 2 errors and warnings
421# 3 some systems may open it to /dev/tty
422# 4 used on the Kubota Titan
423# 6 checking for... messages and results
424# 5 compiler messages saved in config.log
425if test "$silent" = yes; then
426 exec 6>/dev/null
427else
428 exec 6>&1
429fi
430exec 5>./config.log
431
432echo "\
433This file contains any messages produced by compilers while
434running configure, to aid debugging if configure makes a mistake.
435" 1>&5
6eb95e99 436
56694dd9
ZW
437# Strip out --no-create and --no-recursion so they do not pile up.
438# Also quote any args containing shell metacharacters.
439ac_configure_args=
440for ac_arg
6eb95e99 441do
56694dd9
ZW
442 case "$ac_arg" in
443 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444 | --no-cr | --no-c) ;;
445 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
6eb95e99
ZW
450 esac
451done
452
56694dd9
ZW
453# NLS nuisances.
454# Only set these to C if already set. These must not be set unconditionally
455# because not all systems understand e.g. LANG=C (notably SCO).
456# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457# Non-C LC_CTYPE values break the ctype check.
458if test "${LANG+set}" = set; then LANG=C; export LANG; fi
459if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
6eb95e99 462
56694dd9
ZW
463# confdefs.h avoids OS command line length limits that DEFS can exceed.
464rm -rf conftest* confdefs.h
465# AIX cpp loses on an empty file, so make sure it contains at least a newline.
466echo > confdefs.h
6eb95e99 467
56694dd9
ZW
468# A filename unique to this package, relative to the directory that
469# configure is in, which we can look for to find out if srcdir is correct.
470ac_unique_file=gettext.c
6eb95e99
ZW
471
472# Find the source files, if location was not specified.
473if test -z "$srcdir"; then
474 ac_srcdir_defaulted=yes
475 # Try the directory containing this script, then its parent.
56694dd9
ZW
476 ac_prog=$0
477 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
6eb95e99
ZW
479 srcdir=$ac_confdir
480 if test ! -r $srcdir/$ac_unique_file; then
481 srcdir=..
482 fi
483else
484 ac_srcdir_defaulted=no
485fi
486if test ! -r $srcdir/$ac_unique_file; then
487 if test "$ac_srcdir_defaulted" = yes; then
56694dd9 488 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
6eb95e99 489 else
56694dd9 490 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
6eb95e99
ZW
491 fi
492fi
56694dd9 493srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
6eb95e99 494
6eb95e99
ZW
495# Prefer explicitly selected file to automatically selected ones.
496if test -z "$CONFIG_SITE"; then
497 if test "x$prefix" != xNONE; then
498 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499 else
500 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
501 fi
502fi
503for ac_site_file in $CONFIG_SITE; do
504 if test -r "$ac_site_file"; then
56694dd9 505 echo "loading site script $ac_site_file"
6eb95e99
ZW
506 . "$ac_site_file"
507 fi
508done
509
510if test -r "$cache_file"; then
56694dd9
ZW
511 echo "loading cache $cache_file"
512 . $cache_file
6eb95e99 513else
56694dd9
ZW
514 echo "creating cache $cache_file"
515 > $cache_file
6eb95e99
ZW
516fi
517
518ac_ext=c
56694dd9 519# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6eb95e99 520ac_cpp='$CPP $CPPFLAGS'
56694dd9
ZW
521ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
522ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
523cross_compiling=$ac_cv_prog_cc_cross
524
525ac_exeext=
526ac_objext=o
527if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
528 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
529 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530 ac_n= ac_c='
531' ac_t=' '
532 else
533 ac_n=-n ac_c= ac_t=
534 fi
535else
536 ac_n= ac_c='\c' ac_t=
537fi
6eb95e99 538
56694dd9
ZW
539# Check whether --with-gnu-ld or --without-gnu-ld was given.
540if test "${with_gnu_ld+set}" = set; then
541 withval="$with_gnu_ld"
542 test "$withval" = no || with_gnu_ld=yes
543else
544 with_gnu_ld=no
545fi
6eb95e99 546
56694dd9
ZW
547# Prepare PATH_SEPARATOR.
548# The user is always right.
549if test "${PATH_SEPARATOR+set}" != set; then
550 echo "#! /bin/sh" >conf$$.sh
551 echo "exit 0" >>conf$$.sh
552 chmod +x conf$$.sh
553 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
554 PATH_SEPARATOR=';'
555 else
556 PATH_SEPARATOR=:
557 fi
558 rm -f conf$$.sh
559fi
560ac_prog=ld
561if test "$GCC" = yes; then
562 # Check if gcc -print-prog-name=ld gives a path.
563 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
564echo "configure:565: checking for ld used by GCC" >&5
565 case $host in
566 *-*-mingw*)
567 # gcc leaves a trailing carriage return which upsets mingw
568 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
569 *)
570 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
571 esac
572 case $ac_prog in
573 # Accept absolute paths.
574 [\\/]* | [A-Za-z]:[\\/]*)
575 re_direlt='/[^/][^/]*/\.\./'
576 # Canonicalize the path of ld
577 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
578 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
579 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
580 done
581 test -z "$LD" && LD="$ac_prog"
582 ;;
583 "")
584 # If it fails, then pretend we aren't using GCC.
585 ac_prog=ld
586 ;;
587 *)
588 # If it is relative, then search for the first ld in PATH.
589 with_gnu_ld=unknown
590 ;;
591 esac
592elif test "$with_gnu_ld" = yes; then
593 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
594echo "configure:595: checking for GNU ld" >&5
595else
596 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
597echo "configure:598: checking for non-GNU ld" >&5
598fi
599if eval "test \"`echo '$''{'acl_cv_path_LD'+set}'`\" = set"; then
600 echo $ac_n "(cached) $ac_c" 1>&6
601else
602 if test -z "$LD"; then
603 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
604 for ac_dir in $PATH; do
605 test -z "$ac_dir" && ac_dir=.
606 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
607 acl_cv_path_LD="$ac_dir/$ac_prog"
608 # Check to see if the program is GNU ld. I'd rather use --version,
609 # but apparently some GNU ld's only accept -v.
610 # Break only if it was the GNU/non-GNU ld that we prefer.
611 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
612 test "$with_gnu_ld" != no && break
613 else
614 test "$with_gnu_ld" != yes && break
615 fi
616 fi
617 done
618 IFS="$ac_save_ifs"
619else
620 acl_cv_path_LD="$LD" # Let the user override the test with a path.
621fi
622fi
6eb95e99 623
56694dd9
ZW
624LD="$acl_cv_path_LD"
625if test -n "$LD"; then
626 echo "$ac_t""$LD" 1>&6
627else
628 echo "$ac_t""no" 1>&6
629fi
630test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
631echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
632echo "configure:633: checking if the linker ($LD) is GNU ld" >&5
633if eval "test \"`echo '$''{'acl_cv_prog_gnu_ld'+set}'`\" = set"; then
634 echo $ac_n "(cached) $ac_c" 1>&6
635else
636 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
637if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
638 acl_cv_prog_gnu_ld=yes
639else
640 acl_cv_prog_gnu_ld=no
641fi
642fi
6eb95e99 643
56694dd9
ZW
644echo "$ac_t""$acl_cv_prog_gnu_ld" 1>&6
645with_gnu_ld=$acl_cv_prog_gnu_ld
6eb95e99
ZW
646
647
648
649
650
651ac_aux_dir=
56694dd9 652for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
6eb95e99
ZW
653 if test -f $ac_dir/install-sh; then
654 ac_aux_dir=$ac_dir
655 ac_install_sh="$ac_aux_dir/install-sh -c"
656 break
657 elif test -f $ac_dir/install.sh; then
658 ac_aux_dir=$ac_dir
659 ac_install_sh="$ac_aux_dir/install.sh -c"
660 break
6eb95e99
ZW
661 fi
662done
663if test -z "$ac_aux_dir"; then
56694dd9
ZW
664 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
665fi
666ac_config_guess=$ac_aux_dir/config.guess
667ac_config_sub=$ac_aux_dir/config.sub
668ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
669
670echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
671echo "configure:672: checking how to run the C preprocessor" >&5
672# On Suns, sometimes $CPP names a directory.
673if test -n "$CPP" && test -d "$CPP"; then
674 CPP=
675fi
676if test -z "$CPP"; then
677if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
678 echo $ac_n "(cached) $ac_c" 1>&6
679else
680 # This must be in double quotes, not single quotes, because CPP may get
681 # substituted into the Makefile and "${CC-cc}" will confuse make.
682 CPP="${CC-cc} -E"
683 # On the NeXT, cc -E runs the code through the compiler's parser,
684 # not just through cpp.
685 cat > conftest.$ac_ext <<EOF
686#line 687 "configure"
687#include "confdefs.h"
688#include <assert.h>
689Syntax Error
690EOF
691ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
692{ (eval echo configure:693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
693ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
694if test -z "$ac_err"; then
695 :
696else
697 echo "$ac_err" >&5
698 echo "configure: failed program was:" >&5
699 cat conftest.$ac_ext >&5
700 rm -rf conftest*
701 CPP="${CC-cc} -E -traditional-cpp"
702 cat > conftest.$ac_ext <<EOF
703#line 704 "configure"
704#include "confdefs.h"
705#include <assert.h>
706Syntax Error
707EOF
708ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
709{ (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
710ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
711if test -z "$ac_err"; then
712 :
713else
714 echo "$ac_err" >&5
715 echo "configure: failed program was:" >&5
716 cat conftest.$ac_ext >&5
717 rm -rf conftest*
718 CPP="${CC-cc} -nologo -E"
719 cat > conftest.$ac_ext <<EOF
720#line 721 "configure"
721#include "confdefs.h"
722#include <assert.h>
723Syntax Error
724EOF
725ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
726{ (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
727ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
728if test -z "$ac_err"; then
729 :
730else
731 echo "$ac_err" >&5
732 echo "configure: failed program was:" >&5
733 cat conftest.$ac_ext >&5
734 rm -rf conftest*
735 CPP=/lib/cpp
736fi
737rm -f conftest*
738fi
739rm -f conftest*
740fi
741rm -f conftest*
742 ac_cv_prog_CPP="$CPP"
743fi
744 CPP="$ac_cv_prog_CPP"
745else
746 ac_cv_prog_CPP="$CPP"
747fi
748echo "$ac_t""$CPP" 1>&6
749
750
751 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
752echo "configure:753: checking for inttypes.h" >&5
753if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755else
756 cat > conftest.$ac_ext <<EOF
757#line 758 "configure"
758#include "confdefs.h"
759#include <sys/types.h>
760#include <inttypes.h>
761int main() {
762uintmax_t i = (uintmax_t) -1;
763; return 0; }
764EOF
765if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
766 rm -rf conftest*
767 jm_ac_cv_header_inttypes_h=yes
768else
769 echo "configure: failed program was:" >&5
770 cat conftest.$ac_ext >&5
771 rm -rf conftest*
772 jm_ac_cv_header_inttypes_h=no
773fi
774rm -f conftest*
775fi
776
777echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
778 if test $jm_ac_cv_header_inttypes_h = yes; then
779 cat >> confdefs.h <<EOF
780#define HAVE_INTTYPES_H_WITH_UINTMAX 1
781EOF
782
783 fi
784
785
786 echo $ac_n "checking for stdint.h""... $ac_c" 1>&6
787echo "configure:788: checking for stdint.h" >&5
788if eval "test \"`echo '$''{'jm_ac_cv_header_stdint_h'+set}'`\" = set"; then
789 echo $ac_n "(cached) $ac_c" 1>&6
790else
791 cat > conftest.$ac_ext <<EOF
792#line 793 "configure"
793#include "confdefs.h"
794#include <sys/types.h>
795#include <stdint.h>
796int main() {
797uintmax_t i = (uintmax_t) -1;
798; return 0; }
799EOF
800if { (eval echo configure:801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
801 rm -rf conftest*
802 jm_ac_cv_header_stdint_h=yes
803else
804 echo "configure: failed program was:" >&5
805 cat conftest.$ac_ext >&5
806 rm -rf conftest*
807 jm_ac_cv_header_stdint_h=no
808fi
809rm -f conftest*
810fi
811
812echo "$ac_t""$jm_ac_cv_header_stdint_h" 1>&6
813 if test $jm_ac_cv_header_stdint_h = yes; then
814 cat >> confdefs.h <<EOF
815#define HAVE_STDINT_H_WITH_UINTMAX 1
816EOF
817
818 fi
819
820
821 echo $ac_n "checking for unsigned long long""... $ac_c" 1>&6
822echo "configure:823: checking for unsigned long long" >&5
823if eval "test \"`echo '$''{'ac_cv_type_unsigned_long_long'+set}'`\" = set"; then
824 echo $ac_n "(cached) $ac_c" 1>&6
825else
826 cat > conftest.$ac_ext <<EOF
827#line 828 "configure"
828#include "confdefs.h"
829unsigned long long ull = 1; int i = 63;
830int main() {
831unsigned long long ullmax = (unsigned long long) -1;
832 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
833; return 0; }
834EOF
835if { (eval echo configure:836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
836 rm -rf conftest*
837 ac_cv_type_unsigned_long_long=yes
838else
839 echo "configure: failed program was:" >&5
840 cat conftest.$ac_ext >&5
841 rm -rf conftest*
842 ac_cv_type_unsigned_long_long=no
843fi
844rm -f conftest*
845fi
846
847echo "$ac_t""$ac_cv_type_unsigned_long_long" 1>&6
848 if test $ac_cv_type_unsigned_long_long = yes; then
849 cat >> confdefs.h <<\EOF
850#define HAVE_UNSIGNED_LONG_LONG 1
851EOF
852
853 fi
854
855
856 if test "X$prefix" = "XNONE"; then
857 acl_final_prefix="$ac_default_prefix"
858 else
859 acl_final_prefix="$prefix"
860 fi
861 if test "X$exec_prefix" = "XNONE"; then
862 acl_final_exec_prefix='${prefix}'
863 else
864 acl_final_exec_prefix="$exec_prefix"
865 fi
866 acl_save_prefix="$prefix"
867 prefix="$acl_final_prefix"
868 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
869 prefix="$acl_save_prefix"
870
871
872 echo $ac_n "checking for shared library run path origin""... $ac_c" 1>&6
873echo "configure:874: checking for shared library run path origin" >&5
874if eval "test \"`echo '$''{'acl_cv_rpath'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
876else
877
878 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
879 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
880 . ./conftest.sh
881 rm -f ./conftest.sh
882 acl_cv_rpath=done
883
6eb95e99 884fi
6eb95e99 885
56694dd9
ZW
886echo "$ac_t""$acl_cv_rpath" 1>&6
887 wl="$acl_cv_wl"
888 libext="$acl_cv_libext"
889 shlibext="$acl_cv_shlibext"
890 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
891 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
892 hardcode_direct="$acl_cv_hardcode_direct"
893 hardcode_minus_L="$acl_cv_hardcode_minus_L"
894 # Check whether --enable-rpath or --disable-rpath was given.
895if test "${enable_rpath+set}" = set; then
896 enableval="$enable_rpath"
897 :
898else
899 enable_rpath=yes
900fi
6eb95e99
ZW
901
902
56694dd9
ZW
903echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
904echo "configure:905: checking whether ${MAKE-make} sets \${MAKE}" >&5
905set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
906if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
907 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 908else
56694dd9 909 cat > conftestmake <<\EOF
6eb95e99 910all:
56694dd9
ZW
911 @echo 'ac_maketemp="${MAKE}"'
912EOF
6eb95e99 913# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
56694dd9 914eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
6eb95e99
ZW
915if test -n "$ac_maketemp"; then
916 eval ac_cv_prog_make_${ac_make}_set=yes
917else
918 eval ac_cv_prog_make_${ac_make}_set=no
919fi
56694dd9 920rm -f conftestmake
6eb95e99
ZW
921fi
922if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
56694dd9 923 echo "$ac_t""yes" 1>&6
6eb95e99
ZW
924 SET_MAKE=
925else
56694dd9 926 echo "$ac_t""no" 1>&6
6eb95e99
ZW
927 SET_MAKE="MAKE=${MAKE-make}"
928fi
929
930# Find a good install program. We prefer a C program (faster),
931# so one script is as good as another. But avoid the broken or
932# incompatible versions:
933# SysV /etc/install, /usr/sbin/install
934# SunOS /usr/etc/install
935# IRIX /sbin/install
936# AIX /bin/install
6eb95e99
ZW
937# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
938# AFS /usr/afsws/bin/install, which mishandles nonexistent args
939# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
940# ./install, which can be erroneously created by make from ./install.sh.
56694dd9
ZW
941echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
942echo "configure:943: checking for a BSD compatible install" >&5
6eb95e99 943if test -z "$INSTALL"; then
56694dd9
ZW
944if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
945 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 946else
56694dd9
ZW
947 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
948 for ac_dir in $PATH; do
949 # Account for people who put trailing slashes in PATH elements.
950 case "$ac_dir/" in
951 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
952 *)
953 # OSF1 and SCO ODT 3.0 have their own names for install.
954 # Don't use installbsd from OSF since it installs stuff as root
955 # by default.
956 for ac_prog in ginstall scoinst install; do
957 if test -f $ac_dir/$ac_prog; then
958 if test $ac_prog = install &&
959 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
960 # AIX install. It has an incompatible calling convention.
961 :
962 else
963 ac_cv_path_install="$ac_dir/$ac_prog -c"
964 break 2
965 fi
966 fi
6eb95e99 967 done
56694dd9
ZW
968 ;;
969 esac
970 done
971 IFS="$ac_save_IFS"
6eb95e99
ZW
972
973fi
974 if test "${ac_cv_path_install+set}" = set; then
56694dd9 975 INSTALL="$ac_cv_path_install"
6eb95e99
ZW
976 else
977 # As a last resort, use the slow shell script. We don't cache a
978 # path for INSTALL within a source directory, because that will
979 # break other packages using the cache if that directory is
980 # removed, or if the path is relative.
56694dd9 981 INSTALL="$ac_install_sh"
6eb95e99
ZW
982 fi
983fi
56694dd9 984echo "$ac_t""$INSTALL" 1>&6
6eb95e99
ZW
985
986# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
987# It thinks the first close brace ends the variable substitution.
988test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
989
56694dd9 990test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
6eb95e99
ZW
991
992test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
993
994
995 MKINSTALLDIRS=
996 if test -n "$ac_aux_dir"; then
997 case "$ac_aux_dir" in
998 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
999 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1000 esac
1001 fi
1002 if test -z "$MKINSTALLDIRS"; then
1003 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1004 fi
56694dd9 1005
6eb95e99
ZW
1006
1007
56694dd9
ZW
1008 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
1009echo "configure:1010: checking whether NLS is requested" >&5
6eb95e99
ZW
1010 # Check whether --enable-nls or --disable-nls was given.
1011if test "${enable_nls+set}" = set; then
1012 enableval="$enable_nls"
1013 USE_NLS=$enableval
1014else
1015 USE_NLS=yes
6eb95e99
ZW
1016fi
1017
56694dd9
ZW
1018 echo "$ac_t""$USE_NLS" 1>&6
1019
6eb95e99 1020
56694dd9
ZW
1021# Extract the first word of "gcc", so it can be a program name with args.
1022set dummy gcc; ac_word=$2
1023echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1024echo "configure:1025: checking for $ac_word" >&5
1025if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1026 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1027else
1028 if test -n "$CC"; then
1029 ac_cv_prog_CC="$CC" # Let the user override the test.
1030else
56694dd9
ZW
1031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1032 ac_dummy="$PATH"
1033 for ac_dir in $ac_dummy; do
1034 test -z "$ac_dir" && ac_dir=.
1035 if test -f $ac_dir/$ac_word; then
1036 ac_cv_prog_CC="gcc"
1037 break
1038 fi
1039 done
1040 IFS="$ac_save_ifs"
6eb95e99
ZW
1041fi
1042fi
56694dd9 1043CC="$ac_cv_prog_CC"
6eb95e99 1044if test -n "$CC"; then
56694dd9 1045 echo "$ac_t""$CC" 1>&6
6eb95e99 1046else
56694dd9 1047 echo "$ac_t""no" 1>&6
6eb95e99
ZW
1048fi
1049
6eb95e99
ZW
1050if test -z "$CC"; then
1051 # Extract the first word of "cc", so it can be a program name with args.
1052set dummy cc; ac_word=$2
56694dd9
ZW
1053echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1054echo "configure:1055: checking for $ac_word" >&5
1055if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1056 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1057else
1058 if test -n "$CC"; then
1059 ac_cv_prog_CC="$CC" # Let the user override the test.
1060else
56694dd9 1061 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6eb95e99 1062 ac_prog_rejected=no
56694dd9
ZW
1063 ac_dummy="$PATH"
1064 for ac_dir in $ac_dummy; do
1065 test -z "$ac_dir" && ac_dir=.
1066 if test -f $ac_dir/$ac_word; then
1067 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1068 ac_prog_rejected=yes
1069 continue
1070 fi
1071 ac_cv_prog_CC="cc"
1072 break
1073 fi
1074 done
1075 IFS="$ac_save_ifs"
6eb95e99
ZW
1076if test $ac_prog_rejected = yes; then
1077 # We found a bogon in the path, so make sure we never use it.
1078 set dummy $ac_cv_prog_CC
1079 shift
56694dd9 1080 if test $# -gt 0; then
6eb95e99
ZW
1081 # We chose a different compiler from the bogus one.
1082 # However, it has the same basename, so the bogon will be chosen
1083 # first if we set CC to just the basename; use the full file name.
1084 shift
56694dd9
ZW
1085 set dummy "$ac_dir/$ac_word" "$@"
1086 shift
1087 ac_cv_prog_CC="$@"
6eb95e99
ZW
1088 fi
1089fi
1090fi
1091fi
56694dd9 1092CC="$ac_cv_prog_CC"
6eb95e99 1093if test -n "$CC"; then
56694dd9 1094 echo "$ac_t""$CC" 1>&6
6eb95e99 1095else
56694dd9 1096 echo "$ac_t""no" 1>&6
6eb95e99
ZW
1097fi
1098
56694dd9
ZW
1099 if test -z "$CC"; then
1100 case "`uname -s`" in
1101 *win32* | *WIN32*)
1102 # Extract the first word of "cl", so it can be a program name with args.
1103set dummy cl; ac_word=$2
1104echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105echo "configure:1106: checking for $ac_word" >&5
1106if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1107 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1108else
1109 if test -n "$CC"; then
1110 ac_cv_prog_CC="$CC" # Let the user override the test.
1111else
56694dd9
ZW
1112 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1113 ac_dummy="$PATH"
1114 for ac_dir in $ac_dummy; do
1115 test -z "$ac_dir" && ac_dir=.
1116 if test -f $ac_dir/$ac_word; then
1117 ac_cv_prog_CC="cl"
1118 break
6eb95e99 1119 fi
56694dd9
ZW
1120 done
1121 IFS="$ac_save_ifs"
6eb95e99 1122fi
6eb95e99 1123fi
56694dd9
ZW
1124CC="$ac_cv_prog_CC"
1125if test -n "$CC"; then
1126 echo "$ac_t""$CC" 1>&6
6eb95e99 1127else
56694dd9 1128 echo "$ac_t""no" 1>&6
6eb95e99 1129fi
56694dd9
ZW
1130 ;;
1131 esac
1132 fi
1133 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
6eb95e99
ZW
1134fi
1135
56694dd9
ZW
1136echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1137echo "configure:1138: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
6eb95e99
ZW
1138
1139ac_ext=c
56694dd9 1140# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6eb95e99 1141ac_cpp='$CPP $CPPFLAGS'
56694dd9
ZW
1142ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1143ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1144cross_compiling=$ac_cv_prog_cc_cross
1145
1146cat > conftest.$ac_ext << EOF
1147
1148#line 1149 "configure"
1149#include "confdefs.h"
1150
1151main(){return(0);}
1152EOF
1153if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1154 ac_cv_prog_cc_works=yes
1155 # If we can't run a trivial program, we are probably using a cross compiler.
1156 if (./conftest; exit) 2>/dev/null; then
1157 ac_cv_prog_cc_cross=no
6eb95e99 1158 else
56694dd9 1159 ac_cv_prog_cc_cross=yes
6eb95e99
ZW
1160 fi
1161else
56694dd9
ZW
1162 echo "configure: failed program was:" >&5
1163 cat conftest.$ac_ext >&5
1164 ac_cv_prog_cc_works=no
6eb95e99 1165fi
56694dd9
ZW
1166rm -fr conftest*
1167ac_ext=c
1168# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1169ac_cpp='$CPP $CPPFLAGS'
1170ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1171ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1172cross_compiling=$ac_cv_prog_cc_cross
6eb95e99 1173
56694dd9
ZW
1174echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1175if test $ac_cv_prog_cc_works = no; then
1176 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
6eb95e99 1177fi
56694dd9
ZW
1178echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1179echo "configure:1180: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1180echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1181cross_compiling=$ac_cv_prog_cc_cross
6eb95e99 1182
56694dd9
ZW
1183echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1184echo "configure:1185: checking whether we are using GNU C" >&5
1185if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
1187else
1188 cat > conftest.c <<EOF
1189#ifdef __GNUC__
1190 yes;
1191#endif
1192EOF
1193if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1194 ac_cv_prog_gcc=yes
1195else
1196 ac_cv_prog_gcc=no
1197fi
6eb95e99
ZW
1198fi
1199
56694dd9 1200echo "$ac_t""$ac_cv_prog_gcc" 1>&6
6eb95e99 1201
56694dd9
ZW
1202if test $ac_cv_prog_gcc = yes; then
1203 GCC=yes
1204else
1205 GCC=
6eb95e99 1206fi
56694dd9
ZW
1207
1208ac_test_CFLAGS="${CFLAGS+set}"
1209ac_save_CFLAGS="$CFLAGS"
1210CFLAGS=
1211echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1212echo "configure:1213: checking whether ${CC-cc} accepts -g" >&5
1213if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1214 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1215else
56694dd9
ZW
1216 echo 'void f(){}' > conftest.c
1217if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1218 ac_cv_prog_cc_g=yes
1219else
1220 ac_cv_prog_cc_g=no
6eb95e99 1221fi
56694dd9
ZW
1222rm -f conftest*
1223
1224fi
1225
1226echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1227if test "$ac_test_CFLAGS" = set; then
1228 CFLAGS="$ac_save_CFLAGS"
1229elif test $ac_cv_prog_cc_g = yes; then
1230 if test "$GCC" = yes; then
1231 CFLAGS="-g -O2"
6eb95e99 1232 else
56694dd9 1233 CFLAGS="-g"
6eb95e99
ZW
1234 fi
1235else
56694dd9
ZW
1236 if test "$GCC" = yes; then
1237 CFLAGS="-O2"
6eb95e99 1238 else
56694dd9 1239 CFLAGS=
6eb95e99 1240 fi
6eb95e99 1241fi
6eb95e99 1242
56694dd9
ZW
1243
1244# Make sure we can run config.sub.
1245if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1246else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
6eb95e99 1247fi
6eb95e99 1248
56694dd9
ZW
1249echo $ac_n "checking host system type""... $ac_c" 1>&6
1250echo "configure:1251: checking host system type" >&5
1251
1252host_alias=$host
1253case "$host_alias" in
1254NONE)
1255 case $nonopt in
1256 NONE)
1257 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1258 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1259 fi ;;
1260 *) host_alias=$nonopt ;;
1261 esac ;;
1262esac
1263
1264host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1265host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1266host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1267host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1268echo "$ac_t""$host" 1>&6
1269
1270# Extract the first word of "ranlib", so it can be a program name with args.
1271set dummy ranlib; ac_word=$2
1272echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1273echo "configure:1274: checking for $ac_word" >&5
1274if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1276else
1277 if test -n "$RANLIB"; then
1278 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1279else
1280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1281 ac_dummy="$PATH"
1282 for ac_dir in $ac_dummy; do
1283 test -z "$ac_dir" && ac_dir=.
1284 if test -f $ac_dir/$ac_word; then
1285 ac_cv_prog_RANLIB="ranlib"
1286 break
1287 fi
1288 done
1289 IFS="$ac_save_ifs"
1290 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1291fi
1292fi
1293RANLIB="$ac_cv_prog_RANLIB"
1294if test -n "$RANLIB"; then
1295 echo "$ac_t""$RANLIB" 1>&6
6eb95e99 1296else
56694dd9 1297 echo "$ac_t""no" 1>&6
6eb95e99
ZW
1298fi
1299
6eb95e99 1300
56694dd9
ZW
1301 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1302echo "configure:1303: checking for strerror in -lcposix" >&5
1303ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
1304if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1305 echo $ac_n "(cached) $ac_c" 1>&6
1306else
1307 ac_save_LIBS="$LIBS"
1308LIBS="-lcposix $LIBS"
1309cat > conftest.$ac_ext <<EOF
1310#line 1311 "configure"
1311#include "confdefs.h"
1312/* Override any gcc2 internal prototype to avoid an error. */
1313/* We use char because int might match the return type of a gcc2
1314 builtin and then its argument prototype would still apply. */
1315char strerror();
1316
1317int main() {
1318strerror()
1319; return 0; }
1320EOF
1321if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1322 rm -rf conftest*
1323 eval "ac_cv_lib_$ac_lib_var=yes"
1324else
1325 echo "configure: failed program was:" >&5
1326 cat conftest.$ac_ext >&5
1327 rm -rf conftest*
1328 eval "ac_cv_lib_$ac_lib_var=no"
1329fi
1330rm -f conftest*
1331LIBS="$ac_save_LIBS"
6eb95e99 1332
56694dd9
ZW
1333fi
1334if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1335 echo "$ac_t""yes" 1>&6
1336 LIBS="$LIBS -lcposix"
6eb95e99 1337else
56694dd9 1338 echo "$ac_t""no" 1>&6
6eb95e99 1339fi
6eb95e99 1340
56694dd9 1341
6eb95e99 1342
56694dd9
ZW
1343echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1344echo "configure:1345: checking for ANSI C header files" >&5
1345if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1346 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1347else
56694dd9
ZW
1348 cat > conftest.$ac_ext <<EOF
1349#line 1350 "configure"
1350#include "confdefs.h"
6eb95e99
ZW
1351#include <stdlib.h>
1352#include <stdarg.h>
1353#include <string.h>
1354#include <float.h>
56694dd9
ZW
1355EOF
1356ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1357{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1358ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1359if test -z "$ac_err"; then
1360 rm -rf conftest*
6eb95e99
ZW
1361 ac_cv_header_stdc=yes
1362else
56694dd9
ZW
1363 echo "$ac_err" >&5
1364 echo "configure: failed program was:" >&5
1365 cat conftest.$ac_ext >&5
1366 rm -rf conftest*
1367 ac_cv_header_stdc=no
6eb95e99 1368fi
56694dd9 1369rm -f conftest*
6eb95e99
ZW
1370
1371if test $ac_cv_header_stdc = yes; then
1372 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
56694dd9
ZW
1373cat > conftest.$ac_ext <<EOF
1374#line 1375 "configure"
1375#include "confdefs.h"
6eb95e99 1376#include <string.h>
56694dd9 1377EOF
6eb95e99 1378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56694dd9 1379 egrep "memchr" >/dev/null 2>&1; then
6eb95e99
ZW
1380 :
1381else
56694dd9 1382 rm -rf conftest*
6eb95e99
ZW
1383 ac_cv_header_stdc=no
1384fi
1385rm -f conftest*
1386
1387fi
1388
1389if test $ac_cv_header_stdc = yes; then
1390 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
56694dd9
ZW
1391cat > conftest.$ac_ext <<EOF
1392#line 1393 "configure"
1393#include "confdefs.h"
6eb95e99 1394#include <stdlib.h>
56694dd9 1395EOF
6eb95e99 1396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56694dd9 1397 egrep "free" >/dev/null 2>&1; then
6eb95e99
ZW
1398 :
1399else
56694dd9 1400 rm -rf conftest*
6eb95e99
ZW
1401 ac_cv_header_stdc=no
1402fi
1403rm -f conftest*
1404
1405fi
1406
1407if test $ac_cv_header_stdc = yes; then
1408 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
56694dd9 1409if test "$cross_compiling" = yes; then
6eb95e99
ZW
1410 :
1411else
56694dd9
ZW
1412 cat > conftest.$ac_ext <<EOF
1413#line 1414 "configure"
1414#include "confdefs.h"
6eb95e99 1415#include <ctype.h>
56694dd9
ZW
1416#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1417#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6eb95e99 1418#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
56694dd9
ZW
1419int main () { int i; for (i = 0; i < 256; i++)
1420if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1421exit (0); }
1422
1423EOF
1424if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1425then
6eb95e99
ZW
1426 :
1427else
56694dd9
ZW
1428 echo "configure: failed program was:" >&5
1429 cat conftest.$ac_ext >&5
1430 rm -fr conftest*
1431 ac_cv_header_stdc=no
6eb95e99 1432fi
56694dd9 1433rm -fr conftest*
6eb95e99 1434fi
56694dd9 1435
6eb95e99
ZW
1436fi
1437fi
6eb95e99 1438
56694dd9
ZW
1439echo "$ac_t""$ac_cv_header_stdc" 1>&6
1440if test $ac_cv_header_stdc = yes; then
1441 cat >> confdefs.h <<\EOF
6eb95e99 1442#define STDC_HEADERS 1
56694dd9
ZW
1443EOF
1444
1445fi
1446
1447echo $ac_n "checking for working const""... $ac_c" 1>&6
1448echo "configure:1449: checking for working const" >&5
1449if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1450 echo $ac_n "(cached) $ac_c" 1>&6
1451else
1452 cat > conftest.$ac_ext <<EOF
1453#line 1454 "configure"
1454#include "confdefs.h"
1455
1456int main() {
1457
1458/* Ultrix mips cc rejects this. */
1459typedef int charset[2]; const charset x;
1460/* SunOS 4.1.1 cc rejects this. */
1461char const *const *ccp;
1462char **p;
1463/* NEC SVR4.0.2 mips cc rejects this. */
1464struct point {int x, y;};
1465static struct point const zero = {0,0};
1466/* AIX XL C 1.02.0.0 rejects this.
1467 It does not let you subtract one const X* pointer from another in an arm
1468 of an if-expression whose if-part is not a constant expression */
1469const char *g = "string";
1470ccp = &g + (g ? g-g : 0);
1471/* HPUX 7.0 cc rejects these. */
1472++ccp;
1473p = (char**) ccp;
1474ccp = (char const *const *) p;
1475{ /* SCO 3.2v4 cc rejects this. */
1476 char *t;
1477 char const *s = 0 ? (char *) 0 : (char const *) 0;
1478
1479 *t++ = 0;
1480}
1481{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1482 int x[] = {25, 17};
1483 const int *foo = &x[0];
1484 ++foo;
1485}
1486{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1487 typedef const int *iptr;
1488 iptr p = 0;
1489 ++p;
6eb95e99 1490}
56694dd9
ZW
1491{ /* AIX XL C 1.02.0.0 rejects this saying
1492 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1493 struct s { int j; const int *ap[3]; };
1494 struct s *b; b->j = 5;
1495}
1496{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1497 const int foo = 10;
1498}
1499
1500; return 0; }
1501EOF
1502if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1503 rm -rf conftest*
6eb95e99
ZW
1504 ac_cv_c_const=yes
1505else
56694dd9
ZW
1506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1508 rm -rf conftest*
1509 ac_cv_c_const=no
6eb95e99 1510fi
56694dd9 1511rm -f conftest*
6eb95e99 1512fi
6eb95e99 1513
56694dd9
ZW
1514echo "$ac_t""$ac_cv_c_const" 1>&6
1515if test $ac_cv_c_const = no; then
1516 cat >> confdefs.h <<\EOF
1517#define const
1518EOF
6eb95e99
ZW
1519
1520fi
1521
56694dd9
ZW
1522echo $ac_n "checking for inline""... $ac_c" 1>&6
1523echo "configure:1524: checking for inline" >&5
1524if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1526else
1527 ac_cv_c_inline=no
1528for ac_kw in inline __inline__ __inline; do
56694dd9
ZW
1529 cat > conftest.$ac_ext <<EOF
1530#line 1531 "configure"
1531#include "confdefs.h"
1532
1533int main() {
1534} $ac_kw foo() {
1535; return 0; }
1536EOF
1537if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1538 rm -rf conftest*
6eb95e99
ZW
1539 ac_cv_c_inline=$ac_kw; break
1540else
56694dd9
ZW
1541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
6eb95e99 1543fi
56694dd9 1544rm -f conftest*
6eb95e99
ZW
1545done
1546
1547fi
56694dd9
ZW
1548
1549echo "$ac_t""$ac_cv_c_inline" 1>&6
1550case "$ac_cv_c_inline" in
6eb95e99 1551 inline | yes) ;;
56694dd9
ZW
1552 no) cat >> confdefs.h <<\EOF
1553#define inline
1554EOF
6eb95e99 1555 ;;
56694dd9 1556 *) cat >> confdefs.h <<EOF
6eb95e99 1557#define inline $ac_cv_c_inline
56694dd9 1558EOF
6eb95e99
ZW
1559 ;;
1560esac
1561
56694dd9
ZW
1562echo $ac_n "checking for off_t""... $ac_c" 1>&6
1563echo "configure:1564: checking for off_t" >&5
1564if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1566else
56694dd9
ZW
1567 cat > conftest.$ac_ext <<EOF
1568#line 1569 "configure"
1569#include "confdefs.h"
1570#include <sys/types.h>
1571#if STDC_HEADERS
1572#include <stdlib.h>
1573#include <stddef.h>
1574#endif
1575EOF
1576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1577 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1578 rm -rf conftest*
6eb95e99
ZW
1579 ac_cv_type_off_t=yes
1580else
56694dd9
ZW
1581 rm -rf conftest*
1582 ac_cv_type_off_t=no
6eb95e99 1583fi
56694dd9 1584rm -f conftest*
6eb95e99 1585
56694dd9
ZW
1586fi
1587echo "$ac_t""$ac_cv_type_off_t" 1>&6
1588if test $ac_cv_type_off_t = no; then
1589 cat >> confdefs.h <<\EOF
6eb95e99 1590#define off_t long
56694dd9 1591EOF
6eb95e99
ZW
1592
1593fi
1594
56694dd9
ZW
1595echo $ac_n "checking for size_t""... $ac_c" 1>&6
1596echo "configure:1597: checking for size_t" >&5
1597if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1598 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1599else
56694dd9
ZW
1600 cat > conftest.$ac_ext <<EOF
1601#line 1602 "configure"
1602#include "confdefs.h"
1603#include <sys/types.h>
1604#if STDC_HEADERS
1605#include <stdlib.h>
1606#include <stddef.h>
1607#endif
1608EOF
1609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1610 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1611 rm -rf conftest*
6eb95e99
ZW
1612 ac_cv_type_size_t=yes
1613else
56694dd9
ZW
1614 rm -rf conftest*
1615 ac_cv_type_size_t=no
6eb95e99 1616fi
56694dd9 1617rm -f conftest*
6eb95e99 1618
56694dd9
ZW
1619fi
1620echo "$ac_t""$ac_cv_type_size_t" 1>&6
1621if test $ac_cv_type_size_t = no; then
1622 cat >> confdefs.h <<\EOF
6eb95e99 1623#define size_t unsigned
56694dd9 1624EOF
6eb95e99
ZW
1625
1626fi
1627
1628# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1629# for constant arguments. Useless!
56694dd9
ZW
1630echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1631echo "configure:1632: checking for working alloca.h" >&5
1632if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634else
1635 cat > conftest.$ac_ext <<EOF
1636#line 1637 "configure"
1637#include "confdefs.h"
6eb95e99 1638#include <alloca.h>
56694dd9
ZW
1639int main() {
1640char *p = alloca(2 * sizeof(int));
1641; return 0; }
1642EOF
1643if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1644 rm -rf conftest*
1645 ac_cv_header_alloca_h=yes
1646else
1647 echo "configure: failed program was:" >&5
1648 cat conftest.$ac_ext >&5
1649 rm -rf conftest*
1650 ac_cv_header_alloca_h=no
1651fi
1652rm -f conftest*
1653fi
1654
1655echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1656if test $ac_cv_header_alloca_h = yes; then
1657 cat >> confdefs.h <<\EOF
6eb95e99 1658#define HAVE_ALLOCA_H 1
56694dd9 1659EOF
6eb95e99
ZW
1660
1661fi
1662
56694dd9
ZW
1663echo $ac_n "checking for alloca""... $ac_c" 1>&6
1664echo "configure:1665: checking for alloca" >&5
1665if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1666 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1667else
56694dd9
ZW
1668 cat > conftest.$ac_ext <<EOF
1669#line 1670 "configure"
1670#include "confdefs.h"
1671
6eb95e99
ZW
1672#ifdef __GNUC__
1673# define alloca __builtin_alloca
1674#else
1675# ifdef _MSC_VER
1676# include <malloc.h>
1677# define alloca _alloca
1678# else
1679# if HAVE_ALLOCA_H
1680# include <alloca.h>
1681# else
1682# ifdef _AIX
1683 #pragma alloca
1684# else
1685# ifndef alloca /* predefined by HP cc +Olibcalls */
1686char *alloca ();
1687# endif
1688# endif
1689# endif
1690# endif
1691#endif
1692
56694dd9
ZW
1693int main() {
1694char *p = (char *) alloca(1);
1695; return 0; }
1696EOF
1697if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1698 rm -rf conftest*
6eb95e99
ZW
1699 ac_cv_func_alloca_works=yes
1700else
56694dd9
ZW
1701 echo "configure: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
1703 rm -rf conftest*
1704 ac_cv_func_alloca_works=no
6eb95e99 1705fi
56694dd9 1706rm -f conftest*
6eb95e99 1707fi
6eb95e99 1708
56694dd9 1709echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6eb95e99 1710if test $ac_cv_func_alloca_works = yes; then
56694dd9 1711 cat >> confdefs.h <<\EOF
6eb95e99 1712#define HAVE_ALLOCA 1
56694dd9 1713EOF
6eb95e99 1714
56694dd9 1715fi
6eb95e99 1716
56694dd9
ZW
1717if test $ac_cv_func_alloca_works = no; then
1718 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1719 # that cause trouble. Some versions do not even contain alloca or
1720 # contain a buggy version. If you still want to use their alloca,
1721 # use ar to extract alloca.o from them instead of compiling alloca.c.
1722 ALLOCA=alloca.${ac_objext}
1723 cat >> confdefs.h <<\EOF
6eb95e99 1724#define C_ALLOCA 1
56694dd9 1725EOF
6eb95e99
ZW
1726
1727
56694dd9
ZW
1728echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1729echo "configure:1730: checking whether alloca needs Cray hooks" >&5
1730if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 1732else
56694dd9
ZW
1733 cat > conftest.$ac_ext <<EOF
1734#line 1735 "configure"
1735#include "confdefs.h"
6eb95e99
ZW
1736#if defined(CRAY) && ! defined(CRAY2)
1737webecray
1738#else
1739wenotbecray
1740#endif
1741
56694dd9 1742EOF
6eb95e99 1743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56694dd9
ZW
1744 egrep "webecray" >/dev/null 2>&1; then
1745 rm -rf conftest*
6eb95e99
ZW
1746 ac_cv_os_cray=yes
1747else
56694dd9 1748 rm -rf conftest*
6eb95e99
ZW
1749 ac_cv_os_cray=no
1750fi
1751rm -f conftest*
1752
1753fi
56694dd9
ZW
1754
1755echo "$ac_t""$ac_cv_os_cray" 1>&6
6eb95e99 1756if test $ac_cv_os_cray = yes; then
56694dd9
ZW
1757for ac_func in _getb67 GETB67 getb67; do
1758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1759echo "configure:1760: checking for $ac_func" >&5
1760if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1761 echo $ac_n "(cached) $ac_c" 1>&6
1762else
1763 cat > conftest.$ac_ext <<EOF
1764#line 1765 "configure"
1765#include "confdefs.h"
6eb95e99 1766/* System header to define __stub macros and hopefully few prototypes,
56694dd9
ZW
1767 which can conflict with char $ac_func(); below. */
1768#include <assert.h>
6eb95e99 1769/* Override any gcc2 internal prototype to avoid an error. */
6eb95e99 1770/* We use char because int might match the return type of a gcc2
56694dd9
ZW
1771 builtin and then its argument prototype would still apply. */
1772char $ac_func();
1773
1774int main() {
1775
6eb95e99
ZW
1776/* The GNU C library defines this for functions which it implements
1777 to always fail with ENOSYS. Some functions are actually named
1778 something starting with __ and the normal name is an alias. */
1779#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1780choke me
1781#else
56694dd9 1782$ac_func();
6eb95e99
ZW
1783#endif
1784
56694dd9
ZW
1785; return 0; }
1786EOF
1787if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1788 rm -rf conftest*
1789 eval "ac_cv_func_$ac_func=yes"
1790else
1791 echo "configure: failed program was:" >&5
1792 cat conftest.$ac_ext >&5
1793 rm -rf conftest*
1794 eval "ac_cv_func_$ac_func=no"
1795fi
1796rm -f conftest*
1797fi
1798
1799if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1800 echo "$ac_t""yes" 1>&6
1801 cat >> confdefs.h <<EOF
6eb95e99 1802#define CRAY_STACKSEG_END $ac_func
56694dd9 1803EOF
6eb95e99 1804
56694dd9
ZW
1805 break
1806else
1807 echo "$ac_t""no" 1>&6
6eb95e99
ZW
1808fi
1809
56694dd9 1810done
6eb95e99
ZW
1811fi
1812
56694dd9
ZW
1813echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1814echo "configure:1815: checking stack direction for C alloca" >&5
1815if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1817else
1818 if test "$cross_compiling" = yes; then
1819 ac_cv_c_stack_direction=0
1820else
56694dd9
ZW
1821 cat > conftest.$ac_ext <<EOF
1822#line 1823 "configure"
1823#include "confdefs.h"
6eb95e99
ZW
1824find_stack_direction ()
1825{
1826 static char *addr = 0;
1827 auto char dummy;
1828 if (addr == 0)
1829 {
1830 addr = &dummy;
1831 return find_stack_direction ();
1832 }
1833 else
1834 return (&dummy > addr) ? 1 : -1;
1835}
6eb95e99
ZW
1836main ()
1837{
56694dd9 1838 exit (find_stack_direction() < 0);
6eb95e99 1839}
56694dd9
ZW
1840EOF
1841if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1842then
6eb95e99
ZW
1843 ac_cv_c_stack_direction=1
1844else
56694dd9
ZW
1845 echo "configure: failed program was:" >&5
1846 cat conftest.$ac_ext >&5
1847 rm -fr conftest*
1848 ac_cv_c_stack_direction=-1
6eb95e99 1849fi
56694dd9 1850rm -fr conftest*
6eb95e99 1851fi
56694dd9 1852
6eb95e99 1853fi
6eb95e99 1854
56694dd9
ZW
1855echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1856cat >> confdefs.h <<EOF
6eb95e99 1857#define STACK_DIRECTION $ac_cv_c_stack_direction
56694dd9 1858EOF
6eb95e99
ZW
1859
1860fi
1861
56694dd9 1862for ac_hdr in unistd.h
6eb95e99 1863do
56694dd9
ZW
1864ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1865echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1866echo "configure:1867: checking for $ac_hdr" >&5
1867if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869else
1870 cat > conftest.$ac_ext <<EOF
1871#line 1872 "configure"
1872#include "confdefs.h"
1873#include <$ac_hdr>
1874EOF
1875ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1876{ (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1877ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1878if test -z "$ac_err"; then
1879 rm -rf conftest*
1880 eval "ac_cv_header_$ac_safe=yes"
1881else
1882 echo "$ac_err" >&5
1883 echo "configure: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 rm -rf conftest*
1886 eval "ac_cv_header_$ac_safe=no"
6eb95e99 1887fi
56694dd9 1888rm -f conftest*
6eb95e99 1889fi
56694dd9
ZW
1890if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1891 echo "$ac_t""yes" 1>&6
1892 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1893 cat >> confdefs.h <<EOF
1894#define $ac_tr_hdr 1
1895EOF
1896
1897else
1898 echo "$ac_t""no" 1>&6
6eb95e99 1899fi
6eb95e99
ZW
1900done
1901
6eb95e99
ZW
1902for ac_func in getpagesize
1903do
56694dd9
ZW
1904echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1905echo "configure:1906: checking for $ac_func" >&5
1906if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1908else
1909 cat > conftest.$ac_ext <<EOF
1910#line 1911 "configure"
1911#include "confdefs.h"
1912/* System header to define __stub macros and hopefully few prototypes,
1913 which can conflict with char $ac_func(); below. */
1914#include <assert.h>
1915/* Override any gcc2 internal prototype to avoid an error. */
6eb95e99 1916/* We use char because int might match the return type of a gcc2
56694dd9
ZW
1917 builtin and then its argument prototype would still apply. */
1918char $ac_func();
1919
1920int main() {
1921
6eb95e99
ZW
1922/* The GNU C library defines this for functions which it implements
1923 to always fail with ENOSYS. Some functions are actually named
1924 something starting with __ and the normal name is an alias. */
1925#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1926choke me
1927#else
56694dd9 1928$ac_func();
6eb95e99
ZW
1929#endif
1930
56694dd9
ZW
1931; return 0; }
1932EOF
1933if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1934 rm -rf conftest*
1935 eval "ac_cv_func_$ac_func=yes"
1936else
1937 echo "configure: failed program was:" >&5
1938 cat conftest.$ac_ext >&5
1939 rm -rf conftest*
1940 eval "ac_cv_func_$ac_func=no"
1941fi
1942rm -f conftest*
1943fi
6eb95e99 1944
56694dd9
ZW
1945if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1946 echo "$ac_t""yes" 1>&6
1947 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1948 cat >> confdefs.h <<EOF
1949#define $ac_tr_func 1
1950EOF
1951
1952else
1953 echo "$ac_t""no" 1>&6
6eb95e99
ZW
1954fi
1955done
1956
56694dd9
ZW
1957echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1958echo "configure:1959: checking for working mmap" >&5
1959if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1960 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
1961else
1962 if test "$cross_compiling" = yes; then
1963 ac_cv_func_mmap_fixed_mapped=no
1964else
56694dd9
ZW
1965 cat > conftest.$ac_ext <<EOF
1966#line 1967 "configure"
1967#include "confdefs.h"
6eb95e99
ZW
1968
1969/* Thanks to Mike Haertel and Jim Avera for this test.
1970 Here is a matrix of mmap possibilities:
1971 mmap private not fixed
1972 mmap private fixed at somewhere currently unmapped
1973 mmap private fixed at somewhere already mapped
1974 mmap shared not fixed
1975 mmap shared fixed at somewhere currently unmapped
1976 mmap shared fixed at somewhere already mapped
1977 For private mappings, we should verify that changes cannot be read()
1978 back from the file, nor mmap's back from the file at a different
1979 address. (There have been systems where private was not correctly
1980 implemented like the infamous i386 svr4.0, and systems where the
56694dd9 1981 VM page cache was not coherent with the filesystem buffer cache
6eb95e99
ZW
1982 like early versions of FreeBSD and possibly contemporary NetBSD.)
1983 For shared mappings, we should conversely verify that changes get
56694dd9 1984 propogated back to all the places they're supposed to be.
6eb95e99
ZW
1985
1986 Grep wants private fixed already mapped.
1987 The main things grep needs to know about mmap are:
1988 * does it exist and is it safe to write into the mmap'd area
1989 * how to use it (BSD variants) */
56694dd9 1990#include <sys/types.h>
6eb95e99
ZW
1991#include <fcntl.h>
1992#include <sys/mman.h>
1993
6eb95e99 1994/* This mess was copied from the GNU getpagesize.h. */
56694dd9
ZW
1995#ifndef HAVE_GETPAGESIZE
1996# ifdef HAVE_UNISTD_H
1997# include <unistd.h>
1998# endif
1999
6eb95e99 2000/* Assume that all systems that can run configure have sys/param.h. */
56694dd9 2001# ifndef HAVE_SYS_PARAM_H
6eb95e99
ZW
2002# define HAVE_SYS_PARAM_H 1
2003# endif
2004
2005# ifdef _SC_PAGESIZE
2006# define getpagesize() sysconf(_SC_PAGESIZE)
2007# else /* no _SC_PAGESIZE */
56694dd9 2008# ifdef HAVE_SYS_PARAM_H
6eb95e99
ZW
2009# include <sys/param.h>
2010# ifdef EXEC_PAGESIZE
2011# define getpagesize() EXEC_PAGESIZE
2012# else /* no EXEC_PAGESIZE */
2013# ifdef NBPG
2014# define getpagesize() NBPG * CLSIZE
2015# ifndef CLSIZE
2016# define CLSIZE 1
2017# endif /* no CLSIZE */
2018# else /* no NBPG */
2019# ifdef NBPC
2020# define getpagesize() NBPC
2021# else /* no NBPC */
2022# ifdef PAGESIZE
2023# define getpagesize() PAGESIZE
2024# endif /* PAGESIZE */
2025# endif /* no NBPC */
2026# endif /* no NBPG */
2027# endif /* no EXEC_PAGESIZE */
2028# else /* no HAVE_SYS_PARAM_H */
2029# define getpagesize() 8192 /* punt totally */
2030# endif /* no HAVE_SYS_PARAM_H */
2031# endif /* no _SC_PAGESIZE */
2032
2033#endif /* no HAVE_GETPAGESIZE */
2034
56694dd9
ZW
2035#ifdef __cplusplus
2036extern "C" { void *malloc(unsigned); }
2037#else
2038char *malloc();
2039#endif
2040
6eb95e99 2041int
56694dd9 2042main()
6eb95e99 2043{
56694dd9
ZW
2044 char *data, *data2, *data3;
2045 int i, pagesize;
2046 int fd;
2047
2048 pagesize = getpagesize();
2049
2050 /*
2051 * First, make a file with some known garbage in it.
2052 */
2053 data = malloc(pagesize);
2054 if (!data)
2055 exit(1);
2056 for (i = 0; i < pagesize; ++i)
2057 *(data + i) = rand();
2058 umask(0);
2059 fd = creat("conftestmmap", 0600);
2060 if (fd < 0)
2061 exit(1);
2062 if (write(fd, data, pagesize) != pagesize)
2063 exit(1);
2064 close(fd);
2065
2066 /*
2067 * Next, try to mmap the file at a fixed address which
2068 * already has something else allocated at it. If we can,
2069 * also make sure that we see the same garbage.
2070 */
2071 fd = open("conftestmmap", O_RDWR);
2072 if (fd < 0)
2073 exit(1);
2074 data2 = malloc(2 * pagesize);
2075 if (!data2)
2076 exit(1);
2077 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2078 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2079 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2080 exit(1);
2081 for (i = 0; i < pagesize; ++i)
2082 if (*(data + i) != *(data2 + i))
2083 exit(1);
2084
2085 /*
2086 * Finally, make sure that changes to the mapped area
2087 * do not percolate back to the file as seen by read().
2088 * (This is a bug on some variants of i386 svr4.0.)
2089 */
2090 for (i = 0; i < pagesize; ++i)
2091 *(data2 + i) = *(data2 + i) + 1;
2092 data3 = malloc(pagesize);
2093 if (!data3)
2094 exit(1);
2095 if (read(fd, data3, pagesize) != pagesize)
2096 exit(1);
2097 for (i = 0; i < pagesize; ++i)
2098 if (*(data + i) != *(data3 + i))
2099 exit(1);
2100 close(fd);
2101 unlink("conftestmmap");
2102 exit(0);
6eb95e99 2103}
56694dd9
ZW
2104
2105EOF
2106if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2107then
6eb95e99
ZW
2108 ac_cv_func_mmap_fixed_mapped=yes
2109else
56694dd9
ZW
2110 echo "configure: failed program was:" >&5
2111 cat conftest.$ac_ext >&5
2112 rm -fr conftest*
2113 ac_cv_func_mmap_fixed_mapped=no
6eb95e99 2114fi
56694dd9 2115rm -fr conftest*
6eb95e99 2116fi
56694dd9 2117
6eb95e99 2118fi
6eb95e99 2119
56694dd9
ZW
2120echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2121if test $ac_cv_func_mmap_fixed_mapped = yes; then
2122 cat >> confdefs.h <<\EOF
6eb95e99 2123#define HAVE_MMAP 1
56694dd9 2124EOF
6eb95e99
ZW
2125
2126fi
6eb95e99
ZW
2127
2128
56694dd9
ZW
2129 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2130echo "configure:2131: checking whether we are using the GNU C Library 2.1 or newer" >&5
2131if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
2132 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 2133else
56694dd9
ZW
2134 cat > conftest.$ac_ext <<EOF
2135#line 2136 "configure"
2136#include "confdefs.h"
6eb95e99
ZW
2137
2138#include <features.h>
2139#ifdef __GNU_LIBRARY__
2140 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2141 Lucky GNU user
2142 #endif
2143#endif
56694dd9
ZW
2144
2145EOF
6eb95e99 2146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56694dd9
ZW
2147 egrep "Lucky GNU user" >/dev/null 2>&1; then
2148 rm -rf conftest*
6eb95e99
ZW
2149 ac_cv_gnu_library_2_1=yes
2150else
56694dd9 2151 rm -rf conftest*
6eb95e99
ZW
2152 ac_cv_gnu_library_2_1=no
2153fi
2154rm -f conftest*
2155
56694dd9
ZW
2156
2157
6eb95e99 2158fi
6eb95e99 2159
56694dd9
ZW
2160echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
2161
6eb95e99 2162 GLIBC21="$ac_cv_gnu_library_2_1"
56694dd9 2163
6eb95e99
ZW
2164
2165
56694dd9
ZW
2166
2167 echo $ac_n "checking whether integer division by zero raises SIGFPE""... $ac_c" 1>&6
2168echo "configure:2169: checking whether integer division by zero raises SIGFPE" >&5
2169if eval "test \"`echo '$''{'gt_cv_int_divbyzero_sigfpe'+set}'`\" = set"; then
2170 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 2171else
56694dd9 2172
6eb95e99 2173 if test "$cross_compiling" = yes; then
56694dd9 2174
6eb95e99
ZW
2175 # Guess based on the CPU.
2176 case "$host_cpu" in
2177 alpha* | i3456786 | m68k | s390*)
2178 gt_cv_int_divbyzero_sigfpe="guessing yes";;
2179 *)
2180 gt_cv_int_divbyzero_sigfpe="guessing no";;
2181 esac
56694dd9 2182
6eb95e99 2183else
56694dd9
ZW
2184 cat > conftest.$ac_ext <<EOF
2185#line 2186 "configure"
2186#include "confdefs.h"
6eb95e99
ZW
2187
2188#include <stdlib.h>
2189#include <signal.h>
2190
2191static void
2192#ifdef __cplusplus
2193sigfpe_handler (int sig)
2194#else
2195sigfpe_handler (sig) int sig;
2196#endif
2197{
2198 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2199 exit (sig != SIGFPE);
2200}
2201
2202int x = 1;
2203int y = 0;
2204int z;
2205int nan;
2206
2207int main ()
2208{
2209 signal (SIGFPE, sigfpe_handler);
2210/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2211#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2212 signal (SIGTRAP, sigfpe_handler);
2213#endif
2214/* Linux/SPARC yields signal SIGILL. */
2215#if defined (__sparc__) && defined (__linux__)
2216 signal (SIGILL, sigfpe_handler);
2217#endif
2218
2219 z = x / y;
2220 nan = y / y;
2221 exit (1);
2222}
2223
56694dd9
ZW
2224EOF
2225if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2226then
6eb95e99
ZW
2227 gt_cv_int_divbyzero_sigfpe=yes
2228else
56694dd9
ZW
2229 echo "configure: failed program was:" >&5
2230 cat conftest.$ac_ext >&5
2231 rm -fr conftest*
2232 gt_cv_int_divbyzero_sigfpe=no
6eb95e99 2233fi
56694dd9 2234rm -fr conftest*
6eb95e99
ZW
2235fi
2236
56694dd9 2237
6eb95e99 2238fi
56694dd9
ZW
2239
2240echo "$ac_t""$gt_cv_int_divbyzero_sigfpe" 1>&6
6eb95e99
ZW
2241 case "$gt_cv_int_divbyzero_sigfpe" in
2242 *yes) value=1;;
2243 *) value=0;;
2244 esac
56694dd9 2245 cat >> confdefs.h <<EOF
6eb95e99 2246#define INTDIV0_RAISES_SIGFPE $value
56694dd9 2247EOF
6eb95e99
ZW
2248
2249
2250
56694dd9
ZW
2251
2252
6eb95e99 2253 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
56694dd9 2254
6eb95e99
ZW
2255 test $ac_cv_type_unsigned_long_long = yes \
2256 && ac_type='unsigned long long' \
2257 || ac_type='unsigned long'
56694dd9 2258 cat >> confdefs.h <<EOF
6eb95e99 2259#define uintmax_t $ac_type
56694dd9 2260EOF
6eb95e99
ZW
2261
2262 else
56694dd9 2263 cat >> confdefs.h <<\EOF
6eb95e99 2264#define HAVE_UINTMAX_T 1
56694dd9 2265EOF
6eb95e99 2266
6eb95e99 2267 fi
6eb95e99 2268
6eb95e99 2269
56694dd9
ZW
2270 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2271echo "configure:2272: checking for inttypes.h" >&5
2272if eval "test \"`echo '$''{'gt_cv_header_inttypes_h'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 2274else
56694dd9
ZW
2275
2276 cat > conftest.$ac_ext <<EOF
2277#line 2278 "configure"
2278#include "confdefs.h"
2279#include <sys/types.h>
2280#include <inttypes.h>
2281int main() {
2282
2283; return 0; }
2284EOF
2285if { (eval echo configure:2286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2286 rm -rf conftest*
2287 gt_cv_header_inttypes_h=yes
2288else
2289 echo "configure: failed program was:" >&5
2290 cat conftest.$ac_ext >&5
2291 rm -rf conftest*
2292 gt_cv_header_inttypes_h=no
6eb95e99 2293fi
56694dd9
ZW
2294rm -f conftest*
2295
6eb95e99 2296fi
6eb95e99 2297
56694dd9
ZW
2298echo "$ac_t""$gt_cv_header_inttypes_h" 1>&6
2299 if test $gt_cv_header_inttypes_h = yes; then
2300 cat >> confdefs.h <<EOF
2301#define HAVE_INTTYPES_H 1
2302EOF
6eb95e99 2303
56694dd9 2304 fi
6eb95e99 2305
6eb95e99 2306
56694dd9
ZW
2307
2308 if test $gt_cv_header_inttypes_h = yes; then
2309 echo $ac_n "checking whether the inttypes.h PRIxNN macros are broken""... $ac_c" 1>&6
2310echo "configure:2311: checking whether the inttypes.h PRIxNN macros are broken" >&5
2311if eval "test \"`echo '$''{'gt_cv_inttypes_pri_broken'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314
2315 cat > conftest.$ac_ext <<EOF
2316#line 2317 "configure"
2317#include "confdefs.h"
2318#include <inttypes.h>
2319#ifdef PRId32
2320char *p = PRId32;
2321#endif
6eb95e99 2322
56694dd9 2323int main() {
6eb95e99 2324
56694dd9
ZW
2325; return 0; }
2326EOF
2327if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2328 rm -rf conftest*
2329 gt_cv_inttypes_pri_broken=no
2330else
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 gt_cv_inttypes_pri_broken=yes
2335fi
2336rm -f conftest*
2337
2338fi
6eb95e99 2339
56694dd9
ZW
2340echo "$ac_t""$gt_cv_inttypes_pri_broken" 1>&6
2341 fi
2342 if test "$gt_cv_inttypes_pri_broken" = yes; then
2343 cat >> confdefs.h <<EOF
2344#define PRI_MACROS_BROKEN 1
2345EOF
6eb95e99 2346
56694dd9 2347 fi
6eb95e99
ZW
2348
2349
56694dd9
ZW
2350
2351
6eb95e99 2352
56694dd9
ZW
2353
2354
6eb95e99 2355 use_additional=yes
56694dd9 2356
6eb95e99
ZW
2357 acl_save_prefix="$prefix"
2358 prefix="$acl_final_prefix"
2359 acl_save_exec_prefix="$exec_prefix"
2360 exec_prefix="$acl_final_exec_prefix"
56694dd9 2361
6eb95e99
ZW
2362 eval additional_includedir=\"$includedir\"
2363 eval additional_libdir=\"$libdir\"
56694dd9 2364
6eb95e99
ZW
2365 exec_prefix="$acl_save_exec_prefix"
2366 prefix="$acl_save_prefix"
2367
56694dd9 2368 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6eb95e99
ZW
2369if test "${with_libiconv_prefix+set}" = set; then
2370 withval="$with_libiconv_prefix"
56694dd9 2371
6eb95e99
ZW
2372 if test "X$withval" = "Xno"; then
2373 use_additional=no
2374 else
2375 if test "X$withval" = "X"; then
56694dd9 2376
6eb95e99
ZW
2377 acl_save_prefix="$prefix"
2378 prefix="$acl_final_prefix"
2379 acl_save_exec_prefix="$exec_prefix"
2380 exec_prefix="$acl_final_exec_prefix"
56694dd9 2381
6eb95e99
ZW
2382 eval additional_includedir=\"$includedir\"
2383 eval additional_libdir=\"$libdir\"
56694dd9 2384
6eb95e99
ZW
2385 exec_prefix="$acl_save_exec_prefix"
2386 prefix="$acl_save_prefix"
2387
2388 else
2389 additional_includedir="$withval/include"
2390 additional_libdir="$withval/lib"
2391 fi
2392 fi
2393
56694dd9
ZW
2394fi
2395
6eb95e99
ZW
2396 LIBICONV=
2397 LTLIBICONV=
2398 INCICONV=
2399 rpathdirs=
2400 ltrpathdirs=
2401 names_already_handled=
2402 names_next_round='iconv '
2403 while test -n "$names_next_round"; do
2404 names_this_round="$names_next_round"
2405 names_next_round=
2406 for name in $names_this_round; do
2407 already_handled=
2408 for n in $names_already_handled; do
2409 if test "$n" = "$name"; then
2410 already_handled=yes
2411 break
2412 fi
2413 done
2414 if test -z "$already_handled"; then
2415 names_already_handled="$names_already_handled $name"
2416 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
2417 eval value=\"\$HAVE_LIB$uppername\"
2418 if test -n "$value"; then
2419 if test "$value" = yes; then
2420 eval value=\"\$LIB$uppername\"
2421 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
2422 eval value=\"\$LTLIB$uppername\"
2423 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
2424 else
2425 :
2426 fi
2427 else
2428 found_dir=
2429 found_la=
2430 found_so=
2431 found_a=
2432 if test $use_additional = yes; then
2433 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
2434 found_dir="$additional_libdir"
2435 found_so="$additional_libdir/lib$name.$shlibext"
2436 if test -f "$additional_libdir/lib$name.la"; then
2437 found_la="$additional_libdir/lib$name.la"
2438 fi
2439 else
2440 if test -f "$additional_libdir/lib$name.$libext"; then
2441 found_dir="$additional_libdir"
2442 found_a="$additional_libdir/lib$name.$libext"
2443 if test -f "$additional_libdir/lib$name.la"; then
2444 found_la="$additional_libdir/lib$name.la"
2445 fi
2446 fi
2447 fi
2448 fi
2449 if test "X$found_dir" = "X"; then
2450 for x in $LDFLAGS $LTLIBICONV; do
56694dd9 2451
6eb95e99
ZW
2452 acl_save_prefix="$prefix"
2453 prefix="$acl_final_prefix"
2454 acl_save_exec_prefix="$exec_prefix"
2455 exec_prefix="$acl_final_exec_prefix"
2456 eval x=\"$x\"
2457 exec_prefix="$acl_save_exec_prefix"
2458 prefix="$acl_save_prefix"
2459
2460 case "$x" in
2461 -L*)
2462 dir=`echo "X$x" | sed -e 's/^X-L//'`
2463 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
2464 found_dir="$dir"
2465 found_so="$dir/lib$name.$shlibext"
2466 if test -f "$dir/lib$name.la"; then
2467 found_la="$dir/lib$name.la"
2468 fi
2469 else
2470 if test -f "$dir/lib$name.$libext"; then
2471 found_dir="$dir"
2472 found_a="$dir/lib$name.$libext"
2473 if test -f "$dir/lib$name.la"; then
2474 found_la="$dir/lib$name.la"
2475 fi
2476 fi
2477 fi
2478 ;;
2479 esac
2480 if test "X$found_dir" != "X"; then
2481 break
2482 fi
2483 done
2484 fi
2485 if test "X$found_dir" != "X"; then
2486 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
2487 if test "X$found_so" != "X"; then
2488 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2489 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
2490 else
2491 haveit=
2492 for x in $ltrpathdirs; do
2493 if test "X$x" = "X$found_dir"; then
2494 haveit=yes
2495 break
2496 fi
2497 done
2498 if test -z "$haveit"; then
2499 ltrpathdirs="$ltrpathdirs $found_dir"
2500 fi
2501 if test "$hardcode_direct" = yes; then
2502 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
2503 else
2504 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2505 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
2506 haveit=
2507 for x in $rpathdirs; do
2508 if test "X$x" = "X$found_dir"; then
2509 haveit=yes
2510 break
2511 fi
2512 done
2513 if test -z "$haveit"; then
2514 rpathdirs="$rpathdirs $found_dir"
2515 fi
2516 else
2517 haveit=
2518 for x in $LDFLAGS $LIBICONV; do
56694dd9 2519
6eb95e99
ZW
2520 acl_save_prefix="$prefix"
2521 prefix="$acl_final_prefix"
2522 acl_save_exec_prefix="$exec_prefix"
2523 exec_prefix="$acl_final_exec_prefix"
2524 eval x=\"$x\"
2525 exec_prefix="$acl_save_exec_prefix"
2526 prefix="$acl_save_prefix"
2527
2528 if test "X$x" = "X-L$found_dir"; then
2529 haveit=yes
2530 break
2531 fi
2532 done
2533 if test -z "$haveit"; then
2534 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
2535 fi
2536 if test "$hardcode_minus_L" != no; then
2537 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
2538 else
2539 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
2540 fi
2541 fi
2542 fi
2543 fi
2544 else
2545 if test "X$found_a" != "X"; then
2546 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
2547 else
2548 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
2549 fi
2550 fi
2551 additional_includedir=
2552 case "$found_dir" in
2553 */lib | */lib/)
2554 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2555 additional_includedir="$basedir/include"
2556 ;;
2557 esac
2558 if test "X$additional_includedir" != "X"; then
2559 if test "X$additional_includedir" != "X/usr/include"; then
2560 haveit=
2561 if test "X$additional_includedir" = "X/usr/local/include"; then
2562 if test -n "$GCC"; then
2563 case $host_os in
2564 linux*) haveit=yes;;
2565 esac
2566 fi
2567 fi
2568 if test -z "$haveit"; then
2569 for x in $CPPFLAGS $INCICONV; do
56694dd9 2570
6eb95e99
ZW
2571 acl_save_prefix="$prefix"
2572 prefix="$acl_final_prefix"
2573 acl_save_exec_prefix="$exec_prefix"
2574 exec_prefix="$acl_final_exec_prefix"
2575 eval x=\"$x\"
2576 exec_prefix="$acl_save_exec_prefix"
2577 prefix="$acl_save_prefix"
2578
2579 if test "X$x" = "X-I$additional_includedir"; then
2580 haveit=yes
2581 break
2582 fi
2583 done
2584 if test -z "$haveit"; then
2585 if test -d "$additional_includedir"; then
2586 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
2587 fi
2588 fi
2589 fi
2590 fi
2591 fi
2592 if test -n "$found_la"; then
2593 save_libdir="$libdir"
2594 case "$found_la" in
2595 */* | *\\*) . "$found_la" ;;
2596 *) . "./$found_la" ;;
2597 esac
2598 libdir="$save_libdir"
2599 for dep in $dependency_libs; do
2600 case "$dep" in
2601 -L*)
2602 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2603 if test "X$additional_libdir" != "X/usr/lib"; then
2604 haveit=
2605 if test "X$additional_libdir" = "X/usr/local/lib"; then
2606 if test -n "$GCC"; then
2607 case $host_os in
2608 linux*) haveit=yes;;
2609 esac
2610 fi
2611 fi
2612 if test -z "$haveit"; then
2613 haveit=
2614 for x in $LDFLAGS $LIBICONV; do
56694dd9 2615
6eb95e99
ZW
2616 acl_save_prefix="$prefix"
2617 prefix="$acl_final_prefix"
2618 acl_save_exec_prefix="$exec_prefix"
2619 exec_prefix="$acl_final_exec_prefix"
2620 eval x=\"$x\"
2621 exec_prefix="$acl_save_exec_prefix"
2622 prefix="$acl_save_prefix"
2623
2624 if test "X$x" = "X-L$additional_libdir"; then
2625 haveit=yes
2626 break
2627 fi
2628 done
2629 if test -z "$haveit"; then
2630 if test -d "$additional_libdir"; then
2631 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
2632 fi
2633 fi
2634 haveit=
2635 for x in $LDFLAGS $LTLIBICONV; do
56694dd9 2636
6eb95e99
ZW
2637 acl_save_prefix="$prefix"
2638 prefix="$acl_final_prefix"
2639 acl_save_exec_prefix="$exec_prefix"
2640 exec_prefix="$acl_final_exec_prefix"
2641 eval x=\"$x\"
2642 exec_prefix="$acl_save_exec_prefix"
2643 prefix="$acl_save_prefix"
2644
2645 if test "X$x" = "X-L$additional_libdir"; then
2646 haveit=yes
2647 break
2648 fi
2649 done
2650 if test -z "$haveit"; then
2651 if test -d "$additional_libdir"; then
2652 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
2653 fi
2654 fi
2655 fi
2656 fi
2657 ;;
2658 -R*)
2659 dir=`echo "X$dep" | sed -e 's/^X-R//'`
2660 if test "$enable_rpath" != no; then
2661 haveit=
2662 for x in $rpathdirs; do
2663 if test "X$x" = "X$dir"; then
2664 haveit=yes
2665 break
2666 fi
2667 done
2668 if test -z "$haveit"; then
2669 rpathdirs="$rpathdirs $dir"
2670 fi
2671 haveit=
2672 for x in $ltrpathdirs; do
2673 if test "X$x" = "X$dir"; then
2674 haveit=yes
2675 break
2676 fi
2677 done
2678 if test -z "$haveit"; then
2679 ltrpathdirs="$ltrpathdirs $dir"
2680 fi
2681 fi
2682 ;;
2683 -l*)
2684 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2685 ;;
2686 *.la)
2687 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2688 ;;
2689 *)
2690 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
2691 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
2692 ;;
2693 esac
2694 done
2695 fi
2696 else
2697 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
2698 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
2699 fi
2700 fi
2701 fi
2702 done
2703 done
2704 if test "X$rpathdirs" != "X"; then
2705 if test -n "$hardcode_libdir_separator"; then
2706 alldirs=
2707 for found_dir in $rpathdirs; do
2708 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2709 done
2710 acl_save_libdir="$libdir"
2711 libdir="$alldirs"
2712 eval flag=\"$hardcode_libdir_flag_spec\"
2713 libdir="$acl_save_libdir"
2714 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
2715 else
2716 for found_dir in $rpathdirs; do
2717 acl_save_libdir="$libdir"
2718 libdir="$found_dir"
2719 eval flag=\"$hardcode_libdir_flag_spec\"
2720 libdir="$acl_save_libdir"
2721 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
2722 done
2723 fi
2724 fi
2725 if test "X$ltrpathdirs" != "X"; then
2726 for found_dir in $ltrpathdirs; do
2727 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
2728 done
56694dd9
ZW
2729 fi
2730
2731
2732
2733
2734
2735
2736# Prepare PATH_SEPARATOR.
2737# The user is always right.
2738if test "${PATH_SEPARATOR+set}" != set; then
2739 echo "#! /bin/sh" >conf$$.sh
2740 echo "exit 0" >>conf$$.sh
2741 chmod +x conf$$.sh
2742 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2743 PATH_SEPARATOR=';'
2744 else
2745 PATH_SEPARATOR=:
2746 fi
2747 rm -f conf$$.sh
2748fi
2749
2750# Find out how to test for executable files. Don't use a zero-byte file,
2751# as systems may use methods other than mode bits to determine executability.
2752cat >conf$$.file <<_ASEOF
2753#! /bin/sh
2754exit 0
2755_ASEOF
2756chmod +x conf$$.file
2757if test -x conf$$.file >/dev/null 2>&1; then
2758 ac_executable_p="test -x"
2759else
2760 ac_executable_p="test -f"
2761fi
2762rm -f conf$$.file
2763
2764# Extract the first word of "msgfmt", so it can be a program name with args.
2765set dummy msgfmt; ac_word=$2
2766echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2767echo "configure:2768: checking for $ac_word" >&5
2768if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2769 echo $ac_n "(cached) $ac_c" 1>&6
2770else
2771 case "$MSGFMT" in
2772 [\\/]* | ?:[\\/]*)
2773 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2774 ;;
2775 *)
2776 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2777 for ac_dir in $PATH; do
2778 IFS="$ac_save_IFS"
2779 test -z "$ac_dir" && ac_dir=.
2780 for ac_exec_ext in '' $ac_executable_extensions; do
2781 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2782 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
2783 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2784 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
2785 break 2
2786 fi
2787 fi
2788 done
2789 done
2790 IFS="$ac_save_IFS"
2791 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
2792 ;;
2793esac
2794fi
2795MSGFMT="$ac_cv_path_MSGFMT"
2796if test "$MSGFMT" != ":"; then
2797 echo "$ac_t""$MSGFMT" 1>&6
2798else
2799 echo "$ac_t""no" 1>&6
2800fi
2801
2802 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2803set dummy gmsgfmt; ac_word=$2
2804echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2805echo "configure:2806: checking for $ac_word" >&5
2806if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2807 echo $ac_n "(cached) $ac_c" 1>&6
2808else
2809 case "$GMSGFMT" in
2810 /*)
2811 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2812 ;;
2813 ?:/*)
2814 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2815 ;;
2816 *)
2817 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2818 ac_dummy="$PATH"
2819 for ac_dir in $ac_dummy; do
2820 test -z "$ac_dir" && ac_dir=.
2821 if test -f $ac_dir/$ac_word; then
2822 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2823 break
2824 fi
2825 done
2826 IFS="$ac_save_ifs"
2827 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2828 ;;
2829esac
2830fi
2831GMSGFMT="$ac_cv_path_GMSGFMT"
2832if test -n "$GMSGFMT"; then
2833 echo "$ac_t""$GMSGFMT" 1>&6
2834else
2835 echo "$ac_t""no" 1>&6
2836fi
2837
2838
2839
2840# Prepare PATH_SEPARATOR.
2841# The user is always right.
2842if test "${PATH_SEPARATOR+set}" != set; then
2843 echo "#! /bin/sh" >conf$$.sh
2844 echo "exit 0" >>conf$$.sh
2845 chmod +x conf$$.sh
2846 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2847 PATH_SEPARATOR=';'
2848 else
2849 PATH_SEPARATOR=:
2850 fi
2851 rm -f conf$$.sh
2852fi
2853
2854# Find out how to test for executable files. Don't use a zero-byte file,
2855# as systems may use methods other than mode bits to determine executability.
2856cat >conf$$.file <<_ASEOF
2857#! /bin/sh
2858exit 0
2859_ASEOF
2860chmod +x conf$$.file
2861if test -x conf$$.file >/dev/null 2>&1; then
2862 ac_executable_p="test -x"
2863else
2864 ac_executable_p="test -f"
2865fi
2866rm -f conf$$.file
2867
2868# Extract the first word of "xgettext", so it can be a program name with args.
2869set dummy xgettext; ac_word=$2
2870echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2871echo "configure:2872: checking for $ac_word" >&5
2872if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2873 echo $ac_n "(cached) $ac_c" 1>&6
2874else
2875 case "$XGETTEXT" in
2876 [\\/]* | ?:[\\/]*)
2877 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2878 ;;
2879 *)
2880 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2881 for ac_dir in $PATH; do
2882 IFS="$ac_save_IFS"
2883 test -z "$ac_dir" && ac_dir=.
2884 for ac_exec_ext in '' $ac_executable_extensions; do
2885 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2886 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
2887 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2888 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
2889 break 2
2890 fi
2891 fi
2892 done
2893 done
2894 IFS="$ac_save_IFS"
2895 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2896 ;;
2897esac
2898fi
2899XGETTEXT="$ac_cv_path_XGETTEXT"
2900if test "$XGETTEXT" != ":"; then
2901 echo "$ac_t""$XGETTEXT" 1>&6
2902else
2903 echo "$ac_t""no" 1>&6
2904fi
2905
2906 rm -f messages.po
2907
2908
2909# Prepare PATH_SEPARATOR.
2910# The user is always right.
2911if test "${PATH_SEPARATOR+set}" != set; then
2912 echo "#! /bin/sh" >conf$$.sh
2913 echo "exit 0" >>conf$$.sh
2914 chmod +x conf$$.sh
2915 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2916 PATH_SEPARATOR=';'
2917 else
2918 PATH_SEPARATOR=:
2919 fi
2920 rm -f conf$$.sh
2921fi
2922
2923# Find out how to test for executable files. Don't use a zero-byte file,
2924# as systems may use methods other than mode bits to determine executability.
2925cat >conf$$.file <<_ASEOF
2926#! /bin/sh
2927exit 0
2928_ASEOF
2929chmod +x conf$$.file
2930if test -x conf$$.file >/dev/null 2>&1; then
2931 ac_executable_p="test -x"
2932else
2933 ac_executable_p="test -f"
2934fi
2935rm -f conf$$.file
2936
2937# Extract the first word of "msgmerge", so it can be a program name with args.
2938set dummy msgmerge; ac_word=$2
2939echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2940echo "configure:2941: checking for $ac_word" >&5
2941if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2943else
2944 case "$MSGMERGE" in
2945 [\\/]* | ?:[\\/]*)
2946 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
2947 ;;
2948 *)
2949 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2950 for ac_dir in $PATH; do
2951 IFS="$ac_save_IFS"
2952 test -z "$ac_dir" && ac_dir=.
2953 for ac_exec_ext in '' $ac_executable_extensions; do
2954 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2955 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
2956 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
2957 break 2
2958 fi
2959 fi
2960 done
2961 done
2962 IFS="$ac_save_IFS"
2963 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
2964 ;;
2965esac
2966fi
2967MSGMERGE="$ac_cv_path_MSGMERGE"
2968if test "$MSGMERGE" != ":"; then
2969 echo "$ac_t""$MSGMERGE" 1>&6
2970else
2971 echo "$ac_t""no" 1>&6
2972fi
6eb95e99
ZW
2973
2974
56694dd9
ZW
2975 if test "$GMSGFMT" != ":"; then
2976 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
2977 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2978 : ;
2979 else
2980 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
2981 echo "$ac_t""found $GMSGFMT program is not GNU msgfmt; ignore it" 1>&6
2982 GMSGFMT=":"
2983 fi
2984 fi
6eb95e99 2985
56694dd9
ZW
2986 if test "$XGETTEXT" != ":"; then
2987 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
2988 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2989 : ;
2990 else
2991 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
2992 XGETTEXT=":"
2993 fi
2994 rm -f messages.po
2995 fi
6eb95e99 2996
56694dd9 2997
6eb95e99
ZW
2998
2999
56694dd9
ZW
3000
3001 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6eb95e99
ZW
3002stdlib.h string.h unistd.h sys/param.h
3003do
56694dd9
ZW
3004ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3005echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3006echo "configure:3007: checking for $ac_hdr" >&5
3007if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3008 echo $ac_n "(cached) $ac_c" 1>&6
3009else
3010 cat > conftest.$ac_ext <<EOF
3011#line 3012 "configure"
3012#include "confdefs.h"
3013#include <$ac_hdr>
3014EOF
3015ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3016{ (eval echo configure:3017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3017ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3018if test -z "$ac_err"; then
3019 rm -rf conftest*
3020 eval "ac_cv_header_$ac_safe=yes"
3021else
3022 echo "$ac_err" >&5
3023 echo "configure: failed program was:" >&5
3024 cat conftest.$ac_ext >&5
3025 rm -rf conftest*
3026 eval "ac_cv_header_$ac_safe=no"
6eb95e99 3027fi
56694dd9 3028rm -f conftest*
6eb95e99 3029fi
56694dd9
ZW
3030if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3031 echo "$ac_t""yes" 1>&6
3032 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3033 cat >> confdefs.h <<EOF
3034#define $ac_tr_hdr 1
3035EOF
3036
3037else
3038 echo "$ac_t""no" 1>&6
6eb95e99 3039fi
6eb95e99
ZW
3040done
3041
56694dd9 3042 for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
6eb95e99
ZW
3043geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
3044strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
3045__fsetlocking
3046do
56694dd9
ZW
3047echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3048echo "configure:3049: checking for $ac_func" >&5
3049if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3051else
3052 cat > conftest.$ac_ext <<EOF
3053#line 3054 "configure"
3054#include "confdefs.h"
6eb95e99 3055/* System header to define __stub macros and hopefully few prototypes,
56694dd9
ZW
3056 which can conflict with char $ac_func(); below. */
3057#include <assert.h>
6eb95e99 3058/* Override any gcc2 internal prototype to avoid an error. */
6eb95e99 3059/* We use char because int might match the return type of a gcc2
56694dd9
ZW
3060 builtin and then its argument prototype would still apply. */
3061char $ac_func();
3062
3063int main() {
3064
6eb95e99
ZW
3065/* The GNU C library defines this for functions which it implements
3066 to always fail with ENOSYS. Some functions are actually named
3067 something starting with __ and the normal name is an alias. */
3068#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3069choke me
3070#else
56694dd9 3071$ac_func();
6eb95e99
ZW
3072#endif
3073
56694dd9
ZW
3074; return 0; }
3075EOF
3076if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3077 rm -rf conftest*
3078 eval "ac_cv_func_$ac_func=yes"
3079else
3080 echo "configure: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3082 rm -rf conftest*
3083 eval "ac_cv_func_$ac_func=no"
3084fi
3085rm -f conftest*
3086fi
6eb95e99 3087
56694dd9
ZW
3088if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3089 echo "$ac_t""yes" 1>&6
3090 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3091 cat >> confdefs.h <<EOF
3092#define $ac_tr_func 1
3093EOF
3094
3095else
3096 echo "$ac_t""no" 1>&6
6eb95e99
ZW
3097fi
3098done
3099
3100
56694dd9
ZW
3101
3102
3103
3104
6eb95e99
ZW
3105
3106 am_save_CPPFLAGS="$CPPFLAGS"
56694dd9 3107
6eb95e99
ZW
3108 for element in $INCICONV; do
3109 haveit=
3110 for x in $CPPFLAGS; do
56694dd9 3111
6eb95e99
ZW
3112 acl_save_prefix="$prefix"
3113 prefix="$acl_final_prefix"
3114 acl_save_exec_prefix="$exec_prefix"
3115 exec_prefix="$acl_final_exec_prefix"
3116 eval x=\"$x\"
3117 exec_prefix="$acl_save_exec_prefix"
3118 prefix="$acl_save_prefix"
3119
3120 if test "X$x" = "X$element"; then
3121 haveit=yes
3122 break
3123 fi
3124 done
3125 if test -z "$haveit"; then
3126 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
3127 fi
3128 done
3129
3130
56694dd9
ZW
3131 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3132echo "configure:3133: checking for iconv" >&5
3133if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3134 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 3135else
56694dd9 3136
6eb95e99
ZW
3137 am_cv_func_iconv="no, consider installing GNU libiconv"
3138 am_cv_lib_iconv=no
56694dd9
ZW
3139 cat > conftest.$ac_ext <<EOF
3140#line 3141 "configure"
3141#include "confdefs.h"
6eb95e99
ZW
3142#include <stdlib.h>
3143#include <iconv.h>
56694dd9 3144int main() {
6eb95e99
ZW
3145iconv_t cd = iconv_open("","");
3146 iconv(cd,NULL,NULL,NULL,NULL);
3147 iconv_close(cd);
56694dd9
ZW
3148; return 0; }
3149EOF
3150if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3151 rm -rf conftest*
6eb95e99
ZW
3152 am_cv_func_iconv=yes
3153else
56694dd9
ZW
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
6eb95e99 3156fi
56694dd9 3157rm -f conftest*
6eb95e99
ZW
3158 if test "$am_cv_func_iconv" != yes; then
3159 am_save_LIBS="$LIBS"
3160 LIBS="$LIBS $LIBICONV"
56694dd9
ZW
3161 cat > conftest.$ac_ext <<EOF
3162#line 3163 "configure"
3163#include "confdefs.h"
6eb95e99
ZW
3164#include <stdlib.h>
3165#include <iconv.h>
56694dd9 3166int main() {
6eb95e99
ZW
3167iconv_t cd = iconv_open("","");
3168 iconv(cd,NULL,NULL,NULL,NULL);
3169 iconv_close(cd);
56694dd9
ZW
3170; return 0; }
3171EOF
3172if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3173 rm -rf conftest*
6eb95e99
ZW
3174 am_cv_lib_iconv=yes
3175 am_cv_func_iconv=yes
3176else
56694dd9
ZW
3177 echo "configure: failed program was:" >&5
3178 cat conftest.$ac_ext >&5
6eb95e99 3179fi
56694dd9 3180rm -f conftest*
6eb95e99
ZW
3181 LIBS="$am_save_LIBS"
3182 fi
56694dd9 3183
6eb95e99 3184fi
6eb95e99 3185
56694dd9
ZW
3186echo "$ac_t""$am_cv_func_iconv" 1>&6
3187 if test "$am_cv_func_iconv" = yes; then
3188 cat >> confdefs.h <<\EOF
6eb95e99 3189#define HAVE_ICONV 1
56694dd9 3190EOF
6eb95e99
ZW
3191
3192 fi
3193 if test "$am_cv_lib_iconv" = yes; then
56694dd9
ZW
3194 echo $ac_n "checking how to link with libiconv""... $ac_c" 1>&6
3195echo "configure:3196: checking how to link with libiconv" >&5
3196 echo "$ac_t""$LIBICONV" 1>&6
6eb95e99
ZW
3197 else
3198 CPPFLAGS="$am_save_CPPFLAGS"
3199 LIBICONV=
3200 LTLIBICONV=
3201 fi
56694dd9
ZW
3202
3203
6eb95e99
ZW
3204
3205 if test "$am_cv_func_iconv" = yes; then
56694dd9
ZW
3206 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3207echo "configure:3208: checking for iconv declaration" >&5
3208 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3209 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 3210else
56694dd9
ZW
3211
3212 cat > conftest.$ac_ext <<EOF
3213#line 3214 "configure"
3214#include "confdefs.h"
6eb95e99
ZW
3215
3216#include <stdlib.h>
3217#include <iconv.h>
3218extern
3219#ifdef __cplusplus
3220"C"
3221#endif
3222#if defined(__STDC__) || defined(__cplusplus)
3223size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3224#else
3225size_t iconv();
3226#endif
3227
56694dd9 3228int main() {
6eb95e99 3229
56694dd9
ZW
3230; return 0; }
3231EOF
3232if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3233 rm -rf conftest*
6eb95e99
ZW
3234 am_cv_proto_iconv_arg1=""
3235else
56694dd9
ZW
3236 echo "configure: failed program was:" >&5
3237 cat conftest.$ac_ext >&5
3238 rm -rf conftest*
3239 am_cv_proto_iconv_arg1="const"
6eb95e99 3240fi
56694dd9 3241rm -f conftest*
6eb95e99
ZW
3242 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
3243fi
3244
3245 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
56694dd9
ZW
3246 echo "$ac_t""${ac_t:-
3247 }$am_cv_proto_iconv" 1>&6
3248 cat >> confdefs.h <<EOF
6eb95e99 3249#define ICONV_CONST $am_cv_proto_iconv_arg1
56694dd9 3250EOF
6eb95e99
ZW
3251
3252 fi
3253
56694dd9
ZW
3254
3255 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
3256echo "configure:3257: checking for nl_langinfo and CODESET" >&5
3257if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
3258 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99 3259else
56694dd9
ZW
3260 cat > conftest.$ac_ext <<EOF
3261#line 3262 "configure"
3262#include "confdefs.h"
6eb95e99 3263#include <langinfo.h>
56694dd9 3264int main() {
6eb95e99 3265char* cs = nl_langinfo(CODESET);
56694dd9
ZW
3266; return 0; }
3267EOF
3268if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3269 rm -rf conftest*
6eb95e99
ZW
3270 am_cv_langinfo_codeset=yes
3271else
56694dd9
ZW
3272 echo "configure: failed program was:" >&5
3273 cat conftest.$ac_ext >&5
3274 rm -rf conftest*
3275 am_cv_langinfo_codeset=no
6eb95e99 3276fi
56694dd9
ZW
3277rm -f conftest*
3278
6eb95e99 3279fi
6eb95e99 3280
56694dd9
ZW
3281echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
3282 if test $am_cv_langinfo_codeset = yes; then
3283 cat >> confdefs.h <<\EOF
6eb95e99 3284#define HAVE_LANGINFO_CODESET 1
56694dd9 3285EOF
6eb95e99
ZW
3286
3287 fi
3288
3289 if test $ac_cv_header_locale_h = yes; then
56694dd9
ZW
3290
3291 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3292echo "configure:3293: checking for LC_MESSAGES" >&5
3293if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3294 echo $ac_n "(cached) $ac_c" 1>&6
3295else
3296 cat > conftest.$ac_ext <<EOF
3297#line 3298 "configure"
3298#include "confdefs.h"
6eb95e99 3299#include <locale.h>
56694dd9 3300int main() {
6eb95e99 3301return LC_MESSAGES
56694dd9
ZW
3302; return 0; }
3303EOF
3304if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3305 rm -rf conftest*
6eb95e99
ZW
3306 am_cv_val_LC_MESSAGES=yes
3307else
56694dd9
ZW
3308 echo "configure: failed program was:" >&5
3309 cat conftest.$ac_ext >&5
3310 rm -rf conftest*
3311 am_cv_val_LC_MESSAGES=no
6eb95e99 3312fi
56694dd9 3313rm -f conftest*
6eb95e99 3314fi
6eb95e99 3315
56694dd9
ZW
3316echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3317 if test $am_cv_val_LC_MESSAGES = yes; then
3318 cat >> confdefs.h <<\EOF
6eb95e99 3319#define HAVE_LC_MESSAGES 1
56694dd9 3320EOF
6eb95e99
ZW
3321
3322 fi
3323
3324 fi
3325
3326 for ac_prog in bison
3327do
56694dd9 3328# Extract the first word of "$ac_prog", so it can be a program name with args.
6eb95e99 3329set dummy $ac_prog; ac_word=$2
56694dd9
ZW
3330echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3331echo "configure:3332: checking for $ac_word" >&5
3332if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
3333 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
3334else
3335 if test -n "$INTLBISON"; then
3336 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
3337else
56694dd9
ZW
3338 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3339 ac_dummy="$PATH"
3340 for ac_dir in $ac_dummy; do
3341 test -z "$ac_dir" && ac_dir=.
3342 if test -f $ac_dir/$ac_word; then
3343 ac_cv_prog_INTLBISON="$ac_prog"
3344 break
3345 fi
3346 done
3347 IFS="$ac_save_ifs"
6eb95e99
ZW
3348fi
3349fi
56694dd9 3350INTLBISON="$ac_cv_prog_INTLBISON"
6eb95e99 3351if test -n "$INTLBISON"; then
56694dd9 3352 echo "$ac_t""$INTLBISON" 1>&6
6eb95e99 3353else
56694dd9 3354 echo "$ac_t""no" 1>&6
6eb95e99
ZW
3355fi
3356
56694dd9 3357test -n "$INTLBISON" && break
6eb95e99
ZW
3358done
3359
3360 if test -z "$INTLBISON"; then
3361 ac_verc_fail=yes
3362 else
56694dd9
ZW
3363 echo $ac_n "checking version of bison""... $ac_c" 1>&6
3364echo "configure:3365: checking version of bison" >&5
6eb95e99
ZW
3365 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
3366 case $ac_prog_version in
3367 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3368 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
3369 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
3370 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
3371 esac
56694dd9 3372 echo "$ac_t""$ac_prog_version" 1>&6
6eb95e99
ZW
3373 fi
3374 if test $ac_verc_fail = yes; then
3375 INTLBISON=:
3376 fi
3377
3378
56694dd9
ZW
3379
3380
3381
3382
6eb95e99 3383
56694dd9
ZW
3384
3385
6eb95e99 3386
56694dd9
ZW
3387
3388
6eb95e99 3389
56694dd9 3390
6eb95e99 3391
56694dd9
ZW
3392
3393 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3394echo "configure:3395: checking whether NLS is requested" >&5
6eb95e99
ZW
3395 # Check whether --enable-nls or --disable-nls was given.
3396if test "${enable_nls+set}" = set; then
3397 enableval="$enable_nls"
3398 USE_NLS=$enableval
3399else
3400 USE_NLS=yes
56694dd9 3401fi
6eb95e99 3402
56694dd9
ZW
3403 echo "$ac_t""$USE_NLS" 1>&6
3404
6eb95e99
ZW
3405
3406
56694dd9 3407
6eb95e99
ZW
3408 BUILD_INCLUDED_LIBINTL=no
3409 USE_INCLUDED_LIBINTL=no
56694dd9 3410
6eb95e99
ZW
3411 LIBINTL=
3412 LTLIBINTL=
3413 POSUB=
3414
3415 if test "$USE_NLS" = "yes"; then
3416 gt_use_preinstalled_gnugettext=no
56694dd9
ZW
3417
3418 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3419echo "configure:3420: checking whether included gettext is requested" >&5
3420 # Check whether --with-included-gettext or --without-included-gettext was given.
6eb95e99
ZW
3421if test "${with_included_gettext+set}" = set; then
3422 withval="$with_included_gettext"
3423 nls_cv_force_use_gnu_gettext=$withval
3424else
3425 nls_cv_force_use_gnu_gettext=no
56694dd9
ZW
3426fi
3427
3428 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6eb95e99
ZW
3429
3430 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3431 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
56694dd9
ZW
3432
3433
3434
3435
3436
3437
3438 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
3439echo "configure:3440: checking for GNU gettext in libc" >&5
3440if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 cat > conftest.$ac_ext <<EOF
3444#line 3445 "configure"
3445#include "confdefs.h"
6eb95e99
ZW
3446#include <libintl.h>
3447extern int _nl_msg_cat_cntr;
3448extern int *_nl_domain_bindings;
56694dd9 3449int main() {
6eb95e99
ZW
3450bindtextdomain ("", "");
3451return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
56694dd9
ZW
3452; return 0; }
3453EOF
3454if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3455 rm -rf conftest*
6eb95e99
ZW
3456 gt_cv_func_gnugettext1_libc=yes
3457else
56694dd9
ZW
3458 echo "configure: failed program was:" >&5
3459 cat conftest.$ac_ext >&5
3460 rm -rf conftest*
3461 gt_cv_func_gnugettext1_libc=no
6eb95e99 3462fi
56694dd9 3463rm -f conftest*
6eb95e99 3464fi
6eb95e99 3465
56694dd9 3466echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6eb95e99 3467
56694dd9
ZW
3468 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
3469
3470
3471
6eb95e99 3472 use_additional=yes
56694dd9 3473
6eb95e99
ZW
3474 acl_save_prefix="$prefix"
3475 prefix="$acl_final_prefix"
3476 acl_save_exec_prefix="$exec_prefix"
3477 exec_prefix="$acl_final_exec_prefix"
56694dd9 3478
6eb95e99
ZW
3479 eval additional_includedir=\"$includedir\"
3480 eval additional_libdir=\"$libdir\"
56694dd9 3481
6eb95e99
ZW
3482 exec_prefix="$acl_save_exec_prefix"
3483 prefix="$acl_save_prefix"
3484
56694dd9 3485 # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
6eb95e99
ZW
3486if test "${with_libintl_prefix+set}" = set; then
3487 withval="$with_libintl_prefix"
56694dd9 3488
6eb95e99
ZW
3489 if test "X$withval" = "Xno"; then
3490 use_additional=no
3491 else
3492 if test "X$withval" = "X"; then
56694dd9 3493
6eb95e99
ZW
3494 acl_save_prefix="$prefix"
3495 prefix="$acl_final_prefix"
3496 acl_save_exec_prefix="$exec_prefix"
3497 exec_prefix="$acl_final_exec_prefix"
56694dd9 3498
6eb95e99
ZW
3499 eval additional_includedir=\"$includedir\"
3500 eval additional_libdir=\"$libdir\"
56694dd9 3501
6eb95e99
ZW
3502 exec_prefix="$acl_save_exec_prefix"
3503 prefix="$acl_save_prefix"
3504
3505 else
3506 additional_includedir="$withval/include"
3507 additional_libdir="$withval/lib"
3508 fi
3509 fi
3510
56694dd9
ZW
3511fi
3512
6eb95e99
ZW
3513 LIBINTL=
3514 LTLIBINTL=
3515 INCINTL=
3516 rpathdirs=
3517 ltrpathdirs=
3518 names_already_handled=
3519 names_next_round='intl '
3520 while test -n "$names_next_round"; do
3521 names_this_round="$names_next_round"
3522 names_next_round=
3523 for name in $names_this_round; do
3524 already_handled=
3525 for n in $names_already_handled; do
3526 if test "$n" = "$name"; then
3527 already_handled=yes
3528 break
3529 fi
3530 done
3531 if test -z "$already_handled"; then
3532 names_already_handled="$names_already_handled $name"
3533 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
3534 eval value=\"\$HAVE_LIB$uppername\"
3535 if test -n "$value"; then
3536 if test "$value" = yes; then
3537 eval value=\"\$LIB$uppername\"
3538 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
3539 eval value=\"\$LTLIB$uppername\"
3540 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
3541 else
3542 :
3543 fi
3544 else
3545 found_dir=
3546 found_la=
3547 found_so=
3548 found_a=
3549 if test $use_additional = yes; then
3550 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
3551 found_dir="$additional_libdir"
3552 found_so="$additional_libdir/lib$name.$shlibext"
3553 if test -f "$additional_libdir/lib$name.la"; then
3554 found_la="$additional_libdir/lib$name.la"
3555 fi
3556 else
3557 if test -f "$additional_libdir/lib$name.$libext"; then
3558 found_dir="$additional_libdir"
3559 found_a="$additional_libdir/lib$name.$libext"
3560 if test -f "$additional_libdir/lib$name.la"; then
3561 found_la="$additional_libdir/lib$name.la"
3562 fi
3563 fi
3564 fi
3565 fi
3566 if test "X$found_dir" = "X"; then
3567 for x in $LDFLAGS $LTLIBINTL; do
56694dd9 3568
6eb95e99
ZW
3569 acl_save_prefix="$prefix"
3570 prefix="$acl_final_prefix"
3571 acl_save_exec_prefix="$exec_prefix"
3572 exec_prefix="$acl_final_exec_prefix"
3573 eval x=\"$x\"
3574 exec_prefix="$acl_save_exec_prefix"
3575 prefix="$acl_save_prefix"
3576
3577 case "$x" in
3578 -L*)
3579 dir=`echo "X$x" | sed -e 's/^X-L//'`
3580 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
3581 found_dir="$dir"
3582 found_so="$dir/lib$name.$shlibext"
3583 if test -f "$dir/lib$name.la"; then
3584 found_la="$dir/lib$name.la"
3585 fi
3586 else
3587 if test -f "$dir/lib$name.$libext"; then
3588 found_dir="$dir"
3589 found_a="$dir/lib$name.$libext"
3590 if test -f "$dir/lib$name.la"; then
3591 found_la="$dir/lib$name.la"
3592 fi
3593 fi
3594 fi
3595 ;;
3596 esac
3597 if test "X$found_dir" != "X"; then
3598 break
3599 fi
3600 done
3601 fi
3602 if test "X$found_dir" != "X"; then
3603 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
3604 if test "X$found_so" != "X"; then
3605 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
3606 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
3607 else
3608 haveit=
3609 for x in $ltrpathdirs; do
3610 if test "X$x" = "X$found_dir"; then
3611 haveit=yes
3612 break
3613 fi
3614 done
3615 if test -z "$haveit"; then
3616 ltrpathdirs="$ltrpathdirs $found_dir"
3617 fi
3618 if test "$hardcode_direct" = yes; then
3619 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
3620 else
3621 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
3622 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
3623 haveit=
3624 for x in $rpathdirs; do
3625 if test "X$x" = "X$found_dir"; then
3626 haveit=yes
3627 break
3628 fi
3629 done
3630 if test -z "$haveit"; then
3631 rpathdirs="$rpathdirs $found_dir"
3632 fi
3633 else
3634 haveit=
3635 for x in $LDFLAGS $LIBINTL; do
56694dd9 3636
6eb95e99
ZW
3637 acl_save_prefix="$prefix"
3638 prefix="$acl_final_prefix"
3639 acl_save_exec_prefix="$exec_prefix"
3640 exec_prefix="$acl_final_exec_prefix"
3641 eval x=\"$x\"
3642 exec_prefix="$acl_save_exec_prefix"
3643 prefix="$acl_save_prefix"
3644
3645 if test "X$x" = "X-L$found_dir"; then
3646 haveit=yes
3647 break
3648 fi
3649 done
3650 if test -z "$haveit"; then
3651 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
3652 fi
3653 if test "$hardcode_minus_L" != no; then
3654 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
3655 else
3656 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
3657 fi
3658 fi
3659 fi
3660 fi
3661 else
3662 if test "X$found_a" != "X"; then
3663 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
3664 else
3665 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
3666 fi
3667 fi
3668 additional_includedir=
3669 case "$found_dir" in
3670 */lib | */lib/)
3671 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
3672 additional_includedir="$basedir/include"
3673 ;;
3674 esac
3675 if test "X$additional_includedir" != "X"; then
3676 if test "X$additional_includedir" != "X/usr/include"; then
3677 haveit=
3678 if test "X$additional_includedir" = "X/usr/local/include"; then
3679 if test -n "$GCC"; then
3680 case $host_os in
3681 linux*) haveit=yes;;
3682 esac
3683 fi
3684 fi
3685 if test -z "$haveit"; then
3686 for x in $CPPFLAGS $INCINTL; do
56694dd9 3687
6eb95e99
ZW
3688 acl_save_prefix="$prefix"
3689 prefix="$acl_final_prefix"
3690 acl_save_exec_prefix="$exec_prefix"
3691 exec_prefix="$acl_final_exec_prefix"
3692 eval x=\"$x\"
3693 exec_prefix="$acl_save_exec_prefix"
3694 prefix="$acl_save_prefix"
3695
3696 if test "X$x" = "X-I$additional_includedir"; then
3697 haveit=yes
3698 break
3699 fi
3700 done
3701 if test -z "$haveit"; then
3702 if test -d "$additional_includedir"; then
3703 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
3704 fi
3705 fi
3706 fi
3707 fi
3708 fi
3709 if test -n "$found_la"; then
3710 save_libdir="$libdir"
3711 case "$found_la" in
3712 */* | *\\*) . "$found_la" ;;
3713 *) . "./$found_la" ;;
3714 esac
3715 libdir="$save_libdir"
3716 for dep in $dependency_libs; do
3717 case "$dep" in
3718 -L*)
3719 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
3720 if test "X$additional_libdir" != "X/usr/lib"; then
3721 haveit=
3722 if test "X$additional_libdir" = "X/usr/local/lib"; then
3723 if test -n "$GCC"; then
3724 case $host_os in
3725 linux*) haveit=yes;;
3726 esac
3727 fi
3728 fi
3729 if test -z "$haveit"; then
3730 haveit=
3731 for x in $LDFLAGS $LIBINTL; do
56694dd9 3732
6eb95e99
ZW
3733 acl_save_prefix="$prefix"
3734 prefix="$acl_final_prefix"
3735 acl_save_exec_prefix="$exec_prefix"
3736 exec_prefix="$acl_final_exec_prefix"
3737 eval x=\"$x\"
3738 exec_prefix="$acl_save_exec_prefix"
3739 prefix="$acl_save_prefix"
3740
3741 if test "X$x" = "X-L$additional_libdir"; then
3742 haveit=yes
3743 break
3744 fi
3745 done
3746 if test -z "$haveit"; then
3747 if test -d "$additional_libdir"; then
3748 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
3749 fi
3750 fi
3751 haveit=
3752 for x in $LDFLAGS $LTLIBINTL; do
56694dd9 3753
6eb95e99
ZW
3754 acl_save_prefix="$prefix"
3755 prefix="$acl_final_prefix"
3756 acl_save_exec_prefix="$exec_prefix"
3757 exec_prefix="$acl_final_exec_prefix"
3758 eval x=\"$x\"
3759 exec_prefix="$acl_save_exec_prefix"
3760 prefix="$acl_save_prefix"
3761
3762 if test "X$x" = "X-L$additional_libdir"; then
3763 haveit=yes
3764 break
3765 fi
3766 done
3767 if test -z "$haveit"; then
3768 if test -d "$additional_libdir"; then
3769 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
3770 fi
3771 fi
3772 fi
3773 fi
3774 ;;
3775 -R*)
3776 dir=`echo "X$dep" | sed -e 's/^X-R//'`
3777 if test "$enable_rpath" != no; then
3778 haveit=
3779 for x in $rpathdirs; do
3780 if test "X$x" = "X$dir"; then
3781 haveit=yes
3782 break
3783 fi
3784 done
3785 if test -z "$haveit"; then
3786 rpathdirs="$rpathdirs $dir"
3787 fi
3788 haveit=
3789 for x in $ltrpathdirs; do
3790 if test "X$x" = "X$dir"; then
3791 haveit=yes
3792 break
3793 fi
3794 done
3795 if test -z "$haveit"; then
3796 ltrpathdirs="$ltrpathdirs $dir"
3797 fi
3798 fi
3799 ;;
3800 -l*)
3801 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
3802 ;;
3803 *.la)
3804 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
3805 ;;
3806 *)
3807 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
3808 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
3809 ;;
3810 esac
3811 done
3812 fi
3813 else
3814 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
3815 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
3816 fi
3817 fi
3818 fi
3819 done
3820 done
3821 if test "X$rpathdirs" != "X"; then
3822 if test -n "$hardcode_libdir_separator"; then
3823 alldirs=
3824 for found_dir in $rpathdirs; do
3825 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
3826 done
3827 acl_save_libdir="$libdir"
3828 libdir="$alldirs"
3829 eval flag=\"$hardcode_libdir_flag_spec\"
3830 libdir="$acl_save_libdir"
3831 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
3832 else
3833 for found_dir in $rpathdirs; do
3834 acl_save_libdir="$libdir"
3835 libdir="$found_dir"
3836 eval flag=\"$hardcode_libdir_flag_spec\"
3837 libdir="$acl_save_libdir"
3838 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
3839 done
3840 fi
3841 fi
3842 if test "X$ltrpathdirs" != "X"; then
3843 for found_dir in $ltrpathdirs; do
3844 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
3845 done
3846 fi
3847
56694dd9
ZW
3848 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
3849echo "configure:3850: checking for GNU gettext in libintl" >&5
3850if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
3851 echo $ac_n "(cached) $ac_c" 1>&6
6eb95e99
ZW
3852else
3853 gt_save_CPPFLAGS="$CPPFLAGS"
3854 CPPFLAGS="$CPPFLAGS $INCINTL"
3855 gt_save_LIBS="$LIBS"
3856 LIBS="$LIBS $LIBINTL"
56694dd9
ZW
3857 cat > conftest.$ac_ext <<EOF
3858#line 3859 "configure"
3859#include "confdefs.h"
6eb95e99
ZW
3860#include <libintl.h>
3861extern int _nl_msg_cat_cntr;
3862extern
3863#ifdef __cplusplus
3864"C"
3865#endif
3866const char *_nl_expand_alias ();
56694dd9 3867int main() {
6eb95e99
ZW
3868bindtextdomain ("", "");
3869return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
56694dd9
ZW
3870; return 0; }
3871EOF
3872if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3873 rm -rf conftest*
6eb95e99
ZW
3874 gt_cv_func_gnugettext1_libintl=yes
3875else
56694dd9
ZW
3876 echo "configure: failed program was:" >&5
3877 cat conftest.$ac_ext >&5
3878 rm -rf conftest*
3879 gt_cv_func_gnugettext1_libintl=no
6eb95e99 3880fi
56694dd9 3881rm -f conftest*
6eb95e99
ZW
3882 if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
3883 LIBS="$LIBS $LIBICONV"
56694dd9
ZW
3884 cat > conftest.$ac_ext <<EOF
3885#line 3886 "configure"
3886#include "confdefs.h"
6eb95e99
ZW
3887#include <libintl.h>
3888extern int _nl_msg_cat_cntr;
3889extern
3890#ifdef __cplusplus
3891"C"
3892#endif
3893const char *_nl_expand_alias ();
56694dd9 3894int main() {
6eb95e99
ZW
3895bindtextdomain ("", "");
3896return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
56694dd9
ZW
3897; return 0; }
3898EOF
3899if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3900 rm -rf conftest*
6eb95e99
ZW
3901 LIBINTL="$LIBINTL $LIBICONV"
3902 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
3903 gt_cv_func_gnugettext1_libintl=yes
56694dd9 3904
6eb95e99 3905else
56694dd9
ZW
3906 echo "configure: failed program was:" >&5
3907 cat conftest.$ac_ext >&5
6eb95e99 3908fi
56694dd9 3909rm -f conftest*
6eb95e99
ZW
3910 fi
3911 CPPFLAGS="$gt_save_CPPFLAGS"
3912 LIBS="$gt_save_LIBS"
3913fi
56694dd9
ZW
3914
3915echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6eb95e99
ZW
3916 fi
3917
3918 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
3919 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
3920 && test "$PACKAGE" != gettext-runtime \
3921 && test "$PACKAGE" != gettext-tools; }; then
3922 gt_use_preinstalled_gnugettext=yes
3923 else
3924 LIBINTL=
3925 LTLIBINTL=
3926 INCINTL=
3927 fi
3928
56694dd9 3929
6eb95e99
ZW
3930 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
3931 nls_cv_use_gnu_gettext=yes
3932 fi
3933 fi
3934
3935 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3936 BUILD_INCLUDED_LIBINTL=yes
3937 USE_INCLUDED_LIBINTL=yes
3938 LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
3939 LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
3940 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
3941 fi
3942
3943 if test "$gt_use_preinstalled_gnugettext" = "yes" \
3944 || test "$nls_cv_use_gnu_gettext" = "yes"; then
3945 CATOBJEXT=.gmo
3946 fi
56694dd9 3947
6eb95e99
ZW
3948
3949 if test "$gt_use_preinstalled_gnugettext" = "yes" \
3950 || test "$nls_cv_use_gnu_gettext" = "yes"; then
56694dd9 3951 cat >> confdefs.h <<\EOF
6eb95e99 3952#define ENABLE_NLS 1
56694dd9 3953EOF
6eb95e99
ZW
3954
3955 else
3956 USE_NLS=no
3957 fi
3958 fi
3959
56694dd9
ZW
3960 echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
3961echo "configure:3962: checking whether to use NLS" >&5
3962 echo "$ac_t""$USE_NLS" 1>&6
6eb95e99 3963 if test "$USE_NLS" = "yes"; then
56694dd9
ZW
3964 echo $ac_n "checking where the gettext function comes from""... $ac_c" 1>&6
3965echo "configure:3966: checking where the gettext function comes from" >&5
6eb95e99
ZW
3966 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
3967 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
3968 gt_source="external libintl"
3969 else
3970 gt_source="libc"
3971 fi
3972 else
3973 gt_source="included intl directory"
3974 fi
56694dd9 3975 echo "$ac_t""$gt_source" 1>&6
6eb95e99
ZW
3976 fi
3977
3978 if test "$USE_NLS" = "yes"; then
3979
3980 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
3981 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
56694dd9
ZW
3982 echo $ac_n "checking how to link with libintl""... $ac_c" 1>&6
3983echo "configure:3984: checking how to link with libintl" >&5
3984 echo "$ac_t""$LIBINTL" 1>&6
3985
6eb95e99
ZW
3986 for element in $INCINTL; do
3987 haveit=
3988 for x in $CPPFLAGS; do
56694dd9 3989
6eb95e99
ZW
3990 acl_save_prefix="$prefix"
3991 prefix="$acl_final_prefix"
3992 acl_save_exec_prefix="$exec_prefix"
3993 exec_prefix="$acl_final_exec_prefix"
3994 eval x=\"$x\"
3995 exec_prefix="$acl_save_exec_prefix"
3996 prefix="$acl_save_prefix"
3997
3998 if test "X$x" = "X$element"; then
3999 haveit=yes
4000 break
4001 fi
4002 done
4003 if test -z "$haveit"; then
4004 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
4005 fi
4006 done
4007
4008 fi
4009
56694dd9 4010 cat >> confdefs.h <<\EOF
6eb95e99 4011#define HAVE_GETTEXT 1
56694dd9 4012EOF
6eb95e99 4013
56694dd9 4014 cat >> confdefs.h <<\EOF
6eb95e99 4015#define HAVE_DCGETTEXT 1
56694dd9 4016EOF
6eb95e99
ZW
4017
4018 fi
4019
4020 POSUB=po
56694dd9 4021 fi
6eb95e99 4022
56694dd9
ZW
4023
4024 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
4025 BUILD_INCLUDED_LIBINTL=yes
4026 fi
6eb95e99 4027
56694dd9
ZW
4028
4029
4030
6eb95e99 4031
56694dd9
ZW
4032 nls_cv_header_intl=
4033 nls_cv_header_libgt=
6eb95e99 4034
56694dd9
ZW
4035 DATADIRNAME=share
4036
6eb95e99 4037
56694dd9
ZW
4038 INSTOBJEXT=.mo
4039
6eb95e99 4040
56694dd9
ZW
4041 GENCAT=gencat
4042
6eb95e99 4043
56694dd9
ZW
4044 if test "$USE_INCLUDED_LIBINTL" = yes; then
4045 INTLOBJS="\$(GETTOBJS)"
4046 fi
4047
6eb95e99 4048
56694dd9
ZW
4049 INTL_LIBTOOL_SUFFIX_PREFIX=
4050
4051
6eb95e99 4052
56694dd9
ZW
4053 INTLLIBS="$LIBINTL"
4054
6eb95e99 4055
56694dd9
ZW
4056
4057
4058
6eb95e99
ZW
4059
4060
56694dd9 4061cat >> confdefs.h <<\EOF
6eb95e99 4062#define IN_LIBINTL 1
56694dd9 4063EOF
6eb95e99 4064
56694dd9 4065cat >> confdefs.h <<\EOF
6eb95e99 4066#define IN_LIBRARY 1
56694dd9 4067EOF
6eb95e99 4068
56694dd9 4069cat >> confdefs.h <<\EOF
6eb95e99 4070#define DEPENDS_ON_LIBICONV 1
56694dd9 4071EOF
6eb95e99 4072
56694dd9 4073cat >> confdefs.h <<\EOF
6eb95e99 4074#define ENABLE_RELOCATABLE 1
56694dd9 4075EOF
6eb95e99 4076
56694dd9 4077cat >> confdefs.h <<\EOF
6eb95e99 4078#define NO_XMALLOC 1
56694dd9 4079EOF
6eb95e99 4080
56694dd9 4081cat >> confdefs.h <<\EOF
6eb95e99 4082#define set_relocation_prefix libintl_set_relocation_prefix
56694dd9 4083EOF
6eb95e99 4084
56694dd9 4085cat >> confdefs.h <<\EOF
6eb95e99 4086#define relocate libintl_relocate
56694dd9 4087EOF
6eb95e99
ZW
4088
4089
56694dd9
ZW
4090LIBINTL_DEP=
4091INCINTL=
4092
4093if test $USE_INCLUDED_LIBINTL = yes; then
4094 LIBINTL_DEP='${top_builddir}/intl/libintl.a'
4095 INCINTL='-I${top_builddir}/intl'
4096fi
4097
4098trap '' 1 2 15
4099cat > confcache <<\EOF
6eb95e99
ZW
4100# This file is a shell script that caches the results of configure
4101# tests run on this system so they can be shared between configure
56694dd9
ZW
4102# scripts and configure runs. It is not useful on other systems.
4103# If it contains results you don't want to keep, you may remove or edit it.
6eb95e99 4104#
56694dd9
ZW
4105# By default, configure uses ./config.cache as the cache file,
4106# creating it if it does not exist already. You can give configure
4107# the --cache-file=FILE option to use a different cache file; that is
4108# what configure does when it calls configure scripts in
4109# subdirectories, so they share the cache.
4110# Giving --cache-file=/dev/null disables caching, for debugging configure.
4111# config.status only pays attention to the cache file if you give it the
4112# --recheck option to rerun configure.
6eb95e99 4113#
56694dd9 4114EOF
6eb95e99
ZW
4115# The following way of writing the cache mishandles newlines in values,
4116# but we know of no workaround that is simple, portable, and efficient.
4117# So, don't put newlines in cache variables' values.
4118# Ultrix sh set writes to stderr and can't be redirected directly,
4119# and sets the high bit in the cache file unless we assign to the vars.
56694dd9
ZW
4120(set) 2>&1 |
4121 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4122 *ac_space=\ *)
4123 # `set' does not quote correctly, so add quotes (double-quote substitution
4124 # turns \\\\ into \\, and sed turns \\ into \).
4125 sed -n \
4126 -e "s/'/'\\\\''/g" \
4127 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4128 ;;
4129 *)
4130 # `set' quotes correctly as required by POSIX, so do not add quotes.
4131 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4132 ;;
4133 esac >> confcache
4134if cmp -s $cache_file confcache; then
4135 :
4136else
6eb95e99 4137 if test -w $cache_file; then
56694dd9
ZW
4138 echo "updating cache $cache_file"
4139 cat confcache > $cache_file
6eb95e99
ZW
4140 else
4141 echo "not updating unwritable cache $cache_file"
4142 fi
4143fi
4144rm -f confcache
4145
56694dd9
ZW
4146trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4147
6eb95e99
ZW
4148test "x$prefix" = xNONE && prefix=$ac_default_prefix
4149# Let make expand exec_prefix.
4150test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4151
56694dd9
ZW
4152# Any assignment to VPATH causes Sun make to only execute
4153# the first set of double-colon rules, so remove it if not needed.
4154# If there is a colon in the path, we need to keep it.
6eb95e99 4155if test "x$srcdir" = x.; then
56694dd9 4156 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6eb95e99
ZW
4157fi
4158
56694dd9 4159trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6eb95e99 4160
56694dd9 4161DEFS=-DHAVE_CONFIG_H
6eb95e99 4162
56694dd9 4163# Without the "./", some shells look in PATH for config.status.
6eb95e99 4164: ${CONFIG_STATUS=./config.status}
56694dd9
ZW
4165
4166echo creating $CONFIG_STATUS
4167rm -f $CONFIG_STATUS
4168cat > $CONFIG_STATUS <<EOF
4169#! /bin/sh
4170# Generated automatically by configure.
6eb95e99 4171# Run this file to recreate the current configuration.
56694dd9
ZW
4172# This directory was configured as follows,
4173# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4174#
4175# $0 $ac_configure_args
4176#
6eb95e99 4177# Compiler output produced by configure, useful for debugging
56694dd9 4178# configure, is in ./config.log if it exists.
6eb95e99 4179
56694dd9
ZW
4180ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4181for ac_option
6eb95e99 4182do
56694dd9
ZW
4183 case "\$ac_option" in
4184 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4185 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4186 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4187 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4188 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4189 exit 0 ;;
4190 -help | --help | --hel | --he | --h)
4191 echo "\$ac_cs_usage"; exit 0 ;;
4192 *) echo "\$ac_cs_usage"; exit 1 ;;
4193 esac
6eb95e99
ZW
4194done
4195
56694dd9
ZW
4196ac_given_srcdir=$srcdir
4197ac_given_INSTALL="$INSTALL"
6eb95e99 4198
56694dd9
ZW
4199trap 'rm -fr `echo "Makefile config.intl config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4200EOF
4201cat >> $CONFIG_STATUS <<EOF
6eb95e99 4202
56694dd9
ZW
4203# Protect against being on the right side of a sed subst in config.status.
4204sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4205 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4206$ac_vpsub
4207$extrasub
4208s%@SHELL@%$SHELL%g
4209s%@CFLAGS@%$CFLAGS%g
4210s%@CPPFLAGS@%$CPPFLAGS%g
4211s%@CXXFLAGS@%$CXXFLAGS%g
4212s%@FFLAGS@%$FFLAGS%g
4213s%@DEFS@%$DEFS%g
4214s%@LDFLAGS@%$LDFLAGS%g
4215s%@LIBS@%$LIBS%g
4216s%@exec_prefix@%$exec_prefix%g
4217s%@prefix@%$prefix%g
4218s%@program_transform_name@%$program_transform_name%g
4219s%@bindir@%$bindir%g
4220s%@sbindir@%$sbindir%g
4221s%@libexecdir@%$libexecdir%g
4222s%@datadir@%$datadir%g
4223s%@sysconfdir@%$sysconfdir%g
4224s%@sharedstatedir@%$sharedstatedir%g
4225s%@localstatedir@%$localstatedir%g
4226s%@libdir@%$libdir%g
4227s%@includedir@%$includedir%g
4228s%@oldincludedir@%$oldincludedir%g
4229s%@infodir@%$infodir%g
4230s%@mandir@%$mandir%g
4231s%@SET_MAKE@%$SET_MAKE%g
4232s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4233s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4234s%@INSTALL_DATA@%$INSTALL_DATA%g
4235s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4236s%@USE_NLS@%$USE_NLS%g
4237s%@MSGFMT@%$MSGFMT%g
4238s%@GMSGFMT@%$GMSGFMT%g
4239s%@XGETTEXT@%$XGETTEXT%g
4240s%@MSGMERGE@%$MSGMERGE%g
4241s%@CC@%$CC%g
4242s%@host@%$host%g
4243s%@host_alias@%$host_alias%g
4244s%@host_cpu@%$host_cpu%g
4245s%@host_vendor@%$host_vendor%g
4246s%@host_os@%$host_os%g
4247s%@RANLIB@%$RANLIB%g
4248s%@CPP@%$CPP%g
4249s%@ALLOCA@%$ALLOCA%g
4250s%@GLIBC21@%$GLIBC21%g
4251s%@LIBICONV@%$LIBICONV%g
4252s%@LTLIBICONV@%$LTLIBICONV%g
4253s%@INTLBISON@%$INTLBISON%g
4254s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
4255s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4256s%@CATOBJEXT@%$CATOBJEXT%g
4257s%@DATADIRNAME@%$DATADIRNAME%g
4258s%@INSTOBJEXT@%$INSTOBJEXT%g
4259s%@GENCAT@%$GENCAT%g
4260s%@INTLOBJS@%$INTLOBJS%g
4261s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
4262s%@INTLLIBS@%$INTLLIBS%g
4263s%@LIBINTL@%$LIBINTL%g
4264s%@LTLIBINTL@%$LTLIBINTL%g
4265s%@POSUB@%$POSUB%g
4266s%@LIBINTL_DEP@%$LIBINTL_DEP%g
4267s%@INCINTL@%$INCINTL%g
6eb95e99 4268
56694dd9
ZW
4269CEOF
4270EOF
4271
4272cat >> $CONFIG_STATUS <<\EOF
4273
4274# Split the substitutions into bite-sized pieces for seds with
4275# small command number limits, like on Digital OSF/1 and HP-UX.
4276ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4277ac_file=1 # Number of current file.
4278ac_beg=1 # First line for current file.
4279ac_end=$ac_max_sed_cmds # Line after last line for current file.
4280ac_more_lines=:
4281ac_sed_cmds=""
4282while $ac_more_lines; do
4283 if test $ac_beg -gt 1; then
4284 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6eb95e99 4285 else
56694dd9 4286 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6eb95e99 4287 fi
56694dd9
ZW
4288 if test ! -s conftest.s$ac_file; then
4289 ac_more_lines=false
4290 rm -f conftest.s$ac_file
6eb95e99 4291 else
56694dd9
ZW
4292 if test -z "$ac_sed_cmds"; then
4293 ac_sed_cmds="sed -f conftest.s$ac_file"
4294 else
4295 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4296 fi
4297 ac_file=`expr $ac_file + 1`
4298 ac_beg=$ac_end
4299 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6eb95e99 4300 fi
6eb95e99 4301done
56694dd9
ZW
4302if test -z "$ac_sed_cmds"; then
4303 ac_sed_cmds=cat
6eb95e99 4304fi
56694dd9 4305EOF
6eb95e99 4306
56694dd9 4307cat >> $CONFIG_STATUS <<EOF
6eb95e99 4308
56694dd9
ZW
4309CONFIG_FILES=\${CONFIG_FILES-"Makefile config.intl"}
4310EOF
4311cat >> $CONFIG_STATUS <<\EOF
4312for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6eb95e99 4313 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
56694dd9
ZW
4314 case "$ac_file" in
4315 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4316 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4317 *) ac_file_in="${ac_file}.in" ;;
6eb95e99
ZW
4318 esac
4319
56694dd9 4320 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6eb95e99 4321
56694dd9
ZW
4322 # Remove last slash and all that follows it. Not all systems have dirname.
4323 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4324 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4325 # The file is in a subdirectory.
4326 test ! -d "$ac_dir" && mkdir "$ac_dir"
4327 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4328 # A "../" for each directory in $ac_dir_suffix.
4329 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4330 else
4331 ac_dir_suffix= ac_dots=
4332 fi
6eb95e99 4333
56694dd9
ZW
4334 case "$ac_given_srcdir" in
4335 .) srcdir=.
4336 if test -z "$ac_dots"; then top_srcdir=.
4337 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4338 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6eb95e99 4339 *) # Relative path.
56694dd9
ZW
4340 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4341 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6eb95e99
ZW
4342 esac
4343
56694dd9
ZW
4344 case "$ac_given_INSTALL" in
4345 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4346 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4347 esac
6eb95e99 4348
56694dd9
ZW
4349 echo creating "$ac_file"
4350 rm -f "$ac_file"
4351 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4352 case "$ac_file" in
4353 *Makefile*) ac_comsub="1i\\
4354# $configure_input" ;;
4355 *) ac_comsub= ;;
4356 esac
6eb95e99 4357
56694dd9
ZW
4358 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4359 sed -e "$ac_comsub
4360s%@configure_input@%$configure_input%g
4361s%@srcdir@%$srcdir%g
4362s%@top_srcdir@%$top_srcdir%g
4363s%@INSTALL@%$INSTALL%g
4364" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4365fi; done
4366rm -f conftest.s*
6eb95e99
ZW
4367
4368# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4369# NAME is the cpp macro being defined and VALUE is the value it is being given.
4370#
4371# ac_d sets the value in "#define NAME VALUE" lines.
56694dd9
ZW
4372ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4373ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4374ac_dC='\3'
4375ac_dD='%g'
4376# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4377ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4378ac_uB='\([ ]\)%\1#\2define\3'
6eb95e99 4379ac_uC=' '
56694dd9
ZW
4380ac_uD='\4%g'
4381# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4382ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4383ac_eB='$%\1#\2define\3'
4384ac_eC=' '
4385ac_eD='%g'
4386
4387if test "${CONFIG_HEADERS+set}" != set; then
4388EOF
4389cat >> $CONFIG_STATUS <<EOF
4390 CONFIG_HEADERS="config.h"
4391EOF
4392cat >> $CONFIG_STATUS <<\EOF
4393fi
4394for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6eb95e99 4395 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
56694dd9
ZW
4396 case "$ac_file" in
4397 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4398 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4399 *) ac_file_in="${ac_file}.in" ;;
6eb95e99
ZW
4400 esac
4401
56694dd9
ZW
4402 echo creating $ac_file
4403
4404 rm -f conftest.frag conftest.in conftest.out
4405 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4406 cat $ac_file_inputs > conftest.in
4407
4408EOF
4409
4410# Transform confdefs.h into a sed script conftest.vals that substitutes
4411# the proper values into config.h.in to produce config.h. And first:
4412# Protect against being on the right side of a sed subst in config.status.
4413# Protect against being in an unquoted here document in config.status.
4414rm -f conftest.vals
4415cat > conftest.hdr <<\EOF
4416s/[\\&%]/\\&/g
4417s%[\\$`]%\\&%g
4418s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4419s%ac_d%ac_u%gp
4420s%ac_u%ac_e%gp
4421EOF
4422sed -n -f conftest.hdr confdefs.h > conftest.vals
4423rm -f conftest.hdr
6eb95e99
ZW
4424
4425# This sed command replaces #undef with comments. This is necessary, for
4426# example, in the case of _POSIX_SOURCE, which is predefined and required
4427# on some systems where configure will not decide to define it.
56694dd9
ZW
4428cat >> conftest.vals <<\EOF
4429s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4430EOF
4431
4432# Break up conftest.vals because some shells have a limit on
4433# the size of here documents, and old seds have small limits too.
6eb95e99 4434
6eb95e99 4435rm -f conftest.tail
56694dd9 4436while :
6eb95e99 4437do
56694dd9
ZW
4438 ac_lines=`grep -c . conftest.vals`
4439 # grep -c gives empty output for an empty file on some AIX systems.
4440 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4441 # Write a limited-size here document to conftest.frag.
4442 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4443 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6eb95e99 4444 echo 'CEOF
56694dd9
ZW
4445 sed -f conftest.frag conftest.in > conftest.out
4446 rm -f conftest.in
4447 mv conftest.out conftest.in
4448' >> $CONFIG_STATUS
4449 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4450 rm -f conftest.vals
4451 mv conftest.tail conftest.vals
6eb95e99 4452done
56694dd9
ZW
4453rm -f conftest.vals
4454
4455cat >> $CONFIG_STATUS <<\EOF
4456 rm -f conftest.frag conftest.h
4457 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4458 cat conftest.in >> conftest.h
4459 rm -f conftest.in
4460 if cmp -s $ac_file conftest.h 2>/dev/null; then
4461 echo "$ac_file is unchanged"
4462 rm -f conftest.h
6eb95e99 4463 else
56694dd9
ZW
4464 # Remove last slash and all that follows it. Not all systems have dirname.
4465 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4466 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4467 # The file is in a subdirectory.
4468 test ! -d "$ac_dir" && mkdir "$ac_dir"
6eb95e99 4469 fi
56694dd9
ZW
4470 rm -f $ac_file
4471 mv conftest.h $ac_file
6eb95e99 4472 fi
56694dd9
ZW
4473fi; done
4474
4475EOF
4476cat >> $CONFIG_STATUS <<EOF
4477# Capture the value of obsolete ALL_LINGUAS because we need it to compute
4478 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
4479 # from automake.
4480 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
4481 # Capture the value of LINGUAS because we need it to compute CATALOGS.
4482 LINGUAS="${LINGUAS-%UNSET%}"
4483
4484
4485EOF
4486cat >> $CONFIG_STATUS <<\EOF
6eb95e99 4487
6eb95e99
ZW
4488 for ac_file in $CONFIG_FILES; do
4489 # Support "outfile[:infile[:infile...]]"
4490 case "$ac_file" in
4491 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4492 esac
4493 # PO directories have a Makefile.in generated from Makefile.in.in.
4494 case "$ac_file" in */Makefile.in)
4495 # Adjust a relative srcdir.
4496 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
4497 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
4498 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
4499 # In autoconf-2.13 it is called $ac_given_srcdir.
4500 # In autoconf-2.50 it is called $srcdir.
4501 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
4502 case "$ac_given_srcdir" in
4503 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
4504 /*) top_srcdir="$ac_given_srcdir" ;;
4505 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
4506 esac
4507 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4508 rm -f "$ac_dir/POTFILES"
4509 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4510 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4511 POMAKEFILEDEPS="POTFILES.in"
4512 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
4513 # on $ac_dir but don't depend on user-specified configuration
4514 # parameters.
4515 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
4516 # The LINGUAS file contains the set of available languages.
4517 if test -n "$OBSOLETE_ALL_LINGUAS"; then
4518 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
4519 fi
4520 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
4521 # Hide the ALL_LINGUAS assigment from automake.
4522 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
4523 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
4524 else
4525 # The set of available languages was given in configure.in.
4526 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
4527 fi
4528 case "$ac_given_srcdir" in
4529 .) srcdirpre= ;;
4530 *) srcdirpre='$(srcdir)/' ;;
4531 esac
4532 POFILES=
4533 GMOFILES=
4534 UPDATEPOFILES=
4535 DUMMYPOFILES=
4536 for lang in $ALL_LINGUAS; do
4537 POFILES="$POFILES $srcdirpre$lang.po"
4538 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
4539 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
4540 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
4541 done
4542 # CATALOGS depends on both $ac_dir and the user's LINGUAS
4543 # environment variable.
4544 INST_LINGUAS=
4545 if test -n "$ALL_LINGUAS"; then
4546 for presentlang in $ALL_LINGUAS; do
4547 useit=no
4548 if test "%UNSET%" != "$LINGUAS"; then
4549 desiredlanguages="$LINGUAS"
4550 else
4551 desiredlanguages="$ALL_LINGUAS"
4552 fi
4553 for desiredlang in $desiredlanguages; do
4554 # Use the presentlang catalog if desiredlang is
4555 # a. equal to presentlang, or
4556 # b. a variant of presentlang (because in this case,
4557 # presentlang can be used as a fallback for messages
4558 # which are not translated in the desiredlang catalog).
4559 case "$desiredlang" in
4560 "$presentlang"*) useit=yes;;
4561 esac
4562 done
4563 if test $useit = yes; then
4564 INST_LINGUAS="$INST_LINGUAS $presentlang"
4565 fi
4566 done
4567 fi
4568 CATALOGS=
4569 if test -n "$INST_LINGUAS"; then
4570 for lang in $INST_LINGUAS; do
4571 CATALOGS="$CATALOGS $lang.gmo"
4572 done
4573 fi
4574 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
4575 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
4576 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
4577 if test -f "$f"; then
4578 case "$f" in
4579 *.orig | *.bak | *~) ;;
4580 *) cat "$f" >> "$ac_dir/Makefile" ;;
4581 esac
4582 fi
4583 done
4584 fi
4585 ;;
4586 esac
56694dd9 4587 done
6eb95e99 4588
56694dd9
ZW
4589exit 0
4590EOF
6eb95e99 4591chmod +x $CONFIG_STATUS
56694dd9
ZW
4592rm -fr confdefs* $ac_clean_files
4593test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6eb95e99 4594