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