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 | ||
46a10049 | 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 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 | |
850 | --enable-install-libiberty Install headers for end users | |
851 | ||
852 | Optional Packages: | |
853 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
854 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
855 | --with-target-subdir=SUBDIR Configuring in a subdirectory for target | |
856 | --with-build-subdir=SUBDIR Configuring in a subdirectory for build | |
857 | --with-cross-host=HOST Configuring with a cross compiler | |
858 | --with-newlib Configuring with newlib | |
859 | ||
860 | Some influential environment variables: | |
861 | CC C compiler command | |
862 | CFLAGS C compiler flags | |
863 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
864 | nonstandard directory <lib dir> | |
865 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
866 | headers in a nonstandard directory <include dir> | |
867 | CPP C preprocessor | |
868 | ||
869 | Use these variables to override the choices made by `configure' or to help | |
870 | it to find libraries and programs with nonstandard names/locations. | |
871 | ||
872 | _ACEOF | |
873 | fi | |
874 | ||
875 | if test "$ac_init_help" = "recursive"; then | |
876 | # If there are subdirs, report their specific --help. | |
877 | ac_popdir=`pwd` | |
878 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
879 | test -d $ac_dir || continue | |
880 | ac_builddir=. | |
881 | ||
882 | if test "$ac_dir" != .; then | |
883 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
884 | # A "../" for each directory in $ac_dir_suffix. | |
885 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
886 | else | |
887 | ac_dir_suffix= ac_top_builddir= | |
888 | fi | |
889 | ||
890 | case $srcdir in | |
891 | .) # No --srcdir option. We are building in place. | |
892 | ac_srcdir=. | |
893 | if test -z "$ac_top_builddir"; then | |
894 | ac_top_srcdir=. | |
895 | else | |
896 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
897 | fi ;; | |
898 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
899 | ac_srcdir=$srcdir$ac_dir_suffix; | |
900 | ac_top_srcdir=$srcdir ;; | |
901 | *) # Relative path. | |
902 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
903 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
904 | esac | |
85f969cd DD |
905 | |
906 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
907 | # the directories may not exist. | |
908 | case `pwd` in | |
909 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 910 | *) |
85f969cd DD |
911 | case "$ac_dir" in |
912 | .) ac_abs_builddir=`pwd`;; | |
913 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
914 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
915 | esac;; |
916 | esac | |
85f969cd | 917 | case $ac_abs_builddir in |
58670637 DD |
918 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
919 | *) | |
920 | case ${ac_top_builddir}. in | |
85f969cd | 921 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 922 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 923 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
924 | esac;; |
925 | esac | |
85f969cd | 926 | case $ac_abs_builddir in |
58670637 DD |
927 | .) ac_abs_srcdir=$ac_srcdir;; |
928 | *) | |
929 | case $ac_srcdir in | |
85f969cd | 930 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 931 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 932 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
933 | esac;; |
934 | esac | |
85f969cd | 935 | case $ac_abs_builddir in |
58670637 DD |
936 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
937 | *) | |
938 | case $ac_top_srcdir in | |
85f969cd | 939 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 940 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 941 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
942 | esac;; |
943 | esac | |
2299a76d DJ |
944 | |
945 | cd $ac_dir | |
946 | # Check for guested configure; otherwise get Cygnus style configure. | |
947 | if test -f $ac_srcdir/configure.gnu; then | |
948 | echo | |
949 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
950 | elif test -f $ac_srcdir/configure; then | |
951 | echo | |
952 | $SHELL $ac_srcdir/configure --help=recursive | |
953 | elif test -f $ac_srcdir/configure.ac || | |
58670637 | 954 | test -f $ac_srcdir/configure.in; then |
2299a76d DJ |
955 | echo |
956 | $ac_configure --help | |
957 | else | |
958 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
959 | fi | |
a4e5c0d8 | 960 | cd "$ac_popdir" |
2299a76d DJ |
961 | done |
962 | fi | |
963 | ||
964 | test -n "$ac_init_help" && exit 0 | |
965 | if $ac_init_version; then | |
966 | cat <<\_ACEOF | |
967 | ||
58670637 | 968 | Copyright (C) 2003 Free Software Foundation, Inc. |
2299a76d DJ |
969 | This configure script is free software; the Free Software Foundation |
970 | gives unlimited permission to copy, distribute and modify it. | |
971 | _ACEOF | |
972 | exit 0 | |
973 | fi | |
974 | exec 5>config.log | |
975 | cat >&5 <<_ACEOF | |
976 | This file contains any messages produced by compilers while | |
977 | running configure, to aid debugging if configure makes a mistake. | |
978 | ||
979 | It was created by $as_me, which was | |
85f969cd | 980 | generated by GNU Autoconf 2.59. Invocation command line was |
2299a76d DJ |
981 | |
982 | $ $0 $@ | |
983 | ||
984 | _ACEOF | |
985 | { | |
986 | cat <<_ASUNAME | |
987 | ## --------- ## | |
988 | ## Platform. ## | |
989 | ## --------- ## | |
990 | ||
991 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
992 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
993 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
994 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
995 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
996 | ||
997 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
998 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
999 | ||
1000 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1001 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1002 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1003 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1004 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1005 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1006 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1007 | ||
1008 | _ASUNAME | |
1009 | ||
1010 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1011 | for as_dir in $PATH | |
1012 | do | |
1013 | IFS=$as_save_IFS | |
1014 | test -z "$as_dir" && as_dir=. | |
1015 | echo "PATH: $as_dir" | |
1016 | done | |
1017 | ||
1018 | } >&5 | |
1019 | ||
1020 | cat >&5 <<_ACEOF | |
1021 | ||
1022 | ||
1023 | ## ----------- ## | |
1024 | ## Core tests. ## | |
1025 | ## ----------- ## | |
252b5132 | 1026 | |
2299a76d DJ |
1027 | _ACEOF |
1028 | ||
1029 | ||
1030 | # Keep a trace of the command line. | |
1031 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1032 | # Strip out --silent because we don't want to record it for future runs. | |
1033 | # Also quote any args containing shell meta-characters. | |
1034 | # Make two passes to allow for proper duplicate-argument suppression. | |
1035 | ac_configure_args= | |
1036 | ac_configure_args0= | |
1037 | ac_configure_args1= | |
1038 | ac_sep= | |
1039 | ac_must_keep_next=false | |
1040 | for ac_pass in 1 2 | |
1041 | do | |
1042 | for ac_arg | |
1043 | do | |
1044 | case $ac_arg in | |
1045 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1046 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1047 | | -silent | --silent | --silen | --sile | --sil) | |
1048 | continue ;; | |
1049 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1050 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1051 | esac | |
1052 | case $ac_pass in | |
1053 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1054 | 2) | |
1055 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1056 | if test $ac_must_keep_next = true; then | |
58670637 | 1057 | ac_must_keep_next=false # Got value, back to normal. |
2299a76d | 1058 | else |
58670637 DD |
1059 | case $ac_arg in |
1060 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1061 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1062 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1063 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1064 | case "$ac_configure_args0 " in | |
1065 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1066 | esac | |
1067 | ;; | |
1068 | -* ) ac_must_keep_next=true ;; | |
1069 | esac | |
2299a76d DJ |
1070 | fi |
1071 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1072 | # Get rid of the leading space. | |
1073 | ac_sep=" " | |
1074 | ;; | |
1075 | esac | |
1076 | done | |
1077 | done | |
1078 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1079 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1080 | ||
1081 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1082 | # config.log. We remove comments because anyway the quotes in there | |
1083 | # would cause problems or look ugly. | |
1084 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1085 | # such as our DU 5.0 friend, will then `close' the trap. | |
1086 | trap 'exit_status=$? | |
1087 | # Save into config.log some information that might help in debugging. | |
1088 | { | |
1089 | echo | |
1090 | ||
1091 | cat <<\_ASBOX | |
1092 | ## ---------------- ## | |
1093 | ## Cache variables. ## | |
1094 | ## ---------------- ## | |
1095 | _ASBOX | |
1096 | echo | |
1097 | # The following way of writing the cache mishandles newlines in values, | |
1098 | { | |
1099 | (set) 2>&1 | | |
1100 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1101 | *ac_space=\ *) | |
1102 | sed -n \ | |
58670637 DD |
1103 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1104 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
2299a76d DJ |
1105 | ;; |
1106 | *) | |
1107 | sed -n \ | |
58670637 | 1108 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
2299a76d DJ |
1109 | ;; |
1110 | esac; | |
1111 | } | |
1112 | echo | |
1113 | ||
1114 | cat <<\_ASBOX | |
1115 | ## ----------------- ## | |
1116 | ## Output variables. ## | |
1117 | ## ----------------- ## | |
1118 | _ASBOX | |
1119 | echo | |
1120 | for ac_var in $ac_subst_vars | |
1121 | do | |
1122 | eval ac_val=$`echo $ac_var` | |
1123 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1124 | done | sort | |
1125 | echo | |
1126 | ||
1127 | if test -n "$ac_subst_files"; then | |
1128 | cat <<\_ASBOX | |
1129 | ## ------------- ## | |
1130 | ## Output files. ## | |
1131 | ## ------------- ## | |
1132 | _ASBOX | |
1133 | echo | |
1134 | for ac_var in $ac_subst_files | |
1135 | do | |
1136 | eval ac_val=$`echo $ac_var` | |
58670637 | 1137 | echo "$ac_var='"'"'$ac_val'"'"'" |
2299a76d DJ |
1138 | done | sort |
1139 | echo | |
1140 | fi | |
1141 | ||
1142 | if test -s confdefs.h; then | |
1143 | cat <<\_ASBOX | |
1144 | ## ----------- ## | |
1145 | ## confdefs.h. ## | |
1146 | ## ----------- ## | |
1147 | _ASBOX | |
1148 | echo | |
1149 | sed "/^$/d" confdefs.h | sort | |
1150 | echo | |
1151 | fi | |
1152 | test "$ac_signal" != 0 && | |
1153 | echo "$as_me: caught signal $ac_signal" | |
1154 | echo "$as_me: exit $exit_status" | |
1155 | } >&5 | |
58670637 | 1156 | rm -f core *.core && |
2299a76d DJ |
1157 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1158 | exit $exit_status | |
1159 | ' 0 | |
1160 | for ac_signal in 1 2 13 15; do | |
1161 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1162 | done | |
1163 | ac_signal=0 | |
1164 | ||
1165 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1166 | rm -rf conftest* confdefs.h | |
1167 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1168 | echo >confdefs.h | |
1169 | ||
1170 | # Predefined preprocessor variables. | |
1171 | ||
1172 | cat >>confdefs.h <<_ACEOF | |
1173 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1174 | _ACEOF | |
1175 | ||
1176 | ||
1177 | cat >>confdefs.h <<_ACEOF | |
1178 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1179 | _ACEOF | |
1180 | ||
1181 | ||
1182 | cat >>confdefs.h <<_ACEOF | |
1183 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1184 | _ACEOF | |
1185 | ||
1186 | ||
1187 | cat >>confdefs.h <<_ACEOF | |
1188 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1189 | _ACEOF | |
1190 | ||
1191 | ||
1192 | cat >>confdefs.h <<_ACEOF | |
1193 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1194 | _ACEOF | |
1195 | ||
1196 | ||
1197 | # Let the site file select an alternate cache file if it wants to. | |
252b5132 | 1198 | # Prefer explicitly selected file to automatically selected ones. |
b39b76b8 DD |
1199 | if test -z "$CONFIG_SITE"; then |
1200 | if test "x$prefix" != xNONE; then | |
1201 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1202 | else | |
1203 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
252b5132 RH |
1204 | fi |
1205 | fi | |
1206 | for ac_site_file in $CONFIG_SITE; do | |
1207 | if test -r "$ac_site_file"; then | |
2299a76d DJ |
1208 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 |
1209 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1210 | sed 's/^/| /' "$ac_site_file" >&5 | |
252b5132 RH |
1211 | . "$ac_site_file" |
1212 | fi | |
1213 | done | |
1214 | ||
1215 | if test -r "$cache_file"; then | |
2299a76d DJ |
1216 | # Some versions of bash will fail to source /dev/null (special |
1217 | # files actually), so we avoid doing that. | |
1218 | if test -f "$cache_file"; then | |
1219 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1220 | echo "$as_me: loading cache $cache_file" >&6;} | |
1221 | case $cache_file in | |
1222 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1223 | *) . ./$cache_file;; | |
1224 | esac | |
1225 | fi | |
252b5132 | 1226 | else |
2299a76d DJ |
1227 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 |
1228 | echo "$as_me: creating cache $cache_file" >&6;} | |
1229 | >$cache_file | |
1230 | fi | |
1231 | ||
1232 | # Check that the precious variables saved in the cache have kept the same | |
1233 | # value. | |
1234 | ac_cache_corrupted=false | |
1235 | for ac_var in `(set) 2>&1 | | |
58670637 | 1236 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
2299a76d DJ |
1237 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1238 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1239 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1240 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1241 | case $ac_old_set,$ac_new_set in | |
1242 | set,) | |
1243 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1244 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1245 | ac_cache_corrupted=: ;; | |
1246 | ,set) | |
1247 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1248 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1249 | ac_cache_corrupted=: ;; | |
1250 | ,);; | |
1251 | *) | |
1252 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
58670637 | 1253 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
2299a76d | 1254 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
58670637 | 1255 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
2299a76d | 1256 | echo "$as_me: former value: $ac_old_val" >&2;} |
58670637 | 1257 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
2299a76d | 1258 | echo "$as_me: current value: $ac_new_val" >&2;} |
58670637 | 1259 | ac_cache_corrupted=: |
2299a76d DJ |
1260 | fi;; |
1261 | esac | |
1262 | # Pass precious variables to config.status. | |
1263 | if test "$ac_new_set" = set; then | |
1264 | case $ac_new_val in | |
1265 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1266 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1267 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1268 | esac | |
1269 | case " $ac_configure_args " in | |
1270 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1271 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1272 | esac | |
1273 | fi | |
1274 | done | |
1275 | if $ac_cache_corrupted; then | |
1276 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1277 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1278 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1279 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1280 | { (exit 1); exit 1; }; } | |
252b5132 RH |
1281 | fi |
1282 | ||
1283 | ac_ext=c | |
252b5132 | 1284 | ac_cpp='$CPP $CPPFLAGS' |
2299a76d DJ |
1285 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
1286 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1287 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
252b5132 RH |
1288 | |
1289 | ||
1290 | ||
52d98c2d | 1291 | |
252b5132 | 1292 | |
2299a76d DJ |
1293 | |
1294 | ||
1295 | ||
1296 | ||
1297 | ||
1298 | ||
1299 | ||
1300 | ||
1301 | ||
1302 | ||
1303 | ||
1304 | ||
1305 | ||
1306 | ||
bb6a587d | 1307 | |
2299a76d DJ |
1308 | |
1309 | # This works around the fact that libtool configuration may change LD | |
1310 | # for this particular configuration, but some shells, instead of | |
1311 | # keeping the changes in LD private, export them just because LD is | |
1312 | # exported. We don't use libtool yet, but some day we might, so... | |
1313 | ORIGINAL_LD_FOR_MULTILIBS=$LD | |
1314 | ||
1315 | ||
1316 | # Check whether --with-target-subdir or --without-target-subdir was given. | |
1317 | if test "${with_target_subdir+set}" = set; then | |
1318 | withval="$with_target_subdir" | |
1319 | ||
1320 | fi; | |
1321 | ||
1322 | # Check whether --with-build-subdir or --without-build-subdir was given. | |
1323 | if test "${with_build_subdir+set}" = set; then | |
1324 | withval="$with_build_subdir" | |
1325 | ||
1326 | fi; | |
cfed0715 | 1327 | |
252b5132 RH |
1328 | # Check whether --with-cross-host or --without-cross-host was given. |
1329 | if test "${with_cross_host+set}" = set; then | |
1330 | withval="$with_cross_host" | |
2299a76d DJ |
1331 | |
1332 | fi; | |
252b5132 RH |
1333 | |
1334 | # Check whether --with-newlib or --without-newlib was given. | |
1335 | if test "${with_newlib+set}" = set; then | |
1336 | withval="$with_newlib" | |
252b5132 | 1337 | |
2299a76d | 1338 | fi; |
252b5132 RH |
1339 | |
1340 | if test "${srcdir}" = "."; then | |
cfed0715 DD |
1341 | if test -n "${with_build_subdir}"; then |
1342 | libiberty_topdir="${srcdir}/../.." | |
1343 | with_target_subdir= | |
1344 | elif test -z "${with_target_subdir}"; then | |
252b5132 RH |
1345 | libiberty_topdir="${srcdir}/.." |
1346 | else | |
1347 | if test "${with_target_subdir}" != "."; then | |
1348 | libiberty_topdir="${srcdir}/${with_multisrctop}../.." | |
1349 | else | |
1350 | libiberty_topdir="${srcdir}/${with_multisrctop}.." | |
1351 | fi | |
1352 | fi | |
1353 | else | |
1354 | libiberty_topdir="${srcdir}/.." | |
1355 | fi | |
85b9a938 | 1356 | |
252b5132 RH |
1357 | ac_aux_dir= |
1358 | for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do | |
1359 | if test -f $ac_dir/install-sh; then | |
1360 | ac_aux_dir=$ac_dir | |
1361 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1362 | break | |
1363 | elif test -f $ac_dir/install.sh; then | |
1364 | ac_aux_dir=$ac_dir | |
1365 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1366 | break | |
2299a76d DJ |
1367 | elif test -f $ac_dir/shtool; then |
1368 | ac_aux_dir=$ac_dir | |
1369 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1370 | break | |
252b5132 RH |
1371 | fi |
1372 | done | |
1373 | if test -z "$ac_aux_dir"; then | |
2299a76d DJ |
1374 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5 |
1375 | echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;} | |
1376 | { (exit 1); exit 1; }; } | |
252b5132 | 1377 | fi |
2299a76d DJ |
1378 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" |
1379 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1380 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
252b5132 RH |
1381 | |
1382 | ||
1383 | ||
2299a76d DJ |
1384 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
1385 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
39423523 DD |
1386 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
1387 | if test "${enable_maintainer_mode+set}" = set; then | |
1388 | enableval="$enable_maintainer_mode" | |
1389 | maintainer_mode=$enableval | |
1390 | else | |
1391 | maintainer_mode=no | |
2299a76d | 1392 | fi; |
39423523 | 1393 | |
2299a76d DJ |
1394 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
1395 | echo "${ECHO_T}$maintainer_mode" >&6 | |
39423523 DD |
1396 | |
1397 | if test "$maintainer_mode" = "yes"; then | |
1398 | MAINT='' | |
1399 | NOTMAINT='#' | |
1400 | else | |
1401 | MAINT='#' | |
1402 | NOTMAINT='' | |
1403 | fi | |
1404 | ||
da191b5b DD |
1405 | # Do we have a single-tree copy of texinfo? Even if we do, we can't |
1406 | # rely on it - libiberty is built before texinfo. | |
1407 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
39423523 | 1408 | set dummy makeinfo; ac_word=$2 |
2299a76d DJ |
1409 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1410 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1411 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
1412 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39423523 DD |
1413 | else |
1414 | if test -n "$MAKEINFO"; then | |
1415 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
1416 | else | |
2299a76d DJ |
1417 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1418 | for as_dir in $PATH | |
1419 | do | |
1420 | IFS=$as_save_IFS | |
1421 | test -z "$as_dir" && as_dir=. | |
1422 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1423 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1424 | ac_cv_prog_MAKEINFO="makeinfo" | |
1425 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1426 | break 2 | |
1427 | fi | |
1428 | done | |
1429 | done | |
1430 | ||
39423523 DD |
1431 | fi |
1432 | fi | |
2299a76d | 1433 | MAKEINFO=$ac_cv_prog_MAKEINFO |
39423523 | 1434 | if test -n "$MAKEINFO"; then |
2299a76d DJ |
1435 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
1436 | echo "${ECHO_T}$MAKEINFO" >&6 | |
39423523 | 1437 | else |
2299a76d DJ |
1438 | echo "$as_me:$LINENO: result: no" >&5 |
1439 | echo "${ECHO_T}no" >&6 | |
39423523 DD |
1440 | fi |
1441 | ||
1a78a35a DD |
1442 | if test "x$MAKEINFO" = "x"; then |
1443 | MAKEINFO="@echo makeinfo missing; true" | |
da191b5b | 1444 | BUILD_INFO= |
1a78a35a DD |
1445 | else |
1446 | BUILD_INFO=info | |
b7ca9213 L |
1447 | case "$MAKEINFO" in |
1448 | */missing\ makeinfo*) | |
1a78a35a | 1449 | BUILD_INFO= |
2299a76d | 1450 | { echo "$as_me:$LINENO: WARNING: |
b7ca9213 L |
1451 | *** Makeinfo is missing. Info documentation will not be built." >&5 |
1452 | echo "$as_me: WARNING: | |
1453 | *** Makeinfo is missing. Info documentation will not be built." >&2;} | |
1454 | ;; | |
1455 | *) | |
1456 | case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in | |
1457 | x*\ [1-3].* ) | |
1458 | MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" | |
1459 | BUILD_INFO= | |
1460 | { echo "$as_me:$LINENO: WARNING: | |
2299a76d DJ |
1461 | *** Makeinfo is too old. Info documentation will not be built." >&5 |
1462 | echo "$as_me: WARNING: | |
1463 | *** Makeinfo is too old. Info documentation will not be built." >&2;} | |
b7ca9213 L |
1464 | ;; |
1465 | esac | |
1a78a35a DD |
1466 | ;; |
1467 | esac | |
1468 | fi | |
da191b5b | 1469 | |
39423523 DD |
1470 | |
1471 | ||
1472 | # Extract the first word of "perl", so it can be a program name with args. | |
1473 | set dummy perl; ac_word=$2 | |
2299a76d DJ |
1474 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1475 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1476 | if test "${ac_cv_prog_PERL+set}" = set; then | |
1477 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39423523 DD |
1478 | else |
1479 | if test -n "$PERL"; then | |
1480 | ac_cv_prog_PERL="$PERL" # Let the user override the test. | |
1481 | else | |
2299a76d DJ |
1482 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1483 | for as_dir in $PATH | |
1484 | do | |
1485 | IFS=$as_save_IFS | |
1486 | test -z "$as_dir" && as_dir=. | |
1487 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1488 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1489 | ac_cv_prog_PERL="perl" | |
1490 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1491 | break 2 | |
1492 | fi | |
1493 | done | |
1494 | done | |
1495 | ||
39423523 DD |
1496 | fi |
1497 | fi | |
2299a76d | 1498 | PERL=$ac_cv_prog_PERL |
39423523 | 1499 | if test -n "$PERL"; then |
2299a76d DJ |
1500 | echo "$as_me:$LINENO: result: $PERL" >&5 |
1501 | echo "${ECHO_T}$PERL" >&6 | |
39423523 | 1502 | else |
2299a76d DJ |
1503 | echo "$as_me:$LINENO: result: no" >&5 |
1504 | echo "${ECHO_T}no" >&6 | |
39423523 DD |
1505 | fi |
1506 | ||
1507 | if test x"$PERL" = x""; then | |
1508 | HAVE_PERL='#' | |
1509 | else | |
1510 | HAVE_PERL='' | |
1511 | fi | |
1512 | ||
1513 | ||
252b5132 | 1514 | # Make sure we can run config.sub. |
2299a76d DJ |
1515 | $ac_config_sub sun4 >/dev/null 2>&1 || |
1516 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1517 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1518 | { (exit 1); exit 1; }; } | |
252b5132 | 1519 | |
2299a76d DJ |
1520 | echo "$as_me:$LINENO: checking build system type" >&5 |
1521 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1522 | if test "${ac_cv_build+set}" = set; then | |
1523 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1524 | else | |
1525 | ac_cv_build_alias=$build_alias | |
1526 | test -z "$ac_cv_build_alias" && | |
1527 | ac_cv_build_alias=`$ac_config_guess` | |
1528 | test -z "$ac_cv_build_alias" && | |
1529 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1530 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1531 | { (exit 1); exit 1; }; } | |
1532 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1533 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1534 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1535 | { (exit 1); exit 1; }; } | |
252b5132 | 1536 | |
2299a76d DJ |
1537 | fi |
1538 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1539 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1540 | build=$ac_cv_build | |
1541 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1542 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1543 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
252b5132 RH |
1544 | |
1545 | ||
2299a76d DJ |
1546 | echo "$as_me:$LINENO: checking host system type" >&5 |
1547 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1548 | if test "${ac_cv_host+set}" = set; then | |
1549 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1550 | else | |
1551 | ac_cv_host_alias=$host_alias | |
1552 | test -z "$ac_cv_host_alias" && | |
1553 | ac_cv_host_alias=$ac_cv_build_alias | |
1554 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1555 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1556 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1557 | { (exit 1); exit 1; }; } | |
252b5132 | 1558 | |
2299a76d DJ |
1559 | fi |
1560 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1561 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1562 | host=$ac_cv_host | |
1563 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1564 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1565 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
252b5132 | 1566 | |
252b5132 | 1567 | |
252b5132 | 1568 | |
252b5132 | 1569 | |
2299a76d DJ |
1570 | if test -n "$ac_tool_prefix"; then |
1571 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
252b5132 | 1572 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
2299a76d DJ |
1573 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1574 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1575 | if test "${ac_cv_prog_AR+set}" = set; then | |
1576 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1577 | else |
1578 | if test -n "$AR"; then | |
1579 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1580 | else | |
2299a76d DJ |
1581 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1582 | for as_dir in $PATH | |
1583 | do | |
1584 | IFS=$as_save_IFS | |
1585 | test -z "$as_dir" && as_dir=. | |
1586 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1587 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1588 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1589 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1590 | break 2 | |
1591 | fi | |
1592 | done | |
1593 | done | |
1594 | ||
252b5132 RH |
1595 | fi |
1596 | fi | |
2299a76d | 1597 | AR=$ac_cv_prog_AR |
252b5132 | 1598 | if test -n "$AR"; then |
2299a76d DJ |
1599 | echo "$as_me:$LINENO: result: $AR" >&5 |
1600 | echo "${ECHO_T}$AR" >&6 | |
252b5132 | 1601 | else |
2299a76d DJ |
1602 | echo "$as_me:$LINENO: result: no" >&5 |
1603 | echo "${ECHO_T}no" >&6 | |
1604 | fi | |
1605 | ||
252b5132 | 1606 | fi |
2299a76d DJ |
1607 | if test -z "$ac_cv_prog_AR"; then |
1608 | ac_ct_AR=$AR | |
1609 | # Extract the first word of "ar", so it can be a program name with args. | |
1610 | set dummy ar; ac_word=$2 | |
1611 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1612 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1613 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then | |
1614 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1615 | else | |
1616 | if test -n "$ac_ct_AR"; then | |
1617 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
1618 | else | |
1619 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1620 | for as_dir in $PATH | |
1621 | do | |
1622 | IFS=$as_save_IFS | |
1623 | test -z "$as_dir" && as_dir=. | |
1624 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1625 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1626 | ac_cv_prog_ac_ct_AR="ar" | |
1627 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1628 | break 2 | |
1629 | fi | |
1630 | done | |
1631 | done | |
252b5132 | 1632 | |
2299a76d DJ |
1633 | fi |
1634 | fi | |
1635 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
1636 | if test -n "$ac_ct_AR"; then | |
1637 | echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 | |
1638 | echo "${ECHO_T}$ac_ct_AR" >&6 | |
1639 | else | |
1640 | echo "$as_me:$LINENO: result: no" >&5 | |
1641 | echo "${ECHO_T}no" >&6 | |
1642 | fi | |
252b5132 | 1643 | |
2299a76d DJ |
1644 | AR=$ac_ct_AR |
1645 | else | |
1646 | AR="$ac_cv_prog_AR" | |
1647 | fi | |
252b5132 | 1648 | |
2299a76d DJ |
1649 | if test -n "$ac_tool_prefix"; then |
1650 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
252b5132 | 1651 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
2299a76d DJ |
1652 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1653 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1654 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
1655 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1656 | else |
1657 | if test -n "$RANLIB"; then | |
1658 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1659 | else | |
2299a76d DJ |
1660 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1661 | for as_dir in $PATH | |
1662 | do | |
1663 | IFS=$as_save_IFS | |
1664 | test -z "$as_dir" && as_dir=. | |
1665 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1666 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1667 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1668 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1669 | break 2 | |
1670 | fi | |
1671 | done | |
1672 | done | |
1673 | ||
252b5132 RH |
1674 | fi |
1675 | fi | |
2299a76d | 1676 | RANLIB=$ac_cv_prog_RANLIB |
252b5132 | 1677 | if test -n "$RANLIB"; then |
2299a76d DJ |
1678 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
1679 | echo "${ECHO_T}$RANLIB" >&6 | |
252b5132 | 1680 | else |
2299a76d DJ |
1681 | echo "$as_me:$LINENO: result: no" >&5 |
1682 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1683 | fi |
1684 | ||
2299a76d | 1685 | fi |
252b5132 | 1686 | if test -z "$ac_cv_prog_RANLIB"; then |
2299a76d | 1687 | ac_ct_RANLIB=$RANLIB |
252b5132 RH |
1688 | # Extract the first word of "ranlib", so it can be a program name with args. |
1689 | set dummy ranlib; ac_word=$2 | |
2299a76d DJ |
1690 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1691 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1692 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
1693 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 1694 | else |
2299a76d DJ |
1695 | if test -n "$ac_ct_RANLIB"; then |
1696 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
252b5132 | 1697 | else |
2299a76d DJ |
1698 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1699 | for as_dir in $PATH | |
1700 | do | |
1701 | IFS=$as_save_IFS | |
1702 | test -z "$as_dir" && as_dir=. | |
1703 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1704 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1705 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
1706 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1707 | break 2 | |
1708 | fi | |
1709 | done | |
1710 | done | |
1711 | ||
1712 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
252b5132 RH |
1713 | fi |
1714 | fi | |
2299a76d DJ |
1715 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
1716 | if test -n "$ac_ct_RANLIB"; then | |
1717 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
1718 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
252b5132 | 1719 | else |
2299a76d DJ |
1720 | echo "$as_me:$LINENO: result: no" >&5 |
1721 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1722 | fi |
1723 | ||
2299a76d | 1724 | RANLIB=$ac_ct_RANLIB |
252b5132 | 1725 | else |
2299a76d | 1726 | RANLIB="$ac_cv_prog_RANLIB" |
252b5132 RH |
1727 | fi |
1728 | ||
1729 | ||
0c0a36a4 | 1730 | |
2299a76d DJ |
1731 | ac_ext=c |
1732 | ac_cpp='$CPP $CPPFLAGS' | |
1733 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1734 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1735 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1736 | if test -n "$ac_tool_prefix"; then | |
1737 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1738 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1739 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1740 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1741 | if test "${ac_cv_prog_CC+set}" = set; then | |
1742 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1743 | else | |
1744 | if test -n "$CC"; then | |
1745 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1746 | else | |
1747 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1748 | for as_dir in $PATH | |
1749 | do | |
1750 | IFS=$as_save_IFS | |
1751 | test -z "$as_dir" && as_dir=. | |
1752 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1753 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1754 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1755 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1756 | break 2 | |
1757 | fi | |
1758 | done | |
1759 | done | |
1760 | ||
1761 | fi | |
1762 | fi | |
1763 | CC=$ac_cv_prog_CC | |
1764 | if test -n "$CC"; then | |
1765 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1766 | echo "${ECHO_T}$CC" >&6 | |
1767 | else | |
1768 | echo "$as_me:$LINENO: result: no" >&5 | |
1769 | echo "${ECHO_T}no" >&6 | |
1770 | fi | |
1771 | ||
1772 | fi | |
1773 | if test -z "$ac_cv_prog_CC"; then | |
1774 | ac_ct_CC=$CC | |
1775 | # Extract the first word of "gcc", so it can be a program name with args. | |
252b5132 | 1776 | set dummy gcc; ac_word=$2 |
2299a76d DJ |
1777 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1778 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1779 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1780 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1781 | else | |
1782 | if test -n "$ac_ct_CC"; then | |
1783 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1784 | else | |
1785 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1786 | for as_dir in $PATH | |
1787 | do | |
1788 | IFS=$as_save_IFS | |
1789 | test -z "$as_dir" && as_dir=. | |
1790 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1791 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1792 | ac_cv_prog_ac_ct_CC="gcc" | |
1793 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1794 | break 2 | |
1795 | fi | |
1796 | done | |
1797 | done | |
1798 | ||
1799 | fi | |
1800 | fi | |
1801 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1802 | if test -n "$ac_ct_CC"; then | |
1803 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1804 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1805 | else | |
1806 | echo "$as_me:$LINENO: result: no" >&5 | |
1807 | echo "${ECHO_T}no" >&6 | |
1808 | fi | |
1809 | ||
1810 | CC=$ac_ct_CC | |
1811 | else | |
1812 | CC="$ac_cv_prog_CC" | |
1813 | fi | |
1814 | ||
1815 | if test -z "$CC"; then | |
1816 | if test -n "$ac_tool_prefix"; then | |
1817 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1818 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1819 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1820 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1821 | if test "${ac_cv_prog_CC+set}" = set; then | |
1822 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1823 | else |
1824 | if test -n "$CC"; then | |
1825 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1826 | else | |
2299a76d DJ |
1827 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1828 | for as_dir in $PATH | |
1829 | do | |
1830 | IFS=$as_save_IFS | |
1831 | test -z "$as_dir" && as_dir=. | |
1832 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1833 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1834 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1835 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1836 | break 2 | |
1837 | fi | |
1838 | done | |
1839 | done | |
1840 | ||
252b5132 RH |
1841 | fi |
1842 | fi | |
2299a76d | 1843 | CC=$ac_cv_prog_CC |
252b5132 | 1844 | if test -n "$CC"; then |
2299a76d DJ |
1845 | echo "$as_me:$LINENO: result: $CC" >&5 |
1846 | echo "${ECHO_T}$CC" >&6 | |
1847 | else | |
1848 | echo "$as_me:$LINENO: result: no" >&5 | |
1849 | echo "${ECHO_T}no" >&6 | |
1850 | fi | |
1851 | ||
1852 | fi | |
1853 | if test -z "$ac_cv_prog_CC"; then | |
1854 | ac_ct_CC=$CC | |
1855 | # Extract the first word of "cc", so it can be a program name with args. | |
1856 | set dummy cc; ac_word=$2 | |
1857 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1858 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1859 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1860 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1861 | else | |
1862 | if test -n "$ac_ct_CC"; then | |
1863 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
252b5132 | 1864 | else |
2299a76d DJ |
1865 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1866 | for as_dir in $PATH | |
1867 | do | |
1868 | IFS=$as_save_IFS | |
1869 | test -z "$as_dir" && as_dir=. | |
1870 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1871 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1872 | ac_cv_prog_ac_ct_CC="cc" | |
1873 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1874 | break 2 | |
1875 | fi | |
1876 | done | |
1877 | done | |
1878 | ||
1879 | fi | |
1880 | fi | |
1881 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1882 | if test -n "$ac_ct_CC"; then | |
1883 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1884 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1885 | else | |
1886 | echo "$as_me:$LINENO: result: no" >&5 | |
1887 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1888 | fi |
1889 | ||
2299a76d DJ |
1890 | CC=$ac_ct_CC |
1891 | else | |
1892 | CC="$ac_cv_prog_CC" | |
1893 | fi | |
1894 | ||
1895 | fi | |
252b5132 RH |
1896 | if test -z "$CC"; then |
1897 | # Extract the first word of "cc", so it can be a program name with args. | |
1898 | set dummy cc; ac_word=$2 | |
2299a76d DJ |
1899 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1900 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1901 | if test "${ac_cv_prog_CC+set}" = set; then | |
1902 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
1903 | else |
1904 | if test -n "$CC"; then | |
1905 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1906 | else | |
252b5132 | 1907 | ac_prog_rejected=no |
2299a76d DJ |
1908 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1909 | for as_dir in $PATH | |
1910 | do | |
1911 | IFS=$as_save_IFS | |
1912 | test -z "$as_dir" && as_dir=. | |
1913 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1914 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1915 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1916 | ac_prog_rejected=yes | |
1917 | continue | |
1918 | fi | |
1919 | ac_cv_prog_CC="cc" | |
1920 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1921 | break 2 | |
1922 | fi | |
1923 | done | |
1924 | done | |
1925 | ||
252b5132 RH |
1926 | if test $ac_prog_rejected = yes; then |
1927 | # We found a bogon in the path, so make sure we never use it. | |
1928 | set dummy $ac_cv_prog_CC | |
1929 | shift | |
2299a76d | 1930 | if test $# != 0; then |
252b5132 RH |
1931 | # We chose a different compiler from the bogus one. |
1932 | # However, it has the same basename, so the bogon will be chosen | |
1933 | # first if we set CC to just the basename; use the full file name. | |
1934 | shift | |
2299a76d | 1935 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
252b5132 RH |
1936 | fi |
1937 | fi | |
1938 | fi | |
1939 | fi | |
2299a76d | 1940 | CC=$ac_cv_prog_CC |
252b5132 | 1941 | if test -n "$CC"; then |
2299a76d DJ |
1942 | echo "$as_me:$LINENO: result: $CC" >&5 |
1943 | echo "${ECHO_T}$CC" >&6 | |
252b5132 | 1944 | else |
2299a76d DJ |
1945 | echo "$as_me:$LINENO: result: no" >&5 |
1946 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
1947 | fi |
1948 | ||
252b5132 | 1949 | fi |
2299a76d DJ |
1950 | if test -z "$CC"; then |
1951 | if test -n "$ac_tool_prefix"; then | |
1952 | for ac_prog in cl | |
1953 | do | |
1954 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
1955 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
1956 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1957 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1958 | if test "${ac_cv_prog_CC+set}" = set; then | |
1959 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 1960 | else |
2299a76d DJ |
1961 | if test -n "$CC"; then |
1962 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
252b5132 | 1963 | else |
2299a76d DJ |
1964 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1965 | for as_dir in $PATH | |
1966 | do | |
1967 | IFS=$as_save_IFS | |
1968 | test -z "$as_dir" && as_dir=. | |
1969 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1970 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1971 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
1972 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1973 | break 2 | |
1974 | fi | |
1975 | done | |
1976 | done | |
1977 | ||
252b5132 RH |
1978 | fi |
1979 | fi | |
2299a76d DJ |
1980 | CC=$ac_cv_prog_CC |
1981 | if test -n "$CC"; then | |
1982 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1983 | echo "${ECHO_T}$CC" >&6 | |
252b5132 | 1984 | else |
2299a76d DJ |
1985 | echo "$as_me:$LINENO: result: no" >&5 |
1986 | echo "${ECHO_T}no" >&6 | |
252b5132 | 1987 | fi |
252b5132 | 1988 | |
2299a76d DJ |
1989 | test -n "$CC" && break |
1990 | done | |
252b5132 | 1991 | fi |
2299a76d DJ |
1992 | if test -z "$CC"; then |
1993 | ac_ct_CC=$CC | |
1994 | for ac_prog in cl | |
1995 | do | |
1996 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1997 | set dummy $ac_prog; ac_word=$2 | |
1998 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1999 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2000 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2001 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2002 | else | |
2003 | if test -n "$ac_ct_CC"; then | |
2004 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2005 | else | |
2006 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2007 | for as_dir in $PATH | |
2008 | do | |
2009 | IFS=$as_save_IFS | |
2010 | test -z "$as_dir" && as_dir=. | |
2011 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2012 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2013 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2014 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2015 | break 2 | |
252b5132 | 2016 | fi |
2299a76d DJ |
2017 | done |
2018 | done | |
2019 | ||
2020 | fi | |
2021 | fi | |
2022 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2023 | if test -n "$ac_ct_CC"; then | |
2024 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2025 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
252b5132 | 2026 | else |
2299a76d DJ |
2027 | echo "$as_me:$LINENO: result: no" >&5 |
2028 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
2029 | fi |
2030 | ||
2299a76d DJ |
2031 | test -n "$ac_ct_CC" && break |
2032 | done | |
252b5132 | 2033 | |
2299a76d DJ |
2034 | CC=$ac_ct_CC |
2035 | fi | |
2036 | ||
2037 | fi | |
2038 | ||
2039 | ||
2040 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2041 | See \`config.log' for more details." >&5 | |
2042 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2043 | See \`config.log' for more details." >&2;} | |
2044 | { (exit 1); exit 1; }; } | |
2045 | ||
2046 | # Provide some information about the compiler. | |
2047 | echo "$as_me:$LINENO:" \ | |
2048 | "checking for C compiler version" >&5 | |
2049 | ac_compiler=`set X $ac_compile; echo $2` | |
2050 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2051 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2052 | ac_status=$? | |
2053 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2054 | (exit $ac_status); } | |
2055 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2056 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2057 | ac_status=$? | |
2058 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2059 | (exit $ac_status); } | |
2060 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2061 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2062 | ac_status=$? | |
2063 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2064 | (exit $ac_status); } | |
2065 | ||
2066 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2067 | /* confdefs.h. */ |
2068 | _ACEOF | |
2069 | cat confdefs.h >>conftest.$ac_ext | |
2070 | cat >>conftest.$ac_ext <<_ACEOF | |
2071 | /* end confdefs.h. */ | |
92655e19 | 2072 | |
2299a76d DJ |
2073 | int |
2074 | main () | |
2075 | { | |
2076 | ||
2077 | ; | |
2078 | return 0; | |
2079 | } | |
2080 | _ACEOF | |
2081 | # FIXME: Cleanup? | |
2082 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2083 | (eval $ac_link) 2>&5 | |
2084 | ac_status=$? | |
2085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2086 | (exit $ac_status); }; then | |
2087 | gcc_no_link=no | |
2088 | else | |
2089 | gcc_no_link=yes | |
2090 | fi | |
2091 | ||
2092 | if test x$gcc_no_link = xyes; then | |
2093 | # Setting cross_compile will disable run tests; it will | |
2094 | # also disable AC_CHECK_FILE but that's generally | |
2095 | # correct if we can't link. | |
2096 | cross_compiling=yes | |
2097 | EXEEXT= | |
2098 | else | |
2099 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2100 | /* confdefs.h. */ |
2101 | _ACEOF | |
2102 | cat confdefs.h >>conftest.$ac_ext | |
2103 | cat >>conftest.$ac_ext <<_ACEOF | |
2104 | /* end confdefs.h. */ | |
2105 | ||
2106 | int | |
2107 | main () | |
2108 | { | |
2109 | ||
2110 | ; | |
2111 | return 0; | |
2112 | } | |
2113 | _ACEOF | |
2114 | ac_clean_files_save=$ac_clean_files | |
2115 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2116 | # Try to create an executable without -o first, disregard a.out. | |
2117 | # It will help us diagnose broken compilers, and finding out an intuition | |
2118 | # of exeext. | |
58670637 DD |
2119 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2120 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
2299a76d DJ |
2121 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2122 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2123 | (eval $ac_link_default) 2>&5 | |
2124 | ac_status=$? | |
2125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2126 | (exit $ac_status); }; then | |
2127 | # Find the output, starting from the most likely. This scheme is | |
2128 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2129 | # resort. | |
2130 | ||
2131 | # Be careful to initialize this variable, since it used to be cached. | |
2132 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2133 | ac_cv_exeext= | |
2134 | # b.out is created by i960 compilers. | |
2135 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2136 | do | |
2137 | test -f "$ac_file" || continue | |
2138 | case $ac_file in | |
2139 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
58670637 | 2140 | ;; |
2299a76d | 2141 | conftest.$ac_ext ) |
58670637 DD |
2142 | # This is the source file. |
2143 | ;; | |
2299a76d | 2144 | [ab].out ) |
58670637 DD |
2145 | # We found the default executable, but exeext='' is most |
2146 | # certainly right. | |
2147 | break;; | |
2299a76d | 2148 | *.* ) |
58670637 DD |
2149 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2150 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2151 | # but it would be cool to find out if it's true. Does anybody | |
2152 | # maintain Libtool? --akim. | |
2153 | export ac_cv_exeext | |
2154 | break;; | |
2299a76d | 2155 | * ) |
58670637 | 2156 | break;; |
2299a76d DJ |
2157 | esac |
2158 | done | |
b39b76b8 | 2159 | else |
2299a76d DJ |
2160 | echo "$as_me: failed program was:" >&5 |
2161 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2162 | ||
2163 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2164 | See \`config.log' for more details." >&5 | |
2165 | echo "$as_me: error: C compiler cannot create executables | |
2166 | See \`config.log' for more details." >&2;} | |
2167 | { (exit 77); exit 77; }; } | |
2168 | fi | |
2169 | ||
2170 | ac_exeext=$ac_cv_exeext | |
2171 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2172 | echo "${ECHO_T}$ac_file" >&6 | |
2173 | ||
2174 | # Check the compiler produces executables we can run. If not, either | |
2175 | # the compiler is broken, or we cross compile. | |
2176 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2177 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2178 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2179 | # If not cross compiling, check that we can run a simple program. | |
2180 | if test "$cross_compiling" != yes; then | |
2181 | if { ac_try='./$ac_file' | |
2182 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2183 | (eval $ac_try) 2>&5 | |
2184 | ac_status=$? | |
2185 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2186 | (exit $ac_status); }; }; then | |
2187 | cross_compiling=no | |
2188 | else | |
2189 | if test "$cross_compiling" = maybe; then | |
2190 | cross_compiling=yes | |
2191 | else | |
2192 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2193 | If you meant to cross compile, use \`--host'. | |
2194 | See \`config.log' for more details." >&5 | |
2195 | echo "$as_me: error: cannot run C compiled programs. | |
2196 | If you meant to cross compile, use \`--host'. | |
2197 | See \`config.log' for more details." >&2;} | |
2198 | { (exit 1); exit 1; }; } | |
b39b76b8 DD |
2199 | fi |
2200 | fi | |
2299a76d DJ |
2201 | fi |
2202 | echo "$as_me:$LINENO: result: yes" >&5 | |
2203 | echo "${ECHO_T}yes" >&6 | |
2204 | ||
2205 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2206 | ac_clean_files=$ac_clean_files_save | |
2207 | # Check the compiler produces executables we can run. If not, either | |
2208 | # the compiler is broken, or we cross compile. | |
2209 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2210 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2211 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2212 | echo "${ECHO_T}$cross_compiling" >&6 | |
2213 | ||
2214 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2215 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2216 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2217 | (eval $ac_link) 2>&5 | |
2218 | ac_status=$? | |
2219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2220 | (exit $ac_status); }; then | |
2221 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2222 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2223 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2224 | # `rm'. | |
2225 | for ac_file in conftest.exe conftest conftest.*; do | |
2226 | test -f "$ac_file" || continue | |
2227 | case $ac_file in | |
2228 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2229 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
58670637 DD |
2230 | export ac_cv_exeext |
2231 | break;; | |
2299a76d DJ |
2232 | * ) break;; |
2233 | esac | |
2234 | done | |
b39b76b8 | 2235 | else |
2299a76d DJ |
2236 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2237 | See \`config.log' for more details." >&5 | |
2238 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2239 | See \`config.log' for more details." >&2;} | |
2240 | { (exit 1); exit 1; }; } | |
b39b76b8 | 2241 | fi |
b39b76b8 | 2242 | |
2299a76d DJ |
2243 | rm -f conftest$ac_cv_exeext |
2244 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2245 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2246 | ||
2247 | rm -f conftest.$ac_ext | |
2248 | EXEEXT=$ac_cv_exeext | |
2249 | ac_exeext=$EXEEXT | |
b39b76b8 | 2250 | fi |
2299a76d DJ |
2251 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
2252 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2253 | if test "${ac_cv_objext+set}" = set; then | |
2254 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
b39b76b8 | 2255 | else |
2299a76d | 2256 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
2257 | /* confdefs.h. */ |
2258 | _ACEOF | |
2259 | cat confdefs.h >>conftest.$ac_ext | |
2260 | cat >>conftest.$ac_ext <<_ACEOF | |
2261 | /* end confdefs.h. */ | |
b39b76b8 | 2262 | |
2299a76d DJ |
2263 | int |
2264 | main () | |
2265 | { | |
b39b76b8 | 2266 | |
2299a76d DJ |
2267 | ; |
2268 | return 0; | |
2269 | } | |
2270 | _ACEOF | |
2271 | rm -f conftest.o conftest.obj | |
2272 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2273 | (eval $ac_compile) 2>&5 | |
2274 | ac_status=$? | |
2275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2276 | (exit $ac_status); }; then | |
2277 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2278 | case $ac_file in | |
2279 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2280 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2281 | break;; | |
2282 | esac | |
2283 | done | |
b39b76b8 | 2284 | else |
2299a76d DJ |
2285 | echo "$as_me: failed program was:" >&5 |
2286 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2287 | ||
2288 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2289 | See \`config.log' for more details." >&5 | |
2290 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2291 | See \`config.log' for more details." >&2;} | |
2292 | { (exit 1); exit 1; }; } | |
2293 | fi | |
2294 | ||
2295 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
b39b76b8 | 2296 | fi |
2299a76d DJ |
2297 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
2298 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2299 | OBJEXT=$ac_cv_objext | |
2300 | ac_objext=$OBJEXT | |
2301 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2302 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2303 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2304 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2305 | else | |
2306 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2307 | /* confdefs.h. */ |
2308 | _ACEOF | |
2309 | cat confdefs.h >>conftest.$ac_ext | |
2310 | cat >>conftest.$ac_ext <<_ACEOF | |
2311 | /* end confdefs.h. */ | |
2312 | ||
2313 | int | |
2314 | main () | |
2315 | { | |
2316 | #ifndef __GNUC__ | |
2317 | choke me | |
2318 | #endif | |
b39b76b8 | 2319 | |
2299a76d DJ |
2320 | ; |
2321 | return 0; | |
2322 | } | |
2323 | _ACEOF | |
2324 | rm -f conftest.$ac_objext | |
2325 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2326 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2327 | ac_status=$? |
58670637 DD |
2328 | grep -v '^ *+' conftest.er1 >conftest.err |
2329 | rm -f conftest.er1 | |
2330 | cat conftest.err >&5 | |
2299a76d DJ |
2331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2332 | (exit $ac_status); } && | |
a4e5c0d8 | 2333 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2334 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2335 | (eval $ac_try) 2>&5 | |
2336 | ac_status=$? | |
2337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2338 | (exit $ac_status); }; } && | |
2339 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2340 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2341 | (eval $ac_try) 2>&5 | |
2342 | ac_status=$? | |
2343 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2344 | (exit $ac_status); }; }; then | |
2345 | ac_compiler_gnu=yes | |
2346 | else | |
2347 | echo "$as_me: failed program was:" >&5 | |
2348 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2349 | ||
2350 | ac_compiler_gnu=no | |
2351 | fi | |
58670637 | 2352 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2353 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2354 | ||
2355 | fi | |
2356 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2357 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2358 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2359 | ac_test_CFLAGS=${CFLAGS+set} | |
2360 | ac_save_CFLAGS=$CFLAGS | |
2361 | CFLAGS="-g" | |
2362 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2363 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2364 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2365 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2366 | else | |
2367 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2368 | /* confdefs.h. */ |
2369 | _ACEOF | |
2370 | cat confdefs.h >>conftest.$ac_ext | |
2371 | cat >>conftest.$ac_ext <<_ACEOF | |
2372 | /* end confdefs.h. */ | |
b39b76b8 | 2373 | |
2299a76d DJ |
2374 | int |
2375 | main () | |
2376 | { | |
b39b76b8 | 2377 | |
2299a76d DJ |
2378 | ; |
2379 | return 0; | |
2380 | } | |
2381 | _ACEOF | |
2382 | rm -f conftest.$ac_objext | |
2383 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2384 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2385 | ac_status=$? |
58670637 DD |
2386 | grep -v '^ *+' conftest.er1 >conftest.err |
2387 | rm -f conftest.er1 | |
2388 | cat conftest.err >&5 | |
2299a76d DJ |
2389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2390 | (exit $ac_status); } && | |
a4e5c0d8 | 2391 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2393 | (eval $ac_try) 2>&5 | |
2394 | ac_status=$? | |
2395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2396 | (exit $ac_status); }; } && | |
2397 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2398 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2399 | (eval $ac_try) 2>&5 | |
2400 | ac_status=$? | |
2401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2402 | (exit $ac_status); }; }; then | |
2403 | ac_cv_prog_cc_g=yes | |
2404 | else | |
2405 | echo "$as_me: failed program was:" >&5 | |
2406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
252b5132 | 2407 | |
2299a76d DJ |
2408 | ac_cv_prog_cc_g=no |
2409 | fi | |
58670637 | 2410 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2411 | fi |
2412 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2413 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
2414 | if test "$ac_test_CFLAGS" = set; then | |
2415 | CFLAGS=$ac_save_CFLAGS | |
2416 | elif test $ac_cv_prog_cc_g = yes; then | |
252b5132 | 2417 | if test "$GCC" = yes; then |
2299a76d | 2418 | CFLAGS="-g -O2" |
252b5132 | 2419 | else |
2299a76d | 2420 | CFLAGS="-g" |
252b5132 RH |
2421 | fi |
2422 | else | |
2299a76d DJ |
2423 | if test "$GCC" = yes; then |
2424 | CFLAGS="-O2" | |
2425 | else | |
2426 | CFLAGS= | |
2427 | fi | |
252b5132 | 2428 | fi |
2299a76d DJ |
2429 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2430 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2431 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2432 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2433 | else | |
2434 | ac_cv_prog_cc_stdc=no | |
2435 | ac_save_CC=$CC | |
2436 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2437 | /* confdefs.h. */ |
2438 | _ACEOF | |
2439 | cat confdefs.h >>conftest.$ac_ext | |
2440 | cat >>conftest.$ac_ext <<_ACEOF | |
2441 | /* end confdefs.h. */ | |
2442 | #include <stdarg.h> | |
2443 | #include <stdio.h> | |
2444 | #include <sys/types.h> | |
2445 | #include <sys/stat.h> | |
2446 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2447 | struct buf { int x; }; | |
2448 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2449 | static char *e (p, i) | |
2450 | char **p; | |
2451 | int i; | |
2452 | { | |
2453 | return p[i]; | |
92655e19 | 2454 | } |
2299a76d DJ |
2455 | static char *f (char * (*g) (char **, int), char **p, ...) |
2456 | { | |
2457 | char *s; | |
2458 | va_list v; | |
2459 | va_start (v,p); | |
2460 | s = g (p, va_arg (v,int)); | |
2461 | va_end (v); | |
2462 | return s; | |
92655e19 | 2463 | } |
58670637 DD |
2464 | |
2465 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2466 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2467 | These don't provoke an error unfortunately, instead are silently treated | |
2468 | as 'x'. The following induces an error, until -std1 is added to get | |
2469 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2470 | array size at least. It's necessary to write '\x00'==0 to get something | |
2471 | that's true only with -std1. */ | |
2472 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2473 | ||
2299a76d DJ |
2474 | int test (int i, double x); |
2475 | struct s1 {int (*f) (int a);}; | |
2476 | struct s2 {int (*f) (double a);}; | |
2477 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2478 | int argc; | |
2479 | char **argv; | |
2480 | int | |
2481 | main () | |
2482 | { | |
2483 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2484 | ; | |
2485 | return 0; | |
92655e19 | 2486 | } |
2299a76d DJ |
2487 | _ACEOF |
2488 | # Don't try gcc -ansi; that turns off useful extensions and | |
2489 | # breaks some systems' header files. | |
2490 | # AIX -qlanglvl=ansi | |
2491 | # Ultrix and OSF/1 -std1 | |
2492 | # HP-UX 10.20 and later -Ae | |
2493 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2494 | # SVR4 -Xc -D__EXTENSIONS__ | |
2495 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2496 | do | |
2497 | CC="$ac_save_CC $ac_arg" | |
2498 | rm -f conftest.$ac_objext | |
2499 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2500 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2501 | ac_status=$? |
58670637 DD |
2502 | grep -v '^ *+' conftest.er1 >conftest.err |
2503 | rm -f conftest.er1 | |
2504 | cat conftest.err >&5 | |
2299a76d DJ |
2505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2506 | (exit $ac_status); } && | |
a4e5c0d8 | 2507 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2508 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2509 | (eval $ac_try) 2>&5 | |
2510 | ac_status=$? | |
2511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2512 | (exit $ac_status); }; } && | |
2513 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2514 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2515 | (eval $ac_try) 2>&5 | |
2516 | ac_status=$? | |
2517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2518 | (exit $ac_status); }; }; then | |
2519 | ac_cv_prog_cc_stdc=$ac_arg | |
2520 | break | |
2521 | else | |
2522 | echo "$as_me: failed program was:" >&5 | |
2523 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2524 | ||
2525 | fi | |
58670637 | 2526 | rm -f conftest.err conftest.$ac_objext |
2299a76d DJ |
2527 | done |
2528 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2529 | CC=$ac_save_CC | |
2530 | ||
2531 | fi | |
2532 | ||
2533 | case "x$ac_cv_prog_cc_stdc" in | |
2534 | x|xno) | |
2535 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2536 | echo "${ECHO_T}none needed" >&6 ;; | |
2537 | *) | |
2538 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2539 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2540 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2541 | esac | |
2542 | ||
2543 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2544 | # in C++ we need to declare it. In case someone uses the same compiler | |
2545 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2546 | # the declaration of exit, since it's the most demanding environment. | |
2547 | cat >conftest.$ac_ext <<_ACEOF | |
2548 | #ifndef __cplusplus | |
2549 | choke me | |
2550 | #endif | |
2551 | _ACEOF | |
2552 | rm -f conftest.$ac_objext | |
2553 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2554 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2555 | ac_status=$? |
58670637 DD |
2556 | grep -v '^ *+' conftest.er1 >conftest.err |
2557 | rm -f conftest.er1 | |
2558 | cat conftest.err >&5 | |
2299a76d DJ |
2559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2560 | (exit $ac_status); } && | |
a4e5c0d8 | 2561 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2562 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2563 | (eval $ac_try) 2>&5 | |
2564 | ac_status=$? | |
2565 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2566 | (exit $ac_status); }; } && | |
2567 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2568 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2569 | (eval $ac_try) 2>&5 | |
2570 | ac_status=$? | |
2571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2572 | (exit $ac_status); }; }; then | |
2573 | for ac_declaration in \ | |
58670637 | 2574 | '' \ |
2299a76d DJ |
2575 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2576 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2577 | 'extern "C" void exit (int) throw ();' \ | |
2578 | 'extern "C" void exit (int);' \ | |
2579 | 'void exit (int);' | |
2580 | do | |
2581 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
2582 | /* confdefs.h. */ |
2583 | _ACEOF | |
2584 | cat confdefs.h >>conftest.$ac_ext | |
2585 | cat >>conftest.$ac_ext <<_ACEOF | |
2586 | /* end confdefs.h. */ | |
b7ca9213 | 2587 | $ac_declaration |
58670637 | 2588 | #include <stdlib.h> |
2299a76d DJ |
2589 | int |
2590 | main () | |
2591 | { | |
2592 | exit (42); | |
2593 | ; | |
2594 | return 0; | |
92655e19 | 2595 | } |
2299a76d DJ |
2596 | _ACEOF |
2597 | rm -f conftest.$ac_objext | |
2598 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2599 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2600 | ac_status=$? |
58670637 DD |
2601 | grep -v '^ *+' conftest.er1 >conftest.err |
2602 | rm -f conftest.er1 | |
2603 | cat conftest.err >&5 | |
2299a76d DJ |
2604 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2605 | (exit $ac_status); } && | |
a4e5c0d8 | 2606 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2607 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2608 | (eval $ac_try) 2>&5 | |
2609 | ac_status=$? | |
2610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2611 | (exit $ac_status); }; } && | |
2612 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2614 | (eval $ac_try) 2>&5 | |
2615 | ac_status=$? | |
2616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2617 | (exit $ac_status); }; }; then | |
2618 | : | |
2619 | else | |
2620 | echo "$as_me: failed program was:" >&5 | |
2621 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2622 | ||
2623 | continue | |
2624 | fi | |
58670637 | 2625 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 2626 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
2627 | /* confdefs.h. */ |
2628 | _ACEOF | |
2629 | cat confdefs.h >>conftest.$ac_ext | |
2630 | cat >>conftest.$ac_ext <<_ACEOF | |
2631 | /* end confdefs.h. */ | |
2632 | $ac_declaration | |
2633 | int | |
2634 | main () | |
2635 | { | |
2636 | exit (42); | |
2637 | ; | |
2638 | return 0; | |
92655e19 | 2639 | } |
2299a76d DJ |
2640 | _ACEOF |
2641 | rm -f conftest.$ac_objext | |
2642 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 2643 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 2644 | ac_status=$? |
58670637 DD |
2645 | grep -v '^ *+' conftest.er1 >conftest.err |
2646 | rm -f conftest.er1 | |
2647 | cat conftest.err >&5 | |
2299a76d DJ |
2648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2649 | (exit $ac_status); } && | |
a4e5c0d8 | 2650 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
2651 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2652 | (eval $ac_try) 2>&5 | |
2653 | ac_status=$? | |
2654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2655 | (exit $ac_status); }; } && | |
2656 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
2657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2658 | (eval $ac_try) 2>&5 | |
2659 | ac_status=$? | |
2660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2661 | (exit $ac_status); }; }; then | |
2662 | break | |
2663 | else | |
2664 | echo "$as_me: failed program was:" >&5 | |
2665 | sed 's/^/| /' conftest.$ac_ext >&5 | |
92655e19 | 2666 | |
2299a76d | 2667 | fi |
58670637 | 2668 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2669 | done |
2670 | rm -f conftest* | |
2671 | if test -n "$ac_declaration"; then | |
2672 | echo '#ifdef __cplusplus' >>confdefs.h | |
2673 | echo $ac_declaration >>confdefs.h | |
2674 | echo '#endif' >>confdefs.h | |
2675 | fi | |
2676 | ||
2677 | else | |
2678 | echo "$as_me: failed program was:" >&5 | |
2679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2680 | ||
2681 | fi | |
58670637 | 2682 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
2683 | ac_ext=c |
2684 | ac_cpp='$CPP $CPPFLAGS' | |
2685 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2686 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2687 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2688 | ||
8ddbb593 DJ |
2689 | ac_ext=c |
2690 | ac_cpp='$CPP $CPPFLAGS' | |
2691 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2692 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2693 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2694 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2695 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
2696 | # On Suns, sometimes $CPP names a directory. | |
2697 | if test -n "$CPP" && test -d "$CPP"; then | |
2698 | CPP= | |
2699 | fi | |
2700 | if test -z "$CPP"; then | |
2701 | if test "${ac_cv_prog_CPP+set}" = set; then | |
2702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2703 | else | |
2704 | # Double quotes because CPP needs to be expanded | |
2705 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2706 | do | |
2707 | ac_preproc_ok=false | |
2708 | for ac_c_preproc_warn_flag in '' yes | |
2709 | do | |
2710 | # Use a header file that comes with gcc, so configuring glibc | |
2711 | # with a fresh cross-compiler works. | |
2712 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2713 | # <limits.h> exists even on freestanding compilers. | |
2714 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2715 | # not just through cpp. "Syntax error" is here to catch this case. | |
2716 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2717 | /* confdefs.h. */ |
2718 | _ACEOF | |
2719 | cat confdefs.h >>conftest.$ac_ext | |
2720 | cat >>conftest.$ac_ext <<_ACEOF | |
2721 | /* end confdefs.h. */ | |
2722 | #ifdef __STDC__ | |
2723 | # include <limits.h> | |
2724 | #else | |
2725 | # include <assert.h> | |
2726 | #endif | |
58670637 | 2727 | Syntax error |
8ddbb593 DJ |
2728 | _ACEOF |
2729 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2730 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2731 | ac_status=$? | |
2732 | grep -v '^ *+' conftest.er1 >conftest.err | |
2733 | rm -f conftest.er1 | |
2734 | cat conftest.err >&5 | |
2735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2736 | (exit $ac_status); } >/dev/null; then | |
2737 | if test -s conftest.err; then | |
2738 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2739 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2740 | else |
2741 | ac_cpp_err= | |
2742 | fi | |
2743 | else | |
2744 | ac_cpp_err=yes | |
2745 | fi | |
2746 | if test -z "$ac_cpp_err"; then | |
2747 | : | |
2748 | else | |
2749 | echo "$as_me: failed program was:" >&5 | |
2750 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2751 | ||
2752 | # Broken: fails on valid input. | |
2753 | continue | |
2754 | fi | |
2755 | rm -f conftest.err conftest.$ac_ext | |
2756 | ||
2757 | # OK, works on sane cases. Now check whether non-existent headers | |
2758 | # can be detected and how. | |
2759 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2760 | /* confdefs.h. */ |
2761 | _ACEOF | |
2762 | cat confdefs.h >>conftest.$ac_ext | |
2763 | cat >>conftest.$ac_ext <<_ACEOF | |
2764 | /* end confdefs.h. */ | |
2765 | #include <ac_nonexistent.h> | |
2766 | _ACEOF | |
2767 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2768 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2769 | ac_status=$? | |
2770 | grep -v '^ *+' conftest.er1 >conftest.err | |
2771 | rm -f conftest.er1 | |
2772 | cat conftest.err >&5 | |
2773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2774 | (exit $ac_status); } >/dev/null; then | |
2775 | if test -s conftest.err; then | |
2776 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2777 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2778 | else |
2779 | ac_cpp_err= | |
2780 | fi | |
2781 | else | |
2782 | ac_cpp_err=yes | |
2783 | fi | |
2784 | if test -z "$ac_cpp_err"; then | |
2785 | # Broken: success on invalid input. | |
2786 | continue | |
2787 | else | |
2788 | echo "$as_me: failed program was:" >&5 | |
2789 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2790 | ||
2791 | # Passes both tests. | |
2792 | ac_preproc_ok=: | |
2793 | break | |
2794 | fi | |
2795 | rm -f conftest.err conftest.$ac_ext | |
2796 | ||
2797 | done | |
2798 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2799 | rm -f conftest.err conftest.$ac_ext | |
2800 | if $ac_preproc_ok; then | |
2801 | break | |
2802 | fi | |
2803 | ||
2804 | done | |
2805 | ac_cv_prog_CPP=$CPP | |
2806 | ||
2807 | fi | |
2808 | CPP=$ac_cv_prog_CPP | |
2809 | else | |
2810 | ac_cv_prog_CPP=$CPP | |
2811 | fi | |
2812 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2813 | echo "${ECHO_T}$CPP" >&6 | |
2814 | ac_preproc_ok=false | |
2815 | for ac_c_preproc_warn_flag in '' yes | |
2816 | do | |
2817 | # Use a header file that comes with gcc, so configuring glibc | |
2818 | # with a fresh cross-compiler works. | |
2819 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2820 | # <limits.h> exists even on freestanding compilers. | |
2821 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2822 | # not just through cpp. "Syntax error" is here to catch this case. | |
2823 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2824 | /* confdefs.h. */ |
2825 | _ACEOF | |
2826 | cat confdefs.h >>conftest.$ac_ext | |
2827 | cat >>conftest.$ac_ext <<_ACEOF | |
2828 | /* end confdefs.h. */ | |
2829 | #ifdef __STDC__ | |
2830 | # include <limits.h> | |
2831 | #else | |
2832 | # include <assert.h> | |
2833 | #endif | |
58670637 | 2834 | Syntax error |
8ddbb593 DJ |
2835 | _ACEOF |
2836 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2837 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2838 | ac_status=$? | |
2839 | grep -v '^ *+' conftest.er1 >conftest.err | |
2840 | rm -f conftest.er1 | |
2841 | cat conftest.err >&5 | |
2842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2843 | (exit $ac_status); } >/dev/null; then | |
2844 | if test -s conftest.err; then | |
2845 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2846 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2847 | else |
2848 | ac_cpp_err= | |
2849 | fi | |
2850 | else | |
2851 | ac_cpp_err=yes | |
2852 | fi | |
2853 | if test -z "$ac_cpp_err"; then | |
2854 | : | |
2855 | else | |
2856 | echo "$as_me: failed program was:" >&5 | |
2857 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2858 | ||
2859 | # Broken: fails on valid input. | |
2860 | continue | |
2861 | fi | |
2862 | rm -f conftest.err conftest.$ac_ext | |
2863 | ||
2864 | # OK, works on sane cases. Now check whether non-existent headers | |
2865 | # can be detected and how. | |
2866 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
2867 | /* confdefs.h. */ |
2868 | _ACEOF | |
2869 | cat confdefs.h >>conftest.$ac_ext | |
2870 | cat >>conftest.$ac_ext <<_ACEOF | |
2871 | /* end confdefs.h. */ | |
2872 | #include <ac_nonexistent.h> | |
2873 | _ACEOF | |
2874 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2875 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2876 | ac_status=$? | |
2877 | grep -v '^ *+' conftest.er1 >conftest.err | |
2878 | rm -f conftest.er1 | |
2879 | cat conftest.err >&5 | |
2880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2881 | (exit $ac_status); } >/dev/null; then | |
2882 | if test -s conftest.err; then | |
2883 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 2884 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
2885 | else |
2886 | ac_cpp_err= | |
2887 | fi | |
2888 | else | |
2889 | ac_cpp_err=yes | |
2890 | fi | |
2891 | if test -z "$ac_cpp_err"; then | |
2892 | # Broken: success on invalid input. | |
2893 | continue | |
2894 | else | |
2895 | echo "$as_me: failed program was:" >&5 | |
2896 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2897 | ||
2898 | # Passes both tests. | |
2899 | ac_preproc_ok=: | |
2900 | break | |
2901 | fi | |
2902 | rm -f conftest.err conftest.$ac_ext | |
2903 | ||
2904 | done | |
2905 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2906 | rm -f conftest.err conftest.$ac_ext | |
2907 | if $ac_preproc_ok; then | |
2908 | : | |
2909 | else | |
2910 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check | |
2911 | See \`config.log' for more details." >&5 | |
2912 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
2913 | See \`config.log' for more details." >&2;} | |
2914 | { (exit 1); exit 1; }; } | |
2915 | fi | |
2916 | ||
2917 | ac_ext=c | |
2918 | ac_cpp='$CPP $CPPFLAGS' | |
2919 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2920 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2921 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2922 | ||
2923 | ||
2924 | ac_c_preproc_warn_flag=yes | |
2299a76d | 2925 | |
11a338da | 2926 | if test x$GCC = xyes; then |
aa55ccb1 | 2927 | ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes' |
96e00b33 | 2928 | fi |
11a338da DD |
2929 | |
2930 | ||
46a10049 DD |
2931 | if test "x$CC" != xcc; then |
2932 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2933 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2934 | else | |
2935 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2936 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2937 | fi | |
2938 | set dummy $CC; ac_cc=`echo $2 | | |
2939 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2940 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2941 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2942 | else | |
2943 | cat >conftest.$ac_ext <<_ACEOF | |
2944 | /* confdefs.h. */ | |
2945 | _ACEOF | |
2946 | cat confdefs.h >>conftest.$ac_ext | |
2947 | cat >>conftest.$ac_ext <<_ACEOF | |
2948 | /* end confdefs.h. */ | |
2949 | ||
2950 | int | |
2951 | main () | |
2952 | { | |
2953 | ||
2954 | ; | |
2955 | return 0; | |
2956 | } | |
2957 | _ACEOF | |
2958 | # Make sure it works both with $CC and with simple cc. | |
2959 | # We do the test twice because some compilers refuse to overwrite an | |
2960 | # existing .o file with -o, though they will create one. | |
2961 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2962 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2963 | (eval $ac_try) 2>&5 | |
2964 | ac_status=$? | |
2965 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2966 | (exit $ac_status); } && | |
2967 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2968 | (eval $ac_try) 2>&5 | |
2969 | ac_status=$? | |
2970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2971 | (exit $ac_status); }; | |
2972 | then | |
2973 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2974 | if test "x$CC" != xcc; then | |
2975 | # Test first that cc exists at all. | |
2976 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
2977 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2978 | (eval $ac_try) 2>&5 | |
2979 | ac_status=$? | |
2980 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2981 | (exit $ac_status); }; }; then | |
2982 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2983 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2984 | (eval $ac_try) 2>&5 | |
2985 | ac_status=$? | |
2986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2987 | (exit $ac_status); } && | |
2988 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2989 | (eval $ac_try) 2>&5 | |
2990 | ac_status=$? | |
2991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2992 | (exit $ac_status); }; | |
2993 | then | |
2994 | # cc works too. | |
2995 | : | |
2996 | else | |
2997 | # cc exists but doesn't like -o. | |
2998 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2999 | fi | |
3000 | fi | |
3001 | fi | |
3002 | else | |
3003 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3004 | fi | |
3005 | rm -f conftest* | |
3006 | ||
3007 | fi | |
3008 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
3009 | echo "$as_me:$LINENO: result: yes" >&5 | |
3010 | echo "${ECHO_T}yes" >&6 | |
3011 | else | |
3012 | echo "$as_me:$LINENO: result: no" >&5 | |
3013 | echo "${ECHO_T}no" >&6 | |
3014 | ||
3015 | cat >>confdefs.h <<\_ACEOF | |
3016 | #define NO_MINUS_C_MINUS_O 1 | |
3017 | _ACEOF | |
3018 | ||
3019 | fi | |
3020 | ||
3021 | # autoconf is lame and doesn't give us any substitution variable for this. | |
3022 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
3023 | NO_MINUS_C_MINUS_O=yes | |
3024 | else | |
3025 | OUTPUT_OPTION='-o $@' | |
3026 | fi | |
3027 | ||
3028 | ||
3029 | ||
11a338da DD |
3030 | |
3031 | echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 | |
3032 | echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 | |
3033 | if test "${ac_cv_c_const+set}" = set; then | |
96e00b33 L |
3034 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3035 | else | |
11a338da DD |
3036 | cat >conftest.$ac_ext <<_ACEOF |
3037 | /* confdefs.h. */ | |
3038 | _ACEOF | |
3039 | cat confdefs.h >>conftest.$ac_ext | |
3040 | cat >>conftest.$ac_ext <<_ACEOF | |
3041 | /* end confdefs.h. */ | |
3042 | ||
3043 | int | |
3044 | main () | |
3045 | { | |
3046 | /* FIXME: Include the comments suggested by Paul. */ | |
3047 | #ifndef __cplusplus | |
3048 | /* Ultrix mips cc rejects this. */ | |
3049 | typedef int charset[2]; | |
3050 | const charset x; | |
3051 | /* SunOS 4.1.1 cc rejects this. */ | |
3052 | char const *const *ccp; | |
3053 | char **p; | |
3054 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3055 | struct point {int x, y;}; | |
3056 | static struct point const zero = {0,0}; | |
3057 | /* AIX XL C 1.02.0.0 rejects this. | |
3058 | It does not let you subtract one const X* pointer from another in | |
3059 | an arm of an if-expression whose if-part is not a constant | |
3060 | expression */ | |
3061 | const char *g = "string"; | |
3062 | ccp = &g + (g ? g-g : 0); | |
3063 | /* HPUX 7.0 cc rejects these. */ | |
3064 | ++ccp; | |
3065 | p = (char**) ccp; | |
3066 | ccp = (char const *const *) p; | |
3067 | { /* SCO 3.2v4 cc rejects this. */ | |
3068 | char *t; | |
3069 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3070 | ||
3071 | *t++ = 0; | |
3072 | } | |
3073 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3074 | int x[] = {25, 17}; | |
3075 | const int *foo = &x[0]; | |
3076 | ++foo; | |
3077 | } | |
3078 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3079 | typedef const int *iptr; | |
3080 | iptr p = 0; | |
3081 | ++p; | |
3082 | } | |
3083 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3084 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3085 | struct s { int j; const int *ap[3]; }; | |
3086 | struct s *b; b->j = 5; | |
3087 | } | |
3088 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3089 | const int foo = 10; | |
3090 | } | |
3091 | #endif | |
3092 | ||
3093 | ; | |
3094 | return 0; | |
3095 | } | |
3096 | _ACEOF | |
3097 | rm -f conftest.$ac_objext | |
3098 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3099 | (eval $ac_compile) 2>conftest.er1 | |
3100 | ac_status=$? | |
3101 | grep -v '^ *+' conftest.er1 >conftest.err | |
3102 | rm -f conftest.er1 | |
3103 | cat conftest.err >&5 | |
3104 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3105 | (exit $ac_status); } && | |
a4e5c0d8 | 3106 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
11a338da DD |
3107 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3108 | (eval $ac_try) 2>&5 | |
3109 | ac_status=$? | |
3110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3111 | (exit $ac_status); }; } && | |
3112 | { ac_try='test -s conftest.$ac_objext' | |
3113 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3114 | (eval $ac_try) 2>&5 | |
3115 | ac_status=$? | |
3116 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3117 | (exit $ac_status); }; }; then | |
3118 | ac_cv_c_const=yes | |
96e00b33 | 3119 | else |
11a338da DD |
3120 | echo "$as_me: failed program was:" >&5 |
3121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3122 | ||
3123 | ac_cv_c_const=no | |
96e00b33 | 3124 | fi |
11a338da | 3125 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 3126 | fi |
11a338da DD |
3127 | echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 |
3128 | echo "${ECHO_T}$ac_cv_c_const" >&6 | |
3129 | if test $ac_cv_c_const = no; then | |
3130 | ||
3131 | cat >>confdefs.h <<\_ACEOF | |
3132 | #define const | |
3133 | _ACEOF | |
2299a76d | 3134 | |
96e00b33 | 3135 | fi |
11a338da DD |
3136 | |
3137 | echo "$as_me:$LINENO: checking for inline" >&5 | |
3138 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3139 | if test "${ac_cv_c_inline+set}" = set; then | |
96e00b33 L |
3140 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3141 | else | |
11a338da DD |
3142 | ac_cv_c_inline=no |
3143 | for ac_kw in inline __inline__ __inline; do | |
3144 | cat >conftest.$ac_ext <<_ACEOF | |
3145 | /* confdefs.h. */ | |
3146 | _ACEOF | |
3147 | cat confdefs.h >>conftest.$ac_ext | |
3148 | cat >>conftest.$ac_ext <<_ACEOF | |
3149 | /* end confdefs.h. */ | |
3150 | #ifndef __cplusplus | |
3151 | typedef int foo_t; | |
3152 | static $ac_kw foo_t static_foo () {return 0; } | |
3153 | $ac_kw foo_t foo () {return 0; } | |
3154 | #endif | |
96e00b33 | 3155 | |
11a338da DD |
3156 | _ACEOF |
3157 | rm -f conftest.$ac_objext | |
3158 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3159 | (eval $ac_compile) 2>conftest.er1 | |
3160 | ac_status=$? | |
3161 | grep -v '^ *+' conftest.er1 >conftest.err | |
3162 | rm -f conftest.er1 | |
3163 | cat conftest.err >&5 | |
3164 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3165 | (exit $ac_status); } && | |
a4e5c0d8 | 3166 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
11a338da DD |
3167 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3168 | (eval $ac_try) 2>&5 | |
3169 | ac_status=$? | |
3170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3171 | (exit $ac_status); }; } && | |
3172 | { ac_try='test -s conftest.$ac_objext' | |
3173 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3174 | (eval $ac_try) 2>&5 | |
3175 | ac_status=$? | |
3176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3177 | (exit $ac_status); }; }; then | |
3178 | ac_cv_c_inline=$ac_kw; break | |
2299a76d | 3179 | else |
11a338da DD |
3180 | echo "$as_me: failed program was:" >&5 |
3181 | sed 's/^/| /' conftest.$ac_ext >&5 | |
96e00b33 | 3182 | |
96e00b33 | 3183 | fi |
11a338da DD |
3184 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3185 | done | |
3186 | ||
96e00b33 | 3187 | fi |
11a338da DD |
3188 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3189 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
96e00b33 | 3190 | |
96e00b33 | 3191 | |
11a338da DD |
3192 | case $ac_cv_c_inline in |
3193 | inline | yes) ;; | |
3194 | *) | |
3195 | case $ac_cv_c_inline in | |
3196 | no) ac_val=;; | |
3197 | *) ac_val=$ac_cv_c_inline;; | |
3198 | esac | |
3199 | cat >>confdefs.h <<_ACEOF | |
3200 | #ifndef __cplusplus | |
3201 | #define inline $ac_val | |
3202 | #endif | |
3203 | _ACEOF | |
3204 | ;; | |
3205 | esac | |
96e00b33 | 3206 | |
11a338da DD |
3207 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
3208 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
3209 | if test "${ac_cv_c_bigendian+set}" = set; then | |
96e00b33 L |
3210 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3211 | else | |
0093138c | 3212 | # See if sys/param.h defines the BYTE_ORDER macro. |
11a338da DD |
3213 | cat >conftest.$ac_ext <<_ACEOF |
3214 | /* confdefs.h. */ | |
3215 | _ACEOF | |
3216 | cat confdefs.h >>conftest.$ac_ext | |
3217 | cat >>conftest.$ac_ext <<_ACEOF | |
3218 | /* end confdefs.h. */ | |
3219 | #include <sys/types.h> | |
3220 | #include <sys/param.h> | |
0093138c | 3221 | |
11a338da DD |
3222 | int |
3223 | main () | |
3224 | { | |
11a338da DD |
3225 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3226 | bogus endian macros | |
3227 | #endif | |
0093138c | 3228 | |
11a338da DD |
3229 | ; |
3230 | return 0; | |
3231 | } | |
3232 | _ACEOF | |
3233 | rm -f conftest.$ac_objext | |
3234 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3235 | (eval $ac_compile) 2>conftest.er1 | |
3236 | ac_status=$? | |
3237 | grep -v '^ *+' conftest.er1 >conftest.err | |
3238 | rm -f conftest.er1 | |
46a10049 DD |
3239 | cat conftest.err >&5 |
3240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3241 | (exit $ac_status); } && | |
a4e5c0d8 | 3242 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
46a10049 DD |
3243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3244 | (eval $ac_try) 2>&5 | |
58670637 DD |
3245 | ac_status=$? |
3246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
46a10049 DD |
3247 | (exit $ac_status); }; } && |
3248 | { ac_try='test -s conftest.$ac_objext' | |
3249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3250 | (eval $ac_try) 2>&5 | |
2299a76d DJ |
3251 | ac_status=$? |
3252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
46a10049 DD |
3253 | (exit $ac_status); }; }; then |
3254 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
2299a76d | 3255 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
3256 | /* confdefs.h. */ |
3257 | _ACEOF | |
3258 | cat confdefs.h >>conftest.$ac_ext | |
3259 | cat >>conftest.$ac_ext <<_ACEOF | |
3260 | /* end confdefs.h. */ | |
46a10049 DD |
3261 | #include <sys/types.h> |
3262 | #include <sys/param.h> | |
0093138c | 3263 | |
2299a76d DJ |
3264 | int |
3265 | main () | |
3266 | { | |
46a10049 DD |
3267 | #if BYTE_ORDER != BIG_ENDIAN |
3268 | not big endian | |
3269 | #endif | |
0093138c | 3270 | |
2299a76d DJ |
3271 | ; |
3272 | return 0; | |
3273 | } | |
3274 | _ACEOF | |
46a10049 DD |
3275 | rm -f conftest.$ac_objext |
3276 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3277 | (eval $ac_compile) 2>conftest.er1 | |
2299a76d | 3278 | ac_status=$? |
58670637 DD |
3279 | grep -v '^ *+' conftest.er1 >conftest.err |
3280 | rm -f conftest.er1 | |
3281 | cat conftest.err >&5 | |
2299a76d DJ |
3282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3283 | (exit $ac_status); } && | |
a4e5c0d8 | 3284 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
3285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3286 | (eval $ac_try) 2>&5 | |
3287 | ac_status=$? | |
3288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3289 | (exit $ac_status); }; } && | |
46a10049 | 3290 | { ac_try='test -s conftest.$ac_objext' |
2299a76d DJ |
3291 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3292 | (eval $ac_try) 2>&5 | |
3293 | ac_status=$? | |
3294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3295 | (exit $ac_status); }; }; then | |
46a10049 | 3296 | ac_cv_c_bigendian=yes |
7108c5dc | 3297 | else |
2299a76d DJ |
3298 | echo "$as_me: failed program was:" >&5 |
3299 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3300 | ||
46a10049 | 3301 | ac_cv_c_bigendian=no |
7108c5dc | 3302 | fi |
46a10049 DD |
3303 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3304 | else | |
3305 | echo "$as_me: failed program was:" >&5 | |
3306 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2299a76d | 3307 | |
0093138c DD |
3308 | # It does not; compile a test program. |
3309 | if test "$cross_compiling" = yes; then | |
3310 | # try to guess the endianness by grepping values into an object file | |
3311 | ac_cv_c_bigendian=unknown | |
3312 | cat >conftest.$ac_ext <<_ACEOF | |
3313 | /* confdefs.h. */ | |
3314 | _ACEOF | |
3315 | cat confdefs.h >>conftest.$ac_ext | |
3316 | cat >>conftest.$ac_ext <<_ACEOF | |
3317 | /* end confdefs.h. */ | |
3318 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3319 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3320 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
3321 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3322 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3323 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
3324 | int | |
3325 | main () | |
3326 | { | |
3327 | _ascii (); _ebcdic (); | |
3328 | ; | |
3329 | return 0; | |
3330 | } | |
3331 | _ACEOF | |
3332 | rm -f conftest.$ac_objext | |
3333 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3334 | (eval $ac_compile) 2>conftest.er1 | |
3335 | ac_status=$? | |
3336 | grep -v '^ *+' conftest.er1 >conftest.err | |
3337 | rm -f conftest.er1 | |
3338 | cat conftest.err >&5 | |
3339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3340 | (exit $ac_status); } && | |
a4e5c0d8 | 3341 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
0093138c DD |
3342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3343 | (eval $ac_try) 2>&5 | |
3344 | ac_status=$? | |
3345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3346 | (exit $ac_status); }; } && | |
3347 | { ac_try='test -s conftest.$ac_objext' | |
3348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3349 | (eval $ac_try) 2>&5 | |
3350 | ac_status=$? | |
3351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3352 | (exit $ac_status); }; }; then | |
3353 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
3354 | ac_cv_c_bigendian=yes | |
3355 | fi | |
3356 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
3357 | if test "$ac_cv_c_bigendian" = unknown; then | |
3358 | ac_cv_c_bigendian=no | |
3359 | else | |
3360 | # finding both strings is unlikely to happen, but who knows? | |
3361 | ac_cv_c_bigendian=unknown | |
3362 | fi | |
3363 | fi | |
3364 | else | |
3365 | echo "$as_me: failed program was:" >&5 | |
3366 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3367 | ||
7108c5dc | 3368 | fi |
46a10049 | 3369 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
46a10049 DD |
3370 | else |
3371 | cat >conftest.$ac_ext <<_ACEOF | |
3372 | /* confdefs.h. */ | |
3373 | _ACEOF | |
3374 | cat confdefs.h >>conftest.$ac_ext | |
3375 | cat >>conftest.$ac_ext <<_ACEOF | |
3376 | /* end confdefs.h. */ | |
0093138c DD |
3377 | int |
3378 | main () | |
3379 | { | |
46a10049 DD |
3380 | /* Are we little or big endian? From Harbison&Steele. */ |
3381 | union | |
3382 | { | |
3383 | long l; | |
3384 | char c[sizeof (long)]; | |
3385 | } u; | |
3386 | u.l = 1; | |
3387 | exit (u.c[sizeof (long) - 1] == 1); | |
3388 | } | |
2299a76d | 3389 | _ACEOF |
46a10049 DD |
3390 | rm -f conftest$ac_exeext |
3391 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3392 | (eval $ac_link) 2>&5 | |
3393 | ac_status=$? | |
3394 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3395 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3396 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3397 | (eval $ac_try) 2>&5 | |
3398 | ac_status=$? | |
3399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3400 | (exit $ac_status); }; }; then | |
3401 | ac_cv_c_bigendian=no | |
3402 | else | |
3403 | echo "$as_me: program exited with status $ac_status" >&5 | |
3404 | echo "$as_me: failed program was:" >&5 | |
3405 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2299a76d | 3406 | |
46a10049 DD |
3407 | ( exit $ac_status ) |
3408 | ac_cv_c_bigendian=yes | |
7108c5dc | 3409 | fi |
46a10049 DD |
3410 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
3411 | fi | |
3412 | fi | |
0093138c | 3413 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
46a10049 DD |
3414 | fi |
3415 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 | |
3416 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
0093138c DD |
3417 | case $ac_cv_c_bigendian in |
3418 | yes) | |
2299a76d | 3419 | |
46a10049 DD |
3420 | cat >>confdefs.h <<\_ACEOF |
3421 | #define WORDS_BIGENDIAN 1 | |
3422 | _ACEOF | |
0093138c DD |
3423 | ;; |
3424 | no) | |
3425 | ;; | |
3426 | *) | |
3427 | { { echo "$as_me:$LINENO: error: unknown endianness | |
3428 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
3429 | echo "$as_me: error: unknown endianness | |
3430 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
3431 | { (exit 1); exit 1; }; } ;; | |
3432 | esac | |
7108c5dc | 3433 | |
252b5132 RH |
3434 | |
3435 | ||
3436 | ||
2299a76d | 3437 | ac_config_headers="$ac_config_headers config.h:config.in" |
252b5132 RH |
3438 | |
3439 | ||
3440 | ||
3441 | # Find a good install program. We prefer a C program (faster), | |
3442 | # so one script is as good as another. But avoid the broken or | |
3443 | # incompatible versions: | |
3444 | # SysV /etc/install, /usr/sbin/install | |
3445 | # SunOS /usr/etc/install | |
3446 | # IRIX /sbin/install | |
3447 | # AIX /bin/install | |
2299a76d | 3448 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
252b5132 RH |
3449 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
3450 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3451 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
58670637 | 3452 | # OS/2's system install, which has a completely different semantic |
252b5132 | 3453 | # ./install, which can be erroneously created by make from ./install.sh. |
2299a76d DJ |
3454 | echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 |
3455 | echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | |
252b5132 | 3456 | if test -z "$INSTALL"; then |
2299a76d DJ |
3457 | if test "${ac_cv_path_install+set}" = set; then |
3458 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3459 | else | |
3460 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3461 | for as_dir in $PATH | |
3462 | do | |
3463 | IFS=$as_save_IFS | |
3464 | test -z "$as_dir" && as_dir=. | |
3465 | # Account for people who put trailing slashes in PATH elements. | |
3466 | case $as_dir/ in | |
3467 | ./ | .// | /cC/* | \ | |
3468 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
58670637 | 3469 | ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ |
2299a76d DJ |
3470 | /usr/ucb/* ) ;; |
3471 | *) | |
3472 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3473 | # Don't use installbsd from OSF since it installs stuff as root | |
3474 | # by default. | |
3475 | for ac_prog in ginstall scoinst install; do | |
3476 | for ac_exec_ext in '' $ac_executable_extensions; do | |
58670637 DD |
3477 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
3478 | if test $ac_prog = install && | |
3479 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3480 | # AIX install. It has an incompatible calling convention. | |
3481 | : | |
3482 | elif test $ac_prog = install && | |
3483 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3484 | # program-specific install script used by HP pwplus--don't use. | |
3485 | : | |
3486 | else | |
3487 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3488 | break 3 | |
3489 | fi | |
3490 | fi | |
252b5132 | 3491 | done |
2299a76d DJ |
3492 | done |
3493 | ;; | |
3494 | esac | |
3495 | done | |
3496 | ||
252b5132 RH |
3497 | |
3498 | fi | |
3499 | if test "${ac_cv_path_install+set}" = set; then | |
2299a76d | 3500 | INSTALL=$ac_cv_path_install |
252b5132 RH |
3501 | else |
3502 | # As a last resort, use the slow shell script. We don't cache a | |
3503 | # path for INSTALL within a source directory, because that will | |
3504 | # break other packages using the cache if that directory is | |
3505 | # removed, or if the path is relative. | |
2299a76d | 3506 | INSTALL=$ac_install_sh |
252b5132 RH |
3507 | fi |
3508 | fi | |
2299a76d DJ |
3509 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
3510 | echo "${ECHO_T}$INSTALL" >&6 | |
252b5132 RH |
3511 | |
3512 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3513 | # It thinks the first close brace ends the variable substitution. | |
3514 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3515 | ||
2299a76d | 3516 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
252b5132 RH |
3517 | |
3518 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3519 | ||
3520 | ||
4cf896a5 KC |
3521 | # Don't build the shared library for build. |
3522 | if [ -n "${with_build_subdir}" ]; then | |
3523 | enable_shared=no | |
3524 | fi | |
3525 | ||
3526 | frag= | |
3527 | case "${host}" in | |
3528 | rs6000-ibm-aix3.1 | rs6000-ibm-aix) | |
3529 | frag=mh-aix ;; | |
3530 | *-*-cxux7*) frag=mh-cxux7 ;; | |
3531 | *-*-freebsd2.1.*) frag=mh-fbsd21 ;; | |
3532 | *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; | |
3533 | i370-*-opened*) frag=mh-openedition ;; | |
3534 | i[34567]86-*-windows*) frag=mh-windows ;; | |
3535 | esac | |
3536 | ||
3537 | if [ -n "${frag}" ]; then | |
3538 | frags=${libiberty_topdir}/libiberty/config/$frag | |
3539 | else | |
3540 | frags= | |
3541 | fi | |
3542 | ||
3543 | # If they didn't specify --enable-shared, don't generate shared libs. | |
3544 | case "${enable_shared}" in | |
3545 | yes) shared=yes ;; | |
3546 | no) shared=no ;; | |
3547 | "") shared=no ;; | |
3548 | *) shared=yes ;; | |
3549 | esac | |
3550 | if [ "${shared}" = "yes" ]; then | |
3551 | frag= | |
3552 | case "${host}" in | |
3553 | *-*-cygwin*) ;; | |
3554 | alpha*-*-linux*) frag=mh-elfalphapic ;; | |
3555 | arm*-*-*) frag=mh-armpic ;; | |
3556 | hppa*-*-*) frag=mh-papic ;; | |
3557 | i[34567]86-*-* | x86_64-*-*) | |
3558 | frag=mh-x86pic ;; | |
3559 | powerpc*-*-aix*) ;; | |
3560 | powerpc*-*-*) frag=mh-ppcpic ;; | |
3561 | sparc*-*-*) frag=mh-sparcpic ;; | |
3562 | s390*-*-*) frag=mh-s390pic ;; | |
3563 | *) frag=mh-${host_cpu}pic ;; | |
3564 | esac | |
3565 | if [ -n "${frag}" ]; then | |
3566 | frags="${frags} ${libiberty_topdir}/config/${frag}" | |
3567 | fi | |
3568 | fi | |
3569 | ||
3570 | echo "# Warning: this fragment is automatically generated" > temp-frag | |
3571 | ||
3572 | for frag in ${frags}; do | |
3573 | if [ -f ${frag} ]; then | |
3574 | echo "Appending ${frag} to xhost-mkfrag" | |
3575 | echo "# Following fragment copied from ${frag}" >> temp-frag | |
3576 | cat ${frag} >> temp-frag | |
3577 | fi | |
3578 | done | |
3579 | ||
3580 | # record if we want to build shared libs. | |
3581 | if [ "${shared}" = "yes" ]; then | |
3582 | echo enable_shared = yes >> temp-frag | |
3583 | else | |
3584 | echo enable_shared = no >> temp-frag | |
3585 | fi | |
3586 | ||
3587 | frag=xhost-mkfrag | |
3588 | ${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag | |
3589 | ||
252b5132 RH |
3590 | host_makefile_frag=${frag} |
3591 | ||
3592 | ||
3593 | # It's OK to check for header files. Although the compiler may not be | |
3594 | # able to link anything, it had better be able to at least compile | |
3595 | # something. | |
2299a76d DJ |
3596 | |
3597 | ||
3598 | ||
3599 | ||
3600 | ||
3601 | ||
3602 | ||
3603 | ||
3604 | ||
3605 | ||
3606 | ||
3607 | ||
3608 | ||
3609 | ||
3610 | ||
3611 | ||
3612 | ||
3613 | ||
3614 | ||
3615 | ||
3616 | ||
3617 | ||
3618 | ||
bb6a587d | 3619 | |
ac119ae8 DD |
3620 | |
3621 | 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 |
3622 | do |
3623 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8ddbb593 | 3624 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
3625 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
3626 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3627 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 3628 | else |
8ddbb593 | 3629 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
3630 | /* confdefs.h. */ |
3631 | _ACEOF | |
3632 | cat confdefs.h >>conftest.$ac_ext | |
3633 | cat >>conftest.$ac_ext <<_ACEOF | |
3634 | /* end confdefs.h. */ | |
3635 | #include <$ac_header> | |
3636 | _ACEOF | |
3637 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3638 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3639 | ac_status=$? | |
3640 | grep -v '^ *+' conftest.er1 >conftest.err | |
3641 | rm -f conftest.er1 | |
3642 | cat conftest.err >&5 | |
3643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3644 | (exit $ac_status); } >/dev/null; then | |
3645 | if test -s conftest.err; then | |
3646 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 3647 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
3648 | else |
3649 | ac_cpp_err= | |
3650 | fi | |
15ae9e71 | 3651 | else |
2299a76d DJ |
3652 | ac_cpp_err=yes |
3653 | fi | |
3654 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 3655 | eval "$as_ac_Header=yes" |
2299a76d DJ |
3656 | else |
3657 | echo "$as_me: failed program was:" >&5 | |
3658 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3659 | ||
8ddbb593 | 3660 | eval "$as_ac_Header=no" |
2299a76d DJ |
3661 | fi |
3662 | rm -f conftest.err conftest.$ac_ext | |
2299a76d DJ |
3663 | fi |
3664 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3665 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
3666 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
3667 | cat >>confdefs.h <<_ACEOF | |
3668 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3669 | _ACEOF | |
3670 | ||
3671 | fi | |
2299a76d DJ |
3672 | done |
3673 | ||
3674 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
3675 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
3676 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
3677 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3678 | else | |
3679 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
3680 | /* confdefs.h. */ |
3681 | _ACEOF | |
3682 | cat confdefs.h >>conftest.$ac_ext | |
3683 | cat >>conftest.$ac_ext <<_ACEOF | |
3684 | /* end confdefs.h. */ | |
dc579051 | 3685 | #include <sys/types.h> |
2299a76d DJ |
3686 | #include <sys/wait.h> |
3687 | #ifndef WEXITSTATUS | |
3688 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
15ae9e71 | 3689 | #endif |
2299a76d DJ |
3690 | #ifndef WIFEXITED |
3691 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
3692 | #endif | |
3693 | ||
3694 | int | |
3695 | main () | |
3696 | { | |
3697 | int s; | |
3698 | wait (&s); | |
3699 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3700 | ; | |
3701 | return 0; | |
3702 | } | |
3703 | _ACEOF | |
3704 | rm -f conftest.$ac_objext | |
3705 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3706 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 3707 | ac_status=$? |
58670637 DD |
3708 | grep -v '^ *+' conftest.er1 >conftest.err |
3709 | rm -f conftest.er1 | |
3710 | cat conftest.err >&5 | |
2299a76d DJ |
3711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3712 | (exit $ac_status); } && | |
a4e5c0d8 | 3713 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
3714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3715 | (eval $ac_try) 2>&5 | |
3716 | ac_status=$? | |
3717 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3718 | (exit $ac_status); }; } && | |
3719 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
3720 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3721 | (eval $ac_try) 2>&5 | |
3722 | ac_status=$? | |
3723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3724 | (exit $ac_status); }; }; then | |
3725 | ac_cv_header_sys_wait_h=yes | |
dc579051 | 3726 | else |
2299a76d DJ |
3727 | echo "$as_me: failed program was:" >&5 |
3728 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3729 | ||
3730 | ac_cv_header_sys_wait_h=no | |
dc579051 | 3731 | fi |
58670637 | 3732 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
3733 | fi |
3734 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 | |
3735 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
3736 | if test $ac_cv_header_sys_wait_h = yes; then | |
3737 | ||
8ddbb593 DJ |
3738 | cat >>confdefs.h <<\_ACEOF |
3739 | #define HAVE_SYS_WAIT_H 1 | |
3740 | _ACEOF | |
3741 | ||
3742 | fi | |
3743 | ||
3744 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 | |
3745 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
3746 | if test "${ac_cv_header_time+set}" = set; then | |
3747 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3748 | else | |
3749 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3750 | /* confdefs.h. */ |
3751 | _ACEOF | |
3752 | cat confdefs.h >>conftest.$ac_ext | |
3753 | cat >>conftest.$ac_ext <<_ACEOF | |
3754 | /* end confdefs.h. */ | |
3755 | #include <sys/types.h> | |
3756 | #include <sys/time.h> | |
3757 | #include <time.h> | |
3758 | ||
3759 | int | |
3760 | main () | |
3761 | { | |
3762 | if ((struct tm *) 0) | |
3763 | return 0; | |
3764 | ; | |
3765 | return 0; | |
3766 | } | |
3767 | _ACEOF | |
3768 | rm -f conftest.$ac_objext | |
3769 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3770 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 3771 | ac_status=$? |
58670637 DD |
3772 | grep -v '^ *+' conftest.er1 >conftest.err |
3773 | rm -f conftest.er1 | |
3774 | cat conftest.err >&5 | |
8ddbb593 DJ |
3775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3776 | (exit $ac_status); } && | |
a4e5c0d8 | 3777 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
3778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3779 | (eval $ac_try) 2>&5 | |
3780 | ac_status=$? | |
3781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3782 | (exit $ac_status); }; } && | |
3783 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
3784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3785 | (eval $ac_try) 2>&5 | |
3786 | ac_status=$? | |
3787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3788 | (exit $ac_status); }; }; then | |
3789 | ac_cv_header_time=yes | |
3790 | else | |
3791 | echo "$as_me: failed program was:" >&5 | |
3792 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3793 | ||
3794 | ac_cv_header_time=no | |
3795 | fi | |
58670637 | 3796 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
3797 | fi |
3798 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 | |
3799 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
3800 | if test $ac_cv_header_time = yes; then | |
3801 | ||
3802 | cat >>confdefs.h <<\_ACEOF | |
3803 | #define TIME_WITH_SYS_TIME 1 | |
3804 | _ACEOF | |
3805 | ||
3806 | fi | |
3807 | ||
3808 | ||
3809 | echo "$as_me:$LINENO: checking whether errno must be declared" >&5 | |
3810 | echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6 | |
3811 | if test "${libiberty_cv_declare_errno+set}" = set; then | |
3812 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3813 | else | |
3814 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3815 | /* confdefs.h. */ |
3816 | _ACEOF | |
3817 | cat confdefs.h >>conftest.$ac_ext | |
3818 | cat >>conftest.$ac_ext <<_ACEOF | |
3819 | /* end confdefs.h. */ | |
3820 | #include <errno.h> | |
3821 | int | |
3822 | main () | |
3823 | { | |
3824 | int x = errno; | |
3825 | ; | |
3826 | return 0; | |
3827 | } | |
3828 | _ACEOF | |
3829 | rm -f conftest.$ac_objext | |
3830 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3831 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 3832 | ac_status=$? |
58670637 DD |
3833 | grep -v '^ *+' conftest.er1 >conftest.err |
3834 | rm -f conftest.er1 | |
3835 | cat conftest.err >&5 | |
8ddbb593 DJ |
3836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3837 | (exit $ac_status); } && | |
a4e5c0d8 | 3838 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
3839 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3840 | (eval $ac_try) 2>&5 | |
3841 | ac_status=$? | |
3842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3843 | (exit $ac_status); }; } && | |
3844 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
3845 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3846 | (eval $ac_try) 2>&5 | |
3847 | ac_status=$? | |
3848 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3849 | (exit $ac_status); }; }; then | |
3850 | libiberty_cv_declare_errno=no | |
3851 | else | |
3852 | echo "$as_me: failed program was:" >&5 | |
3853 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3854 | ||
3855 | libiberty_cv_declare_errno=yes | |
3856 | fi | |
58670637 | 3857 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
3858 | fi |
3859 | echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5 | |
3860 | echo "${ECHO_T}$libiberty_cv_declare_errno" >&6 | |
3861 | if test $libiberty_cv_declare_errno = yes | |
3862 | then | |
3863 | cat >>confdefs.h <<\_ACEOF | |
3864 | #define NEED_DECLARATION_ERRNO 1 | |
3865 | _ACEOF | |
3866 | ||
3867 | fi | |
3868 | ||
3869 | ||
40a59a4c | 3870 | # Determine the size of an int for struct fibnode. |
8ddbb593 DJ |
3871 | echo "$as_me:$LINENO: checking for egrep" >&5 |
3872 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3873 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3874 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3875 | else | |
3876 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3877 | then ac_cv_prog_egrep='grep -E' | |
3878 | else ac_cv_prog_egrep='egrep' | |
3879 | fi | |
3880 | fi | |
3881 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3882 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3883 | EGREP=$ac_cv_prog_egrep | |
3884 | ||
3885 | ||
3886 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3887 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3888 | if test "${ac_cv_header_stdc+set}" = set; then | |
3889 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3890 | else | |
3891 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3892 | /* confdefs.h. */ |
3893 | _ACEOF | |
3894 | cat confdefs.h >>conftest.$ac_ext | |
3895 | cat >>conftest.$ac_ext <<_ACEOF | |
3896 | /* end confdefs.h. */ | |
3897 | #include <stdlib.h> | |
3898 | #include <stdarg.h> | |
3899 | #include <string.h> | |
3900 | #include <float.h> | |
3901 | ||
3902 | int | |
3903 | main () | |
3904 | { | |
3905 | ||
3906 | ; | |
3907 | return 0; | |
3908 | } | |
3909 | _ACEOF | |
3910 | rm -f conftest.$ac_objext | |
3911 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 3912 | (eval $ac_compile) 2>conftest.er1 |
8ddbb593 | 3913 | ac_status=$? |
58670637 DD |
3914 | grep -v '^ *+' conftest.er1 >conftest.err |
3915 | rm -f conftest.er1 | |
3916 | cat conftest.err >&5 | |
8ddbb593 DJ |
3917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3918 | (exit $ac_status); } && | |
a4e5c0d8 | 3919 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
3920 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3921 | (eval $ac_try) 2>&5 | |
3922 | ac_status=$? | |
3923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3924 | (exit $ac_status); }; } && | |
3925 | { ac_try='test -s conftest.$ac_objext' | |
8ddbb593 DJ |
3926 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3927 | (eval $ac_try) 2>&5 | |
3928 | ac_status=$? | |
3929 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3930 | (exit $ac_status); }; }; then | |
3931 | ac_cv_header_stdc=yes | |
3932 | else | |
3933 | echo "$as_me: failed program was:" >&5 | |
3934 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3935 | ||
3936 | ac_cv_header_stdc=no | |
3937 | fi | |
58670637 | 3938 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8ddbb593 DJ |
3939 | |
3940 | if test $ac_cv_header_stdc = yes; then | |
3941 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3942 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3943 | /* confdefs.h. */ |
3944 | _ACEOF | |
3945 | cat confdefs.h >>conftest.$ac_ext | |
3946 | cat >>conftest.$ac_ext <<_ACEOF | |
3947 | /* end confdefs.h. */ | |
3948 | #include <string.h> | |
3949 | ||
3950 | _ACEOF | |
3951 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3952 | $EGREP "memchr" >/dev/null 2>&1; then | |
3953 | : | |
3954 | else | |
3955 | ac_cv_header_stdc=no | |
3956 | fi | |
3957 | rm -f conftest* | |
3958 | ||
3959 | fi | |
3960 | ||
3961 | if test $ac_cv_header_stdc = yes; then | |
3962 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3963 | cat >conftest.$ac_ext <<_ACEOF | |
8ddbb593 DJ |
3964 | /* confdefs.h. */ |
3965 | _ACEOF | |
3966 | cat confdefs.h >>conftest.$ac_ext | |
3967 | cat >>conftest.$ac_ext <<_ACEOF | |
3968 | /* end confdefs.h. */ | |
3969 | #include <stdlib.h> | |
3970 | ||
2299a76d | 3971 | _ACEOF |
8ddbb593 DJ |
3972 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3973 | $EGREP "free" >/dev/null 2>&1; then | |
3974 | : | |
3975 | else | |
3976 | ac_cv_header_stdc=no | |
3977 | fi | |
3978 | rm -f conftest* | |
2299a76d DJ |
3979 | |
3980 | fi | |
3981 | ||
8ddbb593 DJ |
3982 | if test $ac_cv_header_stdc = yes; then |
3983 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3984 | if test "$cross_compiling" = yes; then | |
3985 | : | |
2299a76d DJ |
3986 | else |
3987 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
3988 | /* confdefs.h. */ |
3989 | _ACEOF | |
3990 | cat confdefs.h >>conftest.$ac_ext | |
3991 | cat >>conftest.$ac_ext <<_ACEOF | |
3992 | /* end confdefs.h. */ | |
8ddbb593 DJ |
3993 | #include <ctype.h> |
3994 | #if ((' ' & 0x0FF) == 0x020) | |
3995 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3996 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3997 | #else | |
3998 | # define ISLOWER(c) \ | |
58670637 DD |
3999 | (('a' <= (c) && (c) <= 'i') \ |
4000 | || ('j' <= (c) && (c) <= 'r') \ | |
4001 | || ('s' <= (c) && (c) <= 'z')) | |
8ddbb593 DJ |
4002 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
4003 | #endif | |
2299a76d | 4004 | |
8ddbb593 | 4005 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
2299a76d DJ |
4006 | int |
4007 | main () | |
4008 | { | |
8ddbb593 DJ |
4009 | int i; |
4010 | for (i = 0; i < 256; i++) | |
4011 | if (XOR (islower (i), ISLOWER (i)) | |
58670637 | 4012 | || toupper (i) != TOUPPER (i)) |
8ddbb593 DJ |
4013 | exit(2); |
4014 | exit (0); | |
2299a76d DJ |
4015 | } |
4016 | _ACEOF | |
8ddbb593 DJ |
4017 | rm -f conftest$ac_exeext |
4018 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4019 | (eval $ac_link) 2>&5 | |
2299a76d DJ |
4020 | ac_status=$? |
4021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8ddbb593 | 4022 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
2299a76d DJ |
4023 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4024 | (eval $ac_try) 2>&5 | |
4025 | ac_status=$? | |
4026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4027 | (exit $ac_status); }; }; then | |
8ddbb593 | 4028 | : |
2299a76d | 4029 | else |
8ddbb593 DJ |
4030 | echo "$as_me: program exited with status $ac_status" >&5 |
4031 | echo "$as_me: failed program was:" >&5 | |
2299a76d DJ |
4032 | sed 's/^/| /' conftest.$ac_ext >&5 |
4033 | ||
8ddbb593 DJ |
4034 | ( exit $ac_status ) |
4035 | ac_cv_header_stdc=no | |
2299a76d | 4036 | fi |
58670637 | 4037 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
2299a76d | 4038 | fi |
8ddbb593 DJ |
4039 | fi |
4040 | fi | |
4041 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4042 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
4043 | if test $ac_cv_header_stdc = yes; then | |
2299a76d DJ |
4044 | |
4045 | cat >>confdefs.h <<\_ACEOF | |
8ddbb593 | 4046 | #define STDC_HEADERS 1 |
2299a76d DJ |
4047 | _ACEOF |
4048 | ||
4049 | fi | |
4050 | ||
8ddbb593 | 4051 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
2299a76d | 4052 | |
8ddbb593 DJ |
4053 | |
4054 | ||
4055 | ||
4056 | ||
4057 | ||
4058 | ||
4059 | ||
4060 | ||
4061 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
58670637 | 4062 | inttypes.h stdint.h unistd.h |
8ddbb593 DJ |
4063 | do |
4064 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4065 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4066 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4067 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
2299a76d DJ |
4068 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
4069 | else | |
4070 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4071 | /* confdefs.h. */ |
4072 | _ACEOF | |
4073 | cat confdefs.h >>conftest.$ac_ext | |
4074 | cat >>conftest.$ac_ext <<_ACEOF | |
4075 | /* end confdefs.h. */ | |
8ddbb593 | 4076 | #include <$ac_header> |
2299a76d | 4077 | _ACEOF |
8ddbb593 DJ |
4078 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
4079 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2299a76d | 4080 | ac_status=$? |
8ddbb593 DJ |
4081 | grep -v '^ *+' conftest.er1 >conftest.err |
4082 | rm -f conftest.er1 | |
4083 | cat conftest.err >&5 | |
2299a76d | 4084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8ddbb593 DJ |
4085 | (exit $ac_status); } >/dev/null; then |
4086 | if test -s conftest.err; then | |
4087 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 4088 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
8ddbb593 DJ |
4089 | else |
4090 | ac_cpp_err= | |
4091 | fi | |
4092 | else | |
4093 | ac_cpp_err=yes | |
4094 | fi | |
4095 | if test -z "$ac_cpp_err"; then | |
4096 | eval "$as_ac_Header=yes" | |
2299a76d DJ |
4097 | else |
4098 | echo "$as_me: failed program was:" >&5 | |
4099 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4100 | ||
8ddbb593 | 4101 | eval "$as_ac_Header=no" |
2299a76d | 4102 | fi |
8ddbb593 | 4103 | rm -f conftest.err conftest.$ac_ext |
2299a76d | 4104 | fi |
8ddbb593 DJ |
4105 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
4106 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4107 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4108 | cat >>confdefs.h <<_ACEOF | |
4109 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
2299a76d DJ |
4110 | _ACEOF |
4111 | ||
4112 | fi | |
8ddbb593 | 4113 | done |
2299a76d DJ |
4114 | |
4115 | ||
40a59a4c DD |
4116 | echo "$as_me:$LINENO: checking for int" >&5 |
4117 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4118 | if test "${ac_cv_type_int+set}" = set; then | |
4119 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4120 | else | |
4121 | cat >conftest.$ac_ext <<_ACEOF | |
4122 | /* confdefs.h. */ | |
4123 | _ACEOF | |
4124 | cat confdefs.h >>conftest.$ac_ext | |
4125 | cat >>conftest.$ac_ext <<_ACEOF | |
4126 | /* end confdefs.h. */ | |
4127 | $ac_includes_default | |
4128 | int | |
4129 | main () | |
4130 | { | |
4131 | if ((int *) 0) | |
4132 | return 0; | |
4133 | if (sizeof (int)) | |
4134 | return 0; | |
4135 | ; | |
4136 | return 0; | |
4137 | } | |
4138 | _ACEOF | |
4139 | rm -f conftest.$ac_objext | |
4140 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4141 | (eval $ac_compile) 2>conftest.er1 | |
4142 | ac_status=$? | |
4143 | grep -v '^ *+' conftest.er1 >conftest.err | |
4144 | rm -f conftest.er1 | |
4145 | cat conftest.err >&5 | |
4146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4147 | (exit $ac_status); } && | |
a4e5c0d8 | 4148 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4150 | (eval $ac_try) 2>&5 | |
4151 | ac_status=$? | |
4152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4153 | (exit $ac_status); }; } && | |
4154 | { ac_try='test -s conftest.$ac_objext' | |
4155 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4156 | (eval $ac_try) 2>&5 | |
4157 | ac_status=$? | |
4158 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4159 | (exit $ac_status); }; }; then | |
4160 | ac_cv_type_int=yes | |
4161 | else | |
4162 | echo "$as_me: failed program was:" >&5 | |
4163 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4164 | ||
4165 | ac_cv_type_int=no | |
4166 | fi | |
4167 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4168 | fi | |
4169 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4170 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4171 | ||
4172 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4173 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4174 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4175 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4176 | else | |
4177 | if test "$ac_cv_type_int" = yes; then | |
4178 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4179 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4180 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4181 | # This bug is HP SR number 8606223364. | |
4182 | if test "$cross_compiling" = yes; then | |
4183 | # Depending upon the size, compute the lo and hi bounds. | |
4184 | cat >conftest.$ac_ext <<_ACEOF | |
4185 | /* confdefs.h. */ | |
4186 | _ACEOF | |
4187 | cat confdefs.h >>conftest.$ac_ext | |
4188 | cat >>conftest.$ac_ext <<_ACEOF | |
4189 | /* end confdefs.h. */ | |
4190 | $ac_includes_default | |
4191 | int | |
4192 | main () | |
4193 | { | |
4194 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4195 | test_array [0] = 0 | |
4196 | ||
4197 | ; | |
4198 | return 0; | |
4199 | } | |
4200 | _ACEOF | |
4201 | rm -f conftest.$ac_objext | |
4202 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4203 | (eval $ac_compile) 2>conftest.er1 | |
4204 | ac_status=$? | |
4205 | grep -v '^ *+' conftest.er1 >conftest.err | |
4206 | rm -f conftest.er1 | |
4207 | cat conftest.err >&5 | |
4208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4209 | (exit $ac_status); } && | |
a4e5c0d8 | 4210 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4212 | (eval $ac_try) 2>&5 | |
4213 | ac_status=$? | |
4214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4215 | (exit $ac_status); }; } && | |
4216 | { ac_try='test -s conftest.$ac_objext' | |
4217 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4218 | (eval $ac_try) 2>&5 | |
4219 | ac_status=$? | |
4220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4221 | (exit $ac_status); }; }; then | |
4222 | ac_lo=0 ac_mid=0 | |
4223 | while :; do | |
4224 | cat >conftest.$ac_ext <<_ACEOF | |
4225 | /* confdefs.h. */ | |
4226 | _ACEOF | |
4227 | cat confdefs.h >>conftest.$ac_ext | |
4228 | cat >>conftest.$ac_ext <<_ACEOF | |
4229 | /* end confdefs.h. */ | |
4230 | $ac_includes_default | |
4231 | int | |
4232 | main () | |
4233 | { | |
4234 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4235 | test_array [0] = 0 | |
4236 | ||
4237 | ; | |
4238 | return 0; | |
4239 | } | |
4240 | _ACEOF | |
4241 | rm -f conftest.$ac_objext | |
4242 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4243 | (eval $ac_compile) 2>conftest.er1 | |
4244 | ac_status=$? | |
4245 | grep -v '^ *+' conftest.er1 >conftest.err | |
4246 | rm -f conftest.er1 | |
4247 | cat conftest.err >&5 | |
4248 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4249 | (exit $ac_status); } && | |
a4e5c0d8 | 4250 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4252 | (eval $ac_try) 2>&5 | |
4253 | ac_status=$? | |
4254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4255 | (exit $ac_status); }; } && | |
4256 | { ac_try='test -s conftest.$ac_objext' | |
4257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4258 | (eval $ac_try) 2>&5 | |
4259 | ac_status=$? | |
4260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4261 | (exit $ac_status); }; }; then | |
4262 | ac_hi=$ac_mid; break | |
4263 | else | |
4264 | echo "$as_me: failed program was:" >&5 | |
4265 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4266 | ||
4267 | ac_lo=`expr $ac_mid + 1` | |
4268 | if test $ac_lo -le $ac_mid; then | |
4269 | ac_lo= ac_hi= | |
4270 | break | |
4271 | fi | |
4272 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4273 | fi | |
4274 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4275 | done | |
4276 | else | |
4277 | echo "$as_me: failed program was:" >&5 | |
4278 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4279 | ||
4280 | cat >conftest.$ac_ext <<_ACEOF | |
4281 | /* confdefs.h. */ | |
4282 | _ACEOF | |
4283 | cat confdefs.h >>conftest.$ac_ext | |
4284 | cat >>conftest.$ac_ext <<_ACEOF | |
4285 | /* end confdefs.h. */ | |
4286 | $ac_includes_default | |
4287 | int | |
4288 | main () | |
4289 | { | |
4290 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4291 | test_array [0] = 0 | |
4292 | ||
4293 | ; | |
4294 | return 0; | |
4295 | } | |
4296 | _ACEOF | |
4297 | rm -f conftest.$ac_objext | |
4298 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4299 | (eval $ac_compile) 2>conftest.er1 | |
4300 | ac_status=$? | |
4301 | grep -v '^ *+' conftest.er1 >conftest.err | |
4302 | rm -f conftest.er1 | |
4303 | cat conftest.err >&5 | |
4304 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4305 | (exit $ac_status); } && | |
a4e5c0d8 | 4306 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4307 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4308 | (eval $ac_try) 2>&5 | |
4309 | ac_status=$? | |
4310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4311 | (exit $ac_status); }; } && | |
4312 | { ac_try='test -s conftest.$ac_objext' | |
4313 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4314 | (eval $ac_try) 2>&5 | |
4315 | ac_status=$? | |
4316 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4317 | (exit $ac_status); }; }; then | |
4318 | ac_hi=-1 ac_mid=-1 | |
4319 | while :; do | |
4320 | cat >conftest.$ac_ext <<_ACEOF | |
4321 | /* confdefs.h. */ | |
4322 | _ACEOF | |
4323 | cat confdefs.h >>conftest.$ac_ext | |
4324 | cat >>conftest.$ac_ext <<_ACEOF | |
4325 | /* end confdefs.h. */ | |
4326 | $ac_includes_default | |
4327 | int | |
4328 | main () | |
4329 | { | |
4330 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4331 | test_array [0] = 0 | |
4332 | ||
4333 | ; | |
4334 | return 0; | |
4335 | } | |
4336 | _ACEOF | |
4337 | rm -f conftest.$ac_objext | |
4338 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4339 | (eval $ac_compile) 2>conftest.er1 | |
4340 | ac_status=$? | |
4341 | grep -v '^ *+' conftest.er1 >conftest.err | |
4342 | rm -f conftest.er1 | |
4343 | cat conftest.err >&5 | |
4344 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4345 | (exit $ac_status); } && | |
a4e5c0d8 | 4346 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4347 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4348 | (eval $ac_try) 2>&5 | |
4349 | ac_status=$? | |
4350 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4351 | (exit $ac_status); }; } && | |
4352 | { ac_try='test -s conftest.$ac_objext' | |
4353 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4354 | (eval $ac_try) 2>&5 | |
4355 | ac_status=$? | |
4356 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4357 | (exit $ac_status); }; }; then | |
4358 | ac_lo=$ac_mid; break | |
4359 | else | |
4360 | echo "$as_me: failed program was:" >&5 | |
4361 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4362 | ||
4363 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4364 | if test $ac_mid -le $ac_hi; then | |
4365 | ac_lo= ac_hi= | |
4366 | break | |
4367 | fi | |
4368 | ac_mid=`expr 2 '*' $ac_mid` | |
4369 | fi | |
4370 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4371 | done | |
4372 | else | |
4373 | echo "$as_me: failed program was:" >&5 | |
4374 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4375 | ||
4376 | ac_lo= ac_hi= | |
4377 | fi | |
4378 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4379 | fi | |
4380 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4381 | # Binary search between lo and hi bounds. | |
4382 | while test "x$ac_lo" != "x$ac_hi"; do | |
4383 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4384 | cat >conftest.$ac_ext <<_ACEOF | |
4385 | /* confdefs.h. */ | |
4386 | _ACEOF | |
4387 | cat confdefs.h >>conftest.$ac_ext | |
4388 | cat >>conftest.$ac_ext <<_ACEOF | |
4389 | /* end confdefs.h. */ | |
4390 | $ac_includes_default | |
4391 | int | |
4392 | main () | |
4393 | { | |
4394 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4395 | test_array [0] = 0 | |
4396 | ||
4397 | ; | |
4398 | return 0; | |
4399 | } | |
4400 | _ACEOF | |
4401 | rm -f conftest.$ac_objext | |
4402 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4403 | (eval $ac_compile) 2>conftest.er1 | |
4404 | ac_status=$? | |
4405 | grep -v '^ *+' conftest.er1 >conftest.err | |
4406 | rm -f conftest.er1 | |
4407 | cat conftest.err >&5 | |
4408 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4409 | (exit $ac_status); } && | |
a4e5c0d8 | 4410 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
40a59a4c DD |
4411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4412 | (eval $ac_try) 2>&5 | |
4413 | ac_status=$? | |
4414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4415 | (exit $ac_status); }; } && | |
4416 | { ac_try='test -s conftest.$ac_objext' | |
4417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4418 | (eval $ac_try) 2>&5 | |
4419 | ac_status=$? | |
4420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4421 | (exit $ac_status); }; }; then | |
4422 | ac_hi=$ac_mid | |
4423 | else | |
4424 | echo "$as_me: failed program was:" >&5 | |
4425 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4426 | ||
4427 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4428 | fi | |
4429 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4430 | done | |
4431 | case $ac_lo in | |
4432 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4433 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4434 | See \`config.log' for more details." >&5 | |
4435 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4436 | See \`config.log' for more details." >&2;} | |
4437 | { (exit 1); exit 1; }; } ;; | |
4438 | esac | |
4439 | else | |
4440 | if test "$cross_compiling" = yes; then | |
a4e5c0d8 DD |
4441 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4442 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
40a59a4c DD |
4443 | { (exit 1); exit 1; }; } |
4444 | else | |
4445 | cat >conftest.$ac_ext <<_ACEOF | |
4446 | /* confdefs.h. */ | |
4447 | _ACEOF | |
4448 | cat confdefs.h >>conftest.$ac_ext | |
4449 | cat >>conftest.$ac_ext <<_ACEOF | |
4450 | /* end confdefs.h. */ | |
4451 | $ac_includes_default | |
4452 | long longval () { return (long) (sizeof (int)); } | |
4453 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4454 | #include <stdio.h> | |
4455 | #include <stdlib.h> | |
4456 | int | |
4457 | main () | |
4458 | { | |
4459 | ||
4460 | FILE *f = fopen ("conftest.val", "w"); | |
4461 | if (! f) | |
4462 | exit (1); | |
4463 | if (((long) (sizeof (int))) < 0) | |
4464 | { | |
4465 | long i = longval (); | |
4466 | if (i != ((long) (sizeof (int)))) | |
4467 | exit (1); | |
4468 | fprintf (f, "%ld\n", i); | |
4469 | } | |
4470 | else | |
4471 | { | |
4472 | unsigned long i = ulongval (); | |
4473 | if (i != ((long) (sizeof (int)))) | |
4474 | exit (1); | |
4475 | fprintf (f, "%lu\n", i); | |
4476 | } | |
4477 | exit (ferror (f) || fclose (f) != 0); | |
4478 | ||
4479 | ; | |
4480 | return 0; | |
4481 | } | |
4482 | _ACEOF | |
4483 | rm -f conftest$ac_exeext | |
4484 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4485 | (eval $ac_link) 2>&5 | |
4486 | ac_status=$? | |
4487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4488 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4489 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4490 | (eval $ac_try) 2>&5 | |
4491 | ac_status=$? | |
4492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4493 | (exit $ac_status); }; }; then | |
4494 | ac_cv_sizeof_int=`cat conftest.val` | |
4495 | else | |
4496 | echo "$as_me: program exited with status $ac_status" >&5 | |
4497 | echo "$as_me: failed program was:" >&5 | |
4498 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4499 | ||
4500 | ( exit $ac_status ) | |
4501 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4502 | See \`config.log' for more details." >&5 | |
4503 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4504 | See \`config.log' for more details." >&2;} | |
4505 | { (exit 1); exit 1; }; } | |
4506 | fi | |
4507 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4508 | fi | |
4509 | fi | |
4510 | rm -f conftest.val | |
4511 | else | |
4512 | ac_cv_sizeof_int=0 | |
4513 | fi | |
4514 | fi | |
4515 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4516 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4517 | cat >>confdefs.h <<_ACEOF | |
4518 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4519 | _ACEOF | |
4520 | ||
4521 | ||
4522 | ||
2299a76d DJ |
4523 | echo "$as_me:$LINENO: checking for uintptr_t" >&5 |
4524 | echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 | |
4525 | if test "${ac_cv_type_uintptr_t+set}" = set; then | |
4526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4527 | else | |
4528 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4529 | /* confdefs.h. */ |
4530 | _ACEOF | |
4531 | cat confdefs.h >>conftest.$ac_ext | |
4532 | cat >>conftest.$ac_ext <<_ACEOF | |
4533 | /* end confdefs.h. */ | |
4534 | $ac_includes_default | |
4535 | int | |
4536 | main () | |
4537 | { | |
4538 | if ((uintptr_t *) 0) | |
4539 | return 0; | |
4540 | if (sizeof (uintptr_t)) | |
4541 | return 0; | |
4542 | ; | |
4543 | return 0; | |
4544 | } | |
4545 | _ACEOF | |
4546 | rm -f conftest.$ac_objext | |
4547 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 4548 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 4549 | ac_status=$? |
58670637 DD |
4550 | grep -v '^ *+' conftest.er1 >conftest.err |
4551 | rm -f conftest.er1 | |
4552 | cat conftest.err >&5 | |
2299a76d DJ |
4553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4554 | (exit $ac_status); } && | |
a4e5c0d8 | 4555 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
4556 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4557 | (eval $ac_try) 2>&5 | |
4558 | ac_status=$? | |
4559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4560 | (exit $ac_status); }; } && | |
4561 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
4562 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4563 | (eval $ac_try) 2>&5 | |
4564 | ac_status=$? | |
4565 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4566 | (exit $ac_status); }; }; then | |
4567 | ac_cv_type_uintptr_t=yes | |
4568 | else | |
4569 | echo "$as_me: failed program was:" >&5 | |
4570 | sed 's/^/| /' conftest.$ac_ext >&5 | |
dc579051 | 4571 | |
2299a76d DJ |
4572 | ac_cv_type_uintptr_t=no |
4573 | fi | |
58670637 | 4574 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
15ae9e71 | 4575 | fi |
2299a76d DJ |
4576 | echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 |
4577 | echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 | |
4578 | if test $ac_cv_type_uintptr_t = yes; then | |
4579 | : | |
4580 | else | |
4581 | ||
4582 | cat >>confdefs.h <<_ACEOF | |
15ae9e71 | 4583 | #define uintptr_t unsigned long |
2299a76d | 4584 | _ACEOF |
15ae9e71 DD |
4585 | |
4586 | fi | |
dc579051 | 4587 | |
bb6a587d DD |
4588 | |
4589 | # Look for a 64-bit type. | |
4590 | echo "$as_me:$LINENO: checking for a 64-bit type" >&5 | |
4591 | echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6 | |
4592 | if test "${liberty_cv_uint64+set}" = set; then | |
4593 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4594 | else | |
4595 | cat >conftest.$ac_ext <<_ACEOF | |
4596 | /* confdefs.h. */ | |
4597 | _ACEOF | |
4598 | cat confdefs.h >>conftest.$ac_ext | |
4599 | cat >>conftest.$ac_ext <<_ACEOF | |
4600 | /* end confdefs.h. */ | |
4601 | #ifdef HAVE_STDINT_H | |
4602 | #include <stdint.h> | |
4603 | #endif | |
4604 | int | |
4605 | main () | |
4606 | { | |
4607 | extern uint64_t foo; | |
4608 | ; | |
4609 | return 0; | |
4610 | } | |
4611 | _ACEOF | |
4612 | rm -f conftest.$ac_objext | |
4613 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4614 | (eval $ac_compile) 2>conftest.er1 | |
4615 | ac_status=$? | |
4616 | grep -v '^ *+' conftest.er1 >conftest.err | |
4617 | rm -f conftest.er1 | |
4618 | cat conftest.err >&5 | |
4619 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4620 | (exit $ac_status); } && | |
a4e5c0d8 | 4621 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bb6a587d DD |
4622 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4623 | (eval $ac_try) 2>&5 | |
4624 | ac_status=$? | |
4625 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4626 | (exit $ac_status); }; } && | |
4627 | { ac_try='test -s conftest.$ac_objext' | |
4628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4629 | (eval $ac_try) 2>&5 | |
4630 | ac_status=$? | |
4631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4632 | (exit $ac_status); }; }; then | |
4633 | liberty_cv_uint64=uint64_t | |
4634 | else | |
4635 | echo "$as_me: failed program was:" >&5 | |
4636 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4637 | ||
4638 | cat >conftest.$ac_ext <<_ACEOF | |
4639 | /* confdefs.h. */ | |
4640 | _ACEOF | |
4641 | cat confdefs.h >>conftest.$ac_ext | |
4642 | cat >>conftest.$ac_ext <<_ACEOF | |
4643 | /* end confdefs.h. */ | |
4644 | #ifdef HAVE_LIMITS_H | |
4645 | #include <limits.h> | |
4646 | #endif | |
4647 | #ifndef CHAR_BIT | |
4648 | #define CHAR_BIT 8 | |
4649 | #endif | |
4650 | int | |
4651 | main () | |
4652 | { | |
4653 | extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1]; | |
4654 | ; | |
4655 | return 0; | |
4656 | } | |
4657 | _ACEOF | |
4658 | rm -f conftest.$ac_objext | |
4659 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4660 | (eval $ac_compile) 2>conftest.er1 | |
4661 | ac_status=$? | |
4662 | grep -v '^ *+' conftest.er1 >conftest.err | |
4663 | rm -f conftest.er1 | |
4664 | cat conftest.err >&5 | |
4665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4666 | (exit $ac_status); } && | |
a4e5c0d8 | 4667 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bb6a587d DD |
4668 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4669 | (eval $ac_try) 2>&5 | |
4670 | ac_status=$? | |
4671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4672 | (exit $ac_status); }; } && | |
4673 | { ac_try='test -s conftest.$ac_objext' | |
4674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4675 | (eval $ac_try) 2>&5 | |
4676 | ac_status=$? | |
4677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4678 | (exit $ac_status); }; }; then | |
4679 | liberty_cv_uint64="unsigned long" | |
4680 | else | |
4681 | echo "$as_me: failed program was:" >&5 | |
4682 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4683 | ||
4684 | cat >conftest.$ac_ext <<_ACEOF | |
4685 | /* confdefs.h. */ | |
4686 | _ACEOF | |
4687 | cat confdefs.h >>conftest.$ac_ext | |
4688 | cat >>conftest.$ac_ext <<_ACEOF | |
4689 | /* end confdefs.h. */ | |
4690 | #ifdef HAVE_LIMITS_H | |
4691 | #include <limits.h> | |
4692 | #endif | |
4693 | #ifndef CHAR_BIT | |
4694 | #define CHAR_BIT 8 | |
4695 | #endif | |
4696 | int | |
4697 | main () | |
4698 | { | |
4699 | extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1]; | |
4700 | ; | |
4701 | return 0; | |
4702 | } | |
4703 | _ACEOF | |
4704 | rm -f conftest.$ac_objext | |
4705 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4706 | (eval $ac_compile) 2>conftest.er1 | |
4707 | ac_status=$? | |
4708 | grep -v '^ *+' conftest.er1 >conftest.err | |
4709 | rm -f conftest.er1 | |
4710 | cat conftest.err >&5 | |
4711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4712 | (exit $ac_status); } && | |
a4e5c0d8 | 4713 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bb6a587d DD |
4714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4715 | (eval $ac_try) 2>&5 | |
4716 | ac_status=$? | |
4717 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4718 | (exit $ac_status); }; } && | |
4719 | { ac_try='test -s conftest.$ac_objext' | |
4720 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4721 | (eval $ac_try) 2>&5 | |
4722 | ac_status=$? | |
4723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4724 | (exit $ac_status); }; }; then | |
4725 | liberty_cv_uint64="unsigned long long" | |
4726 | else | |
4727 | echo "$as_me: failed program was:" >&5 | |
4728 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4729 | ||
4730 | liberty_cv_uint64=none | |
4731 | fi | |
4732 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4733 | fi | |
4734 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4735 | fi | |
4736 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4737 | fi | |
4738 | ||
4739 | echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5 | |
4740 | echo "${ECHO_T}$liberty_cv_uint64" >&6 | |
4741 | if test "$liberty_cv_uint64" != none; then | |
4742 | ||
7e9f5c71 DD |
4743 | cat >>confdefs.h <<_ACEOF |
4744 | #define UNSIGNED_64BIT_TYPE $liberty_cv_uint64 | |
bb6a587d DD |
4745 | _ACEOF |
4746 | ||
4747 | fi | |
4748 | ||
daf7c4ad DD |
4749 | # Given the above check, we always have uintptr_t or a fallback |
4750 | # definition. So define HAVE_UINTPTR_T in case any imported code | |
4751 | # relies on it. | |
dc579051 | 4752 | |
2299a76d DJ |
4753 | cat >>confdefs.h <<\_ACEOF |
4754 | #define HAVE_UINTPTR_T 1 | |
4755 | _ACEOF | |
4756 | ||
4757 | ||
4758 | echo "$as_me:$LINENO: checking for pid_t" >&5 | |
4759 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
4760 | if test "${ac_cv_type_pid_t+set}" = set; then | |
4761 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4762 | else | |
4763 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4764 | /* confdefs.h. */ |
4765 | _ACEOF | |
4766 | cat confdefs.h >>conftest.$ac_ext | |
4767 | cat >>conftest.$ac_ext <<_ACEOF | |
4768 | /* end confdefs.h. */ | |
4769 | $ac_includes_default | |
4770 | int | |
4771 | main () | |
4772 | { | |
4773 | if ((pid_t *) 0) | |
4774 | return 0; | |
4775 | if (sizeof (pid_t)) | |
4776 | return 0; | |
4777 | ; | |
4778 | return 0; | |
4779 | } | |
4780 | _ACEOF | |
4781 | rm -f conftest.$ac_objext | |
4782 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 4783 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 4784 | ac_status=$? |
58670637 DD |
4785 | grep -v '^ *+' conftest.er1 >conftest.err |
4786 | rm -f conftest.er1 | |
4787 | cat conftest.err >&5 | |
2299a76d DJ |
4788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4789 | (exit $ac_status); } && | |
a4e5c0d8 | 4790 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
4791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4792 | (eval $ac_try) 2>&5 | |
4793 | ac_status=$? | |
4794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4795 | (exit $ac_status); }; } && | |
4796 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
4797 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4798 | (eval $ac_try) 2>&5 | |
4799 | ac_status=$? | |
4800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4801 | (exit $ac_status); }; }; then | |
cafa3917 DD |
4802 | ac_cv_type_pid_t=yes |
4803 | else | |
2299a76d DJ |
4804 | echo "$as_me: failed program was:" >&5 |
4805 | sed 's/^/| /' conftest.$ac_ext >&5 | |
cafa3917 | 4806 | |
2299a76d | 4807 | ac_cv_type_pid_t=no |
cafa3917 | 4808 | fi |
58670637 | 4809 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
4810 | fi |
4811 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 | |
4812 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
4813 | if test $ac_cv_type_pid_t = yes; then | |
4814 | : | |
4815 | else | |
4816 | ||
4817 | cat >>confdefs.h <<_ACEOF | |
cafa3917 | 4818 | #define pid_t int |
2299a76d | 4819 | _ACEOF |
cafa3917 DD |
4820 | |
4821 | fi | |
4822 | ||
4823 | ||
252b5132 RH |
4824 | # This is the list of functions which libiberty will provide if they |
4825 | # are not available on the host. | |
4826 | ||
4827 | funcs="asprintf" | |
4828 | funcs="$funcs atexit" | |
4829 | funcs="$funcs basename" | |
4830 | funcs="$funcs bcmp" | |
4831 | funcs="$funcs bcopy" | |
c6da642e | 4832 | funcs="$funcs bsearch" |
252b5132 RH |
4833 | funcs="$funcs bzero" |
4834 | funcs="$funcs calloc" | |
4835 | funcs="$funcs clock" | |
7b78baae | 4836 | funcs="$funcs ffs" |
252b5132 RH |
4837 | funcs="$funcs getcwd" |
4838 | funcs="$funcs getpagesize" | |
0fad4bdb | 4839 | funcs="$funcs gettimeofday" |
252b5132 RH |
4840 | funcs="$funcs index" |
4841 | funcs="$funcs insque" | |
4842 | funcs="$funcs memchr" | |
4843 | funcs="$funcs memcmp" | |
4844 | funcs="$funcs memcpy" | |
4845 | funcs="$funcs memmove" | |
10b57b38 | 4846 | funcs="$funcs mempcpy" |
252b5132 RH |
4847 | funcs="$funcs memset" |
4848 | funcs="$funcs mkstemps" | |
0c0a36a4 | 4849 | funcs="$funcs putenv" |
252b5132 RH |
4850 | funcs="$funcs random" |
4851 | funcs="$funcs rename" | |
4852 | funcs="$funcs rindex" | |
0c0a36a4 | 4853 | funcs="$funcs setenv" |
2ed1e5cc | 4854 | funcs="$funcs snprintf" |
252b5132 | 4855 | funcs="$funcs sigsetmask" |
10b57b38 DD |
4856 | funcs="$funcs stpcpy" |
4857 | funcs="$funcs stpncpy" | |
252b5132 RH |
4858 | funcs="$funcs strcasecmp" |
4859 | funcs="$funcs strchr" | |
4860 | funcs="$funcs strdup" | |
4861 | funcs="$funcs strncasecmp" | |
0fad4bdb | 4862 | funcs="$funcs strndup" |
252b5132 RH |
4863 | funcs="$funcs strrchr" |
4864 | funcs="$funcs strstr" | |
4865 | funcs="$funcs strtod" | |
4866 | funcs="$funcs strtol" | |
4867 | funcs="$funcs strtoul" | |
67f3cb05 | 4868 | funcs="$funcs strverscmp" |
252b5132 RH |
4869 | funcs="$funcs tmpnam" |
4870 | funcs="$funcs vasprintf" | |
4871 | funcs="$funcs vfprintf" | |
4872 | funcs="$funcs vprintf" | |
2ed1e5cc | 4873 | funcs="$funcs vsnprintf" |
252b5132 RH |
4874 | funcs="$funcs vsprintf" |
4875 | funcs="$funcs waitpid" | |
4876 | ||
4877 | # Also in the old function.def file: alloca, vfork, getopt. | |
4878 | ||
e69f6c8c | 4879 | vars="sys_errlist sys_nerr sys_siglist" |
252b5132 | 4880 | |
0c0a36a4 | 4881 | checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" |
192cbe66 | 4882 | checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp" |
ac119ae8 | 4883 | checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking" |
252b5132 RH |
4884 | |
4885 | # These are neither executed nor required, but they help keep | |
4886 | # autoheader happy without adding a bunch of text to acconfig.h. | |
4887 | if test "x" = "y"; then | |
252b5132 | 4888 | |
252b5132 | 4889 | |
2299a76d DJ |
4890 | |
4891 | ||
4892 | ||
4893 | ||
4894 | ||
4895 | ||
4896 | ||
4897 | ||
4898 | ||
4899 | ||
4900 | ||
4901 | ||
4902 | ||
4903 | ||
4904 | ||
4905 | ||
4906 | ||
4907 | ||
4908 | ||
4909 | ||
4910 | ||
4911 | ||
4912 | ||
4913 | ||
4914 | ||
4915 | ||
4916 | ||
4917 | ||
4918 | ||
4919 | ||
4920 | ||
4921 | ||
4922 | ||
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | ||
4928 | ||
4929 | ||
4930 | ||
4931 | ||
4932 | ||
4933 | ||
4934 | ||
4935 | ||
4936 | ||
4937 | ||
4938 | ||
4939 | ||
4940 | ||
4941 | ||
4942 | ||
4943 | ||
4944 | ||
4945 | ||
4946 | ||
4947 | ||
0fad4bdb DD |
4948 | |
4949 | ||
aa55ccb1 DD |
4950 | |
4951 | ||
2299a76d | 4952 | |
ac119ae8 | 4953 | |
67f3cb05 | 4954 | |
2299a76d DJ |
4955 | |
4956 | ||
4957 | for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \ | |
0fad4bdb | 4958 | getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \ |
2299a76d | 4959 | memmove mempcpy memset putenv random rename rindex sigsetmask \ |
0fad4bdb | 4960 | strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \ |
67f3cb05 | 4961 | strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \ |
2299a76d DJ |
4962 | vsprintf waitpid getrusage on_exit psignal strerror strsignal \ |
4963 | sysconf times sbrk gettimeofday ffs snprintf vsnprintf \ | |
b109e79a | 4964 | pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \ |
ac119ae8 | 4965 | realpath canonicalize_file_name __fsetlocking |
2299a76d DJ |
4966 | do |
4967 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
4968 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
4969 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
4970 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
4971 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4972 | else | |
4973 | if test x$gcc_no_link = xyes; then | |
4974 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
4975 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
4976 | { (exit 1); exit 1; }; } | |
4977 | fi | |
4978 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
4979 | /* confdefs.h. */ |
4980 | _ACEOF | |
4981 | cat confdefs.h >>conftest.$ac_ext | |
4982 | cat >>conftest.$ac_ext <<_ACEOF | |
4983 | /* end confdefs.h. */ | |
4984 | /* System header to define __stub macros and hopefully few prototypes, | |
4985 | which can conflict with char $ac_func (); below. | |
4986 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
4987 | <limits.h> exists even on freestanding compilers. Under hpux, |
4988 | including <limits.h> includes <sys/time.h> and causes problems | |
4989 | checking for functions defined therein. */ | |
4990 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
4991 | # include <limits.h> |
4992 | #else | |
4993 | # include <assert.h> | |
4994 | #endif | |
4995 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4996 | #ifdef __cplusplus | |
4997 | extern "C" | |
4998 | { | |
4999 | #endif | |
5000 | /* We use char because int might match the return type of a gcc2 | |
5001 | builtin and then its argument prototype would still apply. */ | |
5002 | char $ac_func (); | |
5003 | /* The GNU C library defines this for functions which it implements | |
252b5132 RH |
5004 | to always fail with ENOSYS. Some functions are actually named |
5005 | something starting with __ and the normal name is an alias. */ | |
5006 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5007 | choke me | |
5008 | #else | |
2299a76d DJ |
5009 | char (*f) () = $ac_func; |
5010 | #endif | |
5011 | #ifdef __cplusplus | |
5012 | } | |
252b5132 RH |
5013 | #endif |
5014 | ||
2299a76d DJ |
5015 | int |
5016 | main () | |
5017 | { | |
5018 | return f != $ac_func; | |
5019 | ; | |
5020 | return 0; | |
5021 | } | |
5022 | _ACEOF | |
5023 | rm -f conftest.$ac_objext conftest$ac_exeext | |
5024 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 5025 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 5026 | ac_status=$? |
58670637 DD |
5027 | grep -v '^ *+' conftest.er1 >conftest.err |
5028 | rm -f conftest.er1 | |
5029 | cat conftest.err >&5 | |
2299a76d DJ |
5030 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5031 | (exit $ac_status); } && | |
a4e5c0d8 | 5032 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
5033 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5034 | (eval $ac_try) 2>&5 | |
5035 | ac_status=$? | |
5036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5037 | (exit $ac_status); }; } && | |
5038 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
5039 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5040 | (eval $ac_try) 2>&5 | |
5041 | ac_status=$? | |
5042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5043 | (exit $ac_status); }; }; then | |
5044 | eval "$as_ac_var=yes" | |
5045 | else | |
5046 | echo "$as_me: failed program was:" >&5 | |
5047 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5048 | ||
5049 | eval "$as_ac_var=no" | |
5050 | fi | |
58670637 DD |
5051 | rm -f conftest.err conftest.$ac_objext \ |
5052 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
5053 | fi |
5054 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
5055 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
5056 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
5057 | cat >>confdefs.h <<_ACEOF | |
5058 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5059 | _ACEOF | |
900d2082 | 5060 | |
252b5132 RH |
5061 | fi |
5062 | done | |
5063 | ||
41c953f9 DD |
5064 | echo "$as_me:$LINENO: checking whether basename is declared" >&5 |
5065 | echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 | |
5066 | if test "${ac_cv_have_decl_basename+set}" = set; then | |
5067 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5068 | else | |
5069 | cat >conftest.$ac_ext <<_ACEOF | |
5070 | /* confdefs.h. */ | |
5071 | _ACEOF | |
5072 | cat confdefs.h >>conftest.$ac_ext | |
5073 | cat >>conftest.$ac_ext <<_ACEOF | |
5074 | /* end confdefs.h. */ | |
5075 | $ac_includes_default | |
5076 | int | |
5077 | main () | |
5078 | { | |
5079 | #ifndef basename | |
5080 | char *p = (char *) basename; | |
5081 | #endif | |
5082 | ||
5083 | ; | |
5084 | return 0; | |
5085 | } | |
5086 | _ACEOF | |
5087 | rm -f conftest.$ac_objext | |
5088 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5089 | (eval $ac_compile) 2>conftest.er1 | |
5090 | ac_status=$? | |
5091 | grep -v '^ *+' conftest.er1 >conftest.err | |
5092 | rm -f conftest.er1 | |
5093 | cat conftest.err >&5 | |
5094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5095 | (exit $ac_status); } && | |
a4e5c0d8 | 5096 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41c953f9 DD |
5097 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5098 | (eval $ac_try) 2>&5 | |
5099 | ac_status=$? | |
5100 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5101 | (exit $ac_status); }; } && | |
5102 | { ac_try='test -s conftest.$ac_objext' | |
5103 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5104 | (eval $ac_try) 2>&5 | |
5105 | ac_status=$? | |
5106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5107 | (exit $ac_status); }; }; then | |
5108 | ac_cv_have_decl_basename=yes | |
5109 | else | |
5110 | echo "$as_me: failed program was:" >&5 | |
5111 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5112 | ||
5113 | ac_cv_have_decl_basename=no | |
5114 | fi | |
5115 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5116 | fi | |
5117 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 | |
5118 | echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 | |
5119 | if test $ac_cv_have_decl_basename = yes; then | |
5120 | ||
5121 | cat >>confdefs.h <<_ACEOF | |
5122 | #define HAVE_DECL_BASENAME 1 | |
5123 | _ACEOF | |
5124 | ||
5125 | ||
5126 | else | |
5127 | cat >>confdefs.h <<_ACEOF | |
5128 | #define HAVE_DECL_BASENAME 0 | |
5129 | _ACEOF | |
5130 | ||
5131 | ||
5132 | fi | |
5133 | echo "$as_me:$LINENO: checking whether ffs is declared" >&5 | |
5134 | echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6 | |
5135 | if test "${ac_cv_have_decl_ffs+set}" = set; then | |
5136 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5137 | else | |
5138 | cat >conftest.$ac_ext <<_ACEOF | |
5139 | /* confdefs.h. */ | |
5140 | _ACEOF | |
5141 | cat confdefs.h >>conftest.$ac_ext | |
5142 | cat >>conftest.$ac_ext <<_ACEOF | |
5143 | /* end confdefs.h. */ | |
5144 | $ac_includes_default | |
5145 | int | |
5146 | main () | |
5147 | { | |
5148 | #ifndef ffs | |
5149 | char *p = (char *) ffs; | |
5150 | #endif | |
5151 | ||
5152 | ; | |
5153 | return 0; | |
5154 | } | |
5155 | _ACEOF | |
5156 | rm -f conftest.$ac_objext | |
5157 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5158 | (eval $ac_compile) 2>conftest.er1 | |
5159 | ac_status=$? | |
5160 | grep -v '^ *+' conftest.er1 >conftest.err | |
5161 | rm -f conftest.er1 | |
5162 | cat conftest.err >&5 | |
5163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5164 | (exit $ac_status); } && | |
a4e5c0d8 | 5165 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41c953f9 DD |
5166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5167 | (eval $ac_try) 2>&5 | |
5168 | ac_status=$? | |
5169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5170 | (exit $ac_status); }; } && | |
5171 | { ac_try='test -s conftest.$ac_objext' | |
5172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5173 | (eval $ac_try) 2>&5 | |
5174 | ac_status=$? | |
5175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5176 | (exit $ac_status); }; }; then | |
5177 | ac_cv_have_decl_ffs=yes | |
5178 | else | |
5179 | echo "$as_me: failed program was:" >&5 | |
5180 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5181 | ||
5182 | ac_cv_have_decl_ffs=no | |
5183 | fi | |
5184 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5185 | fi | |
5186 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5 | |
5187 | echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6 | |
5188 | if test $ac_cv_have_decl_ffs = yes; then | |
5189 | ||
5190 | cat >>confdefs.h <<_ACEOF | |
5191 | #define HAVE_DECL_FFS 1 | |
5192 | _ACEOF | |
5193 | ||
5194 | ||
5195 | else | |
5196 | cat >>confdefs.h <<_ACEOF | |
5197 | #define HAVE_DECL_FFS 0 | |
5198 | _ACEOF | |
5199 | ||
5200 | ||
5201 | fi | |
5202 | echo "$as_me:$LINENO: checking whether asprintf is declared" >&5 | |
5203 | echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6 | |
5204 | if test "${ac_cv_have_decl_asprintf+set}" = set; then | |
5205 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5206 | else | |
5207 | cat >conftest.$ac_ext <<_ACEOF | |
5208 | /* confdefs.h. */ | |
5209 | _ACEOF | |
5210 | cat confdefs.h >>conftest.$ac_ext | |
5211 | cat >>conftest.$ac_ext <<_ACEOF | |
5212 | /* end confdefs.h. */ | |
5213 | $ac_includes_default | |
5214 | int | |
5215 | main () | |
5216 | { | |
5217 | #ifndef asprintf | |
5218 | char *p = (char *) asprintf; | |
5219 | #endif | |
5220 | ||
5221 | ; | |
5222 | return 0; | |
5223 | } | |
5224 | _ACEOF | |
5225 | rm -f conftest.$ac_objext | |
5226 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5227 | (eval $ac_compile) 2>conftest.er1 | |
5228 | ac_status=$? | |
5229 | grep -v '^ *+' conftest.er1 >conftest.err | |
5230 | rm -f conftest.er1 | |
5231 | cat conftest.err >&5 | |
5232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5233 | (exit $ac_status); } && | |
a4e5c0d8 | 5234 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41c953f9 DD |
5235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5236 | (eval $ac_try) 2>&5 | |
5237 | ac_status=$? | |
5238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5239 | (exit $ac_status); }; } && | |
5240 | { ac_try='test -s conftest.$ac_objext' | |
5241 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5242 | (eval $ac_try) 2>&5 | |
5243 | ac_status=$? | |
5244 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5245 | (exit $ac_status); }; }; then | |
5246 | ac_cv_have_decl_asprintf=yes | |
5247 | else | |
5248 | echo "$as_me: failed program was:" >&5 | |
5249 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5250 | ||
5251 | ac_cv_have_decl_asprintf=no | |
5252 | fi | |
5253 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5254 | fi | |
5255 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5 | |
5256 | echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6 | |
5257 | if test $ac_cv_have_decl_asprintf = yes; then | |
5258 | ||
5259 | cat >>confdefs.h <<_ACEOF | |
5260 | #define HAVE_DECL_ASPRINTF 1 | |
5261 | _ACEOF | |
5262 | ||
5263 | ||
5264 | else | |
5265 | cat >>confdefs.h <<_ACEOF | |
5266 | #define HAVE_DECL_ASPRINTF 0 | |
5267 | _ACEOF | |
5268 | ||
5269 | ||
5270 | fi | |
5271 | echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5 | |
5272 | echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6 | |
5273 | if test "${ac_cv_have_decl_vasprintf+set}" = set; then | |
5274 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5275 | else | |
5276 | cat >conftest.$ac_ext <<_ACEOF | |
5277 | /* confdefs.h. */ | |
5278 | _ACEOF | |
5279 | cat confdefs.h >>conftest.$ac_ext | |
5280 | cat >>conftest.$ac_ext <<_ACEOF | |
5281 | /* end confdefs.h. */ | |
5282 | $ac_includes_default | |
5283 | int | |
5284 | main () | |
5285 | { | |
5286 | #ifndef vasprintf | |
5287 | char *p = (char *) vasprintf; | |
5288 | #endif | |
5289 | ||
5290 | ; | |
5291 | return 0; | |
5292 | } | |
5293 | _ACEOF | |
5294 | rm -f conftest.$ac_objext | |
5295 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5296 | (eval $ac_compile) 2>conftest.er1 | |
5297 | ac_status=$? | |
5298 | grep -v '^ *+' conftest.er1 >conftest.err | |
5299 | rm -f conftest.er1 | |
5300 | cat conftest.err >&5 | |
5301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5302 | (exit $ac_status); } && | |
a4e5c0d8 | 5303 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41c953f9 DD |
5304 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5305 | (eval $ac_try) 2>&5 | |
5306 | ac_status=$? | |
5307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5308 | (exit $ac_status); }; } && | |
5309 | { ac_try='test -s conftest.$ac_objext' | |
5310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5311 | (eval $ac_try) 2>&5 | |
5312 | ac_status=$? | |
5313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5314 | (exit $ac_status); }; }; then | |
5315 | ac_cv_have_decl_vasprintf=yes | |
5316 | else | |
5317 | echo "$as_me: failed program was:" >&5 | |
5318 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5319 | ||
5320 | ac_cv_have_decl_vasprintf=no | |
5321 | fi | |
5322 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5323 | fi | |
5324 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5 | |
5325 | echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6 | |
5326 | if test $ac_cv_have_decl_vasprintf = yes; then | |
5327 | ||
5328 | cat >>confdefs.h <<_ACEOF | |
5329 | #define HAVE_DECL_VASPRINTF 1 | |
5330 | _ACEOF | |
5331 | ||
5332 | ||
5333 | else | |
5334 | cat >>confdefs.h <<_ACEOF | |
5335 | #define HAVE_DECL_VASPRINTF 0 | |
5336 | _ACEOF | |
5337 | ||
5338 | ||
01e94249 DD |
5339 | fi |
5340 | echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 | |
5341 | echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 | |
5342 | if test "${ac_cv_have_decl_snprintf+set}" = set; then | |
5343 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5344 | else | |
5345 | cat >conftest.$ac_ext <<_ACEOF | |
5346 | /* confdefs.h. */ | |
5347 | _ACEOF | |
5348 | cat confdefs.h >>conftest.$ac_ext | |
5349 | cat >>conftest.$ac_ext <<_ACEOF | |
5350 | /* end confdefs.h. */ | |
5351 | $ac_includes_default | |
5352 | int | |
5353 | main () | |
5354 | { | |
5355 | #ifndef snprintf | |
5356 | char *p = (char *) snprintf; | |
5357 | #endif | |
5358 | ||
5359 | ; | |
5360 | return 0; | |
5361 | } | |
5362 | _ACEOF | |
5363 | rm -f conftest.$ac_objext | |
5364 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5365 | (eval $ac_compile) 2>conftest.er1 | |
5366 | ac_status=$? | |
5367 | grep -v '^ *+' conftest.er1 >conftest.err | |
5368 | rm -f conftest.er1 | |
5369 | cat conftest.err >&5 | |
5370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5371 | (exit $ac_status); } && | |
a4e5c0d8 | 5372 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
01e94249 DD |
5373 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5374 | (eval $ac_try) 2>&5 | |
5375 | ac_status=$? | |
5376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5377 | (exit $ac_status); }; } && | |
5378 | { ac_try='test -s conftest.$ac_objext' | |
5379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5380 | (eval $ac_try) 2>&5 | |
5381 | ac_status=$? | |
5382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5383 | (exit $ac_status); }; }; then | |
5384 | ac_cv_have_decl_snprintf=yes | |
5385 | else | |
5386 | echo "$as_me: failed program was:" >&5 | |
5387 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5388 | ||
5389 | ac_cv_have_decl_snprintf=no | |
5390 | fi | |
5391 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5392 | fi | |
5393 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 | |
5394 | echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 | |
5395 | if test $ac_cv_have_decl_snprintf = yes; then | |
5396 | ||
5397 | cat >>confdefs.h <<_ACEOF | |
5398 | #define HAVE_DECL_SNPRINTF 1 | |
5399 | _ACEOF | |
5400 | ||
5401 | ||
5402 | else | |
5403 | cat >>confdefs.h <<_ACEOF | |
5404 | #define HAVE_DECL_SNPRINTF 0 | |
5405 | _ACEOF | |
5406 | ||
5407 | ||
5408 | fi | |
5409 | echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 | |
5410 | echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 | |
5411 | if test "${ac_cv_have_decl_vsnprintf+set}" = set; then | |
5412 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5413 | else | |
5414 | cat >conftest.$ac_ext <<_ACEOF | |
5415 | /* confdefs.h. */ | |
5416 | _ACEOF | |
5417 | cat confdefs.h >>conftest.$ac_ext | |
5418 | cat >>conftest.$ac_ext <<_ACEOF | |
5419 | /* end confdefs.h. */ | |
5420 | $ac_includes_default | |
5421 | int | |
5422 | main () | |
5423 | { | |
5424 | #ifndef vsnprintf | |
5425 | char *p = (char *) vsnprintf; | |
5426 | #endif | |
5427 | ||
5428 | ; | |
5429 | return 0; | |
5430 | } | |
5431 | _ACEOF | |
5432 | rm -f conftest.$ac_objext | |
5433 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5434 | (eval $ac_compile) 2>conftest.er1 | |
5435 | ac_status=$? | |
5436 | grep -v '^ *+' conftest.er1 >conftest.err | |
5437 | rm -f conftest.er1 | |
5438 | cat conftest.err >&5 | |
5439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5440 | (exit $ac_status); } && | |
a4e5c0d8 | 5441 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
01e94249 DD |
5442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5443 | (eval $ac_try) 2>&5 | |
5444 | ac_status=$? | |
5445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5446 | (exit $ac_status); }; } && | |
5447 | { ac_try='test -s conftest.$ac_objext' | |
5448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5449 | (eval $ac_try) 2>&5 | |
5450 | ac_status=$? | |
5451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5452 | (exit $ac_status); }; }; then | |
5453 | ac_cv_have_decl_vsnprintf=yes | |
5454 | else | |
5455 | echo "$as_me: failed program was:" >&5 | |
5456 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5457 | ||
5458 | ac_cv_have_decl_vsnprintf=no | |
5459 | fi | |
5460 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5461 | fi | |
5462 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 | |
5463 | echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 | |
5464 | if test $ac_cv_have_decl_vsnprintf = yes; then | |
5465 | ||
5466 | cat >>confdefs.h <<_ACEOF | |
5467 | #define HAVE_DECL_VSNPRINTF 1 | |
5468 | _ACEOF | |
5469 | ||
5470 | ||
5471 | else | |
5472 | cat >>confdefs.h <<_ACEOF | |
5473 | #define HAVE_DECL_VSNPRINTF 0 | |
5474 | _ACEOF | |
5475 | ||
5476 | ||
41c953f9 DD |
5477 | fi |
5478 | ||
5479 | ||
2299a76d DJ |
5480 | |
5481 | cat >>confdefs.h <<\_ACEOF | |
92655e19 | 5482 | #define HAVE_SYS_ERRLIST 1 |
2299a76d DJ |
5483 | _ACEOF |
5484 | ||
92655e19 | 5485 | |
2299a76d | 5486 | cat >>confdefs.h <<\_ACEOF |
c6da642e | 5487 | #define HAVE_SYS_NERR 1 |
2299a76d DJ |
5488 | _ACEOF |
5489 | ||
92655e19 | 5490 | |
2299a76d | 5491 | cat >>confdefs.h <<\_ACEOF |
92655e19 | 5492 | #define HAVE_SYS_SIGLIST 1 |
2299a76d | 5493 | _ACEOF |
92655e19 | 5494 | |
252b5132 RH |
5495 | fi |
5496 | ||
5497 | # For each of these functions, if the host does not provide the | |
5498 | # function we want to put FN.o in LIBOBJS, and if the host does | |
30673bf5 | 5499 | # provide the function, we want to define HAVE_FN in config.h. |
252b5132 RH |
5500 | |
5501 | setobjs= | |
0c0a36a4 | 5502 | CHECK= |
50d4562d | 5503 | target_header_dir= |
252b5132 RH |
5504 | if test -n "${with_target_subdir}"; then |
5505 | ||
5506 | # We are being configured as a target library. AC_REPLACE_FUNCS | |
5507 | # may not work correctly, because the compiler may not be able to | |
5508 | # link executables. Note that we may still be being configured | |
5509 | # native. | |
5510 | ||
5511 | # If we are being configured for newlib, we know which functions | |
5512 | # newlib provide and which ones we will be expected to provide. | |
5513 | ||
5514 | if test "x${with_newlib}" = "xyes"; then | |
58670637 DD |
5515 | case $LIBOBJS in |
5516 | "asprintf.$ac_objext" | \ | |
5517 | *" asprintf.$ac_objext" | \ | |
5518 | "asprintf.$ac_objext "* | \ | |
5519 | *" asprintf.$ac_objext "* ) ;; | |
5520 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;; | |
5521 | esac | |
5522 | ||
5523 | case $LIBOBJS in | |
5524 | "basename.$ac_objext" | \ | |
5525 | *" basename.$ac_objext" | \ | |
5526 | "basename.$ac_objext "* | \ | |
5527 | *" basename.$ac_objext "* ) ;; | |
5528 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; | |
5529 | esac | |
5530 | ||
5531 | case $LIBOBJS in | |
5532 | "insque.$ac_objext" | \ | |
5533 | *" insque.$ac_objext" | \ | |
5534 | "insque.$ac_objext "* | \ | |
5535 | *" insque.$ac_objext "* ) ;; | |
5536 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; | |
5537 | esac | |
5538 | ||
5539 | case $LIBOBJS in | |
5540 | "random.$ac_objext" | \ | |
5541 | *" random.$ac_objext" | \ | |
5542 | "random.$ac_objext "* | \ | |
5543 | *" random.$ac_objext "* ) ;; | |
5544 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
5545 | esac | |
5546 | ||
5547 | case $LIBOBJS in | |
5548 | "strdup.$ac_objext" | \ | |
5549 | *" strdup.$ac_objext" | \ | |
5550 | "strdup.$ac_objext "* | \ | |
5551 | *" strdup.$ac_objext "* ) ;; | |
5552 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;; | |
5553 | esac | |
5554 | ||
5555 | case $LIBOBJS in | |
5556 | "vasprintf.$ac_objext" | \ | |
5557 | *" vasprintf.$ac_objext" | \ | |
5558 | "vasprintf.$ac_objext "* | \ | |
5559 | *" vasprintf.$ac_objext "* ) ;; | |
5560 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; | |
5561 | esac | |
5562 | ||
252b5132 RH |
5563 | |
5564 | for f in $funcs; do | |
5565 | case "$f" in | |
5566 | asprintf | basename | insque | random | strdup | vasprintf) | |
5567 | ;; | |
5568 | *) | |
5569 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2299a76d | 5570 | cat >>confdefs.h <<_ACEOF |
252b5132 | 5571 | #define $n 1 |
2299a76d | 5572 | _ACEOF |
252b5132 RH |
5573 | |
5574 | ;; | |
5575 | esac | |
5576 | done | |
5577 | ||
5578 | # newlib doesnt provide any of the variables in $vars, so we | |
5579 | # dont have to check them here. | |
5580 | ||
5581 | # Of the functions in $checkfuncs, newlib only has strerror. | |
0093138c | 5582 | cat >>confdefs.h <<\_ACEOF |
252b5132 | 5583 | #define HAVE_STRERROR 1 |
0093138c | 5584 | _ACEOF |
252b5132 RH |
5585 | |
5586 | ||
5587 | setobjs=yes | |
5588 | ||
5589 | fi | |
0c0a36a4 | 5590 | |
50d4562d DD |
5591 | # We may wish to install the target headers somewhere. |
5592 | # Check whether --enable-install-libiberty or --disable-install-libiberty was given. | |
5593 | if test "${enable_install_libiberty+set}" = set; then | |
5594 | enableval="$enable_install_libiberty" | |
5595 | enable_install_libiberty=$enableval | |
5596 | else | |
5597 | enable_install_libiberty=no | |
2299a76d | 5598 | fi; |
50d4562d DD |
5599 | # Option parsed, now set things appropriately. |
5600 | case x"$enable_install_libiberty" in | |
5601 | xyes|x) | |
5602 | target_header_dir=libiberty | |
5603 | ;; | |
2299a76d | 5604 | xno) |
50d4562d DD |
5605 | target_header_dir= |
5606 | ;; | |
2299a76d | 5607 | *) |
50d4562d DD |
5608 | # This could be sanity-checked in various ways... |
5609 | target_header_dir="${enable_install_libiberty}" | |
5610 | ;; | |
5611 | esac | |
5612 | ||
5613 | ||
0c0a36a4 ILT |
5614 | else |
5615 | ||
5616 | # Not a target library, so we set things up to run the test suite. | |
b109e79a | 5617 | CHECK=really-check |
0c0a36a4 | 5618 | |
252b5132 RH |
5619 | fi |
5620 | ||
0c0a36a4 ILT |
5621 | |
5622 | ||
50d4562d | 5623 | |
f01b59ed | 5624 | case "${host}" in |
bef8b55d | 5625 | *-*-cygwin* | *-*-mingw*) |
0093138c | 5626 | cat >>confdefs.h <<\_ACEOF |
f01b59ed | 5627 | #define HAVE_SYS_ERRLIST 1 |
0093138c | 5628 | _ACEOF |
f01b59ed | 5629 | |
0093138c | 5630 | cat >>confdefs.h <<\_ACEOF |
f01b59ed | 5631 | #define HAVE_SYS_NERR 1 |
0093138c | 5632 | _ACEOF |
f01b59ed DD |
5633 | |
5634 | ;; | |
5635 | esac | |
5636 | ||
252b5132 RH |
5637 | if test -z "${setobjs}"; then |
5638 | case "${host}" in | |
5639 | ||
5640 | *-*-vxworks*) | |
5641 | # Handle VxWorks configuration specially, since on VxWorks the | |
5642 | # libraries are actually on the target board, not in the file | |
5643 | # system. | |
58670637 DD |
5644 | case $LIBOBJS in |
5645 | "basename.$ac_objext" | \ | |
5646 | *" basename.$ac_objext" | \ | |
5647 | "basename.$ac_objext "* | \ | |
5648 | *" basename.$ac_objext "* ) ;; | |
5649 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; | |
5650 | esac | |
5651 | ||
5652 | case $LIBOBJS in | |
5653 | "getpagesize.$ac_objext" | \ | |
5654 | *" getpagesize.$ac_objext" | \ | |
5655 | "getpagesize.$ac_objext "* | \ | |
5656 | *" getpagesize.$ac_objext "* ) ;; | |
5657 | *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;; | |
5658 | esac | |
5659 | ||
5660 | case $LIBOBJS in | |
5661 | "insque.$ac_objext" | \ | |
5662 | *" insque.$ac_objext" | \ | |
5663 | "insque.$ac_objext "* | \ | |
5664 | *" insque.$ac_objext "* ) ;; | |
5665 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; | |
5666 | esac | |
5667 | ||
5668 | case $LIBOBJS in | |
5669 | "random.$ac_objext" | \ | |
5670 | *" random.$ac_objext" | \ | |
5671 | "random.$ac_objext "* | \ | |
5672 | *" random.$ac_objext "* ) ;; | |
5673 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
5674 | esac | |
5675 | ||
5676 | case $LIBOBJS in | |
5677 | "strcasecmp.$ac_objext" | \ | |
5678 | *" strcasecmp.$ac_objext" | \ | |
5679 | "strcasecmp.$ac_objext "* | \ | |
5680 | *" strcasecmp.$ac_objext "* ) ;; | |
5681 | *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;; | |
5682 | esac | |
5683 | ||
5684 | case $LIBOBJS in | |
5685 | "strncasecmp.$ac_objext" | \ | |
5686 | *" strncasecmp.$ac_objext" | \ | |
5687 | "strncasecmp.$ac_objext "* | \ | |
5688 | *" strncasecmp.$ac_objext "* ) ;; | |
5689 | *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; | |
5690 | esac | |
5691 | ||
5692 | case $LIBOBJS in | |
5693 | "strdup.$ac_objext" | \ | |
5694 | *" strdup.$ac_objext" | \ | |
5695 | "strdup.$ac_objext "* | \ | |
5696 | *" strdup.$ac_objext "* ) ;; | |
5697 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;; | |
5698 | esac | |
5699 | ||
5700 | case $LIBOBJS in | |
5701 | "vfork.$ac_objext" | \ | |
5702 | *" vfork.$ac_objext" | \ | |
5703 | "vfork.$ac_objext "* | \ | |
5704 | *" vfork.$ac_objext "* ) ;; | |
5705 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;; | |
5706 | esac | |
5707 | ||
5708 | case $LIBOBJS in | |
5709 | "waitpid.$ac_objext" | \ | |
5710 | *" waitpid.$ac_objext" | \ | |
5711 | "waitpid.$ac_objext "* | \ | |
5712 | *" waitpid.$ac_objext "* ) ;; | |
5713 | *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;; | |
5714 | esac | |
5715 | ||
5716 | case $LIBOBJS in | |
5717 | "vasprintf.$ac_objext" | \ | |
5718 | *" vasprintf.$ac_objext" | \ | |
5719 | "vasprintf.$ac_objext "* | \ | |
5720 | *" vasprintf.$ac_objext "* ) ;; | |
5721 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; | |
5722 | esac | |
5723 | ||
252b5132 RH |
5724 | for f in $funcs; do |
5725 | case "$f" in | |
5726 | basename | getpagesize | insque | random | strcasecmp) | |
5727 | ;; | |
5728 | strncasecmp | strdup | vfork | waitpid | vasprintf) | |
5729 | ;; | |
5730 | *) | |
5731 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2299a76d | 5732 | cat >>confdefs.h <<_ACEOF |
252b5132 | 5733 | #define $n 1 |
2299a76d | 5734 | _ACEOF |
252b5132 RH |
5735 | |
5736 | ;; | |
5737 | esac | |
5738 | done | |
5739 | ||
5740 | # VxWorks doesn't provide any of the variables in $vars, so we | |
5741 | # don't have to check them here. | |
5742 | ||
5743 | # Of the functions in $checkfuncs, VxWorks only has strerror. | |
0093138c | 5744 | cat >>confdefs.h <<\_ACEOF |
252b5132 | 5745 | #define HAVE_STRERROR 1 |
0093138c | 5746 | _ACEOF |
252b5132 RH |
5747 | |
5748 | ||
5749 | setobjs=yes | |
5750 | ;; | |
5751 | ||
5752 | esac | |
5753 | fi | |
5754 | ||
5755 | if test -z "${setobjs}"; then | |
5756 | ||
5757 | case "${host}" in | |
5758 | ||
5759 | *-*-cygwin*) | |
5760 | # The Cygwin library actually uses a couple of files from | |
5761 | # libiberty when it is built. If we are building a native | |
5762 | # Cygwin, and we run the tests, we will appear to have these | |
5763 | # files. However, when we go on to build winsup, we will wind up | |
5764 | # with a library which does not have the files, since they should | |
5765 | # have come from libiberty. | |
5766 | ||
5767 | # We handle this by removing the functions the winsup library | |
5768 | # provides from our shell variables, so that they appear to be | |
5769 | # missing. | |
5770 | ||
64e3a659 | 5771 | # DJ - only if we're *building* cygwin, not just building *with* cygwin |
2299a76d | 5772 | |
64e3a659 DD |
5773 | if test -n "${with_target_subdir}" |
5774 | then | |
5775 | funcs="`echo $funcs | sed -e 's/random//'`" | |
58670637 DD |
5776 | case $LIBOBJS in |
5777 | "random.$ac_objext" | \ | |
5778 | *" random.$ac_objext" | \ | |
5779 | "random.$ac_objext "* | \ | |
5780 | *" random.$ac_objext "* ) ;; | |
5781 | *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; | |
5782 | esac | |
5783 | ||
64e3a659 DD |
5784 | vars="`echo $vars | sed -e 's/sys_siglist//'`" |
5785 | checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" | |
5786 | fi | |
252b5132 RH |
5787 | ;; |
5788 | ||
5789 | *-*-mingw32*) | |
5790 | # Under mingw32, sys_nerr and sys_errlist exist, but they are | |
5791 | # macros, so the test below won't find them. | |
92655e19 DD |
5792 | libiberty_cv_var_sys_nerr=yes |
5793 | libiberty_cv_var_sys_errlist=yes | |
252b5132 RH |
5794 | ;; |
5795 | ||
65dce80e DD |
5796 | *-*-msdosdjgpp*) |
5797 | # vfork and fork are stubs. | |
5798 | ac_cv_func_vfork_works=no | |
5799 | ;; | |
5800 | ||
252b5132 | 5801 | *-*-uwin*) |
2299a76d | 5802 | # Under some versions of uwin, vfork is notoriously buggy and the test |
252b5132 RH |
5803 | # can hang configure; on other versions, vfork exists just as a stub. |
5804 | # FIXME: This should be removed once vfork in uwin's runtime is fixed. | |
5805 | ac_cv_func_vfork_works=no | |
0c0a36a4 | 5806 | # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are |
2299a76d | 5807 | # macros (actually, these are imported from a DLL, but the end effect |
0c0a36a4 | 5808 | # is the same), so the test below won't find them. |
92655e19 DD |
5809 | libiberty_cv_var_sys_nerr=yes |
5810 | libiberty_cv_var_sys_errlist=yes | |
252b5132 RH |
5811 | ;; |
5812 | ||
c0eb281b | 5813 | *-*-*vms*) |
2299a76d | 5814 | # Under VMS, vfork works very different than on Unix. The standard test |
c0eb281b DD |
5815 | # won't work, and it isn't easily adaptable. It makes more sense to |
5816 | # just force it. | |
5817 | ac_cv_func_vfork_works=yes | |
5818 | ;; | |
5819 | ||
252b5132 RH |
5820 | esac |
5821 | ||
5822 | # We haven't set the list of objects yet. Use the standard autoconf | |
5823 | # tests. This will only work if the compiler works. | |
2299a76d DJ |
5824 | echo "$as_me:$LINENO: checking for library containing strerror" >&5 |
5825 | echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 | |
5826 | if test "${ac_cv_search_strerror+set}" = set; then | |
5827 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5828 | else | |
5829 | ac_func_search_save_LIBS=$LIBS | |
5830 | ac_cv_search_strerror=no | |
5831 | if test x$gcc_no_link = xyes; then | |
5832 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
5833 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
5834 | { (exit 1); exit 1; }; } | |
5835 | fi | |
5836 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
5837 | /* confdefs.h. */ |
5838 | _ACEOF | |
5839 | cat confdefs.h >>conftest.$ac_ext | |
5840 | cat >>conftest.$ac_ext <<_ACEOF | |
5841 | /* end confdefs.h. */ | |
252b5132 | 5842 | |
2299a76d DJ |
5843 | /* Override any gcc2 internal prototype to avoid an error. */ |
5844 | #ifdef __cplusplus | |
5845 | extern "C" | |
5846 | #endif | |
5847 | /* We use char because int might match the return type of a gcc2 | |
5848 | builtin and then its argument prototype would still apply. */ | |
5849 | char strerror (); | |
5850 | int | |
5851 | main () | |
5852 | { | |
5853 | strerror (); | |
5854 | ; | |
5855 | return 0; | |
5856 | } | |
5857 | _ACEOF | |
5858 | rm -f conftest.$ac_objext conftest$ac_exeext | |
5859 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 5860 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 5861 | ac_status=$? |
58670637 DD |
5862 | grep -v '^ *+' conftest.er1 >conftest.err |
5863 | rm -f conftest.er1 | |
5864 | cat conftest.err >&5 | |
2299a76d DJ |
5865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5866 | (exit $ac_status); } && | |
a4e5c0d8 | 5867 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
5868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5869 | (eval $ac_try) 2>&5 | |
5870 | ac_status=$? | |
5871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5872 | (exit $ac_status); }; } && | |
5873 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
5874 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5875 | (eval $ac_try) 2>&5 | |
5876 | ac_status=$? | |
5877 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5878 | (exit $ac_status); }; }; then | |
5879 | ac_cv_search_strerror="none required" | |
5880 | else | |
5881 | echo "$as_me: failed program was:" >&5 | |
5882 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5883 | ||
5884 | fi | |
58670637 DD |
5885 | rm -f conftest.err conftest.$ac_objext \ |
5886 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
5887 | if test "$ac_cv_search_strerror" = no; then |
5888 | for ac_lib in cposix; do | |
5889 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5890 | if test x$gcc_no_link = xyes; then | |
5891 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
5892 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
5893 | { (exit 1); exit 1; }; } | |
5894 | fi | |
5895 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
5896 | /* confdefs.h. */ |
5897 | _ACEOF | |
5898 | cat confdefs.h >>conftest.$ac_ext | |
5899 | cat >>conftest.$ac_ext <<_ACEOF | |
5900 | /* end confdefs.h. */ | |
252b5132 | 5901 | |
2299a76d DJ |
5902 | /* Override any gcc2 internal prototype to avoid an error. */ |
5903 | #ifdef __cplusplus | |
5904 | extern "C" | |
5905 | #endif | |
5906 | /* We use char because int might match the return type of a gcc2 | |
5907 | builtin and then its argument prototype would still apply. */ | |
5908 | char strerror (); | |
5909 | int | |
5910 | main () | |
5911 | { | |
5912 | strerror (); | |
5913 | ; | |
5914 | return 0; | |
5915 | } | |
5916 | _ACEOF | |
5917 | rm -f conftest.$ac_objext conftest$ac_exeext | |
5918 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 5919 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 5920 | ac_status=$? |
58670637 DD |
5921 | grep -v '^ *+' conftest.er1 >conftest.err |
5922 | rm -f conftest.er1 | |
5923 | cat conftest.err >&5 | |
2299a76d DJ |
5924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5925 | (exit $ac_status); } && | |
a4e5c0d8 | 5926 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
5927 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5928 | (eval $ac_try) 2>&5 | |
5929 | ac_status=$? | |
5930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5931 | (exit $ac_status); }; } && | |
5932 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
5933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5934 | (eval $ac_try) 2>&5 | |
5935 | ac_status=$? | |
5936 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5937 | (exit $ac_status); }; }; then | |
5938 | ac_cv_search_strerror="-l$ac_lib" | |
5939 | break | |
5940 | else | |
5941 | echo "$as_me: failed program was:" >&5 | |
5942 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5943 | ||
5944 | fi | |
58670637 DD |
5945 | rm -f conftest.err conftest.$ac_objext \ |
5946 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d | 5947 | done |
252b5132 | 5948 | fi |
2299a76d DJ |
5949 | LIBS=$ac_func_search_save_LIBS |
5950 | fi | |
5951 | echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 | |
5952 | echo "${ECHO_T}$ac_cv_search_strerror" >&6 | |
5953 | if test "$ac_cv_search_strerror" != no; then | |
5954 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
252b5132 | 5955 | |
252b5132 | 5956 | fi |
252b5132 | 5957 | |
2299a76d DJ |
5958 | |
5959 | for ac_func in $funcs | |
252b5132 | 5960 | do |
2299a76d DJ |
5961 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
5962 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
5963 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
5964 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
5965 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5966 | else | |
5967 | if test x$gcc_no_link = xyes; then | |
5968 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
5969 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
5970 | { (exit 1); exit 1; }; } | |
5971 | fi | |
5972 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
5973 | /* confdefs.h. */ |
5974 | _ACEOF | |
5975 | cat confdefs.h >>conftest.$ac_ext | |
5976 | cat >>conftest.$ac_ext <<_ACEOF | |
5977 | /* end confdefs.h. */ | |
252b5132 | 5978 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
5979 | which can conflict with char $ac_func (); below. |
5980 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
5981 | <limits.h> exists even on freestanding compilers. Under hpux, |
5982 | including <limits.h> includes <sys/time.h> and causes problems | |
5983 | checking for functions defined therein. */ | |
5984 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
5985 | # include <limits.h> |
5986 | #else | |
5987 | # include <assert.h> | |
5988 | #endif | |
252b5132 | 5989 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
5990 | #ifdef __cplusplus |
5991 | extern "C" | |
5992 | { | |
5993 | #endif | |
252b5132 | 5994 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
5995 | builtin and then its argument prototype would still apply. */ |
5996 | char $ac_func (); | |
252b5132 RH |
5997 | /* The GNU C library defines this for functions which it implements |
5998 | to always fail with ENOSYS. Some functions are actually named | |
5999 | something starting with __ and the normal name is an alias. */ | |
6000 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6001 | choke me | |
6002 | #else | |
2299a76d DJ |
6003 | char (*f) () = $ac_func; |
6004 | #endif | |
6005 | #ifdef __cplusplus | |
6006 | } | |
252b5132 RH |
6007 | #endif |
6008 | ||
2299a76d DJ |
6009 | int |
6010 | main () | |
6011 | { | |
6012 | return f != $ac_func; | |
6013 | ; | |
6014 | return 0; | |
6015 | } | |
6016 | _ACEOF | |
6017 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6018 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6019 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6020 | ac_status=$? |
58670637 DD |
6021 | grep -v '^ *+' conftest.er1 >conftest.err |
6022 | rm -f conftest.er1 | |
6023 | cat conftest.err >&5 | |
2299a76d DJ |
6024 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6025 | (exit $ac_status); } && | |
a4e5c0d8 | 6026 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6027 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6028 | (eval $ac_try) 2>&5 | |
6029 | ac_status=$? | |
6030 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6031 | (exit $ac_status); }; } && | |
6032 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6033 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6034 | (eval $ac_try) 2>&5 | |
6035 | ac_status=$? | |
6036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6037 | (exit $ac_status); }; }; then | |
6038 | eval "$as_ac_var=yes" | |
6039 | else | |
6040 | echo "$as_me: failed program was:" >&5 | |
6041 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6042 | ||
6043 | eval "$as_ac_var=no" | |
6044 | fi | |
58670637 DD |
6045 | rm -f conftest.err conftest.$ac_objext \ |
6046 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6047 | fi |
6048 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6049 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6050 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6051 | cat >>confdefs.h <<_ACEOF | |
6052 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6053 | _ACEOF | |
6054 | ||
6055 | else | |
58670637 DD |
6056 | case $LIBOBJS in |
6057 | "$ac_func.$ac_objext" | \ | |
6058 | *" $ac_func.$ac_objext" | \ | |
6059 | "$ac_func.$ac_objext "* | \ | |
6060 | *" $ac_func.$ac_objext "* ) ;; | |
6061 | *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; | |
6062 | esac | |
6063 | ||
252b5132 RH |
6064 | fi |
6065 | done | |
6066 | ||
6067 | ||
2299a76d DJ |
6068 | echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5 |
6069 | echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6 | |
6070 | if test "${ac_cv_os_cray+set}" = set; then | |
6071 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6072 | else |
2299a76d | 6073 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6074 | /* confdefs.h. */ |
6075 | _ACEOF | |
6076 | cat confdefs.h >>conftest.$ac_ext | |
6077 | cat >>conftest.$ac_ext <<_ACEOF | |
6078 | /* end confdefs.h. */ | |
252b5132 RH |
6079 | #if defined(CRAY) && ! defined(CRAY2) |
6080 | webecray | |
6081 | #else | |
6082 | wenotbecray | |
6083 | #endif | |
6084 | ||
2299a76d | 6085 | _ACEOF |
252b5132 | 6086 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
2299a76d | 6087 | $EGREP "webecray" >/dev/null 2>&1; then |
252b5132 RH |
6088 | ac_cv_os_cray=yes |
6089 | else | |
252b5132 RH |
6090 | ac_cv_os_cray=no |
6091 | fi | |
6092 | rm -f conftest* | |
6093 | ||
6094 | fi | |
2299a76d DJ |
6095 | echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 |
6096 | echo "${ECHO_T}$ac_cv_os_cray" >&6 | |
252b5132 | 6097 | if test $ac_cv_os_cray = yes; then |
30673bf5 | 6098 | for ac_func in _getb67 GETB67 getb67; do |
2299a76d DJ |
6099 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6100 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6101 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6102 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6103 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6104 | else | |
6105 | if test x$gcc_no_link = xyes; then | |
6106 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6107 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6108 | { (exit 1); exit 1; }; } | |
6109 | fi | |
6110 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6111 | /* confdefs.h. */ |
6112 | _ACEOF | |
6113 | cat confdefs.h >>conftest.$ac_ext | |
6114 | cat >>conftest.$ac_ext <<_ACEOF | |
6115 | /* end confdefs.h. */ | |
252b5132 | 6116 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6117 | which can conflict with char $ac_func (); below. |
6118 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6119 | <limits.h> exists even on freestanding compilers. Under hpux, |
6120 | including <limits.h> includes <sys/time.h> and causes problems | |
6121 | checking for functions defined therein. */ | |
6122 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6123 | # include <limits.h> |
6124 | #else | |
6125 | # include <assert.h> | |
6126 | #endif | |
252b5132 | 6127 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6128 | #ifdef __cplusplus |
6129 | extern "C" | |
6130 | { | |
6131 | #endif | |
252b5132 | 6132 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6133 | builtin and then its argument prototype would still apply. */ |
6134 | char $ac_func (); | |
252b5132 RH |
6135 | /* The GNU C library defines this for functions which it implements |
6136 | to always fail with ENOSYS. Some functions are actually named | |
6137 | something starting with __ and the normal name is an alias. */ | |
6138 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6139 | choke me | |
6140 | #else | |
2299a76d DJ |
6141 | char (*f) () = $ac_func; |
6142 | #endif | |
6143 | #ifdef __cplusplus | |
6144 | } | |
252b5132 RH |
6145 | #endif |
6146 | ||
2299a76d DJ |
6147 | int |
6148 | main () | |
6149 | { | |
6150 | return f != $ac_func; | |
6151 | ; | |
6152 | return 0; | |
6153 | } | |
6154 | _ACEOF | |
6155 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6156 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6157 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6158 | ac_status=$? |
58670637 DD |
6159 | grep -v '^ *+' conftest.er1 >conftest.err |
6160 | rm -f conftest.er1 | |
6161 | cat conftest.err >&5 | |
2299a76d DJ |
6162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6163 | (exit $ac_status); } && | |
a4e5c0d8 | 6164 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6166 | (eval $ac_try) 2>&5 | |
6167 | ac_status=$? | |
6168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6169 | (exit $ac_status); }; } && | |
6170 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6172 | (eval $ac_try) 2>&5 | |
6173 | ac_status=$? | |
6174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6175 | (exit $ac_status); }; }; then | |
6176 | eval "$as_ac_var=yes" | |
6177 | else | |
6178 | echo "$as_me: failed program was:" >&5 | |
6179 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6180 | ||
6181 | eval "$as_ac_var=no" | |
6182 | fi | |
58670637 DD |
6183 | rm -f conftest.err conftest.$ac_objext \ |
6184 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6185 | fi |
6186 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6187 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6188 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6189 | ||
6190 | cat >>confdefs.h <<_ACEOF | |
252b5132 | 6191 | #define CRAY_STACKSEG_END $ac_func |
2299a76d | 6192 | _ACEOF |
252b5132 | 6193 | break |
252b5132 RH |
6194 | fi |
6195 | ||
30673bf5 | 6196 | done |
252b5132 RH |
6197 | fi |
6198 | ||
2299a76d DJ |
6199 | echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 |
6200 | echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 | |
6201 | if test "${ac_cv_c_stack_direction+set}" = set; then | |
6202 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 RH |
6203 | else |
6204 | if test "$cross_compiling" = yes; then | |
6205 | ac_cv_c_stack_direction=0 | |
6206 | else | |
2299a76d | 6207 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6208 | /* confdefs.h. */ |
6209 | _ACEOF | |
6210 | cat confdefs.h >>conftest.$ac_ext | |
6211 | cat >>conftest.$ac_ext <<_ACEOF | |
6212 | /* end confdefs.h. */ | |
252b5132 RH |
6213 | find_stack_direction () |
6214 | { | |
6215 | static char *addr = 0; | |
6216 | auto char dummy; | |
6217 | if (addr == 0) | |
6218 | { | |
6219 | addr = &dummy; | |
6220 | return find_stack_direction (); | |
6221 | } | |
6222 | else | |
6223 | return (&dummy > addr) ? 1 : -1; | |
6224 | } | |
6225 | main () | |
6226 | { | |
6227 | exit (find_stack_direction() < 0); | |
6228 | } | |
2299a76d DJ |
6229 | _ACEOF |
6230 | rm -f conftest$ac_exeext | |
6231 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6232 | (eval $ac_link) 2>&5 | |
6233 | ac_status=$? | |
6234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6235 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6236 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6237 | (eval $ac_try) 2>&5 | |
6238 | ac_status=$? | |
6239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6240 | (exit $ac_status); }; }; then | |
252b5132 RH |
6241 | ac_cv_c_stack_direction=1 |
6242 | else | |
2299a76d DJ |
6243 | echo "$as_me: program exited with status $ac_status" >&5 |
6244 | echo "$as_me: failed program was:" >&5 | |
6245 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6246 | ||
6247 | ( exit $ac_status ) | |
6248 | ac_cv_c_stack_direction=-1 | |
252b5132 | 6249 | fi |
58670637 | 6250 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
252b5132 | 6251 | fi |
252b5132 | 6252 | fi |
2299a76d DJ |
6253 | echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 |
6254 | echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 | |
252b5132 | 6255 | |
2299a76d | 6256 | cat >>confdefs.h <<_ACEOF |
252b5132 | 6257 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
2299a76d DJ |
6258 | _ACEOF |
6259 | ||
252b5132 | 6260 | |
0c0a36a4 | 6261 | |
2299a76d DJ |
6262 | |
6263 | for ac_header in unistd.h vfork.h | |
6264 | do | |
6265 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8ddbb593 | 6266 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
6267 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
6268 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6269 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 6270 | else |
8ddbb593 | 6271 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
6272 | /* confdefs.h. */ |
6273 | _ACEOF | |
6274 | cat confdefs.h >>conftest.$ac_ext | |
6275 | cat >>conftest.$ac_ext <<_ACEOF | |
6276 | /* end confdefs.h. */ | |
6277 | #include <$ac_header> | |
6278 | _ACEOF | |
6279 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6280 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6281 | ac_status=$? | |
6282 | grep -v '^ *+' conftest.er1 >conftest.err | |
6283 | rm -f conftest.er1 | |
6284 | cat conftest.err >&5 | |
6285 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6286 | (exit $ac_status); } >/dev/null; then | |
6287 | if test -s conftest.err; then | |
6288 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 6289 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
6290 | else |
6291 | ac_cpp_err= | |
6292 | fi | |
252b5132 | 6293 | else |
2299a76d DJ |
6294 | ac_cpp_err=yes |
6295 | fi | |
6296 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 6297 | eval "$as_ac_Header=yes" |
2299a76d DJ |
6298 | else |
6299 | echo "$as_me: failed program was:" >&5 | |
6300 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6301 | ||
8ddbb593 | 6302 | eval "$as_ac_Header=no" |
2299a76d DJ |
6303 | fi |
6304 | rm -f conftest.err conftest.$ac_ext | |
252b5132 | 6305 | fi |
2299a76d DJ |
6306 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
6307 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
6308 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
6309 | cat >>confdefs.h <<_ACEOF | |
6310 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6311 | _ACEOF | |
252b5132 | 6312 | |
252b5132 | 6313 | fi |
2299a76d DJ |
6314 | done |
6315 | ||
6316 | ||
6317 | ||
6318 | for ac_func in fork vfork | |
6319 | do | |
6320 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6321 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6322 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6323 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6324 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6325 | else | |
6326 | if test x$gcc_no_link = xyes; then | |
6327 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6328 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6329 | { (exit 1); exit 1; }; } | |
6330 | fi | |
6331 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6332 | /* confdefs.h. */ |
6333 | _ACEOF | |
6334 | cat confdefs.h >>conftest.$ac_ext | |
6335 | cat >>conftest.$ac_ext <<_ACEOF | |
6336 | /* end confdefs.h. */ | |
252b5132 | 6337 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6338 | which can conflict with char $ac_func (); below. |
6339 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6340 | <limits.h> exists even on freestanding compilers. Under hpux, |
6341 | including <limits.h> includes <sys/time.h> and causes problems | |
6342 | checking for functions defined therein. */ | |
6343 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6344 | # include <limits.h> |
6345 | #else | |
6346 | # include <assert.h> | |
6347 | #endif | |
252b5132 | 6348 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6349 | #ifdef __cplusplus |
6350 | extern "C" | |
6351 | { | |
6352 | #endif | |
252b5132 | 6353 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6354 | builtin and then its argument prototype would still apply. */ |
6355 | char $ac_func (); | |
252b5132 RH |
6356 | /* The GNU C library defines this for functions which it implements |
6357 | to always fail with ENOSYS. Some functions are actually named | |
6358 | something starting with __ and the normal name is an alias. */ | |
2299a76d | 6359 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
252b5132 RH |
6360 | choke me |
6361 | #else | |
2299a76d DJ |
6362 | char (*f) () = $ac_func; |
6363 | #endif | |
6364 | #ifdef __cplusplus | |
6365 | } | |
252b5132 RH |
6366 | #endif |
6367 | ||
2299a76d DJ |
6368 | int |
6369 | main () | |
6370 | { | |
6371 | return f != $ac_func; | |
6372 | ; | |
6373 | return 0; | |
6374 | } | |
6375 | _ACEOF | |
6376 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6377 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6378 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6379 | ac_status=$? |
58670637 DD |
6380 | grep -v '^ *+' conftest.er1 >conftest.err |
6381 | rm -f conftest.er1 | |
6382 | cat conftest.err >&5 | |
2299a76d DJ |
6383 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6384 | (exit $ac_status); } && | |
a4e5c0d8 | 6385 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6386 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6387 | (eval $ac_try) 2>&5 | |
6388 | ac_status=$? | |
6389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6390 | (exit $ac_status); }; } && | |
6391 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6393 | (eval $ac_try) 2>&5 | |
6394 | ac_status=$? | |
6395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6396 | (exit $ac_status); }; }; then | |
6397 | eval "$as_ac_var=yes" | |
6398 | else | |
6399 | echo "$as_me: failed program was:" >&5 | |
6400 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6401 | ||
6402 | eval "$as_ac_var=no" | |
6403 | fi | |
58670637 DD |
6404 | rm -f conftest.err conftest.$ac_objext \ |
6405 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6406 | fi |
6407 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6408 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6409 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6410 | cat >>confdefs.h <<_ACEOF | |
6411 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6412 | _ACEOF | |
6413 | ||
252b5132 | 6414 | fi |
2299a76d | 6415 | done |
252b5132 | 6416 | |
2299a76d DJ |
6417 | if test "x$ac_cv_func_fork" = xyes; then |
6418 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
6419 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
6420 | if test "${ac_cv_func_fork_works+set}" = set; then | |
6421 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6422 | else |
2299a76d DJ |
6423 | if test "$cross_compiling" = yes; then |
6424 | ac_cv_func_fork_works=cross | |
6425 | else | |
6426 | cat >conftest.$ac_ext <<_ACEOF | |
6427 | /* By Ruediger Kuhlmann. */ | |
6428 | #include <sys/types.h> | |
6429 | #if HAVE_UNISTD_H | |
6430 | # include <unistd.h> | |
6431 | #endif | |
6432 | /* Some systems only have a dummy stub for fork() */ | |
6433 | int main () | |
6434 | { | |
58670637 DD |
6435 | if (fork() < 0) |
6436 | exit (1); | |
6437 | exit (0); | |
2299a76d DJ |
6438 | } |
6439 | _ACEOF | |
6440 | rm -f conftest$ac_exeext | |
6441 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6442 | (eval $ac_link) 2>&5 | |
6443 | ac_status=$? | |
6444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6445 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
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 | ac_cv_func_fork_works=yes | |
6452 | else | |
6453 | echo "$as_me: program exited with status $ac_status" >&5 | |
6454 | echo "$as_me: failed program was:" >&5 | |
6455 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6456 | ||
6457 | ( exit $ac_status ) | |
6458 | ac_cv_func_fork_works=no | |
6459 | fi | |
58670637 | 6460 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
2299a76d DJ |
6461 | fi |
6462 | fi | |
6463 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
6464 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
6465 | ||
6466 | else | |
6467 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6468 | fi | |
6469 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6470 | case $host in | |
6471 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6472 | # Override, as these systems have only a dummy fork() stub | |
6473 | ac_cv_func_fork_works=no | |
6474 | ;; | |
6475 | *) | |
6476 | ac_cv_func_fork_works=yes | |
6477 | ;; | |
6478 | esac | |
6479 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6480 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
252b5132 | 6481 | fi |
252b5132 | 6482 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
2299a76d DJ |
6483 | if test "x$ac_cv_func_vfork" = xyes; then |
6484 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
6485 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
6486 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
6487 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
252b5132 | 6488 | else |
2299a76d DJ |
6489 | if test "$cross_compiling" = yes; then |
6490 | ac_cv_func_vfork_works=cross | |
6491 | else | |
6492 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6493 | /* confdefs.h. */ |
6494 | _ACEOF | |
6495 | cat confdefs.h >>conftest.$ac_ext | |
6496 | cat >>conftest.$ac_ext <<_ACEOF | |
6497 | /* end confdefs.h. */ | |
252b5132 RH |
6498 | /* Thanks to Paul Eggert for this test. */ |
6499 | #include <stdio.h> | |
2299a76d | 6500 | #include <stdlib.h> |
252b5132 RH |
6501 | #include <sys/types.h> |
6502 | #include <sys/stat.h> | |
2299a76d DJ |
6503 | #include <sys/wait.h> |
6504 | #if HAVE_UNISTD_H | |
6505 | # include <unistd.h> | |
252b5132 | 6506 | #endif |
2299a76d DJ |
6507 | #if HAVE_VFORK_H |
6508 | # include <vfork.h> | |
252b5132 RH |
6509 | #endif |
6510 | /* On some sparc systems, changes by the child to local and incoming | |
2299a76d DJ |
6511 | argument registers are propagated back to the parent. The compiler |
6512 | is told about this with #include <vfork.h>, but some compilers | |
6513 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6514 | static variable whose address is put into a register that is | |
6515 | clobbered by the vfork. */ | |
6516 | static void | |
252b5132 RH |
6517 | #ifdef __cplusplus |
6518 | sparc_address_test (int arg) | |
2299a76d | 6519 | # else |
252b5132 RH |
6520 | sparc_address_test (arg) int arg; |
6521 | #endif | |
6522 | { | |
6523 | static pid_t child; | |
6524 | if (!child) { | |
6525 | child = vfork (); | |
6526 | if (child < 0) { | |
6527 | perror ("vfork"); | |
6528 | _exit(2); | |
6529 | } | |
6530 | if (!child) { | |
6531 | arg = getpid(); | |
6532 | write(-1, "", 0); | |
6533 | _exit (arg); | |
6534 | } | |
6535 | } | |
6536 | } | |
2299a76d DJ |
6537 | |
6538 | int | |
6539 | main () | |
6540 | { | |
252b5132 RH |
6541 | pid_t parent = getpid (); |
6542 | pid_t child; | |
6543 | ||
2299a76d | 6544 | sparc_address_test (0); |
252b5132 RH |
6545 | |
6546 | child = vfork (); | |
6547 | ||
6548 | if (child == 0) { | |
2299a76d DJ |
6549 | /* Here is another test for sparc vfork register problems. This |
6550 | test uses lots of local variables, at least as many local | |
6551 | variables as main has allocated so far including compiler | |
6552 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
6553 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
6554 | reuse the register of parent for one of the local variables, | |
6555 | since it will think that parent can't possibly be used any more | |
6556 | in this routine. Assigning to the local variable will thus | |
6557 | munge parent in the parent process. */ | |
252b5132 RH |
6558 | pid_t |
6559 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6560 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6561 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6562 | use the same hardware register for all 8 local variables. */ | |
6563 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6564 | || p != p5 || p != p6 || p != p7) | |
6565 | _exit(1); | |
6566 | ||
2299a76d DJ |
6567 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
6568 | from child file descriptors. If the child closes a descriptor | |
6569 | before it execs or exits, this munges the parent's descriptor | |
6570 | as well. Test for this by closing stdout in the child. */ | |
252b5132 RH |
6571 | _exit(close(fileno(stdout)) != 0); |
6572 | } else { | |
6573 | int status; | |
6574 | struct stat st; | |
6575 | ||
6576 | while (wait(&status) != child) | |
6577 | ; | |
6578 | exit( | |
6579 | /* Was there some problem with vforking? */ | |
6580 | child < 0 | |
6581 | ||
6582 | /* Did the child fail? (This shouldn't happen.) */ | |
6583 | || status | |
6584 | ||
6585 | /* Did the vfork/compiler bug occur? */ | |
6586 | || parent != getpid() | |
6587 | ||
6588 | /* Did the file descriptor bug occur? */ | |
6589 | || fstat(fileno(stdout), &st) != 0 | |
6590 | ); | |
6591 | } | |
6592 | } | |
2299a76d DJ |
6593 | _ACEOF |
6594 | rm -f conftest$ac_exeext | |
6595 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6596 | (eval $ac_link) 2>&5 | |
6597 | ac_status=$? | |
6598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6599 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6601 | (eval $ac_try) 2>&5 | |
6602 | ac_status=$? | |
6603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6604 | (exit $ac_status); }; }; then | |
252b5132 RH |
6605 | ac_cv_func_vfork_works=yes |
6606 | else | |
2299a76d DJ |
6607 | echo "$as_me: program exited with status $ac_status" >&5 |
6608 | echo "$as_me: failed program was:" >&5 | |
6609 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6610 | ||
6611 | ( exit $ac_status ) | |
6612 | ac_cv_func_vfork_works=no | |
6613 | fi | |
58670637 | 6614 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
252b5132 | 6615 | fi |
252b5132 | 6616 | fi |
2299a76d DJ |
6617 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
6618 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
252b5132 | 6619 | |
2299a76d DJ |
6620 | fi; |
6621 | if test "x$ac_cv_func_fork_works" = xcross; then | |
58670637 | 6622 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
2299a76d DJ |
6623 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
6624 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
252b5132 RH |
6625 | fi |
6626 | ||
2299a76d DJ |
6627 | if test "x$ac_cv_func_vfork_works" = xyes; then |
6628 | ||
6629 | cat >>confdefs.h <<\_ACEOF | |
6630 | #define HAVE_WORKING_VFORK 1 | |
6631 | _ACEOF | |
6632 | ||
6633 | else | |
6634 | ||
6635 | cat >>confdefs.h <<\_ACEOF | |
252b5132 | 6636 | #define vfork fork |
2299a76d DJ |
6637 | _ACEOF |
6638 | ||
6639 | fi | |
6640 | if test "x$ac_cv_func_fork_works" = xyes; then | |
6641 | ||
6642 | cat >>confdefs.h <<\_ACEOF | |
6643 | #define HAVE_WORKING_FORK 1 | |
6644 | _ACEOF | |
252b5132 RH |
6645 | |
6646 | fi | |
6647 | ||
6648 | if test $ac_cv_func_vfork_works = no; then | |
58670637 DD |
6649 | case $LIBOBJS in |
6650 | "vfork.$ac_objext" | \ | |
6651 | *" vfork.$ac_objext" | \ | |
6652 | "vfork.$ac_objext "* | \ | |
6653 | *" vfork.$ac_objext "* ) ;; | |
6654 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;; | |
6655 | esac | |
6656 | ||
252b5132 | 6657 | fi |
24acd898 DD |
6658 | # We only need _doprnt if we might use it to implement v*printf. |
6659 | if test $ac_cv_func_vprintf != yes \ | |
6660 | || test $ac_cv_func_vfprintf != yes \ | |
6661 | || test $ac_cv_func_vsprintf != yes; then | |
2299a76d DJ |
6662 | |
6663 | for ac_func in _doprnt | |
24acd898 | 6664 | do |
2299a76d DJ |
6665 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6666 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6667 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6668 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6669 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6670 | else | |
6671 | if test x$gcc_no_link = xyes; then | |
6672 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6673 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6674 | { (exit 1); exit 1; }; } | |
6675 | fi | |
6676 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6677 | /* confdefs.h. */ |
6678 | _ACEOF | |
6679 | cat confdefs.h >>conftest.$ac_ext | |
6680 | cat >>conftest.$ac_ext <<_ACEOF | |
6681 | /* end confdefs.h. */ | |
24acd898 | 6682 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6683 | which can conflict with char $ac_func (); below. |
6684 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6685 | <limits.h> exists even on freestanding compilers. Under hpux, |
6686 | including <limits.h> includes <sys/time.h> and causes problems | |
6687 | checking for functions defined therein. */ | |
6688 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6689 | # include <limits.h> |
6690 | #else | |
6691 | # include <assert.h> | |
6692 | #endif | |
24acd898 | 6693 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6694 | #ifdef __cplusplus |
6695 | extern "C" | |
6696 | { | |
6697 | #endif | |
24acd898 | 6698 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6699 | builtin and then its argument prototype would still apply. */ |
6700 | char $ac_func (); | |
24acd898 DD |
6701 | /* The GNU C library defines this for functions which it implements |
6702 | to always fail with ENOSYS. Some functions are actually named | |
6703 | something starting with __ and the normal name is an alias. */ | |
6704 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6705 | choke me | |
6706 | #else | |
2299a76d DJ |
6707 | char (*f) () = $ac_func; |
6708 | #endif | |
6709 | #ifdef __cplusplus | |
6710 | } | |
24acd898 DD |
6711 | #endif |
6712 | ||
2299a76d DJ |
6713 | int |
6714 | main () | |
6715 | { | |
6716 | return f != $ac_func; | |
6717 | ; | |
6718 | return 0; | |
6719 | } | |
6720 | _ACEOF | |
6721 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6722 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6723 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6724 | ac_status=$? |
58670637 DD |
6725 | grep -v '^ *+' conftest.er1 >conftest.err |
6726 | rm -f conftest.er1 | |
6727 | cat conftest.err >&5 | |
2299a76d DJ |
6728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6729 | (exit $ac_status); } && | |
a4e5c0d8 | 6730 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6732 | (eval $ac_try) 2>&5 | |
6733 | ac_status=$? | |
6734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6735 | (exit $ac_status); }; } && | |
6736 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6737 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6738 | (eval $ac_try) 2>&5 | |
6739 | ac_status=$? | |
6740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6741 | (exit $ac_status); }; }; then | |
6742 | eval "$as_ac_var=yes" | |
6743 | else | |
6744 | echo "$as_me: failed program was:" >&5 | |
6745 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6746 | ||
6747 | eval "$as_ac_var=no" | |
6748 | fi | |
58670637 DD |
6749 | rm -f conftest.err conftest.$ac_objext \ |
6750 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6751 | fi |
6752 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6753 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6754 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6755 | cat >>confdefs.h <<_ACEOF | |
6756 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6757 | _ACEOF | |
6758 | ||
6759 | else | |
58670637 DD |
6760 | case $LIBOBJS in |
6761 | "$ac_func.$ac_objext" | \ | |
6762 | *" $ac_func.$ac_objext" | \ | |
6763 | "$ac_func.$ac_objext "* | \ | |
6764 | *" $ac_func.$ac_objext "* ) ;; | |
6765 | *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; | |
6766 | esac | |
6767 | ||
24acd898 DD |
6768 | fi |
6769 | done | |
6770 | ||
6771 | ||
cc096b71 | 6772 | else |
2299a76d DJ |
6773 | |
6774 | for ac_func in _doprnt | |
cc096b71 | 6775 | do |
2299a76d DJ |
6776 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6777 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6778 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6779 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6780 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6781 | else | |
6782 | if test x$gcc_no_link = xyes; then | |
6783 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6784 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6785 | { (exit 1); exit 1; }; } | |
6786 | fi | |
6787 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6788 | /* confdefs.h. */ |
6789 | _ACEOF | |
6790 | cat confdefs.h >>conftest.$ac_ext | |
6791 | cat >>conftest.$ac_ext <<_ACEOF | |
6792 | /* end confdefs.h. */ | |
cc096b71 | 6793 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
6794 | which can conflict with char $ac_func (); below. |
6795 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
6796 | <limits.h> exists even on freestanding compilers. Under hpux, |
6797 | including <limits.h> includes <sys/time.h> and causes problems | |
6798 | checking for functions defined therein. */ | |
6799 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
6800 | # include <limits.h> |
6801 | #else | |
6802 | # include <assert.h> | |
6803 | #endif | |
cc096b71 | 6804 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
6805 | #ifdef __cplusplus |
6806 | extern "C" | |
6807 | { | |
6808 | #endif | |
cc096b71 | 6809 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
6810 | builtin and then its argument prototype would still apply. */ |
6811 | char $ac_func (); | |
cc096b71 DD |
6812 | /* The GNU C library defines this for functions which it implements |
6813 | to always fail with ENOSYS. Some functions are actually named | |
6814 | something starting with __ and the normal name is an alias. */ | |
6815 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6816 | choke me | |
6817 | #else | |
2299a76d DJ |
6818 | char (*f) () = $ac_func; |
6819 | #endif | |
6820 | #ifdef __cplusplus | |
6821 | } | |
cc096b71 DD |
6822 | #endif |
6823 | ||
2299a76d DJ |
6824 | int |
6825 | main () | |
6826 | { | |
6827 | return f != $ac_func; | |
6828 | ; | |
6829 | return 0; | |
6830 | } | |
6831 | _ACEOF | |
6832 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6833 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6834 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6835 | ac_status=$? |
58670637 DD |
6836 | grep -v '^ *+' conftest.er1 >conftest.err |
6837 | rm -f conftest.er1 | |
6838 | cat conftest.err >&5 | |
2299a76d DJ |
6839 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6840 | (exit $ac_status); } && | |
a4e5c0d8 | 6841 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6842 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6843 | (eval $ac_try) 2>&5 | |
6844 | ac_status=$? | |
6845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6846 | (exit $ac_status); }; } && | |
6847 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6848 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6849 | (eval $ac_try) 2>&5 | |
6850 | ac_status=$? | |
6851 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6852 | (exit $ac_status); }; }; then | |
6853 | eval "$as_ac_var=yes" | |
6854 | else | |
6855 | echo "$as_me: failed program was:" >&5 | |
6856 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6857 | ||
6858 | eval "$as_ac_var=no" | |
6859 | fi | |
58670637 DD |
6860 | rm -f conftest.err conftest.$ac_objext \ |
6861 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
6862 | fi |
6863 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6864 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6865 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6866 | cat >>confdefs.h <<_ACEOF | |
6867 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6868 | _ACEOF | |
cc096b71 | 6869 | |
cc096b71 DD |
6870 | fi |
6871 | done | |
6872 | ||
24acd898 DD |
6873 | fi |
6874 | ||
252b5132 | 6875 | for v in $vars; do |
2299a76d DJ |
6876 | echo "$as_me:$LINENO: checking for $v" >&5 |
6877 | echo $ECHO_N "checking for $v... $ECHO_C" >&6 | |
6878 | if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then | |
6879 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6880 | else | |
6881 | if test x$gcc_no_link = xyes; then | |
6882 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
6883 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
6884 | { (exit 1); exit 1; }; } | |
6885 | fi | |
6886 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6887 | /* confdefs.h. */ |
6888 | _ACEOF | |
6889 | cat confdefs.h >>conftest.$ac_ext | |
6890 | cat >>conftest.$ac_ext <<_ACEOF | |
6891 | /* end confdefs.h. */ | |
252b5132 | 6892 | int *p; |
2299a76d DJ |
6893 | int |
6894 | main () | |
6895 | { | |
18893690 | 6896 | extern int $v []; p = $v; |
2299a76d DJ |
6897 | ; |
6898 | return 0; | |
6899 | } | |
6900 | _ACEOF | |
6901 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6902 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 6903 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 6904 | ac_status=$? |
58670637 DD |
6905 | grep -v '^ *+' conftest.er1 >conftest.err |
6906 | rm -f conftest.er1 | |
6907 | cat conftest.err >&5 | |
2299a76d DJ |
6908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6909 | (exit $ac_status); } && | |
a4e5c0d8 | 6910 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6912 | (eval $ac_try) 2>&5 | |
6913 | ac_status=$? | |
6914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6915 | (exit $ac_status); }; } && | |
6916 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
6917 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6918 | (eval $ac_try) 2>&5 | |
6919 | ac_status=$? | |
6920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6921 | (exit $ac_status); }; }; then | |
252b5132 RH |
6922 | eval "libiberty_cv_var_$v=yes" |
6923 | else | |
2299a76d DJ |
6924 | echo "$as_me: failed program was:" >&5 |
6925 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6926 | ||
6927 | eval "libiberty_cv_var_$v=no" | |
252b5132 | 6928 | fi |
58670637 DD |
6929 | rm -f conftest.err conftest.$ac_objext \ |
6930 | conftest$ac_exeext conftest.$ac_ext | |
252b5132 RH |
6931 | fi |
6932 | ||
6933 | if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then | |
2299a76d DJ |
6934 | echo "$as_me:$LINENO: result: yes" >&5 |
6935 | echo "${ECHO_T}yes" >&6 | |
252b5132 | 6936 | n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
2299a76d | 6937 | cat >>confdefs.h <<_ACEOF |
252b5132 | 6938 | #define $n 1 |
2299a76d | 6939 | _ACEOF |
252b5132 RH |
6940 | |
6941 | else | |
2299a76d DJ |
6942 | echo "$as_me:$LINENO: result: no" >&5 |
6943 | echo "${ECHO_T}no" >&6 | |
252b5132 RH |
6944 | fi |
6945 | done | |
e69f6c8c DD |
6946 | |
6947 | # special check for _system_configuration because AIX <4.3.2 do not | |
6948 | # contain the `physmem' member. | |
2299a76d DJ |
6949 | echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5 |
6950 | echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6 | |
6951 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
6952 | /* confdefs.h. */ |
6953 | _ACEOF | |
6954 | cat confdefs.h >>conftest.$ac_ext | |
6955 | cat >>conftest.$ac_ext <<_ACEOF | |
6956 | /* end confdefs.h. */ | |
e69f6c8c | 6957 | #include <sys/systemcfg.h> |
2299a76d DJ |
6958 | int |
6959 | main () | |
6960 | { | |
e69f6c8c | 6961 | double x = _system_configuration.physmem; |
2299a76d DJ |
6962 | ; |
6963 | return 0; | |
6964 | } | |
6965 | _ACEOF | |
6966 | rm -f conftest.$ac_objext | |
6967 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 6968 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 6969 | ac_status=$? |
58670637 DD |
6970 | grep -v '^ *+' conftest.er1 >conftest.err |
6971 | rm -f conftest.er1 | |
6972 | cat conftest.err >&5 | |
2299a76d DJ |
6973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6974 | (exit $ac_status); } && | |
a4e5c0d8 | 6975 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
6976 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6977 | (eval $ac_try) 2>&5 | |
6978 | ac_status=$? | |
6979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6980 | (exit $ac_status); }; } && | |
6981 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
6982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6983 | (eval $ac_try) 2>&5 | |
6984 | ac_status=$? | |
6985 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6986 | (exit $ac_status); }; }; then | |
6987 | echo "$as_me:$LINENO: result: yes" >&5 | |
6988 | echo "${ECHO_T}yes" >&6 | |
6989 | ||
6990 | cat >>confdefs.h <<\_ACEOF | |
e69f6c8c | 6991 | #define HAVE__SYSTEM_CONFIGURATION 1 |
2299a76d | 6992 | _ACEOF |
e69f6c8c DD |
6993 | |
6994 | else | |
2299a76d DJ |
6995 | echo "$as_me: failed program was:" >&5 |
6996 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6997 | ||
6998 | echo "$as_me:$LINENO: result: no" >&5 | |
6999 | echo "${ECHO_T}no" >&6 | |
e69f6c8c | 7000 | fi |
58670637 | 7001 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2299a76d | 7002 | |
e69f6c8c | 7003 | |
2299a76d | 7004 | for ac_func in $checkfuncs |
252b5132 | 7005 | do |
2299a76d DJ |
7006 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
7007 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7008 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7009 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7010 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7011 | else | |
7012 | if test x$gcc_no_link = xyes; then | |
7013 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
7014 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
7015 | { (exit 1); exit 1; }; } | |
7016 | fi | |
7017 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
7018 | /* confdefs.h. */ |
7019 | _ACEOF | |
7020 | cat confdefs.h >>conftest.$ac_ext | |
7021 | cat >>conftest.$ac_ext <<_ACEOF | |
7022 | /* end confdefs.h. */ | |
eb383413 | 7023 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
7024 | which can conflict with char $ac_func (); below. |
7025 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
7026 | <limits.h> exists even on freestanding compilers. Under hpux, |
7027 | including <limits.h> includes <sys/time.h> and causes problems | |
7028 | checking for functions defined therein. */ | |
7029 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
7030 | # include <limits.h> |
7031 | #else | |
7032 | # include <assert.h> | |
7033 | #endif | |
eb383413 | 7034 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
7035 | #ifdef __cplusplus |
7036 | extern "C" | |
7037 | { | |
7038 | #endif | |
eb383413 | 7039 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
7040 | builtin and then its argument prototype would still apply. */ |
7041 | char $ac_func (); | |
eb383413 L |
7042 | /* The GNU C library defines this for functions which it implements |
7043 | to always fail with ENOSYS. Some functions are actually named | |
7044 | something starting with __ and the normal name is an alias. */ | |
7045 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7046 | choke me | |
7047 | #else | |
2299a76d DJ |
7048 | char (*f) () = $ac_func; |
7049 | #endif | |
7050 | #ifdef __cplusplus | |
7051 | } | |
eb383413 L |
7052 | #endif |
7053 | ||
2299a76d DJ |
7054 | int |
7055 | main () | |
7056 | { | |
7057 | return f != $ac_func; | |
7058 | ; | |
7059 | return 0; | |
7060 | } | |
7061 | _ACEOF | |
7062 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7063 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 7064 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 7065 | ac_status=$? |
58670637 DD |
7066 | grep -v '^ *+' conftest.er1 >conftest.err |
7067 | rm -f conftest.er1 | |
7068 | cat conftest.err >&5 | |
2299a76d DJ |
7069 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7070 | (exit $ac_status); } && | |
a4e5c0d8 | 7071 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
7072 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7073 | (eval $ac_try) 2>&5 | |
7074 | ac_status=$? | |
7075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7076 | (exit $ac_status); }; } && | |
7077 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
7078 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7079 | (eval $ac_try) 2>&5 | |
7080 | ac_status=$? | |
7081 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7082 | (exit $ac_status); }; }; then | |
7083 | eval "$as_ac_var=yes" | |
7084 | else | |
7085 | echo "$as_me: failed program was:" >&5 | |
7086 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7087 | ||
7088 | eval "$as_ac_var=no" | |
7089 | fi | |
58670637 DD |
7090 | rm -f conftest.err conftest.$ac_objext \ |
7091 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
7092 | fi |
7093 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7094 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7095 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7096 | cat >>confdefs.h <<_ACEOF | |
7097 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7098 | _ACEOF | |
eb383413 | 7099 | |
eb383413 L |
7100 | fi |
7101 | done | |
7102 | ||
fa99459d DD |
7103 | echo "$as_me:$LINENO: checking whether basename is declared" >&5 |
7104 | echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 | |
7105 | if test "${ac_cv_have_decl_basename+set}" = set; then | |
7106 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7107 | else | |
7108 | cat >conftest.$ac_ext <<_ACEOF | |
7109 | /* confdefs.h. */ | |
7110 | _ACEOF | |
7111 | cat confdefs.h >>conftest.$ac_ext | |
7112 | cat >>conftest.$ac_ext <<_ACEOF | |
7113 | /* end confdefs.h. */ | |
7114 | $ac_includes_default | |
7115 | int | |
7116 | main () | |
7117 | { | |
7118 | #ifndef basename | |
7119 | char *p = (char *) basename; | |
7120 | #endif | |
7121 | ||
7122 | ; | |
7123 | return 0; | |
7124 | } | |
7125 | _ACEOF | |
7126 | rm -f conftest.$ac_objext | |
7127 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7128 | (eval $ac_compile) 2>conftest.er1 | |
7129 | ac_status=$? | |
7130 | grep -v '^ *+' conftest.er1 >conftest.err | |
7131 | rm -f conftest.er1 | |
7132 | cat conftest.err >&5 | |
7133 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7134 | (exit $ac_status); } && | |
a4e5c0d8 | 7135 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
fa99459d DD |
7136 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7137 | (eval $ac_try) 2>&5 | |
7138 | ac_status=$? | |
7139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7140 | (exit $ac_status); }; } && | |
7141 | { ac_try='test -s conftest.$ac_objext' | |
7142 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7143 | (eval $ac_try) 2>&5 | |
7144 | ac_status=$? | |
7145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7146 | (exit $ac_status); }; }; then | |
7147 | ac_cv_have_decl_basename=yes | |
7148 | else | |
7149 | echo "$as_me: failed program was:" >&5 | |
7150 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7151 | ||
7152 | ac_cv_have_decl_basename=no | |
7153 | fi | |
7154 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7155 | fi | |
7156 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 | |
7157 | echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 | |
7158 | if test $ac_cv_have_decl_basename = yes; then | |
7159 | ||
7160 | cat >>confdefs.h <<_ACEOF | |
7161 | #define HAVE_DECL_BASENAME 1 | |
7162 | _ACEOF | |
7163 | ||
7164 | ||
7165 | else | |
7166 | cat >>confdefs.h <<_ACEOF | |
7167 | #define HAVE_DECL_BASENAME 0 | |
7168 | _ACEOF | |
7169 | ||
7170 | ||
7171 | fi | |
7172 | echo "$as_me:$LINENO: checking whether ffs is declared" >&5 | |
7173 | echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6 | |
7174 | if test "${ac_cv_have_decl_ffs+set}" = set; then | |
7175 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7176 | else | |
7177 | cat >conftest.$ac_ext <<_ACEOF | |
7178 | /* confdefs.h. */ | |
7179 | _ACEOF | |
7180 | cat confdefs.h >>conftest.$ac_ext | |
7181 | cat >>conftest.$ac_ext <<_ACEOF | |
7182 | /* end confdefs.h. */ | |
7183 | $ac_includes_default | |
7184 | int | |
7185 | main () | |
7186 | { | |
7187 | #ifndef ffs | |
7188 | char *p = (char *) ffs; | |
7189 | #endif | |
7190 | ||
7191 | ; | |
7192 | return 0; | |
7193 | } | |
7194 | _ACEOF | |
7195 | rm -f conftest.$ac_objext | |
7196 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7197 | (eval $ac_compile) 2>conftest.er1 | |
7198 | ac_status=$? | |
7199 | grep -v '^ *+' conftest.er1 >conftest.err | |
7200 | rm -f conftest.er1 | |
7201 | cat conftest.err >&5 | |
7202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7203 | (exit $ac_status); } && | |
a4e5c0d8 | 7204 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
fa99459d DD |
7205 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7206 | (eval $ac_try) 2>&5 | |
7207 | ac_status=$? | |
7208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7209 | (exit $ac_status); }; } && | |
7210 | { ac_try='test -s conftest.$ac_objext' | |
7211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7212 | (eval $ac_try) 2>&5 | |
7213 | ac_status=$? | |
7214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7215 | (exit $ac_status); }; }; then | |
7216 | ac_cv_have_decl_ffs=yes | |
7217 | else | |
7218 | echo "$as_me: failed program was:" >&5 | |
7219 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7220 | ||
7221 | ac_cv_have_decl_ffs=no | |
7222 | fi | |
7223 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7224 | fi | |
7225 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5 | |
7226 | echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6 | |
7227 | if test $ac_cv_have_decl_ffs = yes; then | |
7228 | ||
7229 | cat >>confdefs.h <<_ACEOF | |
7230 | #define HAVE_DECL_FFS 1 | |
7231 | _ACEOF | |
7232 | ||
7233 | ||
7234 | else | |
7235 | cat >>confdefs.h <<_ACEOF | |
7236 | #define HAVE_DECL_FFS 0 | |
7237 | _ACEOF | |
7238 | ||
7239 | ||
7240 | fi | |
7241 | echo "$as_me:$LINENO: checking whether asprintf is declared" >&5 | |
7242 | echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6 | |
7243 | if test "${ac_cv_have_decl_asprintf+set}" = set; then | |
7244 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7245 | else | |
7246 | cat >conftest.$ac_ext <<_ACEOF | |
7247 | /* confdefs.h. */ | |
7248 | _ACEOF | |
7249 | cat confdefs.h >>conftest.$ac_ext | |
7250 | cat >>conftest.$ac_ext <<_ACEOF | |
7251 | /* end confdefs.h. */ | |
7252 | $ac_includes_default | |
7253 | int | |
7254 | main () | |
7255 | { | |
7256 | #ifndef asprintf | |
7257 | char *p = (char *) asprintf; | |
7258 | #endif | |
7259 | ||
7260 | ; | |
7261 | return 0; | |
7262 | } | |
7263 | _ACEOF | |
7264 | rm -f conftest.$ac_objext | |
7265 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7266 | (eval $ac_compile) 2>conftest.er1 | |
7267 | ac_status=$? | |
7268 | grep -v '^ *+' conftest.er1 >conftest.err | |
7269 | rm -f conftest.er1 | |
7270 | cat conftest.err >&5 | |
7271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7272 | (exit $ac_status); } && | |
a4e5c0d8 | 7273 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
fa99459d DD |
7274 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7275 | (eval $ac_try) 2>&5 | |
7276 | ac_status=$? | |
7277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7278 | (exit $ac_status); }; } && | |
7279 | { ac_try='test -s conftest.$ac_objext' | |
7280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7281 | (eval $ac_try) 2>&5 | |
7282 | ac_status=$? | |
7283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7284 | (exit $ac_status); }; }; then | |
7285 | ac_cv_have_decl_asprintf=yes | |
7286 | else | |
7287 | echo "$as_me: failed program was:" >&5 | |
7288 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7289 | ||
7290 | ac_cv_have_decl_asprintf=no | |
7291 | fi | |
7292 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7293 | fi | |
7294 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5 | |
7295 | echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6 | |
7296 | if test $ac_cv_have_decl_asprintf = yes; then | |
7297 | ||
7298 | cat >>confdefs.h <<_ACEOF | |
7299 | #define HAVE_DECL_ASPRINTF 1 | |
7300 | _ACEOF | |
7301 | ||
7302 | ||
7303 | else | |
7304 | cat >>confdefs.h <<_ACEOF | |
7305 | #define HAVE_DECL_ASPRINTF 0 | |
7306 | _ACEOF | |
7307 | ||
7308 | ||
7309 | fi | |
7310 | echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5 | |
7311 | echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6 | |
7312 | if test "${ac_cv_have_decl_vasprintf+set}" = set; then | |
7313 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7314 | else | |
7315 | cat >conftest.$ac_ext <<_ACEOF | |
7316 | /* confdefs.h. */ | |
7317 | _ACEOF | |
7318 | cat confdefs.h >>conftest.$ac_ext | |
7319 | cat >>conftest.$ac_ext <<_ACEOF | |
7320 | /* end confdefs.h. */ | |
7321 | $ac_includes_default | |
7322 | int | |
7323 | main () | |
7324 | { | |
7325 | #ifndef vasprintf | |
7326 | char *p = (char *) vasprintf; | |
7327 | #endif | |
7328 | ||
7329 | ; | |
7330 | return 0; | |
7331 | } | |
7332 | _ACEOF | |
7333 | rm -f conftest.$ac_objext | |
7334 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7335 | (eval $ac_compile) 2>conftest.er1 | |
7336 | ac_status=$? | |
7337 | grep -v '^ *+' conftest.er1 >conftest.err | |
7338 | rm -f conftest.er1 | |
7339 | cat conftest.err >&5 | |
7340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7341 | (exit $ac_status); } && | |
a4e5c0d8 | 7342 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
fa99459d DD |
7343 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7344 | (eval $ac_try) 2>&5 | |
7345 | ac_status=$? | |
7346 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7347 | (exit $ac_status); }; } && | |
7348 | { ac_try='test -s conftest.$ac_objext' | |
7349 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7350 | (eval $ac_try) 2>&5 | |
7351 | ac_status=$? | |
7352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7353 | (exit $ac_status); }; }; then | |
7354 | ac_cv_have_decl_vasprintf=yes | |
7355 | else | |
7356 | echo "$as_me: failed program was:" >&5 | |
7357 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7358 | ||
7359 | ac_cv_have_decl_vasprintf=no | |
7360 | fi | |
7361 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7362 | fi | |
7363 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5 | |
7364 | echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6 | |
7365 | if test $ac_cv_have_decl_vasprintf = yes; then | |
7366 | ||
7367 | cat >>confdefs.h <<_ACEOF | |
7368 | #define HAVE_DECL_VASPRINTF 1 | |
7369 | _ACEOF | |
7370 | ||
7371 | ||
7372 | else | |
7373 | cat >>confdefs.h <<_ACEOF | |
7374 | #define HAVE_DECL_VASPRINTF 0 | |
7375 | _ACEOF | |
7376 | ||
7377 | ||
01e94249 DD |
7378 | fi |
7379 | echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 | |
7380 | echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 | |
7381 | if test "${ac_cv_have_decl_snprintf+set}" = set; then | |
7382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7383 | else | |
7384 | cat >conftest.$ac_ext <<_ACEOF | |
7385 | /* confdefs.h. */ | |
7386 | _ACEOF | |
7387 | cat confdefs.h >>conftest.$ac_ext | |
7388 | cat >>conftest.$ac_ext <<_ACEOF | |
7389 | /* end confdefs.h. */ | |
7390 | $ac_includes_default | |
7391 | int | |
7392 | main () | |
7393 | { | |
7394 | #ifndef snprintf | |
7395 | char *p = (char *) snprintf; | |
7396 | #endif | |
7397 | ||
7398 | ; | |
7399 | return 0; | |
7400 | } | |
7401 | _ACEOF | |
7402 | rm -f conftest.$ac_objext | |
7403 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7404 | (eval $ac_compile) 2>conftest.er1 | |
7405 | ac_status=$? | |
7406 | grep -v '^ *+' conftest.er1 >conftest.err | |
7407 | rm -f conftest.er1 | |
7408 | cat conftest.err >&5 | |
7409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7410 | (exit $ac_status); } && | |
a4e5c0d8 | 7411 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
01e94249 DD |
7412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7413 | (eval $ac_try) 2>&5 | |
7414 | ac_status=$? | |
7415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7416 | (exit $ac_status); }; } && | |
7417 | { ac_try='test -s conftest.$ac_objext' | |
7418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7419 | (eval $ac_try) 2>&5 | |
7420 | ac_status=$? | |
7421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7422 | (exit $ac_status); }; }; then | |
7423 | ac_cv_have_decl_snprintf=yes | |
7424 | else | |
7425 | echo "$as_me: failed program was:" >&5 | |
7426 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7427 | ||
7428 | ac_cv_have_decl_snprintf=no | |
7429 | fi | |
7430 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7431 | fi | |
7432 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 | |
7433 | echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 | |
7434 | if test $ac_cv_have_decl_snprintf = yes; then | |
7435 | ||
7436 | cat >>confdefs.h <<_ACEOF | |
7437 | #define HAVE_DECL_SNPRINTF 1 | |
7438 | _ACEOF | |
7439 | ||
7440 | ||
7441 | else | |
7442 | cat >>confdefs.h <<_ACEOF | |
7443 | #define HAVE_DECL_SNPRINTF 0 | |
7444 | _ACEOF | |
7445 | ||
7446 | ||
7447 | fi | |
7448 | echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 | |
7449 | echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 | |
7450 | if test "${ac_cv_have_decl_vsnprintf+set}" = set; then | |
7451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7452 | else | |
7453 | cat >conftest.$ac_ext <<_ACEOF | |
7454 | /* confdefs.h. */ | |
7455 | _ACEOF | |
7456 | cat confdefs.h >>conftest.$ac_ext | |
7457 | cat >>conftest.$ac_ext <<_ACEOF | |
7458 | /* end confdefs.h. */ | |
7459 | $ac_includes_default | |
7460 | int | |
7461 | main () | |
7462 | { | |
7463 | #ifndef vsnprintf | |
7464 | char *p = (char *) vsnprintf; | |
7465 | #endif | |
7466 | ||
7467 | ; | |
7468 | return 0; | |
7469 | } | |
7470 | _ACEOF | |
7471 | rm -f conftest.$ac_objext | |
7472 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7473 | (eval $ac_compile) 2>conftest.er1 | |
7474 | ac_status=$? | |
7475 | grep -v '^ *+' conftest.er1 >conftest.err | |
7476 | rm -f conftest.er1 | |
7477 | cat conftest.err >&5 | |
7478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7479 | (exit $ac_status); } && | |
a4e5c0d8 | 7480 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
01e94249 DD |
7481 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7482 | (eval $ac_try) 2>&5 | |
7483 | ac_status=$? | |
7484 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7485 | (exit $ac_status); }; } && | |
7486 | { ac_try='test -s conftest.$ac_objext' | |
7487 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7488 | (eval $ac_try) 2>&5 | |
7489 | ac_status=$? | |
7490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7491 | (exit $ac_status); }; }; then | |
7492 | ac_cv_have_decl_vsnprintf=yes | |
7493 | else | |
7494 | echo "$as_me: failed program was:" >&5 | |
7495 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7496 | ||
7497 | ac_cv_have_decl_vsnprintf=no | |
7498 | fi | |
7499 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7500 | fi | |
7501 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 | |
7502 | echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 | |
7503 | if test $ac_cv_have_decl_vsnprintf = yes; then | |
7504 | ||
7505 | cat >>confdefs.h <<_ACEOF | |
7506 | #define HAVE_DECL_VSNPRINTF 1 | |
7507 | _ACEOF | |
7508 | ||
7509 | ||
7510 | else | |
7511 | cat >>confdefs.h <<_ACEOF | |
7512 | #define HAVE_DECL_VSNPRINTF 0 | |
7513 | _ACEOF | |
7514 | ||
7515 | ||
abf6a75b DD |
7516 | fi |
7517 | ||
7518 | ||
7519 | echo "$as_me:$LINENO: checking whether calloc is declared" >&5 | |
7520 | echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6 | |
7521 | if test "${ac_cv_have_decl_calloc+set}" = set; then | |
7522 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7523 | else | |
7524 | cat >conftest.$ac_ext <<_ACEOF | |
7525 | /* confdefs.h. */ | |
7526 | _ACEOF | |
7527 | cat confdefs.h >>conftest.$ac_ext | |
7528 | cat >>conftest.$ac_ext <<_ACEOF | |
7529 | /* end confdefs.h. */ | |
7530 | $ac_includes_default | |
7531 | int | |
7532 | main () | |
7533 | { | |
7534 | #ifndef calloc | |
7535 | char *p = (char *) calloc; | |
7536 | #endif | |
7537 | ||
7538 | ; | |
7539 | return 0; | |
7540 | } | |
7541 | _ACEOF | |
7542 | rm -f conftest.$ac_objext | |
7543 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7544 | (eval $ac_compile) 2>conftest.er1 | |
7545 | ac_status=$? | |
7546 | grep -v '^ *+' conftest.er1 >conftest.err | |
7547 | rm -f conftest.er1 | |
7548 | cat conftest.err >&5 | |
7549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7550 | (exit $ac_status); } && | |
a4e5c0d8 | 7551 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
abf6a75b DD |
7552 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7553 | (eval $ac_try) 2>&5 | |
7554 | ac_status=$? | |
7555 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7556 | (exit $ac_status); }; } && | |
7557 | { ac_try='test -s conftest.$ac_objext' | |
7558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7559 | (eval $ac_try) 2>&5 | |
7560 | ac_status=$? | |
7561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7562 | (exit $ac_status); }; }; then | |
7563 | ac_cv_have_decl_calloc=yes | |
7564 | else | |
7565 | echo "$as_me: failed program was:" >&5 | |
7566 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7567 | ||
7568 | ac_cv_have_decl_calloc=no | |
7569 | fi | |
7570 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7571 | fi | |
7572 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5 | |
7573 | echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6 | |
7574 | if test $ac_cv_have_decl_calloc = yes; then | |
7575 | ||
7576 | cat >>confdefs.h <<_ACEOF | |
7577 | #define HAVE_DECL_CALLOC 1 | |
7578 | _ACEOF | |
7579 | ||
7580 | ||
7581 | else | |
7582 | cat >>confdefs.h <<_ACEOF | |
7583 | #define HAVE_DECL_CALLOC 0 | |
7584 | _ACEOF | |
7585 | ||
7586 | ||
7587 | fi | |
7588 | echo "$as_me:$LINENO: checking whether getenv is declared" >&5 | |
7589 | echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6 | |
7590 | if test "${ac_cv_have_decl_getenv+set}" = set; then | |
7591 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7592 | else | |
7593 | cat >conftest.$ac_ext <<_ACEOF | |
7594 | /* confdefs.h. */ | |
7595 | _ACEOF | |
7596 | cat confdefs.h >>conftest.$ac_ext | |
7597 | cat >>conftest.$ac_ext <<_ACEOF | |
7598 | /* end confdefs.h. */ | |
7599 | $ac_includes_default | |
7600 | int | |
7601 | main () | |
7602 | { | |
7603 | #ifndef getenv | |
7604 | char *p = (char *) getenv; | |
7605 | #endif | |
7606 | ||
7607 | ; | |
7608 | return 0; | |
7609 | } | |
7610 | _ACEOF | |
7611 | rm -f conftest.$ac_objext | |
7612 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7613 | (eval $ac_compile) 2>conftest.er1 | |
7614 | ac_status=$? | |
7615 | grep -v '^ *+' conftest.er1 >conftest.err | |
7616 | rm -f conftest.er1 | |
7617 | cat conftest.err >&5 | |
7618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7619 | (exit $ac_status); } && | |
a4e5c0d8 | 7620 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
abf6a75b DD |
7621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7622 | (eval $ac_try) 2>&5 | |
7623 | ac_status=$? | |
7624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7625 | (exit $ac_status); }; } && | |
7626 | { ac_try='test -s conftest.$ac_objext' | |
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); }; }; then | |
7632 | ac_cv_have_decl_getenv=yes | |
7633 | else | |
7634 | echo "$as_me: failed program was:" >&5 | |
7635 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7636 | ||
7637 | ac_cv_have_decl_getenv=no | |
7638 | fi | |
7639 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7640 | fi | |
7641 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 | |
7642 | echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6 | |
7643 | if test $ac_cv_have_decl_getenv = yes; then | |
7644 | ||
7645 | cat >>confdefs.h <<_ACEOF | |
7646 | #define HAVE_DECL_GETENV 1 | |
7647 | _ACEOF | |
7648 | ||
7649 | ||
7650 | else | |
7651 | cat >>confdefs.h <<_ACEOF | |
7652 | #define HAVE_DECL_GETENV 0 | |
7653 | _ACEOF | |
7654 | ||
7655 | ||
a4e5c0d8 DD |
7656 | fi |
7657 | echo "$as_me:$LINENO: checking whether getopt is declared" >&5 | |
7658 | echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6 | |
7659 | if test "${ac_cv_have_decl_getopt+set}" = set; then | |
7660 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7661 | else | |
7662 | cat >conftest.$ac_ext <<_ACEOF | |
7663 | /* confdefs.h. */ | |
7664 | _ACEOF | |
7665 | cat confdefs.h >>conftest.$ac_ext | |
7666 | cat >>conftest.$ac_ext <<_ACEOF | |
7667 | /* end confdefs.h. */ | |
7668 | $ac_includes_default | |
7669 | int | |
7670 | main () | |
7671 | { | |
7672 | #ifndef getopt | |
7673 | char *p = (char *) getopt; | |
7674 | #endif | |
7675 | ||
7676 | ; | |
7677 | return 0; | |
7678 | } | |
7679 | _ACEOF | |
7680 | rm -f conftest.$ac_objext | |
7681 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7682 | (eval $ac_compile) 2>conftest.er1 | |
7683 | ac_status=$? | |
7684 | grep -v '^ *+' conftest.er1 >conftest.err | |
7685 | rm -f conftest.er1 | |
7686 | cat conftest.err >&5 | |
7687 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7688 | (exit $ac_status); } && | |
7689 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | |
7690 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7691 | (eval $ac_try) 2>&5 | |
7692 | ac_status=$? | |
7693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7694 | (exit $ac_status); }; } && | |
7695 | { ac_try='test -s conftest.$ac_objext' | |
7696 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7697 | (eval $ac_try) 2>&5 | |
7698 | ac_status=$? | |
7699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7700 | (exit $ac_status); }; }; then | |
7701 | ac_cv_have_decl_getopt=yes | |
7702 | else | |
7703 | echo "$as_me: failed program was:" >&5 | |
7704 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7705 | ||
7706 | ac_cv_have_decl_getopt=no | |
7707 | fi | |
7708 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7709 | fi | |
7710 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5 | |
7711 | echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6 | |
7712 | if test $ac_cv_have_decl_getopt = yes; then | |
7713 | ||
7714 | cat >>confdefs.h <<_ACEOF | |
7715 | #define HAVE_DECL_GETOPT 1 | |
7716 | _ACEOF | |
7717 | ||
7718 | ||
7719 | else | |
7720 | cat >>confdefs.h <<_ACEOF | |
7721 | #define HAVE_DECL_GETOPT 0 | |
7722 | _ACEOF | |
7723 | ||
7724 | ||
abf6a75b DD |
7725 | fi |
7726 | echo "$as_me:$LINENO: checking whether malloc is declared" >&5 | |
7727 | echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6 | |
7728 | if test "${ac_cv_have_decl_malloc+set}" = set; then | |
7729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7730 | else | |
7731 | cat >conftest.$ac_ext <<_ACEOF | |
7732 | /* confdefs.h. */ | |
7733 | _ACEOF | |
7734 | cat confdefs.h >>conftest.$ac_ext | |
7735 | cat >>conftest.$ac_ext <<_ACEOF | |
7736 | /* end confdefs.h. */ | |
7737 | $ac_includes_default | |
7738 | int | |
7739 | main () | |
7740 | { | |
7741 | #ifndef malloc | |
7742 | char *p = (char *) malloc; | |
7743 | #endif | |
7744 | ||
7745 | ; | |
7746 | return 0; | |
7747 | } | |
7748 | _ACEOF | |
7749 | rm -f conftest.$ac_objext | |
7750 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7751 | (eval $ac_compile) 2>conftest.er1 | |
7752 | ac_status=$? | |
7753 | grep -v '^ *+' conftest.er1 >conftest.err | |
7754 | rm -f conftest.er1 | |
7755 | cat conftest.err >&5 | |
7756 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7757 | (exit $ac_status); } && | |
a4e5c0d8 | 7758 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
abf6a75b DD |
7759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7760 | (eval $ac_try) 2>&5 | |
7761 | ac_status=$? | |
7762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7763 | (exit $ac_status); }; } && | |
7764 | { ac_try='test -s conftest.$ac_objext' | |
7765 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7766 | (eval $ac_try) 2>&5 | |
7767 | ac_status=$? | |
7768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7769 | (exit $ac_status); }; }; then | |
7770 | ac_cv_have_decl_malloc=yes | |
7771 | else | |
7772 | echo "$as_me: failed program was:" >&5 | |
7773 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7774 | ||
7775 | ac_cv_have_decl_malloc=no | |
7776 | fi | |
7777 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7778 | fi | |
7779 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5 | |
7780 | echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6 | |
7781 | if test $ac_cv_have_decl_malloc = yes; then | |
7782 | ||
7783 | cat >>confdefs.h <<_ACEOF | |
7784 | #define HAVE_DECL_MALLOC 1 | |
7785 | _ACEOF | |
7786 | ||
7787 | ||
7788 | else | |
7789 | cat >>confdefs.h <<_ACEOF | |
7790 | #define HAVE_DECL_MALLOC 0 | |
7791 | _ACEOF | |
7792 | ||
7793 | ||
7794 | fi | |
7795 | echo "$as_me:$LINENO: checking whether realloc is declared" >&5 | |
7796 | echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6 | |
7797 | if test "${ac_cv_have_decl_realloc+set}" = set; then | |
7798 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7799 | else | |
7800 | cat >conftest.$ac_ext <<_ACEOF | |
7801 | /* confdefs.h. */ | |
7802 | _ACEOF | |
7803 | cat confdefs.h >>conftest.$ac_ext | |
7804 | cat >>conftest.$ac_ext <<_ACEOF | |
7805 | /* end confdefs.h. */ | |
7806 | $ac_includes_default | |
7807 | int | |
7808 | main () | |
7809 | { | |
7810 | #ifndef realloc | |
7811 | char *p = (char *) realloc; | |
7812 | #endif | |
7813 | ||
7814 | ; | |
7815 | return 0; | |
7816 | } | |
7817 | _ACEOF | |
7818 | rm -f conftest.$ac_objext | |
7819 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7820 | (eval $ac_compile) 2>conftest.er1 | |
7821 | ac_status=$? | |
7822 | grep -v '^ *+' conftest.er1 >conftest.err | |
7823 | rm -f conftest.er1 | |
7824 | cat conftest.err >&5 | |
7825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7826 | (exit $ac_status); } && | |
a4e5c0d8 | 7827 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
abf6a75b DD |
7828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7829 | (eval $ac_try) 2>&5 | |
7830 | ac_status=$? | |
7831 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7832 | (exit $ac_status); }; } && | |
7833 | { ac_try='test -s conftest.$ac_objext' | |
7834 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7835 | (eval $ac_try) 2>&5 | |
7836 | ac_status=$? | |
7837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7838 | (exit $ac_status); }; }; then | |
7839 | ac_cv_have_decl_realloc=yes | |
7840 | else | |
7841 | echo "$as_me: failed program was:" >&5 | |
7842 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7843 | ||
7844 | ac_cv_have_decl_realloc=no | |
7845 | fi | |
7846 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7847 | fi | |
7848 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5 | |
7849 | echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6 | |
7850 | if test $ac_cv_have_decl_realloc = yes; then | |
7851 | ||
7852 | cat >>confdefs.h <<_ACEOF | |
7853 | #define HAVE_DECL_REALLOC 1 | |
7854 | _ACEOF | |
7855 | ||
7856 | ||
7857 | else | |
7858 | cat >>confdefs.h <<_ACEOF | |
7859 | #define HAVE_DECL_REALLOC 0 | |
7860 | _ACEOF | |
7861 | ||
7862 | ||
7863 | fi | |
7864 | echo "$as_me:$LINENO: checking whether sbrk is declared" >&5 | |
7865 | echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6 | |
7866 | if test "${ac_cv_have_decl_sbrk+set}" = set; then | |
7867 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7868 | else | |
7869 | cat >conftest.$ac_ext <<_ACEOF | |
7870 | /* confdefs.h. */ | |
7871 | _ACEOF | |
7872 | cat confdefs.h >>conftest.$ac_ext | |
7873 | cat >>conftest.$ac_ext <<_ACEOF | |
7874 | /* end confdefs.h. */ | |
7875 | $ac_includes_default | |
7876 | int | |
7877 | main () | |
7878 | { | |
7879 | #ifndef sbrk | |
7880 | char *p = (char *) sbrk; | |
7881 | #endif | |
7882 | ||
7883 | ; | |
7884 | return 0; | |
7885 | } | |
7886 | _ACEOF | |
7887 | rm -f conftest.$ac_objext | |
7888 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7889 | (eval $ac_compile) 2>conftest.er1 | |
7890 | ac_status=$? | |
7891 | grep -v '^ *+' conftest.er1 >conftest.err | |
7892 | rm -f conftest.er1 | |
7893 | cat conftest.err >&5 | |
7894 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7895 | (exit $ac_status); } && | |
a4e5c0d8 | 7896 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
abf6a75b DD |
7897 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7898 | (eval $ac_try) 2>&5 | |
7899 | ac_status=$? | |
7900 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7901 | (exit $ac_status); }; } && | |
7902 | { ac_try='test -s conftest.$ac_objext' | |
7903 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7904 | (eval $ac_try) 2>&5 | |
7905 | ac_status=$? | |
7906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7907 | (exit $ac_status); }; }; then | |
7908 | ac_cv_have_decl_sbrk=yes | |
7909 | else | |
7910 | echo "$as_me: failed program was:" >&5 | |
7911 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7912 | ||
7913 | ac_cv_have_decl_sbrk=no | |
7914 | fi | |
7915 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7916 | fi | |
7917 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5 | |
7918 | echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6 | |
7919 | if test $ac_cv_have_decl_sbrk = yes; then | |
7920 | ||
7921 | cat >>confdefs.h <<_ACEOF | |
7922 | #define HAVE_DECL_SBRK 1 | |
7923 | _ACEOF | |
7924 | ||
7925 | ||
7926 | else | |
7927 | cat >>confdefs.h <<_ACEOF | |
7928 | #define HAVE_DECL_SBRK 0 | |
7929 | _ACEOF | |
7930 | ||
7931 | ||
67f3cb05 GK |
7932 | fi |
7933 | ||
7934 | ||
7935 | echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5 | |
7936 | echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6 | |
7937 | if test "${ac_cv_have_decl_strverscmp+set}" = set; then | |
7938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7939 | else | |
7940 | cat >conftest.$ac_ext <<_ACEOF | |
7941 | /* confdefs.h. */ | |
7942 | _ACEOF | |
7943 | cat confdefs.h >>conftest.$ac_ext | |
7944 | cat >>conftest.$ac_ext <<_ACEOF | |
7945 | /* end confdefs.h. */ | |
7946 | $ac_includes_default | |
7947 | int | |
7948 | main () | |
7949 | { | |
7950 | #ifndef strverscmp | |
7951 | char *p = (char *) strverscmp; | |
7952 | #endif | |
7953 | ||
7954 | ; | |
7955 | return 0; | |
7956 | } | |
7957 | _ACEOF | |
7958 | rm -f conftest.$ac_objext | |
7959 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7960 | (eval $ac_compile) 2>conftest.er1 | |
7961 | ac_status=$? | |
7962 | grep -v '^ *+' conftest.er1 >conftest.err | |
7963 | rm -f conftest.er1 | |
7964 | cat conftest.err >&5 | |
7965 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7966 | (exit $ac_status); } && | |
a4e5c0d8 | 7967 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
67f3cb05 GK |
7968 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7969 | (eval $ac_try) 2>&5 | |
7970 | ac_status=$? | |
7971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7972 | (exit $ac_status); }; } && | |
7973 | { ac_try='test -s conftest.$ac_objext' | |
7974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7975 | (eval $ac_try) 2>&5 | |
7976 | ac_status=$? | |
7977 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7978 | (exit $ac_status); }; }; then | |
7979 | ac_cv_have_decl_strverscmp=yes | |
7980 | else | |
7981 | echo "$as_me: failed program was:" >&5 | |
7982 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7983 | ||
7984 | ac_cv_have_decl_strverscmp=no | |
7985 | fi | |
7986 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7987 | fi | |
7988 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5 | |
7989 | echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6 | |
7990 | if test $ac_cv_have_decl_strverscmp = yes; then | |
7991 | ||
7992 | cat >>confdefs.h <<_ACEOF | |
7993 | #define HAVE_DECL_STRVERSCMP 1 | |
7994 | _ACEOF | |
7995 | ||
7996 | ||
7997 | else | |
7998 | cat >>confdefs.h <<_ACEOF | |
7999 | #define HAVE_DECL_STRVERSCMP 0 | |
8000 | _ACEOF | |
8001 | ||
8002 | ||
fa99459d DD |
8003 | fi |
8004 | ||
8005 | ||
2299a76d DJ |
8006 | echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5 |
8007 | echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6 | |
8008 | if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then | |
8009 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba61a412 | 8010 | else |
2299a76d | 8011 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8012 | /* confdefs.h. */ |
8013 | _ACEOF | |
8014 | cat confdefs.h >>conftest.$ac_ext | |
8015 | cat >>conftest.$ac_ext <<_ACEOF | |
8016 | /* end confdefs.h. */ | |
ba61a412 DJ |
8017 | |
8018 | #include "confdefs.h" | |
8019 | #include <stdio.h> | |
8020 | #ifdef HAVE_STRING_H | |
8021 | #include <string.h> | |
8022 | #else | |
8023 | #ifdef HAVE_STRINGS_H | |
8024 | #include <strings.h> | |
8025 | #endif | |
8026 | #endif | |
8027 | #ifdef HAVE_STDLIB_H | |
8028 | #include <stdlib.h> | |
8029 | #endif | |
8030 | #ifdef HAVE_UNISTD_H | |
8031 | #include <unistd.h> | |
8032 | #endif | |
2299a76d DJ |
8033 | int |
8034 | main () | |
8035 | { | |
ba61a412 | 8036 | char *(*pfn) = (char *(*)) canonicalize_file_name |
2299a76d DJ |
8037 | ; |
8038 | return 0; | |
8039 | } | |
8040 | _ACEOF | |
8041 | rm -f conftest.$ac_objext | |
8042 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
58670637 | 8043 | (eval $ac_compile) 2>conftest.er1 |
2299a76d | 8044 | ac_status=$? |
58670637 DD |
8045 | grep -v '^ *+' conftest.er1 >conftest.err |
8046 | rm -f conftest.er1 | |
8047 | cat conftest.err >&5 | |
2299a76d DJ |
8048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8049 | (exit $ac_status); } && | |
a4e5c0d8 | 8050 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
8051 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8052 | (eval $ac_try) 2>&5 | |
8053 | ac_status=$? | |
8054 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8055 | (exit $ac_status); }; } && | |
8056 | { ac_try='test -s conftest.$ac_objext' | |
2299a76d DJ |
8057 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8058 | (eval $ac_try) 2>&5 | |
8059 | ac_status=$? | |
8060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8061 | (exit $ac_status); }; }; then | |
ba61a412 DJ |
8062 | libiberty_cv_decl_needed_canonicalize_file_name=no |
8063 | else | |
2299a76d DJ |
8064 | echo "$as_me: failed program was:" >&5 |
8065 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8066 | ||
8067 | libiberty_cv_decl_needed_canonicalize_file_name=yes | |
ba61a412 | 8068 | fi |
58670637 | 8069 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba61a412 DJ |
8070 | fi |
8071 | ||
2299a76d DJ |
8072 | echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5 |
8073 | echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6 | |
ba61a412 | 8074 | if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then |
2299a76d DJ |
8075 | |
8076 | cat >>confdefs.h <<\_ACEOF | |
ba61a412 | 8077 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 |
2299a76d | 8078 | _ACEOF |
ba61a412 DJ |
8079 | |
8080 | fi | |
8081 | ||
eb383413 L |
8082 | fi |
8083 | ||
5a17353c DD |
8084 | # Figure out which version of pexecute to use. |
8085 | case "${host}" in | |
46a10049 DD |
8086 | *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;; |
8087 | *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;; | |
8088 | *-*-msdos*) pexecute=./pex-msdos.o ;; | |
46a10049 | 8089 | *) pexecute=./pex-unix.o ;; |
5a17353c DD |
8090 | esac |
8091 | ||
8092 | ||
2299a76d DJ |
8093 | if test x$gcc_no_link = xyes; then |
8094 | if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then | |
8095 | ac_cv_func_mmap_fixed_mapped=no | |
8096 | fi | |
8097 | fi | |
67f3cb05 | 8098 | if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then |
2299a76d DJ |
8099 | |
8100 | ||
8101 | for ac_header in stdlib.h unistd.h | |
eb383413 | 8102 | do |
2299a76d | 8103 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
8ddbb593 | 8104 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
2299a76d DJ |
8105 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8106 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8107 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2299a76d | 8108 | else |
8ddbb593 | 8109 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8110 | /* confdefs.h. */ |
8111 | _ACEOF | |
8112 | cat confdefs.h >>conftest.$ac_ext | |
8113 | cat >>conftest.$ac_ext <<_ACEOF | |
8114 | /* end confdefs.h. */ | |
8115 | #include <$ac_header> | |
8116 | _ACEOF | |
8117 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8118 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8119 | ac_status=$? | |
8120 | grep -v '^ *+' conftest.er1 >conftest.err | |
8121 | rm -f conftest.er1 | |
8122 | cat conftest.err >&5 | |
8123 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8124 | (exit $ac_status); } >/dev/null; then | |
8125 | if test -s conftest.err; then | |
8126 | ac_cpp_err=$ac_c_preproc_warn_flag | |
58670637 | 8127 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
2299a76d DJ |
8128 | else |
8129 | ac_cpp_err= | |
8130 | fi | |
8131 | else | |
8132 | ac_cpp_err=yes | |
8133 | fi | |
8134 | if test -z "$ac_cpp_err"; then | |
8ddbb593 | 8135 | eval "$as_ac_Header=yes" |
2299a76d DJ |
8136 | else |
8137 | echo "$as_me: failed program was:" >&5 | |
8138 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8139 | ||
8ddbb593 | 8140 | eval "$as_ac_Header=no" |
2299a76d DJ |
8141 | fi |
8142 | rm -f conftest.err conftest.$ac_ext | |
eb383413 | 8143 | fi |
2299a76d DJ |
8144 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8145 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
2299a76d DJ |
8146 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8147 | cat >>confdefs.h <<_ACEOF | |
8148 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8149 | _ACEOF | |
8150 | ||
eb383413 L |
8151 | fi |
8152 | done | |
8153 | ||
2299a76d | 8154 | |
eb383413 L |
8155 | for ac_func in getpagesize |
8156 | do | |
2299a76d DJ |
8157 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
8158 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
8159 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
8160 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
8161 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8162 | else | |
8163 | if test x$gcc_no_link = xyes; then | |
8164 | { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 | |
8165 | echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} | |
8166 | { (exit 1); exit 1; }; } | |
8167 | fi | |
8168 | cat >conftest.$ac_ext <<_ACEOF | |
2299a76d DJ |
8169 | /* confdefs.h. */ |
8170 | _ACEOF | |
8171 | cat confdefs.h >>conftest.$ac_ext | |
8172 | cat >>conftest.$ac_ext <<_ACEOF | |
8173 | /* end confdefs.h. */ | |
252b5132 | 8174 | /* System header to define __stub macros and hopefully few prototypes, |
2299a76d DJ |
8175 | which can conflict with char $ac_func (); below. |
8176 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
60b04ee8 DD |
8177 | <limits.h> exists even on freestanding compilers. Under hpux, |
8178 | including <limits.h> includes <sys/time.h> and causes problems | |
8179 | checking for functions defined therein. */ | |
8180 | #if defined (__STDC__) && !defined (_HPUX_SOURCE) | |
2299a76d DJ |
8181 | # include <limits.h> |
8182 | #else | |
8183 | # include <assert.h> | |
8184 | #endif | |
252b5132 | 8185 | /* Override any gcc2 internal prototype to avoid an error. */ |
2299a76d DJ |
8186 | #ifdef __cplusplus |
8187 | extern "C" | |
8188 | { | |
8189 | #endif | |
252b5132 | 8190 | /* We use char because int might match the return type of a gcc2 |
2299a76d DJ |
8191 | builtin and then its argument prototype would still apply. */ |
8192 | char $ac_func (); | |
252b5132 RH |
8193 | /* The GNU C library defines this for functions which it implements |
8194 | to always fail with ENOSYS. Some functions are actually named | |
8195 | something starting with __ and the normal name is an alias. */ | |
8196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
8197 | choke me | |
8198 | #else | |
2299a76d DJ |
8199 | char (*f) () = $ac_func; |
8200 | #endif | |
8201 | #ifdef __cplusplus | |
8202 | } | |
252b5132 RH |
8203 | #endif |
8204 | ||
2299a76d DJ |
8205 | int |
8206 | main () | |
8207 | { | |
8208 | return f != $ac_func; | |
8209 | ; | |
8210 | return 0; | |
8211 | } | |
8212 | _ACEOF | |
8213 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8214 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
58670637 | 8215 | (eval $ac_link) 2>conftest.er1 |
2299a76d | 8216 | ac_status=$? |
58670637 DD |
8217 | grep -v '^ *+' conftest.er1 >conftest.err |
8218 | rm -f conftest.er1 | |
8219 | cat conftest.err >&5 | |
2299a76d DJ |
8220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8221 | (exit $ac_status); } && | |
a4e5c0d8 | 8222 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
58670637 DD |
8223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8224 | (eval $ac_try) 2>&5 | |
8225 | ac_status=$? | |
8226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8227 | (exit $ac_status); }; } && | |
8228 | { ac_try='test -s conftest$ac_exeext' | |
2299a76d DJ |
8229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8230 | (eval $ac_try) 2>&5 | |
8231 | ac_status=$? | |
8232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8233 | (exit $ac_status); }; }; then | |
8234 | eval "$as_ac_var=yes" | |
8235 | else | |
8236 | echo "$as_me: failed program was:" >&5 | |
8237 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8238 | ||
8239 | eval "$as_ac_var=no" | |
8240 | fi | |
58670637 DD |
8241 | rm -f conftest.err conftest.$ac_objext \ |
8242 | conftest$ac_exeext conftest.$ac_ext | |
2299a76d DJ |
8243 | fi |
8244 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
8245 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
8246 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
8247 | cat >>confdefs.h <<_ACEOF | |
8248 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8249 | _ACEOF | |
252b5132 | 8250 | |
252b5132 RH |
8251 | fi |
8252 | done | |
8253 | ||
2299a76d DJ |
8254 | echo "$as_me:$LINENO: checking for working mmap" >&5 |
8255 | echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 | |
8256 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then | |
8257 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
eb383413 L |
8258 | else |
8259 | if test "$cross_compiling" = yes; then | |
8260 | ac_cv_func_mmap_fixed_mapped=no | |
8261 | else | |
2299a76d | 8262 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8263 | /* confdefs.h. */ |
8264 | _ACEOF | |
8265 | cat confdefs.h >>conftest.$ac_ext | |
8266 | cat >>conftest.$ac_ext <<_ACEOF | |
8267 | /* end confdefs.h. */ | |
8268 | $ac_includes_default | |
8269 | /* malloc might have been renamed as rpl_malloc. */ | |
8270 | #undef malloc | |
eb383413 L |
8271 | |
8272 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
8273 | Here is a matrix of mmap possibilities: | |
8274 | mmap private not fixed | |
8275 | mmap private fixed at somewhere currently unmapped | |
8276 | mmap private fixed at somewhere already mapped | |
8277 | mmap shared not fixed | |
8278 | mmap shared fixed at somewhere currently unmapped | |
8279 | mmap shared fixed at somewhere already mapped | |
8280 | For private mappings, we should verify that changes cannot be read() | |
8281 | back from the file, nor mmap's back from the file at a different | |
8282 | address. (There have been systems where private was not correctly | |
8283 | implemented like the infamous i386 svr4.0, and systems where the | |
2299a76d | 8284 | VM page cache was not coherent with the file system buffer cache |
eb383413 L |
8285 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
8286 | For shared mappings, we should conversely verify that changes get | |
2299a76d | 8287 | propagated back to all the places they're supposed to be. |
eb383413 L |
8288 | |
8289 | Grep wants private fixed already mapped. | |
8290 | The main things grep needs to know about mmap are: | |
8291 | * does it exist and is it safe to write into the mmap'd area | |
8292 | * how to use it (BSD variants) */ | |
2299a76d | 8293 | |
eb383413 L |
8294 | #include <fcntl.h> |
8295 | #include <sys/mman.h> | |
8296 | ||
2299a76d DJ |
8297 | #if !STDC_HEADERS && !HAVE_STDLIB_H |
8298 | char *malloc (); | |
5f73c378 DD |
8299 | #endif |
8300 | ||
eb383413 | 8301 | /* This mess was copied from the GNU getpagesize.h. */ |
2299a76d | 8302 | #if !HAVE_GETPAGESIZE |
eb383413 | 8303 | /* Assume that all systems that can run configure have sys/param.h. */ |
2299a76d | 8304 | # if !HAVE_SYS_PARAM_H |
eb383413 L |
8305 | # define HAVE_SYS_PARAM_H 1 |
8306 | # endif | |
8307 | ||
8308 | # ifdef _SC_PAGESIZE | |
8309 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
8310 | # else /* no _SC_PAGESIZE */ | |
2299a76d | 8311 | # if HAVE_SYS_PARAM_H |
eb383413 L |
8312 | # include <sys/param.h> |
8313 | # ifdef EXEC_PAGESIZE | |
8314 | # define getpagesize() EXEC_PAGESIZE | |
8315 | # else /* no EXEC_PAGESIZE */ | |
8316 | # ifdef NBPG | |
8317 | # define getpagesize() NBPG * CLSIZE | |
8318 | # ifndef CLSIZE | |
8319 | # define CLSIZE 1 | |
8320 | # endif /* no CLSIZE */ | |
8321 | # else /* no NBPG */ | |
8322 | # ifdef NBPC | |
8323 | # define getpagesize() NBPC | |
8324 | # else /* no NBPC */ | |
8325 | # ifdef PAGESIZE | |
8326 | # define getpagesize() PAGESIZE | |
8327 | # endif /* PAGESIZE */ | |
8328 | # endif /* no NBPC */ | |
8329 | # endif /* no NBPG */ | |
8330 | # endif /* no EXEC_PAGESIZE */ | |
8331 | # else /* no HAVE_SYS_PARAM_H */ | |
8332 | # define getpagesize() 8192 /* punt totally */ | |
8333 | # endif /* no HAVE_SYS_PARAM_H */ | |
8334 | # endif /* no _SC_PAGESIZE */ | |
8335 | ||
8336 | #endif /* no HAVE_GETPAGESIZE */ | |
8337 | ||
eb383413 | 8338 | int |
2299a76d | 8339 | main () |
eb383413 | 8340 | { |
2299a76d DJ |
8341 | char *data, *data2, *data3; |
8342 | int i, pagesize; | |
8343 | int fd; | |
eb383413 | 8344 | |
2299a76d DJ |
8345 | pagesize = getpagesize (); |
8346 | ||
8347 | /* First, make a file with some known garbage in it. */ | |
8348 | data = (char *) malloc (pagesize); | |
8349 | if (!data) | |
8350 | exit (1); | |
8351 | for (i = 0; i < pagesize; ++i) | |
8352 | *(data + i) = rand (); | |
8353 | umask (0); | |
8354 | fd = creat ("conftest.mmap", 0600); | |
8355 | if (fd < 0) | |
8356 | exit (1); | |
8357 | if (write (fd, data, pagesize) != pagesize) | |
8358 | exit (1); | |
8359 | close (fd); | |
8360 | ||
8361 | /* Next, try to mmap the file at a fixed address which already has | |
8362 | something else allocated at it. If we can, also make sure that | |
8363 | we see the same garbage. */ | |
8364 | fd = open ("conftest.mmap", O_RDWR); | |
8365 | if (fd < 0) | |
8366 | exit (1); | |
8367 | data2 = (char *) malloc (2 * pagesize); | |
8368 | if (!data2) | |
8369 | exit (1); | |
58670637 | 8370 | data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); |
2299a76d | 8371 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
58670637 | 8372 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
2299a76d DJ |
8373 | exit (1); |
8374 | for (i = 0; i < pagesize; ++i) | |
8375 | if (*(data + i) != *(data2 + i)) | |
8376 | exit (1); | |
8377 | ||
8378 | /* Finally, make sure that changes to the mapped area do not | |
8379 | percolate back to the file as seen by read(). (This is a bug on | |
8380 | some variants of i386 svr4.0.) */ | |
8381 | for (i = 0; i < pagesize; ++i) | |
8382 | *(data2 + i) = *(data2 + i) + 1; | |
8383 | data3 = (char *) malloc (pagesize); | |
8384 | if (!data3) | |
8385 | exit (1); | |
8386 | if (read (fd, data3, pagesize) != pagesize) | |
8387 | exit (1); | |
8388 | for (i = 0; i < pagesize; ++i) | |
8389 | if (*(data + i) != *(data3 + i)) | |
8390 | exit (1); | |
8391 | close (fd); | |
8392 | exit (0); | |
8393 | } | |
8394 | _ACEOF | |
8395 | rm -f conftest$ac_exeext | |
8396 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8397 | (eval $ac_link) 2>&5 | |
8398 | ac_status=$? | |
8399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8400 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
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); }; }; then | |
eb383413 L |
8406 | ac_cv_func_mmap_fixed_mapped=yes |
8407 | else | |
2299a76d DJ |
8408 | echo "$as_me: program exited with status $ac_status" >&5 |
8409 | echo "$as_me: failed program was:" >&5 | |
8410 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8411 | ||
8412 | ( exit $ac_status ) | |
8413 | ac_cv_func_mmap_fixed_mapped=no | |
eb383413 | 8414 | fi |
58670637 | 8415 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb383413 | 8416 | fi |
eb383413 | 8417 | fi |
2299a76d DJ |
8418 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
8419 | echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 | |
eb383413 | 8420 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
2299a76d DJ |
8421 | |
8422 | cat >>confdefs.h <<\_ACEOF | |
eb383413 | 8423 | #define HAVE_MMAP 1 |
2299a76d | 8424 | _ACEOF |
eb383413 | 8425 | |
252b5132 | 8426 | fi |
2299a76d | 8427 | rm -f conftest.mmap |
252b5132 | 8428 | |
2299a76d | 8429 | fi |
eb383413 | 8430 | |
2299a76d DJ |
8431 | echo "$as_me:$LINENO: checking for working strncmp" >&5 |
8432 | echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6 | |
8433 | if test "${ac_cv_func_strncmp_works+set}" = set; then | |
8434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
eb383413 L |
8435 | else |
8436 | if test "$cross_compiling" = yes; then | |
8437 | ac_cv_func_strncmp_works=no | |
8438 | else | |
2299a76d | 8439 | cat >conftest.$ac_ext <<_ACEOF |
2299a76d DJ |
8440 | /* confdefs.h. */ |
8441 | _ACEOF | |
8442 | cat confdefs.h >>conftest.$ac_ext | |
8443 | cat >>conftest.$ac_ext <<_ACEOF | |
8444 | /* end confdefs.h. */ | |
eb383413 L |
8445 | |
8446 | /* Test by Jim Wilson and Kaveh Ghazi. | |
8447 | Check whether strncmp reads past the end of its string parameters. */ | |
8448 | #include <sys/types.h> | |
8449 | ||
8450 | #ifdef HAVE_FCNTL_H | |
8451 | #include <fcntl.h> | |
8452 | #endif | |
8453 | ||
8454 | #ifdef HAVE_SYS_MMAN_H | |
8455 | #include <sys/mman.h> | |
8456 | #endif | |
8457 | ||
8458 | #ifndef MAP_ANON | |
8459 | #ifdef MAP_ANONYMOUS | |
8460 | #define MAP_ANON MAP_ANONYMOUS | |
8461 | #else | |
8462 | #define MAP_ANON MAP_FILE | |
8463 | #endif | |
8464 | #endif | |
8465 | ||
8466 | #ifndef MAP_FILE | |
8467 | #define MAP_FILE 0 | |
8468 | #endif | |
8469 | #ifndef O_RDONLY | |
8470 | #define O_RDONLY 0 | |
8471 | #endif | |
8472 | ||
8473 | #define MAP_LEN 0x10000 | |
8474 | ||
8475 | main () | |
8476 | { | |
8477 | #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) | |
8478 | char *p; | |
8479 | int dev_zero; | |
8480 | ||
8481 | dev_zero = open ("/dev/zero", O_RDONLY); | |
8482 | if (dev_zero < 0) | |
8483 | exit (1); | |
2299a76d | 8484 | |
eb383413 L |
8485 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, |
8486 | MAP_ANON|MAP_PRIVATE, dev_zero, 0); | |
f348a7b1 DD |
8487 | if (p == (char *)-1) |
8488 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, | |
8489 | MAP_ANON|MAP_PRIVATE, -1, 0); | |
eb383413 L |
8490 | if (p == (char *)-1) |
8491 | exit (2); | |
8492 | else | |
8493 | { | |
8494 | char *string = "__si_type_info"; | |
8495 | char *q = (char *) p + MAP_LEN - strlen (string) - 2; | |
8496 | char *r = (char *) p + 0xe; | |
8497 | ||
8498 | strcpy (q, string); | |
8499 | strcpy (r, string); | |
8500 | strncmp (r, q, 14); | |
8501 | } | |
8502 | #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ | |
8503 | exit (0); | |
8504 | } | |
8505 | ||
2299a76d DJ |
8506 | _ACEOF |
8507 | rm -f conftest$ac_exeext | |
8508 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8509 | (eval $ac_link) 2>&5 | |
8510 | ac_status=$? | |
8511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8512 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8513 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8514 | (eval $ac_try) 2>&5 | |
8515 | ac_status=$? | |
8516 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8517 | (exit $ac_status); }; }; then | |
eb383413 L |
8518 | ac_cv_func_strncmp_works=yes |
8519 | else | |
2299a76d DJ |
8520 | echo "$as_me: program exited with status $ac_status" >&5 |
8521 | echo "$as_me: failed program was:" >&5 | |
8522 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8523 | ||
8524 | ( exit $ac_status ) | |
8525 | ac_cv_func_strncmp_works=no | |
eb383413 | 8526 | fi |
58670637 | 8527 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb383413 | 8528 | fi |
eb383413 L |
8529 | rm -f core core.* *.core |
8530 | fi | |
2299a76d DJ |
8531 | echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5 |
8532 | echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6 | |
eb383413 | 8533 | if test $ac_cv_func_strncmp_works = no ; then |
58670637 DD |
8534 | case $LIBOBJS in |
8535 | "strncmp.$ac_objext" | \ | |
8536 | *" strncmp.$ac_objext" | \ | |
8537 | "strncmp.$ac_objext "* | \ | |
8538 | *" strncmp.$ac_objext "* ) ;; | |
8539 | *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;; | |
8540 | esac | |
8541 | ||
eb383413 L |
8542 | fi |
8543 | ||
8544 | ||
252b5132 RH |
8545 | # Install a library built with a cross compiler in $(tooldir) rather |
8546 | # than $(libdir). | |
8547 | if test -z "${with_cross_host}"; then | |
8548 | INSTALL_DEST=libdir | |
8549 | else | |
8550 | INSTALL_DEST=tooldir | |
8551 | fi | |
8552 | ||
8553 | ||
11a338da DD |
8554 | |
8555 | L="" | |
8556 | for l in x $LIBOBJS; do | |
8557 | case $l in | |
8558 | x) ;; | |
8559 | *) L="$L ./$l" ;; | |
8560 | esac | |
8561 | done | |
8562 | LIBOBJS="$L" | |
8563 | ||
252b5132 | 8564 | # We need multilib support, but only if configuring for the target. |
2299a76d | 8565 | ac_config_files="$ac_config_files Makefile testsuite/Makefile" |
bb6a587d | 8566 | |
2299a76d | 8567 | ac_config_commands="$ac_config_commands default" |
bb6a587d | 8568 | |
2299a76d | 8569 | cat >confcache <<\_ACEOF |
252b5132 RH |
8570 | # This file is a shell script that caches the results of configure |
8571 | # tests run on this system so they can be shared between configure | |
2299a76d DJ |
8572 | # scripts and configure runs, see configure's option --config-cache. |
8573 | # It is not useful on other systems. If it contains results you don't | |
8574 | # want to keep, you may remove or edit it. | |
252b5132 | 8575 | # |
2299a76d DJ |
8576 | # config.status only pays attention to the cache file if you give it |
8577 | # the --recheck option to rerun configure. | |
252b5132 | 8578 | # |
2299a76d DJ |
8579 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
8580 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
8581 | # following values. | |
8582 | ||
8583 | _ACEOF | |
8584 | ||
252b5132 RH |
8585 | # The following way of writing the cache mishandles newlines in values, |
8586 | # but we know of no workaround that is simple, portable, and efficient. | |
8587 | # So, don't put newlines in cache variables' values. | |
8588 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8589 | # and sets the high bit in the cache file unless we assign to the vars. | |
2299a76d DJ |
8590 | { |
8591 | (set) 2>&1 | | |
8592 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
8593 | *ac_space=\ *) | |
8594 | # `set' does not quote correctly, so add quotes (double-quote | |
8595 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
8596 | sed -n \ | |
58670637 DD |
8597 | "s/'/'\\\\''/g; |
8598 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
2299a76d DJ |
8599 | ;; |
8600 | *) | |
8601 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8602 | sed -n \ | |
58670637 | 8603 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
2299a76d DJ |
8604 | ;; |
8605 | esac; | |
8606 | } | | |
8607 | sed ' | |
8608 | t clear | |
8609 | : clear | |
8610 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
8611 | t end | |
8612 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
8613 | : end' >>confcache | |
8614 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
252b5132 | 8615 | if test -w $cache_file; then |
2299a76d DJ |
8616 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
8617 | cat confcache >$cache_file | |
252b5132 RH |
8618 | else |
8619 | echo "not updating unwritable cache $cache_file" | |
8620 | fi | |
8621 | fi | |
8622 | rm -f confcache | |
8623 | ||
252b5132 RH |
8624 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
8625 | # Let make expand exec_prefix. | |
8626 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8627 | ||
2299a76d DJ |
8628 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
8629 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
8630 | # trailing colons and then remove the whole line if VPATH becomes empty | |
8631 | # (actually we leave an empty line to preserve line numbers). | |
252b5132 | 8632 | if test "x$srcdir" = x.; then |
58670637 | 8633 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
2299a76d DJ |
8634 | s/:*\$(srcdir):*/:/; |
8635 | s/:*\${srcdir}:*/:/; | |
8636 | s/:*@srcdir@:*/:/; | |
58670637 | 8637 | s/^\([^=]*=[ ]*\):*/\1/; |
2299a76d | 8638 | s/:*$//; |
58670637 | 8639 | s/^[^=]*=[ ]*$//; |
2299a76d | 8640 | }' |
252b5132 RH |
8641 | fi |
8642 | ||
252b5132 RH |
8643 | DEFS=-DHAVE_CONFIG_H |
8644 | ||
2299a76d DJ |
8645 | ac_libobjs= |
8646 | ac_ltlibobjs= | |
8647 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
8648 | # 1. Remove the extension, and $U if already installed. | |
8649 | ac_i=`echo "$ac_i" | | |
58670637 | 8650 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
2299a76d DJ |
8651 | # 2. Add them. |
8652 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
8653 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
8654 | done | |
8655 | LIBOBJS=$ac_libobjs | |
252b5132 | 8656 | |
2299a76d DJ |
8657 | LTLIBOBJS=$ac_ltlibobjs |
8658 | ||
8659 | ||
8660 | ||
8661 | : ${CONFIG_STATUS=./config.status} | |
8662 | ac_clean_files_save=$ac_clean_files | |
8663 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
8664 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
8665 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
8666 | cat >$CONFIG_STATUS <<_ACEOF | |
8667 | #! $SHELL | |
8668 | # Generated by $as_me. | |
252b5132 | 8669 | # Run this file to recreate the current configuration. |
252b5132 | 8670 | # Compiler output produced by configure, useful for debugging |
2299a76d | 8671 | # configure, is in config.log if it exists. |
252b5132 | 8672 | |
2299a76d DJ |
8673 | debug=false |
8674 | ac_cs_recheck=false | |
8675 | ac_cs_silent=false | |
8676 | SHELL=\${CONFIG_SHELL-$SHELL} | |
8677 | _ACEOF | |
8678 | ||
8679 | cat >>$CONFIG_STATUS <<\_ACEOF | |
8680 | ## --------------------- ## | |
8681 | ## M4sh Initialization. ## | |
8682 | ## --------------------- ## | |
8683 | ||
8684 | # Be Bourne compatible | |
8685 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
8686 | emulate sh | |
8687 | NULLCMD=: | |
8688 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
8689 | # is contrary to our usage. Disable this feature. | |
8690 | alias -g '${1+"$@"}'='"$@"' | |
8691 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
8692 | set -o posix | |
8693 | fi | |
58670637 | 8694 | DUALCASE=1; export DUALCASE # for MKS sh |
2299a76d DJ |
8695 | |
8696 | # Support unset when possible. | |
58670637 | 8697 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
2299a76d DJ |
8698 | as_unset=unset |
8699 | else | |
8700 | as_unset=false | |
8701 | fi | |
8702 | ||
8703 | ||
8704 | # Work around bugs in pre-3.0 UWIN ksh. | |
8705 | $as_unset ENV MAIL MAILPATH | |
8706 | PS1='$ ' | |
8707 | PS2='> ' | |
8708 | PS4='+ ' | |
8709 | ||
8710 | # NLS nuisances. | |
8711 | for as_var in \ | |
8712 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
8713 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
8714 | LC_TELEPHONE LC_TIME | |
252b5132 | 8715 | do |
58670637 | 8716 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
2299a76d DJ |
8717 | eval $as_var=C; export $as_var |
8718 | else | |
8719 | $as_unset $as_var | |
8720 | fi | |
252b5132 RH |
8721 | done |
8722 | ||
2299a76d DJ |
8723 | # Required to use basename. |
8724 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
8725 | as_expr=expr | |
8726 | else | |
8727 | as_expr=false | |
8728 | fi | |
252b5132 | 8729 | |
2299a76d DJ |
8730 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
8731 | as_basename=basename | |
8732 | else | |
8733 | as_basename=false | |
8734 | fi | |
252b5132 | 8735 | |
252b5132 | 8736 | |
2299a76d DJ |
8737 | # Name of the executable. |
8738 | as_me=`$as_basename "$0" || | |
8739 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
8740 | X"$0" : 'X\(//\)$' \| \ | |
8741 | X"$0" : 'X\(/\)$' \| \ | |
8742 | . : '\(.\)' 2>/dev/null || | |
8743 | echo X/"$0" | | |
8744 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
8745 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
8746 | /^X\/\(\/\).*/{ s//\1/; q; } | |
8747 | s/.*/./; q'` | |
8748 | ||
8749 | ||
8750 | # PATH needs CR, and LINENO needs CR and PATH. | |
8751 | # Avoid depending upon Character Ranges. | |
8752 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
8753 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
8754 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
8755 | as_cr_digits='0123456789' | |
8756 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
252b5132 | 8757 | |
2299a76d DJ |
8758 | # The user is always right. |
8759 | if test "${PATH_SEPARATOR+set}" != set; then | |
8760 | echo "#! /bin/sh" >conf$$.sh | |
8761 | echo "exit 0" >>conf$$.sh | |
8762 | chmod +x conf$$.sh | |
8763 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8764 | PATH_SEPARATOR=';' | |
252b5132 | 8765 | else |
2299a76d | 8766 | PATH_SEPARATOR=: |
252b5132 | 8767 | fi |
2299a76d DJ |
8768 | rm -f conf$$.sh |
8769 | fi | |
8770 | ||
8771 | ||
8772 | as_lineno_1=$LINENO | |
8773 | as_lineno_2=$LINENO | |
8774 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
8775 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
8776 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
8777 | # Find who we are. Look in the path if we contain no path at all | |
8778 | # relative or not. | |
8779 | case $0 in | |
8780 | *[\\/]* ) as_myself=$0 ;; | |
8781 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8782 | for as_dir in $PATH | |
8783 | do | |
8784 | IFS=$as_save_IFS | |
8785 | test -z "$as_dir" && as_dir=. | |
8786 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
8787 | done | |
8788 | ||
8789 | ;; | |
8790 | esac | |
8791 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
8792 | # in which case we are not to be found in the path. | |
8793 | if test "x$as_myself" = x; then | |
8794 | as_myself=$0 | |
8795 | fi | |
8796 | if test ! -f "$as_myself"; then | |
8797 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
8798 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
8799 | { (exit 1); exit 1; }; } | |
8800 | fi | |
8801 | case $CONFIG_SHELL in | |
8802 | '') | |
8803 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8804 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
8805 | do | |
8806 | IFS=$as_save_IFS | |
8807 | test -z "$as_dir" && as_dir=. | |
8808 | for as_base in sh bash ksh sh5; do | |
8809 | case $as_dir in | |
8810 | /*) | |
8811 | if ("$as_dir/$as_base" -c ' | |
8812 | as_lineno_1=$LINENO | |
8813 | as_lineno_2=$LINENO | |
8814 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
8815 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
8816 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
8817 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
8818 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
8819 | CONFIG_SHELL=$as_dir/$as_base | |
8820 | export CONFIG_SHELL | |
8821 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
8822 | fi;; | |
8823 | esac | |
8824 | done | |
8825 | done | |
8826 | ;; | |
8827 | esac | |
8828 | ||
8829 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
8830 | # uniformly replaced by the line number. The first 'sed' inserts a | |
8831 | # line-number line before each line; the second 'sed' does the real | |
8832 | # work. The second script uses 'N' to pair each line-number line | |
8833 | # with the numbered line, and appends trailing '-' during | |
8834 | # substitution so that $LINENO is not a special case at line end. | |
8835 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
8836 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
8837 | sed '=' <$as_myself | | |
8838 | sed ' | |
8839 | N | |
8840 | s,$,-, | |
8841 | : loop | |
8842 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
8843 | t loop | |
8844 | s,-$,, | |
8845 | s,^['$as_cr_digits']*\n,, | |
8846 | ' >$as_me.lineno && | |
8847 | chmod +x $as_me.lineno || | |
8848 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
8849 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
8850 | { (exit 1); exit 1; }; } | |
8851 | ||
8852 | # Don't try to exec as it changes $[0], causing all sort of problems | |
8853 | # (the dirname of $[0] is not the place where we might find the | |
8854 | # original and so on. Autoconf is especially sensible to this). | |
8855 | . ./$as_me.lineno | |
8856 | # Exit status is that of the last command. | |
8857 | exit | |
8858 | } | |
8859 | ||
8860 | ||
8861 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
8862 | *c*,-n*) ECHO_N= ECHO_C=' | |
8863 | ' ECHO_T=' ' ;; | |
8864 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
8865 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
8866 | esac | |
8867 | ||
8868 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
8869 | as_expr=expr | |
8870 | else | |
8871 | as_expr=false | |
8872 | fi | |
8873 | ||
8874 | rm -f conf$$ conf$$.exe conf$$.file | |
8875 | echo >conf$$.file | |
8876 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
8877 | # We could just check for DJGPP; but this test a) works b) is more generic | |
8878 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
8879 | if test -f conf$$.exe; then | |
8880 | # Don't use ln at all; we don't have any links | |
8881 | as_ln_s='cp -p' | |
252b5132 | 8882 | else |
2299a76d | 8883 | as_ln_s='ln -s' |
252b5132 | 8884 | fi |
2299a76d DJ |
8885 | elif ln conf$$.file conf$$ 2>/dev/null; then |
8886 | as_ln_s=ln | |
8887 | else | |
8888 | as_ln_s='cp -p' | |
8889 | fi | |
8890 | rm -f conf$$ conf$$.exe conf$$.file | |
8891 | ||
8892 | if mkdir -p . 2>/dev/null; then | |
8893 | as_mkdir_p=: | |
8894 | else | |
58670637 | 8895 | test -d ./-p && rmdir ./-p |
2299a76d DJ |
8896 | as_mkdir_p=false |
8897 | fi | |
8898 | ||
8899 | as_executable_p="test -f" | |
8900 | ||
8901 | # Sed expression to map a string onto a valid CPP name. | |
58670637 | 8902 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
8903 | |
8904 | # Sed expression to map a string onto a valid variable name. | |
58670637 | 8905 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
2299a76d DJ |
8906 | |
8907 | ||
8908 | # IFS | |
8909 | # We need space, tab and new line, in precisely that order. | |
8910 | as_nl=' | |
8911 | ' | |
8912 | IFS=" $as_nl" | |
8913 | ||
8914 | # CDPATH. | |
8915 | $as_unset CDPATH | |
8916 | ||
8917 | exec 6>&1 | |
8918 | ||
8919 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
8920 | # report actual input values of CONFIG_FILES etc. instead of their | |
8921 | # values after options handling. Logging --version etc. is OK. | |
8922 | exec 5>>config.log | |
8923 | { | |
8924 | echo | |
8925 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
8926 | ## Running $as_me. ## | |
8927 | _ASBOX | |
8928 | } >&5 | |
8929 | cat >&5 <<_CSEOF | |
8930 | ||
8931 | This file was extended by $as_me, which was | |
85f969cd | 8932 | generated by GNU Autoconf 2.59. Invocation command line was |
2299a76d DJ |
8933 | |
8934 | CONFIG_FILES = $CONFIG_FILES | |
8935 | CONFIG_HEADERS = $CONFIG_HEADERS | |
8936 | CONFIG_LINKS = $CONFIG_LINKS | |
8937 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
8938 | $ $0 $@ | |
8939 | ||
8940 | _CSEOF | |
8941 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
8942 | echo >&5 | |
8943 | _ACEOF | |
8944 | ||
8945 | # Files that config.status was made for. | |
8946 | if test -n "$ac_config_files"; then | |
8947 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
8948 | fi | |
8949 | ||
8950 | if test -n "$ac_config_headers"; then | |
8951 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
8952 | fi | |
8953 | ||
8954 | if test -n "$ac_config_links"; then | |
8955 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
8956 | fi | |
8957 | ||
8958 | if test -n "$ac_config_commands"; then | |
8959 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
8960 | fi | |
8961 | ||
8962 | cat >>$CONFIG_STATUS <<\_ACEOF | |
8963 | ||
8964 | ac_cs_usage="\ | |
8965 | \`$as_me' instantiates files from templates according to the | |
8966 | current configuration. | |
8967 | ||
8968 | Usage: $0 [OPTIONS] [FILE]... | |
8969 | ||
8970 | -h, --help print this help, then exit | |
8971 | -V, --version print version number, then exit | |
8972 | -q, --quiet do not print progress messages | |
8973 | -d, --debug don't remove temporary files | |
8974 | --recheck update $as_me by reconfiguring in the same conditions | |
8975 | --file=FILE[:TEMPLATE] | |
58670637 | 8976 | instantiate the configuration file FILE |
2299a76d | 8977 | --header=FILE[:TEMPLATE] |
58670637 | 8978 | instantiate the configuration header FILE |
2299a76d DJ |
8979 | |
8980 | Configuration files: | |
8981 | $config_files | |
8982 | ||
8983 | Configuration headers: | |
8984 | $config_headers | |
8985 | ||
8986 | Configuration commands: | |
8987 | $config_commands | |
8988 | ||
8989 | Report bugs to <bug-autoconf@gnu.org>." | |
8990 | _ACEOF | |
8991 | ||
8992 | cat >>$CONFIG_STATUS <<_ACEOF | |
8993 | ac_cs_version="\\ | |
8994 | config.status | |
85f969cd | 8995 | configured by $0, generated by GNU Autoconf 2.59, |
2299a76d DJ |
8996 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
8997 | ||
58670637 | 8998 | Copyright (C) 2003 Free Software Foundation, Inc. |
2299a76d DJ |
8999 | This config.status script is free software; the Free Software Foundation |
9000 | gives unlimited permission to copy, distribute and modify it." | |
9001 | srcdir=$srcdir | |
9002 | INSTALL="$INSTALL" | |
9003 | _ACEOF | |
9004 | ||
9005 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9006 | # If no file are specified by the user, then we need to provide default | |
9007 | # value. By we need to know if files were specified by the user. | |
9008 | ac_need_defaults=: | |
9009 | while test $# != 0 | |
9010 | do | |
9011 | case $1 in | |
9012 | --*=*) | |
9013 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
9014 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
9015 | ac_shift=: | |
9016 | ;; | |
9017 | -*) | |
9018 | ac_option=$1 | |
9019 | ac_optarg=$2 | |
9020 | ac_shift=shift | |
9021 | ;; | |
9022 | *) # This is not an option, so the user has probably given explicit | |
9023 | # arguments. | |
9024 | ac_option=$1 | |
9025 | ac_need_defaults=false;; | |
9026 | esac | |
9027 | ||
9028 | case $ac_option in | |
9029 | # Handling of the options. | |
9030 | _ACEOF | |
9031 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9032 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9033 | ac_cs_recheck=: ;; | |
9034 | --version | --vers* | -V ) | |
9035 | echo "$ac_cs_version"; exit 0 ;; | |
9036 | --he | --h) | |
9037 | # Conflict between --help and --header | |
9038 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
9039 | Try \`$0 --help' for more information." >&5 | |
9040 | echo "$as_me: error: ambiguous option: $1 | |
9041 | Try \`$0 --help' for more information." >&2;} | |
9042 | { (exit 1); exit 1; }; };; | |
9043 | --help | --hel | -h ) | |
9044 | echo "$ac_cs_usage"; exit 0 ;; | |
9045 | --debug | --d* | -d ) | |
9046 | debug=: ;; | |
9047 | --file | --fil | --fi | --f ) | |
9048 | $ac_shift | |
9049 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
9050 | ac_need_defaults=false;; | |
9051 | --header | --heade | --head | --hea ) | |
9052 | $ac_shift | |
9053 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
9054 | ac_need_defaults=false;; | |
9055 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
9056 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
9057 | ac_cs_silent=: ;; | |
9058 | ||
9059 | # This is an error. | |
9060 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
9061 | Try \`$0 --help' for more information." >&5 | |
9062 | echo "$as_me: error: unrecognized option: $1 | |
9063 | Try \`$0 --help' for more information." >&2;} | |
9064 | { (exit 1); exit 1; }; } ;; | |
9065 | ||
9066 | *) ac_config_targets="$ac_config_targets $1" ;; | |
9067 | ||
9068 | esac | |
9069 | shift | |
252b5132 | 9070 | done |
2299a76d DJ |
9071 | |
9072 | ac_configure_extra_args= | |
9073 | ||
9074 | if $ac_cs_silent; then | |
9075 | exec 6>/dev/null | |
9076 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
252b5132 | 9077 | fi |
252b5132 | 9078 | |
2299a76d DJ |
9079 | _ACEOF |
9080 | cat >>$CONFIG_STATUS <<_ACEOF | |
9081 | if \$ac_cs_recheck; then | |
9082 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
9083 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
9084 | fi | |
252b5132 | 9085 | |
2299a76d DJ |
9086 | _ACEOF |
9087 | ||
9088 | cat >>$CONFIG_STATUS <<_ACEOF | |
9089 | # | |
9090 | # INIT-COMMANDS section. | |
9091 | # | |
9092 | ||
9093 | srcdir=${srcdir} | |
9094 | host=${host} | |
9095 | target=${target} | |
9096 | with_target_subdir=${with_target_subdir} | |
2299a76d DJ |
9097 | with_multisubdir=${with_multisubdir} |
9098 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
9099 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
9100 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" | |
9101 | libiberty_topdir=${libiberty_topdir} | |
9102 | ||
9103 | ||
9104 | _ACEOF | |
9105 | ||
9106 | ||
9107 | ||
9108 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9109 | for ac_config_target in $ac_config_targets | |
9110 | do | |
9111 | case "$ac_config_target" in | |
9112 | # Handling of arguments. | |
9113 | "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
9114 | "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; | |
9115 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
9116 | "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
9117 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
9118 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
9119 | { (exit 1); exit 1; }; };; | |
252b5132 | 9120 | esac |
2299a76d | 9121 | done |
252b5132 | 9122 | |
2299a76d DJ |
9123 | # If the user did not use the arguments to specify the items to instantiate, |
9124 | # then the envvar interface is used. Set only those that are not. | |
9125 | # We use the long form for the default assignment because of an extremely | |
9126 | # bizarre bug on SunOS 4.1.3. | |
9127 | if $ac_need_defaults; then | |
9128 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
9129 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
9130 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
9131 | fi | |
9132 | ||
9133 | # Have a temporary directory for convenience. Make it in the build tree | |
9134 | # simply because there is no reason to put it here, and in addition, | |
9135 | # creating and moving files from /tmp can sometimes cause problems. | |
9136 | # Create a temporary directory, and hook for its removal unless debugging. | |
9137 | $debug || | |
9138 | { | |
9139 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
9140 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
9141 | } | |
252b5132 | 9142 | |
2299a76d DJ |
9143 | # Create a (secure) tmp directory for tmp files. |
9144 | ||
9145 | { | |
9146 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
9147 | test -n "$tmp" && test -d "$tmp" | |
9148 | } || | |
9149 | { | |
9150 | tmp=./confstat$$-$RANDOM | |
9151 | (umask 077 && mkdir $tmp) | |
9152 | } || | |
9153 | { | |
9154 | echo "$me: cannot create a temporary directory in ." >&2 | |
9155 | { (exit 1); exit 1; } | |
9156 | } | |
9157 | ||
9158 | _ACEOF | |
9159 | ||
9160 | cat >>$CONFIG_STATUS <<_ACEOF | |
9161 | ||
9162 | # | |
9163 | # CONFIG_FILES section. | |
9164 | # | |
9165 | ||
9166 | # No need to generate the scripts if there are no CONFIG_FILES. | |
9167 | # This happens for instance when ./config.status config.h | |
9168 | if test -n "\$CONFIG_FILES"; then | |
9169 | # Protect against being on the right side of a sed subst in config.status. | |
9170 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
9171 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
9172 | s,@SHELL@,$SHELL,;t t | |
9173 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
9174 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
9175 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
9176 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
9177 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
9178 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
9179 | s,@exec_prefix@,$exec_prefix,;t t | |
9180 | s,@prefix@,$prefix,;t t | |
9181 | s,@program_transform_name@,$program_transform_name,;t t | |
9182 | s,@bindir@,$bindir,;t t | |
9183 | s,@sbindir@,$sbindir,;t t | |
9184 | s,@libexecdir@,$libexecdir,;t t | |
9185 | s,@datadir@,$datadir,;t t | |
9186 | s,@sysconfdir@,$sysconfdir,;t t | |
9187 | s,@sharedstatedir@,$sharedstatedir,;t t | |
9188 | s,@localstatedir@,$localstatedir,;t t | |
9189 | s,@libdir@,$libdir,;t t | |
9190 | s,@includedir@,$includedir,;t t | |
9191 | s,@oldincludedir@,$oldincludedir,;t t | |
9192 | s,@infodir@,$infodir,;t t | |
9193 | s,@mandir@,$mandir,;t t | |
9194 | s,@build_alias@,$build_alias,;t t | |
9195 | s,@host_alias@,$host_alias,;t t | |
9196 | s,@target_alias@,$target_alias,;t t | |
9197 | s,@DEFS@,$DEFS,;t t | |
9198 | s,@ECHO_C@,$ECHO_C,;t t | |
9199 | s,@ECHO_N@,$ECHO_N,;t t | |
9200 | s,@ECHO_T@,$ECHO_T,;t t | |
9201 | s,@LIBS@,$LIBS,;t t | |
9202 | s,@libiberty_topdir@,$libiberty_topdir,;t t | |
9203 | s,@MAINT@,$MAINT,;t t | |
9204 | s,@NOTMAINT@,$NOTMAINT,;t t | |
9205 | s,@MAKEINFO@,$MAKEINFO,;t t | |
9206 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
9207 | s,@PERL@,$PERL,;t t | |
9208 | s,@HAVE_PERL@,$HAVE_PERL,;t t | |
9209 | s,@build@,$build,;t t | |
9210 | s,@build_cpu@,$build_cpu,;t t | |
9211 | s,@build_vendor@,$build_vendor,;t t | |
9212 | s,@build_os@,$build_os,;t t | |
9213 | s,@host@,$host,;t t | |
9214 | s,@host_cpu@,$host_cpu,;t t | |
9215 | s,@host_vendor@,$host_vendor,;t t | |
9216 | s,@host_os@,$host_os,;t t | |
9217 | s,@AR@,$AR,;t t | |
9218 | s,@ac_ct_AR@,$ac_ct_AR,;t t | |
9219 | s,@RANLIB@,$RANLIB,;t t | |
9220 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
9221 | s,@CC@,$CC,;t t | |
9222 | s,@CFLAGS@,$CFLAGS,;t t | |
9223 | s,@LDFLAGS@,$LDFLAGS,;t t | |
9224 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
9225 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
9226 | s,@EXEEXT@,$EXEEXT,;t t | |
9227 | s,@OBJEXT@,$OBJEXT,;t t | |
8ddbb593 | 9228 | s,@CPP@,$CPP,;t t |
11a338da | 9229 | s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t |
46a10049 DD |
9230 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t |
9231 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
2299a76d DJ |
9232 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t |
9233 | s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t | |
9234 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
2299a76d DJ |
9235 | s,@EGREP@,$EGREP,;t t |
9236 | s,@LIBOBJS@,$LIBOBJS,;t t | |
9237 | s,@CHECK@,$CHECK,;t t | |
9238 | s,@target_header_dir@,$target_header_dir,;t t | |
9239 | s,@pexecute@,$pexecute,;t t | |
9240 | s,@INSTALL_DEST@,$INSTALL_DEST,;t t | |
9241 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
9242 | /@host_makefile_frag@/r $host_makefile_frag | |
9243 | s,@host_makefile_frag@,,;t t | |
9244 | CEOF | |
9245 | ||
9246 | _ACEOF | |
9247 | ||
9248 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9249 | # Split the substitutions into bite-sized pieces for seds with | |
9250 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9251 | ac_max_sed_lines=48 | |
9252 | ac_sed_frag=1 # Number of current file. | |
9253 | ac_beg=1 # First line for current file. | |
9254 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
9255 | ac_more_lines=: | |
9256 | ac_sed_cmds= | |
9257 | while $ac_more_lines; do | |
9258 | if test $ac_beg -gt 1; then | |
9259 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
9260 | else | |
9261 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
9262 | fi | |
9263 | if test ! -s $tmp/subs.frag; then | |
9264 | ac_more_lines=false | |
9265 | else | |
9266 | # The purpose of the label and of the branching condition is to | |
9267 | # speed up the sed processing (if there are no `@' at all, there | |
9268 | # is no need to browse any of the substitutions). | |
9269 | # These are the two extra sed commands mentioned above. | |
9270 | (echo ':t | |
9271 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
9272 | if test -z "$ac_sed_cmds"; then | |
58670637 | 9273 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
2299a76d | 9274 | else |
58670637 | 9275 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
2299a76d DJ |
9276 | fi |
9277 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
9278 | ac_beg=$ac_end | |
9279 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
9280 | fi | |
9281 | done | |
9282 | if test -z "$ac_sed_cmds"; then | |
9283 | ac_sed_cmds=cat | |
252b5132 | 9284 | fi |
2299a76d | 9285 | fi # test -n "$CONFIG_FILES" |
252b5132 | 9286 | |
2299a76d DJ |
9287 | _ACEOF |
9288 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9289 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
9290 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9291 | case $ac_file in | |
9292 | - | *:- | *:-:* ) # input from stdin | |
58670637 DD |
9293 | cat >$tmp/stdin |
9294 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
9295 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
2299a76d | 9296 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
58670637 | 9297 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
2299a76d | 9298 | * ) ac_file_in=$ac_file.in ;; |
252b5132 RH |
9299 | esac |
9300 | ||
2299a76d DJ |
9301 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
9302 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
9303 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9304 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
9305 | X"$ac_file" : 'X\(//\)$' \| \ | |
9306 | X"$ac_file" : 'X\(/\)' \| \ | |
9307 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9308 | echo X"$ac_file" | |
9309 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9310 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9311 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9312 | /^X\(\/\).*/{ s//\1/; q; } | |
9313 | s/.*/./; q'` | |
9314 | { if $as_mkdir_p; then | |
9315 | mkdir -p "$ac_dir" | |
9316 | else | |
9317 | as_dir="$ac_dir" | |
9318 | as_dirs= | |
9319 | while test ! -d "$as_dir"; do | |
9320 | as_dirs="$as_dir $as_dirs" | |
9321 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
9322 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9323 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
9324 | X"$as_dir" : 'X\(//\)$' \| \ | |
9325 | X"$as_dir" : 'X\(/\)' \| \ | |
9326 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9327 | echo X"$as_dir" | |
9328 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9329 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9330 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9331 | /^X\(\/\).*/{ s//\1/; q; } | |
9332 | s/.*/./; q'` | |
9333 | done | |
9334 | test ! -n "$as_dirs" || mkdir $as_dirs | |
9335 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
9336 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
9337 | { (exit 1); exit 1; }; }; } | |
9338 | ||
9339 | ac_builddir=. | |
252b5132 | 9340 | |
2299a76d DJ |
9341 | if test "$ac_dir" != .; then |
9342 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
9343 | # A "../" for each directory in $ac_dir_suffix. | |
9344 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
9345 | else | |
9346 | ac_dir_suffix= ac_top_builddir= | |
9347 | fi | |
9348 | ||
9349 | case $srcdir in | |
9350 | .) # No --srcdir option. We are building in place. | |
9351 | ac_srcdir=. | |
9352 | if test -z "$ac_top_builddir"; then | |
9353 | ac_top_srcdir=. | |
9354 | else | |
9355 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
9356 | fi ;; | |
9357 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
9358 | ac_srcdir=$srcdir$ac_dir_suffix; | |
9359 | ac_top_srcdir=$srcdir ;; | |
9360 | *) # Relative path. | |
9361 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
9362 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
9363 | esac | |
85f969cd DD |
9364 | |
9365 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
9366 | # the directories may not exist. | |
9367 | case `pwd` in | |
9368 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 9369 | *) |
85f969cd DD |
9370 | case "$ac_dir" in |
9371 | .) ac_abs_builddir=`pwd`;; | |
9372 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
9373 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
9374 | esac;; |
9375 | esac | |
85f969cd | 9376 | case $ac_abs_builddir in |
58670637 DD |
9377 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
9378 | *) | |
9379 | case ${ac_top_builddir}. in | |
85f969cd | 9380 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 9381 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 9382 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
9383 | esac;; |
9384 | esac | |
85f969cd | 9385 | case $ac_abs_builddir in |
58670637 DD |
9386 | .) ac_abs_srcdir=$ac_srcdir;; |
9387 | *) | |
9388 | case $ac_srcdir in | |
85f969cd | 9389 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 9390 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 9391 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
9392 | esac;; |
9393 | esac | |
85f969cd | 9394 | case $ac_abs_builddir in |
58670637 DD |
9395 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
9396 | *) | |
9397 | case $ac_top_srcdir in | |
85f969cd | 9398 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 9399 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 9400 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
9401 | esac;; |
9402 | esac | |
2299a76d DJ |
9403 | |
9404 | ||
9405 | case $INSTALL in | |
9406 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
9407 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | |
252b5132 RH |
9408 | esac |
9409 | ||
2299a76d DJ |
9410 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
9411 | # use $as_me), people would be surprised to read: | |
9412 | # /* config.h. Generated by config.status. */ | |
9413 | if test x"$ac_file" = x-; then | |
9414 | configure_input= | |
9415 | else | |
9416 | configure_input="$ac_file. " | |
9417 | fi | |
9418 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
58670637 | 9419 | sed 's,.*/,,'` by configure." |
2299a76d DJ |
9420 | |
9421 | # First look for the input files in the build tree, otherwise in the | |
9422 | # src tree. | |
9423 | ac_file_inputs=`IFS=: | |
9424 | for f in $ac_file_in; do | |
9425 | case $f in | |
9426 | -) echo $tmp/stdin ;; | |
9427 | [\\/$]*) | |
58670637 DD |
9428 | # Absolute (can't be DOS-style, as IFS=:) |
9429 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9430 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9431 | { (exit 1); exit 1; }; } | |
58670637 | 9432 | echo "$f";; |
2299a76d | 9433 | *) # Relative |
58670637 DD |
9434 | if test -f "$f"; then |
9435 | # Build tree | |
9436 | echo "$f" | |
9437 | elif test -f "$srcdir/$f"; then | |
9438 | # Source tree | |
9439 | echo "$srcdir/$f" | |
9440 | else | |
9441 | # /dev/null tree | |
9442 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9443 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9444 | { (exit 1); exit 1; }; } | |
58670637 | 9445 | fi;; |
2299a76d DJ |
9446 | esac |
9447 | done` || { (exit 1); exit 1; } | |
a4e5c0d8 DD |
9448 | |
9449 | if test x"$ac_file" != x-; then | |
9450 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
9451 | echo "$as_me: creating $ac_file" >&6;} | |
9452 | rm -f "$ac_file" | |
9453 | fi | |
2299a76d DJ |
9454 | _ACEOF |
9455 | cat >>$CONFIG_STATUS <<_ACEOF | |
9456 | sed "$ac_vpsub | |
9457 | $extrasub | |
9458 | _ACEOF | |
9459 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9460 | :t | |
9461 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
9462 | s,@configure_input@,$configure_input,;t t | |
9463 | s,@srcdir@,$ac_srcdir,;t t | |
9464 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
9465 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
9466 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
9467 | s,@builddir@,$ac_builddir,;t t | |
9468 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
9469 | s,@top_builddir@,$ac_top_builddir,;t t | |
9470 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
9471 | s,@INSTALL@,$ac_INSTALL,;t t | |
9472 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
9473 | rm -f $tmp/stdin | |
9474 | if test x"$ac_file" != x-; then | |
9475 | mv $tmp/out $ac_file | |
9476 | else | |
9477 | cat $tmp/out | |
9478 | rm -f $tmp/out | |
9479 | fi | |
9480 | ||
9481 | done | |
9482 | _ACEOF | |
9483 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9484 | ||
9485 | # | |
9486 | # CONFIG_HEADER section. | |
9487 | # | |
252b5132 RH |
9488 | |
9489 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9490 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9491 | # | |
9492 | # ac_d sets the value in "#define NAME VALUE" lines. | |
58670637 DD |
9493 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9494 | ac_dB='[ ].*$,\1#\2' | |
2299a76d DJ |
9495 | ac_dC=' ' |
9496 | ac_dD=',;t' | |
9497 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
58670637 | 9498 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
2299a76d | 9499 | ac_uB='$,\1#\2define\3' |
252b5132 | 9500 | ac_uC=' ' |
2299a76d DJ |
9501 | ac_uD=',;t' |
9502 | ||
9503 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
252b5132 | 9504 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
2299a76d DJ |
9505 | case $ac_file in |
9506 | - | *:- | *:-:* ) # input from stdin | |
58670637 DD |
9507 | cat >$tmp/stdin |
9508 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
9509 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
2299a76d | 9510 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
58670637 | 9511 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
2299a76d | 9512 | * ) ac_file_in=$ac_file.in ;; |
252b5132 RH |
9513 | esac |
9514 | ||
2299a76d DJ |
9515 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
9516 | echo "$as_me: creating $ac_file" >&6;} | |
9517 | ||
9518 | # First look for the input files in the build tree, otherwise in the | |
9519 | # src tree. | |
9520 | ac_file_inputs=`IFS=: | |
9521 | for f in $ac_file_in; do | |
9522 | case $f in | |
9523 | -) echo $tmp/stdin ;; | |
9524 | [\\/$]*) | |
58670637 DD |
9525 | # Absolute (can't be DOS-style, as IFS=:) |
9526 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9527 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9528 | { (exit 1); exit 1; }; } | |
58670637 DD |
9529 | # Do quote $f, to prevent DOS paths from being IFS'd. |
9530 | echo "$f";; | |
2299a76d | 9531 | *) # Relative |
58670637 DD |
9532 | if test -f "$f"; then |
9533 | # Build tree | |
9534 | echo "$f" | |
9535 | elif test -f "$srcdir/$f"; then | |
9536 | # Source tree | |
9537 | echo "$srcdir/$f" | |
9538 | else | |
9539 | # /dev/null tree | |
9540 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
2299a76d DJ |
9541 | echo "$as_me: error: cannot find input file: $f" >&2;} |
9542 | { (exit 1); exit 1; }; } | |
58670637 | 9543 | fi;; |
2299a76d DJ |
9544 | esac |
9545 | done` || { (exit 1); exit 1; } | |
9546 | # Remove the trailing spaces. | |
58670637 | 9547 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
2299a76d DJ |
9548 | |
9549 | _ACEOF | |
9550 | ||
9551 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
9552 | # `conftest.undefs', that substitutes the proper values into | |
9553 | # config.h.in to produce config.h. The first handles `#define' | |
9554 | # templates, and the second `#undef' templates. | |
9555 | # And first: Protect against being on the right side of a sed subst in | |
9556 | # config.status. Protect against being in an unquoted here document | |
9557 | # in config.status. | |
9558 | rm -f conftest.defines conftest.undefs | |
9559 | # Using a here document instead of a string reduces the quoting nightmare. | |
9560 | # Putting comments in sed scripts is not portable. | |
9561 | # | |
9562 | # `end' is used to avoid that the second main sed command (meant for | |
9563 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
9564 | # See the Autoconf documentation for `clear'. | |
9565 | cat >confdef2sed.sed <<\_ACEOF | |
9566 | s/[\\&,]/\\&/g | |
9567 | s,[\\$`],\\&,g | |
9568 | t clear | |
9569 | : clear | |
58670637 | 9570 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
2299a76d | 9571 | t end |
58670637 | 9572 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
2299a76d DJ |
9573 | : end |
9574 | _ACEOF | |
9575 | # If some macros were called several times there might be several times | |
9576 | # the same #defines, which is useless. Nevertheless, we may not want to | |
9577 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
9578 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
9579 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
9580 | rm -f confdef2sed.sed | |
252b5132 RH |
9581 | |
9582 | # This sed command replaces #undef with comments. This is necessary, for | |
9583 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9584 | # on some systems where configure will not decide to define it. | |
2299a76d | 9585 | cat >>conftest.undefs <<\_ACEOF |
58670637 | 9586 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
2299a76d DJ |
9587 | _ACEOF |
9588 | ||
9589 | # Break up conftest.defines because some shells have a limit on the size | |
9590 | # of here documents, and old seds have small limits too (100 cmds). | |
9591 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
58670637 | 9592 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
2299a76d DJ |
9593 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
9594 | echo ' :' >>$CONFIG_STATUS | |
9595 | rm -f conftest.tail | |
9596 | while grep . conftest.defines >/dev/null | |
9597 | do | |
9598 | # Write a limited-size here document to $tmp/defines.sed. | |
9599 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
9600 | # Speed up: don't consider the non `#define' lines. | |
58670637 | 9601 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
2299a76d DJ |
9602 | # Work around the forget-to-reset-the-flag bug. |
9603 | echo 't clr' >>$CONFIG_STATUS | |
9604 | echo ': clr' >>$CONFIG_STATUS | |
9605 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
9606 | echo 'CEOF | |
9607 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
9608 | rm -f $tmp/in | |
9609 | mv $tmp/out $tmp/in | |
9610 | ' >>$CONFIG_STATUS | |
9611 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
9612 | rm -f conftest.defines | |
9613 | mv conftest.tail conftest.defines | |
9614 | done | |
9615 | rm -f conftest.defines | |
9616 | echo ' fi # grep' >>$CONFIG_STATUS | |
9617 | echo >>$CONFIG_STATUS | |
252b5132 | 9618 | |
2299a76d DJ |
9619 | # Break up conftest.undefs because some shells have a limit on the size |
9620 | # of here documents, and old seds have small limits too (100 cmds). | |
9621 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
252b5132 | 9622 | rm -f conftest.tail |
2299a76d | 9623 | while grep . conftest.undefs >/dev/null |
252b5132 | 9624 | do |
2299a76d DJ |
9625 | # Write a limited-size here document to $tmp/undefs.sed. |
9626 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
9627 | # Speed up: don't consider the non `#undef' | |
58670637 | 9628 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
2299a76d DJ |
9629 | # Work around the forget-to-reset-the-flag bug. |
9630 | echo 't clr' >>$CONFIG_STATUS | |
9631 | echo ': clr' >>$CONFIG_STATUS | |
9632 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
252b5132 | 9633 | echo 'CEOF |
2299a76d DJ |
9634 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
9635 | rm -f $tmp/in | |
9636 | mv $tmp/out $tmp/in | |
9637 | ' >>$CONFIG_STATUS | |
9638 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
9639 | rm -f conftest.undefs | |
9640 | mv conftest.tail conftest.undefs | |
9641 | done | |
9642 | rm -f conftest.undefs | |
9643 | ||
9644 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9645 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
9646 | # use $as_me), people would be surprised to read: | |
9647 | # /* config.h. Generated by config.status. */ | |
9648 | if test x"$ac_file" = x-; then | |
9649 | echo "/* Generated by configure. */" >$tmp/config.h | |
252b5132 | 9650 | else |
2299a76d | 9651 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
252b5132 | 9652 | fi |
2299a76d DJ |
9653 | cat $tmp/in >>$tmp/config.h |
9654 | rm -f $tmp/in | |
9655 | if test x"$ac_file" != x-; then | |
9656 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
9657 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
9658 | echo "$as_me: $ac_file is unchanged" >&6;} | |
9659 | else | |
9660 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
9661 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9662 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
9663 | X"$ac_file" : 'X\(//\)$' \| \ | |
9664 | X"$ac_file" : 'X\(/\)' \| \ | |
9665 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9666 | echo X"$ac_file" | |
9667 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9668 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9669 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9670 | /^X\(\/\).*/{ s//\1/; q; } | |
9671 | s/.*/./; q'` | |
9672 | { if $as_mkdir_p; then | |
9673 | mkdir -p "$ac_dir" | |
9674 | else | |
9675 | as_dir="$ac_dir" | |
9676 | as_dirs= | |
9677 | while test ! -d "$as_dir"; do | |
9678 | as_dirs="$as_dir $as_dirs" | |
9679 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
9680 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9681 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
9682 | X"$as_dir" : 'X\(//\)$' \| \ | |
9683 | X"$as_dir" : 'X\(/\)' \| \ | |
9684 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9685 | echo X"$as_dir" | |
9686 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9687 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9688 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9689 | /^X\(\/\).*/{ s//\1/; q; } | |
9690 | s/.*/./; q'` | |
9691 | done | |
9692 | test ! -n "$as_dirs" || mkdir $as_dirs | |
9693 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
9694 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
9695 | { (exit 1); exit 1; }; }; } | |
252b5132 | 9696 | |
2299a76d DJ |
9697 | rm -f $ac_file |
9698 | mv $tmp/config.h $ac_file | |
9699 | fi | |
9700 | else | |
9701 | cat $tmp/config.h | |
9702 | rm -f $tmp/config.h | |
9703 | fi | |
9704 | done | |
9705 | _ACEOF | |
9706 | cat >>$CONFIG_STATUS <<\_ACEOF | |
252b5132 | 9707 | |
2299a76d DJ |
9708 | # |
9709 | # CONFIG_COMMANDS section. | |
9710 | # | |
9711 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
9712 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
9713 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
9714 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
9715 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
58670637 DD |
9716 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
9717 | X"$ac_dest" : 'X\(//\)$' \| \ | |
9718 | X"$ac_dest" : 'X\(/\)' \| \ | |
9719 | . : '\(.\)' 2>/dev/null || | |
2299a76d DJ |
9720 | echo X"$ac_dest" | |
9721 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9722 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9723 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9724 | /^X\(\/\).*/{ s//\1/; q; } | |
9725 | s/.*/./; q'` | |
58670637 DD |
9726 | { if $as_mkdir_p; then |
9727 | mkdir -p "$ac_dir" | |
9728 | else | |
9729 | as_dir="$ac_dir" | |
9730 | as_dirs= | |
9731 | while test ! -d "$as_dir"; do | |
9732 | as_dirs="$as_dir $as_dirs" | |
9733 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
9734 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
9735 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
9736 | X"$as_dir" : 'X\(//\)$' \| \ | |
9737 | X"$as_dir" : 'X\(/\)' \| \ | |
9738 | . : '\(.\)' 2>/dev/null || | |
9739 | echo X"$as_dir" | | |
9740 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
9741 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
9742 | /^X\(\/\/\)$/{ s//\1/; q; } | |
9743 | /^X\(\/\).*/{ s//\1/; q; } | |
9744 | s/.*/./; q'` | |
9745 | done | |
9746 | test ! -n "$as_dirs" || mkdir $as_dirs | |
9747 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
9748 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
9749 | { (exit 1); exit 1; }; }; } | |
9750 | ||
2299a76d DJ |
9751 | ac_builddir=. |
9752 | ||
9753 | if test "$ac_dir" != .; then | |
9754 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
9755 | # A "../" for each directory in $ac_dir_suffix. | |
9756 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
9757 | else | |
9758 | ac_dir_suffix= ac_top_builddir= | |
9759 | fi | |
9760 | ||
9761 | case $srcdir in | |
9762 | .) # No --srcdir option. We are building in place. | |
9763 | ac_srcdir=. | |
9764 | if test -z "$ac_top_builddir"; then | |
9765 | ac_top_srcdir=. | |
9766 | else | |
9767 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
9768 | fi ;; | |
9769 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
9770 | ac_srcdir=$srcdir$ac_dir_suffix; | |
9771 | ac_top_srcdir=$srcdir ;; | |
9772 | *) # Relative path. | |
9773 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
9774 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
9775 | esac | |
85f969cd DD |
9776 | |
9777 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
9778 | # the directories may not exist. | |
9779 | case `pwd` in | |
9780 | .) ac_abs_builddir="$ac_dir";; | |
58670637 | 9781 | *) |
85f969cd DD |
9782 | case "$ac_dir" in |
9783 | .) ac_abs_builddir=`pwd`;; | |
9784 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
9785 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
58670637 DD |
9786 | esac;; |
9787 | esac | |
85f969cd | 9788 | case $ac_abs_builddir in |
58670637 DD |
9789 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
9790 | *) | |
9791 | case ${ac_top_builddir}. in | |
85f969cd | 9792 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
58670637 | 9793 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
85f969cd | 9794 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
58670637 DD |
9795 | esac;; |
9796 | esac | |
85f969cd | 9797 | case $ac_abs_builddir in |
58670637 DD |
9798 | .) ac_abs_srcdir=$ac_srcdir;; |
9799 | *) | |
9800 | case $ac_srcdir in | |
85f969cd | 9801 | .) ac_abs_srcdir=$ac_abs_builddir;; |
58670637 | 9802 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
85f969cd | 9803 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
58670637 DD |
9804 | esac;; |
9805 | esac | |
85f969cd | 9806 | case $ac_abs_builddir in |
58670637 DD |
9807 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
9808 | *) | |
9809 | case $ac_top_srcdir in | |
85f969cd | 9810 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
58670637 | 9811 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
85f969cd | 9812 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
58670637 DD |
9813 | esac;; |
9814 | esac | |
2299a76d DJ |
9815 | |
9816 | ||
9817 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
9818 | echo "$as_me: executing $ac_dest commands" >&6;} | |
9819 | case $ac_dest in | |
9820 | default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
252b5132 | 9821 | if test -n "$CONFIG_FILES"; then |
c7efc4d5 | 9822 | if test -n "${with_target_subdir}"; then |
252b5132 RH |
9823 | # FIXME: We shouldn't need to set ac_file |
9824 | ac_file=Makefile | |
52d98c2d | 9825 | LD="${ORIGINAL_LD_FOR_MULTILIBS}" |
252b5132 RH |
9826 | . ${libiberty_topdir}/config-ml.in |
9827 | fi | |
2299a76d DJ |
9828 | fi ;; |
9829 | esac | |
9830 | done | |
9831 | _ACEOF | |
9832 | ||
9833 | cat >>$CONFIG_STATUS <<\_ACEOF | |
9834 | ||
9835 | { (exit 0); exit 0; } | |
9836 | _ACEOF | |
252b5132 | 9837 | chmod +x $CONFIG_STATUS |
2299a76d DJ |
9838 | ac_clean_files=$ac_clean_files_save |
9839 | ||
9840 | ||
9841 | # configure is writing to config.log, and then calls config.status. | |
9842 | # config.status does its own redirection, appending to config.log. | |
9843 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
9844 | # by configure, so config.status won't be able to write to it; its | |
9845 | # output is simply discarded. So we exec the FD to /dev/null, | |
9846 | # effectively closing config.log, so it can be properly (re)opened and | |
9847 | # appended to by config.status. When coming back to configure, we | |
9848 | # need to make the FD available again. | |
9849 | if test "$no_create" != yes; then | |
9850 | ac_cs_success=: | |
9851 | ac_config_status_args= | |
9852 | test "$silent" = yes && | |
9853 | ac_config_status_args="$ac_config_status_args --quiet" | |
9854 | exec 5>/dev/null | |
9855 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
9856 | exec 5>>config.log | |
9857 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
9858 | # would make configure fail if this is the last instruction. | |
9859 | $ac_cs_success || { (exit 1); exit 1; } | |
9860 | fi | |
252b5132 | 9861 |