Commit | Line | Data |
---|---|---|
252b5132 | 1 | #! /bin/sh |
252b5132 | 2 | # Guess values for system-dependent variables and create Makefiles. |
85f969cd | 3 | # Generated by GNU Autoconf 2.59. |
252b5132 | 4 | # |
58670637 | 5 | # Copyright (C) 2003 Free Software Foundation, Inc. |
252b5132 RH |
6 | # This configure script is free software; the Free Software Foundation |
7 | # gives unlimited permission to copy, distribute and modify it. | |
2299a76d DJ |
8 | ## --------------------- ## |
9 | ## M4sh Initialization. ## | |
10 | ## --------------------- ## | |
11 | ||
12 | # Be Bourne compatible | |
13 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
14 | emulate sh | |
15 | NULLCMD=: | |
16 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17 | # is contrary to our usage. Disable this feature. | |
18 | alias -g '${1+"$@"}'='"$@"' | |
19 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
20 | set -o posix | |
21 | fi | |
58670637 | 22 | DUALCASE=1; export DUALCASE # for MKS sh |
2299a76d DJ |
23 | |
24 | # Support unset when possible. | |
58670637 | 25 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
2299a76d DJ |
26 | as_unset=unset |
27 | else | |
28 | as_unset=false | |
29 | fi | |
30 | ||
31 | ||
32 | # Work around bugs in pre-3.0 UWIN ksh. | |
33 | $as_unset ENV MAIL MAILPATH | |
34 | PS1='$ ' | |
35 | PS2='> ' | |
36 | PS4='+ ' | |
37 | ||
38 | # NLS nuisances. | |
39 | for as_var in \ | |
40 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
41 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
42 | LC_TELEPHONE LC_TIME | |
43 | do | |
58670637 | 44 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
2299a76d DJ |
45 | eval $as_var=C; export $as_var |
46 | else | |
47 | $as_unset $as_var | |
48 | fi | |
49 | done | |
50 | ||
51 | # Required to use basename. | |
52 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
53 | as_expr=expr | |
54 | else | |
55 | as_expr=false | |
56 | fi | |
57 | ||
58 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | |
59 | as_basename=basename | |
60 | else | |
61 | as_basename=false | |
62 | fi | |
63 | ||
64 | ||
65 | # Name of the executable. | |
66 | as_me=`$as_basename "$0" || | |
67 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
68 | X"$0" : 'X\(//\)$' \| \ | |
69 | X"$0" : 'X\(/\)$' \| \ | |
70 | . : '\(.\)' 2>/dev/null || | |
71 | echo X/"$0" | | |
72 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
73 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
74 | /^X\/\(\/\).*/{ s//\1/; q; } | |
75 | s/.*/./; q'` | |
76 | ||
77 | ||
78 | # PATH needs CR, and LINENO needs CR and PATH. | |
79 | # Avoid depending upon Character Ranges. | |
80 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
81 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
82 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
83 | as_cr_digits='0123456789' | |
84 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
85 | ||
86 | # The user is always right. | |
87 | if test "${PATH_SEPARATOR+set}" != set; then | |
88 | echo "#! /bin/sh" >conf$$.sh | |
89 | echo "exit 0" >>conf$$.sh | |
90 | chmod +x conf$$.sh | |
91 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
92 | PATH_SEPARATOR=';' | |
93 | else | |
94 | PATH_SEPARATOR=: | |
95 | fi | |
96 | rm -f conf$$.sh | |
97 | fi | |
98 | ||
99 | ||
100 | as_lineno_1=$LINENO | |
101 | as_lineno_2=$LINENO | |
102 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
103 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
104 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
105 | # Find who we are. Look in the path if we contain no path at all | |
106 | # relative or not. | |
107 | case $0 in | |
108 | *[\\/]* ) as_myself=$0 ;; | |
109 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
110 | for as_dir in $PATH | |
111 | do | |
112 | IFS=$as_save_IFS | |
113 | test -z "$as_dir" && as_dir=. | |
114 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
115 | done | |
116 | ||
117 | ;; | |
118 | esac | |
119 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
120 | # in which case we are not to be found in the path. | |
121 | if test "x$as_myself" = x; then | |
122 | as_myself=$0 | |
123 | fi | |
124 | if test ! -f "$as_myself"; then | |
125 | { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | |
126 | { (exit 1); exit 1; }; } | |
127 | fi | |
128 | case $CONFIG_SHELL in | |
129 | '') | |
130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
131 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
132 | do | |
133 | IFS=$as_save_IFS | |
134 | test -z "$as_dir" && as_dir=. | |
135 | for as_base in sh bash ksh sh5; do | |
136 | case $as_dir in | |
137 | /*) | |
138 | if ("$as_dir/$as_base" -c ' | |
139 | as_lineno_1=$LINENO | |
140 | as_lineno_2=$LINENO | |
141 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
142 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
143 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
144 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
145 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
146 | CONFIG_SHELL=$as_dir/$as_base | |
147 | export CONFIG_SHELL | |
148 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
149 | fi;; | |
150 | esac | |
151 | done | |
152 | done | |
153 | ;; | |
154 | esac | |
155 | ||
156 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
157 | # uniformly replaced by the line number. The first 'sed' inserts a | |
158 | # line-number line before each line; the second 'sed' does the real | |
159 | # work. The second script uses 'N' to pair each line-number line | |
160 | # with the numbered line, and appends trailing '-' during | |
161 | # substitution so that $LINENO is not a special case at line end. | |
162 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
163 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
164 | sed '=' <$as_myself | | |
165 | sed ' | |
166 | N | |
167 | s,$,-, | |
168 | : loop | |
169 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
170 | t loop | |
171 | s,-$,, | |
172 | s,^['$as_cr_digits']*\n,, | |
173 | ' >$as_me.lineno && | |
174 | chmod +x $as_me.lineno || | |
175 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
176 | { (exit 1); exit 1; }; } | |
177 | ||
178 | # Don't try to exec as it changes $[0], causing all sort of problems | |
179 | # (the dirname of $[0] is not the place where we might find the | |
180 | # original and so on. Autoconf is especially sensible to this). | |
181 | . ./$as_me.lineno | |
182 | # Exit status is that of the last command. | |
183 | exit | |
184 | } | |
185 | ||
186 | ||
187 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
188 | *c*,-n*) ECHO_N= ECHO_C=' | |
189 | ' ECHO_T=' ' ;; | |
190 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
191 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
192 | esac | |
193 | ||
194 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
195 | as_expr=expr | |
196 | else | |
197 | as_expr=false | |
198 | fi | |
199 | ||
200 | rm -f conf$$ conf$$.exe conf$$.file | |
201 | echo >conf$$.file | |
202 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
203 | # We could just check for DJGPP; but this test a) works b) is more generic | |
204 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
205 | if test -f conf$$.exe; then | |
206 | # Don't use ln at all; we don't have any links | |
207 | as_ln_s='cp -p' | |
208 | else | |
209 | as_ln_s='ln -s' | |
210 | fi | |
211 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
212 | as_ln_s=ln | |
213 | else | |
214 | as_ln_s='cp -p' | |
215 | fi | |
216 | rm -f conf$$ conf$$.exe conf$$.file | |
217 | ||
218 | if mkdir -p . 2>/dev/null; then | |
219 | as_mkdir_p=: | |
220 | else | |
58670637 | 221 | test -d ./-p && rmdir ./-p |
2299a76d DJ |
222 | as_mkdir_p=false |
223 | fi | |
224 | ||
225 | as_executable_p="test -f" | |
226 | ||
227 | # Sed expression to map a string onto a valid CPP name. | |
58670637 | 228 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
229 | |
230 | # Sed expression to map a string onto a valid variable name. | |
58670637 | 231 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
232 | |
233 | ||
234 | # IFS | |
235 | # We need space, tab and new line, in precisely that order. | |
236 | as_nl=' | |
237 | ' | |
238 | IFS=" $as_nl" | |
239 | ||
240 | # CDPATH. | |
241 | $as_unset CDPATH | |
242 | ||
243 | ||
244 | # Name of the host. | |
245 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
246 | # so uname gets run too. | |
247 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
248 | ||
249 | exec 6>&1 | |
252b5132 | 250 | |
2299a76d DJ |
251 | # |
252 | # Initializations. | |
253 | # | |
252b5132 | 254 | ac_default_prefix=/usr/local |
2299a76d DJ |
255 | ac_config_libobj_dir=. |
256 | cross_compiling=no | |
257 | subdirs= | |
258 | MFLAGS= | |
259 | MAKEFLAGS= | |
260 | SHELL=${CONFIG_SHELL-/bin/sh} | |
261 | ||
262 | # Maximum number of lines to put in a shell here document. | |
263 | # This variable seems obsolete. It should probably be removed, and | |
264 | # only ac_max_sed_lines should be used. | |
265 | : ${ac_max_here_lines=38} | |
266 | ||
267 | # Identity of this package. | |
268 | PACKAGE_NAME= | |
269 | PACKAGE_TARNAME= | |
270 | PACKAGE_VERSION= | |
271 | PACKAGE_STRING= | |
272 | PACKAGE_BUGREPORT= | |
273 | ||
274 | ac_unique_file="xmalloc.c" | |
275 | # Factoring default headers for most tests. | |
276 | ac_includes_default="\ | |
277 | #include <stdio.h> | |
278 | #if HAVE_SYS_TYPES_H | |
279 | # include <sys/types.h> | |
280 | #endif | |
281 | #if HAVE_SYS_STAT_H | |
282 | # include <sys/stat.h> | |
283 | #endif | |
284 | #if STDC_HEADERS | |
285 | # include <stdlib.h> | |
286 | # include <stddef.h> | |
287 | #else | |
288 | # if HAVE_STDLIB_H | |
289 | # include <stdlib.h> | |
290 | # endif | |
291 | #endif | |
292 | #if HAVE_STRING_H | |
293 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
294 | # include <memory.h> | |
295 | # endif | |
296 | # include <string.h> | |
297 | #endif | |
298 | #if HAVE_STRINGS_H | |
299 | # include <strings.h> | |
300 | #endif | |
301 | #if HAVE_INTTYPES_H | |
302 | # include <inttypes.h> | |
303 | #else | |
304 | # if HAVE_STDINT_H | |
305 | # include <stdint.h> | |
306 | # endif | |
307 | #endif | |
308 | #if HAVE_UNISTD_H | |
309 | # include <unistd.h> | |
310 | #endif" | |
311 | ||
545c9aee | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST datarootdir docdir htmldir LTLIBOBJS' |
2299a76d | 313 | ac_subst_files='host_makefile_frag' |
252b5132 RH |
314 | |
315 | # Initialize some variables set by options. | |
2299a76d DJ |
316 | ac_init_help= |
317 | ac_init_version=false | |
252b5132 RH |
318 | # The variables have the same names as the options, with |
319 | # dashes changed to underlines. | |
2299a76d | 320 | cache_file=/dev/null |
252b5132 | 321 | exec_prefix=NONE |
252b5132 | 322 | no_create= |
252b5132 RH |
323 | no_recursion= |
324 | prefix=NONE | |
325 | program_prefix=NONE | |
326 | program_suffix=NONE | |
327 | program_transform_name=s,x,x, | |
328 | silent= | |
329 | site= | |
330 | srcdir= | |
252b5132 RH |
331 | verbose= |
332 | x_includes=NONE | |
333 | x_libraries=NONE | |
2299a76d DJ |
334 | |
335 | # Installation directory options. | |
336 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
337 | # and all the variables that are supposed to be based on exec_prefix | |
338 | # by default will actually change. | |
339 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
252b5132 RH |
340 | bindir='${exec_prefix}/bin' |
341 | sbindir='${exec_prefix}/sbin' | |
342 | libexecdir='${exec_prefix}/libexec' | |
343 | datadir='${prefix}/share' | |
344 | sysconfdir='${prefix}/etc' | |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
347 | libdir='${exec_prefix}/lib' | |
348 | includedir='${prefix}/include' | |
349 | oldincludedir='/usr/include' | |
350 | infodir='${prefix}/info' | |
351 | mandir='${prefix}/man' | |
352 | ||
252b5132 RH |
353 | ac_prev= |
354 | for ac_option | |
355 | do | |
252b5132 RH |
356 | # If the previous option needs an argument, assign it. |
357 | if test -n "$ac_prev"; then | |
358 | eval "$ac_prev=\$ac_option" | |
359 | ac_prev= | |
360 | continue | |
361 | fi | |
362 | ||
2299a76d | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
252b5132 RH |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
2299a76d | 367 | case $ac_option in |
252b5132 RH |
368 | |
369 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
370 | ac_prev=bindir ;; | |
371 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
2299a76d | 372 | bindir=$ac_optarg ;; |
252b5132 RH |
373 | |
374 | -build | --build | --buil | --bui | --bu) | |
2299a76d | 375 | ac_prev=build_alias ;; |
252b5132 | 376 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
2299a76d | 377 | build_alias=$ac_optarg ;; |
252b5132 RH |
378 | |
379 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
380 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
381 | ac_prev=cache_file ;; | |
382 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
383 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
2299a76d DJ |
384 | cache_file=$ac_optarg ;; |
385 | ||
386 | --config-cache | -C) | |
387 | cache_file=config.cache ;; | |
252b5132 RH |
388 | |
389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
390 | ac_prev=datadir ;; | |
391 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
392 | | --da=*) | |
2299a76d | 393 | datadir=$ac_optarg ;; |
252b5132 RH |
394 | |
395 | -disable-* | --disable-*) | |
2299a76d | 396 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
252b5132 | 397 | # Reject names that are not valid shell variable names. |
2299a76d DJ |
398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
400 | { (exit 1); exit 1; }; } | |
401 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
402 | eval "enable_$ac_feature=no" ;; | |
252b5132 RH |
403 | |
404 | -enable-* | --enable-*) | |
2299a76d | 405 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
252b5132 | 406 | # Reject names that are not valid shell variable names. |
2299a76d DJ |
407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
409 | { (exit 1); exit 1; }; } | |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
252b5132 RH |
413 | *) ac_optarg=yes ;; |
414 | esac | |
2299a76d | 415 | eval "enable_$ac_feature='$ac_optarg'" ;; |
252b5132 RH |
416 | |
417 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
418 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
419 | | --exec | --exe | --ex) | |
420 | ac_prev=exec_prefix ;; | |
421 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
422 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
423 | | --exec=* | --exe=* | --ex=*) | |
2299a76d | 424 | exec_prefix=$ac_optarg ;; |
252b5132 RH |
425 | |
426 | -gas | --gas | --ga | --g) | |
427 | # Obsolete; use --with-gas. | |
428 | with_gas=yes ;; | |
429 | ||
2299a76d DJ |
430 | -help | --help | --hel | --he | -h) |
431 | ac_init_help=long ;; | |
432 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
433 | ac_init_help=recursive ;; | |
434 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
435 | ac_init_help=short ;; | |
252b5132 RH |
436 | |
437 | -host | --host | --hos | --ho) | |
2299a76d | 438 | ac_prev=host_alias ;; |
252b5132 | 439 | -host=* | --host=* | --hos=* | --ho=*) |
2299a76d | 440 | host_alias=$ac_optarg ;; |
252b5132 RH |
441 | |
442 | -includedir | --includedir | --includedi | --included | --include \ | |
443 | | --includ | --inclu | --incl | --inc) | |
444 | ac_prev=includedir ;; | |
445 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
446 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
2299a76d | 447 | includedir=$ac_optarg ;; |
252b5132 RH |
448 | |
449 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
450 | ac_prev=infodir ;; | |
451 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
2299a76d | 452 | infodir=$ac_optarg ;; |
252b5132 RH |
453 | |
454 | -libdir | --libdir | --libdi | --libd) | |
455 | ac_prev=libdir ;; | |
456 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
2299a76d | 457 | libdir=$ac_optarg ;; |
252b5132 RH |
458 | |
459 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
460 | | --libexe | --libex | --libe) | |
461 | ac_prev=libexecdir ;; | |
462 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
463 | | --libexe=* | --libex=* | --libe=*) | |
2299a76d | 464 | libexecdir=$ac_optarg ;; |
252b5132 RH |
465 | |
466 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
467 | | --localstate | --localstat | --localsta | --localst \ | |
468 | | --locals | --local | --loca | --loc | --lo) | |
469 | ac_prev=localstatedir ;; | |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
471 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
472 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
2299a76d | 473 | localstatedir=$ac_optarg ;; |
252b5132 RH |
474 | |
475 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
476 | ac_prev=mandir ;; | |
477 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
2299a76d | 478 | mandir=$ac_optarg ;; |
252b5132 RH |
479 | |
480 | -nfp | --nfp | --nf) | |
481 | # Obsolete; use --without-fp. | |
482 | with_fp=no ;; | |
483 | ||
484 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
2299a76d | 485 | | --no-cr | --no-c | -n) |
252b5132 RH |
486 | no_create=yes ;; |
487 | ||
488 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
489 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
490 | no_recursion=yes ;; | |
491 | ||
492 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
493 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
494 | | --oldin | --oldi | --old | --ol | --o) | |
495 | ac_prev=oldincludedir ;; | |
496 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
497 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
498 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
2299a76d | 499 | oldincludedir=$ac_optarg ;; |
252b5132 RH |
500 | |
501 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
502 | ac_prev=prefix ;; | |
503 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
2299a76d | 504 | prefix=$ac_optarg ;; |
252b5132 RH |
505 | |
506 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
507 | | --program-pre | --program-pr | --program-p) | |
508 | ac_prev=program_prefix ;; | |
509 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
510 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
2299a76d | 511 | program_prefix=$ac_optarg ;; |
252b5132 RH |
512 | |
513 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
514 | | --program-suf | --program-su | --program-s) | |
515 | ac_prev=program_suffix ;; | |
516 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
517 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
2299a76d | 518 | program_suffix=$ac_optarg ;; |
252b5132 RH |
519 | |
520 | -program-transform-name | --program-transform-name \ | |
521 | | --program-transform-nam | --program-transform-na \ | |
522 | | --program-transform-n | --program-transform- \ | |
523 | | --program-transform | --program-transfor \ | |
524 | | --program-transfo | --program-transf \ | |
525 | | --program-trans | --program-tran \ | |
526 | | --progr-tra | --program-tr | --program-t) | |
527 | ac_prev=program_transform_name ;; | |
528 | -program-transform-name=* | --program-transform-name=* \ | |
529 | | --program-transform-nam=* | --program-transform-na=* \ | |
530 | | --program-transform-n=* | --program-transform-=* \ | |
531 | | --program-transform=* | --program-transfor=* \ | |
532 | | --program-transfo=* | --program-transf=* \ | |
533 | | --program-trans=* | --program-tran=* \ | |
534 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
2299a76d | 535 | program_transform_name=$ac_optarg ;; |
252b5132 RH |
536 | |
537 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
538 | | -silent | --silent | --silen | --sile | --sil) | |
539 | silent=yes ;; | |
540 | ||
541 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
542 | ac_prev=sbindir ;; | |
543 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
544 | | --sbi=* | --sb=*) | |
2299a76d | 545 | sbindir=$ac_optarg ;; |
252b5132 RH |
546 | |
547 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
548 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
549 | | --sharedst | --shareds | --shared | --share | --shar \ | |
550 | | --sha | --sh) | |
551 | ac_prev=sharedstatedir ;; | |
552 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
553 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
554 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
555 | | --sha=* | --sh=*) | |
2299a76d | 556 | sharedstatedir=$ac_optarg ;; |
252b5132 RH |
557 | |
558 | -site | --site | --sit) | |
559 | ac_prev=site ;; | |
560 | -site=* | --site=* | --sit=*) | |
2299a76d | 561 | site=$ac_optarg ;; |
252b5132 RH |
562 | |
563 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
564 | ac_prev=srcdir ;; | |
565 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
2299a76d | 566 | srcdir=$ac_optarg ;; |
252b5132 RH |
567 | |
568 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
569 | | --syscon | --sysco | --sysc | --sys | --sy) | |
570 | ac_prev=sysconfdir ;; | |
571 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
572 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
2299a76d | 573 | sysconfdir=$ac_optarg ;; |
252b5132 RH |
574 | |
575 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
2299a76d | 576 | ac_prev=target_alias ;; |
252b5132 | 577 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
2299a76d | 578 | target_alias=$ac_optarg ;; |
252b5132 RH |
579 | |
580 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
581 | verbose=yes ;; | |
582 | ||
2299a76d DJ |
583 | -version | --version | --versio | --versi | --vers | -V) |
584 | ac_init_version=: ;; | |
252b5132 RH |
585 | |
586 | -with-* | --with-*) | |
2299a76d | 587 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
252b5132 | 588 | # Reject names that are not valid shell variable names. |
2299a76d DJ |
589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
591 | { (exit 1); exit 1; }; } | |
252b5132 | 592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
2299a76d DJ |
593 | case $ac_option in |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
252b5132 RH |
595 | *) ac_optarg=yes ;; |
596 | esac | |
2299a76d | 597 | eval "with_$ac_package='$ac_optarg'" ;; |
252b5132 RH |
598 | |
599 | -without-* | --without-*) | |
2299a76d | 600 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
252b5132 | 601 | # Reject names that are not valid shell variable names. |
2299a76d DJ |
602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
604 | { (exit 1); exit 1; }; } | |
605 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
606 | eval "with_$ac_package=no" ;; | |
252b5132 RH |
607 | |
608 | --x) | |
609 | # Obsolete; use --with-x. | |
610 | with_x=yes ;; | |
611 | ||
612 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
613 | | --x-incl | --x-inc | --x-in | --x-i) | |
614 | ac_prev=x_includes ;; | |
615 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
616 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
2299a76d | 617 | x_includes=$ac_optarg ;; |
252b5132 RH |
618 | |
619 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
620 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
621 | ac_prev=x_libraries ;; | |
622 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
623 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
2299a76d | 624 | x_libraries=$ac_optarg ;; |
252b5132 | 625 | |
2299a76d DJ |
626 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
627 | Try \`$0 --help' for more information." >&2 | |
628 | { (exit 1); exit 1; }; } | |
252b5132 RH |
629 | ;; |
630 | ||
2299a76d DJ |
631 | *=*) |
632 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
633 | # Reject names that are not valid shell variable names. | |
634 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
635 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
636 | { (exit 1); exit 1; }; } | |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
638 | eval "$ac_envvar='$ac_optarg'" | |
639 | export $ac_envvar ;; | |
640 | ||
252b5132 | 641 | *) |
2299a76d DJ |
642 | # FIXME: should be removed in autoconf 3.0. |
643 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
644 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
645 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
646 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
252b5132 RH |
647 | ;; |
648 | ||
649 | esac | |
650 | done | |
651 | ||
652 | if test -n "$ac_prev"; then | |
2299a76d DJ |
653 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
654 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
655 | { (exit 1); exit 1; }; } | |
252b5132 | 656 | fi |
252b5132 | 657 | |
2299a76d DJ |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
660 | do | |
661 | eval ac_val=$`echo $ac_var` | |
662 | case $ac_val in | |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
666 | esac | |
667 | done | |
252b5132 | 668 | |
2299a76d DJ |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
58670637 | 671 | localstatedir libdir includedir oldincludedir infodir mandir |
252b5132 | 672 | do |
2299a76d DJ |
673 | eval ac_val=$`echo $ac_var` |
674 | case $ac_val in | |
675 | [\\/$]* | ?:[\\/]* ) ;; | |
676 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
677 | { (exit 1); exit 1; }; };; | |
252b5132 RH |
678 | esac |
679 | done | |
680 | ||
2299a76d DJ |
681 | # There might be people who depend on the old broken behavior: `$host' |
682 | # used to hold the argument of --host etc. | |
683 | # FIXME: To remove some day. | |
684 | build=$build_alias | |
685 | host=$host_alias | |
686 | target=$target_alias | |
687 | ||
688 | # FIXME: To remove some day. | |
689 | if test "x$host_alias" != x; then | |
690 | if test "x$build_alias" = x; then | |
691 | cross_compiling=maybe | |
692 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
693 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
694 | elif test "x$build_alias" != "x$host_alias"; then | |
695 | cross_compiling=yes | |
696 | fi | |
697 | fi | |
252b5132 | 698 | |
2299a76d DJ |
699 | ac_tool_prefix= |
700 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
701 | ||
702 | test "$silent" = yes && exec 6>/dev/null | |
252b5132 | 703 | |
252b5132 RH |
704 | |
705 | # Find the source files, if location was not specified. | |
706 | if test -z "$srcdir"; then | |
707 | ac_srcdir_defaulted=yes | |
708 | # Try the directory containing this script, then its parent. | |
2299a76d DJ |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || |
710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
713 | X"$0" : 'X\(/\)' \| \ | |
714 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
715 | echo X"$0" | |
716 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
717 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
718 | /^X\(\/\/\)$/{ s//\1/; q; } | |
719 | /^X\(\/\).*/{ s//\1/; q; } | |
720 | s/.*/./; q'` | |
252b5132 RH |
721 | srcdir=$ac_confdir |
722 | if test ! -r $srcdir/$ac_unique_file; then | |
723 | srcdir=.. | |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
728 | if test ! -r $srcdir/$ac_unique_file; then | |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
2299a76d DJ |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
731 | { (exit 1); exit 1; }; } | |
252b5132 | 732 | else |
2299a76d DJ |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
734 | { (exit 1); exit 1; }; } | |
252b5132 RH |
735 | fi |
736 | fi | |
2299a76d DJ |
737 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
738 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
739 | { (exit 1); exit 1; }; } | |
740 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
741 | ac_env_build_alias_set=${build_alias+set} | |
742 | ac_env_build_alias_value=$build_alias | |
743 | ac_cv_env_build_alias_set=${build_alias+set} | |
744 | ac_cv_env_build_alias_value=$build_alias | |
745 | ac_env_host_alias_set=${host_alias+set} | |
746 | ac_env_host_alias_value=$host_alias | |
747 | ac_cv_env_host_alias_set=${host_alias+set} | |
748 | ac_cv_env_host_alias_value=$host_alias | |
749 | ac_env_target_alias_set=${target_alias+set} | |
750 | ac_env_target_alias_value=$target_alias | |
751 | ac_cv_env_target_alias_set=${target_alias+set} | |
752 | ac_cv_env_target_alias_value=$target_alias | |
753 | ac_env_CC_set=${CC+set} | |
754 | ac_env_CC_value=$CC | |
755 | ac_cv_env_CC_set=${CC+set} | |
756 | ac_cv_env_CC_value=$CC | |
757 | ac_env_CFLAGS_set=${CFLAGS+set} | |
758 | ac_env_CFLAGS_value=$CFLAGS | |
759 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
760 | ac_cv_env_CFLAGS_value=$CFLAGS | |
761 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
762 | ac_env_LDFLAGS_value=$LDFLAGS | |
763 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
764 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
765 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
766 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
767 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
768 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
769 | ac_env_CPP_set=${CPP+set} | |
770 | ac_env_CPP_value=$CPP | |
771 | ac_cv_env_CPP_set=${CPP+set} | |
772 | ac_cv_env_CPP_value=$CPP | |
773 | ||
774 | # | |
775 | # Report the --help message. | |
776 | # | |
777 | if test "$ac_init_help" = "long"; then | |
778 | # Omit some internal or obsolete options to make the list less imposing. | |
779 | # This message is too long to be a string in the A/UX 3.1 sh. | |
780 | cat <<_ACEOF | |
781 | \`configure' configures this package to adapt to many kinds of systems. | |
782 | ||
783 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
784 | ||
785 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
786 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
787 | ||
788 | Defaults for the options are specified in brackets. | |
789 | ||
790 | Configuration: | |
791 | -h, --help display this help and exit | |
792 | --help=short display options specific to this package | |
793 | --help=recursive display the short help of all the included packages | |
794 | -V, --version display version information and exit | |
795 | -q, --quiet, --silent do not print \`checking...' messages | |
796 | --cache-file=FILE cache test results in FILE [disabled] | |
797 | -C, --config-cache alias for \`--cache-file=config.cache' | |
798 | -n, --no-create do not create output files | |
799 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
800 | ||
801 | _ACEOF | |
802 | ||
803 | cat <<_ACEOF | |
804 | Installation directories: | |
805 | --prefix=PREFIX install architecture-independent files in PREFIX | |
58670637 | 806 | [$ac_default_prefix] |
2299a76d | 807 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
58670637 | 808 | [PREFIX] |
2299a76d DJ |
809 | |
810 | By default, \`make install' will install all the files in | |
811 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
812 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
813 | for instance \`--prefix=\$HOME'. | |
814 | ||
815 | For better control, use the options below. | |
816 | ||
817 | Fine tuning of the installation directories: | |
818 | --bindir=DIR user executables [EPREFIX/bin] | |
819 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
820 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
821 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
822 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
823 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
824 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
825 | --libdir=DIR object code libraries [EPREFIX/lib] | |
826 | --includedir=DIR C header files [PREFIX/include] | |
827 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
828 | --infodir=DIR info documentation [PREFIX/info] | |
829 | --mandir=DIR man documentation [PREFIX/man] | |
830 | _ACEOF | |
831 | ||
832 | cat <<\_ACEOF | |
833 | ||
834 | System types: | |
835 | --build=BUILD configure for building on BUILD [guessed] | |
836 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
837 | _ACEOF | |
838 | fi | |
839 | ||
840 | if test -n "$ac_init_help"; then | |
841 | ||
842 | cat <<\_ACEOF | |
843 | ||
844 | Optional Features: | |
845 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
846 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
847 | --enable-maintainer-mode | |
848 | enable make rules and dependencies not useful | |
849 | (and sometimes confusing) to the casual installer | |
958afec3 | 850 | --enable-multilib build many library versions (default) |
2299a76d DJ |
851 | --enable-install-libiberty Install headers for end users |
852 | ||
853 | Optional Packages: | |
854 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
855 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
856 | --with-target-subdir=SUBDIR Configuring in a subdirectory for target | |
857 | --with-build-subdir=SUBDIR Configuring in a subdirectory for build | |
858 | --with-cross-host=HOST Configuring with a cross compiler | |
859 | --with-newlib Configuring with newlib | |
860 | ||
861 | Some influential environment variables: | |
862 | CC C compiler command | |
863 | CFLAGS C compiler flags | |
864 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
865 | nonstandard directory <lib dir> | |
866 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
867 | headers in a nonstandard directory <include dir> | |
868 | CPP C preprocessor | |
869 | ||
870 | Use these variables to override the choices made by `configure' or to help | |
871 | it to find libraries and programs with nonstandard names/locations. | |
872 | ||
873 | _ACEOF | |
874 | fi | |
875 | ||
876 | if test "$ac_init_help" = "recursive"; then | |
877 | # If there are subdirs, report their specific --help. | |
878 | ac_popdir=`pwd` | |
879 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
880 | test -d $ac_dir || continue | |
881 | ac_builddir=. | |
882 | ||
883 | if test "$ac_dir" != .; then | |
884 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
885 | # A "../" for each directory in $ac_dir_suffix. | |
886 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
887 | else | |
888 | ac_dir_suffix= ac_top_builddir= | |
889 | fi | |
890 | ||
891 | case $srcdir in | |
892 | .) # No --srcdir option. We are building in place. | |
893 | ac_srcdir=. | |
894 | if test -z "$ac_top_builddir"; then | |
895 | ac_top_srcdir=. | |
896 | else | |
897 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
898 | fi ;; | |
899 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
900 | ac_srcdir=$srcdir$ac_dir_suffix; | |
901 | ac_top_srcdir=$srcdir ;; | |
902 | *) # Relative path. | |
903 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
904 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
905 | esac | |
85f969cd DD |
906 | |
907 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
908 | # the directories may not exist. | |
909 | case `pwd` in | |
910 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 911 | *) |
85f969cd DD |
912 | case "$ac_dir" in |
913 | .) ac_abs_builddir=`pwd`;; | |
914 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
915 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
916 | esac;; |
917 | esac | |
85f969cd | 918 | case $ac_abs_builddir in |
58670637 DD |
919 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
920 | *) | |
921 | case ${ac_top_builddir}. in | |
85f969cd | 922 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 923 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 924 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
925 | esac;; |
926 | esac | |
85f969cd | 927 | case $ac_abs_builddir in |
58670637 DD |
928 | .) ac_abs_srcdir=$ac_srcdir;; |
929 | *) | |
930 | case $ac_srcdir in | |
85f969cd | 931 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 932 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 933 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
934 | esac;; |
935 | esac | |
85f969cd | 936 | case $ac_abs_builddir in |
58670637 DD |
937 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
938 | *) | |
939 | case $ac_top_srcdir in | |
85f969cd | 940 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 941 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 942 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
943 | esac;; |
944 | esac | |
2299a76d DJ |
945 | |
946 | cd $ac_dir | |
947 | # Check for guested configure; otherwise get Cygnus style configure. | |
948 | if test -f $ac_srcdir/configure.gnu; then | |
949 | echo | |
950 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
951 | elif test -f $ac_srcdir/configure; then | |
952 | echo | |
953 | $SHELL $ac_srcdir/configure --help=recursive | |
954 | elif test -f $ac_srcdir/configure.ac || | |
58670637 | 955 | test -f $ac_srcdir/configure.in; then |
2299a76d DJ |
956 | echo |
957 | $ac_configure --help | |
958 | else | |
959 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
960 | fi | |
fd7d450d | 961 | cd $ac_popdir |
2299a76d DJ |
962 | done |
963 | fi | |
964 | ||
965 | test -n "$ac_init_help" && exit 0 | |
966 | if $ac_init_version; then | |
967 | cat <<\_ACEOF | |
968 | ||
58670637 | 969 | Copyright (C) 2003 Free Software Foundation, Inc. |
2299a76d DJ |
970 | This configure script is free software; the Free Software Foundation |
971 | gives unlimited permission to copy, distribute and modify it. | |
972 | _ACEOF | |
973 | exit 0 | |
974 | fi | |
975 | exec 5>config.log | |
976 | cat >&5 <<_ACEOF | |
977 | This file contains any messages produced by compilers while | |
978 | running configure, to aid debugging if configure makes a mistake. | |
979 | ||
980 | It was created by $as_me, which was | |
85f969cd | 981 | generated by GNU Autoconf 2.59. Invocation command line was |
2299a76d DJ |
982 | |
983 | $ $0 $@ | |
984 | ||
985 | _ACEOF | |
986 | { | |
987 | cat <<_ASUNAME | |
988 | ## --------- ## | |
989 | ## Platform. ## | |
990 | ## --------- ## | |
991 | ||
992 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
993 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
994 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
995 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
996 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
997 | ||
998 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
999 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1000 | ||
1001 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1002 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1003 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1004 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1005 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1006 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1007 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1008 | ||
1009 | _ASUNAME | |
1010 | ||
1011 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1012 | for as_dir in $PATH | |
1013 | do | |
1014 | IFS=$as_save_IFS | |
1015 | test -z "$as_dir" && as_dir=. | |
1016 | echo "PATH: $as_dir" | |
1017 | done | |
1018 | ||
1019 | } >&5 | |
1020 | ||
1021 | cat >&5 <<_ACEOF | |
1022 | ||
1023 | ||
1024 | ## ----------- ## | |
1025 | ## Core tests. ## | |
1026 | ## ----------- ## | |
252b5132 | 1027 | |
2299a76d DJ |
1028 | _ACEOF |
1029 | ||
1030 | ||
1031 | # Keep a trace of the command line. | |
1032 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1033 | # Strip out --silent because we don't want to record it for future runs. | |
1034 | # Also quote any args containing shell meta-characters. | |
1035 | # Make two passes to allow for proper duplicate-argument suppression. | |
1036 | ac_configure_args= | |
1037 | ac_configure_args0= | |
1038 | ac_configure_args1= | |
1039 | ac_sep= | |
1040 | ac_must_keep_next=false | |
1041 | for ac_pass in 1 2 | |
1042 | do | |
1043 | for ac_arg | |
1044 | do | |
1045 | case $ac_arg in | |
1046 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1047 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1048 | | -silent | --silent | --silen | --sile | --sil) | |
1049 | continue ;; | |
1050 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1051 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1052 | esac | |
1053 | case $ac_pass in | |
1054 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1055 | 2) | |
1056 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1057 | if test $ac_must_keep_next = true; then | |
58670637 | 1058 | ac_must_keep_next=false # Got value, back to normal. |
2299a76d | 1059 | else |
58670637 DD |
1060 | case $ac_arg in |
1061 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1062 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1063 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1064 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1065 | case "$ac_configure_args0 " in | |
1066 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1067 | esac | |
1068 | ;; | |
1069 | -* ) ac_must_keep_next=true ;; | |
1070 | esac | |
2299a76d DJ |
1071 | fi |
1072 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1073 | # Get rid of the leading space. | |
1074 | ac_sep=" " | |
1075 | ;; | |
1076 | esac | |
1077 | done | |
1078 | done | |
1079 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1080 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1081 | ||
1082 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1083 | # config.log. We remove comments because anyway the quotes in there | |
1084 | # would cause problems or look ugly. | |
1085 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1086 | # such as our DU 5.0 friend, will then `close' the trap. | |
1087 | trap 'exit_status=$? | |
1088 | # Save into config.log some information that might help in debugging. | |
1089 | { | |
1090 | echo | |
1091 | ||
1092 | cat <<\_ASBOX | |
1093 | ## ---------------- ## | |
1094 | ## Cache variables. ## | |
1095 | ## ---------------- ## | |
1096 | _ASBOX | |
1097 | echo | |
1098 | # The following way of writing the cache mishandles newlines in values, | |
1099 | { | |
1100 | (set) 2>&1 | | |
1101 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1102 | *ac_space=\ *) | |
1103 | sed -n \ | |
58670637 DD |
1104 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1105 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
2299a76d DJ |
1106 | ;; |
1107 | *) | |
1108 | sed -n \ | |
58670637 | 1109 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
2299a76d DJ |
1110 | ;; |
1111 | esac; | |
1112 | } | |
1113 | echo | |
1114 | ||
1115 | cat <<\_ASBOX | |
1116 | ## ----------------- ## | |
1117 | ## Output variables. ## | |
1118 | ## ----------------- ## | |
1119 | _ASBOX | |
1120 | echo | |
1121 | for ac_var in $ac_subst_vars | |
1122 | do | |
1123 | eval ac_val=$`echo $ac_var` | |
1124 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1125 | done | sort | |
1126 | echo | |
1127 | ||
1128 | if test -n "$ac_subst_files"; then | |
1129 | cat <<\_ASBOX | |
1130 | ## ------------- ## | |
1131 | ## Output files. ## | |
1132 | ## ------------- ## | |
1133 | _ASBOX | |
1134 | echo | |
1135 | for ac_var in $ac_subst_files | |
1136 | do | |
1137 | eval ac_val=$`echo $ac_var` | |
58670637 | 1138 | echo "$ac_var='"'"'$ac_val'"'"'" |
2299a76d DJ |
1139 | done | sort |
1140 | echo | |
1141 | fi | |
1142 | ||
1143 | if test -s confdefs.h; then | |
1144 | cat <<\_ASBOX | |
1145 | ## ----------- ## | |
1146 | ## confdefs.h. ## | |
1147 | ## ----------- ## | |
1148 | _ASBOX | |
1149 | echo | |
1150 | sed "/^$/d" confdefs.h | sort | |
1151 | echo | |
1152 | fi | |
1153 | test "$ac_signal" != 0 && | |
1154 | echo "$as_me: caught signal $ac_signal" | |
1155 | echo "$as_me: exit $exit_status" | |
1156 | } >&5 | |
58670637 | 1157 | rm -f core *.core && |
2299a76d DJ |
1158 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1159 | exit $exit_status | |
1160 | ' 0 | |
1161 | for ac_signal in 1 2 13 15; do | |
1162 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1163 | done | |
1164 | ac_signal=0 | |
1165 | ||
1166 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1167 | rm -rf conftest* confdefs.h | |
1168 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1169 | echo >confdefs.h | |
1170 | ||
1171 | # Predefined preprocessor variables. | |
1172 | ||
1173 | cat >>confdefs.h <<_ACEOF | |
1174 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1175 | _ACEOF | |
1176 | ||
1177 | ||
1178 | cat >>confdefs.h <<_ACEOF | |
1179 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1180 | _ACEOF | |
1181 | ||
1182 | ||
1183 | cat >>confdefs.h <<_ACEOF | |
1184 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1185 | _ACEOF | |
1186 | ||
1187 | ||
1188 | cat >>confdefs.h <<_ACEOF | |
1189 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1190 | _ACEOF | |
1191 | ||
1192 | ||
1193 | cat >>confdefs.h <<_ACEOF | |
1194 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1195 | _ACEOF | |
1196 | ||
1197 | ||
1198 | # Let the site file select an alternate cache file if it wants to. | |
252b5132 | 1199 | # Prefer explicitly selected file to automatically selected ones. |
b39b76b8 DD |
1200 | if test -z "$CONFIG_SITE"; then |
1201 | if test "x$prefix" != xNONE; then | |
1202 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1203 | else | |
1204 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
252b5132 RH |
1205 | fi |
1206 | fi | |
1207 | for ac_site_file in $CONFIG_SITE; do | |
1208 | if test -r "$ac_site_file"; then | |
2299a76d DJ |
1209 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 |
1210 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1211 | sed 's/^/| /' "$ac_site_file" >&5 | |
252b5132 RH |
1212 | . "$ac_site_file" |
1213 | fi | |
1214 | done | |
1215 | ||
1216 | if test -r "$cache_file"; then | |
2299a76d DJ |
1217 | # Some versions of bash will fail to source /dev/null (special |
1218 | # files actually), so we avoid doing that. | |
1219 | if test -f "$cache_file"; then | |
1220 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1221 | echo "$as_me: loading cache $cache_file" >&6;} | |
1222 | case $cache_file in | |
1223 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1224 | *) . ./$cache_file;; | |
1225 | esac | |
1226 | fi | |
252b5132 | 1227 | else |
2299a76d DJ |
1228 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 |
1229 | echo "$as_me: creating cache $cache_file" >&6;} | |
1230 | >$cache_file | |
1231 | fi | |
1232 | ||
1233 | # Check that the precious variables saved in the cache have kept the same | |
1234 | # value. | |
1235 | ac_cache_corrupted=false | |
1236 | for ac_var in `(set) 2>&1 | | |
58670637 | 1237 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
2299a76d DJ |
1238 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1239 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1240 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1241 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1242 | case $ac_old_set,$ac_new_set in | |
1243 | set,) | |
1244 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1245 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1246 | ac_cache_corrupted=: ;; | |
1247 | ,set) | |
1248 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1249 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1250 | ac_cache_corrupted=: ;; | |
1251 | ,);; | |
1252 | *) | |
1253 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
58670637 | 1254 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
2299a76d | 1255 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
58670637 | 1256 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
2299a76d | 1257 | echo "$as_me: former value: $ac_old_val" >&2;} |
58670637 | 1258 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
2299a76d | 1259 | echo "$as_me: current value: $ac_new_val" >&2;} |
58670637 | 1260 | ac_cache_corrupted=: |
2299a76d DJ |
1261 | fi;; |
1262 | esac | |
1263 | # Pass precious variables to config.status. | |
1264 | if test "$ac_new_set" = set; then | |
1265 | case $ac_new_val in | |
1266 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1267 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1268 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1269 | esac | |
1270 | case " $ac_configure_args " in | |
1271 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1272 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1273 | esac | |
1274 | fi | |
1275 | done | |
1276 | if $ac_cache_corrupted; then | |
1277 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1278 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1279 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1280 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1281 | { (exit 1); exit 1; }; } | |
252b5132 RH |
1282 | fi |
1283 | ||
1284 | ac_ext=c | |
252b5132 | 1285 | ac_cpp='$CPP $CPPFLAGS' |
2299a76d DJ |
1286 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
1287 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1288 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
252b5132 RH |
1289 | |
1290 | ||
1291 | ||
52d98c2d | 1292 | |
252b5132 | 1293 | |
2299a76d DJ |
1294 | |
1295 | ||
1296 | ||
1297 | ||
1298 | ||
1299 | ||
1300 | ||
1301 | ||
1302 | ||
1303 | ||
1304 | ||
1305 | ||
1306 | ||
1307 | ||
bb6a587d | 1308 | |
2299a76d DJ |
1309 | |
1310 | # This works around the fact that libtool configuration may change LD | |
1311 | # for this particular configuration, but some shells, instead of | |
1312 | # keeping the changes in LD private, export them just because LD is | |
1313 | # exported. We don't use libtool yet, but some day we might, so... | |
1314 | ORIGINAL_LD_FOR_MULTILIBS=$LD | |
1315 | ||
1316 | ||
1317 | # Check whether --with-target-subdir or --without-target-subdir was given. | |
1318 | if test "${with_target_subdir+set}" = set; then | |
1319 | withval="$with_target_subdir" | |
1320 | ||
1321 | fi; | |
1322 | ||
1323 | # Check whether --with-build-subdir or --without-build-subdir was given. | |
1324 | if test "${with_build_subdir+set}" = set; then | |
1325 | withval="$with_build_subdir" | |
1326 | ||
1327 | fi; | |
cfed0715 | 1328 | |
252b5132 RH |
1329 | # Check whether --with-cross-host or --without-cross-host was given. |
1330 | if test "${with_cross_host+set}" = set; then | |
1331 | withval="$with_cross_host" | |
2299a76d DJ |
1332 | |
1333 | fi; | |
252b5132 RH |
1334 | |
1335 | # Check whether --with-newlib or --without-newlib was given. | |
1336 | if test "${with_newlib+set}" = set; then | |
1337 | withval="$with_newlib" | |
252b5132 | 1338 | |
2299a76d | 1339 | fi; |
252b5132 RH |
1340 | |
1341 | if test "${srcdir}" = "."; then | |
cfed0715 DD |
1342 | if test -n "${with_build_subdir}"; then |
1343 | libiberty_topdir="${srcdir}/../.." | |
1344 | with_target_subdir= | |
1345 | elif test -z "${with_target_subdir}"; then | |
252b5132 RH |
1346 | libiberty_topdir="${srcdir}/.." |
1347 | else | |
1348 | if test "${with_target_subdir}" != "."; then | |
1349 | libiberty_topdir="${srcdir}/${with_multisrctop}../.." | |
1350 | else | |
1351 | libiberty_topdir="${srcdir}/${with_multisrctop}.." | |
1352 | fi | |
1353 | fi | |
1354 | else | |
1355 | libiberty_topdir="${srcdir}/.." | |
1356 | fi | |
85b9a938 | 1357 | |
252b5132 RH |
1358 | ac_aux_dir= |
1359 | for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do | |
1360 | if test -f $ac_dir/install-sh; then | |
1361 | ac_aux_dir=$ac_dir | |
1362 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1363 | break | |
1364 | elif test -f $ac_dir/install.sh; then | |
1365 | ac_aux_dir=$ac_dir | |
1366 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1367 | break | |
2299a76d DJ |
1368 | elif test -f $ac_dir/shtool; then |
1369 | ac_aux_dir=$ac_dir | |
1370 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1371 | break | |
252b5132 RH |
1372 | fi |
1373 | done | |
1374 | if test -z "$ac_aux_dir"; then | |
2299a76d DJ |
1375 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5 |
1376 | echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;} | |
1377 | { (exit 1); exit 1; }; } | |
252b5132 | 1378 | fi |
2299a76d DJ |
1379 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" |
1380 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1381 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
252b5132 RH |
1382 | |
1383 | ||
1384 | ||
2299a76d DJ |
1385 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
1386 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
39423523 DD |
1387 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
1388 | if test "${enable_maintainer_mode+set}" = set; then | |
1389 | enableval="$enable_maintainer_mode" | |
1390 | maintainer_mode=$enableval | |
1391 | else | |
1392 | maintainer_mode=no | |
2299a76d | 1393 | fi; |
39423523 | 1394 | |
2299a76d DJ |
1395 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
1396 | echo "${ECHO_T}$maintainer_mode" >&6 | |
39423523 DD |
1397 | |
1398 | if test "$maintainer_mode" = "yes"; then | |
1399 | MAINT='' | |
1400 | NOTMAINT='#' | |
1401 | else | |
1402 | MAINT='#' | |
1403 | NOTMAINT='' | |
1404 | fi | |
1405 | ||
da191b5b DD |
1406 | # Do we have a single-tree copy of texinfo? Even if we do, we can't |
1407 | # rely on it - libiberty is built before texinfo. | |
1408 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
39423523 | 1409 | set dummy makeinfo; ac_word=$2 |
2299a76d DJ |
1410 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1411 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1412 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
1413 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39423523 DD |
1414 | else |
1415 | if test -n "$MAKEINFO"; then | |
1416 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
1417 | else | |
2299a76d DJ |
1418 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1419 | for as_dir in $PATH | |
1420 | do | |
1421 | IFS=$as_save_IFS | |
1422 | test -z "$as_dir" && as_dir=. | |
1423 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1424 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1425 | ac_cv_prog_MAKEINFO="makeinfo" | |
1426 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1427 | break 2 | |
1428 | fi | |
1429 | done | |
1430 | done | |
1431 | ||
39423523 DD |
1432 | fi |
1433 | fi | |
2299a76d | 1434 | MAKEINFO=$ac_cv_prog_MAKEINFO |
39423523 | 1435 | if test -n "$MAKEINFO"; then |
2299a76d DJ |
1436 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
1437 | echo "${ECHO_T}$MAKEINFO" >&6 | |
39423523 | 1438 | else |
2299a76d DJ |
1439 | echo "$as_me:$LINENO: result: no" >&5 |
1440 | echo "${ECHO_T}no" >&6 | |
39423523 DD |
1441 | fi |
1442 | ||
1a78a35a DD |
1443 | if test "x$MAKEINFO" = "x"; then |
1444 | MAKEINFO="@echo makeinfo missing; true" | |
da191b5b | 1445 | BUILD_INFO= |
1a78a35a DD |
1446 | else |
1447 | BUILD_INFO=info | |
b7ca9213 L |
1448 | case "$MAKEINFO" in |
1449 | */missing\ makeinfo*) | |
1a78a35a | 1450 | BUILD_INFO= |
2299a76d | 1451 | { echo "$as_me:$LINENO: WARNING: |
b7ca9213 L |
1452 | *** Makeinfo is missing. Info documentation will not be built." >&5 |
1453 | echo "$as_me: WARNING: | |
1454 | *** Makeinfo is missing. Info documentation will not be built." >&2;} | |
1455 | ;; | |
1456 | *) | |
1457 | case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in | |
1458 | x*\ [1-3].* ) | |
1459 | MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" | |
1460 | BUILD_INFO= | |
1461 | { echo "$as_me:$LINENO: WARNING: | |
2299a76d DJ |
1462 | *** Makeinfo is too old. Info documentation will not be built." >&5 |
1463 | echo "$as_me: WARNING: | |
1464 | *** Makeinfo is too old. Info documentation will not be built." >&2;} | |
b7ca9213 L |
1465 | ;; |
1466 | esac | |
1a78a35a DD |
1467 | ;; |
1468 | esac | |
1469 | fi | |
da191b5b | 1470 | |
39423523 DD |
1471 | |
1472 | ||
1473 | # Extract the first word of "perl", so it can be a program name with args. | |
1474 | set dummy perl; ac_word=$2 | |
2299a76d DJ |
1475 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1476 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1477 | if test "${ac_cv_prog_PERL+set}" = set; then | |
1478 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39423523 DD |
1479 | else |
1480 | if test -n "$PERL"; then | |
1481 | ac_cv_prog_PERL="$PERL" # Let the user override the test. | |
1482 | else | |
2299a76d DJ |
1483 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1484 | for as_dir in $PATH | |
1485 | do | |
1486 | IFS=$as_save_IFS | |
1487 | test -z "$as_dir" && as_dir=. | |
1488 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1489 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1490 | ac_cv_prog_PERL="perl" | |
1491 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1492 | break 2 | |
1493 | fi | |
1494 | done | |
1495 | done | |
1496 | ||
39423523 DD |
1497 | fi |
1498 | fi | |
2299a76d | 1499 | PERL=$ac_cv_prog_PERL |
39423523 | 1500 | if test -n "$PERL"; then |
2299a76d DJ |
1501 | echo "$as_me:$LINENO: result: $PERL" >&5 |
1502 | echo "${ECHO_T}$PERL" >&6 | |
39423523 | 1503 | else |
2299a76d DJ |
1504 | echo "$as_me:$LINENO: result: no" >&5 |
1505 | echo "${ECHO_T}no" >&6 | |
39423523 DD |
1506 | fi |
1507 | ||
1508 | if test x"$PERL" = x""; then | |
1509 | HAVE_PERL='#' | |
1510 | else | |
1511 | HAVE_PERL='' | |
1512 | fi | |
1513 | ||
1514 | ||
252b5132 | 1515 | # Make sure we can run config.sub. |
2299a76d DJ |
1516 | $ac_config_sub sun4 >/dev/null 2>&1 || |
1517 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1518 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1519 | { (exit 1); exit 1; }; } | |
252b5132 | 1520 | |
2299a76d DJ |
1521 | echo "$as_me:$LINENO: checking build system type" >&5 |
1522 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1523 | if test "${ac_cv_build+set}" = set; then | |
1524 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1525 | else | |
1526 | ac_cv_build_alias=$build_alias | |
1527 | test -z "$ac_cv_build_alias" && | |
1528 | ac_cv_build_alias=`$ac_config_guess` | |
1529 | test -z "$ac_cv_build_alias" && | |
1530 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1531 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1532 | { (exit 1); exit 1; }; } | |
1533 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1534 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1535 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1536 | { (exit 1); exit 1; }; } | |
252b5132 | 1537 | |
2299a76d DJ |
1538 | fi |
1539 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1540 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1541 | build=$ac_cv_build | |
1542 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1543 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1544 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
252b5132 RH |
1545 | |
1546 | ||
2299a76d DJ |
1547 | echo "$as_me:$LINENO: checking host system type" >&5 |
1548 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1549 | if test "${ac_cv_host+set}" = set; then | |
1550 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1551 | else | |
1552 | ac_cv_host_alias=$host_alias | |
1553 | test -z "$ac_cv_host_alias" && | |
1554 | ac_cv_host_alias=$ac_cv_build_alias | |
1555 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1556 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1557 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1558 | { (exit 1); exit 1; }; } | |
252b5132 | 1559 | |
2299a76d DJ |
1560 | fi |
1561 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1562 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1563 | host=$ac_cv_host | |
1564 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1565 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1566 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
252b5132 | 1567 | |
252b5132 | 1568 | |
252b5132 | 1569 | |
252b5132 | 1570 | |
2299a76d DJ |
1571 | if test -n "$ac_tool_prefix"; then |
1572 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
252b5132 | 1573 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
2299a76d DJ |
1574 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1575 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1576 | if test "${ac_cv_prog_AR+set}" = set; then | |
1577 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1578 | else |
1579 | if test -n "$AR"; then | |
1580 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1581 | else | |
2299a76d DJ |
1582 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1583 | for as_dir in $PATH | |
1584 | do | |
1585 | IFS=$as_save_IFS | |
1586 | test -z "$as_dir" && as_dir=. | |
1587 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1588 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1589 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1590 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1591 | break 2 | |
1592 | fi | |
1593 | done | |
1594 | done | |
1595 | ||
252b5132 RH |
1596 | fi |
1597 | fi | |
2299a76d | 1598 | AR=$ac_cv_prog_AR |
252b5132 | 1599 | if test -n "$AR"; then |
2299a76d DJ |
1600 | echo "$as_me:$LINENO: result: $AR" >&5 |
1601 | echo "${ECHO_T}$AR" >&6 | |
252b5132 | 1602 | else |
2299a76d DJ |
1603 | echo "$as_me:$LINENO: result: no" >&5 |
1604 | echo "${ECHO_T}no" >&6 | |
1605 | fi | |
1606 | ||
252b5132 | 1607 | fi |
2299a76d DJ |
1608 | if test -z "$ac_cv_prog_AR"; then |
1609 | ac_ct_AR=$AR | |
1610 | # Extract the first word of "ar", so it can be a program name with args. | |
1611 | set dummy ar; ac_word=$2 | |
1612 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1613 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1614 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then | |
1615 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1616 | else | |
1617 | if test -n "$ac_ct_AR"; then | |
1618 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
1619 | else | |
1620 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1621 | for as_dir in $PATH | |
1622 | do | |
1623 | IFS=$as_save_IFS | |
1624 | test -z "$as_dir" && as_dir=. | |
1625 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1626 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1627 | ac_cv_prog_ac_ct_AR="ar" | |
1628 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1629 | break 2 | |
1630 | fi | |
1631 | done | |
1632 | done | |
252b5132 | 1633 | |
2299a76d DJ |
1634 | fi |
1635 | fi | |
1636 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
1637 | if test -n "$ac_ct_AR"; then | |
1638 | echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 | |
1639 | echo "${ECHO_T}$ac_ct_AR" >&6 | |
1640 | else | |
1641 | echo "$as_me:$LINENO: result: no" >&5 | |
1642 | echo "${ECHO_T}no" >&6 | |
1643 | fi | |
252b5132 | 1644 | |
2299a76d DJ |
1645 | AR=$ac_ct_AR |
1646 | else | |
1647 | AR="$ac_cv_prog_AR" | |
1648 | fi | |
252b5132 | 1649 | |
2299a76d DJ |
1650 | if test -n "$ac_tool_prefix"; then |
1651 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
252b5132 | 1652 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
2299a76d DJ |
1653 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1654 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1655 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
1656 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1657 | else |
1658 | if test -n "$RANLIB"; then | |
1659 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1660 | else | |
2299a76d DJ |
1661 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1662 | for as_dir in $PATH | |
1663 | do | |
1664 | IFS=$as_save_IFS | |
1665 | test -z "$as_dir" && as_dir=. | |
1666 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1667 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1668 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1669 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1670 | break 2 | |
1671 | fi | |
1672 | done | |
1673 | done | |
1674 | ||
252b5132 RH |
1675 | fi |
1676 | fi | |
2299a76d | 1677 | RANLIB=$ac_cv_prog_RANLIB |
252b5132 | 1678 | if test -n "$RANLIB"; then |
2299a76d DJ |
1679 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
1680 | echo "${ECHO_T}$RANLIB" >&6 | |
252b5132 | 1681 | else |
2299a76d DJ |
1682 | echo "$as_me:$LINENO: result: no" >&5 |
1683 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1684 | fi |
1685 | ||
2299a76d | 1686 | fi |
252b5132 | 1687 | if test -z "$ac_cv_prog_RANLIB"; then |
2299a76d | 1688 | ac_ct_RANLIB=$RANLIB |
252b5132 RH |
1689 | # Extract the first word of "ranlib", so it can be a program name with args. |
1690 | set dummy ranlib; ac_word=$2 | |
2299a76d DJ |
1691 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1692 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1693 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
1694 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 1695 | else |
2299a76d DJ |
1696 | if test -n "$ac_ct_RANLIB"; then |
1697 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
252b5132 | 1698 | else |
2299a76d DJ |
1699 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1700 | for as_dir in $PATH | |
1701 | do | |
1702 | IFS=$as_save_IFS | |
1703 | test -z "$as_dir" && as_dir=. | |
1704 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1705 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1706 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
1707 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1708 | break 2 | |
1709 | fi | |
1710 | done | |
1711 | done | |
1712 | ||
1713 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
252b5132 RH |
1714 | fi |
1715 | fi | |
2299a76d DJ |
1716 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
1717 | if test -n "$ac_ct_RANLIB"; then | |
1718 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
1719 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
252b5132 | 1720 | else |
2299a76d DJ |
1721 | echo "$as_me:$LINENO: result: no" >&5 |
1722 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1723 | fi |
1724 | ||
2299a76d | 1725 | RANLIB=$ac_ct_RANLIB |
252b5132 | 1726 | else |
2299a76d | 1727 | RANLIB="$ac_cv_prog_RANLIB" |
252b5132 RH |
1728 | fi |
1729 | ||
1730 | ||
958afec3 GK |
1731 | # Add --enable-multilib to configure. |
1732 | # Default to --enable-multilib | |
1733 | # Check whether --enable-multilib or --disable-multilib was given. | |
1734 | if test "${enable_multilib+set}" = set; then | |
1735 | enableval="$enable_multilib" | |
1736 | case "$enableval" in | |
1737 | yes) multilib=yes ;; | |
1738 | no) multilib=no ;; | |
1739 | *) { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5 | |
1740 | echo "$as_me: error: bad value $enableval for multilib option" >&2;} | |
1741 | { (exit 1); exit 1; }; } ;; | |
1742 | esac | |
1743 | else | |
1744 | multilib=yes | |
1745 | fi; | |
1746 | ||
1747 | # Even if the default multilib is not a cross compilation, | |
1748 | # it may be that some of the other multilibs are. | |
1749 | if test $cross_compiling = no && test $multilib = yes \ | |
1750 | && test "x${with_multisubdir}" != x ; then | |
1751 | cross_compiling=maybe | |
1752 | fi | |
1753 | ||
0c0a36a4 | 1754 | |
2299a76d DJ |
1755 | ac_ext=c |
1756 | ac_cpp='$CPP $CPPFLAGS' | |
1757 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1758 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1759 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1760 | if test -n "$ac_tool_prefix"; then | |
1761 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1762 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1763 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1764 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1765 | if test "${ac_cv_prog_CC+set}" = set; then | |
1766 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1767 | else | |
1768 | if test -n "$CC"; then | |
1769 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1770 | else | |
1771 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1772 | for as_dir in $PATH | |
1773 | do | |
1774 | IFS=$as_save_IFS | |
1775 | test -z "$as_dir" && as_dir=. | |
1776 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1777 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1778 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1779 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1780 | break 2 | |
1781 | fi | |
1782 | done | |
1783 | done | |
1784 | ||
1785 | fi | |
1786 | fi | |
1787 | CC=$ac_cv_prog_CC | |
1788 | if test -n "$CC"; then | |
1789 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1790 | echo "${ECHO_T}$CC" >&6 | |
1791 | else | |
1792 | echo "$as_me:$LINENO: result: no" >&5 | |
1793 | echo "${ECHO_T}no" >&6 | |
1794 | fi | |
1795 | ||
1796 | fi | |
1797 | if test -z "$ac_cv_prog_CC"; then | |
1798 | ac_ct_CC=$CC | |
1799 | # Extract the first word of "gcc", so it can be a program name with args. | |
252b5132 | 1800 | set dummy gcc; ac_word=$2 |
2299a76d DJ |
1801 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1802 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1803 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1804 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1805 | else | |
1806 | if test -n "$ac_ct_CC"; then | |
1807 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1808 | else | |
1809 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1810 | for as_dir in $PATH | |
1811 | do | |
1812 | IFS=$as_save_IFS | |
1813 | test -z "$as_dir" && as_dir=. | |
1814 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1815 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1816 | ac_cv_prog_ac_ct_CC="gcc" | |
1817 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1818 | break 2 | |
1819 | fi | |
1820 | done | |
1821 | done | |
1822 | ||
1823 | fi | |
1824 | fi | |
1825 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1826 | if test -n "$ac_ct_CC"; then | |
1827 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1828 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1829 | else | |
1830 | echo "$as_me:$LINENO: result: no" >&5 | |
1831 | echo "${ECHO_T}no" >&6 | |
1832 | fi | |
1833 | ||
1834 | CC=$ac_ct_CC | |
1835 | else | |
1836 | CC="$ac_cv_prog_CC" | |
1837 | fi | |
1838 | ||
1839 | if test -z "$CC"; then | |
1840 | if test -n "$ac_tool_prefix"; then | |
1841 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1842 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1843 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1844 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1845 | if test "${ac_cv_prog_CC+set}" = set; then | |
1846 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1847 | else |
1848 | if test -n "$CC"; then | |
1849 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1850 | else | |
2299a76d DJ |
1851 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1852 | for as_dir in $PATH | |
1853 | do | |
1854 | IFS=$as_save_IFS | |
1855 | test -z "$as_dir" && as_dir=. | |
1856 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1857 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1858 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1859 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1860 | break 2 | |
1861 | fi | |
1862 | done | |
1863 | done | |
1864 | ||
252b5132 RH |
1865 | fi |
1866 | fi | |
2299a76d | 1867 | CC=$ac_cv_prog_CC |
252b5132 | 1868 | if test -n "$CC"; then |
2299a76d DJ |
1869 | echo "$as_me:$LINENO: result: $CC" >&5 |
1870 | echo "${ECHO_T}$CC" >&6 | |
1871 | else | |
1872 | echo "$as_me:$LINENO: result: no" >&5 | |
1873 | echo "${ECHO_T}no" >&6 | |
1874 | fi | |
1875 | ||
1876 | fi | |
1877 | if test -z "$ac_cv_prog_CC"; then | |
1878 | ac_ct_CC=$CC | |
1879 | # Extract the first word of "cc", so it can be a program name with args. | |
1880 | set dummy cc; ac_word=$2 | |
1881 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1882 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1883 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1884 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1885 | else | |
1886 | if test -n "$ac_ct_CC"; then | |
1887 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
252b5132 | 1888 | else |
2299a76d DJ |
1889 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1890 | for as_dir in $PATH | |
1891 | do | |
1892 | IFS=$as_save_IFS | |
1893 | test -z "$as_dir" && as_dir=. | |
1894 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1895 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1896 | ac_cv_prog_ac_ct_CC="cc" | |
1897 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1898 | break 2 | |
1899 | fi | |
1900 | done | |
1901 | done | |
1902 | ||
1903 | fi | |
1904 | fi | |
1905 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1906 | if test -n "$ac_ct_CC"; then | |
1907 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1908 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1909 | else | |
1910 | echo "$as_me:$LINENO: result: no" >&5 | |
1911 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1912 | fi |
1913 | ||
2299a76d DJ |
1914 | CC=$ac_ct_CC |
1915 | else | |
1916 | CC="$ac_cv_prog_CC" | |
1917 | fi | |
1918 | ||
1919 | fi | |
252b5132 RH |
1920 | if test -z "$CC"; then |
1921 | # Extract the first word of "cc", so it can be a program name with args. | |
1922 | set dummy cc; ac_word=$2 | |
2299a76d DJ |
1923 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1924 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1925 | if test "${ac_cv_prog_CC+set}" = set; then | |
1926 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1927 | else |
1928 | if test -n "$CC"; then | |
1929 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1930 | else | |
252b5132 | 1931 | ac_prog_rejected=no |
2299a76d DJ |
1932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1933 | for as_dir in $PATH | |
1934 | do | |
1935 | IFS=$as_save_IFS | |
1936 | test -z "$as_dir" && as_dir=. | |
1937 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1938 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1939 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1940 | ac_prog_rejected=yes | |
1941 | continue | |
1942 | fi | |
1943 | ac_cv_prog_CC="cc" | |
1944 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1945 | break 2 | |
1946 | fi | |
1947 | done | |
1948 | done | |
1949 | ||
252b5132 RH |
1950 | if test $ac_prog_rejected = yes; then |
1951 | # We found a bogon in the path, so make sure we never use it. | |
1952 | set dummy $ac_cv_prog_CC | |
1953 | shift | |
2299a76d | 1954 | if test $# != 0; then |
252b5132 RH |
1955 | # We chose a different compiler from the bogus one. |
1956 | # However, it has the same basename, so the bogon will be chosen | |
1957 | # first if we set CC to just the basename; use the full file name. | |
1958 | shift | |
2299a76d | 1959 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
252b5132 RH |
1960 | fi |
1961 | fi | |
1962 | fi | |
1963 | fi | |
2299a76d | 1964 | CC=$ac_cv_prog_CC |
252b5132 | 1965 | if test -n "$CC"; then |
2299a76d DJ |
1966 | echo "$as_me:$LINENO: result: $CC" >&5 |
1967 | echo "${ECHO_T}$CC" >&6 | |
252b5132 | 1968 | else |
2299a76d DJ |
1969 | echo "$as_me:$LINENO: result: no" >&5 |
1970 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1971 | fi |
1972 | ||
252b5132 | 1973 | fi |
2299a76d DJ |
1974 | if test -z "$CC"; then |
1975 | if test -n "$ac_tool_prefix"; then | |
1976 | for ac_prog in cl | |
1977 | do | |
1978 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
1979 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
1980 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1981 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1982 | if test "${ac_cv_prog_CC+set}" = set; then | |
1983 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 1984 | else |
2299a76d DJ |
1985 | if test -n "$CC"; then |
1986 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
252b5132 | 1987 | else |
2299a76d DJ |
1988 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1989 | for as_dir in $PATH | |
1990 | do | |
1991 | IFS=$as_save_IFS | |
1992 | test -z "$as_dir" && as_dir=. | |
1993 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1994 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1995 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
1996 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1997 | break 2 | |
1998 | fi | |
1999 | done | |
2000 | done | |
2001 | ||
252b5132 RH |
2002 | fi |
2003 | fi | |
2299a76d DJ |
2004 | CC=$ac_cv_prog_CC |
2005 | if test -n "$CC"; then | |
2006 | echo "$as_me:$LINENO: result: $CC" >&5 | |
2007 | echo "${ECHO_T}$CC" >&6 | |
252b5132 | 2008 | else |
2299a76d DJ |
2009 | echo "$as_me:$LINENO: result: no" >&5 |
2010 | echo "${ECHO_T}no" >&6 | |
252b5132 | 2011 | fi |
252b5132 | 2012 | |
2299a76d DJ |
2013 | test -n "$CC" && break |
2014 | done | |
252b5132 | 2015 | fi |
2299a76d DJ |
2016 | if test -z "$CC"; then |
2017 | ac_ct_CC=$CC | |
2018 | for ac_prog in cl | |
2019 | do | |
2020 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2021 | set dummy $ac_prog; ac_word=$2 | |
2022 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2023 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2024 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2025 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2026 | else | |
2027 | if test -n "$ac_ct_CC"; then | |
2028 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2029 | else | |
2030 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2031 | for as_dir in $PATH | |
2032 | do | |
2033 | IFS=$as_save_IFS | |
2034 | test -z "$as_dir" && as_dir=. | |
2035 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2036 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2037 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2038 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2039 | break 2 | |
252b5132 | 2040 | fi |
2299a76d DJ |
2041 | done |
2042 | done | |
2043 | ||
2044 | fi | |
2045 | fi | |
2046 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2047 | if test -n "$ac_ct_CC"; then | |
2048 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2049 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
252b5132 | 2050 | else |
2299a76d DJ |
2051 | echo "$as_me:$LINENO: result: no" >&5 |
2052 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
2053 | fi |
2054 | ||
2299a76d DJ |
2055 | test -n "$ac_ct_CC" && break |
2056 | done | |
252b5132 | 2057 | |
2299a76d DJ |
2058 | CC=$ac_ct_CC |
2059 | fi | |
2060 | ||
2061 | fi | |
2062 | ||
2063 | ||
2064 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2065 | See \`config.log' for more details." >&5 | |
2066 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2067 | See \`config.log' for more details." >&2;} | |
2068 | { (exit 1); exit 1; }; } | |
2069 | ||
2070 | # Provide some information about the compiler. | |
2071 | echo "$as_me:$LINENO:" \ | |
2072 | "checking for C compiler version" >&5 | |
2073 | ac_compiler=`set X $ac_compile; echo $2` | |
2074 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2075 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2076 | ac_status=$? | |
2077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2078 | (exit $ac_status); } | |
2079 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2080 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2081 | ac_status=$? | |
2082 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2083 | (exit $ac_status); } | |
2084 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2085 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2086 | ac_status=$? | |
2087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2088 | (exit $ac_status); } | |
2089 | ||
2090 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2091 | /* confdefs.h. */ |
2092 | _ACEOF | |
2093 | cat confdefs.h >>conftest.$ac_ext | |
2094 | cat >>conftest.$ac_ext <<_ACEOF | |
2095 | /* end confdefs.h. */ | |
92655e19 | 2096 | |
2299a76d DJ |
2097 | int |
2098 | main () | |
2099 | { | |
2100 | ||
2101 | ; | |
2102 | return 0; | |
2103 | } | |
2104 | _ACEOF | |
2105 | # FIXME: Cleanup? | |
2106 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2107 | (eval $ac_link) 2>&5 | |
2108 | ac_status=$? | |
2109 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2110 | (exit $ac_status); }; then | |
2111 | gcc_no_link=no | |
2112 | else | |
2113 | gcc_no_link=yes | |
2114 | fi | |
2115 | ||
2116 | if test x$gcc_no_link = xyes; then | |
2117 | # Setting cross_compile will disable run tests; it will | |
2118 | # also disable AC_CHECK_FILE but that's generally | |
2119 | # correct if we can't link. | |
2120 | cross_compiling=yes | |
2121 | EXEEXT= | |
2122 | else | |
2123 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2124 | /* confdefs.h. */ |
2125 | _ACEOF | |
2126 | cat confdefs.h >>conftest.$ac_ext | |
2127 | cat >>conftest.$ac_ext <<_ACEOF | |
2128 | /* end confdefs.h. */ | |
2129 | ||
2130 | int | |
2131 | main () | |
2132 | { | |
2133 | ||
2134 | ; | |
2135 | return 0; | |
2136 | } | |
2137 | _ACEOF | |
2138 | ac_clean_files_save=$ac_clean_files | |
2139 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2140 | # Try to create an executable without -o first, disregard a.out. | |
2141 | # It will help us diagnose broken compilers, and finding out an intuition | |
2142 | # of exeext. | |
58670637 DD |
2143 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2144 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
2299a76d DJ |
2145 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2146 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2147 | (eval $ac_link_default) 2>&5 | |
2148 | ac_status=$? | |
2149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2150 | (exit $ac_status); }; then | |
2151 | # Find the output, starting from the most likely. This scheme is | |
2152 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2153 | # resort. | |
2154 | ||
2155 | # Be careful to initialize this variable, since it used to be cached. | |
2156 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2157 | ac_cv_exeext= | |
2158 | # b.out is created by i960 compilers. | |
2159 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2160 | do | |
2161 | test -f "$ac_file" || continue | |
2162 | case $ac_file in | |
2163 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
58670637 | 2164 | ;; |
2299a76d | 2165 | conftest.$ac_ext ) |
58670637 DD |
2166 | # This is the source file. |
2167 | ;; | |
2299a76d | 2168 | [ab].out ) |
58670637 DD |
2169 | # We found the default executable, but exeext='' is most |
2170 | # certainly right. | |
2171 | break;; | |
2299a76d | 2172 | *.* ) |
58670637 DD |
2173 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2174 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2175 | # but it would be cool to find out if it's true. Does anybody | |
2176 | # maintain Libtool? --akim. | |
2177 | export ac_cv_exeext | |
2178 | break;; | |
2299a76d | 2179 | * ) |
58670637 | 2180 | break;; |
2299a76d DJ |
2181 | esac |
2182 | done | |
b39b76b8 | 2183 | else |
2299a76d DJ |
2184 | echo "$as_me: failed program was:" >&5 |
2185 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2186 | ||
2187 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2188 | See \`config.log' for more details." >&5 | |
2189 | echo "$as_me: error: C compiler cannot create executables | |
2190 | See \`config.log' for more details." >&2;} | |
2191 | { (exit 77); exit 77; }; } | |
2192 | fi | |
2193 | ||
2194 | ac_exeext=$ac_cv_exeext | |
2195 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2196 | echo "${ECHO_T}$ac_file" >&6 | |
2197 | ||
2198 | # Check the compiler produces executables we can run. If not, either | |
2199 | # the compiler is broken, or we cross compile. | |
2200 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2201 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2202 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2203 | # If not cross compiling, check that we can run a simple program. | |
2204 | if test "$cross_compiling" != yes; then | |
2205 | if { ac_try='./$ac_file' | |
2206 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2207 | (eval $ac_try) 2>&5 | |
2208 | ac_status=$? | |
2209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2210 | (exit $ac_status); }; }; then | |
2211 | cross_compiling=no | |
2212 | else | |
2213 | if test "$cross_compiling" = maybe; then | |
2214 | cross_compiling=yes | |
2215 | else | |
2216 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2217 | If you meant to cross compile, use \`--host'. | |
2218 | See \`config.log' for more details." >&5 | |
2219 | echo "$as_me: error: cannot run C compiled programs. | |
2220 | If you meant to cross compile, use \`--host'. | |
2221 | See \`config.log' for more details." >&2;} | |
2222 | { (exit 1); exit 1; }; } | |
b39b76b8 DD |
2223 | fi |
2224 | fi | |
2299a76d DJ |
2225 | fi |
2226 | echo "$as_me:$LINENO: result: yes" >&5 | |
2227 | echo "${ECHO_T}yes" >&6 | |
2228 | ||
2229 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2230 | ac_clean_files=$ac_clean_files_save | |
2231 | # Check the compiler produces executables we can run. If not, either | |
2232 | # the compiler is broken, or we cross compile. | |
2233 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2234 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2235 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2236 | echo "${ECHO_T}$cross_compiling" >&6 | |
2237 | ||
2238 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2239 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2240 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2241 | (eval $ac_link) 2>&5 | |
2242 | ac_status=$? | |
2243 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2244 | (exit $ac_status); }; then | |
2245 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2246 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2247 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2248 | # `rm'. | |
2249 | for ac_file in conftest.exe conftest conftest.*; do | |
2250 | test -f "$ac_file" || continue | |
2251 | case $ac_file in | |
2252 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2253 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
58670637 DD |
2254 | export ac_cv_exeext |
2255 | break;; | |
2299a76d DJ |
2256 | * ) break;; |
2257 | esac | |
2258 | done | |
b39b76b8 | 2259 | else |
2299a76d DJ |
2260 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2261 | See \`config.log' for more details." >&5 | |
2262 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2263 | See \`config.log' for more details." >&2;} | |
2264 | { (exit 1); exit 1; }; } | |
b39b76b8 | 2265 | fi |
b39b76b8 | 2266 | |
2299a76d DJ |
2267 | rm -f conftest$ac_cv_exeext |
2268 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2269 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2270 | ||
2271 | rm -f conftest.$ac_ext | |
2272 | EXEEXT=$ac_cv_exeext | |
2273 | ac_exeext=$EXEEXT | |
b39b76b8 | 2274 | fi |
2299a76d DJ |
2275 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
2276 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2277 | if test "${ac_cv_objext+set}" = set; then | |
2278 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
b39b76b8 | 2279 | else |
2299a76d | 2280 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
2281 | /* confdefs.h. */ |
2282 | _ACEOF | |
2283 | cat confdefs.h >>conftest.$ac_ext | |
2284 | cat >>conftest.$ac_ext <<_ACEOF | |
2285 | /* end confdefs.h. */ | |
b39b76b8 | 2286 | |
2299a76d DJ |
2287 | int |
2288 | main () | |
2289 | { | |
b39b76b8 | 2290 | |
2299a76d DJ |
2291 | ; |
2292 | return 0; | |
2293 | } | |
2294 | _ACEOF | |
2295 | rm -f conftest.o conftest.obj | |
2296 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2297 | (eval $ac_compile) 2>&5 | |
2298 | ac_status=$? | |
2299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2300 | (exit $ac_status); }; then | |
2301 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2302 | case $ac_file in | |
2303 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2304 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2305 | break;; | |
2306 | esac | |
2307 | done | |
b39b76b8 | 2308 | else |
2299a76d DJ |
2309 | echo "$as_me: failed program was:" >&5 |
2310 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2311 | ||
2312 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2313 | See \`config.log' for more details." >&5 | |
2314 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2315 | See \`config.log' for more details." >&2;} | |
2316 | { (exit 1); exit 1; }; } | |
2317 | fi | |
2318 | ||
2319 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
b39b76b8 | 2320 | fi |
2299a76d DJ |
2321 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
2322 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2323 | OBJEXT=$ac_cv_objext | |
2324 | ac_objext=$OBJEXT | |
2325 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2326 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2327 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2328 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2329 | else | |
2330 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2331 | /* confdefs.h. */ |
2332 | _ACEOF | |
2333 | cat confdefs.h >>conftest.$ac_ext | |
2334 | cat >>conftest.$ac_ext <<_ACEOF | |
2335 | /* end confdefs.h. */ | |
2336 | ||
2337 | int | |
2338 | main () | |
2339 | { | |
2340 | #ifndef __GNUC__ | |
2341 | choke me | |
2342 | #endif | |
b39b76b8 | 2343 | |
2299a76d DJ |
2344 | ; |
2345 | return 0; | |
2346 | } | |
2347 | _ACEOF | |
2348 | rm -f conftest.$ac_objext | |
2349 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2350 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2351 | ac_status=$? |
58670637 DD |
2352 | grep -v '^ *+' conftest.er1 >conftest.err |
2353 | rm -f conftest.er1 | |
2354 | cat conftest.err >&5 | |
2299a76d DJ |
2355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2356 | (exit $ac_status); } && | |
fd7d450d DD |
2357 | { ac_try='test -z "$ac_c_werror_flag" |
2358 | || test ! -s conftest.err' | |
58670637 DD |
2359 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2360 | (eval $ac_try) 2>&5 | |
2361 | ac_status=$? | |
2362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2363 | (exit $ac_status); }; } && | |
2364 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2366 | (eval $ac_try) 2>&5 | |
2367 | ac_status=$? | |
2368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2369 | (exit $ac_status); }; }; then | |
2370 | ac_compiler_gnu=yes | |
2371 | else | |
2372 | echo "$as_me: failed program was:" >&5 | |
2373 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2374 | ||
2375 | ac_compiler_gnu=no | |
2376 | fi | |
58670637 | 2377 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2378 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2379 | ||
2380 | fi | |
2381 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2382 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2383 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2384 | ac_test_CFLAGS=${CFLAGS+set} | |
2385 | ac_save_CFLAGS=$CFLAGS | |
2386 | CFLAGS="-g" | |
2387 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2388 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2389 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2390 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2391 | else | |
2392 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2393 | /* confdefs.h. */ |
2394 | _ACEOF | |
2395 | cat confdefs.h >>conftest.$ac_ext | |
2396 | cat >>conftest.$ac_ext <<_ACEOF | |
2397 | /* end confdefs.h. */ | |
b39b76b8 | 2398 | |
2299a76d DJ |
2399 | int |
2400 | main () | |
2401 | { | |
b39b76b8 | 2402 | |
2299a76d DJ |
2403 | ; |
2404 | return 0; | |
2405 | } | |
2406 | _ACEOF | |
2407 | rm -f conftest.$ac_objext | |
2408 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2409 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2410 | ac_status=$? |
58670637 DD |
2411 | grep -v '^ *+' conftest.er1 >conftest.err |
2412 | rm -f conftest.er1 | |
2413 | cat conftest.err >&5 | |
2299a76d DJ |
2414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2415 | (exit $ac_status); } && | |
fd7d450d DD |
2416 | { ac_try='test -z "$ac_c_werror_flag" |
2417 | || test ! -s conftest.err' | |
58670637 DD |
2418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2419 | (eval $ac_try) 2>&5 | |
2420 | ac_status=$? | |
2421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2422 | (exit $ac_status); }; } && | |
2423 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2425 | (eval $ac_try) 2>&5 | |
2426 | ac_status=$? | |
2427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2428 | (exit $ac_status); }; }; then | |
2429 | ac_cv_prog_cc_g=yes | |
2430 | else | |
2431 | echo "$as_me: failed program was:" >&5 | |
2432 | sed 's/^/| /' conftest.$ac_ext >&5 | |
252b5132 | 2433 | |
2299a76d DJ |
2434 | ac_cv_prog_cc_g=no |
2435 | fi | |
58670637 | 2436 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2437 | fi |
2438 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2439 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
2440 | if test "$ac_test_CFLAGS" = set; then | |
2441 | CFLAGS=$ac_save_CFLAGS | |
2442 | elif test $ac_cv_prog_cc_g = yes; then | |
252b5132 | 2443 | if test "$GCC" = yes; then |
2299a76d | 2444 | CFLAGS="-g -O2" |
252b5132 | 2445 | else |
2299a76d | 2446 | CFLAGS="-g" |
252b5132 RH |
2447 | fi |
2448 | else | |
2299a76d DJ |
2449 | if test "$GCC" = yes; then |
2450 | CFLAGS="-O2" | |
2451 | else | |
2452 | CFLAGS= | |
2453 | fi | |
252b5132 | 2454 | fi |
2299a76d DJ |
2455 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2456 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2457 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2458 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2459 | else | |
2460 | ac_cv_prog_cc_stdc=no | |
2461 | ac_save_CC=$CC | |
2462 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2463 | /* confdefs.h. */ |
2464 | _ACEOF | |
2465 | cat confdefs.h >>conftest.$ac_ext | |
2466 | cat >>conftest.$ac_ext <<_ACEOF | |
2467 | /* end confdefs.h. */ | |
2468 | #include <stdarg.h> | |
2469 | #include <stdio.h> | |
2470 | #include <sys/types.h> | |
2471 | #include <sys/stat.h> | |
2472 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2473 | struct buf { int x; }; | |
2474 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2475 | static char *e (p, i) | |
2476 | char **p; | |
2477 | int i; | |
2478 | { | |
2479 | return p[i]; | |
92655e19 | 2480 | } |
2299a76d DJ |
2481 | static char *f (char * (*g) (char **, int), char **p, ...) |
2482 | { | |
2483 | char *s; | |
2484 | va_list v; | |
2485 | va_start (v,p); | |
2486 | s = g (p, va_arg (v,int)); | |
2487 | va_end (v); | |
2488 | return s; | |
92655e19 | 2489 | } |
58670637 DD |
2490 | |
2491 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2492 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2493 | These don't provoke an error unfortunately, instead are silently treated | |
2494 | as 'x'. The following induces an error, until -std1 is added to get | |
2495 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2496 | array size at least. It's necessary to write '\x00'==0 to get something | |
2497 | that's true only with -std1. */ | |
2498 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2499 | ||
2299a76d DJ |
2500 | int test (int i, double x); |
2501 | struct s1 {int (*f) (int a);}; | |
2502 | struct s2 {int (*f) (double a);}; | |
2503 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2504 | int argc; | |
2505 | char **argv; | |
2506 | int | |
2507 | main () | |
2508 | { | |
2509 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2510 | ; | |
2511 | return 0; | |
92655e19 | 2512 | } |
2299a76d DJ |
2513 | _ACEOF |
2514 | # Don't try gcc -ansi; that turns off useful extensions and | |
2515 | # breaks some systems' header files. | |
2516 | # AIX -qlanglvl=ansi | |
2517 | # Ultrix and OSF/1 -std1 | |
2518 | # HP-UX 10.20 and later -Ae | |
2519 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2520 | # SVR4 -Xc -D__EXTENSIONS__ | |
2521 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2522 | do | |
2523 | CC="$ac_save_CC $ac_arg" | |
2524 | rm -f conftest.$ac_objext | |
2525 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2526 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2527 | ac_status=$? |
58670637 DD |
2528 | grep -v '^ *+' conftest.er1 >conftest.err |
2529 | rm -f conftest.er1 | |
2530 | cat conftest.err >&5 | |
2299a76d DJ |
2531 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2532 | (exit $ac_status); } && | |
fd7d450d DD |
2533 | { ac_try='test -z "$ac_c_werror_flag" |
2534 | || test ! -s conftest.err' | |
58670637 DD |
2535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2536 | (eval $ac_try) 2>&5 | |
2537 | ac_status=$? | |
2538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2539 | (exit $ac_status); }; } && | |
2540 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2542 | (eval $ac_try) 2>&5 | |
2543 | ac_status=$? | |
2544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2545 | (exit $ac_status); }; }; then | |
2546 | ac_cv_prog_cc_stdc=$ac_arg | |
2547 | break | |
2548 | else | |
2549 | echo "$as_me: failed program was:" >&5 | |
2550 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2551 | ||
2552 | fi | |
58670637 | 2553 | rm -f conftest.err conftest.$ac_objext |
2299a76d DJ |
2554 | done |
2555 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2556 | CC=$ac_save_CC | |
2557 | ||
2558 | fi | |
2559 | ||
2560 | case "x$ac_cv_prog_cc_stdc" in | |
2561 | x|xno) | |
2562 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2563 | echo "${ECHO_T}none needed" >&6 ;; | |
2564 | *) | |
2565 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2566 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2567 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2568 | esac | |
2569 | ||
2570 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2571 | # in C++ we need to declare it. In case someone uses the same compiler | |
2572 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2573 | # the declaration of exit, since it's the most demanding environment. | |
2574 | cat >conftest.$ac_ext <<_ACEOF | |
2575 | #ifndef __cplusplus | |
2576 | choke me | |
2577 | #endif | |
2578 | _ACEOF | |
2579 | rm -f conftest.$ac_objext | |
2580 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2581 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2582 | ac_status=$? |
58670637 DD |
2583 | grep -v '^ *+' conftest.er1 >conftest.err |
2584 | rm -f conftest.er1 | |
2585 | cat conftest.err >&5 | |
2299a76d DJ |
2586 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2587 | (exit $ac_status); } && | |
fd7d450d DD |
2588 | { ac_try='test -z "$ac_c_werror_flag" |
2589 | || test ! -s conftest.err' | |
58670637 DD |
2590 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2591 | (eval $ac_try) 2>&5 | |
2592 | ac_status=$? | |
2593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2594 | (exit $ac_status); }; } && | |
2595 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2596 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2597 | (eval $ac_try) 2>&5 | |
2598 | ac_status=$? | |
2599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2600 | (exit $ac_status); }; }; then | |
2601 | for ac_declaration in \ | |
58670637 | 2602 | '' \ |
2299a76d DJ |
2603 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2604 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2605 | 'extern "C" void exit (int) throw ();' \ | |
2606 | 'extern "C" void exit (int);' \ | |
2607 | 'void exit (int);' | |
2608 | do | |
2609 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2610 | /* confdefs.h. */ |
2611 | _ACEOF | |
2612 | cat confdefs.h >>conftest.$ac_ext | |
2613 | cat >>conftest.$ac_ext <<_ACEOF | |
2614 | /* end confdefs.h. */ | |
b7ca9213 | 2615 | $ac_declaration |
58670637 | 2616 | #include <stdlib.h> |
2299a76d DJ |
2617 | int |
2618 | main () | |
2619 | { | |
2620 | exit (42); | |
2621 | ; | |
2622 | return 0; | |
92655e19 | 2623 | } |
2299a76d DJ |
2624 | _ACEOF |
2625 | rm -f conftest.$ac_objext | |
2626 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2627 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2628 | ac_status=$? |
58670637 DD |
2629 | grep -v '^ *+' conftest.er1 >conftest.err |
2630 | rm -f conftest.er1 | |
2631 | cat conftest.err >&5 | |
2299a76d DJ |
2632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2633 | (exit $ac_status); } && | |
fd7d450d DD |
2634 | { ac_try='test -z "$ac_c_werror_flag" |
2635 | || test ! -s conftest.err' | |
58670637 DD |
2636 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2637 | (eval $ac_try) 2>&5 | |
2638 | ac_status=$? | |
2639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2640 | (exit $ac_status); }; } && | |
2641 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2643 | (eval $ac_try) 2>&5 | |
2644 | ac_status=$? | |
2645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2646 | (exit $ac_status); }; }; then | |
2647 | : | |
2648 | else | |
2649 | echo "$as_me: failed program was:" >&5 | |
2650 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2651 | ||
2652 | continue | |
2653 | fi | |
58670637 | 2654 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 2655 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
2656 | /* confdefs.h. */ |
2657 | _ACEOF | |
2658 | cat confdefs.h >>conftest.$ac_ext | |
2659 | cat >>conftest.$ac_ext <<_ACEOF | |
2660 | /* end confdefs.h. */ | |
2661 | $ac_declaration | |
2662 | int | |
2663 | main () | |
2664 | { | |
2665 | exit (42); | |
2666 | ; | |
2667 | return 0; | |
92655e19 | 2668 | } |
2299a76d DJ |
2669 | _ACEOF |
2670 | rm -f conftest.$ac_objext | |
2671 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2672 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2673 | ac_status=$? |
58670637 DD |
2674 | grep -v '^ *+' conftest.er1 >conftest.err |
2675 | rm -f conftest.er1 | |
2676 | cat conftest.err >&5 | |
2299a76d DJ |
2677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2678 | (exit $ac_status); } && | |
fd7d450d DD |
2679 | { ac_try='test -z "$ac_c_werror_flag" |
2680 | || test ! -s conftest.err' | |
58670637 DD |
2681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2682 | (eval $ac_try) 2>&5 | |
2683 | ac_status=$? | |
2684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2685 | (exit $ac_status); }; } && | |
2686 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2688 | (eval $ac_try) 2>&5 | |
2689 | ac_status=$? | |
2690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2691 | (exit $ac_status); }; }; then | |
2692 | break | |
2693 | else | |
2694 | echo "$as_me: failed program was:" >&5 | |
2695 | sed 's/^/| /' conftest.$ac_ext >&5 | |
92655e19 | 2696 | |
2299a76d | 2697 | fi |
58670637 | 2698 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2699 | done |
2700 | rm -f conftest* | |
2701 | if test -n "$ac_declaration"; then | |
2702 | echo '#ifdef __cplusplus' >>confdefs.h | |
2703 | echo $ac_declaration >>confdefs.h | |
2704 | echo '#endif' >>confdefs.h | |
2705 | fi | |
2706 | ||
2707 | else | |
2708 | echo "$as_me: failed program was:" >&5 | |
2709 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2710 | ||
2711 | fi | |
58670637 | 2712 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2713 | ac_ext=c |
2714 | ac_cpp='$CPP $CPPFLAGS' | |
2715 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2716 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2717 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2718 | ||
8ddbb593 DJ |
2719 | ac_ext=c |
2720 | ac_cpp='$CPP $CPPFLAGS' | |
2721 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2722 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2723 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2724 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2725 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
2726 | # On Suns, sometimes $CPP names a directory. | |
2727 | if test -n "$CPP" && test -d "$CPP"; then | |
2728 | CPP= | |
2729 | fi | |
2730 | if test -z "$CPP"; then | |
2731 | if test "${ac_cv_prog_CPP+set}" = set; then | |
2732 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2733 | else | |
2734 | # Double quotes because CPP needs to be expanded | |
2735 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2736 | do | |
2737 | ac_preproc_ok=false | |
2738 | for ac_c_preproc_warn_flag in '' yes | |
2739 | do | |
2740 | # Use a header file that comes with gcc, so configuring glibc | |
2741 | # with a fresh cross-compiler works. | |
2742 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2743 | # <limits.h> exists even on freestanding compilers. | |
2744 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2745 | # not just through cpp. "Syntax error" is here to catch this case. | |
2746 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2747 | /* confdefs.h. */ |
2748 | _ACEOF | |
2749 | cat confdefs.h >>conftest.$ac_ext | |
2750 | cat >>conftest.$ac_ext <<_ACEOF | |
2751 | /* end confdefs.h. */ | |
2752 | #ifdef __STDC__ | |
2753 | # include <limits.h> | |
2754 | #else | |
2755 | # include <assert.h> | |
2756 | #endif | |
58670637 | 2757 | Syntax error |
8ddbb593 DJ |
2758 | _ACEOF |
2759 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2760 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2761 | ac_status=$? | |
2762 | grep -v '^ *+' conftest.er1 >conftest.err | |
2763 | rm -f conftest.er1 | |
2764 | cat conftest.err >&5 | |
2765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2766 | (exit $ac_status); } >/dev/null; then | |
2767 | if test -s conftest.err; then | |
2768 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2769 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2770 | else |
2771 | ac_cpp_err= | |
2772 | fi | |
2773 | else | |
2774 | ac_cpp_err=yes | |
2775 | fi | |
2776 | if test -z "$ac_cpp_err"; then | |
2777 | : | |
2778 | else | |
2779 | echo "$as_me: failed program was:" >&5 | |
2780 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2781 | ||
2782 | # Broken: fails on valid input. | |
2783 | continue | |
2784 | fi | |
2785 | rm -f conftest.err conftest.$ac_ext | |
2786 | ||
2787 | # OK, works on sane cases. Now check whether non-existent headers | |
2788 | # can be detected and how. | |
2789 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2790 | /* confdefs.h. */ |
2791 | _ACEOF | |
2792 | cat confdefs.h >>conftest.$ac_ext | |
2793 | cat >>conftest.$ac_ext <<_ACEOF | |
2794 | /* end confdefs.h. */ | |
2795 | #include <ac_nonexistent.h> | |
2796 | _ACEOF | |
2797 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2798 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2799 | ac_status=$? | |
2800 | grep -v '^ *+' conftest.er1 >conftest.err | |
2801 | rm -f conftest.er1 | |
2802 | cat conftest.err >&5 | |
2803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2804 | (exit $ac_status); } >/dev/null; then | |
2805 | if test -s conftest.err; then | |
2806 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2807 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2808 | else |
2809 | ac_cpp_err= | |
2810 | fi | |
2811 | else | |
2812 | ac_cpp_err=yes | |
2813 | fi | |
2814 | if test -z "$ac_cpp_err"; then | |
2815 | # Broken: success on invalid input. | |
2816 | continue | |
2817 | else | |
2818 | echo "$as_me: failed program was:" >&5 | |
2819 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2820 | ||
2821 | # Passes both tests. | |
2822 | ac_preproc_ok=: | |
2823 | break | |
2824 | fi | |
2825 | rm -f conftest.err conftest.$ac_ext | |
2826 | ||
2827 | done | |
2828 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2829 | rm -f conftest.err conftest.$ac_ext | |
2830 | if $ac_preproc_ok; then | |
2831 | break | |
2832 | fi | |
2833 | ||
2834 | done | |
2835 | ac_cv_prog_CPP=$CPP | |
2836 | ||
2837 | fi | |
2838 | CPP=$ac_cv_prog_CPP | |
2839 | else | |
2840 | ac_cv_prog_CPP=$CPP | |
2841 | fi | |
2842 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2843 | echo "${ECHO_T}$CPP" >&6 | |
2844 | ac_preproc_ok=false | |
2845 | for ac_c_preproc_warn_flag in '' yes | |
2846 | do | |
2847 | # Use a header file that comes with gcc, so configuring glibc | |
2848 | # with a fresh cross-compiler works. | |
2849 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2850 | # <limits.h> exists even on freestanding compilers. | |
2851 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2852 | # not just through cpp. "Syntax error" is here to catch this case. | |
2853 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2854 | /* confdefs.h. */ |
2855 | _ACEOF | |
2856 | cat confdefs.h >>conftest.$ac_ext | |
2857 | cat >>conftest.$ac_ext <<_ACEOF | |
2858 | /* end confdefs.h. */ | |
2859 | #ifdef __STDC__ | |
2860 | # include <limits.h> | |
2861 | #else | |
2862 | # include <assert.h> | |
2863 | #endif | |
58670637 | 2864 | Syntax error |
8ddbb593 DJ |
2865 | _ACEOF |
2866 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2867 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2868 | ac_status=$? | |
2869 | grep -v '^ *+' conftest.er1 >conftest.err | |
2870 | rm -f conftest.er1 | |
2871 | cat conftest.err >&5 | |
2872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2873 | (exit $ac_status); } >/dev/null; then | |
2874 | if test -s conftest.err; then | |
2875 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2876 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2877 | else |
2878 | ac_cpp_err= | |
2879 | fi | |
2880 | else | |
2881 | ac_cpp_err=yes | |
2882 | fi | |
2883 | if test -z "$ac_cpp_err"; then | |
2884 | : | |
2885 | else | |
2886 | echo "$as_me: failed program was:" >&5 | |
2887 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2888 | ||
2889 | # Broken: fails on valid input. | |
2890 | continue | |
2891 | fi | |
2892 | rm -f conftest.err conftest.$ac_ext | |
2893 | ||
2894 | # OK, works on sane cases. Now check whether non-existent headers | |
2895 | # can be detected and how. | |
2896 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2897 | /* confdefs.h. */ |
2898 | _ACEOF | |
2899 | cat confdefs.h >>conftest.$ac_ext | |
2900 | cat >>conftest.$ac_ext <<_ACEOF | |
2901 | /* end confdefs.h. */ | |
2902 | #include <ac_nonexistent.h> | |
2903 | _ACEOF | |
2904 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2905 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2906 | ac_status=$? | |
2907 | grep -v '^ *+' conftest.er1 >conftest.err | |
2908 | rm -f conftest.er1 | |
2909 | cat conftest.err >&5 | |
2910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2911 | (exit $ac_status); } >/dev/null; then | |
2912 | if test -s conftest.err; then | |
2913 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2914 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2915 | else |
2916 | ac_cpp_err= | |
2917 | fi | |
2918 | else | |
2919 | ac_cpp_err=yes | |
2920 | fi | |
2921 | if test -z "$ac_cpp_err"; then | |
2922 | # Broken: success on invalid input. | |
2923 | continue | |
2924 | else | |
2925 | echo "$as_me: failed program was:" >&5 | |
2926 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2927 | ||
2928 | # Passes both tests. | |
2929 | ac_preproc_ok=: | |
2930 | break | |
2931 | fi | |
2932 | rm -f conftest.err conftest.$ac_ext | |
2933 | ||
2934 | done | |
2935 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2936 | rm -f conftest.err conftest.$ac_ext | |
2937 | if $ac_preproc_ok; then | |
2938 | : | |
2939 | else | |
2940 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check | |
2941 | See \`config.log' for more details." >&5 | |
2942 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
2943 | See \`config.log' for more details." >&2;} | |
2944 | { (exit 1); exit 1; }; } | |
2945 | fi | |
2946 | ||
2947 | ac_ext=c | |
2948 | ac_cpp='$CPP $CPPFLAGS' | |
2949 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2950 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2951 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2952 | ||
2953 | ||
2954 | ac_c_preproc_warn_flag=yes | |
2299a76d | 2955 | |
fd7d450d | 2956 | |
a104c397 PB |
2957 | ac_libiberty_warn_cflags= |
2958 | save_CFLAGS="$CFLAGS" | |
1f616ca1 | 2959 | for option in -W -Wall -Wwrite-strings -Wc++-compat \ |
a104c397 PB |
2960 | -Wstrict-prototypes; do |
2961 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
2962 | ||
2963 | echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 | |
2964 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 | |
2965 | if eval "test \"\${$as_acx_Woption+set}\" = set"; then | |
fd7d450d DD |
2966 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
2967 | else | |
a104c397 PB |
2968 | CFLAGS="$option" |
2969 | cat >conftest.$ac_ext <<_ACEOF | |
fd7d450d DD |
2970 | /* confdefs.h. */ |
2971 | _ACEOF | |
2972 | cat confdefs.h >>conftest.$ac_ext | |
2973 | cat >>conftest.$ac_ext <<_ACEOF | |
2974 | /* end confdefs.h. */ | |
2975 | ||
a104c397 PB |
2976 | int |
2977 | main () | |
2978 | { | |
2979 | ||
2980 | ; | |
2981 | return 0; | |
2982 | } | |
fd7d450d DD |
2983 | _ACEOF |
2984 | rm -f conftest.$ac_objext | |
2985 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2986 | (eval $ac_compile) 2>conftest.er1 | |
2987 | ac_status=$? | |
2988 | grep -v '^ *+' conftest.er1 >conftest.err | |
2989 | rm -f conftest.er1 | |
2990 | cat conftest.err >&5 | |
2991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2992 | (exit $ac_status); } && | |
2993 | { ac_try='test -z "$ac_c_werror_flag" | |
2994 | || test ! -s conftest.err' | |
2995 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2996 | (eval $ac_try) 2>&5 | |
2997 | ac_status=$? | |
2998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2999 | (exit $ac_status); }; } && | |
3000 | { ac_try='test -s conftest.$ac_objext' | |
3001 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3002 | (eval $ac_try) 2>&5 | |
3003 | ac_status=$? | |
3004 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3005 | (exit $ac_status); }; }; then | |
a104c397 | 3006 | eval "$as_acx_Woption=yes" |
fd7d450d DD |
3007 | else |
3008 | echo "$as_me: failed program was:" >&5 | |
3009 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3010 | ||
a104c397 | 3011 | eval "$as_acx_Woption=no" |
fd7d450d DD |
3012 | fi |
3013 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
fd7d450d DD |
3014 | |
3015 | fi | |
a104c397 PB |
3016 | echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 |
3017 | echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 | |
3018 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then | |
3019 | ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option" | |
fd7d450d | 3020 | fi |
11a338da | 3021 | |
a104c397 PB |
3022 | done |
3023 | CFLAGS="$save_CFLAGS" | |
3024 | ||
1f616ca1 PB |
3025 | if test "$GCC" = yes; then |
3026 | echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5 | |
3027 | echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6 | |
3028 | if test "${acx_cv_prog_cc_pedantic_+set}" = set; then | |
3029 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3030 | else | |
3031 | save_CFLAGS="$CFLAGS" | |
3032 | CFLAGS="-pedantic " | |
3033 | cat >conftest.$ac_ext <<_ACEOF | |
3034 | /* confdefs.h. */ | |
3035 | _ACEOF | |
3036 | cat confdefs.h >>conftest.$ac_ext | |
3037 | cat >>conftest.$ac_ext <<_ACEOF | |
3038 | /* end confdefs.h. */ | |
3039 | ||
3040 | int | |
3041 | main () | |
3042 | { | |
3043 | ||
3044 | ; | |
3045 | return 0; | |
3046 | } | |
3047 | _ACEOF | |
3048 | rm -f conftest.$ac_objext | |
3049 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3050 | (eval $ac_compile) 2>conftest.er1 | |
3051 | ac_status=$? | |
3052 | grep -v '^ *+' conftest.er1 >conftest.err | |
3053 | rm -f conftest.er1 | |
3054 | cat conftest.err >&5 | |
3055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3056 | (exit $ac_status); } && | |
3057 | { ac_try='test -z "$ac_c_werror_flag" | |
3058 | || test ! -s conftest.err' | |
3059 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3060 | (eval $ac_try) 2>&5 | |
3061 | ac_status=$? | |
3062 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3063 | (exit $ac_status); }; } && | |
3064 | { ac_try='test -s conftest.$ac_objext' | |
3065 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3066 | (eval $ac_try) 2>&5 | |
3067 | ac_status=$? | |
3068 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3069 | (exit $ac_status); }; }; then | |
3070 | acx_cv_prog_cc_pedantic_=yes | |
3071 | else | |
3072 | echo "$as_me: failed program was:" >&5 | |
3073 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3074 | ||
3075 | acx_cv_prog_cc_pedantic_=no | |
3076 | fi | |
3077 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3078 | CFLAGS="$save_CFLAGS" | |
3079 | fi | |
3080 | echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5 | |
3081 | echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6 | |
3082 | if test $acx_cv_prog_cc_pedantic_ = yes; then | |
3083 | ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic " | |
3084 | fi | |
3085 | ||
3086 | ||
3087 | fi | |
3088 | ||
3089 | ||
11a338da | 3090 | |
46a10049 DD |
3091 | if test "x$CC" != xcc; then |
3092 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
3093 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
3094 | else | |
3095 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
3096 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
3097 | fi | |
3098 | set dummy $CC; ac_cc=`echo $2 | | |
3099 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
3100 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
3101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3102 | else | |
3103 | cat >conftest.$ac_ext <<_ACEOF | |
3104 | /* confdefs.h. */ | |
3105 | _ACEOF | |
3106 | cat confdefs.h >>conftest.$ac_ext | |
3107 | cat >>conftest.$ac_ext <<_ACEOF | |
3108 | /* end confdefs.h. */ | |
3109 | ||
3110 | int | |
3111 | main () | |
3112 | { | |
3113 | ||
3114 | ; | |
3115 | return 0; | |
3116 | } | |
3117 | _ACEOF | |
3118 | # Make sure it works both with $CC and with simple cc. | |
3119 | # We do the test twice because some compilers refuse to overwrite an | |
3120 | # existing .o file with -o, though they will create one. | |
3121 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
3122 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3123 | (eval $ac_try) 2>&5 | |
3124 | ac_status=$? | |
3125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3126 | (exit $ac_status); } && | |
3127 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3128 | (eval $ac_try) 2>&5 | |
3129 | ac_status=$? | |
3130 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3131 | (exit $ac_status); }; | |
3132 | then | |
3133 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
3134 | if test "x$CC" != xcc; then | |
3135 | # Test first that cc exists at all. | |
3136 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
3137 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3138 | (eval $ac_try) 2>&5 | |
3139 | ac_status=$? | |
3140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3141 | (exit $ac_status); }; }; then | |
3142 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
3143 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3144 | (eval $ac_try) 2>&5 | |
3145 | ac_status=$? | |
3146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3147 | (exit $ac_status); } && | |
3148 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3149 | (eval $ac_try) 2>&5 | |
3150 | ac_status=$? | |
3151 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3152 | (exit $ac_status); }; | |
3153 | then | |
3154 | # cc works too. | |
3155 | : | |
3156 | else | |
3157 | # cc exists but doesn't like -o. | |
3158 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3159 | fi | |
3160 | fi | |
3161 | fi | |
3162 | else | |
3163 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3164 | fi | |
3165 | rm -f conftest* | |
3166 | ||
3167 | fi | |
3168 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
3169 | echo "$as_me:$LINENO: result: yes" >&5 | |
3170 | echo "${ECHO_T}yes" >&6 | |
3171 | else | |
3172 | echo "$as_me:$LINENO: result: no" >&5 | |
3173 | echo "${ECHO_T}no" >&6 | |
3174 | ||
3175 | cat >>confdefs.h <<\_ACEOF | |
3176 | #define NO_MINUS_C_MINUS_O 1 | |
3177 | _ACEOF | |
3178 | ||
3179 | fi | |
3180 | ||
3181 | # autoconf is lame and doesn't give us any substitution variable for this. | |
3182 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
3183 | NO_MINUS_C_MINUS_O=yes | |
3184 | else | |
3185 | OUTPUT_OPTION='-o $@' | |
3186 | fi | |
3187 | ||
3188 | ||
3189 | ||
11a338da DD |
3190 | echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 |
3191 | echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 | |
3192 | if test "${ac_cv_c_const+set}" = set; then | |
96e00b33 L |
3193 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3194 | else | |
11a338da DD |
3195 | cat >conftest.$ac_ext <<_ACEOF |
3196 | /* confdefs.h. */ | |
3197 | _ACEOF | |
3198 | cat confdefs.h >>conftest.$ac_ext | |
3199 | cat >>conftest.$ac_ext <<_ACEOF | |
3200 | /* end confdefs.h. */ | |
3201 | ||
3202 | int | |
3203 | main () | |
3204 | { | |
3205 | /* FIXME: Include the comments suggested by Paul. */ | |
3206 | #ifndef __cplusplus | |
3207 | /* Ultrix mips cc rejects this. */ | |
3208 | typedef int charset[2]; | |
3209 | const charset x; | |
3210 | /* SunOS 4.1.1 cc rejects this. */ | |
3211 | char const *const *ccp; | |
3212 | char **p; | |
3213 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3214 | struct point {int x, y;}; | |
3215 | static struct point const zero = {0,0}; | |
3216 | /* AIX XL C 1.02.0.0 rejects this. | |
3217 | It does not let you subtract one const X* pointer from another in | |
3218 | an arm of an if-expression whose if-part is not a constant | |
3219 | expression */ | |
3220 | const char *g = "string"; | |
3221 | ccp = &g + (g ? g-g : 0); | |
3222 | /* HPUX 7.0 cc rejects these. */ | |
3223 | ++ccp; | |
3224 | p = (char**) ccp; | |
3225 | ccp = (char const *const *) p; | |
3226 | { /* SCO 3.2v4 cc rejects this. */ | |
3227 | char *t; | |
3228 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3229 | ||
3230 | *t++ = 0; | |
3231 | } | |
3232 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3233 | int x[] = {25, 17}; | |
3234 | const int *foo = &x[0]; | |
3235 | ++foo; | |
3236 | } | |
3237 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3238 | typedef const int *iptr; | |
3239 | iptr p = 0; | |
3240 | ++p; | |
3241 | } | |
3242 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3243 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3244 | struct s { int j; const int *ap[3]; }; | |
3245 | struct s *b; b->j = 5; | |
3246 | } | |
3247 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3248 | const int foo = 10; | |
3249 | } | |
3250 | #endif | |
3251 | ||
3252 | ; | |
3253 | return 0; | |
3254 | } | |
3255 | _ACEOF | |
3256 | rm -f conftest.$ac_objext | |
3257 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3258 | (eval $ac_compile) 2>conftest.er1 | |
3259 | ac_status=$? | |
3260 | grep -v '^ *+' conftest.er1 >conftest.err | |
3261 | rm -f conftest.er1 | |
3262 | cat conftest.err >&5 | |
3263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3264 | (exit $ac_status); } && | |
fd7d450d DD |
3265 | { ac_try='test -z "$ac_c_werror_flag" |
3266 | || test ! -s conftest.err' | |
11a338da DD |
3267 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3268 | (eval $ac_try) 2>&5 | |
3269 | ac_status=$? | |
3270 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3271 | (exit $ac_status); }; } && | |
3272 | { ac_try='test -s conftest.$ac_objext' | |
3273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3274 | (eval $ac_try) 2>&5 | |
3275 | ac_status=$? | |
3276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3277 | (exit $ac_status); }; }; then | |
3278 | ac_cv_c_const=yes | |
96e00b33 | 3279 | else |
11a338da DD |
3280 | echo "$as_me: failed program was:" >&5 |
3281 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3282 | ||
3283 | ac_cv_c_const=no | |
96e00b33 | 3284 | fi |
11a338da | 3285 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 3286 | fi |
11a338da DD |
3287 | echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 |
3288 | echo "${ECHO_T}$ac_cv_c_const" >&6 | |
3289 | if test $ac_cv_c_const = no; then | |
3290 | ||
3291 | cat >>confdefs.h <<\_ACEOF | |
3292 | #define const | |
3293 | _ACEOF | |
2299a76d | 3294 | |
96e00b33 | 3295 | fi |
11a338da DD |
3296 | |
3297 | echo "$as_me:$LINENO: checking for inline" >&5 | |
3298 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3299 | if test "${ac_cv_c_inline+set}" = set; then | |
96e00b33 L |
3300 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3301 | else | |
11a338da DD |
3302 | ac_cv_c_inline=no |
3303 | for ac_kw in inline __inline__ __inline; do | |
3304 | cat >conftest.$ac_ext <<_ACEOF | |
3305 | /* confdefs.h. */ | |
3306 | _ACEOF | |
3307 | cat confdefs.h >>conftest.$ac_ext | |
3308 | cat >>conftest.$ac_ext <<_ACEOF | |
3309 | /* end confdefs.h. */ | |
3310 | #ifndef __cplusplus | |
3311 | typedef int foo_t; | |
3312 | static $ac_kw foo_t static_foo () {return 0; } | |
3313 | $ac_kw foo_t foo () {return 0; } | |
3314 | #endif | |
96e00b33 | 3315 | |
11a338da DD |
3316 | _ACEOF |
3317 | rm -f conftest.$ac_objext | |
3318 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3319 | (eval $ac_compile) 2>conftest.er1 | |
3320 | ac_status=$? | |
3321 | grep -v '^ *+' conftest.er1 >conftest.err | |
3322 | rm -f conftest.er1 | |
3323 | cat conftest.err >&5 | |
3324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3325 | (exit $ac_status); } && | |
fd7d450d DD |
3326 | { ac_try='test -z "$ac_c_werror_flag" |
3327 | || test ! -s conftest.err' | |
11a338da DD |
3328 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3329 | (eval $ac_try) 2>&5 | |
3330 | ac_status=$? | |
3331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3332 | (exit $ac_status); }; } && | |
3333 | { ac_try='test -s conftest.$ac_objext' | |
3334 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3335 | (eval $ac_try) 2>&5 | |
3336 | ac_status=$? | |
3337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3338 | (exit $ac_status); }; }; then | |
3339 | ac_cv_c_inline=$ac_kw; break | |
2299a76d | 3340 | else |
11a338da DD |
3341 | echo "$as_me: failed program was:" >&5 |
3342 | sed 's/^/| /' conftest.$ac_ext >&5 | |
96e00b33 | 3343 | |
96e00b33 | 3344 | fi |
11a338da DD |
3345 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3346 | done | |
3347 | ||
96e00b33 | 3348 | fi |
11a338da DD |
3349 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3350 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
96e00b33 | 3351 | |
96e00b33 | 3352 | |
11a338da DD |
3353 | case $ac_cv_c_inline in |
3354 | inline | yes) ;; | |
3355 | *) | |
3356 | case $ac_cv_c_inline in | |
3357 | no) ac_val=;; | |
3358 | *) ac_val=$ac_cv_c_inline;; | |
3359 | esac | |
3360 | cat >>confdefs.h <<_ACEOF | |
3361 | #ifndef __cplusplus | |
3362 | #define inline $ac_val | |
3363 | #endif | |
3364 | _ACEOF | |
3365 | ;; | |
3366 | esac | |
96e00b33 | 3367 | |
11a338da DD |
3368 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
3369 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
3370 | if test "${ac_cv_c_bigendian+set}" = set; then | |
96e00b33 L |
3371 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3372 | else | |
0093138c | 3373 | # See if sys/param.h defines the BYTE_ORDER macro. |
11a338da DD |
3374 | cat >conftest.$ac_ext <<_ACEOF |
3375 | /* confdefs.h. */ | |
3376 | _ACEOF | |
3377 | cat confdefs.h >>conftest.$ac_ext | |
3378 | cat >>conftest.$ac_ext <<_ACEOF | |
3379 | /* end confdefs.h. */ | |
3380 | #include <sys/types.h> | |
3381 | #include <sys/param.h> | |
0093138c | 3382 | |
11a338da DD |
3383 | int |
3384 | main () | |
3385 | { | |
11a338da DD |
3386 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3387 | bogus endian macros | |
3388 | #endif | |
0093138c | 3389 | |
11a338da DD |
3390 | ; |
3391 | return 0; | |
3392 | } | |
3393 | _ACEOF | |
3394 | rm -f conftest.$ac_objext | |
3395 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3396 | (eval $ac_compile) 2>conftest.er1 | |
3397 | ac_status=$? | |
3398 | grep -v '^ *+' conftest.er1 >conftest.err | |
3399 | rm -f conftest.er1 | |
46a10049 DD |
3400 | cat conftest.err >&5 |
3401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3402 | (exit $ac_status); } && | |
fd7d450d DD |
3403 | { ac_try='test -z "$ac_c_werror_flag" |
3404 | || test ! -s conftest.err' | |
46a10049 DD |
3405 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3406 | (eval $ac_try) 2>&5 | |
58670637 DD |
3407 | ac_status=$? |
3408 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
46a10049 DD |
3409 | (exit $ac_status); }; } && |
3410 | { ac_try='test -s conftest.$ac_objext' | |
3411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3412 | (eval $ac_try) 2>&5 | |
2299a76d DJ |
3413 | ac_status=$? |
3414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
46a10049 DD |
3415 | (exit $ac_status); }; }; then |
3416 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
2299a76d | 3417 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
3418 | /* confdefs.h. */ |
3419 | _ACEOF | |
3420 | cat confdefs.h >>conftest.$ac_ext | |
3421 | cat >>conftest.$ac_ext <<_ACEOF | |
3422 | /* end confdefs.h. */ | |
46a10049 DD |
3423 | #include <sys/types.h> |
3424 | #include <sys/param.h> | |
0093138c | 3425 | |
2299a76d DJ |
3426 | int |
3427 | main () | |
3428 | { | |
46a10049 DD |
3429 | #if BYTE_ORDER != BIG_ENDIAN |
3430 | not big endian | |
3431 | #endif | |
0093138c | 3432 | |
2299a76d DJ |
3433 | ; |
3434 | return 0; | |
3435 | } | |
3436 | _ACEOF | |
46a10049 DD |
3437 | rm -f conftest.$ac_objext |
3438 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3439 | (eval $ac_compile) 2>conftest.er1 | |
2299a76d | 3440 | ac_status=$? |
58670637 DD |
3441 | grep -v '^ *+' conftest.er1 >conftest.err |
3442 | rm -f conftest.er1 | |
3443 | cat conftest.err >&5 | |
2299a76d DJ |
3444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3445 | (exit $ac_status); } && | |
fd7d450d DD |
3446 | { ac_try='test -z "$ac_c_werror_flag" |
3447 | || test ! -s conftest.err' | |
58670637 DD |
3448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3449 | (eval $ac_try) 2>&5 | |
3450 | ac_status=$? | |
3451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3452 | (exit $ac_status); }; } && | |
46a10049 | 3453 | { ac_try='test -s conftest.$ac_objext' |
2299a76d DJ |
3454 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3455 | (eval $ac_try) 2>&5 | |
3456 | ac_status=$? | |
3457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3458 | (exit $ac_status); }; }; then | |
46a10049 | 3459 | ac_cv_c_bigendian=yes |
7108c5dc | 3460 | else |
2299a76d DJ |
3461 | echo "$as_me: failed program was:" >&5 |
3462 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3463 | ||
46a10049 | 3464 | ac_cv_c_bigendian=no |
7108c5dc | 3465 | fi |
46a10049 DD |
3466 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3467 | else | |
3468 | echo "$as_me: failed program was:" >&5 | |
3469 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2299a76d | 3470 | |
0093138c DD |
3471 | # It does not; compile a test program. |
3472 | if test "$cross_compiling" = yes; then | |
3473 | # try to guess the endianness by grepping values into an object file | |
3474 | ac_cv_c_bigendian=unknown | |
3475 | cat >conftest.$ac_ext <<_ACEOF | |
3476 | /* confdefs.h. */ | |
3477 | _ACEOF | |
3478 | cat confdefs.h >>conftest.$ac_ext | |
3479 | cat >>conftest.$ac_ext <<_ACEOF | |
3480 | /* end confdefs.h. */ | |
3481 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3482 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3483 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
3484 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3485 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3486 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
3487 | int | |
3488 | main () | |
3489 | { | |
3490 | _ascii (); _ebcdic (); | |
3491 | ; | |
3492 | return 0; | |
3493 | } | |
3494 | _ACEOF | |
3495 | rm -f conftest.$ac_objext | |
3496 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3497 | (eval $ac_compile) 2>conftest.er1 | |
3498 | ac_status=$? | |
3499 | grep -v '^ *+' conftest.er1 >conftest.err | |
3500 | rm -f conftest.er1 | |
3501 | cat conftest.err >&5 | |
3502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3503 | (exit $ac_status); } && | |
fd7d450d DD |
3504 | { ac_try='test -z "$ac_c_werror_flag" |
3505 | || test ! -s conftest.err' | |
0093138c DD |
3506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3507 | (eval $ac_try) 2>&5 | |
3508 | ac_status=$? | |
3509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3510 | (exit $ac_status); }; } && | |
3511 | { ac_try='test -s conftest.$ac_objext' | |
3512 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3513 | (eval $ac_try) 2>&5 | |
3514 | ac_status=$? | |
3515 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3516 | (exit $ac_status); }; }; then | |
3517 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
3518 | ac_cv_c_bigendian=yes | |
3519 | fi | |
3520 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
3521 | if test "$ac_cv_c_bigendian" = unknown; then | |
3522 | ac_cv_c_bigendian=no | |
3523 | else | |
3524 | # finding both strings is unlikely to happen, but who knows? | |
3525 | ac_cv_c_bigendian=unknown | |
3526 | fi | |
3527 | fi | |
3528 | else | |
3529 | echo "$as_me: failed program was:" >&5 | |
3530 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3531 | ||
7108c5dc | 3532 | fi |
46a10049 | 3533 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
46a10049 DD |
3534 | else |
3535 | cat >conftest.$ac_ext <<_ACEOF | |
3536 | /* confdefs.h. */ | |
3537 | _ACEOF | |
3538 | cat confdefs.h >>conftest.$ac_ext | |
3539 | cat >>conftest.$ac_ext <<_ACEOF | |
3540 | /* end confdefs.h. */ | |
0093138c DD |
3541 | int |
3542 | main () | |
3543 | { | |
46a10049 DD |
3544 | /* Are we little or big endian? From Harbison&Steele. */ |
3545 | union | |
3546 | { | |
3547 | long l; | |
3548 | char c[sizeof (long)]; | |
3549 | } u; | |
3550 | u.l = 1; | |
3551 | exit (u.c[sizeof (long) - 1] == 1); | |
3552 | } | |
2299a76d | 3553 | _ACEOF |
46a10049 DD |
3554 | rm -f conftest$ac_exeext |
3555 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3556 | (eval $ac_link) 2>&5 | |
3557 | ac_status=$? | |
3558 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3559 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3561 | (eval $ac_try) 2>&5 | |
3562 | ac_status=$? | |
3563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3564 | (exit $ac_status); }; }; then | |
3565 | ac_cv_c_bigendian=no | |
3566 | else | |
3567 | echo "$as_me: program exited with status $ac_status" >&5 | |
3568 | echo "$as_me: failed program was:" >&5 | |
3569 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2299a76d | 3570 | |
46a10049 DD |
3571 | ( exit $ac_status ) |
3572 | ac_cv_c_bigendian=yes | |
7108c5dc | 3573 | fi |
46a10049 DD |
3574 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
3575 | fi | |
3576 | fi | |
0093138c | 3577 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
46a10049 DD |
3578 | fi |
3579 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 | |
3580 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
0093138c DD |
3581 | case $ac_cv_c_bigendian in |
3582 | yes) | |
2299a76d | 3583 | |
46a10049 DD |
3584 | cat >>confdefs.h <<\_ACEOF |
3585 | #define WORDS_BIGENDIAN 1 | |
3586 | _ACEOF | |
0093138c DD |
3587 | ;; |
3588 | no) | |
3589 | ;; | |
3590 | *) | |
3591 | { { echo "$as_me:$LINENO: error: unknown endianness | |
3592 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
3593 | echo "$as_me: error: unknown endianness | |
3594 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
3595 | { (exit 1); exit 1; }; } ;; | |
3596 | esac | |
7108c5dc | 3597 | |
252b5132 RH |
3598 | |
3599 | ||
3600 | ||
2299a76d | 3601 | ac_config_headers="$ac_config_headers config.h:config.in" |
252b5132 RH |
3602 | |
3603 | ||
3604 | ||
3605 | # Find a good install program. We prefer a C program (faster), | |
3606 | # so one script is as good as another. But avoid the broken or | |
3607 | # incompatible versions: | |
3608 | # SysV /etc/install, /usr/sbin/install | |
3609 | # SunOS /usr/etc/install | |
3610 | # IRIX /sbin/install | |
3611 | # AIX /bin/install | |
2299a76d | 3612 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
252b5132 RH |
3613 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
3614 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3615 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
58670637 | 3616 | # OS/2's system install, which has a completely different semantic |
252b5132 | 3617 | # ./install, which can be erroneously created by make from ./install.sh. |
2299a76d DJ |
3618 | echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 |
3619 | echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | |
252b5132 | 3620 | if test -z "$INSTALL"; then |
2299a76d DJ |
3621 | if test "${ac_cv_path_install+set}" = set; then |
3622 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3623 | else | |
3624 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3625 | for as_dir in $PATH | |
3626 | do | |
3627 | IFS=$as_save_IFS | |
3628 | test -z "$as_dir" && as_dir=. | |
3629 | # Account for people who put trailing slashes in PATH elements. | |
3630 | case $as_dir/ in | |
3631 | ./ | .// | /cC/* | \ | |
3632 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
58670637 | 3633 | ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ |
2299a76d DJ |
3634 | /usr/ucb/* ) ;; |
3635 | *) | |
3636 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3637 | # Don't use installbsd from OSF since it installs stuff as root | |
3638 | # by default. | |
3639 | for ac_prog in ginstall scoinst install; do | |
3640 | for ac_exec_ext in '' $ac_executable_extensions; do | |
58670637 DD |
3641 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
3642 | if test $ac_prog = install && | |
3643 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3644 | # AIX install. It has an incompatible calling convention. | |
3645 | : | |
3646 | elif test $ac_prog = install && | |
3647 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3648 | # program-specific install script used by HP pwplus--don't use. | |
3649 | : | |
3650 | else | |
3651 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3652 | break 3 | |
3653 | fi | |
3654 | fi | |
252b5132 | 3655 | done |
2299a76d DJ |
3656 | done |
3657 | ;; | |
3658 | esac | |
3659 | done | |
3660 | ||
252b5132 RH |
3661 | |
3662 | fi | |
3663 | if test "${ac_cv_path_install+set}" = set; then | |
2299a76d | 3664 | INSTALL=$ac_cv_path_install |
252b5132 RH |
3665 | else |
3666 | # As a last resort, use the slow shell script. We don't cache a | |
3667 | # path for INSTALL within a source directory, because that will | |
3668 | # break other packages using the cache if that directory is | |
3669 | # removed, or if the path is relative. | |
2299a76d | 3670 | INSTALL=$ac_install_sh |
252b5132 RH |
3671 | fi |
3672 | fi | |
2299a76d DJ |
3673 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
3674 | echo "${ECHO_T}$INSTALL" >&6 | |
252b5132 RH |
3675 | |
3676 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3677 | # It thinks the first close brace ends the variable substitution. | |
3678 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3679 | ||
2299a76d | 3680 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
252b5132 RH |
3681 | |
3682 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3683 | ||
3684 | ||
4cf896a5 KC |
3685 | # Don't build the shared library for build. |
3686 | if [ -n "${with_build_subdir}" ]; then | |
3687 | enable_shared=no | |
3688 | fi | |
3689 | ||
3690 | frag= | |
3691 | case "${host}" in | |
3692 | rs6000-ibm-aix3.1 | rs6000-ibm-aix) | |
3693 | frag=mh-aix ;; | |
3694 | *-*-cxux7*) frag=mh-cxux7 ;; | |
3695 | *-*-freebsd2.1.*) frag=mh-fbsd21 ;; | |
3696 | *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; | |
3697 | i370-*-opened*) frag=mh-openedition ;; | |
3698 | i[34567]86-*-windows*) frag=mh-windows ;; | |
3699 | esac | |
3700 | ||
3701 | if [ -n "${frag}" ]; then | |
3702 | frags=${libiberty_topdir}/libiberty/config/$frag | |
3703 | else | |
3704 | frags= | |
3705 | fi | |
3706 | ||
3707 | # If they didn't specify --enable-shared, don't generate shared libs. | |
3708 | case "${enable_shared}" in | |
3709 | yes) shared=yes ;; | |
3710 | no) shared=no ;; | |
3711 | "") shared=no ;; | |
3712 | *) shared=yes ;; | |
3713 | esac | |
3714 | if [ "${shared}" = "yes" ]; then | |
3715 | frag= | |
3716 | case "${host}" in | |
3717 | *-*-cygwin*) ;; | |
3718 | alpha*-*-linux*) frag=mh-elfalphapic ;; | |
3719 | arm*-*-*) frag=mh-armpic ;; | |
3720 | hppa*-*-*) frag=mh-papic ;; | |
3721 | i[34567]86-*-* | x86_64-*-*) | |
3722 | frag=mh-x86pic ;; | |
3723 | powerpc*-*-aix*) ;; | |
3724 | powerpc*-*-*) frag=mh-ppcpic ;; | |
3725 | sparc*-*-*) frag=mh-sparcpic ;; | |
3726 | s390*-*-*) frag=mh-s390pic ;; | |
3727 | *) frag=mh-${host_cpu}pic ;; | |
3728 | esac | |
3729 | if [ -n "${frag}" ]; then | |
3730 | frags="${frags} ${libiberty_topdir}/config/${frag}" | |
3731 | fi | |
3732 | fi | |
3733 | ||
3734 | echo "# Warning: this fragment is automatically generated" > temp-frag | |
3735 | ||
3736 | for frag in ${frags}; do | |
3737 | if [ -f ${frag} ]; then | |
3738 | echo "Appending ${frag} to xhost-mkfrag" | |
3739 | echo "# Following fragment copied from ${frag}" >> temp-frag | |
3740 | cat ${frag} >> temp-frag | |
3741 | fi | |
3742 | done | |
3743 | ||
3744 | # record if we want to build shared libs. | |
3745 | if [ "${shared}" = "yes" ]; then | |
3746 | echo enable_shared = yes >> temp-frag | |
3747 | else | |
3748 | echo enable_shared = no >> temp-frag | |
3749 | fi | |
3750 | ||
3751 | frag=xhost-mkfrag | |
3752 | ${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag | |
3753 | ||
252b5132 RH |
3754 | host_makefile_frag=${frag} |
3755 | ||
3756 | ||
3757 | # It's OK to check for header files. Although the compiler may not be | |
3758 | # able to link anything, it had better be able to at least compile | |
3759 | # something. | |
2299a76d DJ |
3760 | |
3761 | ||
3762 | ||
3763 | ||
3764 | ||
3765 | ||
3766 | ||
3767 | ||
3768 | ||
3769 | ||
3770 | ||
3771 | ||
3772 | ||
3773 | ||
3774 | ||
3775 | ||
3776 | ||
3777 | ||
3778 | ||
3779 | ||
3780 | ||
3781 | ||
3782 | ||
bb6a587d | 3783 | |
ac119ae8 DD |
3784 | |
3785 | for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h | |
2299a76d DJ |
3786 | do |
3787 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8ddbb593 | 3788 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
3789 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
3790 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3791 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 3792 | else |
8ddbb593 | 3793 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
3794 | /* confdefs.h. */ |
3795 | _ACEOF | |
3796 | cat confdefs.h >>conftest.$ac_ext | |
3797 | cat >>conftest.$ac_ext <<_ACEOF | |
3798 | /* end confdefs.h. */ | |
3799 | #include <$ac_header> | |
3800 | _ACEOF | |
3801 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3802 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3803 | ac_status=$? | |
3804 | grep -v '^ *+' conftest.er1 >conftest.err | |
3805 | rm -f conftest.er1 | |
3806 | cat conftest.err >&5 | |
3807 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3808 | (exit $ac_status); } >/dev/null; then | |
3809 | if test -s conftest.err; then | |
3810 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 3811 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
3812 | else |
3813 | ac_cpp_err= | |
3814 | fi | |
15ae9e71 | 3815 | else |
2299a76d DJ |
3816 | ac_cpp_err=yes |
3817 | fi | |
3818 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 3819 | eval "$as_ac_Header=yes" |
2299a76d DJ |
3820 | else |
3821 | echo "$as_me: failed program was:" >&5 | |
3822 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3823 | ||
8ddbb593 | 3824 | eval "$as_ac_Header=no" |
2299a76d DJ |
3825 | fi |
3826 | rm -f conftest.err conftest.$ac_ext | |
2299a76d DJ |
3827 | fi |
3828 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3829 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
3830 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
3831 | cat >>confdefs.h <<_ACEOF | |
3832 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3833 | _ACEOF | |
3834 | ||
3835 | fi | |
2299a76d DJ |
3836 | done |
3837 | ||
3838 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
3839 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
3840 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
3841 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3842 | else | |
3843 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
3844 | /* confdefs.h. */ |
3845 | _ACEOF | |
3846 | cat confdefs.h >>conftest.$ac_ext | |
3847 | cat >>conftest.$ac_ext <<_ACEOF | |
3848 | /* end confdefs.h. */ | |
dc579051 | 3849 | #include <sys/types.h> |
2299a76d DJ |
3850 | #include <sys/wait.h> |
3851 | #ifndef WEXITSTATUS | |
3852 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
15ae9e71 | 3853 | #endif |
2299a76d DJ |
3854 | #ifndef WIFEXITED |
3855 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
3856 | #endif | |
3857 | ||
3858 | int | |
3859 | main () | |
3860 | { | |
3861 | int s; | |
3862 | wait (&s); | |
3863 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3864 | ; | |
3865 | return 0; | |
3866 | } | |
3867 | _ACEOF | |
3868 | rm -f conftest.$ac_objext | |
3869 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3870 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 3871 | ac_status=$? |
58670637 DD |
3872 | grep -v '^ *+' conftest.er1 >conftest.err |
3873 | rm -f conftest.er1 | |
3874 | cat conftest.err >&5 | |
2299a76d DJ |
3875 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3876 | (exit $ac_status); } && | |
fd7d450d DD |
3877 | { ac_try='test -z "$ac_c_werror_flag" |
3878 | || test ! -s conftest.err' | |
58670637 DD |
3879 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3880 | (eval $ac_try) 2>&5 | |
3881 | ac_status=$? | |
3882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3883 | (exit $ac_status); }; } && | |
3884 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
3885 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3886 | (eval $ac_try) 2>&5 | |
3887 | ac_status=$? | |
3888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3889 | (exit $ac_status); }; }; then | |
3890 | ac_cv_header_sys_wait_h=yes | |
dc579051 | 3891 | else |
2299a76d DJ |
3892 | echo "$as_me: failed program was:" >&5 |
3893 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3894 | ||
3895 | ac_cv_header_sys_wait_h=no | |
dc579051 | 3896 | fi |
58670637 | 3897 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
3898 | fi |
3899 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 | |
3900 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
3901 | if test $ac_cv_header_sys_wait_h = yes; then | |
3902 | ||
8ddbb593 DJ |
3903 | cat >>confdefs.h <<\_ACEOF |
3904 | #define HAVE_SYS_WAIT_H 1 | |
3905 | _ACEOF | |
3906 | ||
3907 | fi | |
3908 | ||
3909 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 | |
3910 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
3911 | if test "${ac_cv_header_time+set}" = set; then | |
3912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3913 | else | |
3914 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3915 | /* confdefs.h. */ |
3916 | _ACEOF | |
3917 | cat confdefs.h >>conftest.$ac_ext | |
3918 | cat >>conftest.$ac_ext <<_ACEOF | |
3919 | /* end confdefs.h. */ | |
3920 | #include <sys/types.h> | |
3921 | #include <sys/time.h> | |
3922 | #include <time.h> | |
3923 | ||
3924 | int | |
3925 | main () | |
3926 | { | |
3927 | if ((struct tm *) 0) | |
3928 | return 0; | |
3929 | ; | |
3930 | return 0; | |
3931 | } | |
3932 | _ACEOF | |
3933 | rm -f conftest.$ac_objext | |
3934 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3935 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 3936 | ac_status=$? |
58670637 DD |
3937 | grep -v '^ *+' conftest.er1 >conftest.err |
3938 | rm -f conftest.er1 | |
3939 | cat conftest.err >&5 | |
8ddbb593 DJ |
3940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3941 | (exit $ac_status); } && | |
fd7d450d DD |
3942 | { ac_try='test -z "$ac_c_werror_flag" |
3943 | || test ! -s conftest.err' | |
58670637 DD |
3944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3945 | (eval $ac_try) 2>&5 | |
3946 | ac_status=$? | |
3947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3948 | (exit $ac_status); }; } && | |
3949 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
3950 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3951 | (eval $ac_try) 2>&5 | |
3952 | ac_status=$? | |
3953 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3954 | (exit $ac_status); }; }; then | |
3955 | ac_cv_header_time=yes | |
3956 | else | |
3957 | echo "$as_me: failed program was:" >&5 | |
3958 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3959 | ||
3960 | ac_cv_header_time=no | |
3961 | fi | |
58670637 | 3962 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
3963 | fi |
3964 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 | |
3965 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
3966 | if test $ac_cv_header_time = yes; then | |
3967 | ||
3968 | cat >>confdefs.h <<\_ACEOF | |
3969 | #define TIME_WITH_SYS_TIME 1 | |
3970 | _ACEOF | |
3971 | ||
3972 | fi | |
3973 | ||
3974 | ||
3975 | echo "$as_me:$LINENO: checking whether errno must be declared" >&5 | |
3976 | echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6 | |
3977 | if test "${libiberty_cv_declare_errno+set}" = set; then | |
3978 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3979 | else | |
3980 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3981 | /* confdefs.h. */ |
3982 | _ACEOF | |
3983 | cat confdefs.h >>conftest.$ac_ext | |
3984 | cat >>conftest.$ac_ext <<_ACEOF | |
3985 | /* end confdefs.h. */ | |
3986 | #include <errno.h> | |
3987 | int | |
3988 | main () | |
3989 | { | |
3990 | int x = errno; | |
3991 | ; | |
3992 | return 0; | |
3993 | } | |
3994 | _ACEOF | |
3995 | rm -f conftest.$ac_objext | |
3996 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3997 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 3998 | ac_status=$? |
58670637 DD |
3999 | grep -v '^ *+' conftest.er1 >conftest.err |
4000 | rm -f conftest.er1 | |
4001 | cat conftest.err >&5 | |
8ddbb593 DJ |
4002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4003 | (exit $ac_status); } && | |
fd7d450d DD |
4004 | { ac_try='test -z "$ac_c_werror_flag" |
4005 | || test ! -s conftest.err' | |
58670637 DD |
4006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4007 | (eval $ac_try) 2>&5 | |
4008 | ac_status=$? | |
4009 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4010 | (exit $ac_status); }; } && | |
4011 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
4012 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4013 | (eval $ac_try) 2>&5 | |
4014 | ac_status=$? | |
4015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4016 | (exit $ac_status); }; }; then | |
4017 | libiberty_cv_declare_errno=no | |
4018 | else | |
4019 | echo "$as_me: failed program was:" >&5 | |
4020 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4021 | ||
4022 | libiberty_cv_declare_errno=yes | |
4023 | fi | |
58670637 | 4024 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
4025 | fi |
4026 | echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5 | |
4027 | echo "${ECHO_T}$libiberty_cv_declare_errno" >&6 | |
4028 | if test $libiberty_cv_declare_errno = yes | |
4029 | then | |
4030 | cat >>confdefs.h <<\_ACEOF | |
4031 | #define NEED_DECLARATION_ERRNO 1 | |
4032 | _ACEOF | |
4033 | ||
4034 | fi | |
4035 | ||
4036 | ||
40a59a4c | 4037 | # Determine the size of an int for struct fibnode. |
8ddbb593 DJ |
4038 | echo "$as_me:$LINENO: checking for egrep" >&5 |
4039 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
4040 | if test "${ac_cv_prog_egrep+set}" = set; then | |
4041 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4042 | else | |
4043 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
4044 | then ac_cv_prog_egrep='grep -E' | |
4045 | else ac_cv_prog_egrep='egrep' | |
4046 | fi | |
4047 | fi | |
4048 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
4049 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
4050 | EGREP=$ac_cv_prog_egrep | |
4051 | ||
4052 | ||
4053 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
4054 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
4055 | if test "${ac_cv_header_stdc+set}" = set; then | |
4056 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4057 | else | |
4058 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
4059 | /* confdefs.h. */ |
4060 | _ACEOF | |
4061 | cat confdefs.h >>conftest.$ac_ext | |
4062 | cat >>conftest.$ac_ext <<_ACEOF | |
4063 | /* end confdefs.h. */ | |
4064 | #include <stdlib.h> | |
4065 | #include <stdarg.h> | |
4066 | #include <string.h> | |
4067 | #include <float.h> | |
4068 | ||
4069 | int | |
4070 | main () | |
4071 | { | |
4072 | ||
4073 | ; | |
4074 | return 0; | |
4075 | } | |
4076 | _ACEOF | |
4077 | rm -f conftest.$ac_objext | |
4078 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 4079 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 4080 | ac_status=$? |
58670637 DD |
4081 | grep -v '^ *+' conftest.er1 >conftest.err |
4082 | rm -f conftest.er1 | |
4083 | cat conftest.err >&5 | |
8ddbb593 DJ |
4084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4085 | (exit $ac_status); } && | |
fd7d450d DD |
4086 | { ac_try='test -z "$ac_c_werror_flag" |
4087 | || test ! -s conftest.err' | |
58670637 DD |
4088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4089 | (eval $ac_try) 2>&5 | |
4090 | ac_status=$? | |
4091 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4092 | (exit $ac_status); }; } && | |
4093 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
4094 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4095 | (eval $ac_try) 2>&5 | |
4096 | ac_status=$? | |
4097 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4098 | (exit $ac_status); }; }; then | |
4099 | ac_cv_header_stdc=yes | |
4100 | else | |
4101 | echo "$as_me: failed program was:" >&5 | |
4102 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4103 | ||
4104 | ac_cv_header_stdc=no | |
4105 | fi | |
58670637 | 4106 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
4107 | |
4108 | if test $ac_cv_header_stdc = yes; then | |
4109 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4110 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
4111 | /* confdefs.h. */ |
4112 | _ACEOF | |
4113 | cat confdefs.h >>conftest.$ac_ext | |
4114 | cat >>conftest.$ac_ext <<_ACEOF | |
4115 | /* end confdefs.h. */ | |
4116 | #include <string.h> | |
4117 | ||
4118 | _ACEOF | |
4119 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4120 | $EGREP "memchr" >/dev/null 2>&1; then | |
4121 | : | |
4122 | else | |
4123 | ac_cv_header_stdc=no | |
4124 | fi | |
4125 | rm -f conftest* | |
4126 | ||
4127 | fi | |
4128 | ||
4129 | if test $ac_cv_header_stdc = yes; then | |
4130 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4131 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
4132 | /* confdefs.h. */ |
4133 | _ACEOF | |
4134 | cat confdefs.h >>conftest.$ac_ext | |
4135 | cat >>conftest.$ac_ext <<_ACEOF | |
4136 | /* end confdefs.h. */ | |
4137 | #include <stdlib.h> | |
4138 | ||
2299a76d | 4139 | _ACEOF |
8ddbb593 DJ |
4140 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4141 | $EGREP "free" >/dev/null 2>&1; then | |
4142 | : | |
4143 | else | |
4144 | ac_cv_header_stdc=no | |
4145 | fi | |
4146 | rm -f conftest* | |
2299a76d DJ |
4147 | |
4148 | fi | |
4149 | ||
8ddbb593 DJ |
4150 | if test $ac_cv_header_stdc = yes; then |
4151 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4152 | if test "$cross_compiling" = yes; then | |
4153 | : | |
2299a76d DJ |
4154 | else |
4155 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4156 | /* confdefs.h. */ |
4157 | _ACEOF | |
4158 | cat confdefs.h >>conftest.$ac_ext | |
4159 | cat >>conftest.$ac_ext <<_ACEOF | |
4160 | /* end confdefs.h. */ | |
8ddbb593 DJ |
4161 | #include <ctype.h> |
4162 | #if ((' ' & 0x0FF) == 0x020) | |
4163 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4164 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4165 | #else | |
4166 | # define ISLOWER(c) \ | |
58670637 DD |
4167 | (('a' <= (c) && (c) <= 'i') \ |
4168 | || ('j' <= (c) && (c) <= 'r') \ | |
4169 | || ('s' <= (c) && (c) <= 'z')) | |
8ddbb593 DJ |
4170 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
4171 | #endif | |
2299a76d | 4172 | |
8ddbb593 | 4173 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
2299a76d DJ |
4174 | int |
4175 | main () | |
4176 | { | |
8ddbb593 DJ |
4177 | int i; |
4178 | for (i = 0; i < 256; i++) | |
4179 | if (XOR (islower (i), ISLOWER (i)) | |
58670637 | 4180 | || toupper (i) != TOUPPER (i)) |
8ddbb593 DJ |
4181 | exit(2); |
4182 | exit (0); | |
2299a76d DJ |
4183 | } |
4184 | _ACEOF | |
8ddbb593 DJ |
4185 | rm -f conftest$ac_exeext |
4186 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4187 | (eval $ac_link) 2>&5 | |
2299a76d DJ |
4188 | ac_status=$? |
4189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8ddbb593 | 4190 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
2299a76d DJ |
4191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4192 | (eval $ac_try) 2>&5 | |
4193 | ac_status=$? | |
4194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4195 | (exit $ac_status); }; }; then | |
8ddbb593 | 4196 | : |
2299a76d | 4197 | else |
8ddbb593 DJ |
4198 | echo "$as_me: program exited with status $ac_status" >&5 |
4199 | echo "$as_me: failed program was:" >&5 | |
2299a76d DJ |
4200 | sed 's/^/| /' conftest.$ac_ext >&5 |
4201 | ||
8ddbb593 DJ |
4202 | ( exit $ac_status ) |
4203 | ac_cv_header_stdc=no | |
2299a76d | 4204 | fi |
58670637 | 4205 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
2299a76d | 4206 | fi |
8ddbb593 DJ |
4207 | fi |
4208 | fi | |
4209 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4210 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
4211 | if test $ac_cv_header_stdc = yes; then | |
2299a76d DJ |
4212 | |
4213 | cat >>confdefs.h <<\_ACEOF | |
8ddbb593 | 4214 | #define STDC_HEADERS 1 |
2299a76d DJ |
4215 | _ACEOF |
4216 | ||
4217 | fi | |
4218 | ||
8ddbb593 | 4219 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
2299a76d | 4220 | |
8ddbb593 DJ |
4221 | |
4222 | ||
4223 | ||
4224 | ||
4225 | ||
4226 | ||
4227 | ||
4228 | ||
4229 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
58670637 | 4230 | inttypes.h stdint.h unistd.h |
8ddbb593 DJ |
4231 | do |
4232 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4233 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4234 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4235 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
2299a76d DJ |
4236 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
4237 | else | |
4238 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4239 | /* confdefs.h. */ |
4240 | _ACEOF | |
4241 | cat confdefs.h >>conftest.$ac_ext | |
4242 | cat >>conftest.$ac_ext <<_ACEOF | |
4243 | /* end confdefs.h. */ | |
8ddbb593 | 4244 | #include <$ac_header> |
2299a76d | 4245 | _ACEOF |
8ddbb593 DJ |
4246 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
4247 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2299a76d | 4248 | ac_status=$? |
8ddbb593 DJ |
4249 | grep -v '^ *+' conftest.er1 >conftest.err |
4250 | rm -f conftest.er1 | |
4251 | cat conftest.err >&5 | |
2299a76d | 4252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8ddbb593 DJ |
4253 | (exit $ac_status); } >/dev/null; then |
4254 | if test -s conftest.err; then | |
4255 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 4256 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
4257 | else |
4258 | ac_cpp_err= | |
4259 | fi | |
4260 | else | |
4261 | ac_cpp_err=yes | |
4262 | fi | |
4263 | if test -z "$ac_cpp_err"; then | |
4264 | eval "$as_ac_Header=yes" | |
2299a76d DJ |
4265 | else |
4266 | echo "$as_me: failed program was:" >&5 | |
4267 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4268 | ||
8ddbb593 | 4269 | eval "$as_ac_Header=no" |
2299a76d | 4270 | fi |
8ddbb593 | 4271 | rm -f conftest.err conftest.$ac_ext |
2299a76d | 4272 | fi |
8ddbb593 DJ |
4273 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
4274 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4275 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4276 | cat >>confdefs.h <<_ACEOF | |
4277 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
2299a76d DJ |
4278 | _ACEOF |
4279 | ||
4280 | fi | |
8ddbb593 | 4281 | done |
2299a76d DJ |
4282 | |
4283 | ||
40a59a4c DD |
4284 | echo "$as_me:$LINENO: checking for int" >&5 |
4285 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4286 | if test "${ac_cv_type_int+set}" = set; then | |
4287 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4288 | else | |
4289 | cat >conftest.$ac_ext <<_ACEOF | |
4290 | /* confdefs.h. */ | |
4291 | _ACEOF | |
4292 | cat confdefs.h >>conftest.$ac_ext | |
4293 | cat >>conftest.$ac_ext <<_ACEOF | |
4294 | /* end confdefs.h. */ | |
4295 | $ac_includes_default | |
4296 | int | |
4297 | main () | |
4298 | { | |
4299 | if ((int *) 0) | |
4300 | return 0; | |
4301 | if (sizeof (int)) | |
4302 | return 0; | |
4303 | ; | |
4304 | return 0; | |
4305 | } | |
4306 | _ACEOF | |
4307 | rm -f conftest.$ac_objext | |
4308 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4309 | (eval $ac_compile) 2>conftest.er1 | |
4310 | ac_status=$? | |
4311 | grep -v '^ *+' conftest.er1 >conftest.err | |
4312 | rm -f conftest.er1 | |
4313 | cat conftest.err >&5 | |
4314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4315 | (exit $ac_status); } && | |
fd7d450d DD |
4316 | { ac_try='test -z "$ac_c_werror_flag" |
4317 | || test ! -s conftest.err' | |
40a59a4c DD |
4318 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4319 | (eval $ac_try) 2>&5 | |
4320 | ac_status=$? | |
4321 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4322 | (exit $ac_status); }; } && | |
4323 | { ac_try='test -s conftest.$ac_objext' | |
4324 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4325 | (eval $ac_try) 2>&5 | |
4326 | ac_status=$? | |
4327 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4328 | (exit $ac_status); }; }; then | |
4329 | ac_cv_type_int=yes | |
4330 | else | |
4331 | echo "$as_me: failed program was:" >&5 | |
4332 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4333 | ||
4334 | ac_cv_type_int=no | |
4335 | fi | |
4336 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4337 | fi | |
4338 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4339 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4340 | ||
4341 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4342 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4343 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4344 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4345 | else | |
4346 | if test "$ac_cv_type_int" = yes; then | |
4347 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4348 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4349 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4350 | # This bug is HP SR number 8606223364. | |
4351 | if test "$cross_compiling" = yes; then | |
4352 | # Depending upon the size, compute the lo and hi bounds. | |
4353 | cat >conftest.$ac_ext <<_ACEOF | |
4354 | /* confdefs.h. */ | |
4355 | _ACEOF | |
4356 | cat confdefs.h >>conftest.$ac_ext | |
4357 | cat >>conftest.$ac_ext <<_ACEOF | |
4358 | /* end confdefs.h. */ | |
4359 | $ac_includes_default | |
4360 | int | |
4361 | main () | |
4362 | { | |
4363 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4364 | test_array [0] = 0 | |
4365 | ||
4366 | ; | |
4367 | return 0; | |
4368 | } | |
4369 | _ACEOF | |
4370 | rm -f conftest.$ac_objext | |
4371 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4372 | (eval $ac_compile) 2>conftest.er1 | |
4373 | ac_status=$? | |
4374 | grep -v '^ *+' conftest.er1 >conftest.err | |
4375 | rm -f conftest.er1 | |
4376 | cat conftest.err >&5 | |
4377 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4378 | (exit $ac_status); } && | |
fd7d450d DD |
4379 | { ac_try='test -z "$ac_c_werror_flag" |
4380 | || test ! -s conftest.err' | |
40a59a4c DD |
4381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4382 | (eval $ac_try) 2>&5 | |
4383 | ac_status=$? | |
4384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4385 | (exit $ac_status); }; } && | |
4386 | { ac_try='test -s conftest.$ac_objext' | |
4387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4388 | (eval $ac_try) 2>&5 | |
4389 | ac_status=$? | |
4390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4391 | (exit $ac_status); }; }; then | |
4392 | ac_lo=0 ac_mid=0 | |
4393 | while :; do | |
4394 | cat >conftest.$ac_ext <<_ACEOF | |
4395 | /* confdefs.h. */ | |
4396 | _ACEOF | |
4397 | cat confdefs.h >>conftest.$ac_ext | |
4398 | cat >>conftest.$ac_ext <<_ACEOF | |
4399 | /* end confdefs.h. */ | |
4400 | $ac_includes_default | |
4401 | int | |
4402 | main () | |
4403 | { | |
4404 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4405 | test_array [0] = 0 | |
4406 | ||
4407 | ; | |
4408 | return 0; | |
4409 | } | |
4410 | _ACEOF | |
4411 | rm -f conftest.$ac_objext | |
4412 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4413 | (eval $ac_compile) 2>conftest.er1 | |
4414 | ac_status=$? | |
4415 | grep -v '^ *+' conftest.er1 >conftest.err | |
4416 | rm -f conftest.er1 | |
4417 | cat conftest.err >&5 | |
4418 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4419 | (exit $ac_status); } && | |
fd7d450d DD |
4420 | { ac_try='test -z "$ac_c_werror_flag" |
4421 | || test ! -s conftest.err' | |
40a59a4c DD |
4422 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4423 | (eval $ac_try) 2>&5 | |
4424 | ac_status=$? | |
4425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4426 | (exit $ac_status); }; } && | |
4427 | { ac_try='test -s conftest.$ac_objext' | |
4428 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4429 | (eval $ac_try) 2>&5 | |
4430 | ac_status=$? | |
4431 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4432 | (exit $ac_status); }; }; then | |
4433 | ac_hi=$ac_mid; break | |
4434 | else | |
4435 | echo "$as_me: failed program was:" >&5 | |
4436 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4437 | ||
4438 | ac_lo=`expr $ac_mid + 1` | |
4439 | if test $ac_lo -le $ac_mid; then | |
4440 | ac_lo= ac_hi= | |
4441 | break | |
4442 | fi | |
4443 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4444 | fi | |
4445 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4446 | done | |
4447 | else | |
4448 | echo "$as_me: failed program was:" >&5 | |
4449 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4450 | ||
4451 | cat >conftest.$ac_ext <<_ACEOF | |
4452 | /* confdefs.h. */ | |
4453 | _ACEOF | |
4454 | cat confdefs.h >>conftest.$ac_ext | |
4455 | cat >>conftest.$ac_ext <<_ACEOF | |
4456 | /* end confdefs.h. */ | |
4457 | $ac_includes_default | |
4458 | int | |
4459 | main () | |
4460 | { | |
4461 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4462 | test_array [0] = 0 | |
4463 | ||
4464 | ; | |
4465 | return 0; | |
4466 | } | |
4467 | _ACEOF | |
4468 | rm -f conftest.$ac_objext | |
4469 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4470 | (eval $ac_compile) 2>conftest.er1 | |
4471 | ac_status=$? | |
4472 | grep -v '^ *+' conftest.er1 >conftest.err | |
4473 | rm -f conftest.er1 | |
4474 | cat conftest.err >&5 | |
4475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4476 | (exit $ac_status); } && | |
fd7d450d DD |
4477 | { ac_try='test -z "$ac_c_werror_flag" |
4478 | || test ! -s conftest.err' | |
40a59a4c DD |
4479 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4480 | (eval $ac_try) 2>&5 | |
4481 | ac_status=$? | |
4482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4483 | (exit $ac_status); }; } && | |
4484 | { ac_try='test -s conftest.$ac_objext' | |
4485 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4486 | (eval $ac_try) 2>&5 | |
4487 | ac_status=$? | |
4488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4489 | (exit $ac_status); }; }; then | |
4490 | ac_hi=-1 ac_mid=-1 | |
4491 | while :; do | |
4492 | cat >conftest.$ac_ext <<_ACEOF | |
4493 | /* confdefs.h. */ | |
4494 | _ACEOF | |
4495 | cat confdefs.h >>conftest.$ac_ext | |
4496 | cat >>conftest.$ac_ext <<_ACEOF | |
4497 | /* end confdefs.h. */ | |
4498 | $ac_includes_default | |
4499 | int | |
4500 | main () | |
4501 | { | |
4502 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4503 | test_array [0] = 0 | |
4504 | ||
4505 | ; | |
4506 | return 0; | |
4507 | } | |
4508 | _ACEOF | |
4509 | rm -f conftest.$ac_objext | |
4510 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4511 | (eval $ac_compile) 2>conftest.er1 | |
4512 | ac_status=$? | |
4513 | grep -v '^ *+' conftest.er1 >conftest.err | |
4514 | rm -f conftest.er1 | |
4515 | cat conftest.err >&5 | |
4516 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4517 | (exit $ac_status); } && | |
fd7d450d DD |
4518 | { ac_try='test -z "$ac_c_werror_flag" |
4519 | || test ! -s conftest.err' | |
40a59a4c DD |
4520 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4521 | (eval $ac_try) 2>&5 | |
4522 | ac_status=$? | |
4523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4524 | (exit $ac_status); }; } && | |
4525 | { ac_try='test -s conftest.$ac_objext' | |
4526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4527 | (eval $ac_try) 2>&5 | |
4528 | ac_status=$? | |
4529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4530 | (exit $ac_status); }; }; then | |
4531 | ac_lo=$ac_mid; break | |
4532 | else | |
4533 | echo "$as_me: failed program was:" >&5 | |
4534 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4535 | ||
4536 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4537 | if test $ac_mid -le $ac_hi; then | |
4538 | ac_lo= ac_hi= | |
4539 | break | |
4540 | fi | |
4541 | ac_mid=`expr 2 '*' $ac_mid` | |
4542 | fi | |
4543 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4544 | done | |
4545 | else | |
4546 | echo "$as_me: failed program was:" >&5 | |
4547 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4548 | ||
4549 | ac_lo= ac_hi= | |
4550 | fi | |
4551 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4552 | fi | |
4553 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4554 | # Binary search between lo and hi bounds. | |
4555 | while test "x$ac_lo" != "x$ac_hi"; do | |
4556 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4557 | cat >conftest.$ac_ext <<_ACEOF | |
4558 | /* confdefs.h. */ | |
4559 | _ACEOF | |
4560 | cat confdefs.h >>conftest.$ac_ext | |
4561 | cat >>conftest.$ac_ext <<_ACEOF | |
4562 | /* end confdefs.h. */ | |
4563 | $ac_includes_default | |
4564 | int | |
4565 | main () | |
4566 | { | |
4567 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4568 | test_array [0] = 0 | |
4569 | ||
4570 | ; | |
4571 | return 0; | |
4572 | } | |
4573 | _ACEOF | |
4574 | rm -f conftest.$ac_objext | |
4575 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4576 | (eval $ac_compile) 2>conftest.er1 | |
4577 | ac_status=$? | |
4578 | grep -v '^ *+' conftest.er1 >conftest.err | |
4579 | rm -f conftest.er1 | |
4580 | cat conftest.err >&5 | |
4581 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4582 | (exit $ac_status); } && | |
fd7d450d DD |
4583 | { ac_try='test -z "$ac_c_werror_flag" |
4584 | || test ! -s conftest.err' | |
40a59a4c DD |
4585 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4586 | (eval $ac_try) 2>&5 | |
4587 | ac_status=$? | |
4588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4589 | (exit $ac_status); }; } && | |
4590 | { ac_try='test -s conftest.$ac_objext' | |
4591 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4592 | (eval $ac_try) 2>&5 | |
4593 | ac_status=$? | |
4594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4595 | (exit $ac_status); }; }; then | |
4596 | ac_hi=$ac_mid | |
4597 | else | |
4598 | echo "$as_me: failed program was:" >&5 | |
4599 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4600 | ||
4601 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4602 | fi | |
4603 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4604 | done | |
4605 | case $ac_lo in | |
4606 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4607 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4608 | See \`config.log' for more details." >&5 | |
4609 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4610 | See \`config.log' for more details." >&2;} | |
4611 | { (exit 1); exit 1; }; } ;; | |
4612 | esac | |
4613 | else | |
4614 | if test "$cross_compiling" = yes; then | |
fd7d450d DD |
4615 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4616 | See \`config.log' for more details." >&5 | |
4617 | echo "$as_me: error: cannot run test program while cross compiling | |
4618 | See \`config.log' for more details." >&2;} | |
40a59a4c DD |
4619 | { (exit 1); exit 1; }; } |
4620 | else | |
4621 | cat >conftest.$ac_ext <<_ACEOF | |
4622 | /* confdefs.h. */ | |
4623 | _ACEOF | |
4624 | cat confdefs.h >>conftest.$ac_ext | |
4625 | cat >>conftest.$ac_ext <<_ACEOF | |
4626 | /* end confdefs.h. */ | |
4627 | $ac_includes_default | |
4628 | long longval () { return (long) (sizeof (int)); } | |
4629 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4630 | #include <stdio.h> | |
4631 | #include <stdlib.h> | |
4632 | int | |
4633 | main () | |
4634 | { | |
4635 | ||
4636 | FILE *f = fopen ("conftest.val", "w"); | |
4637 | if (! f) | |
4638 | exit (1); | |
4639 | if (((long) (sizeof (int))) < 0) | |
4640 | { | |
4641 | long i = longval (); | |
4642 | if (i != ((long) (sizeof (int)))) | |
4643 | exit (1); | |
4644 | fprintf (f, "%ld\n", i); | |
4645 | } | |
4646 | else | |
4647 | { | |
4648 | unsigned long i = ulongval (); | |
4649 | if (i != ((long) (sizeof (int)))) | |
4650 | exit (1); | |
4651 | fprintf (f, "%lu\n", i); | |
4652 | } | |
4653 | exit (ferror (f) || fclose (f) != 0); | |
4654 | ||
4655 | ; | |
4656 | return 0; | |
4657 | } | |
4658 | _ACEOF | |
4659 | rm -f conftest$ac_exeext | |
4660 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4661 | (eval $ac_link) 2>&5 | |
4662 | ac_status=$? | |
4663 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4664 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4666 | (eval $ac_try) 2>&5 | |
4667 | ac_status=$? | |
4668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4669 | (exit $ac_status); }; }; then | |
4670 | ac_cv_sizeof_int=`cat conftest.val` | |
4671 | else | |
4672 | echo "$as_me: program exited with status $ac_status" >&5 | |
4673 | echo "$as_me: failed program was:" >&5 | |
4674 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4675 | ||
4676 | ( exit $ac_status ) | |
4677 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4678 | See \`config.log' for more details." >&5 | |
4679 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4680 | See \`config.log' for more details." >&2;} | |
4681 | { (exit 1); exit 1; }; } | |
4682 | fi | |
4683 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4684 | fi | |
4685 | fi | |
4686 | rm -f conftest.val | |
4687 | else | |
4688 | ac_cv_sizeof_int=0 | |
4689 | fi | |
4690 | fi | |
4691 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4692 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4693 | cat >>confdefs.h <<_ACEOF | |
4694 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4695 | _ACEOF | |
4696 | ||
4697 | ||
4698 | ||
2299a76d DJ |
4699 | echo "$as_me:$LINENO: checking for uintptr_t" >&5 |
4700 | echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 | |
4701 | if test "${ac_cv_type_uintptr_t+set}" = set; then | |
4702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4703 | else | |
4704 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4705 | /* confdefs.h. */ |
4706 | _ACEOF | |
4707 | cat confdefs.h >>conftest.$ac_ext | |
4708 | cat >>conftest.$ac_ext <<_ACEOF | |
4709 | /* end confdefs.h. */ | |
4710 | $ac_includes_default | |
4711 | int | |
4712 | main () | |
4713 | { | |
4714 | if ((uintptr_t *) 0) | |
4715 | return 0; | |
4716 | if (sizeof (uintptr_t)) | |
4717 | return 0; | |
4718 | ; | |
4719 | return 0; | |
4720 | } | |
4721 | _ACEOF | |
4722 | rm -f conftest.$ac_objext | |
4723 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 4724 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 4725 | ac_status=$? |
58670637 DD |
4726 | grep -v '^ *+' conftest.er1 >conftest.err |
4727 | rm -f conftest.er1 | |
4728 | cat conftest.err >&5 | |
2299a76d DJ |
4729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4730 | (exit $ac_status); } && | |
fd7d450d DD |
4731 | { ac_try='test -z "$ac_c_werror_flag" |
4732 | || test ! -s conftest.err' | |
58670637 DD |
4733 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4734 | (eval $ac_try) 2>&5 | |
4735 | ac_status=$? | |
4736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4737 | (exit $ac_status); }; } && | |
4738 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
4739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4740 | (eval $ac_try) 2>&5 | |
4741 | ac_status=$? | |
4742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4743 | (exit $ac_status); }; }; then | |
4744 | ac_cv_type_uintptr_t=yes | |
4745 | else | |
4746 | echo "$as_me: failed program was:" >&5 | |
4747 | sed 's/^/| /' conftest.$ac_ext >&5 | |
dc579051 | 4748 | |
2299a76d DJ |
4749 | ac_cv_type_uintptr_t=no |
4750 | fi | |
58670637 | 4751 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
15ae9e71 | 4752 | fi |
2299a76d DJ |
4753 | echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 |
4754 | echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 | |
4755 | if test $ac_cv_type_uintptr_t = yes; then | |
4756 | : | |
4757 | else | |
4758 | ||
4759 | cat >>confdefs.h <<_ACEOF | |
15ae9e71 | 4760 | #define uintptr_t unsigned long |
2299a76d | 4761 | _ACEOF |
15ae9e71 DD |
4762 | |
4763 | fi | |
dc579051 | 4764 | |
bb6a587d DD |
4765 | |
4766 | # Look for a 64-bit type. | |
4767 | echo "$as_me:$LINENO: checking for a 64-bit type" >&5 | |
4768 | echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6 | |
4769 | if test "${liberty_cv_uint64+set}" = set; then | |
4770 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4771 | else | |
4772 | cat >conftest.$ac_ext <<_ACEOF | |
4773 | /* confdefs.h. */ | |
4774 | _ACEOF | |
4775 | cat confdefs.h >>conftest.$ac_ext | |
4776 | cat >>conftest.$ac_ext <<_ACEOF | |
4777 | /* end confdefs.h. */ | |
4778 | #ifdef HAVE_STDINT_H | |
4779 | #include <stdint.h> | |
4780 | #endif | |
4781 | int | |
4782 | main () | |
4783 | { | |
4784 | extern uint64_t foo; | |
4785 | ; | |
4786 | return 0; | |
4787 | } | |
4788 | _ACEOF | |
4789 | rm -f conftest.$ac_objext | |
4790 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4791 | (eval $ac_compile) 2>conftest.er1 | |
4792 | ac_status=$? | |
4793 | grep -v '^ *+' conftest.er1 >conftest.err | |
4794 | rm -f conftest.er1 | |
4795 | cat conftest.err >&5 | |
4796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4797 | (exit $ac_status); } && | |
fd7d450d DD |
4798 | { ac_try='test -z "$ac_c_werror_flag" |
4799 | || test ! -s conftest.err' | |
bb6a587d DD |
4800 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4801 | (eval $ac_try) 2>&5 | |
4802 | ac_status=$? | |
4803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4804 | (exit $ac_status); }; } && | |
4805 | { ac_try='test -s conftest.$ac_objext' | |
4806 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4807 | (eval $ac_try) 2>&5 | |
4808 | ac_status=$? | |
4809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4810 | (exit $ac_status); }; }; then | |
4811 | liberty_cv_uint64=uint64_t | |
4812 | else | |
4813 | echo "$as_me: failed program was:" >&5 | |
4814 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4815 | ||
4816 | cat >conftest.$ac_ext <<_ACEOF | |
4817 | /* confdefs.h. */ | |
4818 | _ACEOF | |
4819 | cat confdefs.h >>conftest.$ac_ext | |
4820 | cat >>conftest.$ac_ext <<_ACEOF | |
4821 | /* end confdefs.h. */ | |
4822 | #ifdef HAVE_LIMITS_H | |
4823 | #include <limits.h> | |
4824 | #endif | |
4825 | #ifndef CHAR_BIT | |
4826 | #define CHAR_BIT 8 | |
4827 | #endif | |
4828 | int | |
4829 | main () | |
4830 | { | |
4831 | extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1]; | |
4832 | ; | |
4833 | return 0; | |
4834 | } | |
4835 | _ACEOF | |
4836 | rm -f conftest.$ac_objext | |
4837 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4838 | (eval $ac_compile) 2>conftest.er1 | |
4839 | ac_status=$? | |
4840 | grep -v '^ *+' conftest.er1 >conftest.err | |
4841 | rm -f conftest.er1 | |
4842 | cat conftest.err >&5 | |
4843 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4844 | (exit $ac_status); } && | |
fd7d450d DD |
4845 | { ac_try='test -z "$ac_c_werror_flag" |
4846 | || test ! -s conftest.err' | |
bb6a587d DD |
4847 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4848 | (eval $ac_try) 2>&5 | |
4849 | ac_status=$? | |
4850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4851 | (exit $ac_status); }; } && | |
4852 | { ac_try='test -s conftest.$ac_objext' | |
4853 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4854 | (eval $ac_try) 2>&5 | |
4855 | ac_status=$? | |
4856 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4857 | (exit $ac_status); }; }; then | |
4858 | liberty_cv_uint64="unsigned long" | |
4859 | else | |
4860 | echo "$as_me: failed program was:" >&5 | |
4861 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4862 | ||
4863 | cat >conftest.$ac_ext <<_ACEOF | |
4864 | /* confdefs.h. */ | |
4865 | _ACEOF | |
4866 | cat confdefs.h >>conftest.$ac_ext | |
4867 | cat >>conftest.$ac_ext <<_ACEOF | |
4868 | /* end confdefs.h. */ | |
4869 | #ifdef HAVE_LIMITS_H | |
4870 | #include <limits.h> | |
4871 | #endif | |
4872 | #ifndef CHAR_BIT | |
4873 | #define CHAR_BIT 8 | |
4874 | #endif | |
4875 | int | |
4876 | main () | |
4877 | { | |
4878 | extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1]; | |
4879 | ; | |
4880 | return 0; | |
4881 | } | |
4882 | _ACEOF | |
4883 | rm -f conftest.$ac_objext | |
4884 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4885 | (eval $ac_compile) 2>conftest.er1 | |
4886 | ac_status=$? | |
4887 | grep -v '^ *+' conftest.er1 >conftest.err | |
4888 | rm -f conftest.er1 | |
4889 | cat conftest.err >&5 | |
4890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4891 | (exit $ac_status); } && | |
fd7d450d DD |
4892 | { ac_try='test -z "$ac_c_werror_flag" |
4893 | || test ! -s conftest.err' | |
bb6a587d DD |
4894 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4895 | (eval $ac_try) 2>&5 | |
4896 | ac_status=$? | |
4897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4898 | (exit $ac_status); }; } && | |
4899 | { ac_try='test -s conftest.$ac_objext' | |
4900 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4901 | (eval $ac_try) 2>&5 | |
4902 | ac_status=$? | |
4903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4904 | (exit $ac_status); }; }; then | |
4905 | liberty_cv_uint64="unsigned long long" | |
4906 | else | |
4907 | echo "$as_me: failed program was:" >&5 | |
4908 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4909 | ||
4910 | liberty_cv_uint64=none | |
4911 | fi | |
4912 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4913 | fi | |
4914 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4915 | fi | |
4916 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4917 | fi | |
4918 | ||
4919 | echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5 | |
4920 | echo "${ECHO_T}$liberty_cv_uint64" >&6 | |
4921 | if test "$liberty_cv_uint64" != none; then | |
4922 | ||
7e9f5c71 DD |
4923 | cat >>confdefs.h <<_ACEOF |
4924 | #define UNSIGNED_64BIT_TYPE $liberty_cv_uint64 | |
bb6a587d DD |
4925 | _ACEOF |
4926 | ||
4927 | fi | |
4928 | ||
daf7c4ad DD |
4929 | # Given the above check, we always have uintptr_t or a fallback |
4930 | # definition. So define HAVE_UINTPTR_T in case any imported code | |
4931 | # relies on it. | |
dc579051 | 4932 | |
2299a76d DJ |
4933 | cat >>confdefs.h <<\_ACEOF |
4934 | #define HAVE_UINTPTR_T 1 | |
4935 | _ACEOF | |
4936 | ||
4937 | ||
4938 | echo "$as_me:$LINENO: checking for pid_t" >&5 | |
4939 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
4940 | if test "${ac_cv_type_pid_t+set}" = set; then | |
4941 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4942 | else | |
4943 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4944 | /* confdefs.h. */ |
4945 | _ACEOF | |
4946 | cat confdefs.h >>conftest.$ac_ext | |
4947 | cat >>conftest.$ac_ext <<_ACEOF | |
4948 | /* end confdefs.h. */ | |
4949 | $ac_includes_default | |
4950 | int | |
4951 | main () | |
4952 | { | |
4953 | if ((pid_t *) 0) | |
4954 | return 0; | |
4955 | if (sizeof (pid_t)) | |
4956 | return 0; | |
4957 | ; | |
4958 | return 0; | |
4959 | } | |
4960 | _ACEOF | |
4961 | rm -f conftest.$ac_objext | |
4962 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 4963 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 4964 | ac_status=$? |
58670637 DD |
4965 | grep -v '^ *+' conftest.er1 >conftest.err |
4966 | rm -f conftest.er1 | |
4967 | cat conftest.err >&5 | |
2299a76d DJ |
4968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4969 | (exit $ac_status); } && | |
fd7d450d DD |
4970 | { ac_try='test -z "$ac_c_werror_flag" |
4971 | || test ! -s conftest.err' | |
58670637 DD |
4972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4973 | (eval $ac_try) 2>&5 | |
4974 | ac_status=$? | |
4975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4976 | (exit $ac_status); }; } && | |
4977 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
4978 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4979 | (eval $ac_try) 2>&5 | |
4980 | ac_status=$? | |
4981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4982 | (exit $ac_status); }; }; then | |
cafa3917 DD |
4983 | ac_cv_type_pid_t=yes |
4984 | else | |
2299a76d DJ |
4985 | echo "$as_me: failed program was:" >&5 |
4986 | sed 's/^/| /' conftest.$ac_ext >&5 | |
cafa3917 | 4987 | |
2299a76d | 4988 | ac_cv_type_pid_t=no |
cafa3917 | 4989 | fi |
58670637 | 4990 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
4991 | fi |
4992 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 | |
4993 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
4994 | if test $ac_cv_type_pid_t = yes; then | |
4995 | : | |
4996 | else | |
4997 | ||
4998 | cat >>confdefs.h <<_ACEOF | |
cafa3917 | 4999 | #define pid_t int |
2299a76d | 5000 | _ACEOF |
cafa3917 DD |
5001 | |
5002 | fi | |
5003 | ||
5004 | ||
252b5132 RH |
5005 | # This is the list of functions which libiberty will provide if they |
5006 | # are not available on the host. | |
5007 | ||
5008 | funcs="asprintf" | |
5009 | funcs="$funcs atexit" | |
5010 | funcs="$funcs basename" | |
5011 | funcs="$funcs bcmp" | |
5012 | funcs="$funcs bcopy" | |
c6da642e | 5013 | funcs="$funcs bsearch" |
252b5132 RH |
5014 | funcs="$funcs bzero" |
5015 | funcs="$funcs calloc" | |
5016 | funcs="$funcs clock" | |
7b78baae | 5017 | funcs="$funcs ffs" |
252b5132 RH |
5018 | funcs="$funcs getcwd" |
5019 | funcs="$funcs getpagesize" | |
0fad4bdb | 5020 | funcs="$funcs gettimeofday" |
252b5132 RH |
5021 | funcs="$funcs index" |
5022 | funcs="$funcs insque" | |
5023 | funcs="$funcs memchr" | |
5024 | funcs="$funcs memcmp" | |
5025 | funcs="$funcs memcpy" | |
5026 | funcs="$funcs memmove" | |
10b57b38 | 5027 | funcs="$funcs mempcpy" |
252b5132 RH |
5028 | funcs="$funcs memset" |
5029 | funcs="$funcs mkstemps" | |
0c0a36a4 | 5030 | funcs="$funcs putenv" |
252b5132 RH |
5031 | funcs="$funcs random" |
5032 | funcs="$funcs rename" | |
5033 | funcs="$funcs rindex" | |
0c0a36a4 | 5034 | funcs="$funcs setenv" |
2ed1e5cc | 5035 | funcs="$funcs snprintf" |
252b5132 | 5036 | funcs="$funcs sigsetmask" |
10b57b38 DD |
5037 | funcs="$funcs stpcpy" |
5038 | funcs="$funcs stpncpy" | |
252b5132 RH |
5039 | funcs="$funcs strcasecmp" |
5040 | funcs="$funcs strchr" | |
5041 | funcs="$funcs strdup" | |
5042 | funcs="$funcs strncasecmp" | |
0fad4bdb | 5043 | funcs="$funcs strndup" |
252b5132 RH |
5044 | funcs="$funcs strrchr" |
5045 | funcs="$funcs strstr" | |
5046 | funcs="$funcs strtod" | |
5047 | funcs="$funcs strtol" | |
5048 | funcs="$funcs strtoul" | |
67f3cb05 | 5049 | funcs="$funcs strverscmp" |
252b5132 RH |
5050 | funcs="$funcs tmpnam" |
5051 | funcs="$funcs vasprintf" | |
5052 | funcs="$funcs vfprintf" | |
5053 | funcs="$funcs vprintf" | |
2ed1e5cc | 5054 | funcs="$funcs vsnprintf" |
252b5132 RH |
5055 | funcs="$funcs vsprintf" |
5056 | funcs="$funcs waitpid" | |
5057 | ||
5058 | # Also in the old function.def file: alloca, vfork, getopt. | |
5059 | ||
e69f6c8c | 5060 | vars="sys_errlist sys_nerr sys_siglist" |
252b5132 | 5061 | |
0c0a36a4 | 5062 | checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" |
192cbe66 | 5063 | checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp" |
ac119ae8 | 5064 | checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking" |
252b5132 RH |
5065 | |
5066 | # These are neither executed nor required, but they help keep | |
5067 | # autoheader happy without adding a bunch of text to acconfig.h. | |
5068 | if test "x" = "y"; then | |
252b5132 | 5069 | |
252b5132 | 5070 | |
2299a76d DJ |
5071 | |
5072 | ||
5073 | ||
5074 | ||
5075 | ||
5076 | ||
5077 | ||
5078 | ||
5079 | ||
5080 | ||
5081 | ||
5082 | ||
5083 | ||
5084 | ||
5085 | ||
5086 | ||
5087 | ||
5088 | ||
5089 | ||
5090 | ||
5091 | ||
5092 | ||
5093 | ||
5094 | ||
5095 | ||
5096 | ||
5097 | ||
5098 | ||
5099 | ||
5100 | ||
5101 | ||
5102 | ||
5103 | ||
5104 | ||
5105 | ||
5106 | ||
5107 | ||
5108 | ||
5109 | ||
5110 | ||
5111 | ||
5112 | ||
5113 | ||
5114 | ||
5115 | ||
5116 | ||
5117 | ||
5118 | ||
5119 | ||
5120 | ||
5121 | ||
5122 | ||
5123 | ||
5124 | ||
5125 | ||
5126 | ||
5127 | ||
5128 | ||
0fad4bdb DD |
5129 | |
5130 | ||
aa55ccb1 DD |
5131 | |
5132 | ||
2299a76d | 5133 | |
ac119ae8 | 5134 | |
67f3cb05 | 5135 | |
2299a76d DJ |
5136 | |
5137 | ||
5138 | for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \ | |
0fad4bdb | 5139 | getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \ |
2299a76d | 5140 | memmove mempcpy memset putenv random rename rindex sigsetmask \ |
0fad4bdb | 5141 | strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \ |
67f3cb05 | 5142 | strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \ |
2299a76d DJ |
5143 | vsprintf waitpid getrusage on_exit psignal strerror strsignal \ |
5144 | sysconf times sbrk gettimeofday ffs snprintf vsnprintf \ | |
b109e79a | 5145 | pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \ |
ac119ae8 | 5146 | realpath canonicalize_file_name __fsetlocking |
2299a76d DJ |
5147 | do |
5148 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5149 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
5150 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
5151 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
5152 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5153 | else | |
5154 | if test x$gcc_no_link = xyes; then | |
5155 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
5156 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
5157 | { (exit 1); exit 1; }; } | |
5158 | fi | |
5159 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
5160 | /* confdefs.h. */ |
5161 | _ACEOF | |
5162 | cat confdefs.h >>conftest.$ac_ext | |
5163 | cat >>conftest.$ac_ext <<_ACEOF | |
5164 | /* end confdefs.h. */ | |
5165 | /* System header to define __stub macros and hopefully few prototypes, | |
5166 | which can conflict with char $ac_func (); below. | |
5167 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
5168 | <limits.h> exists even on freestanding compilers. Under hpux, |
5169 | including <limits.h> includes <sys/time.h> and causes problems | |
5170 | checking for functions defined therein. */ | |
5171 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
5172 | # include <limits.h> |
5173 | #else | |
5174 | # include <assert.h> | |
5175 | #endif | |
5176 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5177 | #ifdef __cplusplus | |
5178 | extern "C" | |
5179 | { | |
5180 | #endif | |
5181 | /* We use char because int might match the return type of a gcc2 | |
5182 | builtin and then its argument prototype would still apply. */ | |
5183 | char $ac_func (); | |
5184 | /* The GNU C library defines this for functions which it implements | |
252b5132 RH |
5185 | to always fail with ENOSYS. Some functions are actually named |
5186 | something starting with __ and the normal name is an alias. */ | |
5187 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5188 | choke me | |
5189 | #else | |
2299a76d DJ |
5190 | char (*f) () = $ac_func; |
5191 | #endif | |
5192 | #ifdef __cplusplus | |
5193 | } | |
252b5132 RH |
5194 | #endif |
5195 | ||
2299a76d DJ |
5196 | int |
5197 | main () | |
5198 | { | |
5199 | return f != $ac_func; | |
5200 | ; | |
5201 | return 0; | |
5202 | } | |
5203 | _ACEOF | |
5204 | rm -f conftest.$ac_objext conftest$ac_exeext | |
5205 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 5206 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 5207 | ac_status=$? |
58670637 DD |
5208 | grep -v '^ *+' conftest.er1 >conftest.err |
5209 | rm -f conftest.er1 | |
5210 | cat conftest.err >&5 | |
2299a76d DJ |
5211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5212 | (exit $ac_status); } && | |
fd7d450d DD |
5213 | { ac_try='test -z "$ac_c_werror_flag" |
5214 | || test ! -s conftest.err' | |
58670637 DD |
5215 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5216 | (eval $ac_try) 2>&5 | |
5217 | ac_status=$? | |
5218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5219 | (exit $ac_status); }; } && | |
5220 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
5221 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5222 | (eval $ac_try) 2>&5 | |
5223 | ac_status=$? | |
5224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5225 | (exit $ac_status); }; }; then | |
5226 | eval "$as_ac_var=yes" | |
5227 | else | |
5228 | echo "$as_me: failed program was:" >&5 | |
5229 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5230 | ||
5231 | eval "$as_ac_var=no" | |
5232 | fi | |
58670637 DD |
5233 | rm -f conftest.err conftest.$ac_objext \ |
5234 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
5235 | fi |
5236 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
5237 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
5238 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
5239 | cat >>confdefs.h <<_ACEOF | |
5240 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5241 | _ACEOF | |
900d2082 | 5242 | |
252b5132 RH |
5243 | fi |
5244 | done | |
5245 | ||
41c953f9 DD |
5246 | echo "$as_me:$LINENO: checking whether basename is declared" >&5 |
5247 | echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 | |
5248 | if test "${ac_cv_have_decl_basename+set}" = set; then | |
5249 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5250 | else | |
5251 | cat >conftest.$ac_ext <<_ACEOF | |
5252 | /* confdefs.h. */ | |
5253 | _ACEOF | |
5254 | cat confdefs.h >>conftest.$ac_ext | |
5255 | cat >>conftest.$ac_ext <<_ACEOF | |
5256 | /* end confdefs.h. */ | |
5257 | $ac_includes_default | |
5258 | int | |
5259 | main () | |
5260 | { | |
5261 | #ifndef basename | |
5262 | char *p = (char *) basename; | |
5263 | #endif | |
5264 | ||
5265 | ; | |
5266 | return 0; | |
5267 | } | |
5268 | _ACEOF | |
5269 | rm -f conftest.$ac_objext | |
5270 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5271 | (eval $ac_compile) 2>conftest.er1 | |
5272 | ac_status=$? | |
5273 | grep -v '^ *+' conftest.er1 >conftest.err | |
5274 | rm -f conftest.er1 | |
5275 | cat conftest.err >&5 | |
5276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5277 | (exit $ac_status); } && | |
fd7d450d DD |
5278 | { ac_try='test -z "$ac_c_werror_flag" |
5279 | || test ! -s conftest.err' | |
41c953f9 DD |
5280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5281 | (eval $ac_try) 2>&5 | |
5282 | ac_status=$? | |
5283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5284 | (exit $ac_status); }; } && | |
5285 | { ac_try='test -s conftest.$ac_objext' | |
5286 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5287 | (eval $ac_try) 2>&5 | |
5288 | ac_status=$? | |
5289 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5290 | (exit $ac_status); }; }; then | |
5291 | ac_cv_have_decl_basename=yes | |
5292 | else | |
5293 | echo "$as_me: failed program was:" >&5 | |
5294 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5295 | ||
5296 | ac_cv_have_decl_basename=no | |
5297 | fi | |
5298 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5299 | fi | |
5300 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 | |
5301 | echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 | |
5302 | if test $ac_cv_have_decl_basename = yes; then | |
5303 | ||
5304 | cat >>confdefs.h <<_ACEOF | |
5305 | #define HAVE_DECL_BASENAME 1 | |
5306 | _ACEOF | |
5307 | ||
5308 | ||
5309 | else | |
5310 | cat >>confdefs.h <<_ACEOF | |
5311 | #define HAVE_DECL_BASENAME 0 | |
5312 | _ACEOF | |
5313 | ||
5314 | ||
5315 | fi | |
5316 | echo "$as_me:$LINENO: checking whether ffs is declared" >&5 | |
5317 | echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6 | |
5318 | if test "${ac_cv_have_decl_ffs+set}" = set; then | |
5319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5320 | else | |
5321 | cat >conftest.$ac_ext <<_ACEOF | |
5322 | /* confdefs.h. */ | |
5323 | _ACEOF | |
5324 | cat confdefs.h >>conftest.$ac_ext | |
5325 | cat >>conftest.$ac_ext <<_ACEOF | |
5326 | /* end confdefs.h. */ | |
5327 | $ac_includes_default | |
5328 | int | |
5329 | main () | |
5330 | { | |
5331 | #ifndef ffs | |
5332 | char *p = (char *) ffs; | |
5333 | #endif | |
5334 | ||
5335 | ; | |
5336 | return 0; | |
5337 | } | |
5338 | _ACEOF | |
5339 | rm -f conftest.$ac_objext | |
5340 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5341 | (eval $ac_compile) 2>conftest.er1 | |
5342 | ac_status=$? | |
5343 | grep -v '^ *+' conftest.er1 >conftest.err | |
5344 | rm -f conftest.er1 | |
5345 | cat conftest.err >&5 | |
5346 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5347 | (exit $ac_status); } && | |
fd7d450d DD |
5348 | { ac_try='test -z "$ac_c_werror_flag" |
5349 | || test ! -s conftest.err' | |
41c953f9 DD |
5350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5351 | (eval $ac_try) 2>&5 | |
5352 | ac_status=$? | |
5353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5354 | (exit $ac_status); }; } && | |
5355 | { ac_try='test -s conftest.$ac_objext' | |
5356 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5357 | (eval $ac_try) 2>&5 | |
5358 | ac_status=$? | |
5359 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5360 | (exit $ac_status); }; }; then | |
5361 | ac_cv_have_decl_ffs=yes | |
5362 | else | |
5363 | echo "$as_me: failed program was:" >&5 | |
5364 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5365 | ||
5366 | ac_cv_have_decl_ffs=no | |
5367 | fi | |
5368 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5369 | fi | |
5370 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5 | |
5371 | echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6 | |
5372 | if test $ac_cv_have_decl_ffs = yes; then | |
5373 | ||
5374 | cat >>confdefs.h <<_ACEOF | |
5375 | #define HAVE_DECL_FFS 1 | |
5376 | _ACEOF | |
5377 | ||
5378 | ||
5379 | else | |
5380 | cat >>confdefs.h <<_ACEOF | |
5381 | #define HAVE_DECL_FFS 0 | |
5382 | _ACEOF | |
5383 | ||
5384 | ||
5385 | fi | |
5386 | echo "$as_me:$LINENO: checking whether asprintf is declared" >&5 | |
5387 | echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6 | |
5388 | if test "${ac_cv_have_decl_asprintf+set}" = set; then | |
5389 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5390 | else | |
5391 | cat >conftest.$ac_ext <<_ACEOF | |
5392 | /* confdefs.h. */ | |
5393 | _ACEOF | |
5394 | cat confdefs.h >>conftest.$ac_ext | |
5395 | cat >>conftest.$ac_ext <<_ACEOF | |
5396 | /* end confdefs.h. */ | |
5397 | $ac_includes_default | |
5398 | int | |
5399 | main () | |
5400 | { | |
5401 | #ifndef asprintf | |
5402 | char *p = (char *) asprintf; | |
5403 | #endif | |
5404 | ||
5405 | ; | |
5406 | return 0; | |
5407 | } | |
5408 | _ACEOF | |
5409 | rm -f conftest.$ac_objext | |
5410 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5411 | (eval $ac_compile) 2>conftest.er1 | |
5412 | ac_status=$? | |
5413 | grep -v '^ *+' conftest.er1 >conftest.err | |
5414 | rm -f conftest.er1 | |
5415 | cat conftest.err >&5 | |
5416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5417 | (exit $ac_status); } && | |
fd7d450d DD |
5418 | { ac_try='test -z "$ac_c_werror_flag" |
5419 | || test ! -s conftest.err' | |
41c953f9 DD |
5420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5421 | (eval $ac_try) 2>&5 | |
5422 | ac_status=$? | |
5423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5424 | (exit $ac_status); }; } && | |
5425 | { ac_try='test -s conftest.$ac_objext' | |
5426 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5427 | (eval $ac_try) 2>&5 | |
5428 | ac_status=$? | |
5429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5430 | (exit $ac_status); }; }; then | |
5431 | ac_cv_have_decl_asprintf=yes | |
5432 | else | |
5433 | echo "$as_me: failed program was:" >&5 | |
5434 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5435 | ||
5436 | ac_cv_have_decl_asprintf=no | |
5437 | fi | |
5438 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5439 | fi | |
5440 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5 | |
5441 | echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6 | |
5442 | if test $ac_cv_have_decl_asprintf = yes; then | |
5443 | ||
5444 | cat >>confdefs.h <<_ACEOF | |
5445 | #define HAVE_DECL_ASPRINTF 1 | |
5446 | _ACEOF | |
5447 | ||
5448 | ||
5449 | else | |
5450 | cat >>confdefs.h <<_ACEOF | |
5451 | #define HAVE_DECL_ASPRINTF 0 | |
5452 | _ACEOF | |
5453 | ||
5454 | ||
5455 | fi | |
5456 | echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5 | |
5457 | echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6 | |
5458 | if test "${ac_cv_have_decl_vasprintf+set}" = set; then | |
5459 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5460 | else | |
5461 | cat >conftest.$ac_ext <<_ACEOF | |
5462 | /* confdefs.h. */ | |
5463 | _ACEOF | |
5464 | cat confdefs.h >>conftest.$ac_ext | |
5465 | cat >>conftest.$ac_ext <<_ACEOF | |
5466 | /* end confdefs.h. */ | |
5467 | $ac_includes_default | |
5468 | int | |
5469 | main () | |
5470 | { | |
5471 | #ifndef vasprintf | |
5472 | char *p = (char *) vasprintf; | |
5473 | #endif | |
5474 | ||
5475 | ; | |
5476 | return 0; | |
5477 | } | |
5478 | _ACEOF | |
5479 | rm -f conftest.$ac_objext | |
5480 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5481 | (eval $ac_compile) 2>conftest.er1 | |
5482 | ac_status=$? | |
5483 | grep -v '^ *+' conftest.er1 >conftest.err | |
5484 | rm -f conftest.er1 | |
5485 | cat conftest.err >&5 | |
5486 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5487 | (exit $ac_status); } && | |
fd7d450d DD |
5488 | { ac_try='test -z "$ac_c_werror_flag" |
5489 | || test ! -s conftest.err' | |
41c953f9 DD |
5490 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5491 | (eval $ac_try) 2>&5 | |
5492 | ac_status=$? | |
5493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5494 | (exit $ac_status); }; } && | |
5495 | { ac_try='test -s conftest.$ac_objext' | |
5496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5497 | (eval $ac_try) 2>&5 | |
5498 | ac_status=$? | |
5499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5500 | (exit $ac_status); }; }; then | |
5501 | ac_cv_have_decl_vasprintf=yes | |
5502 | else | |
5503 | echo "$as_me: failed program was:" >&5 | |
5504 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5505 | ||
5506 | ac_cv_have_decl_vasprintf=no | |
5507 | fi | |
5508 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5509 | fi | |
5510 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5 | |
5511 | echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6 | |
5512 | if test $ac_cv_have_decl_vasprintf = yes; then | |
5513 | ||
5514 | cat >>confdefs.h <<_ACEOF | |
5515 | #define HAVE_DECL_VASPRINTF 1 | |
5516 | _ACEOF | |
5517 | ||
5518 | ||
5519 | else | |
5520 | cat >>confdefs.h <<_ACEOF | |
5521 | #define HAVE_DECL_VASPRINTF 0 | |
5522 | _ACEOF | |
5523 | ||
5524 | ||
01e94249 DD |
5525 | fi |
5526 | echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 | |
5527 | echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 | |
5528 | if test "${ac_cv_have_decl_snprintf+set}" = set; then | |
5529 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5530 | else | |
5531 | cat >conftest.$ac_ext <<_ACEOF | |
5532 | /* confdefs.h. */ | |
5533 | _ACEOF | |
5534 | cat confdefs.h >>conftest.$ac_ext | |
5535 | cat >>conftest.$ac_ext <<_ACEOF | |
5536 | /* end confdefs.h. */ | |
5537 | $ac_includes_default | |
5538 | int | |
5539 | main () | |
5540 | { | |
5541 | #ifndef snprintf | |
5542 | char *p = (char *) snprintf; | |
5543 | #endif | |
5544 | ||
5545 | ; | |
5546 | return 0; | |
5547 | } | |
5548 | _ACEOF | |
5549 | rm -f conftest.$ac_objext | |
5550 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5551 | (eval $ac_compile) 2>conftest.er1 | |
5552 | ac_status=$? | |
5553 | grep -v '^ *+' conftest.er1 >conftest.err | |
5554 | rm -f conftest.er1 | |
5555 | cat conftest.err >&5 | |
5556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5557 | (exit $ac_status); } && | |
fd7d450d DD |
5558 | { ac_try='test -z "$ac_c_werror_flag" |
5559 | || test ! -s conftest.err' | |
01e94249 DD |
5560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5561 | (eval $ac_try) 2>&5 | |
5562 | ac_status=$? | |
5563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5564 | (exit $ac_status); }; } && | |
5565 | { ac_try='test -s conftest.$ac_objext' | |
5566 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5567 | (eval $ac_try) 2>&5 | |
5568 | ac_status=$? | |
5569 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5570 | (exit $ac_status); }; }; then | |
5571 | ac_cv_have_decl_snprintf=yes | |
5572 | else | |
5573 | echo "$as_me: failed program was:" >&5 | |
5574 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5575 | ||
5576 | ac_cv_have_decl_snprintf=no | |
5577 | fi | |
5578 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5579 | fi | |
5580 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 | |
5581 | echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 | |
5582 | if test $ac_cv_have_decl_snprintf = yes; then | |
5583 | ||
5584 | cat >>confdefs.h <<_ACEOF | |
5585 | #define HAVE_DECL_SNPRINTF 1 | |
5586 | _ACEOF | |
5587 | ||
5588 | ||
5589 | else | |
5590 | cat >>confdefs.h <<_ACEOF | |
5591 | #define HAVE_DECL_SNPRINTF 0 | |
5592 | _ACEOF | |
5593 | ||
5594 | ||
5595 | fi | |
5596 | echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 | |
5597 | echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 | |
5598 | if test "${ac_cv_have_decl_vsnprintf+set}" = set; then | |
5599 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5600 | else | |
5601 | cat >conftest.$ac_ext <<_ACEOF | |
5602 | /* confdefs.h. */ | |
5603 | _ACEOF | |
5604 | cat confdefs.h >>conftest.$ac_ext | |
5605 | cat >>conftest.$ac_ext <<_ACEOF | |
5606 | /* end confdefs.h. */ | |
5607 | $ac_includes_default | |
5608 | int | |
5609 | main () | |
5610 | { | |
5611 | #ifndef vsnprintf | |
5612 | char *p = (char *) vsnprintf; | |
5613 | #endif | |
5614 | ||
5615 | ; | |
5616 | return 0; | |
5617 | } | |
5618 | _ACEOF | |
5619 | rm -f conftest.$ac_objext | |
5620 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5621 | (eval $ac_compile) 2>conftest.er1 | |
5622 | ac_status=$? | |
5623 | grep -v '^ *+' conftest.er1 >conftest.err | |
5624 | rm -f conftest.er1 | |
5625 | cat conftest.err >&5 | |
5626 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5627 | (exit $ac_status); } && | |
fd7d450d DD |
5628 | { ac_try='test -z "$ac_c_werror_flag" |
5629 | || test ! -s conftest.err' | |
01e94249 DD |
5630 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5631 | (eval $ac_try) 2>&5 | |
5632 | ac_status=$? | |
5633 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5634 | (exit $ac_status); }; } && | |
5635 | { ac_try='test -s conftest.$ac_objext' | |
5636 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5637 | (eval $ac_try) 2>&5 | |
5638 | ac_status=$? | |
5639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5640 | (exit $ac_status); }; }; then | |
5641 | ac_cv_have_decl_vsnprintf=yes | |
5642 | else | |
5643 | echo "$as_me: failed program was:" >&5 | |
5644 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5645 | ||
5646 | ac_cv_have_decl_vsnprintf=no | |
5647 | fi | |
5648 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5649 | fi | |
5650 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 | |
5651 | echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 | |
5652 | if test $ac_cv_have_decl_vsnprintf = yes; then | |
5653 | ||
5654 | cat >>confdefs.h <<_ACEOF | |
5655 | #define HAVE_DECL_VSNPRINTF 1 | |
5656 | _ACEOF | |
5657 | ||
5658 | ||
5659 | else | |
5660 | cat >>confdefs.h <<_ACEOF | |
5661 | #define HAVE_DECL_VSNPRINTF 0 | |
5662 | _ACEOF | |
5663 | ||
5664 | ||
41c953f9 DD |
5665 | fi |
5666 | ||
5667 | ||
2299a76d DJ |
5668 | |
5669 | cat >>confdefs.h <<\_ACEOF | |
92655e19 | 5670 | #define HAVE_SYS_ERRLIST 1 |
2299a76d DJ |
5671 | _ACEOF |
5672 | ||
92655e19 | 5673 | |
2299a76d | 5674 | cat >>confdefs.h <<\_ACEOF |
c6da642e | 5675 | #define HAVE_SYS_NERR 1 |
2299a76d DJ |
5676 | _ACEOF |
5677 | ||
92655e19 | 5678 | |
2299a76d | 5679 | cat >>confdefs.h <<\_ACEOF |
92655e19 | 5680 | #define HAVE_SYS_SIGLIST 1 |
2299a76d | 5681 | _ACEOF |
92655e19 | 5682 | |
252b5132 RH |
5683 | fi |
5684 | ||
5685 | # For each of these functions, if the host does not provide the | |
5686 | # function we want to put FN.o in LIBOBJS, and if the host does | |
30673bf5 | 5687 | # provide the function, we want to define HAVE_FN in config.h. |
252b5132 RH |
5688 | |
5689 | setobjs= | |
0c0a36a4 | 5690 | CHECK= |
50d4562d | 5691 | target_header_dir= |
252b5132 RH |
5692 | if test -n "${with_target_subdir}"; then |
5693 | ||
5694 | # We are being configured as a target library. AC_REPLACE_FUNCS | |
5695 | # may not work correctly, because the compiler may not be able to | |
5696 | # link executables. Note that we may still be being configured | |
5697 | # native. | |
5698 | ||
5699 | # If we are being configured for newlib, we know which functions | |
5700 | # newlib provide and which ones we will be expected to provide. | |
5701 | ||
5702 | if test "x${with_newlib}" = "xyes"; then | |
58670637 DD |
5703 | case $LIBOBJS in |
5704 | "asprintf.$ac_objext" | \ | |
5705 | *" asprintf.$ac_objext" | \ | |
5706 | "asprintf.$ac_objext "* | \ | |
5707 | *" asprintf.$ac_objext "* ) ;; | |
5708 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;; | |
5709 | esac | |
5710 | ||
5711 | case $LIBOBJS in | |
5712 | "basename.$ac_objext" | \ | |
5713 | *" basename.$ac_objext" | \ | |
5714 | "basename.$ac_objext "* | \ | |
5715 | *" basename.$ac_objext "* ) ;; | |
5716 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; | |
5717 | esac | |
5718 | ||
5719 | case $LIBOBJS in | |
5720 | "insque.$ac_objext" | \ | |
5721 | *" insque.$ac_objext" | \ | |
5722 | "insque.$ac_objext "* | \ | |
5723 | *" insque.$ac_objext "* ) ;; | |
5724 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; | |
5725 | esac | |
5726 | ||
5727 | case $LIBOBJS in | |
5728 | "random.$ac_objext" | \ | |
5729 | *" random.$ac_objext" | \ | |
5730 | "random.$ac_objext "* | \ | |
5731 | *" random.$ac_objext "* ) ;; | |
5732 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
5733 | esac | |
5734 | ||
5735 | case $LIBOBJS in | |
5736 | "strdup.$ac_objext" | \ | |
5737 | *" strdup.$ac_objext" | \ | |
5738 | "strdup.$ac_objext "* | \ | |
5739 | *" strdup.$ac_objext "* ) ;; | |
5740 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;; | |
5741 | esac | |
5742 | ||
5743 | case $LIBOBJS in | |
5744 | "vasprintf.$ac_objext" | \ | |
5745 | *" vasprintf.$ac_objext" | \ | |
5746 | "vasprintf.$ac_objext "* | \ | |
5747 | *" vasprintf.$ac_objext "* ) ;; | |
5748 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; | |
5749 | esac | |
5750 | ||
252b5132 RH |
5751 | |
5752 | for f in $funcs; do | |
5753 | case "$f" in | |
5754 | asprintf | basename | insque | random | strdup | vasprintf) | |
5755 | ;; | |
5756 | *) | |
5757 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2299a76d | 5758 | cat >>confdefs.h <<_ACEOF |
252b5132 | 5759 | #define $n 1 |
2299a76d | 5760 | _ACEOF |
252b5132 RH |
5761 | |
5762 | ;; | |
5763 | esac | |
5764 | done | |
5765 | ||
5766 | # newlib doesnt provide any of the variables in $vars, so we | |
5767 | # dont have to check them here. | |
5768 | ||
5769 | # Of the functions in $checkfuncs, newlib only has strerror. | |
0093138c | 5770 | cat >>confdefs.h <<\_ACEOF |
252b5132 | 5771 | #define HAVE_STRERROR 1 |
0093138c | 5772 | _ACEOF |
252b5132 RH |
5773 | |
5774 | ||
5775 | setobjs=yes | |
5776 | ||
5777 | fi | |
0c0a36a4 | 5778 | |
069e4b19 CV |
5779 | # If we are being configured for Mingw, we know which functions |
5780 | # Mingw provides and which ones we will be expected to provide. | |
5781 | ||
5782 | case "${host}" in | |
5783 | *-*-mingw*) | |
5784 | case $LIBOBJS in | |
5785 | "asprintf.$ac_objext" | \ | |
5786 | *" asprintf.$ac_objext" | \ | |
5787 | "asprintf.$ac_objext "* | \ | |
5788 | *" asprintf.$ac_objext "* ) ;; | |
5789 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;; | |
5790 | esac | |
5791 | ||
5792 | case $LIBOBJS in | |
5793 | "basename.$ac_objext" | \ | |
5794 | *" basename.$ac_objext" | \ | |
5795 | "basename.$ac_objext "* | \ | |
5796 | *" basename.$ac_objext "* ) ;; | |
5797 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; | |
5798 | esac | |
5799 | ||
5800 | case $LIBOBJS in | |
5801 | "bcmp.$ac_objext" | \ | |
5802 | *" bcmp.$ac_objext" | \ | |
5803 | "bcmp.$ac_objext "* | \ | |
5804 | *" bcmp.$ac_objext "* ) ;; | |
5805 | *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;; | |
5806 | esac | |
5807 | ||
5808 | case $LIBOBJS in | |
5809 | "bcopy.$ac_objext" | \ | |
5810 | *" bcopy.$ac_objext" | \ | |
5811 | "bcopy.$ac_objext "* | \ | |
5812 | *" bcopy.$ac_objext "* ) ;; | |
5813 | *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;; | |
5814 | esac | |
5815 | ||
5816 | case $LIBOBJS in | |
5817 | "bzero.$ac_objext" | \ | |
5818 | *" bzero.$ac_objext" | \ | |
5819 | "bzero.$ac_objext "* | \ | |
5820 | *" bzero.$ac_objext "* ) ;; | |
5821 | *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;; | |
5822 | esac | |
5823 | ||
5824 | case $LIBOBJS in | |
5825 | "clock.$ac_objext" | \ | |
5826 | *" clock.$ac_objext" | \ | |
5827 | "clock.$ac_objext "* | \ | |
5828 | *" clock.$ac_objext "* ) ;; | |
5829 | *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;; | |
5830 | esac | |
5831 | ||
5832 | case $LIBOBJS in | |
5833 | "ffs.$ac_objext" | \ | |
5834 | *" ffs.$ac_objext" | \ | |
5835 | "ffs.$ac_objext "* | \ | |
5836 | *" ffs.$ac_objext "* ) ;; | |
5837 | *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;; | |
5838 | esac | |
5839 | ||
5840 | case $LIBOBJS in | |
5841 | "getpagesize.$ac_objext" | \ | |
5842 | *" getpagesize.$ac_objext" | \ | |
5843 | "getpagesize.$ac_objext "* | \ | |
5844 | *" getpagesize.$ac_objext "* ) ;; | |
5845 | *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;; | |
5846 | esac | |
5847 | ||
5848 | case $LIBOBJS in | |
5849 | "index.$ac_objext" | \ | |
5850 | *" index.$ac_objext" | \ | |
5851 | "index.$ac_objext "* | \ | |
5852 | *" index.$ac_objext "* ) ;; | |
5853 | *) LIBOBJS="$LIBOBJS index.$ac_objext" ;; | |
5854 | esac | |
5855 | ||
5856 | case $LIBOBJS in | |
5857 | "insque.$ac_objext" | \ | |
5858 | *" insque.$ac_objext" | \ | |
5859 | "insque.$ac_objext "* | \ | |
5860 | *" insque.$ac_objext "* ) ;; | |
5861 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; | |
5862 | esac | |
5863 | ||
5864 | case $LIBOBJS in | |
5865 | "mempcpy.$ac_objext" | \ | |
5866 | *" mempcpy.$ac_objext" | \ | |
5867 | "mempcpy.$ac_objext "* | \ | |
5868 | *" mempcpy.$ac_objext "* ) ;; | |
5869 | *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;; | |
5870 | esac | |
5871 | ||
5872 | case $LIBOBJS in | |
5873 | "mkstemps.$ac_objext" | \ | |
5874 | *" mkstemps.$ac_objext" | \ | |
5875 | "mkstemps.$ac_objext "* | \ | |
5876 | *" mkstemps.$ac_objext "* ) ;; | |
5877 | *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;; | |
5878 | esac | |
5879 | ||
5880 | case $LIBOBJS in | |
5881 | "random.$ac_objext" | \ | |
5882 | *" random.$ac_objext" | \ | |
5883 | "random.$ac_objext "* | \ | |
5884 | *" random.$ac_objext "* ) ;; | |
5885 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
5886 | esac | |
5887 | ||
5888 | case $LIBOBJS in | |
5889 | "rindex.$ac_objext" | \ | |
5890 | *" rindex.$ac_objext" | \ | |
5891 | "rindex.$ac_objext "* | \ | |
5892 | *" rindex.$ac_objext "* ) ;; | |
5893 | *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;; | |
5894 | esac | |
5895 | ||
5896 | case $LIBOBJS in | |
5897 | "sigsetmask.$ac_objext" | \ | |
5898 | *" sigsetmask.$ac_objext" | \ | |
5899 | "sigsetmask.$ac_objext "* | \ | |
5900 | *" sigsetmask.$ac_objext "* ) ;; | |
5901 | *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;; | |
5902 | esac | |
5903 | ||
5904 | case $LIBOBJS in | |
5905 | "stpcpy.$ac_objext" | \ | |
5906 | *" stpcpy.$ac_objext" | \ | |
5907 | "stpcpy.$ac_objext "* | \ | |
5908 | *" stpcpy.$ac_objext "* ) ;; | |
5909 | *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;; | |
5910 | esac | |
5911 | ||
5912 | case $LIBOBJS in | |
5913 | "stpncpy.$ac_objext" | \ | |
5914 | *" stpncpy.$ac_objext" | \ | |
5915 | "stpncpy.$ac_objext "* | \ | |
5916 | *" stpncpy.$ac_objext "* ) ;; | |
5917 | *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;; | |
5918 | esac | |
5919 | ||
5920 | case $LIBOBJS in | |
5921 | "strndup.$ac_objext" | \ | |
5922 | *" strndup.$ac_objext" | \ | |
5923 | "strndup.$ac_objext "* | \ | |
5924 | *" strndup.$ac_objext "* ) ;; | |
5925 | *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;; | |
5926 | esac | |
5927 | ||
5928 | case $LIBOBJS in | |
5929 | "strverscmp.$ac_objext" | \ | |
5930 | *" strverscmp.$ac_objext" | \ | |
5931 | "strverscmp.$ac_objext "* | \ | |
5932 | *" strverscmp.$ac_objext "* ) ;; | |
5933 | *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;; | |
5934 | esac | |
5935 | ||
5936 | case $LIBOBJS in | |
5937 | "vasprintf.$ac_objext" | \ | |
5938 | *" vasprintf.$ac_objext" | \ | |
5939 | "vasprintf.$ac_objext "* | \ | |
5940 | *" vasprintf.$ac_objext "* ) ;; | |
5941 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; | |
5942 | esac | |
5943 | ||
5944 | case $LIBOBJS in | |
5945 | "waitpid.$ac_objext" | \ | |
5946 | *" waitpid.$ac_objext" | \ | |
5947 | "waitpid.$ac_objext "* | \ | |
5948 | *" waitpid.$ac_objext "* ) ;; | |
5949 | *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;; | |
5950 | esac | |
5951 | ||
5952 | ||
5953 | for f in $funcs; do | |
5954 | case "$f" in | |
5955 | asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid) | |
5956 | ;; | |
5957 | *) | |
5958 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5959 | cat >>confdefs.h <<_ACEOF | |
5960 | #define $n 1 | |
5961 | _ACEOF | |
5962 | ||
5963 | ;; | |
5964 | esac | |
5965 | done | |
5966 | ||
5967 | # Mingw doesnt provide any of the variables in $vars, so we | |
5968 | # dont have to check them here. | |
5969 | ||
5970 | # Of the functions in $checkfuncs, Mingw only has strerror. | |
5971 | cat >>confdefs.h <<\_ACEOF | |
5972 | #define HAVE_STRERROR 1 | |
5973 | _ACEOF | |
5974 | ||
5975 | ||
5976 | setobjs=yes | |
5977 | ;; | |
5978 | ||
5979 | esac | |
5980 | ||
50d4562d DD |
5981 | # We may wish to install the target headers somewhere. |
5982 | # Check whether --enable-install-libiberty or --disable-install-libiberty was given. | |
5983 | if test "${enable_install_libiberty+set}" = set; then | |
5984 | enableval="$enable_install_libiberty" | |
5985 | enable_install_libiberty=$enableval | |
5986 | else | |
5987 | enable_install_libiberty=no | |
2299a76d | 5988 | fi; |
50d4562d DD |
5989 | # Option parsed, now set things appropriately. |
5990 | case x"$enable_install_libiberty" in | |
5991 | xyes|x) | |
5992 | target_header_dir=libiberty | |
5993 | ;; | |
2299a76d | 5994 | xno) |
50d4562d DD |
5995 | target_header_dir= |
5996 | ;; | |
2299a76d | 5997 | *) |
50d4562d DD |
5998 | # This could be sanity-checked in various ways... |
5999 | target_header_dir="${enable_install_libiberty}" | |
6000 | ;; | |
6001 | esac | |
6002 | ||
6003 | ||
0c0a36a4 ILT |
6004 | else |
6005 | ||
6006 | # Not a target library, so we set things up to run the test suite. | |
b109e79a | 6007 | CHECK=really-check |
0c0a36a4 | 6008 | |
252b5132 RH |
6009 | fi |
6010 | ||
0c0a36a4 ILT |
6011 | |
6012 | ||
50d4562d | 6013 | |
f01b59ed | 6014 | case "${host}" in |
bef8b55d | 6015 | *-*-cygwin* | *-*-mingw*) |
0093138c | 6016 | cat >>confdefs.h <<\_ACEOF |
f01b59ed | 6017 | #define HAVE_SYS_ERRLIST 1 |
0093138c | 6018 | _ACEOF |
f01b59ed | 6019 | |
0093138c | 6020 | cat >>confdefs.h <<\_ACEOF |
f01b59ed | 6021 | #define HAVE_SYS_NERR 1 |
0093138c | 6022 | _ACEOF |
f01b59ed DD |
6023 | |
6024 | ;; | |
6025 | esac | |
6026 | ||
252b5132 RH |
6027 | if test -z "${setobjs}"; then |
6028 | case "${host}" in | |
6029 | ||
6030 | *-*-vxworks*) | |
6031 | # Handle VxWorks configuration specially, since on VxWorks the | |
6032 | # libraries are actually on the target board, not in the file | |
6033 | # system. | |
58670637 DD |
6034 | case $LIBOBJS in |
6035 | "basename.$ac_objext" | \ | |
6036 | *" basename.$ac_objext" | \ | |
6037 | "basename.$ac_objext "* | \ | |
6038 | *" basename.$ac_objext "* ) ;; | |
6039 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; | |
6040 | esac | |
6041 | ||
6042 | case $LIBOBJS in | |
6043 | "getpagesize.$ac_objext" | \ | |
6044 | *" getpagesize.$ac_objext" | \ | |
6045 | "getpagesize.$ac_objext "* | \ | |
6046 | *" getpagesize.$ac_objext "* ) ;; | |
6047 | *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;; | |
6048 | esac | |
6049 | ||
6050 | case $LIBOBJS in | |
6051 | "insque.$ac_objext" | \ | |
6052 | *" insque.$ac_objext" | \ | |
6053 | "insque.$ac_objext "* | \ | |
6054 | *" insque.$ac_objext "* ) ;; | |
6055 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; | |
6056 | esac | |
6057 | ||
6058 | case $LIBOBJS in | |
6059 | "random.$ac_objext" | \ | |
6060 | *" random.$ac_objext" | \ | |
6061 | "random.$ac_objext "* | \ | |
6062 | *" random.$ac_objext "* ) ;; | |
6063 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
6064 | esac | |
6065 | ||
6066 | case $LIBOBJS in | |
6067 | "strcasecmp.$ac_objext" | \ | |
6068 | *" strcasecmp.$ac_objext" | \ | |
6069 | "strcasecmp.$ac_objext "* | \ | |
6070 | *" strcasecmp.$ac_objext "* ) ;; | |
6071 | *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;; | |
6072 | esac | |
6073 | ||
6074 | case $LIBOBJS in | |
6075 | "strncasecmp.$ac_objext" | \ | |
6076 | *" strncasecmp.$ac_objext" | \ | |
6077 | "strncasecmp.$ac_objext "* | \ | |
6078 | *" strncasecmp.$ac_objext "* ) ;; | |
6079 | *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; | |
6080 | esac | |
6081 | ||
6082 | case $LIBOBJS in | |
6083 | "strdup.$ac_objext" | \ | |
6084 | *" strdup.$ac_objext" | \ | |
6085 | "strdup.$ac_objext "* | \ | |
6086 | *" strdup.$ac_objext "* ) ;; | |
6087 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;; | |
6088 | esac | |
6089 | ||
6090 | case $LIBOBJS in | |
6091 | "vfork.$ac_objext" | \ | |
6092 | *" vfork.$ac_objext" | \ | |
6093 | "vfork.$ac_objext "* | \ | |
6094 | *" vfork.$ac_objext "* ) ;; | |
6095 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;; | |
6096 | esac | |
6097 | ||
6098 | case $LIBOBJS in | |
6099 | "waitpid.$ac_objext" | \ | |
6100 | *" waitpid.$ac_objext" | \ | |
6101 | "waitpid.$ac_objext "* | \ | |
6102 | *" waitpid.$ac_objext "* ) ;; | |
6103 | *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;; | |
6104 | esac | |
6105 | ||
6106 | case $LIBOBJS in | |
6107 | "vasprintf.$ac_objext" | \ | |
6108 | *" vasprintf.$ac_objext" | \ | |
6109 | "vasprintf.$ac_objext "* | \ | |
6110 | *" vasprintf.$ac_objext "* ) ;; | |
6111 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; | |
6112 | esac | |
6113 | ||
252b5132 RH |
6114 | for f in $funcs; do |
6115 | case "$f" in | |
6116 | basename | getpagesize | insque | random | strcasecmp) | |
6117 | ;; | |
6118 | strncasecmp | strdup | vfork | waitpid | vasprintf) | |
6119 | ;; | |
6120 | *) | |
6121 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2299a76d | 6122 | cat >>confdefs.h <<_ACEOF |
252b5132 | 6123 | #define $n 1 |
2299a76d | 6124 | _ACEOF |
252b5132 RH |
6125 | |
6126 | ;; | |
6127 | esac | |
6128 | done | |
6129 | ||
6130 | # VxWorks doesn't provide any of the variables in $vars, so we | |
6131 | # don't have to check them here. | |
6132 | ||
6133 | # Of the functions in $checkfuncs, VxWorks only has strerror. | |
0093138c | 6134 | cat >>confdefs.h <<\_ACEOF |
252b5132 | 6135 | #define HAVE_STRERROR 1 |
0093138c | 6136 | _ACEOF |
252b5132 RH |
6137 | |
6138 | ||
1f92e180 DD |
6139 | setobjs=yes |
6140 | ;; | |
6141 | ||
6142 | *-*-msdosdjgpp) | |
6143 | for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \ | |
008d60eb | 6144 | getcwd getpagesize getrusage gettimeofday \ |
1f92e180 DD |
6145 | index insque memchr memcmp memcpy memmove memset psignal \ |
6146 | putenv random rename rindex sbrk setenv stpcpy strcasecmp \ | |
6147 | strchr strdup strerror strncasecmp strrchr strstr strtod \ | |
6148 | strtol strtoul sysconf times tmpnam vfprintf vprintf \ | |
6149 | vsprintf waitpid | |
6150 | do | |
6151 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6152 | cat >>confdefs.h <<_ACEOF | |
6153 | #define $n 1 | |
6154 | _ACEOF | |
6155 | ||
6156 | done | |
6157 | ||
6158 | ||
252b5132 RH |
6159 | setobjs=yes |
6160 | ;; | |
6161 | ||
6162 | esac | |
6163 | fi | |
6164 | ||
6165 | if test -z "${setobjs}"; then | |
6166 | ||
6167 | case "${host}" in | |
6168 | ||
6169 | *-*-cygwin*) | |
6170 | # The Cygwin library actually uses a couple of files from | |
6171 | # libiberty when it is built. If we are building a native | |
6172 | # Cygwin, and we run the tests, we will appear to have these | |
6173 | # files. However, when we go on to build winsup, we will wind up | |
6174 | # with a library which does not have the files, since they should | |
6175 | # have come from libiberty. | |
6176 | ||
6177 | # We handle this by removing the functions the winsup library | |
6178 | # provides from our shell variables, so that they appear to be | |
6179 | # missing. | |
6180 | ||
64e3a659 | 6181 | # DJ - only if we're *building* cygwin, not just building *with* cygwin |
2299a76d | 6182 | |
64e3a659 DD |
6183 | if test -n "${with_target_subdir}" |
6184 | then | |
6185 | funcs="`echo $funcs | sed -e 's/random//'`" | |
58670637 DD |
6186 | case $LIBOBJS in |
6187 | "random.$ac_objext" | \ | |
6188 | *" random.$ac_objext" | \ | |
6189 | "random.$ac_objext "* | \ | |
6190 | *" random.$ac_objext "* ) ;; | |
6191 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
6192 | esac | |
6193 | ||
64e3a659 DD |
6194 | vars="`echo $vars | sed -e 's/sys_siglist//'`" |
6195 | checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" | |
6196 | fi | |
252b5132 RH |
6197 | ;; |
6198 | ||
6199 | *-*-mingw32*) | |
6200 | # Under mingw32, sys_nerr and sys_errlist exist, but they are | |
6201 | # macros, so the test below won't find them. | |
92655e19 DD |
6202 | libiberty_cv_var_sys_nerr=yes |
6203 | libiberty_cv_var_sys_errlist=yes | |
252b5132 RH |
6204 | ;; |
6205 | ||
65dce80e DD |
6206 | *-*-msdosdjgpp*) |
6207 | # vfork and fork are stubs. | |
6208 | ac_cv_func_vfork_works=no | |
6209 | ;; | |
6210 | ||
252b5132 | 6211 | *-*-uwin*) |
2299a76d | 6212 | # Under some versions of uwin, vfork is notoriously buggy and the test |
252b5132 RH |
6213 | # can hang configure; on other versions, vfork exists just as a stub. |
6214 | # FIXME: This should be removed once vfork in uwin's runtime is fixed. | |
6215 | ac_cv_func_vfork_works=no | |
0c0a36a4 | 6216 | # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are |
2299a76d | 6217 | # macros (actually, these are imported from a DLL, but the end effect |
0c0a36a4 | 6218 | # is the same), so the test below won't find them. |
92655e19 DD |
6219 | libiberty_cv_var_sys_nerr=yes |
6220 | libiberty_cv_var_sys_errlist=yes | |
252b5132 RH |
6221 | ;; |
6222 | ||
c0eb281b | 6223 | *-*-*vms*) |
2299a76d | 6224 | # Under VMS, vfork works very different than on Unix. The standard test |
c0eb281b DD |
6225 | # won't work, and it isn't easily adaptable. It makes more sense to |
6226 | # just force it. | |
6227 | ac_cv_func_vfork_works=yes | |
6228 | ;; | |
6229 | ||
252b5132 RH |
6230 | esac |
6231 | ||
6232 | # We haven't set the list of objects yet. Use the standard autoconf | |
6233 | # tests. This will only work if the compiler works. | |
2299a76d DJ |
6234 | echo "$as_me:$LINENO: checking for library containing strerror" >&5 |
6235 | echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 | |
6236 | if test "${ac_cv_search_strerror+set}" = set; then | |
6237 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6238 | else | |
6239 | ac_func_search_save_LIBS=$LIBS | |
6240 | ac_cv_search_strerror=no | |
6241 | if test x$gcc_no_link = xyes; then | |
6242 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6243 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6244 | { (exit 1); exit 1; }; } | |
6245 | fi | |
6246 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6247 | /* confdefs.h. */ |
6248 | _ACEOF | |
6249 | cat confdefs.h >>conftest.$ac_ext | |
6250 | cat >>conftest.$ac_ext <<_ACEOF | |
6251 | /* end confdefs.h. */ | |
252b5132 | 6252 | |
2299a76d DJ |
6253 | /* Override any gcc2 internal prototype to avoid an error. */ |
6254 | #ifdef __cplusplus | |
6255 | extern "C" | |
6256 | #endif | |
6257 | /* We use char because int might match the return type of a gcc2 | |
6258 | builtin and then its argument prototype would still apply. */ | |
6259 | char strerror (); | |
6260 | int | |
6261 | main () | |
6262 | { | |
6263 | strerror (); | |
6264 | ; | |
6265 | return 0; | |
6266 | } | |
6267 | _ACEOF | |
6268 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6269 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6270 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6271 | ac_status=$? |
58670637 DD |
6272 | grep -v '^ *+' conftest.er1 >conftest.err |
6273 | rm -f conftest.er1 | |
6274 | cat conftest.err >&5 | |
2299a76d DJ |
6275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6276 | (exit $ac_status); } && | |
fd7d450d DD |
6277 | { ac_try='test -z "$ac_c_werror_flag" |
6278 | || test ! -s conftest.err' | |
58670637 DD |
6279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6280 | (eval $ac_try) 2>&5 | |
6281 | ac_status=$? | |
6282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6283 | (exit $ac_status); }; } && | |
6284 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6286 | (eval $ac_try) 2>&5 | |
6287 | ac_status=$? | |
6288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6289 | (exit $ac_status); }; }; then | |
6290 | ac_cv_search_strerror="none required" | |
6291 | else | |
6292 | echo "$as_me: failed program was:" >&5 | |
6293 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6294 | ||
6295 | fi | |
58670637 DD |
6296 | rm -f conftest.err conftest.$ac_objext \ |
6297 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6298 | if test "$ac_cv_search_strerror" = no; then |
6299 | for ac_lib in cposix; do | |
6300 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6301 | if test x$gcc_no_link = xyes; then | |
6302 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6303 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6304 | { (exit 1); exit 1; }; } | |
6305 | fi | |
6306 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6307 | /* confdefs.h. */ |
6308 | _ACEOF | |
6309 | cat confdefs.h >>conftest.$ac_ext | |
6310 | cat >>conftest.$ac_ext <<_ACEOF | |
6311 | /* end confdefs.h. */ | |
252b5132 | 6312 | |
2299a76d DJ |
6313 | /* Override any gcc2 internal prototype to avoid an error. */ |
6314 | #ifdef __cplusplus | |
6315 | extern "C" | |
6316 | #endif | |
6317 | /* We use char because int might match the return type of a gcc2 | |
6318 | builtin and then its argument prototype would still apply. */ | |
6319 | char strerror (); | |
6320 | int | |
6321 | main () | |
6322 | { | |
6323 | strerror (); | |
6324 | ; | |
6325 | return 0; | |
6326 | } | |
6327 | _ACEOF | |
6328 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6329 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6330 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6331 | ac_status=$? |
58670637 DD |
6332 | grep -v '^ *+' conftest.er1 >conftest.err |
6333 | rm -f conftest.er1 | |
6334 | cat conftest.err >&5 | |
2299a76d DJ |
6335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6336 | (exit $ac_status); } && | |
fd7d450d DD |
6337 | { ac_try='test -z "$ac_c_werror_flag" |
6338 | || test ! -s conftest.err' | |
58670637 DD |
6339 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6340 | (eval $ac_try) 2>&5 | |
6341 | ac_status=$? | |
6342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6343 | (exit $ac_status); }; } && | |
6344 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6345 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6346 | (eval $ac_try) 2>&5 | |
6347 | ac_status=$? | |
6348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6349 | (exit $ac_status); }; }; then | |
6350 | ac_cv_search_strerror="-l$ac_lib" | |
6351 | break | |
6352 | else | |
6353 | echo "$as_me: failed program was:" >&5 | |
6354 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6355 | ||
6356 | fi | |
58670637 DD |
6357 | rm -f conftest.err conftest.$ac_objext \ |
6358 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d | 6359 | done |
252b5132 | 6360 | fi |
2299a76d DJ |
6361 | LIBS=$ac_func_search_save_LIBS |
6362 | fi | |
6363 | echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 | |
6364 | echo "${ECHO_T}$ac_cv_search_strerror" >&6 | |
6365 | if test "$ac_cv_search_strerror" != no; then | |
6366 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
252b5132 | 6367 | |
252b5132 | 6368 | fi |
252b5132 | 6369 | |
2299a76d DJ |
6370 | |
6371 | for ac_func in $funcs | |
252b5132 | 6372 | do |
2299a76d DJ |
6373 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6374 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6375 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6376 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6377 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6378 | else | |
6379 | if test x$gcc_no_link = xyes; then | |
6380 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6381 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6382 | { (exit 1); exit 1; }; } | |
6383 | fi | |
6384 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6385 | /* confdefs.h. */ |
6386 | _ACEOF | |
6387 | cat confdefs.h >>conftest.$ac_ext | |
6388 | cat >>conftest.$ac_ext <<_ACEOF | |
6389 | /* end confdefs.h. */ | |
252b5132 | 6390 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6391 | which can conflict with char $ac_func (); below. |
6392 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6393 | <limits.h> exists even on freestanding compilers. Under hpux, |
6394 | including <limits.h> includes <sys/time.h> and causes problems | |
6395 | checking for functions defined therein. */ | |
6396 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6397 | # include <limits.h> |
6398 | #else | |
6399 | # include <assert.h> | |
6400 | #endif | |
252b5132 | 6401 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6402 | #ifdef __cplusplus |
6403 | extern "C" | |
6404 | { | |
6405 | #endif | |
252b5132 | 6406 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6407 | builtin and then its argument prototype would still apply. */ |
6408 | char $ac_func (); | |
252b5132 RH |
6409 | /* The GNU C library defines this for functions which it implements |
6410 | to always fail with ENOSYS. Some functions are actually named | |
6411 | something starting with __ and the normal name is an alias. */ | |
6412 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6413 | choke me | |
6414 | #else | |
2299a76d DJ |
6415 | char (*f) () = $ac_func; |
6416 | #endif | |
6417 | #ifdef __cplusplus | |
6418 | } | |
252b5132 RH |
6419 | #endif |
6420 | ||
2299a76d DJ |
6421 | int |
6422 | main () | |
6423 | { | |
6424 | return f != $ac_func; | |
6425 | ; | |
6426 | return 0; | |
6427 | } | |
6428 | _ACEOF | |
6429 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6430 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6431 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6432 | ac_status=$? |
58670637 DD |
6433 | grep -v '^ *+' conftest.er1 >conftest.err |
6434 | rm -f conftest.er1 | |
6435 | cat conftest.err >&5 | |
2299a76d DJ |
6436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6437 | (exit $ac_status); } && | |
fd7d450d DD |
6438 | { ac_try='test -z "$ac_c_werror_flag" |
6439 | || test ! -s conftest.err' | |
58670637 DD |
6440 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6441 | (eval $ac_try) 2>&5 | |
6442 | ac_status=$? | |
6443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6444 | (exit $ac_status); }; } && | |
6445 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6447 | (eval $ac_try) 2>&5 | |
6448 | ac_status=$? | |
6449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6450 | (exit $ac_status); }; }; then | |
6451 | eval "$as_ac_var=yes" | |
6452 | else | |
6453 | echo "$as_me: failed program was:" >&5 | |
6454 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6455 | ||
6456 | eval "$as_ac_var=no" | |
6457 | fi | |
58670637 DD |
6458 | rm -f conftest.err conftest.$ac_objext \ |
6459 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6460 | fi |
6461 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6462 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6463 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6464 | cat >>confdefs.h <<_ACEOF | |
6465 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6466 | _ACEOF | |
6467 | ||
6468 | else | |
58670637 DD |
6469 | case $LIBOBJS in |
6470 | "$ac_func.$ac_objext" | \ | |
6471 | *" $ac_func.$ac_objext" | \ | |
6472 | "$ac_func.$ac_objext "* | \ | |
6473 | *" $ac_func.$ac_objext "* ) ;; | |
6474 | *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; | |
6475 | esac | |
6476 | ||
252b5132 RH |
6477 | fi |
6478 | done | |
6479 | ||
6480 | ||
2299a76d DJ |
6481 | echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5 |
6482 | echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6 | |
6483 | if test "${ac_cv_os_cray+set}" = set; then | |
6484 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6485 | else |
2299a76d | 6486 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6487 | /* confdefs.h. */ |
6488 | _ACEOF | |
6489 | cat confdefs.h >>conftest.$ac_ext | |
6490 | cat >>conftest.$ac_ext <<_ACEOF | |
6491 | /* end confdefs.h. */ | |
252b5132 RH |
6492 | #if defined(CRAY) && ! defined(CRAY2) |
6493 | webecray | |
6494 | #else | |
6495 | wenotbecray | |
6496 | #endif | |
6497 | ||
2299a76d | 6498 | _ACEOF |
252b5132 | 6499 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
2299a76d | 6500 | $EGREP "webecray" >/dev/null 2>&1; then |
252b5132 RH |
6501 | ac_cv_os_cray=yes |
6502 | else | |
252b5132 RH |
6503 | ac_cv_os_cray=no |
6504 | fi | |
6505 | rm -f conftest* | |
6506 | ||
6507 | fi | |
2299a76d DJ |
6508 | echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 |
6509 | echo "${ECHO_T}$ac_cv_os_cray" >&6 | |
252b5132 | 6510 | if test $ac_cv_os_cray = yes; then |
30673bf5 | 6511 | for ac_func in _getb67 GETB67 getb67; do |
2299a76d DJ |
6512 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6513 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6514 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6515 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6516 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6517 | else | |
6518 | if test x$gcc_no_link = xyes; then | |
6519 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6520 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6521 | { (exit 1); exit 1; }; } | |
6522 | fi | |
6523 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6524 | /* confdefs.h. */ |
6525 | _ACEOF | |
6526 | cat confdefs.h >>conftest.$ac_ext | |
6527 | cat >>conftest.$ac_ext <<_ACEOF | |
6528 | /* end confdefs.h. */ | |
252b5132 | 6529 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6530 | which can conflict with char $ac_func (); below. |
6531 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6532 | <limits.h> exists even on freestanding compilers. Under hpux, |
6533 | including <limits.h> includes <sys/time.h> and causes problems | |
6534 | checking for functions defined therein. */ | |
6535 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6536 | # include <limits.h> |
6537 | #else | |
6538 | # include <assert.h> | |
6539 | #endif | |
252b5132 | 6540 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6541 | #ifdef __cplusplus |
6542 | extern "C" | |
6543 | { | |
6544 | #endif | |
252b5132 | 6545 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6546 | builtin and then its argument prototype would still apply. */ |
6547 | char $ac_func (); | |
252b5132 RH |
6548 | /* The GNU C library defines this for functions which it implements |
6549 | to always fail with ENOSYS. Some functions are actually named | |
6550 | something starting with __ and the normal name is an alias. */ | |
6551 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6552 | choke me | |
6553 | #else | |
2299a76d DJ |
6554 | char (*f) () = $ac_func; |
6555 | #endif | |
6556 | #ifdef __cplusplus | |
6557 | } | |
252b5132 RH |
6558 | #endif |
6559 | ||
2299a76d DJ |
6560 | int |
6561 | main () | |
6562 | { | |
6563 | return f != $ac_func; | |
6564 | ; | |
6565 | return 0; | |
6566 | } | |
6567 | _ACEOF | |
6568 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6569 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6570 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6571 | ac_status=$? |
58670637 DD |
6572 | grep -v '^ *+' conftest.er1 >conftest.err |
6573 | rm -f conftest.er1 | |
6574 | cat conftest.err >&5 | |
2299a76d DJ |
6575 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6576 | (exit $ac_status); } && | |
fd7d450d DD |
6577 | { ac_try='test -z "$ac_c_werror_flag" |
6578 | || test ! -s conftest.err' | |
58670637 DD |
6579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6580 | (eval $ac_try) 2>&5 | |
6581 | ac_status=$? | |
6582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6583 | (exit $ac_status); }; } && | |
6584 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6585 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6586 | (eval $ac_try) 2>&5 | |
6587 | ac_status=$? | |
6588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6589 | (exit $ac_status); }; }; then | |
6590 | eval "$as_ac_var=yes" | |
6591 | else | |
6592 | echo "$as_me: failed program was:" >&5 | |
6593 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6594 | ||
6595 | eval "$as_ac_var=no" | |
6596 | fi | |
58670637 DD |
6597 | rm -f conftest.err conftest.$ac_objext \ |
6598 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6599 | fi |
6600 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6601 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6602 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6603 | ||
6604 | cat >>confdefs.h <<_ACEOF | |
252b5132 | 6605 | #define CRAY_STACKSEG_END $ac_func |
2299a76d | 6606 | _ACEOF |
252b5132 | 6607 | break |
252b5132 RH |
6608 | fi |
6609 | ||
30673bf5 | 6610 | done |
252b5132 RH |
6611 | fi |
6612 | ||
2299a76d DJ |
6613 | echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 |
6614 | echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 | |
6615 | if test "${ac_cv_c_stack_direction+set}" = set; then | |
6616 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
6617 | else |
6618 | if test "$cross_compiling" = yes; then | |
6619 | ac_cv_c_stack_direction=0 | |
6620 | else | |
2299a76d | 6621 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6622 | /* confdefs.h. */ |
6623 | _ACEOF | |
6624 | cat confdefs.h >>conftest.$ac_ext | |
6625 | cat >>conftest.$ac_ext <<_ACEOF | |
6626 | /* end confdefs.h. */ | |
252b5132 RH |
6627 | find_stack_direction () |
6628 | { | |
6629 | static char *addr = 0; | |
6630 | auto char dummy; | |
6631 | if (addr == 0) | |
6632 | { | |
6633 | addr = &dummy; | |
6634 | return find_stack_direction (); | |
6635 | } | |
6636 | else | |
6637 | return (&dummy > addr) ? 1 : -1; | |
6638 | } | |
6639 | main () | |
6640 | { | |
6641 | exit (find_stack_direction() < 0); | |
6642 | } | |
2299a76d DJ |
6643 | _ACEOF |
6644 | rm -f conftest$ac_exeext | |
6645 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6646 | (eval $ac_link) 2>&5 | |
6647 | ac_status=$? | |
6648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6649 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6650 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6651 | (eval $ac_try) 2>&5 | |
6652 | ac_status=$? | |
6653 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6654 | (exit $ac_status); }; }; then | |
252b5132 RH |
6655 | ac_cv_c_stack_direction=1 |
6656 | else | |
2299a76d DJ |
6657 | echo "$as_me: program exited with status $ac_status" >&5 |
6658 | echo "$as_me: failed program was:" >&5 | |
6659 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6660 | ||
6661 | ( exit $ac_status ) | |
6662 | ac_cv_c_stack_direction=-1 | |
252b5132 | 6663 | fi |
58670637 | 6664 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
252b5132 | 6665 | fi |
252b5132 | 6666 | fi |
2299a76d DJ |
6667 | echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 |
6668 | echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 | |
252b5132 | 6669 | |
2299a76d | 6670 | cat >>confdefs.h <<_ACEOF |
252b5132 | 6671 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
2299a76d DJ |
6672 | _ACEOF |
6673 | ||
252b5132 | 6674 | |
0c0a36a4 | 6675 | |
2299a76d DJ |
6676 | |
6677 | for ac_header in unistd.h vfork.h | |
6678 | do | |
6679 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8ddbb593 | 6680 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
6681 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
6682 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6683 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 6684 | else |
8ddbb593 | 6685 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6686 | /* confdefs.h. */ |
6687 | _ACEOF | |
6688 | cat confdefs.h >>conftest.$ac_ext | |
6689 | cat >>conftest.$ac_ext <<_ACEOF | |
6690 | /* end confdefs.h. */ | |
6691 | #include <$ac_header> | |
6692 | _ACEOF | |
6693 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6694 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6695 | ac_status=$? | |
6696 | grep -v '^ *+' conftest.er1 >conftest.err | |
6697 | rm -f conftest.er1 | |
6698 | cat conftest.err >&5 | |
6699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6700 | (exit $ac_status); } >/dev/null; then | |
6701 | if test -s conftest.err; then | |
6702 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 6703 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
6704 | else |
6705 | ac_cpp_err= | |
6706 | fi | |
252b5132 | 6707 | else |
2299a76d DJ |
6708 | ac_cpp_err=yes |
6709 | fi | |
6710 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 6711 | eval "$as_ac_Header=yes" |
2299a76d DJ |
6712 | else |
6713 | echo "$as_me: failed program was:" >&5 | |
6714 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6715 | ||
8ddbb593 | 6716 | eval "$as_ac_Header=no" |
2299a76d DJ |
6717 | fi |
6718 | rm -f conftest.err conftest.$ac_ext | |
252b5132 | 6719 | fi |
2299a76d DJ |
6720 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
6721 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
6722 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
6723 | cat >>confdefs.h <<_ACEOF | |
6724 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6725 | _ACEOF | |
252b5132 | 6726 | |
252b5132 | 6727 | fi |
2299a76d DJ |
6728 | done |
6729 | ||
6730 | ||
6731 | ||
6732 | for ac_func in fork vfork | |
6733 | do | |
6734 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6735 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6736 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6737 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6739 | else | |
6740 | if test x$gcc_no_link = xyes; then | |
6741 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6742 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6743 | { (exit 1); exit 1; }; } | |
6744 | fi | |
6745 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6746 | /* confdefs.h. */ |
6747 | _ACEOF | |
6748 | cat confdefs.h >>conftest.$ac_ext | |
6749 | cat >>conftest.$ac_ext <<_ACEOF | |
6750 | /* end confdefs.h. */ | |
252b5132 | 6751 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6752 | which can conflict with char $ac_func (); below. |
6753 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6754 | <limits.h> exists even on freestanding compilers. Under hpux, |
6755 | including <limits.h> includes <sys/time.h> and causes problems | |
6756 | checking for functions defined therein. */ | |
6757 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6758 | # include <limits.h> |
6759 | #else | |
6760 | # include <assert.h> | |
6761 | #endif | |
252b5132 | 6762 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6763 | #ifdef __cplusplus |
6764 | extern "C" | |
6765 | { | |
6766 | #endif | |
252b5132 | 6767 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6768 | builtin and then its argument prototype would still apply. */ |
6769 | char $ac_func (); | |
252b5132 RH |
6770 | /* The GNU C library defines this for functions which it implements |
6771 | to always fail with ENOSYS. Some functions are actually named | |
6772 | something starting with __ and the normal name is an alias. */ | |
2299a76d | 6773 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
252b5132 RH |
6774 | choke me |
6775 | #else | |
2299a76d DJ |
6776 | char (*f) () = $ac_func; |
6777 | #endif | |
6778 | #ifdef __cplusplus | |
6779 | } | |
252b5132 RH |
6780 | #endif |
6781 | ||
2299a76d DJ |
6782 | int |
6783 | main () | |
6784 | { | |
6785 | return f != $ac_func; | |
6786 | ; | |
6787 | return 0; | |
6788 | } | |
6789 | _ACEOF | |
6790 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6791 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6792 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6793 | ac_status=$? |
58670637 DD |
6794 | grep -v '^ *+' conftest.er1 >conftest.err |
6795 | rm -f conftest.er1 | |
6796 | cat conftest.err >&5 | |
2299a76d DJ |
6797 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6798 | (exit $ac_status); } && | |
fd7d450d DD |
6799 | { ac_try='test -z "$ac_c_werror_flag" |
6800 | || test ! -s conftest.err' | |
58670637 DD |
6801 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6802 | (eval $ac_try) 2>&5 | |
6803 | ac_status=$? | |
6804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6805 | (exit $ac_status); }; } && | |
6806 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6808 | (eval $ac_try) 2>&5 | |
6809 | ac_status=$? | |
6810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6811 | (exit $ac_status); }; }; then | |
6812 | eval "$as_ac_var=yes" | |
6813 | else | |
6814 | echo "$as_me: failed program was:" >&5 | |
6815 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6816 | ||
6817 | eval "$as_ac_var=no" | |
6818 | fi | |
58670637 DD |
6819 | rm -f conftest.err conftest.$ac_objext \ |
6820 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6821 | fi |
6822 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6823 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6824 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6825 | cat >>confdefs.h <<_ACEOF | |
6826 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6827 | _ACEOF | |
6828 | ||
252b5132 | 6829 | fi |
2299a76d | 6830 | done |
252b5132 | 6831 | |
2299a76d DJ |
6832 | if test "x$ac_cv_func_fork" = xyes; then |
6833 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
6834 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
6835 | if test "${ac_cv_func_fork_works+set}" = set; then | |
6836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6837 | else |
2299a76d DJ |
6838 | if test "$cross_compiling" = yes; then |
6839 | ac_cv_func_fork_works=cross | |
6840 | else | |
6841 | cat >conftest.$ac_ext <<_ACEOF | |
6842 | /* By Ruediger Kuhlmann. */ | |
6843 | #include <sys/types.h> | |
6844 | #if HAVE_UNISTD_H | |
6845 | # include <unistd.h> | |
6846 | #endif | |
6847 | /* Some systems only have a dummy stub for fork() */ | |
6848 | int main () | |
6849 | { | |
58670637 DD |
6850 | if (fork() < 0) |
6851 | exit (1); | |
6852 | exit (0); | |
2299a76d DJ |
6853 | } |
6854 | _ACEOF | |
6855 | rm -f conftest$ac_exeext | |
6856 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6857 | (eval $ac_link) 2>&5 | |
6858 | ac_status=$? | |
6859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6860 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6861 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6862 | (eval $ac_try) 2>&5 | |
6863 | ac_status=$? | |
6864 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6865 | (exit $ac_status); }; }; then | |
6866 | ac_cv_func_fork_works=yes | |
6867 | else | |
6868 | echo "$as_me: program exited with status $ac_status" >&5 | |
6869 | echo "$as_me: failed program was:" >&5 | |
6870 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6871 | ||
6872 | ( exit $ac_status ) | |
6873 | ac_cv_func_fork_works=no | |
6874 | fi | |
58670637 | 6875 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
6876 | fi |
6877 | fi | |
6878 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
6879 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
6880 | ||
6881 | else | |
6882 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6883 | fi | |
6884 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6885 | case $host in | |
6886 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6887 | # Override, as these systems have only a dummy fork() stub | |
6888 | ac_cv_func_fork_works=no | |
6889 | ;; | |
6890 | *) | |
6891 | ac_cv_func_fork_works=yes | |
6892 | ;; | |
6893 | esac | |
6894 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6895 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
252b5132 | 6896 | fi |
252b5132 | 6897 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
2299a76d DJ |
6898 | if test "x$ac_cv_func_vfork" = xyes; then |
6899 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
6900 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
6901 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
6902 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6903 | else |
2299a76d DJ |
6904 | if test "$cross_compiling" = yes; then |
6905 | ac_cv_func_vfork_works=cross | |
6906 | else | |
6907 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6908 | /* confdefs.h. */ |
6909 | _ACEOF | |
6910 | cat confdefs.h >>conftest.$ac_ext | |
6911 | cat >>conftest.$ac_ext <<_ACEOF | |
6912 | /* end confdefs.h. */ | |
252b5132 RH |
6913 | /* Thanks to Paul Eggert for this test. */ |
6914 | #include <stdio.h> | |
2299a76d | 6915 | #include <stdlib.h> |
252b5132 RH |
6916 | #include <sys/types.h> |
6917 | #include <sys/stat.h> | |
2299a76d DJ |
6918 | #include <sys/wait.h> |
6919 | #if HAVE_UNISTD_H | |
6920 | # include <unistd.h> | |
252b5132 | 6921 | #endif |
2299a76d DJ |
6922 | #if HAVE_VFORK_H |
6923 | # include <vfork.h> | |
252b5132 RH |
6924 | #endif |
6925 | /* On some sparc systems, changes by the child to local and incoming | |
2299a76d DJ |
6926 | argument registers are propagated back to the parent. The compiler |
6927 | is told about this with #include <vfork.h>, but some compilers | |
6928 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6929 | static variable whose address is put into a register that is | |
6930 | clobbered by the vfork. */ | |
6931 | static void | |
252b5132 RH |
6932 | #ifdef __cplusplus |
6933 | sparc_address_test (int arg) | |
2299a76d | 6934 | # else |
252b5132 RH |
6935 | sparc_address_test (arg) int arg; |
6936 | #endif | |
6937 | { | |
6938 | static pid_t child; | |
6939 | if (!child) { | |
6940 | child = vfork (); | |
6941 | if (child < 0) { | |
6942 | perror ("vfork"); | |
6943 | _exit(2); | |
6944 | } | |
6945 | if (!child) { | |
6946 | arg = getpid(); | |
6947 | write(-1, "", 0); | |
6948 | _exit (arg); | |
6949 | } | |
6950 | } | |
6951 | } | |
2299a76d DJ |
6952 | |
6953 | int | |
6954 | main () | |
6955 | { | |
252b5132 RH |
6956 | pid_t parent = getpid (); |
6957 | pid_t child; | |
6958 | ||
2299a76d | 6959 | sparc_address_test (0); |
252b5132 RH |
6960 | |
6961 | child = vfork (); | |
6962 | ||
6963 | if (child == 0) { | |
2299a76d DJ |
6964 | /* Here is another test for sparc vfork register problems. This |
6965 | test uses lots of local variables, at least as many local | |
6966 | variables as main has allocated so far including compiler | |
6967 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
6968 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
6969 | reuse the register of parent for one of the local variables, | |
6970 | since it will think that parent can't possibly be used any more | |
6971 | in this routine. Assigning to the local variable will thus | |
6972 | munge parent in the parent process. */ | |
252b5132 RH |
6973 | pid_t |
6974 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6975 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6976 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6977 | use the same hardware register for all 8 local variables. */ | |
6978 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6979 | || p != p5 || p != p6 || p != p7) | |
6980 | _exit(1); | |
6981 | ||
2299a76d DJ |
6982 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
6983 | from child file descriptors. If the child closes a descriptor | |
6984 | before it execs or exits, this munges the parent's descriptor | |
6985 | as well. Test for this by closing stdout in the child. */ | |
252b5132 RH |
6986 | _exit(close(fileno(stdout)) != 0); |
6987 | } else { | |
6988 | int status; | |
6989 | struct stat st; | |
6990 | ||
6991 | while (wait(&status) != child) | |
6992 | ; | |
6993 | exit( | |
6994 | /* Was there some problem with vforking? */ | |
6995 | child < 0 | |
6996 | ||
6997 | /* Did the child fail? (This shouldn't happen.) */ | |
6998 | || status | |
6999 | ||
7000 | /* Did the vfork/compiler bug occur? */ | |
7001 | || parent != getpid() | |
7002 | ||
7003 | /* Did the file descriptor bug occur? */ | |
7004 | || fstat(fileno(stdout), &st) != 0 | |
7005 | ); | |
7006 | } | |
7007 | } | |
2299a76d DJ |
7008 | _ACEOF |
7009 | rm -f conftest$ac_exeext | |
7010 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7011 | (eval $ac_link) 2>&5 | |
7012 | ac_status=$? | |
7013 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7014 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7016 | (eval $ac_try) 2>&5 | |
7017 | ac_status=$? | |
7018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7019 | (exit $ac_status); }; }; then | |
252b5132 RH |
7020 | ac_cv_func_vfork_works=yes |
7021 | else | |
2299a76d DJ |
7022 | echo "$as_me: program exited with status $ac_status" >&5 |
7023 | echo "$as_me: failed program was:" >&5 | |
7024 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7025 | ||
7026 | ( exit $ac_status ) | |
7027 | ac_cv_func_vfork_works=no | |
7028 | fi | |
58670637 | 7029 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
252b5132 | 7030 | fi |
252b5132 | 7031 | fi |
2299a76d DJ |
7032 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
7033 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
252b5132 | 7034 | |
2299a76d DJ |
7035 | fi; |
7036 | if test "x$ac_cv_func_fork_works" = xcross; then | |
58670637 | 7037 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
2299a76d DJ |
7038 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
7039 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
252b5132 RH |
7040 | fi |
7041 | ||
2299a76d DJ |
7042 | if test "x$ac_cv_func_vfork_works" = xyes; then |
7043 | ||
7044 | cat >>confdefs.h <<\_ACEOF | |
7045 | #define HAVE_WORKING_VFORK 1 | |
7046 | _ACEOF | |
7047 | ||
7048 | else | |
7049 | ||
7050 | cat >>confdefs.h <<\_ACEOF | |
252b5132 | 7051 | #define vfork fork |
2299a76d DJ |
7052 | _ACEOF |
7053 | ||
7054 | fi | |
7055 | if test "x$ac_cv_func_fork_works" = xyes; then | |
7056 | ||
7057 | cat >>confdefs.h <<\_ACEOF | |
7058 | #define HAVE_WORKING_FORK 1 | |
7059 | _ACEOF | |
252b5132 RH |
7060 | |
7061 | fi | |
7062 | ||
7063 | if test $ac_cv_func_vfork_works = no; then | |
58670637 DD |
7064 | case $LIBOBJS in |
7065 | "vfork.$ac_objext" | \ | |
7066 | *" vfork.$ac_objext" | \ | |
7067 | "vfork.$ac_objext "* | \ | |
7068 | *" vfork.$ac_objext "* ) ;; | |
7069 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;; | |
7070 | esac | |
7071 | ||
252b5132 | 7072 | fi |
24acd898 DD |
7073 | # We only need _doprnt if we might use it to implement v*printf. |
7074 | if test $ac_cv_func_vprintf != yes \ | |
7075 | || test $ac_cv_func_vfprintf != yes \ | |
7076 | || test $ac_cv_func_vsprintf != yes; then | |
2299a76d DJ |
7077 | |
7078 | for ac_func in _doprnt | |
24acd898 | 7079 | do |
2299a76d DJ |
7080 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
7081 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7082 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7083 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7084 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7085 | else | |
7086 | if test x$gcc_no_link = xyes; then | |
7087 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
7088 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
7089 | { (exit 1); exit 1; }; } | |
7090 | fi | |
7091 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7092 | /* confdefs.h. */ |
7093 | _ACEOF | |
7094 | cat confdefs.h >>conftest.$ac_ext | |
7095 | cat >>conftest.$ac_ext <<_ACEOF | |
7096 | /* end confdefs.h. */ | |
24acd898 | 7097 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
7098 | which can conflict with char $ac_func (); below. |
7099 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
7100 | <limits.h> exists even on freestanding compilers. Under hpux, |
7101 | including <limits.h> includes <sys/time.h> and causes problems | |
7102 | checking for functions defined therein. */ | |
7103 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
7104 | # include <limits.h> |
7105 | #else | |
7106 | # include <assert.h> | |
7107 | #endif | |
24acd898 | 7108 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
7109 | #ifdef __cplusplus |
7110 | extern "C" | |
7111 | { | |
7112 | #endif | |
24acd898 | 7113 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
7114 | builtin and then its argument prototype would still apply. */ |
7115 | char $ac_func (); | |
24acd898 DD |
7116 | /* The GNU C library defines this for functions which it implements |
7117 | to always fail with ENOSYS. Some functions are actually named | |
7118 | something starting with __ and the normal name is an alias. */ | |
7119 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7120 | choke me | |
7121 | #else | |
2299a76d DJ |
7122 | char (*f) () = $ac_func; |
7123 | #endif | |
7124 | #ifdef __cplusplus | |
7125 | } | |
24acd898 DD |
7126 | #endif |
7127 | ||
2299a76d DJ |
7128 | int |
7129 | main () | |
7130 | { | |
7131 | return f != $ac_func; | |
7132 | ; | |
7133 | return 0; | |
7134 | } | |
7135 | _ACEOF | |
7136 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7137 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 7138 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 7139 | ac_status=$? |
58670637 DD |
7140 | grep -v '^ *+' conftest.er1 >conftest.err |
7141 | rm -f conftest.er1 | |
7142 | cat conftest.err >&5 | |
2299a76d DJ |
7143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7144 | (exit $ac_status); } && | |
fd7d450d DD |
7145 | { ac_try='test -z "$ac_c_werror_flag" |
7146 | || test ! -s conftest.err' | |
58670637 DD |
7147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7148 | (eval $ac_try) 2>&5 | |
7149 | ac_status=$? | |
7150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7151 | (exit $ac_status); }; } && | |
7152 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
7153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7154 | (eval $ac_try) 2>&5 | |
7155 | ac_status=$? | |
7156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7157 | (exit $ac_status); }; }; then | |
7158 | eval "$as_ac_var=yes" | |
7159 | else | |
7160 | echo "$as_me: failed program was:" >&5 | |
7161 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7162 | ||
7163 | eval "$as_ac_var=no" | |
7164 | fi | |
58670637 DD |
7165 | rm -f conftest.err conftest.$ac_objext \ |
7166 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
7167 | fi |
7168 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7169 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7170 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7171 | cat >>confdefs.h <<_ACEOF | |
7172 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7173 | _ACEOF | |
7174 | ||
7175 | else | |
58670637 DD |
7176 | case $LIBOBJS in |
7177 | "$ac_func.$ac_objext" | \ | |
7178 | *" $ac_func.$ac_objext" | \ | |
7179 | "$ac_func.$ac_objext "* | \ | |
7180 | *" $ac_func.$ac_objext "* ) ;; | |
7181 | *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; | |
7182 | esac | |
7183 | ||
24acd898 DD |
7184 | fi |
7185 | done | |
7186 | ||
7187 | ||
cc096b71 | 7188 | else |
2299a76d DJ |
7189 | |
7190 | for ac_func in _doprnt | |
cc096b71 | 7191 | do |
2299a76d DJ |
7192 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
7193 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7194 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7195 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7196 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7197 | else | |
7198 | if test x$gcc_no_link = xyes; then | |
7199 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
7200 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
7201 | { (exit 1); exit 1; }; } | |
7202 | fi | |
7203 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7204 | /* confdefs.h. */ |
7205 | _ACEOF | |
7206 | cat confdefs.h >>conftest.$ac_ext | |
7207 | cat >>conftest.$ac_ext <<_ACEOF | |
7208 | /* end confdefs.h. */ | |
cc096b71 | 7209 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
7210 | which can conflict with char $ac_func (); below. |
7211 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
7212 | <limits.h> exists even on freestanding compilers. Under hpux, |
7213 | including <limits.h> includes <sys/time.h> and causes problems | |
7214 | checking for functions defined therein. */ | |
7215 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
7216 | # include <limits.h> |
7217 | #else | |
7218 | # include <assert.h> | |
7219 | #endif | |
cc096b71 | 7220 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
7221 | #ifdef __cplusplus |
7222 | extern "C" | |
7223 | { | |
7224 | #endif | |
cc096b71 | 7225 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
7226 | builtin and then its argument prototype would still apply. */ |
7227 | char $ac_func (); | |
cc096b71 DD |
7228 | /* The GNU C library defines this for functions which it implements |
7229 | to always fail with ENOSYS. Some functions are actually named | |
7230 | something starting with __ and the normal name is an alias. */ | |
7231 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7232 | choke me | |
7233 | #else | |
2299a76d DJ |
7234 | char (*f) () = $ac_func; |
7235 | #endif | |
7236 | #ifdef __cplusplus | |
7237 | } | |
cc096b71 DD |
7238 | #endif |
7239 | ||
2299a76d DJ |
7240 | int |
7241 | main () | |
7242 | { | |
7243 | return f != $ac_func; | |
7244 | ; | |
7245 | return 0; | |
7246 | } | |
7247 | _ACEOF | |
7248 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7249 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 7250 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 7251 | ac_status=$? |
58670637 DD |
7252 | grep -v '^ *+' conftest.er1 >conftest.err |
7253 | rm -f conftest.er1 | |
7254 | cat conftest.err >&5 | |
2299a76d DJ |
7255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7256 | (exit $ac_status); } && | |
fd7d450d DD |
7257 | { ac_try='test -z "$ac_c_werror_flag" |
7258 | || test ! -s conftest.err' | |
58670637 DD |
7259 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7260 | (eval $ac_try) 2>&5 | |
7261 | ac_status=$? | |
7262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7263 | (exit $ac_status); }; } && | |
7264 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
7265 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7266 | (eval $ac_try) 2>&5 | |
7267 | ac_status=$? | |
7268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7269 | (exit $ac_status); }; }; then | |
7270 | eval "$as_ac_var=yes" | |
7271 | else | |
7272 | echo "$as_me: failed program was:" >&5 | |
7273 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7274 | ||
7275 | eval "$as_ac_var=no" | |
7276 | fi | |
58670637 DD |
7277 | rm -f conftest.err conftest.$ac_objext \ |
7278 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
7279 | fi |
7280 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7281 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7282 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7283 | cat >>confdefs.h <<_ACEOF | |
7284 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7285 | _ACEOF | |
cc096b71 | 7286 | |
cc096b71 DD |
7287 | fi |
7288 | done | |
7289 | ||
24acd898 DD |
7290 | fi |
7291 | ||
252b5132 | 7292 | for v in $vars; do |
2299a76d DJ |
7293 | echo "$as_me:$LINENO: checking for $v" >&5 |
7294 | echo $ECHO_N "checking for $v... $ECHO_C" >&6 | |
7295 | if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then | |
7296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7297 | else | |
7298 | if test x$gcc_no_link = xyes; then | |
7299 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
7300 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
7301 | { (exit 1); exit 1; }; } | |
7302 | fi | |
7303 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7304 | /* confdefs.h. */ |
7305 | _ACEOF | |
7306 | cat confdefs.h >>conftest.$ac_ext | |
7307 | cat >>conftest.$ac_ext <<_ACEOF | |
7308 | /* end confdefs.h. */ | |
252b5132 | 7309 | int *p; |
2299a76d DJ |
7310 | int |
7311 | main () | |
7312 | { | |
18893690 | 7313 | extern int $v []; p = $v; |
2299a76d DJ |
7314 | ; |
7315 | return 0; | |
7316 | } | |
7317 | _ACEOF | |
7318 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7319 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 7320 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 7321 | ac_status=$? |
58670637 DD |
7322 | grep -v '^ *+' conftest.er1 >conftest.err |
7323 | rm -f conftest.er1 | |
7324 | cat conftest.err >&5 | |
2299a76d DJ |
7325 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7326 | (exit $ac_status); } && | |
fd7d450d DD |
7327 | { ac_try='test -z "$ac_c_werror_flag" |
7328 | || test ! -s conftest.err' | |
58670637 DD |
7329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7330 | (eval $ac_try) 2>&5 | |
7331 | ac_status=$? | |
7332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7333 | (exit $ac_status); }; } && | |
7334 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
7335 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7336 | (eval $ac_try) 2>&5 | |
7337 | ac_status=$? | |
7338 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7339 | (exit $ac_status); }; }; then | |
252b5132 RH |
7340 | eval "libiberty_cv_var_$v=yes" |
7341 | else | |
2299a76d DJ |
7342 | echo "$as_me: failed program was:" >&5 |
7343 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7344 | ||
7345 | eval "libiberty_cv_var_$v=no" | |
252b5132 | 7346 | fi |
58670637 DD |
7347 | rm -f conftest.err conftest.$ac_objext \ |
7348 | conftest$ac_exeext conftest.$ac_ext | |
252b5132 RH |
7349 | fi |
7350 | ||
7351 | if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then | |
2299a76d DJ |
7352 | echo "$as_me:$LINENO: result: yes" >&5 |
7353 | echo "${ECHO_T}yes" >&6 | |
252b5132 | 7354 | n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
2299a76d | 7355 | cat >>confdefs.h <<_ACEOF |
252b5132 | 7356 | #define $n 1 |
2299a76d | 7357 | _ACEOF |
252b5132 RH |
7358 | |
7359 | else | |
2299a76d DJ |
7360 | echo "$as_me:$LINENO: result: no" >&5 |
7361 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
7362 | fi |
7363 | done | |
e69f6c8c DD |
7364 | |
7365 | # special check for _system_configuration because AIX <4.3.2 do not | |
7366 | # contain the `physmem' member. | |
2299a76d DJ |
7367 | echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5 |
7368 | echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6 | |
7369 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7370 | /* confdefs.h. */ |
7371 | _ACEOF | |
7372 | cat confdefs.h >>conftest.$ac_ext | |
7373 | cat >>conftest.$ac_ext <<_ACEOF | |
7374 | /* end confdefs.h. */ | |
e69f6c8c | 7375 | #include <sys/systemcfg.h> |
2299a76d DJ |
7376 | int |
7377 | main () | |
7378 | { | |
e69f6c8c | 7379 | double x = _system_configuration.physmem; |
2299a76d DJ |
7380 | ; |
7381 | return 0; | |
7382 | } | |
7383 | _ACEOF | |
7384 | rm -f conftest.$ac_objext | |
7385 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 7386 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 7387 | ac_status=$? |
58670637 DD |
7388 | grep -v '^ *+' conftest.er1 >conftest.err |
7389 | rm -f conftest.er1 | |
7390 | cat conftest.err >&5 | |
2299a76d DJ |
7391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7392 | (exit $ac_status); } && | |
fd7d450d DD |
7393 | { ac_try='test -z "$ac_c_werror_flag" |
7394 | || test ! -s conftest.err' | |
58670637 DD |
7395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7396 | (eval $ac_try) 2>&5 | |
7397 | ac_status=$? | |
7398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7399 | (exit $ac_status); }; } && | |
7400 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
7401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7402 | (eval $ac_try) 2>&5 | |
7403 | ac_status=$? | |
7404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7405 | (exit $ac_status); }; }; then | |
7406 | echo "$as_me:$LINENO: result: yes" >&5 | |
7407 | echo "${ECHO_T}yes" >&6 | |
7408 | ||
7409 | cat >>confdefs.h <<\_ACEOF | |
e69f6c8c | 7410 | #define HAVE__SYSTEM_CONFIGURATION 1 |
2299a76d | 7411 | _ACEOF |
e69f6c8c DD |
7412 | |
7413 | else | |
2299a76d DJ |
7414 | echo "$as_me: failed program was:" >&5 |
7415 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7416 | ||
7417 | echo "$as_me:$LINENO: result: no" >&5 | |
7418 | echo "${ECHO_T}no" >&6 | |
e69f6c8c | 7419 | fi |
58670637 | 7420 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 7421 | |
e69f6c8c | 7422 | |
2299a76d | 7423 | for ac_func in $checkfuncs |
252b5132 | 7424 | do |
2299a76d DJ |
7425 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
7426 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7427 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7428 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7429 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7430 | else | |
7431 | if test x$gcc_no_link = xyes; then | |
7432 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
7433 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
7434 | { (exit 1); exit 1; }; } | |
7435 | fi | |
7436 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7437 | /* confdefs.h. */ |
7438 | _ACEOF | |
7439 | cat confdefs.h >>conftest.$ac_ext | |
7440 | cat >>conftest.$ac_ext <<_ACEOF | |
7441 | /* end confdefs.h. */ | |
eb383413 | 7442 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
7443 | which can conflict with char $ac_func (); below. |
7444 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
7445 | <limits.h> exists even on freestanding compilers. Under hpux, |
7446 | including <limits.h> includes <sys/time.h> and causes problems | |
7447 | checking for functions defined therein. */ | |
7448 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
7449 | # include <limits.h> |
7450 | #else | |
7451 | # include <assert.h> | |
7452 | #endif | |
eb383413 | 7453 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
7454 | #ifdef __cplusplus |
7455 | extern "C" | |
7456 | { | |
7457 | #endif | |
eb383413 | 7458 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
7459 | builtin and then its argument prototype would still apply. */ |
7460 | char $ac_func (); | |
eb383413 L |
7461 | /* The GNU C library defines this for functions which it implements |
7462 | to always fail with ENOSYS. Some functions are actually named | |
7463 | something starting with __ and the normal name is an alias. */ | |
7464 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7465 | choke me | |
7466 | #else | |
2299a76d DJ |
7467 | char (*f) () = $ac_func; |
7468 | #endif | |
7469 | #ifdef __cplusplus | |
7470 | } | |
eb383413 L |
7471 | #endif |
7472 | ||
2299a76d DJ |
7473 | int |
7474 | main () | |
7475 | { | |
7476 | return f != $ac_func; | |
7477 | ; | |
7478 | return 0; | |
7479 | } | |
7480 | _ACEOF | |
7481 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7482 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 7483 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 7484 | ac_status=$? |
58670637 DD |
7485 | grep -v '^ *+' conftest.er1 >conftest.err |
7486 | rm -f conftest.er1 | |
7487 | cat conftest.err >&5 | |
2299a76d DJ |
7488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7489 | (exit $ac_status); } && | |
fd7d450d DD |
7490 | { ac_try='test -z "$ac_c_werror_flag" |
7491 | || test ! -s conftest.err' | |
58670637 DD |
7492 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7493 | (eval $ac_try) 2>&5 | |
7494 | ac_status=$? | |
7495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7496 | (exit $ac_status); }; } && | |
7497 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
7498 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7499 | (eval $ac_try) 2>&5 | |
7500 | ac_status=$? | |
7501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7502 | (exit $ac_status); }; }; then | |
7503 | eval "$as_ac_var=yes" | |
7504 | else | |
7505 | echo "$as_me: failed program was:" >&5 | |
7506 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7507 | ||
7508 | eval "$as_ac_var=no" | |
7509 | fi | |
58670637 DD |
7510 | rm -f conftest.err conftest.$ac_objext \ |
7511 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
7512 | fi |
7513 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7514 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7515 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7516 | cat >>confdefs.h <<_ACEOF | |
7517 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7518 | _ACEOF | |
eb383413 | 7519 | |
eb383413 L |
7520 | fi |
7521 | done | |
7522 | ||
fa99459d DD |
7523 | echo "$as_me:$LINENO: checking whether basename is declared" >&5 |
7524 | echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 | |
7525 | if test "${ac_cv_have_decl_basename+set}" = set; then | |
7526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7527 | else | |
7528 | cat >conftest.$ac_ext <<_ACEOF | |
7529 | /* confdefs.h. */ | |
7530 | _ACEOF | |
7531 | cat confdefs.h >>conftest.$ac_ext | |
7532 | cat >>conftest.$ac_ext <<_ACEOF | |
7533 | /* end confdefs.h. */ | |
7534 | $ac_includes_default | |
7535 | int | |
7536 | main () | |
7537 | { | |
7538 | #ifndef basename | |
7539 | char *p = (char *) basename; | |
7540 | #endif | |
7541 | ||
7542 | ; | |
7543 | return 0; | |
7544 | } | |
7545 | _ACEOF | |
7546 | rm -f conftest.$ac_objext | |
7547 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7548 | (eval $ac_compile) 2>conftest.er1 | |
7549 | ac_status=$? | |
7550 | grep -v '^ *+' conftest.er1 >conftest.err | |
7551 | rm -f conftest.er1 | |
7552 | cat conftest.err >&5 | |
7553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7554 | (exit $ac_status); } && | |
fd7d450d DD |
7555 | { ac_try='test -z "$ac_c_werror_flag" |
7556 | || test ! -s conftest.err' | |
fa99459d DD |
7557 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7558 | (eval $ac_try) 2>&5 | |
7559 | ac_status=$? | |
7560 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7561 | (exit $ac_status); }; } && | |
7562 | { ac_try='test -s conftest.$ac_objext' | |
7563 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7564 | (eval $ac_try) 2>&5 | |
7565 | ac_status=$? | |
7566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7567 | (exit $ac_status); }; }; then | |
7568 | ac_cv_have_decl_basename=yes | |
7569 | else | |
7570 | echo "$as_me: failed program was:" >&5 | |
7571 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7572 | ||
7573 | ac_cv_have_decl_basename=no | |
7574 | fi | |
7575 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7576 | fi | |
7577 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 | |
7578 | echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 | |
7579 | if test $ac_cv_have_decl_basename = yes; then | |
7580 | ||
7581 | cat >>confdefs.h <<_ACEOF | |
7582 | #define HAVE_DECL_BASENAME 1 | |
7583 | _ACEOF | |
7584 | ||
7585 | ||
7586 | else | |
7587 | cat >>confdefs.h <<_ACEOF | |
7588 | #define HAVE_DECL_BASENAME 0 | |
7589 | _ACEOF | |
7590 | ||
7591 | ||
7592 | fi | |
7593 | echo "$as_me:$LINENO: checking whether ffs is declared" >&5 | |
7594 | echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6 | |
7595 | if test "${ac_cv_have_decl_ffs+set}" = set; then | |
7596 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7597 | else | |
7598 | cat >conftest.$ac_ext <<_ACEOF | |
7599 | /* confdefs.h. */ | |
7600 | _ACEOF | |
7601 | cat confdefs.h >>conftest.$ac_ext | |
7602 | cat >>conftest.$ac_ext <<_ACEOF | |
7603 | /* end confdefs.h. */ | |
7604 | $ac_includes_default | |
7605 | int | |
7606 | main () | |
7607 | { | |
7608 | #ifndef ffs | |
7609 | char *p = (char *) ffs; | |
7610 | #endif | |
7611 | ||
7612 | ; | |
7613 | return 0; | |
7614 | } | |
7615 | _ACEOF | |
7616 | rm -f conftest.$ac_objext | |
7617 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7618 | (eval $ac_compile) 2>conftest.er1 | |
7619 | ac_status=$? | |
7620 | grep -v '^ *+' conftest.er1 >conftest.err | |
7621 | rm -f conftest.er1 | |
7622 | cat conftest.err >&5 | |
7623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7624 | (exit $ac_status); } && | |
fd7d450d DD |
7625 | { ac_try='test -z "$ac_c_werror_flag" |
7626 | || test ! -s conftest.err' | |
fa99459d DD |
7627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7628 | (eval $ac_try) 2>&5 | |
7629 | ac_status=$? | |
7630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7631 | (exit $ac_status); }; } && | |
7632 | { ac_try='test -s conftest.$ac_objext' | |
7633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7634 | (eval $ac_try) 2>&5 | |
7635 | ac_status=$? | |
7636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7637 | (exit $ac_status); }; }; then | |
7638 | ac_cv_have_decl_ffs=yes | |
7639 | else | |
7640 | echo "$as_me: failed program was:" >&5 | |
7641 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7642 | ||
7643 | ac_cv_have_decl_ffs=no | |
7644 | fi | |
7645 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7646 | fi | |
7647 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5 | |
7648 | echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6 | |
7649 | if test $ac_cv_have_decl_ffs = yes; then | |
7650 | ||
7651 | cat >>confdefs.h <<_ACEOF | |
7652 | #define HAVE_DECL_FFS 1 | |
7653 | _ACEOF | |
7654 | ||
7655 | ||
7656 | else | |
7657 | cat >>confdefs.h <<_ACEOF | |
7658 | #define HAVE_DECL_FFS 0 | |
7659 | _ACEOF | |
7660 | ||
7661 | ||
7662 | fi | |
7663 | echo "$as_me:$LINENO: checking whether asprintf is declared" >&5 | |
7664 | echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6 | |
7665 | if test "${ac_cv_have_decl_asprintf+set}" = set; then | |
7666 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7667 | else | |
7668 | cat >conftest.$ac_ext <<_ACEOF | |
7669 | /* confdefs.h. */ | |
7670 | _ACEOF | |
7671 | cat confdefs.h >>conftest.$ac_ext | |
7672 | cat >>conftest.$ac_ext <<_ACEOF | |
7673 | /* end confdefs.h. */ | |
7674 | $ac_includes_default | |
7675 | int | |
7676 | main () | |
7677 | { | |
7678 | #ifndef asprintf | |
7679 | char *p = (char *) asprintf; | |
7680 | #endif | |
7681 | ||
7682 | ; | |
7683 | return 0; | |
7684 | } | |
7685 | _ACEOF | |
7686 | rm -f conftest.$ac_objext | |
7687 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7688 | (eval $ac_compile) 2>conftest.er1 | |
7689 | ac_status=$? | |
7690 | grep -v '^ *+' conftest.er1 >conftest.err | |
7691 | rm -f conftest.er1 | |
7692 | cat conftest.err >&5 | |
7693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7694 | (exit $ac_status); } && | |
fd7d450d DD |
7695 | { ac_try='test -z "$ac_c_werror_flag" |
7696 | || test ! -s conftest.err' | |
fa99459d DD |
7697 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7698 | (eval $ac_try) 2>&5 | |
7699 | ac_status=$? | |
7700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7701 | (exit $ac_status); }; } && | |
7702 | { ac_try='test -s conftest.$ac_objext' | |
7703 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7704 | (eval $ac_try) 2>&5 | |
7705 | ac_status=$? | |
7706 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7707 | (exit $ac_status); }; }; then | |
7708 | ac_cv_have_decl_asprintf=yes | |
7709 | else | |
7710 | echo "$as_me: failed program was:" >&5 | |
7711 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7712 | ||
7713 | ac_cv_have_decl_asprintf=no | |
7714 | fi | |
7715 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7716 | fi | |
7717 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5 | |
7718 | echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6 | |
7719 | if test $ac_cv_have_decl_asprintf = yes; then | |
7720 | ||
7721 | cat >>confdefs.h <<_ACEOF | |
7722 | #define HAVE_DECL_ASPRINTF 1 | |
7723 | _ACEOF | |
7724 | ||
7725 | ||
7726 | else | |
7727 | cat >>confdefs.h <<_ACEOF | |
7728 | #define HAVE_DECL_ASPRINTF 0 | |
7729 | _ACEOF | |
7730 | ||
7731 | ||
7732 | fi | |
7733 | echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5 | |
7734 | echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6 | |
7735 | if test "${ac_cv_have_decl_vasprintf+set}" = set; then | |
7736 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7737 | else | |
7738 | cat >conftest.$ac_ext <<_ACEOF | |
7739 | /* confdefs.h. */ | |
7740 | _ACEOF | |
7741 | cat confdefs.h >>conftest.$ac_ext | |
7742 | cat >>conftest.$ac_ext <<_ACEOF | |
7743 | /* end confdefs.h. */ | |
7744 | $ac_includes_default | |
7745 | int | |
7746 | main () | |
7747 | { | |
7748 | #ifndef vasprintf | |
7749 | char *p = (char *) vasprintf; | |
7750 | #endif | |
7751 | ||
7752 | ; | |
7753 | return 0; | |
7754 | } | |
7755 | _ACEOF | |
7756 | rm -f conftest.$ac_objext | |
7757 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7758 | (eval $ac_compile) 2>conftest.er1 | |
7759 | ac_status=$? | |
7760 | grep -v '^ *+' conftest.er1 >conftest.err | |
7761 | rm -f conftest.er1 | |
7762 | cat conftest.err >&5 | |
7763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7764 | (exit $ac_status); } && | |
fd7d450d DD |
7765 | { ac_try='test -z "$ac_c_werror_flag" |
7766 | || test ! -s conftest.err' | |
fa99459d DD |
7767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7768 | (eval $ac_try) 2>&5 | |
7769 | ac_status=$? | |
7770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7771 | (exit $ac_status); }; } && | |
7772 | { ac_try='test -s conftest.$ac_objext' | |
7773 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7774 | (eval $ac_try) 2>&5 | |
7775 | ac_status=$? | |
7776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7777 | (exit $ac_status); }; }; then | |
7778 | ac_cv_have_decl_vasprintf=yes | |
7779 | else | |
7780 | echo "$as_me: failed program was:" >&5 | |
7781 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7782 | ||
7783 | ac_cv_have_decl_vasprintf=no | |
7784 | fi | |
7785 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7786 | fi | |
7787 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5 | |
7788 | echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6 | |
7789 | if test $ac_cv_have_decl_vasprintf = yes; then | |
7790 | ||
7791 | cat >>confdefs.h <<_ACEOF | |
7792 | #define HAVE_DECL_VASPRINTF 1 | |
7793 | _ACEOF | |
7794 | ||
7795 | ||
7796 | else | |
7797 | cat >>confdefs.h <<_ACEOF | |
7798 | #define HAVE_DECL_VASPRINTF 0 | |
7799 | _ACEOF | |
7800 | ||
7801 | ||
01e94249 DD |
7802 | fi |
7803 | echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 | |
7804 | echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 | |
7805 | if test "${ac_cv_have_decl_snprintf+set}" = set; then | |
7806 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7807 | else | |
7808 | cat >conftest.$ac_ext <<_ACEOF | |
7809 | /* confdefs.h. */ | |
7810 | _ACEOF | |
7811 | cat confdefs.h >>conftest.$ac_ext | |
7812 | cat >>conftest.$ac_ext <<_ACEOF | |
7813 | /* end confdefs.h. */ | |
7814 | $ac_includes_default | |
7815 | int | |
7816 | main () | |
7817 | { | |
7818 | #ifndef snprintf | |
7819 | char *p = (char *) snprintf; | |
7820 | #endif | |
7821 | ||
7822 | ; | |
7823 | return 0; | |
7824 | } | |
7825 | _ACEOF | |
7826 | rm -f conftest.$ac_objext | |
7827 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7828 | (eval $ac_compile) 2>conftest.er1 | |
7829 | ac_status=$? | |
7830 | grep -v '^ *+' conftest.er1 >conftest.err | |
7831 | rm -f conftest.er1 | |
7832 | cat conftest.err >&5 | |
7833 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7834 | (exit $ac_status); } && | |
fd7d450d DD |
7835 | { ac_try='test -z "$ac_c_werror_flag" |
7836 | || test ! -s conftest.err' | |
01e94249 DD |
7837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7838 | (eval $ac_try) 2>&5 | |
7839 | ac_status=$? | |
7840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7841 | (exit $ac_status); }; } && | |
7842 | { ac_try='test -s conftest.$ac_objext' | |
7843 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7844 | (eval $ac_try) 2>&5 | |
7845 | ac_status=$? | |
7846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7847 | (exit $ac_status); }; }; then | |
7848 | ac_cv_have_decl_snprintf=yes | |
7849 | else | |
7850 | echo "$as_me: failed program was:" >&5 | |
7851 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7852 | ||
7853 | ac_cv_have_decl_snprintf=no | |
7854 | fi | |
7855 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7856 | fi | |
7857 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 | |
7858 | echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 | |
7859 | if test $ac_cv_have_decl_snprintf = yes; then | |
7860 | ||
7861 | cat >>confdefs.h <<_ACEOF | |
7862 | #define HAVE_DECL_SNPRINTF 1 | |
7863 | _ACEOF | |
7864 | ||
7865 | ||
7866 | else | |
7867 | cat >>confdefs.h <<_ACEOF | |
7868 | #define HAVE_DECL_SNPRINTF 0 | |
7869 | _ACEOF | |
7870 | ||
7871 | ||
7872 | fi | |
7873 | echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 | |
7874 | echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 | |
7875 | if test "${ac_cv_have_decl_vsnprintf+set}" = set; then | |
7876 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7877 | else | |
7878 | cat >conftest.$ac_ext <<_ACEOF | |
7879 | /* confdefs.h. */ | |
7880 | _ACEOF | |
7881 | cat confdefs.h >>conftest.$ac_ext | |
7882 | cat >>conftest.$ac_ext <<_ACEOF | |
7883 | /* end confdefs.h. */ | |
7884 | $ac_includes_default | |
7885 | int | |
7886 | main () | |
7887 | { | |
7888 | #ifndef vsnprintf | |
7889 | char *p = (char *) vsnprintf; | |
7890 | #endif | |
7891 | ||
7892 | ; | |
7893 | return 0; | |
7894 | } | |
7895 | _ACEOF | |
7896 | rm -f conftest.$ac_objext | |
7897 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7898 | (eval $ac_compile) 2>conftest.er1 | |
7899 | ac_status=$? | |
7900 | grep -v '^ *+' conftest.er1 >conftest.err | |
7901 | rm -f conftest.er1 | |
7902 | cat conftest.err >&5 | |
7903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7904 | (exit $ac_status); } && | |
fd7d450d DD |
7905 | { ac_try='test -z "$ac_c_werror_flag" |
7906 | || test ! -s conftest.err' | |
01e94249 DD |
7907 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7908 | (eval $ac_try) 2>&5 | |
7909 | ac_status=$? | |
7910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7911 | (exit $ac_status); }; } && | |
7912 | { ac_try='test -s conftest.$ac_objext' | |
7913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7914 | (eval $ac_try) 2>&5 | |
7915 | ac_status=$? | |
7916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7917 | (exit $ac_status); }; }; then | |
7918 | ac_cv_have_decl_vsnprintf=yes | |
7919 | else | |
7920 | echo "$as_me: failed program was:" >&5 | |
7921 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7922 | ||
7923 | ac_cv_have_decl_vsnprintf=no | |
7924 | fi | |
7925 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7926 | fi | |
7927 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 | |
7928 | echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 | |
7929 | if test $ac_cv_have_decl_vsnprintf = yes; then | |
7930 | ||
7931 | cat >>confdefs.h <<_ACEOF | |
7932 | #define HAVE_DECL_VSNPRINTF 1 | |
7933 | _ACEOF | |
7934 | ||
7935 | ||
7936 | else | |
7937 | cat >>confdefs.h <<_ACEOF | |
7938 | #define HAVE_DECL_VSNPRINTF 0 | |
7939 | _ACEOF | |
7940 | ||
7941 | ||
abf6a75b DD |
7942 | fi |
7943 | ||
7944 | ||
7945 | echo "$as_me:$LINENO: checking whether calloc is declared" >&5 | |
7946 | echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6 | |
7947 | if test "${ac_cv_have_decl_calloc+set}" = set; then | |
7948 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7949 | else | |
7950 | cat >conftest.$ac_ext <<_ACEOF | |
7951 | /* confdefs.h. */ | |
7952 | _ACEOF | |
7953 | cat confdefs.h >>conftest.$ac_ext | |
7954 | cat >>conftest.$ac_ext <<_ACEOF | |
7955 | /* end confdefs.h. */ | |
7956 | $ac_includes_default | |
7957 | int | |
7958 | main () | |
7959 | { | |
7960 | #ifndef calloc | |
7961 | char *p = (char *) calloc; | |
7962 | #endif | |
7963 | ||
7964 | ; | |
7965 | return 0; | |
7966 | } | |
7967 | _ACEOF | |
7968 | rm -f conftest.$ac_objext | |
7969 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7970 | (eval $ac_compile) 2>conftest.er1 | |
7971 | ac_status=$? | |
7972 | grep -v '^ *+' conftest.er1 >conftest.err | |
7973 | rm -f conftest.er1 | |
7974 | cat conftest.err >&5 | |
7975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7976 | (exit $ac_status); } && | |
fd7d450d DD |
7977 | { ac_try='test -z "$ac_c_werror_flag" |
7978 | || test ! -s conftest.err' | |
abf6a75b DD |
7979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7980 | (eval $ac_try) 2>&5 | |
7981 | ac_status=$? | |
7982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7983 | (exit $ac_status); }; } && | |
7984 | { ac_try='test -s conftest.$ac_objext' | |
7985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7986 | (eval $ac_try) 2>&5 | |
7987 | ac_status=$? | |
7988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7989 | (exit $ac_status); }; }; then | |
7990 | ac_cv_have_decl_calloc=yes | |
7991 | else | |
7992 | echo "$as_me: failed program was:" >&5 | |
7993 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7994 | ||
7995 | ac_cv_have_decl_calloc=no | |
7996 | fi | |
7997 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7998 | fi | |
7999 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5 | |
8000 | echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6 | |
8001 | if test $ac_cv_have_decl_calloc = yes; then | |
8002 | ||
8003 | cat >>confdefs.h <<_ACEOF | |
8004 | #define HAVE_DECL_CALLOC 1 | |
8005 | _ACEOF | |
8006 | ||
8007 | ||
8008 | else | |
8009 | cat >>confdefs.h <<_ACEOF | |
8010 | #define HAVE_DECL_CALLOC 0 | |
8011 | _ACEOF | |
8012 | ||
8013 | ||
8014 | fi | |
8015 | echo "$as_me:$LINENO: checking whether getenv is declared" >&5 | |
8016 | echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6 | |
8017 | if test "${ac_cv_have_decl_getenv+set}" = set; then | |
8018 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8019 | else | |
8020 | cat >conftest.$ac_ext <<_ACEOF | |
8021 | /* confdefs.h. */ | |
8022 | _ACEOF | |
8023 | cat confdefs.h >>conftest.$ac_ext | |
8024 | cat >>conftest.$ac_ext <<_ACEOF | |
8025 | /* end confdefs.h. */ | |
8026 | $ac_includes_default | |
8027 | int | |
8028 | main () | |
8029 | { | |
8030 | #ifndef getenv | |
8031 | char *p = (char *) getenv; | |
8032 | #endif | |
8033 | ||
8034 | ; | |
8035 | return 0; | |
8036 | } | |
8037 | _ACEOF | |
8038 | rm -f conftest.$ac_objext | |
8039 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8040 | (eval $ac_compile) 2>conftest.er1 | |
8041 | ac_status=$? | |
8042 | grep -v '^ *+' conftest.er1 >conftest.err | |
8043 | rm -f conftest.er1 | |
8044 | cat conftest.err >&5 | |
8045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8046 | (exit $ac_status); } && | |
fd7d450d DD |
8047 | { ac_try='test -z "$ac_c_werror_flag" |
8048 | || test ! -s conftest.err' | |
abf6a75b DD |
8049 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8050 | (eval $ac_try) 2>&5 | |
8051 | ac_status=$? | |
8052 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8053 | (exit $ac_status); }; } && | |
8054 | { ac_try='test -s conftest.$ac_objext' | |
8055 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8056 | (eval $ac_try) 2>&5 | |
8057 | ac_status=$? | |
8058 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8059 | (exit $ac_status); }; }; then | |
8060 | ac_cv_have_decl_getenv=yes | |
8061 | else | |
8062 | echo "$as_me: failed program was:" >&5 | |
8063 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8064 | ||
8065 | ac_cv_have_decl_getenv=no | |
8066 | fi | |
8067 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8068 | fi | |
8069 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 | |
8070 | echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6 | |
8071 | if test $ac_cv_have_decl_getenv = yes; then | |
8072 | ||
8073 | cat >>confdefs.h <<_ACEOF | |
8074 | #define HAVE_DECL_GETENV 1 | |
8075 | _ACEOF | |
8076 | ||
8077 | ||
8078 | else | |
8079 | cat >>confdefs.h <<_ACEOF | |
8080 | #define HAVE_DECL_GETENV 0 | |
8081 | _ACEOF | |
8082 | ||
8083 | ||
a4e5c0d8 DD |
8084 | fi |
8085 | echo "$as_me:$LINENO: checking whether getopt is declared" >&5 | |
8086 | echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6 | |
8087 | if test "${ac_cv_have_decl_getopt+set}" = set; then | |
8088 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8089 | else | |
8090 | cat >conftest.$ac_ext <<_ACEOF | |
8091 | /* confdefs.h. */ | |
8092 | _ACEOF | |
8093 | cat confdefs.h >>conftest.$ac_ext | |
8094 | cat >>conftest.$ac_ext <<_ACEOF | |
8095 | /* end confdefs.h. */ | |
8096 | $ac_includes_default | |
8097 | int | |
8098 | main () | |
8099 | { | |
8100 | #ifndef getopt | |
8101 | char *p = (char *) getopt; | |
8102 | #endif | |
8103 | ||
8104 | ; | |
8105 | return 0; | |
8106 | } | |
8107 | _ACEOF | |
8108 | rm -f conftest.$ac_objext | |
8109 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8110 | (eval $ac_compile) 2>conftest.er1 | |
8111 | ac_status=$? | |
8112 | grep -v '^ *+' conftest.er1 >conftest.err | |
8113 | rm -f conftest.er1 | |
8114 | cat conftest.err >&5 | |
8115 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8116 | (exit $ac_status); } && | |
fd7d450d DD |
8117 | { ac_try='test -z "$ac_c_werror_flag" |
8118 | || test ! -s conftest.err' | |
a4e5c0d8 DD |
8119 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8120 | (eval $ac_try) 2>&5 | |
8121 | ac_status=$? | |
8122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8123 | (exit $ac_status); }; } && | |
8124 | { ac_try='test -s conftest.$ac_objext' | |
8125 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8126 | (eval $ac_try) 2>&5 | |
8127 | ac_status=$? | |
8128 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8129 | (exit $ac_status); }; }; then | |
8130 | ac_cv_have_decl_getopt=yes | |
8131 | else | |
8132 | echo "$as_me: failed program was:" >&5 | |
8133 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8134 | ||
8135 | ac_cv_have_decl_getopt=no | |
8136 | fi | |
8137 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8138 | fi | |
8139 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5 | |
8140 | echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6 | |
8141 | if test $ac_cv_have_decl_getopt = yes; then | |
8142 | ||
8143 | cat >>confdefs.h <<_ACEOF | |
8144 | #define HAVE_DECL_GETOPT 1 | |
8145 | _ACEOF | |
8146 | ||
8147 | ||
8148 | else | |
8149 | cat >>confdefs.h <<_ACEOF | |
8150 | #define HAVE_DECL_GETOPT 0 | |
8151 | _ACEOF | |
8152 | ||
8153 | ||
abf6a75b DD |
8154 | fi |
8155 | echo "$as_me:$LINENO: checking whether malloc is declared" >&5 | |
8156 | echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6 | |
8157 | if test "${ac_cv_have_decl_malloc+set}" = set; then | |
8158 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8159 | else | |
8160 | cat >conftest.$ac_ext <<_ACEOF | |
8161 | /* confdefs.h. */ | |
8162 | _ACEOF | |
8163 | cat confdefs.h >>conftest.$ac_ext | |
8164 | cat >>conftest.$ac_ext <<_ACEOF | |
8165 | /* end confdefs.h. */ | |
8166 | $ac_includes_default | |
8167 | int | |
8168 | main () | |
8169 | { | |
8170 | #ifndef malloc | |
8171 | char *p = (char *) malloc; | |
8172 | #endif | |
8173 | ||
8174 | ; | |
8175 | return 0; | |
8176 | } | |
8177 | _ACEOF | |
8178 | rm -f conftest.$ac_objext | |
8179 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8180 | (eval $ac_compile) 2>conftest.er1 | |
8181 | ac_status=$? | |
8182 | grep -v '^ *+' conftest.er1 >conftest.err | |
8183 | rm -f conftest.er1 | |
8184 | cat conftest.err >&5 | |
8185 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8186 | (exit $ac_status); } && | |
fd7d450d DD |
8187 | { ac_try='test -z "$ac_c_werror_flag" |
8188 | || test ! -s conftest.err' | |
abf6a75b DD |
8189 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8190 | (eval $ac_try) 2>&5 | |
8191 | ac_status=$? | |
8192 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8193 | (exit $ac_status); }; } && | |
8194 | { ac_try='test -s conftest.$ac_objext' | |
8195 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8196 | (eval $ac_try) 2>&5 | |
8197 | ac_status=$? | |
8198 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8199 | (exit $ac_status); }; }; then | |
8200 | ac_cv_have_decl_malloc=yes | |
8201 | else | |
8202 | echo "$as_me: failed program was:" >&5 | |
8203 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8204 | ||
8205 | ac_cv_have_decl_malloc=no | |
8206 | fi | |
8207 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8208 | fi | |
8209 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5 | |
8210 | echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6 | |
8211 | if test $ac_cv_have_decl_malloc = yes; then | |
8212 | ||
8213 | cat >>confdefs.h <<_ACEOF | |
8214 | #define HAVE_DECL_MALLOC 1 | |
8215 | _ACEOF | |
8216 | ||
8217 | ||
8218 | else | |
8219 | cat >>confdefs.h <<_ACEOF | |
8220 | #define HAVE_DECL_MALLOC 0 | |
8221 | _ACEOF | |
8222 | ||
8223 | ||
8224 | fi | |
8225 | echo "$as_me:$LINENO: checking whether realloc is declared" >&5 | |
8226 | echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6 | |
8227 | if test "${ac_cv_have_decl_realloc+set}" = set; then | |
8228 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8229 | else | |
8230 | cat >conftest.$ac_ext <<_ACEOF | |
8231 | /* confdefs.h. */ | |
8232 | _ACEOF | |
8233 | cat confdefs.h >>conftest.$ac_ext | |
8234 | cat >>conftest.$ac_ext <<_ACEOF | |
8235 | /* end confdefs.h. */ | |
8236 | $ac_includes_default | |
8237 | int | |
8238 | main () | |
8239 | { | |
8240 | #ifndef realloc | |
8241 | char *p = (char *) realloc; | |
8242 | #endif | |
8243 | ||
8244 | ; | |
8245 | return 0; | |
8246 | } | |
8247 | _ACEOF | |
8248 | rm -f conftest.$ac_objext | |
8249 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8250 | (eval $ac_compile) 2>conftest.er1 | |
8251 | ac_status=$? | |
8252 | grep -v '^ *+' conftest.er1 >conftest.err | |
8253 | rm -f conftest.er1 | |
8254 | cat conftest.err >&5 | |
8255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8256 | (exit $ac_status); } && | |
fd7d450d DD |
8257 | { ac_try='test -z "$ac_c_werror_flag" |
8258 | || test ! -s conftest.err' | |
abf6a75b DD |
8259 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8260 | (eval $ac_try) 2>&5 | |
8261 | ac_status=$? | |
8262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8263 | (exit $ac_status); }; } && | |
8264 | { ac_try='test -s conftest.$ac_objext' | |
8265 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8266 | (eval $ac_try) 2>&5 | |
8267 | ac_status=$? | |
8268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8269 | (exit $ac_status); }; }; then | |
8270 | ac_cv_have_decl_realloc=yes | |
8271 | else | |
8272 | echo "$as_me: failed program was:" >&5 | |
8273 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8274 | ||
8275 | ac_cv_have_decl_realloc=no | |
8276 | fi | |
8277 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8278 | fi | |
8279 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5 | |
8280 | echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6 | |
8281 | if test $ac_cv_have_decl_realloc = yes; then | |
8282 | ||
8283 | cat >>confdefs.h <<_ACEOF | |
8284 | #define HAVE_DECL_REALLOC 1 | |
8285 | _ACEOF | |
8286 | ||
8287 | ||
8288 | else | |
8289 | cat >>confdefs.h <<_ACEOF | |
8290 | #define HAVE_DECL_REALLOC 0 | |
8291 | _ACEOF | |
8292 | ||
8293 | ||
8294 | fi | |
8295 | echo "$as_me:$LINENO: checking whether sbrk is declared" >&5 | |
8296 | echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6 | |
8297 | if test "${ac_cv_have_decl_sbrk+set}" = set; then | |
8298 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8299 | else | |
8300 | cat >conftest.$ac_ext <<_ACEOF | |
8301 | /* confdefs.h. */ | |
8302 | _ACEOF | |
8303 | cat confdefs.h >>conftest.$ac_ext | |
8304 | cat >>conftest.$ac_ext <<_ACEOF | |
8305 | /* end confdefs.h. */ | |
8306 | $ac_includes_default | |
8307 | int | |
8308 | main () | |
8309 | { | |
8310 | #ifndef sbrk | |
8311 | char *p = (char *) sbrk; | |
8312 | #endif | |
8313 | ||
8314 | ; | |
8315 | return 0; | |
8316 | } | |
8317 | _ACEOF | |
8318 | rm -f conftest.$ac_objext | |
8319 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8320 | (eval $ac_compile) 2>conftest.er1 | |
8321 | ac_status=$? | |
8322 | grep -v '^ *+' conftest.er1 >conftest.err | |
8323 | rm -f conftest.er1 | |
8324 | cat conftest.err >&5 | |
8325 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8326 | (exit $ac_status); } && | |
fd7d450d DD |
8327 | { ac_try='test -z "$ac_c_werror_flag" |
8328 | || test ! -s conftest.err' | |
abf6a75b DD |
8329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8330 | (eval $ac_try) 2>&5 | |
8331 | ac_status=$? | |
8332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8333 | (exit $ac_status); }; } && | |
8334 | { ac_try='test -s conftest.$ac_objext' | |
8335 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8336 | (eval $ac_try) 2>&5 | |
8337 | ac_status=$? | |
8338 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8339 | (exit $ac_status); }; }; then | |
8340 | ac_cv_have_decl_sbrk=yes | |
8341 | else | |
8342 | echo "$as_me: failed program was:" >&5 | |
8343 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8344 | ||
8345 | ac_cv_have_decl_sbrk=no | |
8346 | fi | |
8347 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8348 | fi | |
8349 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5 | |
8350 | echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6 | |
8351 | if test $ac_cv_have_decl_sbrk = yes; then | |
8352 | ||
8353 | cat >>confdefs.h <<_ACEOF | |
8354 | #define HAVE_DECL_SBRK 1 | |
8355 | _ACEOF | |
8356 | ||
8357 | ||
8358 | else | |
8359 | cat >>confdefs.h <<_ACEOF | |
8360 | #define HAVE_DECL_SBRK 0 | |
8361 | _ACEOF | |
8362 | ||
8363 | ||
67f3cb05 GK |
8364 | fi |
8365 | ||
8366 | ||
8367 | echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5 | |
8368 | echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6 | |
8369 | if test "${ac_cv_have_decl_strverscmp+set}" = set; then | |
8370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8371 | else | |
8372 | cat >conftest.$ac_ext <<_ACEOF | |
8373 | /* confdefs.h. */ | |
8374 | _ACEOF | |
8375 | cat confdefs.h >>conftest.$ac_ext | |
8376 | cat >>conftest.$ac_ext <<_ACEOF | |
8377 | /* end confdefs.h. */ | |
8378 | $ac_includes_default | |
8379 | int | |
8380 | main () | |
8381 | { | |
8382 | #ifndef strverscmp | |
8383 | char *p = (char *) strverscmp; | |
8384 | #endif | |
8385 | ||
8386 | ; | |
8387 | return 0; | |
8388 | } | |
8389 | _ACEOF | |
8390 | rm -f conftest.$ac_objext | |
8391 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8392 | (eval $ac_compile) 2>conftest.er1 | |
8393 | ac_status=$? | |
8394 | grep -v '^ *+' conftest.er1 >conftest.err | |
8395 | rm -f conftest.er1 | |
8396 | cat conftest.err >&5 | |
8397 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8398 | (exit $ac_status); } && | |
fd7d450d DD |
8399 | { ac_try='test -z "$ac_c_werror_flag" |
8400 | || test ! -s conftest.err' | |
67f3cb05 GK |
8401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8402 | (eval $ac_try) 2>&5 | |
8403 | ac_status=$? | |
8404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8405 | (exit $ac_status); }; } && | |
8406 | { ac_try='test -s conftest.$ac_objext' | |
8407 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8408 | (eval $ac_try) 2>&5 | |
8409 | ac_status=$? | |
8410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8411 | (exit $ac_status); }; }; then | |
8412 | ac_cv_have_decl_strverscmp=yes | |
8413 | else | |
8414 | echo "$as_me: failed program was:" >&5 | |
8415 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8416 | ||
8417 | ac_cv_have_decl_strverscmp=no | |
8418 | fi | |
8419 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8420 | fi | |
8421 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5 | |
8422 | echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6 | |
8423 | if test $ac_cv_have_decl_strverscmp = yes; then | |
8424 | ||
8425 | cat >>confdefs.h <<_ACEOF | |
8426 | #define HAVE_DECL_STRVERSCMP 1 | |
8427 | _ACEOF | |
8428 | ||
8429 | ||
8430 | else | |
8431 | cat >>confdefs.h <<_ACEOF | |
8432 | #define HAVE_DECL_STRVERSCMP 0 | |
8433 | _ACEOF | |
8434 | ||
8435 | ||
fa99459d DD |
8436 | fi |
8437 | ||
8438 | ||
2299a76d DJ |
8439 | echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5 |
8440 | echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6 | |
8441 | if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then | |
8442 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba61a412 | 8443 | else |
2299a76d | 8444 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8445 | /* confdefs.h. */ |
8446 | _ACEOF | |
8447 | cat confdefs.h >>conftest.$ac_ext | |
8448 | cat >>conftest.$ac_ext <<_ACEOF | |
8449 | /* end confdefs.h. */ | |
ba61a412 DJ |
8450 | |
8451 | #include "confdefs.h" | |
8452 | #include <stdio.h> | |
8453 | #ifdef HAVE_STRING_H | |
8454 | #include <string.h> | |
8455 | #else | |
8456 | #ifdef HAVE_STRINGS_H | |
8457 | #include <strings.h> | |
8458 | #endif | |
8459 | #endif | |
8460 | #ifdef HAVE_STDLIB_H | |
8461 | #include <stdlib.h> | |
8462 | #endif | |
8463 | #ifdef HAVE_UNISTD_H | |
8464 | #include <unistd.h> | |
8465 | #endif | |
2299a76d DJ |
8466 | int |
8467 | main () | |
8468 | { | |
ba61a412 | 8469 | char *(*pfn) = (char *(*)) canonicalize_file_name |
2299a76d DJ |
8470 | ; |
8471 | return 0; | |
8472 | } | |
8473 | _ACEOF | |
8474 | rm -f conftest.$ac_objext | |
8475 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 8476 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 8477 | ac_status=$? |
58670637 DD |
8478 | grep -v '^ *+' conftest.er1 >conftest.err |
8479 | rm -f conftest.er1 | |
8480 | cat conftest.err >&5 | |
2299a76d DJ |
8481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8482 | (exit $ac_status); } && | |
fd7d450d DD |
8483 | { ac_try='test -z "$ac_c_werror_flag" |
8484 | || test ! -s conftest.err' | |
58670637 DD |
8485 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8486 | (eval $ac_try) 2>&5 | |
8487 | ac_status=$? | |
8488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8489 | (exit $ac_status); }; } && | |
8490 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
8491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8492 | (eval $ac_try) 2>&5 | |
8493 | ac_status=$? | |
8494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8495 | (exit $ac_status); }; }; then | |
ba61a412 DJ |
8496 | libiberty_cv_decl_needed_canonicalize_file_name=no |
8497 | else | |
2299a76d DJ |
8498 | echo "$as_me: failed program was:" >&5 |
8499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8500 | ||
8501 | libiberty_cv_decl_needed_canonicalize_file_name=yes | |
ba61a412 | 8502 | fi |
58670637 | 8503 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba61a412 DJ |
8504 | fi |
8505 | ||
2299a76d DJ |
8506 | echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5 |
8507 | echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6 | |
ba61a412 | 8508 | if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then |
2299a76d DJ |
8509 | |
8510 | cat >>confdefs.h <<\_ACEOF | |
ba61a412 | 8511 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 |
2299a76d | 8512 | _ACEOF |
ba61a412 DJ |
8513 | |
8514 | fi | |
8515 | ||
eb383413 L |
8516 | fi |
8517 | ||
5a17353c DD |
8518 | # Figure out which version of pexecute to use. |
8519 | case "${host}" in | |
46a10049 DD |
8520 | *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;; |
8521 | *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;; | |
8522 | *-*-msdos*) pexecute=./pex-msdos.o ;; | |
46a10049 | 8523 | *) pexecute=./pex-unix.o ;; |
5a17353c DD |
8524 | esac |
8525 | ||
8526 | ||
2299a76d DJ |
8527 | if test x$gcc_no_link = xyes; then |
8528 | if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then | |
8529 | ac_cv_func_mmap_fixed_mapped=no | |
8530 | fi | |
8531 | fi | |
67f3cb05 | 8532 | if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then |
2299a76d DJ |
8533 | |
8534 | ||
8535 | for ac_header in stdlib.h unistd.h | |
eb383413 | 8536 | do |
2299a76d | 8537 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
8ddbb593 | 8538 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
8539 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8540 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8541 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 8542 | else |
8ddbb593 | 8543 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8544 | /* confdefs.h. */ |
8545 | _ACEOF | |
8546 | cat confdefs.h >>conftest.$ac_ext | |
8547 | cat >>conftest.$ac_ext <<_ACEOF | |
8548 | /* end confdefs.h. */ | |
8549 | #include <$ac_header> | |
8550 | _ACEOF | |
8551 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8552 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8553 | ac_status=$? | |
8554 | grep -v '^ *+' conftest.er1 >conftest.err | |
8555 | rm -f conftest.er1 | |
8556 | cat conftest.err >&5 | |
8557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8558 | (exit $ac_status); } >/dev/null; then | |
8559 | if test -s conftest.err; then | |
8560 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 8561 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
8562 | else |
8563 | ac_cpp_err= | |
8564 | fi | |
8565 | else | |
8566 | ac_cpp_err=yes | |
8567 | fi | |
8568 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 8569 | eval "$as_ac_Header=yes" |
2299a76d DJ |
8570 | else |
8571 | echo "$as_me: failed program was:" >&5 | |
8572 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8573 | ||
8ddbb593 | 8574 | eval "$as_ac_Header=no" |
2299a76d DJ |
8575 | fi |
8576 | rm -f conftest.err conftest.$ac_ext | |
eb383413 | 8577 | fi |
2299a76d DJ |
8578 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8579 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
8580 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8581 | cat >>confdefs.h <<_ACEOF | |
8582 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8583 | _ACEOF | |
8584 | ||
eb383413 L |
8585 | fi |
8586 | done | |
8587 | ||
2299a76d | 8588 | |
eb383413 L |
8589 | for ac_func in getpagesize |
8590 | do | |
2299a76d DJ |
8591 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
8592 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
8593 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
8594 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
8595 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8596 | else | |
8597 | if test x$gcc_no_link = xyes; then | |
8598 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
8599 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
8600 | { (exit 1); exit 1; }; } | |
8601 | fi | |
8602 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
8603 | /* confdefs.h. */ |
8604 | _ACEOF | |
8605 | cat confdefs.h >>conftest.$ac_ext | |
8606 | cat >>conftest.$ac_ext <<_ACEOF | |
8607 | /* end confdefs.h. */ | |
252b5132 | 8608 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
8609 | which can conflict with char $ac_func (); below. |
8610 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
8611 | <limits.h> exists even on freestanding compilers. Under hpux, |
8612 | including <limits.h> includes <sys/time.h> and causes problems | |
8613 | checking for functions defined therein. */ | |
8614 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
8615 | # include <limits.h> |
8616 | #else | |
8617 | # include <assert.h> | |
8618 | #endif | |
252b5132 | 8619 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
8620 | #ifdef __cplusplus |
8621 | extern "C" | |
8622 | { | |
8623 | #endif | |
252b5132 | 8624 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
8625 | builtin and then its argument prototype would still apply. */ |
8626 | char $ac_func (); | |
252b5132 RH |
8627 | /* The GNU C library defines this for functions which it implements |
8628 | to always fail with ENOSYS. Some functions are actually named | |
8629 | something starting with __ and the normal name is an alias. */ | |
8630 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
8631 | choke me | |
8632 | #else | |
2299a76d DJ |
8633 | char (*f) () = $ac_func; |
8634 | #endif | |
8635 | #ifdef __cplusplus | |
8636 | } | |
252b5132 RH |
8637 | #endif |
8638 | ||
2299a76d DJ |
8639 | int |
8640 | main () | |
8641 | { | |
8642 | return f != $ac_func; | |
8643 | ; | |
8644 | return 0; | |
8645 | } | |
8646 | _ACEOF | |
8647 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8648 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 8649 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 8650 | ac_status=$? |
58670637 DD |
8651 | grep -v '^ *+' conftest.er1 >conftest.err |
8652 | rm -f conftest.er1 | |
8653 | cat conftest.err >&5 | |
2299a76d DJ |
8654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8655 | (exit $ac_status); } && | |
fd7d450d DD |
8656 | { ac_try='test -z "$ac_c_werror_flag" |
8657 | || test ! -s conftest.err' | |
58670637 DD |
8658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8659 | (eval $ac_try) 2>&5 | |
8660 | ac_status=$? | |
8661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8662 | (exit $ac_status); }; } && | |
8663 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
8664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8665 | (eval $ac_try) 2>&5 | |
8666 | ac_status=$? | |
8667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8668 | (exit $ac_status); }; }; then | |
8669 | eval "$as_ac_var=yes" | |
8670 | else | |
8671 | echo "$as_me: failed program was:" >&5 | |
8672 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8673 | ||
8674 | eval "$as_ac_var=no" | |
8675 | fi | |
58670637 DD |
8676 | rm -f conftest.err conftest.$ac_objext \ |
8677 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
8678 | fi |
8679 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
8680 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
8681 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
8682 | cat >>confdefs.h <<_ACEOF | |
8683 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8684 | _ACEOF | |
252b5132 | 8685 | |
252b5132 RH |
8686 | fi |
8687 | done | |
8688 | ||
2299a76d DJ |
8689 | echo "$as_me:$LINENO: checking for working mmap" >&5 |
8690 | echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 | |
8691 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then | |
8692 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
eb383413 L |
8693 | else |
8694 | if test "$cross_compiling" = yes; then | |
8695 | ac_cv_func_mmap_fixed_mapped=no | |
8696 | else | |
2299a76d | 8697 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8698 | /* confdefs.h. */ |
8699 | _ACEOF | |
8700 | cat confdefs.h >>conftest.$ac_ext | |
8701 | cat >>conftest.$ac_ext <<_ACEOF | |
8702 | /* end confdefs.h. */ | |
8703 | $ac_includes_default | |
8704 | /* malloc might have been renamed as rpl_malloc. */ | |
8705 | #undef malloc | |
eb383413 L |
8706 | |
8707 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
8708 | Here is a matrix of mmap possibilities: | |
8709 | mmap private not fixed | |
8710 | mmap private fixed at somewhere currently unmapped | |
8711 | mmap private fixed at somewhere already mapped | |
8712 | mmap shared not fixed | |
8713 | mmap shared fixed at somewhere currently unmapped | |
8714 | mmap shared fixed at somewhere already mapped | |
8715 | For private mappings, we should verify that changes cannot be read() | |
8716 | back from the file, nor mmap's back from the file at a different | |
8717 | address. (There have been systems where private was not correctly | |
8718 | implemented like the infamous i386 svr4.0, and systems where the | |
2299a76d | 8719 | VM page cache was not coherent with the file system buffer cache |
eb383413 L |
8720 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
8721 | For shared mappings, we should conversely verify that changes get | |
2299a76d | 8722 | propagated back to all the places they're supposed to be. |
eb383413 L |
8723 | |
8724 | Grep wants private fixed already mapped. | |
8725 | The main things grep needs to know about mmap are: | |
8726 | * does it exist and is it safe to write into the mmap'd area | |
8727 | * how to use it (BSD variants) */ | |
2299a76d | 8728 | |
eb383413 L |
8729 | #include <fcntl.h> |
8730 | #include <sys/mman.h> | |
8731 | ||
2299a76d DJ |
8732 | #if !STDC_HEADERS && !HAVE_STDLIB_H |
8733 | char *malloc (); | |
5f73c378 DD |
8734 | #endif |
8735 | ||
eb383413 | 8736 | /* This mess was copied from the GNU getpagesize.h. */ |
2299a76d | 8737 | #if !HAVE_GETPAGESIZE |
eb383413 | 8738 | /* Assume that all systems that can run configure have sys/param.h. */ |
2299a76d | 8739 | # if !HAVE_SYS_PARAM_H |
eb383413 L |
8740 | # define HAVE_SYS_PARAM_H 1 |
8741 | # endif | |
8742 | ||
8743 | # ifdef _SC_PAGESIZE | |
8744 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
8745 | # else /* no _SC_PAGESIZE */ | |
2299a76d | 8746 | # if HAVE_SYS_PARAM_H |
eb383413 L |
8747 | # include <sys/param.h> |
8748 | # ifdef EXEC_PAGESIZE | |
8749 | # define getpagesize() EXEC_PAGESIZE | |
8750 | # else /* no EXEC_PAGESIZE */ | |
8751 | # ifdef NBPG | |
8752 | # define getpagesize() NBPG * CLSIZE | |
8753 | # ifndef CLSIZE | |
8754 | # define CLSIZE 1 | |
8755 | # endif /* no CLSIZE */ | |
8756 | # else /* no NBPG */ | |
8757 | # ifdef NBPC | |
8758 | # define getpagesize() NBPC | |
8759 | # else /* no NBPC */ | |
8760 | # ifdef PAGESIZE | |
8761 | # define getpagesize() PAGESIZE | |
8762 | # endif /* PAGESIZE */ | |
8763 | # endif /* no NBPC */ | |
8764 | # endif /* no NBPG */ | |
8765 | # endif /* no EXEC_PAGESIZE */ | |
8766 | # else /* no HAVE_SYS_PARAM_H */ | |
8767 | # define getpagesize() 8192 /* punt totally */ | |
8768 | # endif /* no HAVE_SYS_PARAM_H */ | |
8769 | # endif /* no _SC_PAGESIZE */ | |
8770 | ||
8771 | #endif /* no HAVE_GETPAGESIZE */ | |
8772 | ||
eb383413 | 8773 | int |
2299a76d | 8774 | main () |
eb383413 | 8775 | { |
2299a76d DJ |
8776 | char *data, *data2, *data3; |
8777 | int i, pagesize; | |
8778 | int fd; | |
eb383413 | 8779 | |
2299a76d DJ |
8780 | pagesize = getpagesize (); |
8781 | ||
8782 | /* First, make a file with some known garbage in it. */ | |
8783 | data = (char *) malloc (pagesize); | |
8784 | if (!data) | |
8785 | exit (1); | |
8786 | for (i = 0; i < pagesize; ++i) | |
8787 | *(data + i) = rand (); | |
8788 | umask (0); | |
8789 | fd = creat ("conftest.mmap", 0600); | |
8790 | if (fd < 0) | |
8791 | exit (1); | |
8792 | if (write (fd, data, pagesize) != pagesize) | |
8793 | exit (1); | |
8794 | close (fd); | |
8795 | ||
8796 | /* Next, try to mmap the file at a fixed address which already has | |
8797 | something else allocated at it. If we can, also make sure that | |
8798 | we see the same garbage. */ | |
8799 | fd = open ("conftest.mmap", O_RDWR); | |
8800 | if (fd < 0) | |
8801 | exit (1); | |
8802 | data2 = (char *) malloc (2 * pagesize); | |
8803 | if (!data2) | |
8804 | exit (1); | |
58670637 | 8805 | data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); |
2299a76d | 8806 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
58670637 | 8807 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
2299a76d DJ |
8808 | exit (1); |
8809 | for (i = 0; i < pagesize; ++i) | |
8810 | if (*(data + i) != *(data2 + i)) | |
8811 | exit (1); | |
8812 | ||
8813 | /* Finally, make sure that changes to the mapped area do not | |
8814 | percolate back to the file as seen by read(). (This is a bug on | |
8815 | some variants of i386 svr4.0.) */ | |
8816 | for (i = 0; i < pagesize; ++i) | |
8817 | *(data2 + i) = *(data2 + i) + 1; | |
8818 | data3 = (char *) malloc (pagesize); | |
8819 | if (!data3) | |
8820 | exit (1); | |
8821 | if (read (fd, data3, pagesize) != pagesize) | |
8822 | exit (1); | |
8823 | for (i = 0; i < pagesize; ++i) | |
8824 | if (*(data + i) != *(data3 + i)) | |
8825 | exit (1); | |
8826 | close (fd); | |
8827 | exit (0); | |
8828 | } | |
8829 | _ACEOF | |
8830 | rm -f conftest$ac_exeext | |
8831 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8832 | (eval $ac_link) 2>&5 | |
8833 | ac_status=$? | |
8834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8835 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8836 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8837 | (eval $ac_try) 2>&5 | |
8838 | ac_status=$? | |
8839 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8840 | (exit $ac_status); }; }; then | |
eb383413 L |
8841 | ac_cv_func_mmap_fixed_mapped=yes |
8842 | else | |
2299a76d DJ |
8843 | echo "$as_me: program exited with status $ac_status" >&5 |
8844 | echo "$as_me: failed program was:" >&5 | |
8845 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8846 | ||
8847 | ( exit $ac_status ) | |
8848 | ac_cv_func_mmap_fixed_mapped=no | |
eb383413 | 8849 | fi |
58670637 | 8850 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb383413 | 8851 | fi |
eb383413 | 8852 | fi |
2299a76d DJ |
8853 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
8854 | echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 | |
eb383413 | 8855 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
2299a76d DJ |
8856 | |
8857 | cat >>confdefs.h <<\_ACEOF | |
eb383413 | 8858 | #define HAVE_MMAP 1 |
2299a76d | 8859 | _ACEOF |
eb383413 | 8860 | |
252b5132 | 8861 | fi |
2299a76d | 8862 | rm -f conftest.mmap |
252b5132 | 8863 | |
2299a76d | 8864 | fi |
eb383413 | 8865 | |
2299a76d DJ |
8866 | echo "$as_me:$LINENO: checking for working strncmp" >&5 |
8867 | echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6 | |
8868 | if test "${ac_cv_func_strncmp_works+set}" = set; then | |
8869 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
eb383413 L |
8870 | else |
8871 | if test "$cross_compiling" = yes; then | |
8872 | ac_cv_func_strncmp_works=no | |
8873 | else | |
2299a76d | 8874 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8875 | /* confdefs.h. */ |
8876 | _ACEOF | |
8877 | cat confdefs.h >>conftest.$ac_ext | |
8878 | cat >>conftest.$ac_ext <<_ACEOF | |
8879 | /* end confdefs.h. */ | |
eb383413 L |
8880 | |
8881 | /* Test by Jim Wilson and Kaveh Ghazi. | |
8882 | Check whether strncmp reads past the end of its string parameters. */ | |
8883 | #include <sys/types.h> | |
8884 | ||
8885 | #ifdef HAVE_FCNTL_H | |
8886 | #include <fcntl.h> | |
8887 | #endif | |
8888 | ||
8889 | #ifdef HAVE_SYS_MMAN_H | |
8890 | #include <sys/mman.h> | |
8891 | #endif | |
8892 | ||
8893 | #ifndef MAP_ANON | |
8894 | #ifdef MAP_ANONYMOUS | |
8895 | #define MAP_ANON MAP_ANONYMOUS | |
8896 | #else | |
8897 | #define MAP_ANON MAP_FILE | |
8898 | #endif | |
8899 | #endif | |
8900 | ||
8901 | #ifndef MAP_FILE | |
8902 | #define MAP_FILE 0 | |
8903 | #endif | |
8904 | #ifndef O_RDONLY | |
8905 | #define O_RDONLY 0 | |
8906 | #endif | |
8907 | ||
8908 | #define MAP_LEN 0x10000 | |
8909 | ||
8910 | main () | |
8911 | { | |
8912 | #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) | |
8913 | char *p; | |
8914 | int dev_zero; | |
8915 | ||
8916 | dev_zero = open ("/dev/zero", O_RDONLY); | |
8917 | if (dev_zero < 0) | |
8918 | exit (1); | |
2299a76d | 8919 | |
eb383413 L |
8920 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, |
8921 | MAP_ANON|MAP_PRIVATE, dev_zero, 0); | |
f348a7b1 DD |
8922 | if (p == (char *)-1) |
8923 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, | |
8924 | MAP_ANON|MAP_PRIVATE, -1, 0); | |
eb383413 L |
8925 | if (p == (char *)-1) |
8926 | exit (2); | |
8927 | else | |
8928 | { | |
8929 | char *string = "__si_type_info"; | |
8930 | char *q = (char *) p + MAP_LEN - strlen (string) - 2; | |
8931 | char *r = (char *) p + 0xe; | |
8932 | ||
8933 | strcpy (q, string); | |
8934 | strcpy (r, string); | |
8935 | strncmp (r, q, 14); | |
8936 | } | |
8937 | #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ | |
8938 | exit (0); | |
8939 | } | |
8940 | ||
2299a76d DJ |
8941 | _ACEOF |
8942 | rm -f conftest$ac_exeext | |
8943 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8944 | (eval $ac_link) 2>&5 | |
8945 | ac_status=$? | |
8946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8947 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8948 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8949 | (eval $ac_try) 2>&5 | |
8950 | ac_status=$? | |
8951 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8952 | (exit $ac_status); }; }; then | |
eb383413 L |
8953 | ac_cv_func_strncmp_works=yes |
8954 | else | |
2299a76d DJ |
8955 | echo "$as_me: program exited with status $ac_status" >&5 |
8956 | echo "$as_me: failed program was:" >&5 | |
8957 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8958 | ||
8959 | ( exit $ac_status ) | |
8960 | ac_cv_func_strncmp_works=no | |
eb383413 | 8961 | fi |
58670637 | 8962 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb383413 | 8963 | fi |
eb383413 L |
8964 | rm -f core core.* *.core |
8965 | fi | |
2299a76d DJ |
8966 | echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5 |
8967 | echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6 | |
eb383413 | 8968 | if test $ac_cv_func_strncmp_works = no ; then |
58670637 DD |
8969 | case $LIBOBJS in |
8970 | "strncmp.$ac_objext" | \ | |
8971 | *" strncmp.$ac_objext" | \ | |
8972 | "strncmp.$ac_objext "* | \ | |
8973 | *" strncmp.$ac_objext "* ) ;; | |
8974 | *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;; | |
8975 | esac | |
8976 | ||
eb383413 L |
8977 | fi |
8978 | ||
8979 | ||
252b5132 RH |
8980 | # Install a library built with a cross compiler in $(tooldir) rather |
8981 | # than $(libdir). | |
8982 | if test -z "${with_cross_host}"; then | |
8983 | INSTALL_DEST=libdir | |
8984 | else | |
8985 | INSTALL_DEST=tooldir | |
8986 | fi | |
8987 | ||
8988 | ||
11a338da DD |
8989 | |
8990 | L="" | |
8991 | for l in x $LIBOBJS; do | |
8992 | case $l in | |
8993 | x) ;; | |
8994 | *) L="$L ./$l" ;; | |
8995 | esac | |
8996 | done | |
8997 | LIBOBJS="$L" | |
8998 | ||
545c9aee DD |
8999 | |
9000 | ||
9001 | ||
9002 | ||
252b5132 | 9003 | # We need multilib support, but only if configuring for the target. |
2299a76d | 9004 | ac_config_files="$ac_config_files Makefile testsuite/Makefile" |
bb6a587d | 9005 | |
2299a76d | 9006 | ac_config_commands="$ac_config_commands default" |
bb6a587d | 9007 | |
2299a76d | 9008 | cat >confcache <<\_ACEOF |
252b5132 RH |
9009 | # This file is a shell script that caches the results of configure |
9010 | # tests run on this system so they can be shared between configure | |
2299a76d DJ |
9011 | # scripts and configure runs, see configure's option --config-cache. |
9012 | # It is not useful on other systems. If it contains results you don't | |
9013 | # want to keep, you may remove or edit it. | |
252b5132 | 9014 | # |
2299a76d DJ |
9015 | # config.status only pays attention to the cache file if you give it |
9016 | # the --recheck option to rerun configure. | |
252b5132 | 9017 | # |
2299a76d DJ |
9018 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
9019 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
9020 | # following values. | |
9021 | ||
9022 | _ACEOF | |
9023 | ||
252b5132 RH |
9024 | # The following way of writing the cache mishandles newlines in values, |
9025 | # but we know of no workaround that is simple, portable, and efficient. | |
9026 | # So, don't put newlines in cache variables' values. | |
9027 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
9028 | # and sets the high bit in the cache file unless we assign to the vars. | |
2299a76d DJ |
9029 | { |
9030 | (set) 2>&1 | | |
9031 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
9032 | *ac_space=\ *) | |
9033 | # `set' does not quote correctly, so add quotes (double-quote | |
9034 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
9035 | sed -n \ | |
58670637 DD |
9036 | "s/'/'\\\\''/g; |
9037 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
2299a76d DJ |
9038 | ;; |
9039 | *) | |
9040 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
9041 | sed -n \ | |
58670637 | 9042 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
2299a76d DJ |
9043 | ;; |
9044 | esac; | |
9045 | } | | |
9046 | sed ' | |
9047 | t clear | |
9048 | : clear | |
9049 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
9050 | t end | |
9051 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
9052 | : end' >>confcache | |
9053 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
252b5132 | 9054 | if test -w $cache_file; then |
2299a76d DJ |
9055 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
9056 | cat confcache >$cache_file | |
252b5132 RH |
9057 | else |
9058 | echo "not updating unwritable cache $cache_file" | |
9059 | fi | |
9060 | fi | |
9061 | rm -f confcache | |
9062 | ||
252b5132 RH |
9063 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
9064 | # Let make expand exec_prefix. | |
9065 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9066 | ||
2299a76d DJ |
9067 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
9068 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
9069 | # trailing colons and then remove the whole line if VPATH becomes empty | |
9070 | # (actually we leave an empty line to preserve line numbers). | |
252b5132 | 9071 | if test "x$srcdir" = x.; then |
58670637 | 9072 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
2299a76d DJ |
9073 | s/:*\$(srcdir):*/:/; |
9074 | s/:*\${srcdir}:*/:/; | |
9075 | s/:*@srcdir@:*/:/; | |
58670637 | 9076 | s/^\([^=]*=[ ]*\):*/\1/; |
2299a76d | 9077 | s/:*$//; |
58670637 | 9078 | s/^[^=]*=[ ]*$//; |
2299a76d | 9079 | }' |
252b5132 RH |
9080 | fi |
9081 | ||
252b5132 RH |
9082 | DEFS=-DHAVE_CONFIG_H |
9083 | ||
2299a76d DJ |
9084 | ac_libobjs= |
9085 | ac_ltlibobjs= | |
9086 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
9087 | # 1. Remove the extension, and $U if already installed. | |
9088 | ac_i=`echo "$ac_i" | | |
58670637 | 9089 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
2299a76d DJ |
9090 | # 2. Add them. |
9091 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
9092 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
9093 | done | |
9094 | LIBOBJS=$ac_libobjs | |
252b5132 | 9095 | |
2299a76d DJ |
9096 | LTLIBOBJS=$ac_ltlibobjs |
9097 | ||
9098 | ||
9099 | ||
9100 | : ${CONFIG_STATUS=./config.status} | |
9101 | ac_clean_files_save=$ac_clean_files | |
9102 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
9103 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
9104 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
9105 | cat >$CONFIG_STATUS <<_ACEOF | |
9106 | #! $SHELL | |
9107 | # Generated by $as_me. | |
252b5132 | 9108 | # Run this file to recreate the current configuration. |
252b5132 | 9109 | # Compiler output produced by configure, useful for debugging |
2299a76d | 9110 | # configure, is in config.log if it exists. |
252b5132 | 9111 | |
2299a76d DJ |
9112 | debug=false |
9113 | ac_cs_recheck=false | |
9114 | ac_cs_silent=false | |
9115 | SHELL=\${CONFIG_SHELL-$SHELL} | |
9116 | _ACEOF | |
9117 | ||
9118 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9119 | ## --------------------- ## | |
9120 | ## M4sh Initialization. ## | |
9121 | ## --------------------- ## | |
9122 | ||
9123 | # Be Bourne compatible | |
9124 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
9125 | emulate sh | |
9126 | NULLCMD=: | |
9127 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
9128 | # is contrary to our usage. Disable this feature. | |
9129 | alias -g '${1+"$@"}'='"$@"' | |
9130 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
9131 | set -o posix | |
9132 | fi | |
58670637 | 9133 | DUALCASE=1; export DUALCASE # for MKS sh |
2299a76d DJ |
9134 | |
9135 | # Support unset when possible. | |
58670637 | 9136 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
2299a76d DJ |
9137 | as_unset=unset |
9138 | else | |
9139 | as_unset=false | |
9140 | fi | |
9141 | ||
9142 | ||
9143 | # Work around bugs in pre-3.0 UWIN ksh. | |
9144 | $as_unset ENV MAIL MAILPATH | |
9145 | PS1='$ ' | |
9146 | PS2='> ' | |
9147 | PS4='+ ' | |
9148 | ||
9149 | # NLS nuisances. | |
9150 | for as_var in \ | |
9151 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
9152 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
9153 | LC_TELEPHONE LC_TIME | |
252b5132 | 9154 | do |
58670637 | 9155 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
2299a76d DJ |
9156 | eval $as_var=C; export $as_var |
9157 | else | |
9158 | $as_unset $as_var | |
9159 | fi | |
252b5132 RH |
9160 | done |
9161 | ||
2299a76d DJ |
9162 | # Required to use basename. |
9163 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
9164 | as_expr=expr | |
9165 | else | |
9166 | as_expr=false | |
9167 | fi | |
252b5132 | 9168 | |
2299a76d DJ |
9169 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
9170 | as_basename=basename | |
9171 | else | |
9172 | as_basename=false | |
9173 | fi | |
252b5132 | 9174 | |
252b5132 | 9175 | |
2299a76d DJ |
9176 | # Name of the executable. |
9177 | as_me=`$as_basename "$0" || | |
9178 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
9179 | X"$0" : 'X\(//\)$' \| \ | |
9180 | X"$0" : 'X\(/\)$' \| \ | |
9181 | . : '\(.\)' 2>/dev/null || | |
9182 | echo X/"$0" | | |
9183 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
9184 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
9185 | /^X\/\(\/\).*/{ s//\1/; q; } | |
9186 | s/.*/./; q'` | |
9187 | ||
9188 | ||
9189 | # PATH needs CR, and LINENO needs CR and PATH. | |
9190 | # Avoid depending upon Character Ranges. | |
9191 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
9192 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
9193 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
9194 | as_cr_digits='0123456789' | |
9195 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
252b5132 | 9196 | |
2299a76d DJ |
9197 | # The user is always right. |
9198 | if test "${PATH_SEPARATOR+set}" != set; then | |
9199 | echo "#! /bin/sh" >conf$$.sh | |
9200 | echo "exit 0" >>conf$$.sh | |
9201 | chmod +x conf$$.sh | |
9202 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
9203 | PATH_SEPARATOR=';' | |
252b5132 | 9204 | else |
2299a76d | 9205 | PATH_SEPARATOR=: |
252b5132 | 9206 | fi |
2299a76d DJ |
9207 | rm -f conf$$.sh |
9208 | fi | |
9209 | ||
9210 | ||
9211 | as_lineno_1=$LINENO | |
9212 | as_lineno_2=$LINENO | |
9213 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
9214 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
9215 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
9216 | # Find who we are. Look in the path if we contain no path at all | |
9217 | # relative or not. | |
9218 | case $0 in | |
9219 | *[\\/]* ) as_myself=$0 ;; | |
9220 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9221 | for as_dir in $PATH | |
9222 | do | |
9223 | IFS=$as_save_IFS | |
9224 | test -z "$as_dir" && as_dir=. | |
9225 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
9226 | done | |
9227 | ||
9228 | ;; | |
9229 | esac | |
9230 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
9231 | # in which case we are not to be found in the path. | |
9232 | if test "x$as_myself" = x; then | |
9233 | as_myself=$0 | |
9234 | fi | |
9235 | if test ! -f "$as_myself"; then | |
9236 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
9237 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
9238 | { (exit 1); exit 1; }; } | |
9239 | fi | |
9240 | case $CONFIG_SHELL in | |
9241 | '') | |
9242 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9243 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
9244 | do | |
9245 | IFS=$as_save_IFS | |
9246 | test -z "$as_dir" && as_dir=. | |
9247 | for as_base in sh bash ksh sh5; do | |
9248 | case $as_dir in | |
9249 | /*) | |
9250 | if ("$as_dir/$as_base" -c ' | |
9251 | as_lineno_1=$LINENO | |
9252 | as_lineno_2=$LINENO | |
9253 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
9254 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
9255 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
9256 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
9257 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
9258 | CONFIG_SHELL=$as_dir/$as_base | |
9259 | export CONFIG_SHELL | |
9260 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
9261 | fi;; | |
9262 | esac | |
9263 | done | |
9264 | done | |
9265 | ;; | |
9266 | esac | |
9267 | ||
9268 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
9269 | # uniformly replaced by the line number. The first 'sed' inserts a | |
9270 | # line-number line before each line; the second 'sed' does the real | |
9271 | # work. The second script uses 'N' to pair each line-number line | |
9272 | # with the numbered line, and appends trailing '-' during | |
9273 | # substitution so that $LINENO is not a special case at line end. | |
9274 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
9275 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
9276 | sed '=' <$as_myself | | |
9277 | sed ' | |
9278 | N | |
9279 | s,$,-, | |
9280 | : loop | |
9281 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
9282 | t loop | |
9283 | s,-$,, | |
9284 | s,^['$as_cr_digits']*\n,, | |
9285 | ' >$as_me.lineno && | |
9286 | chmod +x $as_me.lineno || | |
9287 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
9288 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
9289 | { (exit 1); exit 1; }; } | |
9290 | ||
9291 | # Don't try to exec as it changes $[0], causing all sort of problems | |
9292 | # (the dirname of $[0] is not the place where we might find the | |
9293 | # original and so on. Autoconf is especially sensible to this). | |
9294 | . ./$as_me.lineno | |
9295 | # Exit status is that of the last command. | |
9296 | exit | |
9297 | } | |
9298 | ||
9299 | ||
9300 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
9301 | *c*,-n*) ECHO_N= ECHO_C=' | |
9302 | ' ECHO_T=' ' ;; | |
9303 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
9304 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
9305 | esac | |
9306 | ||
9307 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
9308 | as_expr=expr | |
9309 | else | |
9310 | as_expr=false | |
9311 | fi | |
9312 | ||
9313 | rm -f conf$$ conf$$.exe conf$$.file | |
9314 | echo >conf$$.file | |
9315 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
9316 | # We could just check for DJGPP; but this test a) works b) is more generic | |
9317 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
9318 | if test -f conf$$.exe; then | |
9319 | # Don't use ln at all; we don't have any links | |
9320 | as_ln_s='cp -p' | |
252b5132 | 9321 | else |
2299a76d | 9322 | as_ln_s='ln -s' |
252b5132 | 9323 | fi |
2299a76d DJ |
9324 | elif ln conf$$.file conf$$ 2>/dev/null; then |
9325 | as_ln_s=ln | |
9326 | else | |
9327 | as_ln_s='cp -p' | |
9328 | fi | |
9329 | rm -f conf$$ conf$$.exe conf$$.file | |
9330 | ||
9331 | if mkdir -p . 2>/dev/null; then | |
9332 | as_mkdir_p=: | |
9333 | else | |
58670637 | 9334 | test -d ./-p && rmdir ./-p |
2299a76d DJ |
9335 | as_mkdir_p=false |
9336 | fi | |
9337 | ||
9338 | as_executable_p="test -f" | |
9339 | ||
9340 | # Sed expression to map a string onto a valid CPP name. | |
58670637 | 9341 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
9342 | |
9343 | # Sed expression to map a string onto a valid variable name. | |
58670637 | 9344 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
9345 | |
9346 | ||
9347 | # IFS | |
9348 | # We need space, tab and new line, in precisely that order. | |
9349 | as_nl=' | |
9350 | ' | |
9351 | IFS=" $as_nl" | |
9352 | ||
9353 | # CDPATH. | |
9354 | $as_unset CDPATH | |
9355 | ||
9356 | exec 6>&1 | |
9357 | ||
9358 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
9359 | # report actual input values of CONFIG_FILES etc. instead of their | |
9360 | # values after options handling. Logging --version etc. is OK. | |
9361 | exec 5>>config.log | |
9362 | { | |
9363 | echo | |
9364 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
9365 | ## Running $as_me. ## | |
9366 | _ASBOX | |
9367 | } >&5 | |
9368 | cat >&5 <<_CSEOF | |
9369 | ||
9370 | This file was extended by $as_me, which was | |
85f969cd | 9371 | generated by GNU Autoconf 2.59. Invocation command line was |
2299a76d DJ |
9372 | |
9373 | CONFIG_FILES = $CONFIG_FILES | |
9374 | CONFIG_HEADERS = $CONFIG_HEADERS | |
9375 | CONFIG_LINKS = $CONFIG_LINKS | |
9376 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
9377 | $ $0 $@ | |
9378 | ||
9379 | _CSEOF | |
9380 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
9381 | echo >&5 | |
9382 | _ACEOF | |
9383 | ||
9384 | # Files that config.status was made for. | |
9385 | if test -n "$ac_config_files"; then | |
9386 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
9387 | fi | |
9388 | ||
9389 | if test -n "$ac_config_headers"; then | |
9390 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
9391 | fi | |
9392 | ||
9393 | if test -n "$ac_config_links"; then | |
9394 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
9395 | fi | |
9396 | ||
9397 | if test -n "$ac_config_commands"; then | |
9398 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
9399 | fi | |
9400 | ||
9401 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9402 | ||
9403 | ac_cs_usage="\ | |
9404 | \`$as_me' instantiates files from templates according to the | |
9405 | current configuration. | |
9406 | ||
9407 | Usage: $0 [OPTIONS] [FILE]... | |
9408 | ||
9409 | -h, --help print this help, then exit | |
9410 | -V, --version print version number, then exit | |
9411 | -q, --quiet do not print progress messages | |
9412 | -d, --debug don't remove temporary files | |
9413 | --recheck update $as_me by reconfiguring in the same conditions | |
9414 | --file=FILE[:TEMPLATE] | |
58670637 | 9415 | instantiate the configuration file FILE |
2299a76d | 9416 | --header=FILE[:TEMPLATE] |
58670637 | 9417 | instantiate the configuration header FILE |
2299a76d DJ |
9418 | |
9419 | Configuration files: | |
9420 | $config_files | |
9421 | ||
9422 | Configuration headers: | |
9423 | $config_headers | |
9424 | ||
9425 | Configuration commands: | |
9426 | $config_commands | |
9427 | ||
9428 | Report bugs to <bug-autoconf@gnu.org>." | |
9429 | _ACEOF | |
9430 | ||
9431 | cat >>$CONFIG_STATUS <<_ACEOF | |
9432 | ac_cs_version="\\ | |
9433 | config.status | |
85f969cd | 9434 | configured by $0, generated by GNU Autoconf 2.59, |
2299a76d DJ |
9435 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
9436 | ||
58670637 | 9437 | Copyright (C) 2003 Free Software Foundation, Inc. |
2299a76d DJ |
9438 | This config.status script is free software; the Free Software Foundation |
9439 | gives unlimited permission to copy, distribute and modify it." | |
9440 | srcdir=$srcdir | |
9441 | INSTALL="$INSTALL" | |
9442 | _ACEOF | |
9443 | ||
9444 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9445 | # If no file are specified by the user, then we need to provide default | |
9446 | # value. By we need to know if files were specified by the user. | |
9447 | ac_need_defaults=: | |
9448 | while test $# != 0 | |
9449 | do | |
9450 | case $1 in | |
9451 | --*=*) | |
9452 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
9453 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
9454 | ac_shift=: | |
9455 | ;; | |
9456 | -*) | |
9457 | ac_option=$1 | |
9458 | ac_optarg=$2 | |
9459 | ac_shift=shift | |
9460 | ;; | |
9461 | *) # This is not an option, so the user has probably given explicit | |
9462 | # arguments. | |
9463 | ac_option=$1 | |
9464 | ac_need_defaults=false;; | |
9465 | esac | |
9466 | ||
9467 | case $ac_option in | |
9468 | # Handling of the options. | |
9469 | _ACEOF | |
9470 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9471 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9472 | ac_cs_recheck=: ;; | |
9473 | --version | --vers* | -V ) | |
9474 | echo "$ac_cs_version"; exit 0 ;; | |
9475 | --he | --h) | |
9476 | # Conflict between --help and --header | |
9477 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
9478 | Try \`$0 --help' for more information." >&5 | |
9479 | echo "$as_me: error: ambiguous option: $1 | |
9480 | Try \`$0 --help' for more information." >&2;} | |
9481 | { (exit 1); exit 1; }; };; | |
9482 | --help | --hel | -h ) | |
9483 | echo "$ac_cs_usage"; exit 0 ;; | |
9484 | --debug | --d* | -d ) | |
9485 | debug=: ;; | |
9486 | --file | --fil | --fi | --f ) | |
9487 | $ac_shift | |
9488 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
9489 | ac_need_defaults=false;; | |
9490 | --header | --heade | --head | --hea ) | |
9491 | $ac_shift | |
9492 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
9493 | ac_need_defaults=false;; | |
9494 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
9495 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
9496 | ac_cs_silent=: ;; | |
9497 | ||
9498 | # This is an error. | |
9499 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
9500 | Try \`$0 --help' for more information." >&5 | |
9501 | echo "$as_me: error: unrecognized option: $1 | |
9502 | Try \`$0 --help' for more information." >&2;} | |
9503 | { (exit 1); exit 1; }; } ;; | |
9504 | ||
9505 | *) ac_config_targets="$ac_config_targets $1" ;; | |
9506 | ||
9507 | esac | |
9508 | shift | |
252b5132 | 9509 | done |
2299a76d DJ |
9510 | |
9511 | ac_configure_extra_args= | |
9512 | ||
9513 | if $ac_cs_silent; then | |
9514 | exec 6>/dev/null | |
9515 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
252b5132 | 9516 | fi |
252b5132 | 9517 | |
2299a76d DJ |
9518 | _ACEOF |
9519 | cat >>$CONFIG_STATUS <<_ACEOF | |
9520 | if \$ac_cs_recheck; then | |
9521 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
9522 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
9523 | fi | |
252b5132 | 9524 | |
2299a76d DJ |
9525 | _ACEOF |
9526 | ||
9527 | cat >>$CONFIG_STATUS <<_ACEOF | |
9528 | # | |
9529 | # INIT-COMMANDS section. | |
9530 | # | |
9531 | ||
9532 | srcdir=${srcdir} | |
9533 | host=${host} | |
9534 | target=${target} | |
9535 | with_target_subdir=${with_target_subdir} | |
2299a76d DJ |
9536 | with_multisubdir=${with_multisubdir} |
9537 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
9538 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
9539 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" | |
9540 | libiberty_topdir=${libiberty_topdir} | |
9541 | ||
9542 | ||
9543 | _ACEOF | |
9544 | ||
9545 | ||
9546 | ||
9547 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9548 | for ac_config_target in $ac_config_targets | |
9549 | do | |
9550 | case "$ac_config_target" in | |
9551 | # Handling of arguments. | |
9552 | "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
9553 | "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; | |
9554 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
9555 | "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
9556 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
9557 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
9558 | { (exit 1); exit 1; }; };; | |
252b5132 | 9559 | esac |
2299a76d | 9560 | done |
252b5132 | 9561 | |
2299a76d DJ |
9562 | # If the user did not use the arguments to specify the items to instantiate, |
9563 | # then the envvar interface is used. Set only those that are not. | |
9564 | # We use the long form for the default assignment because of an extremely | |
9565 | # bizarre bug on SunOS 4.1.3. | |
9566 | if $ac_need_defaults; then | |
9567 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
9568 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
9569 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
9570 | fi | |
9571 | ||
9572 | # Have a temporary directory for convenience. Make it in the build tree | |
9573 | # simply because there is no reason to put it here, and in addition, | |
9574 | # creating and moving files from /tmp can sometimes cause problems. | |
9575 | # Create a temporary directory, and hook for its removal unless debugging. | |
9576 | $debug || | |
9577 | { | |
9578 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
9579 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
9580 | } | |
252b5132 | 9581 | |
2299a76d DJ |
9582 | # Create a (secure) tmp directory for tmp files. |
9583 | ||
9584 | { | |
9585 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
9586 | test -n "$tmp" && test -d "$tmp" | |
9587 | } || | |
9588 | { | |
9589 | tmp=./confstat$$-$RANDOM | |
9590 | (umask 077 && mkdir $tmp) | |
9591 | } || | |
9592 | { | |
9593 | echo "$me: cannot create a temporary directory in ." >&2 | |
9594 | { (exit 1); exit 1; } | |
9595 | } | |
9596 | ||
9597 | _ACEOF | |
9598 | ||
9599 | cat >>$CONFIG_STATUS <<_ACEOF | |
9600 | ||
9601 | # | |
9602 | # CONFIG_FILES section. | |
9603 | # | |
9604 | ||
9605 | # No need to generate the scripts if there are no CONFIG_FILES. | |
9606 | # This happens for instance when ./config.status config.h | |
9607 | if test -n "\$CONFIG_FILES"; then | |
9608 | # Protect against being on the right side of a sed subst in config.status. | |
9609 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
9610 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
9611 | s,@SHELL@,$SHELL,;t t | |
9612 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
9613 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
9614 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
9615 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
9616 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
9617 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
9618 | s,@exec_prefix@,$exec_prefix,;t t | |
9619 | s,@prefix@,$prefix,;t t | |
9620 | s,@program_transform_name@,$program_transform_name,;t t | |
9621 | s,@bindir@,$bindir,;t t | |
9622 | s,@sbindir@,$sbindir,;t t | |
9623 | s,@libexecdir@,$libexecdir,;t t | |
9624 | s,@datadir@,$datadir,;t t | |
9625 | s,@sysconfdir@,$sysconfdir,;t t | |
9626 | s,@sharedstatedir@,$sharedstatedir,;t t | |
9627 | s,@localstatedir@,$localstatedir,;t t | |
9628 | s,@libdir@,$libdir,;t t | |
9629 | s,@includedir@,$includedir,;t t | |
9630 | s,@oldincludedir@,$oldincludedir,;t t | |
9631 | s,@infodir@,$infodir,;t t | |
9632 | s,@mandir@,$mandir,;t t | |
9633 | s,@build_alias@,$build_alias,;t t | |
9634 | s,@host_alias@,$host_alias,;t t | |
9635 | s,@target_alias@,$target_alias,;t t | |
9636 | s,@DEFS@,$DEFS,;t t | |
9637 | s,@ECHO_C@,$ECHO_C,;t t | |
9638 | s,@ECHO_N@,$ECHO_N,;t t | |
9639 | s,@ECHO_T@,$ECHO_T,;t t | |
9640 | s,@LIBS@,$LIBS,;t t | |
9641 | s,@libiberty_topdir@,$libiberty_topdir,;t t | |
9642 | s,@MAINT@,$MAINT,;t t | |
9643 | s,@NOTMAINT@,$NOTMAINT,;t t | |
9644 | s,@MAKEINFO@,$MAKEINFO,;t t | |
9645 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
9646 | s,@PERL@,$PERL,;t t | |
9647 | s,@HAVE_PERL@,$HAVE_PERL,;t t | |
9648 | s,@build@,$build,;t t | |
9649 | s,@build_cpu@,$build_cpu,;t t | |
9650 | s,@build_vendor@,$build_vendor,;t t | |
9651 | s,@build_os@,$build_os,;t t | |
9652 | s,@host@,$host,;t t | |
9653 | s,@host_cpu@,$host_cpu,;t t | |
9654 | s,@host_vendor@,$host_vendor,;t t | |
9655 | s,@host_os@,$host_os,;t t | |
9656 | s,@AR@,$AR,;t t | |
9657 | s,@ac_ct_AR@,$ac_ct_AR,;t t | |
9658 | s,@RANLIB@,$RANLIB,;t t | |
9659 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
9660 | s,@CC@,$CC,;t t | |
9661 | s,@CFLAGS@,$CFLAGS,;t t | |
9662 | s,@LDFLAGS@,$LDFLAGS,;t t | |
9663 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
9664 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
9665 | s,@EXEEXT@,$EXEEXT,;t t | |
9666 | s,@OBJEXT@,$OBJEXT,;t t | |
8ddbb593 | 9667 | s,@CPP@,$CPP,;t t |
11a338da | 9668 | s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t |
46a10049 DD |
9669 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t |
9670 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
2299a76d DJ |
9671 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t |
9672 | s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t | |
9673 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
2299a76d DJ |
9674 | s,@EGREP@,$EGREP,;t t |
9675 | s,@LIBOBJS@,$LIBOBJS,;t t | |
9676 | s,@CHECK@,$CHECK,;t t | |
9677 | s,@target_header_dir@,$target_header_dir,;t t | |
9678 | s,@pexecute@,$pexecute,;t t | |
9679 | s,@INSTALL_DEST@,$INSTALL_DEST,;t t | |
545c9aee DD |
9680 | s,@datarootdir@,$datarootdir,;t t |
9681 | s,@docdir@,$docdir,;t t | |
9682 | s,@htmldir@,$htmldir,;t t | |
2299a76d DJ |
9683 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t |
9684 | /@host_makefile_frag@/r $host_makefile_frag | |
9685 | s,@host_makefile_frag@,,;t t | |
9686 | CEOF | |
9687 | ||
9688 | _ACEOF | |
9689 | ||
9690 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9691 | # Split the substitutions into bite-sized pieces for seds with | |
9692 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9693 | ac_max_sed_lines=48 | |
9694 | ac_sed_frag=1 # Number of current file. | |
9695 | ac_beg=1 # First line for current file. | |
9696 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
9697 | ac_more_lines=: | |
9698 | ac_sed_cmds= | |
9699 | while $ac_more_lines; do | |
9700 | if test $ac_beg -gt 1; then | |
9701 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
9702 | else | |
9703 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
9704 | fi | |
9705 | if test ! -s $tmp/subs.frag; then | |
9706 | ac_more_lines=false | |
9707 | else | |
9708 | # The purpose of the label and of the branching condition is to | |
9709 | # speed up the sed processing (if there are no `@' at all, there | |
9710 | # is no need to browse any of the substitutions). | |
9711 | # These are the two extra sed commands mentioned above. | |
9712 | (echo ':t | |
9713 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
9714 | if test -z "$ac_sed_cmds"; then | |
58670637 | 9715 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
2299a76d | 9716 | else |
58670637 | 9717 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
2299a76d DJ |
9718 | fi |
9719 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
9720 | ac_beg=$ac_end | |
9721 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
9722 | fi | |
9723 | done | |
9724 | if test -z "$ac_sed_cmds"; then | |
9725 | ac_sed_cmds=cat | |
252b5132 | 9726 | fi |
2299a76d | 9727 | fi # test -n "$CONFIG_FILES" |
252b5132 | 9728 | |
2299a76d DJ |
9729 | _ACEOF |
9730 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9731 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
9732 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9733 | case $ac_file in | |
9734 | - | *:- | *:-:* ) # input from stdin | |
58670637 DD |
9735 | cat >$tmp/stdin |
9736 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
9737 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
2299a76d | 9738 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
58670637 | 9739 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
2299a76d | 9740 | * ) ac_file_in=$ac_file.in ;; |
252b5132 RH |
9741 | esac |
9742 | ||
2299a76d DJ |
9743 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
9744 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
9745 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9746 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
9747 | X"$ac_file" : 'X\(//\)$' \| \ | |
9748 | X"$ac_file" : 'X\(/\)' \| \ | |
9749 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9750 | echo X"$ac_file" | |
9751 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9752 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9753 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9754 | /^X\(\/\).*/{ s//\1/; q; } | |
9755 | s/.*/./; q'` | |
9756 | { if $as_mkdir_p; then | |
9757 | mkdir -p "$ac_dir" | |
9758 | else | |
9759 | as_dir="$ac_dir" | |
9760 | as_dirs= | |
9761 | while test ! -d "$as_dir"; do | |
9762 | as_dirs="$as_dir $as_dirs" | |
9763 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
9764 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9765 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
9766 | X"$as_dir" : 'X\(//\)$' \| \ | |
9767 | X"$as_dir" : 'X\(/\)' \| \ | |
9768 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9769 | echo X"$as_dir" | |
9770 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9771 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9772 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9773 | /^X\(\/\).*/{ s//\1/; q; } | |
9774 | s/.*/./; q'` | |
9775 | done | |
9776 | test ! -n "$as_dirs" || mkdir $as_dirs | |
9777 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
9778 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
9779 | { (exit 1); exit 1; }; }; } | |
9780 | ||
9781 | ac_builddir=. | |
252b5132 | 9782 | |
2299a76d DJ |
9783 | if test "$ac_dir" != .; then |
9784 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
9785 | # A "../" for each directory in $ac_dir_suffix. | |
9786 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
9787 | else | |
9788 | ac_dir_suffix= ac_top_builddir= | |
9789 | fi | |
9790 | ||
9791 | case $srcdir in | |
9792 | .) # No --srcdir option. We are building in place. | |
9793 | ac_srcdir=. | |
9794 | if test -z "$ac_top_builddir"; then | |
9795 | ac_top_srcdir=. | |
9796 | else | |
9797 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
9798 | fi ;; | |
9799 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
9800 | ac_srcdir=$srcdir$ac_dir_suffix; | |
9801 | ac_top_srcdir=$srcdir ;; | |
9802 | *) # Relative path. | |
9803 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
9804 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
9805 | esac | |
85f969cd DD |
9806 | |
9807 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
9808 | # the directories may not exist. | |
9809 | case `pwd` in | |
9810 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 9811 | *) |
85f969cd DD |
9812 | case "$ac_dir" in |
9813 | .) ac_abs_builddir=`pwd`;; | |
9814 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
9815 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
9816 | esac;; |
9817 | esac | |
85f969cd | 9818 | case $ac_abs_builddir in |
58670637 DD |
9819 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
9820 | *) | |
9821 | case ${ac_top_builddir}. in | |
85f969cd | 9822 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 9823 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 9824 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
9825 | esac;; |
9826 | esac | |
85f969cd | 9827 | case $ac_abs_builddir in |
58670637 DD |
9828 | .) ac_abs_srcdir=$ac_srcdir;; |
9829 | *) | |
9830 | case $ac_srcdir in | |
85f969cd | 9831 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 9832 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 9833 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
9834 | esac;; |
9835 | esac | |
85f969cd | 9836 | case $ac_abs_builddir in |
58670637 DD |
9837 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
9838 | *) | |
9839 | case $ac_top_srcdir in | |
85f969cd | 9840 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 9841 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 9842 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
9843 | esac;; |
9844 | esac | |
2299a76d DJ |
9845 | |
9846 | ||
9847 | case $INSTALL in | |
9848 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
9849 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | |
252b5132 RH |
9850 | esac |
9851 | ||
fd7d450d DD |
9852 | if test x"$ac_file" != x-; then |
9853 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
9854 | echo "$as_me: creating $ac_file" >&6;} | |
9855 | rm -f "$ac_file" | |
9856 | fi | |
2299a76d DJ |
9857 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
9858 | # use $as_me), people would be surprised to read: | |
9859 | # /* config.h. Generated by config.status. */ | |
9860 | if test x"$ac_file" = x-; then | |
9861 | configure_input= | |
9862 | else | |
9863 | configure_input="$ac_file. " | |
9864 | fi | |
9865 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
58670637 | 9866 | sed 's,.*/,,'` by configure." |
2299a76d DJ |
9867 | |
9868 | # First look for the input files in the build tree, otherwise in the | |
9869 | # src tree. | |
9870 | ac_file_inputs=`IFS=: | |
9871 | for f in $ac_file_in; do | |
9872 | case $f in | |
9873 | -) echo $tmp/stdin ;; | |
9874 | [\\/$]*) | |
58670637 DD |
9875 | # Absolute (can't be DOS-style, as IFS=:) |
9876 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9877 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9878 | { (exit 1); exit 1; }; } | |
58670637 | 9879 | echo "$f";; |
2299a76d | 9880 | *) # Relative |
58670637 DD |
9881 | if test -f "$f"; then |
9882 | # Build tree | |
9883 | echo "$f" | |
9884 | elif test -f "$srcdir/$f"; then | |
9885 | # Source tree | |
9886 | echo "$srcdir/$f" | |
9887 | else | |
9888 | # /dev/null tree | |
9889 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9890 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9891 | { (exit 1); exit 1; }; } | |
58670637 | 9892 | fi;; |
2299a76d DJ |
9893 | esac |
9894 | done` || { (exit 1); exit 1; } | |
9895 | _ACEOF | |
9896 | cat >>$CONFIG_STATUS <<_ACEOF | |
9897 | sed "$ac_vpsub | |
9898 | $extrasub | |
9899 | _ACEOF | |
9900 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9901 | :t | |
9902 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
9903 | s,@configure_input@,$configure_input,;t t | |
9904 | s,@srcdir@,$ac_srcdir,;t t | |
9905 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
9906 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
9907 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
9908 | s,@builddir@,$ac_builddir,;t t | |
9909 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
9910 | s,@top_builddir@,$ac_top_builddir,;t t | |
9911 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
9912 | s,@INSTALL@,$ac_INSTALL,;t t | |
9913 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
9914 | rm -f $tmp/stdin | |
9915 | if test x"$ac_file" != x-; then | |
9916 | mv $tmp/out $ac_file | |
9917 | else | |
9918 | cat $tmp/out | |
9919 | rm -f $tmp/out | |
9920 | fi | |
9921 | ||
9922 | done | |
9923 | _ACEOF | |
9924 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9925 | ||
9926 | # | |
9927 | # CONFIG_HEADER section. | |
9928 | # | |
252b5132 RH |
9929 | |
9930 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9931 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9932 | # | |
9933 | # ac_d sets the value in "#define NAME VALUE" lines. | |
58670637 DD |
9934 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9935 | ac_dB='[ ].*$,\1#\2' | |
2299a76d DJ |
9936 | ac_dC=' ' |
9937 | ac_dD=',;t' | |
9938 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
58670637 | 9939 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
2299a76d | 9940 | ac_uB='$,\1#\2define\3' |
252b5132 | 9941 | ac_uC=' ' |
2299a76d DJ |
9942 | ac_uD=',;t' |
9943 | ||
9944 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
252b5132 | 9945 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
2299a76d DJ |
9946 | case $ac_file in |
9947 | - | *:- | *:-:* ) # input from stdin | |
58670637 DD |
9948 | cat >$tmp/stdin |
9949 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
9950 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
2299a76d | 9951 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
58670637 | 9952 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
2299a76d | 9953 | * ) ac_file_in=$ac_file.in ;; |
252b5132 RH |
9954 | esac |
9955 | ||
2299a76d DJ |
9956 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
9957 | echo "$as_me: creating $ac_file" >&6;} | |
9958 | ||
9959 | # First look for the input files in the build tree, otherwise in the | |
9960 | # src tree. | |
9961 | ac_file_inputs=`IFS=: | |
9962 | for f in $ac_file_in; do | |
9963 | case $f in | |
9964 | -) echo $tmp/stdin ;; | |
9965 | [\\/$]*) | |
58670637 DD |
9966 | # Absolute (can't be DOS-style, as IFS=:) |
9967 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9968 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9969 | { (exit 1); exit 1; }; } | |
58670637 DD |
9970 | # Do quote $f, to prevent DOS paths from being IFS'd. |
9971 | echo "$f";; | |
2299a76d | 9972 | *) # Relative |
58670637 DD |
9973 | if test -f "$f"; then |
9974 | # Build tree | |
9975 | echo "$f" | |
9976 | elif test -f "$srcdir/$f"; then | |
9977 | # Source tree | |
9978 | echo "$srcdir/$f" | |
9979 | else | |
9980 | # /dev/null tree | |
9981 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9982 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9983 | { (exit 1); exit 1; }; } | |
58670637 | 9984 | fi;; |
2299a76d DJ |
9985 | esac |
9986 | done` || { (exit 1); exit 1; } | |
9987 | # Remove the trailing spaces. | |
58670637 | 9988 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
2299a76d DJ |
9989 | |
9990 | _ACEOF | |
9991 | ||
9992 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
9993 | # `conftest.undefs', that substitutes the proper values into | |
9994 | # config.h.in to produce config.h. The first handles `#define' | |
9995 | # templates, and the second `#undef' templates. | |
9996 | # And first: Protect against being on the right side of a sed subst in | |
9997 | # config.status. Protect against being in an unquoted here document | |
9998 | # in config.status. | |
9999 | rm -f conftest.defines conftest.undefs | |
10000 | # Using a here document instead of a string reduces the quoting nightmare. | |
10001 | # Putting comments in sed scripts is not portable. | |
10002 | # | |
10003 | # `end' is used to avoid that the second main sed command (meant for | |
10004 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
10005 | # See the Autoconf documentation for `clear'. | |
10006 | cat >confdef2sed.sed <<\_ACEOF | |
10007 | s/[\\&,]/\\&/g | |
10008 | s,[\\$`],\\&,g | |
10009 | t clear | |
10010 | : clear | |
58670637 | 10011 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
2299a76d | 10012 | t end |
58670637 | 10013 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
2299a76d DJ |
10014 | : end |
10015 | _ACEOF | |
10016 | # If some macros were called several times there might be several times | |
10017 | # the same #defines, which is useless. Nevertheless, we may not want to | |
10018 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
10019 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
10020 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
10021 | rm -f confdef2sed.sed | |
252b5132 RH |
10022 | |
10023 | # This sed command replaces #undef with comments. This is necessary, for | |
10024 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10025 | # on some systems where configure will not decide to define it. | |
2299a76d | 10026 | cat >>conftest.undefs <<\_ACEOF |
58670637 | 10027 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
2299a76d DJ |
10028 | _ACEOF |
10029 | ||
10030 | # Break up conftest.defines because some shells have a limit on the size | |
10031 | # of here documents, and old seds have small limits too (100 cmds). | |
10032 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
58670637 | 10033 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
2299a76d DJ |
10034 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
10035 | echo ' :' >>$CONFIG_STATUS | |
10036 | rm -f conftest.tail | |
10037 | while grep . conftest.defines >/dev/null | |
10038 | do | |
10039 | # Write a limited-size here document to $tmp/defines.sed. | |
10040 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
10041 | # Speed up: don't consider the non `#define' lines. | |
58670637 | 10042 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
2299a76d DJ |
10043 | # Work around the forget-to-reset-the-flag bug. |
10044 | echo 't clr' >>$CONFIG_STATUS | |
10045 | echo ': clr' >>$CONFIG_STATUS | |
10046 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
10047 | echo 'CEOF | |
10048 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
10049 | rm -f $tmp/in | |
10050 | mv $tmp/out $tmp/in | |
10051 | ' >>$CONFIG_STATUS | |
10052 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
10053 | rm -f conftest.defines | |
10054 | mv conftest.tail conftest.defines | |
10055 | done | |
10056 | rm -f conftest.defines | |
10057 | echo ' fi # grep' >>$CONFIG_STATUS | |
10058 | echo >>$CONFIG_STATUS | |
252b5132 | 10059 | |
2299a76d DJ |
10060 | # Break up conftest.undefs because some shells have a limit on the size |
10061 | # of here documents, and old seds have small limits too (100 cmds). | |
10062 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
252b5132 | 10063 | rm -f conftest.tail |
2299a76d | 10064 | while grep . conftest.undefs >/dev/null |
252b5132 | 10065 | do |
2299a76d DJ |
10066 | # Write a limited-size here document to $tmp/undefs.sed. |
10067 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
10068 | # Speed up: don't consider the non `#undef' | |
58670637 | 10069 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
2299a76d DJ |
10070 | # Work around the forget-to-reset-the-flag bug. |
10071 | echo 't clr' >>$CONFIG_STATUS | |
10072 | echo ': clr' >>$CONFIG_STATUS | |
10073 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
252b5132 | 10074 | echo 'CEOF |
2299a76d DJ |
10075 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
10076 | rm -f $tmp/in | |
10077 | mv $tmp/out $tmp/in | |
10078 | ' >>$CONFIG_STATUS | |
10079 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
10080 | rm -f conftest.undefs | |
10081 | mv conftest.tail conftest.undefs | |
10082 | done | |
10083 | rm -f conftest.undefs | |
10084 | ||
10085 | cat >>$CONFIG_STATUS <<\_ACEOF | |
10086 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
10087 | # use $as_me), people would be surprised to read: | |
10088 | # /* config.h. Generated by config.status. */ | |
10089 | if test x"$ac_file" = x-; then | |
10090 | echo "/* Generated by configure. */" >$tmp/config.h | |
252b5132 | 10091 | else |
2299a76d | 10092 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
252b5132 | 10093 | fi |
2299a76d DJ |
10094 | cat $tmp/in >>$tmp/config.h |
10095 | rm -f $tmp/in | |
10096 | if test x"$ac_file" != x-; then | |
10097 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
10098 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
10099 | echo "$as_me: $ac_file is unchanged" >&6;} | |
10100 | else | |
10101 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
10102 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
10103 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
10104 | X"$ac_file" : 'X\(//\)$' \| \ | |
10105 | X"$ac_file" : 'X\(/\)' \| \ | |
10106 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
10107 | echo X"$ac_file" | |
10108 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
10109 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
10110 | /^X\(\/\/\)$/{ s//\1/; q; } | |
10111 | /^X\(\/\).*/{ s//\1/; q; } | |
10112 | s/.*/./; q'` | |
10113 | { if $as_mkdir_p; then | |
10114 | mkdir -p "$ac_dir" | |
10115 | else | |
10116 | as_dir="$ac_dir" | |
10117 | as_dirs= | |
10118 | while test ! -d "$as_dir"; do | |
10119 | as_dirs="$as_dir $as_dirs" | |
10120 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
10121 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
10122 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
10123 | X"$as_dir" : 'X\(//\)$' \| \ | |
10124 | X"$as_dir" : 'X\(/\)' \| \ | |
10125 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
10126 | echo X"$as_dir" | |
10127 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
10128 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
10129 | /^X\(\/\/\)$/{ s//\1/; q; } | |
10130 | /^X\(\/\).*/{ s//\1/; q; } | |
10131 | s/.*/./; q'` | |
10132 | done | |
10133 | test ! -n "$as_dirs" || mkdir $as_dirs | |
10134 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
10135 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
10136 | { (exit 1); exit 1; }; }; } | |
252b5132 | 10137 | |
2299a76d DJ |
10138 | rm -f $ac_file |
10139 | mv $tmp/config.h $ac_file | |
10140 | fi | |
10141 | else | |
10142 | cat $tmp/config.h | |
10143 | rm -f $tmp/config.h | |
10144 | fi | |
10145 | done | |
10146 | _ACEOF | |
10147 | cat >>$CONFIG_STATUS <<\_ACEOF | |
252b5132 | 10148 | |
2299a76d DJ |
10149 | # |
10150 | # CONFIG_COMMANDS section. | |
10151 | # | |
10152 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
10153 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
10154 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
10155 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
10156 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
10157 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
10158 | X"$ac_dest" : 'X\(//\)$' \| \ | |
10159 | X"$ac_dest" : 'X\(/\)' \| \ | |
10160 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
10161 | echo X"$ac_dest" | |
10162 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
10163 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
10164 | /^X\(\/\/\)$/{ s//\1/; q; } | |
10165 | /^X\(\/\).*/{ s//\1/; q; } | |
10166 | s/.*/./; q'` | |
58670637 DD |
10167 | { if $as_mkdir_p; then |
10168 | mkdir -p "$ac_dir" | |
10169 | else | |
10170 | as_dir="$ac_dir" | |
10171 | as_dirs= | |
10172 | while test ! -d "$as_dir"; do | |
10173 | as_dirs="$as_dir $as_dirs" | |
10174 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
10175 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
10176 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
10177 | X"$as_dir" : 'X\(//\)$' \| \ | |
10178 | X"$as_dir" : 'X\(/\)' \| \ | |
10179 | . : '\(.\)' 2>/dev/null || | |
10180 | echo X"$as_dir" | | |
10181 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
10182 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
10183 | /^X\(\/\/\)$/{ s//\1/; q; } | |
10184 | /^X\(\/\).*/{ s//\1/; q; } | |
10185 | s/.*/./; q'` | |
10186 | done | |
10187 | test ! -n "$as_dirs" || mkdir $as_dirs | |
10188 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
10189 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
10190 | { (exit 1); exit 1; }; }; } | |
10191 | ||
2299a76d DJ |
10192 | ac_builddir=. |
10193 | ||
10194 | if test "$ac_dir" != .; then | |
10195 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
10196 | # A "../" for each directory in $ac_dir_suffix. | |
10197 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
10198 | else | |
10199 | ac_dir_suffix= ac_top_builddir= | |
10200 | fi | |
10201 | ||
10202 | case $srcdir in | |
10203 | .) # No --srcdir option. We are building in place. | |
10204 | ac_srcdir=. | |
10205 | if test -z "$ac_top_builddir"; then | |
10206 | ac_top_srcdir=. | |
10207 | else | |
10208 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
10209 | fi ;; | |
10210 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
10211 | ac_srcdir=$srcdir$ac_dir_suffix; | |
10212 | ac_top_srcdir=$srcdir ;; | |
10213 | *) # Relative path. | |
10214 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
10215 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
10216 | esac | |
85f969cd DD |
10217 | |
10218 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
10219 | # the directories may not exist. | |
10220 | case `pwd` in | |
10221 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 10222 | *) |
85f969cd DD |
10223 | case "$ac_dir" in |
10224 | .) ac_abs_builddir=`pwd`;; | |
10225 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
10226 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
10227 | esac;; |
10228 | esac | |
85f969cd | 10229 | case $ac_abs_builddir in |
58670637 DD |
10230 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
10231 | *) | |
10232 | case ${ac_top_builddir}. in | |
85f969cd | 10233 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 10234 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 10235 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
10236 | esac;; |
10237 | esac | |
85f969cd | 10238 | case $ac_abs_builddir in |
58670637 DD |
10239 | .) ac_abs_srcdir=$ac_srcdir;; |
10240 | *) | |
10241 | case $ac_srcdir in | |
85f969cd | 10242 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 10243 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 10244 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
10245 | esac;; |
10246 | esac | |
85f969cd | 10247 | case $ac_abs_builddir in |
58670637 DD |
10248 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
10249 | *) | |
10250 | case $ac_top_srcdir in | |
85f969cd | 10251 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 10252 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 10253 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
10254 | esac;; |
10255 | esac | |
2299a76d DJ |
10256 | |
10257 | ||
10258 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
10259 | echo "$as_me: executing $ac_dest commands" >&6;} | |
10260 | case $ac_dest in | |
10261 | default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
252b5132 | 10262 | if test -n "$CONFIG_FILES"; then |
c7efc4d5 | 10263 | if test -n "${with_target_subdir}"; then |
252b5132 RH |
10264 | # FIXME: We shouldn't need to set ac_file |
10265 | ac_file=Makefile | |
52d98c2d | 10266 | LD="${ORIGINAL_LD_FOR_MULTILIBS}" |
252b5132 RH |
10267 | . ${libiberty_topdir}/config-ml.in |
10268 | fi | |
2299a76d DJ |
10269 | fi ;; |
10270 | esac | |
10271 | done | |
10272 | _ACEOF | |
10273 | ||
10274 | cat >>$CONFIG_STATUS <<\_ACEOF | |
10275 | ||
10276 | { (exit 0); exit 0; } | |
10277 | _ACEOF | |
252b5132 | 10278 | chmod +x $CONFIG_STATUS |
2299a76d DJ |
10279 | ac_clean_files=$ac_clean_files_save |
10280 | ||
10281 | ||
10282 | # configure is writing to config.log, and then calls config.status. | |
10283 | # config.status does its own redirection, appending to config.log. | |
10284 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
10285 | # by configure, so config.status won't be able to write to it; its | |
10286 | # output is simply discarded. So we exec the FD to /dev/null, | |
10287 | # effectively closing config.log, so it can be properly (re)opened and | |
10288 | # appended to by config.status. When coming back to configure, we | |
10289 | # need to make the FD available again. | |
10290 | if test "$no_create" != yes; then | |
10291 | ac_cs_success=: | |
10292 | ac_config_status_args= | |
10293 | test "$silent" = yes && | |
10294 | ac_config_status_args="$ac_config_status_args --quiet" | |
10295 | exec 5>/dev/null | |
10296 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
10297 | exec 5>>config.log | |
10298 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
10299 | # would make configure fail if this is the last instruction. | |
10300 | $ac_cs_success || { (exit 1); exit 1; } | |
10301 | fi | |
252b5132 | 10302 |