]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
5213506e RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
861bb6c1 JL |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
5213506e RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
ba479fd2 | 14 | |
5213506e RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
ba479fd2 NN |
18 | emulate sh |
19 | NULLCMD=: | |
5213506e | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
ba479fd2 NN |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
ba479fd2 NN |
31 | fi |
32 | ||
5213506e RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
ba479fd2 NN |
79 | fi |
80 | ||
81 | ||
5213506e RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
ba479fd2 NN |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
5213506e RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
43e02a8a RW |
172 | test \$(( 1 + 1 )) = 2 || exit 1 |
173 | ||
174 | test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( | |
175 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
176 | ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO | |
177 | ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO | |
178 | PATH=/empty FPATH=/empty; export PATH FPATH | |
179 | test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ | |
180 | || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" | |
5213506e RW |
181 | if (eval "$as_required") 2>/dev/null; then : |
182 | as_have_required=yes | |
183 | else | |
184 | as_have_required=no | |
185 | fi | |
186 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
187 | ||
188 | else | |
189 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
190 | as_found=false | |
191 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
ba479fd2 | 192 | do |
5213506e RW |
193 | IFS=$as_save_IFS |
194 | test -z "$as_dir" && as_dir=. | |
195 | as_found=: | |
196 | case $as_dir in #( | |
197 | /*) | |
198 | for as_base in sh bash ksh sh5; do | |
199 | # Try only shells that exist, to save several forks. | |
200 | as_shell=$as_dir/$as_base | |
201 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
202 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
203 | CONFIG_SHELL=$as_shell as_have_required=yes | |
204 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
205 | break 2 | |
206 | fi | |
207 | fi | |
208 | done;; | |
209 | esac | |
210 | as_found=false | |
211 | done | |
212 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
213 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
214 | CONFIG_SHELL=$SHELL as_have_required=yes | |
215 | fi; } | |
216 | IFS=$as_save_IFS | |
217 | ||
218 | ||
219 | if test "x$CONFIG_SHELL" != x; then : | |
220 | # We cannot yet assume a decent shell, so we have to provide a | |
221 | # neutralization value for shells without unset; and this also | |
222 | # works around shells that cannot unset nonexistent variables. | |
223 | BASH_ENV=/dev/null | |
224 | ENV=/dev/null | |
225 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
226 | export CONFIG_SHELL | |
227 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
228 | fi | |
229 | ||
230 | if test x$as_have_required = xno; then : | |
231 | $as_echo "$0: This script requires a shell more modern than all" | |
232 | $as_echo "$0: the shells that I found on your system." | |
233 | if test x${ZSH_VERSION+set} = xset ; then | |
234 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
235 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
ba479fd2 | 236 | else |
5213506e RW |
237 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
238 | $0: including any error possibly output before this | |
239 | $0: message. Then install a modern shell, or manually run | |
240 | $0: the script under such a shell if you do have one." | |
ba479fd2 | 241 | fi |
5213506e RW |
242 | exit 1 |
243 | fi | |
244 | fi | |
245 | fi | |
246 | SHELL=${CONFIG_SHELL-/bin/sh} | |
247 | export SHELL | |
248 | # Unset more variables known to interfere with behavior of common tools. | |
249 | CLICOLOR_FORCE= GREP_OPTIONS= | |
250 | unset CLICOLOR_FORCE GREP_OPTIONS | |
251 | ||
252 | ## --------------------- ## | |
253 | ## M4sh Shell Functions. ## | |
254 | ## --------------------- ## | |
255 | # as_fn_unset VAR | |
256 | # --------------- | |
257 | # Portably unset VAR. | |
258 | as_fn_unset () | |
259 | { | |
260 | { eval $1=; unset $1;} | |
261 | } | |
262 | as_unset=as_fn_unset | |
263 | ||
264 | # as_fn_set_status STATUS | |
265 | # ----------------------- | |
266 | # Set $? to STATUS, without forking. | |
267 | as_fn_set_status () | |
268 | { | |
269 | return $1 | |
270 | } # as_fn_set_status | |
271 | ||
272 | # as_fn_exit STATUS | |
273 | # ----------------- | |
274 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
275 | as_fn_exit () | |
276 | { | |
277 | set +e | |
278 | as_fn_set_status $1 | |
279 | exit $1 | |
280 | } # as_fn_exit | |
281 | ||
282 | # as_fn_mkdir_p | |
283 | # ------------- | |
284 | # Create "$as_dir" as a directory, including parents if necessary. | |
285 | as_fn_mkdir_p () | |
286 | { | |
287 | ||
288 | case $as_dir in #( | |
289 | -*) as_dir=./$as_dir;; | |
290 | esac | |
291 | test -d "$as_dir" || eval $as_mkdir_p || { | |
292 | as_dirs= | |
293 | while :; do | |
294 | case $as_dir in #( | |
295 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
296 | *) as_qdir=$as_dir;; | |
297 | esac | |
298 | as_dirs="'$as_qdir' $as_dirs" | |
299 | as_dir=`$as_dirname -- "$as_dir" || | |
300 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
301 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
302 | X"$as_dir" : 'X\(//\)$' \| \ | |
303 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
304 | $as_echo X"$as_dir" | | |
305 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\/\)[^/].*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | /^X\(\/\/\)$/{ | |
314 | s//\1/ | |
315 | q | |
316 | } | |
317 | /^X\(\/\).*/{ | |
318 | s//\1/ | |
319 | q | |
320 | } | |
321 | s/.*/./; q'` | |
322 | test -d "$as_dir" && break | |
323 | done | |
324 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
325 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
326 | ||
327 | ||
328 | } # as_fn_mkdir_p | |
329 | # as_fn_append VAR VALUE | |
330 | # ---------------------- | |
331 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
332 | # advantage of any shell optimizations that allow amortized linear growth over | |
333 | # repeated appends, instead of the typical quadratic growth present in naive | |
334 | # implementations. | |
335 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
336 | eval 'as_fn_append () | |
337 | { | |
338 | eval $1+=\$2 | |
339 | }' | |
340 | else | |
341 | as_fn_append () | |
342 | { | |
343 | eval $1=\$$1\$2 | |
344 | } | |
345 | fi # as_fn_append | |
346 | ||
347 | # as_fn_arith ARG... | |
348 | # ------------------ | |
349 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
350 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
351 | # must be portable across $(()) and expr. | |
352 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
353 | eval 'as_fn_arith () | |
354 | { | |
355 | as_val=$(( $* )) | |
356 | }' | |
357 | else | |
358 | as_fn_arith () | |
359 | { | |
360 | as_val=`expr "$@" || test $? -eq 1` | |
361 | } | |
362 | fi # as_fn_arith | |
363 | ||
ba479fd2 | 364 | |
5213506e RW |
365 | # as_fn_error ERROR [LINENO LOG_FD] |
366 | # --------------------------------- | |
367 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
368 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
369 | # script with status $?, using 1 if that was 0. | |
370 | as_fn_error () | |
371 | { | |
372 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
373 | if test "$3"; then | |
374 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
375 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
376 | fi | |
377 | $as_echo "$as_me: error: $1" >&2 | |
378 | as_fn_exit $as_status | |
379 | } # as_fn_error | |
380 | ||
381 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
382 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
383 | as_expr=expr |
384 | else | |
385 | as_expr=false | |
386 | fi | |
387 | ||
5213506e | 388 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
ba479fd2 NN |
389 | as_basename=basename |
390 | else | |
391 | as_basename=false | |
392 | fi | |
393 | ||
5213506e RW |
394 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
395 | as_dirname=dirname | |
396 | else | |
397 | as_dirname=false | |
398 | fi | |
ba479fd2 | 399 | |
5213506e | 400 | as_me=`$as_basename -- "$0" || |
ba479fd2 NN |
401 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
402 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
403 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
404 | $as_echo X/"$0" | | |
405 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | /^X\/\(\/\/\)$/{ | |
410 | s//\1/ | |
411 | q | |
412 | } | |
413 | /^X\/\(\/\).*/{ | |
414 | s//\1/ | |
415 | q | |
416 | } | |
417 | s/.*/./; q'` | |
ab22c1fa | 418 | |
b61ff9c8 BS |
419 | # Avoid depending upon Character Ranges. |
420 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
421 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
422 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
423 | as_cr_digits='0123456789' | |
424 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
1a4b763e | 425 | |
ba479fd2 | 426 | |
5213506e RW |
427 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
428 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
429 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
430 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
431 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
432 | sed -n ' | |
433 | p | |
434 | /[$]LINENO/= | |
435 | ' <$as_myself | | |
ba479fd2 | 436 | sed ' |
5213506e RW |
437 | s/[$]LINENO.*/&-/ |
438 | t lineno | |
439 | b | |
440 | :lineno | |
ba479fd2 | 441 | N |
5213506e RW |
442 | :loop |
443 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 444 | t loop |
5213506e | 445 | s/-\n.*// |
ba479fd2 | 446 | ' >$as_me.lineno && |
5213506e RW |
447 | chmod +x "$as_me.lineno" || |
448 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
ba479fd2 NN |
449 | |
450 | # Don't try to exec as it changes $[0], causing all sort of problems | |
451 | # (the dirname of $[0] is not the place where we might find the | |
5213506e RW |
452 | # original and so on. Autoconf is especially sensitive to this). |
453 | . "./$as_me.lineno" | |
ba479fd2 NN |
454 | # Exit status is that of the last command. |
455 | exit | |
456 | } | |
457 | ||
5213506e RW |
458 | ECHO_C= ECHO_N= ECHO_T= |
459 | case `echo -n x` in #((((( | |
460 | -n*) | |
461 | case `echo 'xy\c'` in | |
462 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
463 | xy) ECHO_C='\c';; | |
464 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
465 | ECHO_T=' ';; | |
466 | esac;; | |
467 | *) | |
468 | ECHO_N='-n';; | |
ba479fd2 NN |
469 | esac |
470 | ||
5213506e RW |
471 | rm -f conf$$ conf$$.exe conf$$.file |
472 | if test -d conf$$.dir; then | |
473 | rm -f conf$$.dir/conf$$.file | |
ba479fd2 | 474 | else |
5213506e RW |
475 | rm -f conf$$.dir |
476 | mkdir conf$$.dir 2>/dev/null | |
ba479fd2 | 477 | fi |
5213506e RW |
478 | if (echo >conf$$.file) 2>/dev/null; then |
479 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b61ff9c8 | 480 | as_ln_s='ln -s' |
5213506e RW |
481 | # ... but there are two gotchas: |
482 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
483 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
484 | # In both cases, we have to default to `cp -p'. | |
485 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
486 | as_ln_s='cp -p' | |
487 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
488 | as_ln_s=ln | |
489 | else | |
490 | as_ln_s='cp -p' | |
b61ff9c8 | 491 | fi |
ba479fd2 NN |
492 | else |
493 | as_ln_s='cp -p' | |
494 | fi | |
5213506e RW |
495 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
496 | rmdir conf$$.dir 2>/dev/null | |
861bb6c1 | 497 | |
ba479fd2 | 498 | if mkdir -p . 2>/dev/null; then |
5213506e | 499 | as_mkdir_p='mkdir -p "$as_dir"' |
ba479fd2 | 500 | else |
86da66b5 | 501 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
502 | as_mkdir_p=false |
503 | fi | |
504 | ||
5213506e RW |
505 | if test -x / >/dev/null 2>&1; then |
506 | as_test_x='test -x' | |
507 | else | |
508 | if ls -dL / >/dev/null 2>&1; then | |
509 | as_ls_L_option=L | |
510 | else | |
511 | as_ls_L_option= | |
512 | fi | |
513 | as_test_x=' | |
514 | eval sh -c '\'' | |
515 | if test -d "$1"; then | |
516 | test -d "$1/."; | |
517 | else | |
518 | case $1 in #( | |
519 | -*)set "./$1";; | |
520 | esac; | |
521 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
522 | ???[sx]*):;;*)false;;esac;fi | |
523 | '\'' sh | |
524 | ' | |
525 | fi | |
526 | as_executable_p=$as_test_x | |
ba479fd2 NN |
527 | |
528 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 529 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
530 | |
531 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 532 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 | 533 | |
da0f6381 PB |
534 | SHELL=${CONFIG_SHELL-/bin/sh} |
535 | ||
da0f6381 | 536 | |
5213506e RW |
537 | exec 7<&0 </dev/null 6>&1 |
538 | ||
ba479fd2 NN |
539 | # Name of the host. |
540 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
541 | # so uname gets run too. | |
542 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
543 | ||
ba479fd2 NN |
544 | # |
545 | # Initializations. | |
546 | # | |
861bb6c1 | 547 | ac_default_prefix=/usr/local |
5213506e | 548 | ac_clean_files= |
ba479fd2 | 549 | ac_config_libobj_dir=. |
5213506e | 550 | LIBOBJS= |
ba479fd2 NN |
551 | cross_compiling=no |
552 | subdirs= | |
553 | MFLAGS= | |
554 | MAKEFLAGS= | |
b61ff9c8 | 555 | |
ba479fd2 NN |
556 | # Identity of this package. |
557 | PACKAGE_NAME= | |
558 | PACKAGE_TARNAME= | |
559 | PACKAGE_VERSION= | |
560 | PACKAGE_STRING= | |
561 | PACKAGE_BUGREPORT= | |
5213506e | 562 | PACKAGE_URL= |
ba479fd2 NN |
563 | |
564 | ac_unique_file="tree.c" | |
565 | # Factoring default headers for most tests. | |
566 | ac_includes_default="\ | |
567 | #include <stdio.h> | |
5213506e | 568 | #ifdef HAVE_SYS_TYPES_H |
ba479fd2 NN |
569 | # include <sys/types.h> |
570 | #endif | |
5213506e | 571 | #ifdef HAVE_SYS_STAT_H |
ba479fd2 NN |
572 | # include <sys/stat.h> |
573 | #endif | |
5213506e | 574 | #ifdef STDC_HEADERS |
ba479fd2 NN |
575 | # include <stdlib.h> |
576 | # include <stddef.h> | |
577 | #else | |
5213506e | 578 | # ifdef HAVE_STDLIB_H |
ba479fd2 NN |
579 | # include <stdlib.h> |
580 | # endif | |
581 | #endif | |
5213506e RW |
582 | #ifdef HAVE_STRING_H |
583 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
ba479fd2 NN |
584 | # include <memory.h> |
585 | # endif | |
586 | # include <string.h> | |
587 | #endif | |
5213506e | 588 | #ifdef HAVE_STRINGS_H |
ba479fd2 NN |
589 | # include <strings.h> |
590 | #endif | |
5213506e | 591 | #ifdef HAVE_INTTYPES_H |
ba479fd2 | 592 | # include <inttypes.h> |
ba479fd2 | 593 | #endif |
5213506e RW |
594 | #ifdef HAVE_STDINT_H |
595 | # include <stdint.h> | |
596 | #endif | |
597 | #ifdef HAVE_UNISTD_H | |
ba479fd2 NN |
598 | # include <unistd.h> |
599 | #endif" | |
600 | ||
5213506e RW |
601 | ac_subst_vars='LTLIBOBJS |
602 | LIBOBJS | |
603 | enable_plugin | |
604 | pluginlibs | |
d7f09764 DN |
605 | LIBELFINC |
606 | LIBELFLIBS | |
5213506e RW |
607 | CLOOGINC |
608 | CLOOGLIBS | |
609 | PPLINC | |
610 | PPLLIBS | |
611 | GMPINC | |
612 | GMPLIBS | |
613 | target_cpu_default | |
614 | fortran_target_objs | |
615 | cxx_target_objs | |
616 | c_target_objs | |
617 | use_gcc_stdint | |
618 | xm_defines | |
619 | xm_include_list | |
620 | xm_file_list | |
621 | tm_p_include_list | |
622 | tm_p_file_list | |
623 | tm_defines | |
624 | tm_include_list | |
625 | tm_file_list | |
626 | thread_file | |
627 | out_object_file | |
628 | out_file | |
629 | objc_boehm_gc | |
630 | md_file | |
631 | local_prefix | |
632 | lang_tree_files | |
633 | lang_specs_files | |
634 | lang_opt_files | |
635 | install | |
636 | out_host_hook_obj | |
637 | host_xm_defines | |
638 | host_xm_include_list | |
639 | host_xm_file_list | |
640 | host_exeext | |
641 | gcc_gxx_include_dir | |
642 | gcc_config_arguments | |
643 | float_h_file | |
644 | extra_programs | |
645 | extra_passes | |
646 | extra_parts | |
647 | extra_objs | |
648 | extra_headers_list | |
649 | extra_gcc_objs | |
650 | TM_MULTILIB_EXCEPTIONS_CONFIG | |
651 | TM_MULTILIB_CONFIG | |
652 | TM_ENDIAN_CONFIG | |
653 | tmake_file | |
654 | xmake_file | |
655 | cpp_install_dir | |
656 | check_languages | |
657 | build_file_translate | |
658 | build_xm_defines | |
659 | build_xm_include_list | |
660 | build_xm_file_list | |
661 | build_install_headers_dir | |
662 | build_exeext | |
663 | all_selected_languages | |
664 | all_languages | |
665 | all_lang_makefiles | |
666 | all_lang_makefrags | |
667 | all_gtfiles | |
668 | all_compilers | |
669 | srcdir | |
670 | subdirs | |
671 | slibdir | |
672 | dollar | |
673 | gcc_tooldir | |
3bec79c5 DK |
674 | LTO_USE_LIBELF |
675 | LTO_BINARY_READER | |
d7f09764 | 676 | enable_lto |
5213506e RW |
677 | MAINT |
678 | zlibinc | |
679 | zlibdir | |
680 | HOST_LIBS | |
681 | GGC | |
682 | libgcc_visibility | |
683 | gcc_cv_readelf | |
684 | gcc_cv_objdump | |
685 | ORIGINAL_NM_FOR_TARGET | |
686 | gcc_cv_nm | |
687 | ORIGINAL_LD_FOR_TARGET | |
5938f74d | 688 | ORIGINAL_PLUGIN_LD_FOR_TARGET |
5213506e RW |
689 | gcc_cv_ld |
690 | ORIGINAL_AS_FOR_TARGET | |
691 | gcc_cv_as | |
692 | enable_fast_install | |
693 | objdir | |
694 | CXXCPP | |
695 | OTOOL64 | |
696 | OTOOL | |
697 | LIPO | |
698 | NMEDIT | |
699 | DSYMUTIL | |
5213506e RW |
700 | STRIP |
701 | OBJDUMP | |
702 | ac_ct_DUMPBIN | |
703 | DUMPBIN | |
704 | LD | |
705 | FGREP | |
706 | SED | |
707 | LIBTOOL | |
708 | collect2 | |
709 | STMP_FIXINC | |
710 | BUILD_LDFLAGS | |
711 | BUILD_CFLAGS | |
712 | CC_FOR_BUILD | |
713 | inhibit_libc | |
714 | SYSTEM_HEADER_DIR | |
715 | ALL | |
716 | CROSS | |
717 | CATOBJEXT | |
718 | GENCAT | |
719 | INSTOBJEXT | |
720 | DATADIRNAME | |
721 | CATALOGS | |
722 | POSUB | |
723 | GMSGFMT | |
724 | XGETTEXT | |
725 | INCINTL | |
726 | LIBINTL_DEP | |
727 | LIBINTL | |
728 | USE_NLS | |
729 | extra_opt_files | |
730 | extra_modes_file | |
731 | gthread_flags | |
732 | objext | |
733 | manext | |
734 | LIBICONV_DEP | |
735 | LTLIBICONV | |
736 | LIBICONV | |
737 | LDEXP_LIB | |
738 | GNAT_LIBEXC | |
739 | COLLECT2_LIBS | |
740 | AR | |
741 | NM | |
742 | BISON | |
743 | FLEX | |
744 | GENERATED_MANPAGES | |
745 | BUILD_INFO | |
746 | MAKEINFO | |
747 | have_mktemp_command | |
748 | make_compare_target | |
749 | INSTALL_DATA | |
750 | INSTALL_PROGRAM | |
751 | INSTALL | |
752 | ranlib_flags | |
753 | RANLIB | |
754 | LN | |
755 | LN_S | |
756 | AWK | |
757 | SET_MAKE | |
758 | REPORT_BUGS_TEXI | |
759 | REPORT_BUGS_TO | |
760 | PKGVERSION | |
761 | onestep | |
e11ddaf5 | 762 | CONFIGURE_SPECS |
5213506e RW |
763 | CROSS_SYSTEM_HEADER_DIR |
764 | TARGET_SYSTEM_ROOT_DEFINE | |
765 | TARGET_SYSTEM_ROOT | |
766 | enable_shared | |
767 | enable_fixed_point | |
768 | enable_decimal_float | |
769 | enable_multilib | |
770 | ENABLE_BUILD_WITH_CXX | |
771 | coverage_flags | |
772 | valgrind_command | |
773 | valgrind_path_defines | |
774 | valgrind_path | |
775 | TREEBROWSER | |
776 | nocommon_flag | |
777 | warn_cxxflags | |
778 | warn_cflags | |
779 | c_strict_warn | |
780 | strict_warn | |
781 | c_loose_warn | |
782 | loose_warn | |
783 | EGREP | |
784 | GREP | |
785 | CPP | |
786 | OUTPUT_OPTION | |
787 | NO_MINUS_C_MINUS_O | |
788 | GNATMAKE | |
789 | GNATBIND | |
790 | ac_ct_CXX | |
791 | CXXFLAGS | |
792 | CXX | |
793 | OBJEXT | |
794 | EXEEXT | |
795 | ac_ct_CC | |
796 | CPPFLAGS | |
797 | LDFLAGS | |
798 | CFLAGS | |
799 | CC | |
800 | GENINSRC | |
801 | target_subdir | |
802 | host_subdir | |
803 | build_subdir | |
804 | build_libsubdir | |
805 | target_noncanonical | |
806 | target_os | |
807 | target_vendor | |
808 | target_cpu | |
809 | target | |
810 | host_os | |
811 | host_vendor | |
812 | host_cpu | |
813 | host | |
814 | build_os | |
815 | build_vendor | |
816 | build_cpu | |
817 | build | |
818 | target_alias | |
819 | host_alias | |
820 | build_alias | |
821 | LIBS | |
822 | ECHO_T | |
823 | ECHO_N | |
824 | ECHO_C | |
825 | DEFS | |
826 | mandir | |
827 | localedir | |
828 | libdir | |
829 | psdir | |
830 | pdfdir | |
831 | dvidir | |
832 | htmldir | |
833 | infodir | |
834 | docdir | |
835 | oldincludedir | |
836 | includedir | |
837 | localstatedir | |
838 | sharedstatedir | |
839 | sysconfdir | |
840 | datadir | |
841 | datarootdir | |
842 | libexecdir | |
843 | sbindir | |
844 | bindir | |
845 | program_transform_name | |
846 | prefix | |
847 | exec_prefix | |
848 | PACKAGE_URL | |
849 | PACKAGE_BUGREPORT | |
850 | PACKAGE_STRING | |
851 | PACKAGE_VERSION | |
852 | PACKAGE_TARNAME | |
853 | PACKAGE_NAME | |
854 | PATH_SEPARATOR | |
855 | SHELL' | |
ba479fd2 | 856 | ac_subst_files='language_hooks' |
5213506e RW |
857 | ac_user_opts=' |
858 | enable_option_checking | |
859 | with_build_libsubdir | |
860 | with_local_prefix | |
861 | with_gxx_include_dir | |
862 | with_cpp_install_dir | |
863 | enable_generated_files_in_srcdir | |
864 | with_gnu_ld | |
865 | with_ld | |
866 | with_demangler_in_ld | |
867 | with_gnu_as | |
868 | with_as | |
869 | enable_werror_always | |
870 | enable_checking | |
871 | enable_coverage | |
872 | enable_gather_detailed_mem_stats | |
873 | enable_build_with_cxx | |
874 | with_stabs | |
875 | enable_multilib | |
876 | enable___cxa_atexit | |
877 | enable_decimal_float | |
878 | enable_fixed_point | |
879 | enable_threads | |
880 | enable_tls | |
881 | enable_objc_gc | |
882 | with_dwarf2 | |
883 | enable_shared | |
884 | with_build_sysroot | |
885 | with_sysroot | |
e11ddaf5 | 886 | with_specs |
5213506e RW |
887 | enable_intermodule |
888 | with_pkgversion | |
889 | with_bugurl | |
890 | enable_languages | |
891 | with_multilib_list | |
892 | enable_rpath | |
893 | with_libiconv_prefix | |
894 | enable_initfini_array | |
895 | enable_sjlj_exceptions | |
896 | with_system_libunwind | |
897 | enable_secureplt | |
ad211091 | 898 | enable_leading_mingw64_underscores |
5213506e RW |
899 | enable_cld |
900 | enable_win32_registry | |
901 | enable_static | |
902 | with_pic | |
903 | enable_fast_install | |
904 | enable_libtool_lock | |
5938f74d | 905 | with_plugin_ld |
55c4f715 | 906 | enable_comdat |
5213506e RW |
907 | enable_gnu_unique_object |
908 | enable_linker_build_id | |
909 | with_long_double_128 | |
910 | with_gc | |
911 | with_system_zlib | |
912 | enable_maintainer_mode | |
913 | enable_version_specific_runtime_libs | |
914 | with_slibdir | |
5213506e RW |
915 | enable_plugin |
916 | ' | |
917 | ac_precious_vars='build_alias | |
918 | host_alias | |
919 | target_alias | |
920 | CC | |
921 | CFLAGS | |
922 | LDFLAGS | |
923 | LIBS | |
924 | CPPFLAGS | |
925 | CXX | |
926 | CXXFLAGS | |
927 | CCC | |
928 | CPP | |
929 | CXXCPP | |
930 | GMPLIBS | |
931 | GMPINC | |
932 | PPLLIBS | |
933 | PPLINC | |
934 | CLOOGLIBS | |
d7f09764 DN |
935 | CLOOGINC |
936 | LIBELFLIBS | |
937 | LIBELFINC' | |
5213506e | 938 | |
861bb6c1 JL |
939 | |
940 | # Initialize some variables set by options. | |
ba479fd2 NN |
941 | ac_init_help= |
942 | ac_init_version=false | |
5213506e RW |
943 | ac_unrecognized_opts= |
944 | ac_unrecognized_sep= | |
861bb6c1 JL |
945 | # The variables have the same names as the options, with |
946 | # dashes changed to underlines. | |
ba479fd2 | 947 | cache_file=/dev/null |
861bb6c1 | 948 | exec_prefix=NONE |
861bb6c1 | 949 | no_create= |
861bb6c1 JL |
950 | no_recursion= |
951 | prefix=NONE | |
952 | program_prefix=NONE | |
953 | program_suffix=NONE | |
954 | program_transform_name=s,x,x, | |
955 | silent= | |
956 | site= | |
957 | srcdir= | |
861bb6c1 JL |
958 | verbose= |
959 | x_includes=NONE | |
960 | x_libraries=NONE | |
ba479fd2 NN |
961 | |
962 | # Installation directory options. | |
963 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
964 | # and all the variables that are supposed to be based on exec_prefix | |
965 | # by default will actually change. | |
966 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
5213506e | 967 | # (The list follows the same order as the GNU Coding Standards.) |
861bb6c1 JL |
968 | bindir='${exec_prefix}/bin' |
969 | sbindir='${exec_prefix}/sbin' | |
970 | libexecdir='${exec_prefix}/libexec' | |
5213506e RW |
971 | datarootdir='${prefix}/share' |
972 | datadir='${datarootdir}' | |
861bb6c1 JL |
973 | sysconfdir='${prefix}/etc' |
974 | sharedstatedir='${prefix}/com' | |
975 | localstatedir='${prefix}/var' | |
861bb6c1 JL |
976 | includedir='${prefix}/include' |
977 | oldincludedir='/usr/include' | |
5213506e RW |
978 | docdir='${datarootdir}/doc/${PACKAGE}' |
979 | infodir='${datarootdir}/info' | |
980 | htmldir='${docdir}' | |
981 | dvidir='${docdir}' | |
982 | pdfdir='${docdir}' | |
983 | psdir='${docdir}' | |
984 | libdir='${exec_prefix}/lib' | |
985 | localedir='${datarootdir}/locale' | |
986 | mandir='${datarootdir}/man' | |
861bb6c1 | 987 | |
861bb6c1 | 988 | ac_prev= |
5213506e | 989 | ac_dashdash= |
861bb6c1 JL |
990 | for ac_option |
991 | do | |
861bb6c1 JL |
992 | # If the previous option needs an argument, assign it. |
993 | if test -n "$ac_prev"; then | |
5213506e | 994 | eval $ac_prev=\$ac_option |
861bb6c1 JL |
995 | ac_prev= |
996 | continue | |
997 | fi | |
998 | ||
5213506e RW |
999 | case $ac_option in |
1000 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1001 | *) ac_optarg=yes ;; | |
1002 | esac | |
861bb6c1 JL |
1003 | |
1004 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1005 | ||
5213506e RW |
1006 | case $ac_dashdash$ac_option in |
1007 | --) | |
1008 | ac_dashdash=yes ;; | |
861bb6c1 JL |
1009 | |
1010 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1011 | ac_prev=bindir ;; | |
1012 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 1013 | bindir=$ac_optarg ;; |
861bb6c1 JL |
1014 | |
1015 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 1016 | ac_prev=build_alias ;; |
861bb6c1 | 1017 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 1018 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
1019 | |
1020 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1021 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1022 | ac_prev=cache_file ;; | |
1023 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1024 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
1025 | cache_file=$ac_optarg ;; |
1026 | ||
1027 | --config-cache | -C) | |
1028 | cache_file=config.cache ;; | |
861bb6c1 | 1029 | |
5213506e | 1030 | -datadir | --datadir | --datadi | --datad) |
861bb6c1 | 1031 | ac_prev=datadir ;; |
5213506e | 1032 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
ba479fd2 | 1033 | datadir=$ac_optarg ;; |
861bb6c1 | 1034 | |
5213506e RW |
1035 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1036 | | --dataroo | --dataro | --datar) | |
1037 | ac_prev=datarootdir ;; | |
1038 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1039 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1040 | datarootdir=$ac_optarg ;; | |
1041 | ||
861bb6c1 | 1042 | -disable-* | --disable-*) |
5213506e | 1043 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 1044 | # Reject names that are not valid shell variable names. |
5213506e RW |
1045 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1046 | as_fn_error "invalid feature name: $ac_useropt" | |
1047 | ac_useropt_orig=$ac_useropt | |
1048 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1049 | case $ac_user_opts in | |
1050 | *" | |
1051 | "enable_$ac_useropt" | |
1052 | "*) ;; | |
1053 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1054 | ac_unrecognized_sep=', ';; | |
1055 | esac | |
1056 | eval enable_$ac_useropt=no ;; | |
1057 | ||
1058 | -docdir | --docdir | --docdi | --doc | --do) | |
1059 | ac_prev=docdir ;; | |
1060 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1061 | docdir=$ac_optarg ;; | |
1062 | ||
1063 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1064 | ac_prev=dvidir ;; | |
1065 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1066 | dvidir=$ac_optarg ;; | |
861bb6c1 JL |
1067 | |
1068 | -enable-* | --enable-*) | |
5213506e | 1069 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 1070 | # Reject names that are not valid shell variable names. |
5213506e RW |
1071 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1072 | as_fn_error "invalid feature name: $ac_useropt" | |
1073 | ac_useropt_orig=$ac_useropt | |
1074 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1075 | case $ac_user_opts in | |
1076 | *" | |
1077 | "enable_$ac_useropt" | |
1078 | "*) ;; | |
1079 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1080 | ac_unrecognized_sep=', ';; | |
b61ff9c8 | 1081 | esac |
5213506e | 1082 | eval enable_$ac_useropt=\$ac_optarg ;; |
861bb6c1 JL |
1083 | |
1084 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1085 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1086 | | --exec | --exe | --ex) | |
1087 | ac_prev=exec_prefix ;; | |
1088 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1089 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1090 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 1091 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
1092 | |
1093 | -gas | --gas | --ga | --g) | |
1094 | # Obsolete; use --with-gas. | |
1095 | with_gas=yes ;; | |
1096 | ||
ba479fd2 NN |
1097 | -help | --help | --hel | --he | -h) |
1098 | ac_init_help=long ;; | |
1099 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1100 | ac_init_help=recursive ;; | |
1101 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1102 | ac_init_help=short ;; | |
861bb6c1 JL |
1103 | |
1104 | -host | --host | --hos | --ho) | |
ba479fd2 | 1105 | ac_prev=host_alias ;; |
861bb6c1 | 1106 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 1107 | host_alias=$ac_optarg ;; |
861bb6c1 | 1108 | |
5213506e RW |
1109 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1110 | ac_prev=htmldir ;; | |
1111 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1112 | | --ht=*) | |
1113 | htmldir=$ac_optarg ;; | |
1114 | ||
861bb6c1 JL |
1115 | -includedir | --includedir | --includedi | --included | --include \ |
1116 | | --includ | --inclu | --incl | --inc) | |
1117 | ac_prev=includedir ;; | |
1118 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1119 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 1120 | includedir=$ac_optarg ;; |
861bb6c1 JL |
1121 | |
1122 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1123 | ac_prev=infodir ;; | |
1124 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 1125 | infodir=$ac_optarg ;; |
861bb6c1 JL |
1126 | |
1127 | -libdir | --libdir | --libdi | --libd) | |
1128 | ac_prev=libdir ;; | |
1129 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 1130 | libdir=$ac_optarg ;; |
861bb6c1 JL |
1131 | |
1132 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1133 | | --libexe | --libex | --libe) | |
1134 | ac_prev=libexecdir ;; | |
1135 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1136 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 1137 | libexecdir=$ac_optarg ;; |
861bb6c1 | 1138 | |
5213506e RW |
1139 | -localedir | --localedir | --localedi | --localed | --locale) |
1140 | ac_prev=localedir ;; | |
1141 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1142 | localedir=$ac_optarg ;; | |
1143 | ||
861bb6c1 | 1144 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
5213506e | 1145 | | --localstate | --localstat | --localsta | --localst | --locals) |
861bb6c1 JL |
1146 | ac_prev=localstatedir ;; |
1147 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
5213506e | 1148 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
ba479fd2 | 1149 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
1150 | |
1151 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1152 | ac_prev=mandir ;; | |
1153 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 1154 | mandir=$ac_optarg ;; |
861bb6c1 JL |
1155 | |
1156 | -nfp | --nfp | --nf) | |
1157 | # Obsolete; use --without-fp. | |
1158 | with_fp=no ;; | |
1159 | ||
1160 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 1161 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
1162 | no_create=yes ;; |
1163 | ||
1164 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1165 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1166 | no_recursion=yes ;; | |
1167 | ||
1168 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1169 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1170 | | --oldin | --oldi | --old | --ol | --o) | |
1171 | ac_prev=oldincludedir ;; | |
1172 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1173 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1174 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 1175 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
1176 | |
1177 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1178 | ac_prev=prefix ;; | |
1179 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 1180 | prefix=$ac_optarg ;; |
861bb6c1 JL |
1181 | |
1182 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1183 | | --program-pre | --program-pr | --program-p) | |
1184 | ac_prev=program_prefix ;; | |
1185 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1186 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 1187 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
1188 | |
1189 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1190 | | --program-suf | --program-su | --program-s) | |
1191 | ac_prev=program_suffix ;; | |
1192 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1193 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 1194 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
1195 | |
1196 | -program-transform-name | --program-transform-name \ | |
1197 | | --program-transform-nam | --program-transform-na \ | |
1198 | | --program-transform-n | --program-transform- \ | |
1199 | | --program-transform | --program-transfor \ | |
1200 | | --program-transfo | --program-transf \ | |
1201 | | --program-trans | --program-tran \ | |
1202 | | --progr-tra | --program-tr | --program-t) | |
1203 | ac_prev=program_transform_name ;; | |
1204 | -program-transform-name=* | --program-transform-name=* \ | |
1205 | | --program-transform-nam=* | --program-transform-na=* \ | |
1206 | | --program-transform-n=* | --program-transform-=* \ | |
1207 | | --program-transform=* | --program-transfor=* \ | |
1208 | | --program-transfo=* | --program-transf=* \ | |
1209 | | --program-trans=* | --program-tran=* \ | |
1210 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 1211 | program_transform_name=$ac_optarg ;; |
861bb6c1 | 1212 | |
5213506e RW |
1213 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1214 | ac_prev=pdfdir ;; | |
1215 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1216 | pdfdir=$ac_optarg ;; | |
1217 | ||
1218 | -psdir | --psdir | --psdi | --psd | --ps) | |
1219 | ac_prev=psdir ;; | |
1220 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1221 | psdir=$ac_optarg ;; | |
1222 | ||
861bb6c1 JL |
1223 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1224 | | -silent | --silent | --silen | --sile | --sil) | |
1225 | silent=yes ;; | |
1226 | ||
1227 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1228 | ac_prev=sbindir ;; | |
1229 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1230 | | --sbi=* | --sb=*) | |
ba479fd2 | 1231 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
1232 | |
1233 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1234 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1235 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1236 | | --sha | --sh) | |
1237 | ac_prev=sharedstatedir ;; | |
1238 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1239 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1240 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1241 | | --sha=* | --sh=*) | |
ba479fd2 | 1242 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
1243 | |
1244 | -site | --site | --sit) | |
1245 | ac_prev=site ;; | |
1246 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 1247 | site=$ac_optarg ;; |
861bb6c1 JL |
1248 | |
1249 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1250 | ac_prev=srcdir ;; | |
1251 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 1252 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
1253 | |
1254 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1255 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1256 | ac_prev=sysconfdir ;; | |
1257 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1258 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 1259 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
1260 | |
1261 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 1262 | ac_prev=target_alias ;; |
861bb6c1 | 1263 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 1264 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
1265 | |
1266 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1267 | verbose=yes ;; | |
1268 | ||
ba479fd2 NN |
1269 | -version | --version | --versio | --versi | --vers | -V) |
1270 | ac_init_version=: ;; | |
861bb6c1 JL |
1271 | |
1272 | -with-* | --with-*) | |
5213506e | 1273 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 1274 | # Reject names that are not valid shell variable names. |
5213506e RW |
1275 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1276 | as_fn_error "invalid package name: $ac_useropt" | |
1277 | ac_useropt_orig=$ac_useropt | |
1278 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1279 | case $ac_user_opts in | |
1280 | *" | |
1281 | "with_$ac_useropt" | |
1282 | "*) ;; | |
1283 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1284 | ac_unrecognized_sep=', ';; | |
b61ff9c8 | 1285 | esac |
5213506e | 1286 | eval with_$ac_useropt=\$ac_optarg ;; |
861bb6c1 JL |
1287 | |
1288 | -without-* | --without-*) | |
5213506e | 1289 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 1290 | # Reject names that are not valid shell variable names. |
5213506e RW |
1291 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1292 | as_fn_error "invalid package name: $ac_useropt" | |
1293 | ac_useropt_orig=$ac_useropt | |
1294 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1295 | case $ac_user_opts in | |
1296 | *" | |
1297 | "with_$ac_useropt" | |
1298 | "*) ;; | |
1299 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1300 | ac_unrecognized_sep=', ';; | |
1301 | esac | |
1302 | eval with_$ac_useropt=no ;; | |
861bb6c1 JL |
1303 | |
1304 | --x) | |
1305 | # Obsolete; use --with-x. | |
1306 | with_x=yes ;; | |
1307 | ||
1308 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1309 | | --x-incl | --x-inc | --x-in | --x-i) | |
1310 | ac_prev=x_includes ;; | |
1311 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1312 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 1313 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
1314 | |
1315 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1316 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1317 | ac_prev=x_libraries ;; | |
1318 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1319 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 1320 | x_libraries=$ac_optarg ;; |
861bb6c1 | 1321 | |
5213506e RW |
1322 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1323 | Try \`$0 --help' for more information." | |
861bb6c1 JL |
1324 | ;; |
1325 | ||
ba479fd2 NN |
1326 | *=*) |
1327 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1328 | # Reject names that are not valid shell variable names. | |
5213506e RW |
1329 | case $ac_envvar in #( |
1330 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1331 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1332 | esac | |
1333 | eval $ac_envvar=\$ac_optarg | |
ba479fd2 NN |
1334 | export $ac_envvar ;; |
1335 | ||
861bb6c1 | 1336 | *) |
ba479fd2 | 1337 | # FIXME: should be removed in autoconf 3.0. |
5213506e | 1338 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
ba479fd2 | 1339 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
5213506e | 1340 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
ba479fd2 | 1341 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
861bb6c1 JL |
1342 | ;; |
1343 | ||
1344 | esac | |
1345 | done | |
1346 | ||
1347 | if test -n "$ac_prev"; then | |
ba479fd2 | 1348 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
5213506e | 1349 | as_fn_error "missing argument to $ac_option" |
63cf211a | 1350 | fi |
63cf211a | 1351 | |
5213506e RW |
1352 | if test -n "$ac_unrecognized_opts"; then |
1353 | case $enable_option_checking in | |
1354 | no) ;; | |
1355 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1356 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
2f41c1d6 | 1357 | esac |
5213506e | 1358 | fi |
2f41c1d6 | 1359 | |
5213506e RW |
1360 | # Check all directory arguments for consistency. |
1361 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1362 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1363 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1364 | libdir localedir mandir | |
b61ff9c8 | 1365 | do |
5213506e RW |
1366 | eval ac_val=\$$ac_var |
1367 | # Remove trailing slashes. | |
1368 | case $ac_val in | |
1369 | */ ) | |
1370 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1371 | eval $ac_var=\$ac_val;; | |
1372 | esac | |
1373 | # Be sure to have absolute directory names. | |
b61ff9c8 | 1374 | case $ac_val in |
5213506e RW |
1375 | [\\/$]* | ?:[\\/]* ) continue;; |
1376 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
b61ff9c8 | 1377 | esac |
5213506e | 1378 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
b61ff9c8 BS |
1379 | done |
1380 | ||
1381 | # There might be people who depend on the old broken behavior: `$host' | |
1382 | # used to hold the argument of --host etc. | |
1383 | # FIXME: To remove some day. | |
1384 | build=$build_alias | |
1385 | host=$host_alias | |
ba479fd2 NN |
1386 | target=$target_alias |
1387 | ||
1388 | # FIXME: To remove some day. | |
1389 | if test "x$host_alias" != x; then | |
1390 | if test "x$build_alias" = x; then | |
1391 | cross_compiling=maybe | |
5213506e | 1392 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
ba479fd2 NN |
1393 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1394 | elif test "x$build_alias" != "x$host_alias"; then | |
1395 | cross_compiling=yes | |
1396 | fi | |
1397 | fi | |
6e3f3080 | 1398 | |
ba479fd2 NN |
1399 | ac_tool_prefix= |
1400 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1401 | ||
1402 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 1403 | |
861bb6c1 | 1404 | |
5213506e RW |
1405 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1406 | ac_ls_di=`ls -di .` && | |
1407 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1408 | as_fn_error "working directory cannot be determined" | |
1409 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1410 | as_fn_error "pwd does not report name of working directory" | |
1411 | ||
1412 | ||
861bb6c1 JL |
1413 | # Find the source files, if location was not specified. |
1414 | if test -z "$srcdir"; then | |
1415 | ac_srcdir_defaulted=yes | |
5213506e RW |
1416 | # Try the directory containing this script, then the parent directory. |
1417 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1418 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1419 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1420 | X"$as_myself" : 'X\(//\)$' \| \ | |
1421 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1422 | $as_echo X"$as_myself" | | |
1423 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1424 | s//\1/ | |
1425 | q | |
1426 | } | |
1427 | /^X\(\/\/\)[^/].*/{ | |
1428 | s//\1/ | |
1429 | q | |
1430 | } | |
1431 | /^X\(\/\/\)$/{ | |
1432 | s//\1/ | |
1433 | q | |
1434 | } | |
1435 | /^X\(\/\).*/{ | |
1436 | s//\1/ | |
1437 | q | |
1438 | } | |
1439 | s/.*/./; q'` | |
861bb6c1 | 1440 | srcdir=$ac_confdir |
5213506e | 1441 | if test ! -r "$srcdir/$ac_unique_file"; then |
861bb6c1 JL |
1442 | srcdir=.. |
1443 | fi | |
1444 | else | |
1445 | ac_srcdir_defaulted=no | |
1446 | fi | |
5213506e RW |
1447 | if test ! -r "$srcdir/$ac_unique_file"; then |
1448 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1449 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1450 | fi | |
1451 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1452 | ac_abs_confdir=`( | |
1453 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1454 | pwd)` | |
1455 | # When building in place, set srcdir=. | |
1456 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1457 | srcdir=. | |
1458 | fi | |
1459 | # Remove unnecessary trailing slashes from srcdir. | |
1460 | # Double slashes in file names in object file debugging info | |
1461 | # mess up M-x gdb in Emacs. | |
1462 | case $srcdir in | |
1463 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1464 | esac | |
1465 | for ac_var in $ac_precious_vars; do | |
1466 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1467 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1468 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1469 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1470 | done | |
63cf211a | 1471 | |
ba479fd2 NN |
1472 | # |
1473 | # Report the --help message. | |
1474 | # | |
1475 | if test "$ac_init_help" = "long"; then | |
1476 | # Omit some internal or obsolete options to make the list less imposing. | |
1477 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1478 | cat <<_ACEOF | |
1479 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 1480 | |
ba479fd2 | 1481 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 1482 | |
ba479fd2 NN |
1483 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1484 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 1485 | |
ba479fd2 | 1486 | Defaults for the options are specified in brackets. |
861bb6c1 | 1487 | |
ba479fd2 NN |
1488 | Configuration: |
1489 | -h, --help display this help and exit | |
1490 | --help=short display options specific to this package | |
1491 | --help=recursive display the short help of all the included packages | |
1492 | -V, --version display version information and exit | |
1493 | -q, --quiet, --silent do not print \`checking...' messages | |
1494 | --cache-file=FILE cache test results in FILE [disabled] | |
1495 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1496 | -n, --no-create do not create output files | |
1497 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1498 | ||
ba479fd2 NN |
1499 | Installation directories: |
1500 | --prefix=PREFIX install architecture-independent files in PREFIX | |
5213506e | 1501 | [$ac_default_prefix] |
ba479fd2 | 1502 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5213506e | 1503 | [PREFIX] |
861bb6c1 | 1504 | |
ba479fd2 NN |
1505 | By default, \`make install' will install all the files in |
1506 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1507 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1508 | for instance \`--prefix=\$HOME'. | |
13c22933 | 1509 | |
ba479fd2 | 1510 | For better control, use the options below. |
13c22933 | 1511 | |
ba479fd2 | 1512 | Fine tuning of the installation directories: |
5213506e RW |
1513 | --bindir=DIR user executables [EPREFIX/bin] |
1514 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1515 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1516 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1517 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1518 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1519 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1520 | --includedir=DIR C header files [PREFIX/include] | |
1521 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1522 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1523 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1524 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1525 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1526 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1527 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1528 | --htmldir=DIR html documentation [DOCDIR] | |
1529 | --dvidir=DIR dvi documentation [DOCDIR] | |
1530 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1531 | --psdir=DIR ps documentation [DOCDIR] | |
ba479fd2 | 1532 | _ACEOF |
13c22933 | 1533 | |
ba479fd2 | 1534 | cat <<\_ACEOF |
13c22933 | 1535 | |
ba479fd2 NN |
1536 | Program names: |
1537 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1538 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1539 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 1540 | |
ba479fd2 NN |
1541 | System types: |
1542 | --build=BUILD configure for building on BUILD [guessed] | |
1543 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1544 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1545 | _ACEOF | |
13c22933 JJ |
1546 | fi |
1547 | ||
ba479fd2 | 1548 | if test -n "$ac_init_help"; then |
13c22933 | 1549 | |
ba479fd2 | 1550 | cat <<\_ACEOF |
13c22933 | 1551 | |
ba479fd2 | 1552 | Optional Features: |
5213506e | 1553 | --disable-option-checking ignore unrecognized --enable/--with options |
ba479fd2 NN |
1554 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1555 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
1556 | --enable-generated-files-in-srcdir |
1557 | put copies of generated files in source dir | |
1558 | intended for creating source tarballs for users | |
1559 | without texinfo bison or flex. | |
3bbd5a19 | 1560 | --enable-werror-always enable -Werror despite compiler version |
ba479fd2 NN |
1561 | --enable-checking=LIST |
1562 | enable expensive run-time checks. With LIST, | |
1563 | enable only specific categories of checks. | |
cdce5c16 | 1564 | Categories are: yes,no,all,none,release. |
726a989a | 1565 | Flags are: assert,df,fold,gc,gcac,gimple,misc, |
7e98624c | 1566 | rtlflag,rtl,runtime,tree,valgrind,types. |
ba479fd2 | 1567 | --enable-coverage=LEVEL |
fb38008e | 1568 | enable compiler's code coverage collection. |
ba479fd2 NN |
1569 | Use to measure compiler performance and locate |
1570 | unused parts of the compiler. With LEVEL, specify | |
1571 | optimization. Values are opt, noopt, | |
1572 | default is noopt | |
1573 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
00020c16 | 1574 | --enable-build-with-cxx build with C++ compiler instead of C compiler |
ba479fd2 NN |
1575 | --enable-multilib enable library support for multiple ABIs |
1576 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
79b87c74 MM |
1577 | --enable-decimal-float={no,yes,bid,dpd} |
1578 | enable decimal float extension to C. Selecting 'bid' | |
1579 | or 'dpd' choses which decimal floating point format | |
1580 | to use | |
ab22c1fa | 1581 | --enable-fixed-point enable fixed-point arithmetic extension to C |
ba479fd2 NN |
1582 | --enable-threads enable thread usage for target GCC |
1583 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
1584 | --enable-tls enable or disable generation of tls code |
1585 | overriding the assembler check for tls support | |
ba479fd2 NN |
1586 | --enable-objc-gc enable the use of Boehm's garbage collector with |
1587 | the GNU Objective-C runtime | |
1588 | --disable-shared don't provide a shared libgcc | |
1589 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 1590 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 1591 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
1592 | --enable-initfini-array use .init_array/.fini_array sections |
1593 | --enable-sjlj-exceptions | |
1594 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 1595 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ad211091 KT |
1596 | --enable-leading-mingw64-underscores |
1597 | Enable leading underscores on 64 bit mingw targets | |
922e3e33 | 1598 | --enable-cld enable -mcld by default for 32bit x86 |
ba479fd2 NN |
1599 | --disable-win32-registry |
1600 | disable lookup of installation paths in the | |
1601 | Registry on Windows hosts | |
1602 | --enable-win32-registry enable registry lookup (default) | |
1603 | --enable-win32-registry=KEY | |
1604 | use KEY instead of GCC version as the last portion | |
1605 | of the registry key | |
5213506e RW |
1606 | --enable-shared[=PKGS] build shared libraries [default=yes] |
1607 | --enable-static[=PKGS] build static libraries [default=yes] | |
da0f6381 PB |
1608 | --enable-fast-install[=PKGS] |
1609 | optimize for fast installation [default=yes] | |
1610 | --disable-libtool-lock avoid locking (might break parallel builds) | |
55c4f715 | 1611 | --enable-comdat enable COMDAT group support |
e31bcd1b JM |
1612 | --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on |
1613 | glibc systems | |
cd533689 PP |
1614 | --enable-linker-build-id |
1615 | compiler will always pass --build-id to linker | |
ba479fd2 NN |
1616 | --enable-maintainer-mode |
1617 | enable make rules and dependencies not useful | |
1618 | (and sometimes confusing) to the casual installer | |
1619 | --enable-version-specific-runtime-libs | |
1620 | specify that runtime libraries should be | |
1621 | installed in a compiler-specific directory | |
68a607d8 | 1622 | --enable-plugin enable plugin support |
093e61a6 | 1623 | |
ba479fd2 NN |
1624 | Optional Packages: |
1625 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1626 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1546bb64 | 1627 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
1628 | --with-local-prefix=DIR specifies directory to put local include |
1629 | --with-gxx-include-dir=DIR | |
1630 | specifies directory to put g++ header files | |
1631 | --with-cpp-install-dir=DIR | |
1632 | install the user visible C preprocessor in DIR | |
1633 | (relative to PREFIX) as well as PREFIX/bin | |
1634 | --with-gnu-ld arrange to work with GNU ld. | |
1635 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 1636 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
1637 | --with-gnu-as arrange to work with GNU as |
1638 | --with-as arrange to use the specified as (full pathname) | |
1639 | --with-stabs arrange to use stabs instead of host debug format | |
1640 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
1641 | --with-build-sysroot=sysroot |
1642 | use sysroot as the system root during the build | |
ba479fd2 | 1643 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
e11ddaf5 | 1644 | --with-specs=SPECS add SPECS to driver command-line processing |
2f41c1d6 PB |
1645 | --with-pkgversion=PKG Use PKG in the version string in place of "GCC" |
1646 | --with-bugurl=URL Direct users to URL to report a bug | |
aca600aa | 1647 | --with-multilib-list Select multilibs (SH only) |
dfb77e37 KC |
1648 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1649 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1650 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 1651 | --with-system-libunwind use installed libunwind |
da0f6381 PB |
1652 | --with-pic try to use only PIC/non-PIC objects [default=use |
1653 | both] | |
1654 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | |
5938f74d | 1655 | --with-plugin-ld=[ARG] specify the plugin linker |
ed965309 | 1656 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 1657 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
1658 | with the compiler |
1659 | --with-system-zlib use installed libz | |
22482f74 | 1660 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
13c22933 | 1661 | |
ba479fd2 NN |
1662 | Some influential environment variables: |
1663 | CC C compiler command | |
1664 | CFLAGS C compiler flags | |
1665 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1666 | nonstandard directory <lib dir> | |
5213506e RW |
1667 | LIBS libraries to pass to the linker, e.g. -l<library> |
1668 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1669 | you have headers in a nonstandard directory <include dir> | |
00020c16 ILT |
1670 | CXX C++ compiler command |
1671 | CXXFLAGS C++ compiler flags | |
ba479fd2 | 1672 | CPP C preprocessor |
00020c16 | 1673 | CXXCPP C++ preprocessor |
6de9cd9a DN |
1674 | GMPLIBS How to link GMP |
1675 | GMPINC How to find GMP include files | |
f8bf9252 SP |
1676 | PPLLIBS How to link PPL |
1677 | PPLINC How to find PPL include files | |
1678 | CLOOGLIBS How to link CLOOG | |
1679 | CLOOGINC How to find CLOOG include files | |
d7f09764 DN |
1680 | LIBELFLIBS How to link libelf |
1681 | LIBELFINC How to find libelf include files | |
13c22933 | 1682 | |
ba479fd2 NN |
1683 | Use these variables to override the choices made by `configure' or to help |
1684 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 1685 | |
5213506e | 1686 | Report bugs to the package provider. |
ba479fd2 | 1687 | _ACEOF |
5213506e | 1688 | ac_status=$? |
ba479fd2 | 1689 | fi |
6e3f3080 | 1690 | |
ba479fd2 NN |
1691 | if test "$ac_init_help" = "recursive"; then |
1692 | # If there are subdirs, report their specific --help. | |
ba479fd2 | 1693 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
5213506e RW |
1694 | test -d "$ac_dir" || |
1695 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1696 | continue | |
ba479fd2 NN |
1697 | ac_builddir=. |
1698 | ||
5213506e RW |
1699 | case "$ac_dir" in |
1700 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1701 | *) | |
1702 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1703 | # A ".." for each directory in $ac_dir_suffix. | |
1704 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1705 | case $ac_top_builddir_sub in | |
1706 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1707 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1708 | esac ;; | |
1709 | esac | |
1710 | ac_abs_top_builddir=$ac_pwd | |
1711 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1712 | # for backward compatibility: | |
1713 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
1714 | |
1715 | case $srcdir in | |
5213506e | 1716 | .) # We are building in place. |
ba479fd2 | 1717 | ac_srcdir=. |
5213506e RW |
1718 | ac_top_srcdir=$ac_top_builddir_sub |
1719 | ac_abs_top_srcdir=$ac_pwd ;; | |
1720 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 1721 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
1722 | ac_top_srcdir=$srcdir |
1723 | ac_abs_top_srcdir=$srcdir ;; | |
1724 | *) # Relative name. | |
1725 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1726 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1727 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
86da66b5 | 1728 | esac |
5213506e RW |
1729 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1730 | ||
1731 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1732 | # Check for guested configure. | |
1733 | if test -f "$ac_srcdir/configure.gnu"; then | |
1734 | echo && | |
1735 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1736 | elif test -f "$ac_srcdir/configure"; then | |
1737 | echo && | |
1738 | $SHELL "$ac_srcdir/configure" --help=recursive | |
ba479fd2 | 1739 | else |
5213506e RW |
1740 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1741 | fi || ac_status=$? | |
1742 | cd "$ac_pwd" || { ac_status=$?; break; } | |
ba479fd2 NN |
1743 | done |
1744 | fi | |
1745 | ||
5213506e | 1746 | test -n "$ac_init_help" && exit $ac_status |
ba479fd2 NN |
1747 | if $ac_init_version; then |
1748 | cat <<\_ACEOF | |
5213506e RW |
1749 | configure |
1750 | generated by GNU Autoconf 2.64 | |
ba479fd2 | 1751 | |
5213506e | 1752 | Copyright (C) 2009 Free Software Foundation, Inc. |
ba479fd2 NN |
1753 | This configure script is free software; the Free Software Foundation |
1754 | gives unlimited permission to copy, distribute and modify it. | |
1755 | _ACEOF | |
5213506e | 1756 | exit |
ba479fd2 | 1757 | fi |
ba479fd2 | 1758 | |
5213506e RW |
1759 | ## ------------------------ ## |
1760 | ## Autoconf initialization. ## | |
1761 | ## ------------------------ ## | |
ba479fd2 | 1762 | |
5213506e RW |
1763 | # ac_fn_c_try_compile LINENO |
1764 | # -------------------------- | |
1765 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1766 | ac_fn_c_try_compile () | |
ba479fd2 | 1767 | { |
5213506e RW |
1768 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1769 | rm -f conftest.$ac_objext | |
1770 | if { { ac_try="$ac_compile" | |
1771 | case "(($ac_try" in | |
1772 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1773 | *) ac_try_echo=$ac_try;; | |
1774 | esac | |
1775 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1776 | $as_echo "$ac_try_echo"; } >&5 | |
1777 | (eval "$ac_compile") 2>conftest.err | |
1778 | ac_status=$? | |
1779 | if test -s conftest.err; then | |
1780 | grep -v '^ *+' conftest.err >conftest.er1 | |
1781 | cat conftest.er1 >&5 | |
1782 | mv -f conftest.er1 conftest.err | |
1783 | fi | |
1784 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1785 | test $ac_status = 0; } && { | |
1786 | test -z "$ac_c_werror_flag" || | |
1787 | test ! -s conftest.err | |
1788 | } && test -s conftest.$ac_objext; then : | |
1789 | ac_retval=0 | |
1790 | else | |
1791 | $as_echo "$as_me: failed program was:" >&5 | |
1792 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1793 | |
5213506e RW |
1794 | ac_retval=1 |
1795 | fi | |
1796 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1797 | return $ac_retval | |
ba479fd2 | 1798 | |
5213506e | 1799 | } # ac_fn_c_try_compile |
ba479fd2 | 1800 | |
5213506e RW |
1801 | # ac_fn_cxx_try_compile LINENO |
1802 | # ---------------------------- | |
1803 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1804 | ac_fn_cxx_try_compile () | |
1805 | { | |
1806 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1807 | rm -f conftest.$ac_objext | |
1808 | if { { ac_try="$ac_compile" | |
1809 | case "(($ac_try" in | |
1810 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1811 | *) ac_try_echo=$ac_try;; | |
1812 | esac | |
1813 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1814 | $as_echo "$ac_try_echo"; } >&5 | |
1815 | (eval "$ac_compile") 2>conftest.err | |
1816 | ac_status=$? | |
1817 | if test -s conftest.err; then | |
1818 | grep -v '^ *+' conftest.err >conftest.er1 | |
1819 | cat conftest.er1 >&5 | |
1820 | mv -f conftest.er1 conftest.err | |
1821 | fi | |
1822 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1823 | test $ac_status = 0; } && { | |
1824 | test -z "$ac_cxx_werror_flag" || | |
1825 | test ! -s conftest.err | |
1826 | } && test -s conftest.$ac_objext; then : | |
1827 | ac_retval=0 | |
1828 | else | |
1829 | $as_echo "$as_me: failed program was:" >&5 | |
1830 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1831 | |
5213506e RW |
1832 | ac_retval=1 |
1833 | fi | |
1834 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1835 | return $ac_retval | |
ba479fd2 | 1836 | |
5213506e | 1837 | } # ac_fn_cxx_try_compile |
ba479fd2 | 1838 | |
5213506e RW |
1839 | # ac_fn_c_try_cpp LINENO |
1840 | # ---------------------- | |
1841 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1842 | ac_fn_c_try_cpp () | |
1843 | { | |
1844 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1845 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1846 | case "(($ac_try" in | |
1847 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1848 | *) ac_try_echo=$ac_try;; | |
1849 | esac | |
1850 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1851 | $as_echo "$ac_try_echo"; } >&5 | |
1852 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1853 | ac_status=$? | |
1854 | if test -s conftest.err; then | |
1855 | grep -v '^ *+' conftest.err >conftest.er1 | |
1856 | cat conftest.er1 >&5 | |
1857 | mv -f conftest.er1 conftest.err | |
1858 | fi | |
1859 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1860 | test $ac_status = 0; } >/dev/null && { | |
1861 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1862 | test ! -s conftest.err | |
1863 | }; then : | |
1864 | ac_retval=0 | |
1865 | else | |
1866 | $as_echo "$as_me: failed program was:" >&5 | |
1867 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1868 | |
5213506e RW |
1869 | ac_retval=1 |
1870 | fi | |
1871 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1872 | return $ac_retval | |
ba479fd2 | 1873 | |
5213506e | 1874 | } # ac_fn_c_try_cpp |
ba479fd2 | 1875 | |
5213506e RW |
1876 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1877 | # ------------------------------------------------------- | |
1878 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1879 | # the include files in INCLUDES and setting the cache variable VAR | |
1880 | # accordingly. | |
1881 | ac_fn_c_check_header_mongrel () | |
1882 | { | |
1883 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1884 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1886 | $as_echo_n "checking for $2... " >&6; } | |
1887 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1888 | $as_echo_n "(cached) " >&6 | |
1889 | fi | |
1890 | eval ac_res=\$$3 | |
1891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1892 | $as_echo "$ac_res" >&6; } | |
1893 | else | |
1894 | # Is the header compilable? | |
1895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1896 | $as_echo_n "checking $2 usability... " >&6; } | |
1897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1898 | /* end confdefs.h. */ | |
1899 | $4 | |
1900 | #include <$2> | |
ba479fd2 | 1901 | _ACEOF |
5213506e RW |
1902 | if ac_fn_c_try_compile "$LINENO"; then : |
1903 | ac_header_compiler=yes | |
1904 | else | |
1905 | ac_header_compiler=no | |
1906 | fi | |
1907 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1909 | $as_echo "$ac_header_compiler" >&6; } | |
ba479fd2 | 1910 | |
5213506e RW |
1911 | # Is the header present? |
1912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1913 | $as_echo_n "checking $2 presence... " >&6; } | |
1914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1915 | /* end confdefs.h. */ | |
1916 | #include <$2> | |
1917 | _ACEOF | |
1918 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1919 | ac_header_preproc=yes | |
1920 | else | |
1921 | ac_header_preproc=no | |
1922 | fi | |
1923 | rm -f conftest.err conftest.$ac_ext | |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1925 | $as_echo "$ac_header_preproc" >&6; } | |
ba479fd2 | 1926 | |
5213506e RW |
1927 | # So? What about this header? |
1928 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1929 | yes:no: ) | |
1930 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1931 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1932 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1933 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1934 | ;; | |
1935 | no:yes:* ) | |
1936 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1937 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1938 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1939 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1941 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1943 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1944 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1945 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1946 | ;; | |
1947 | esac | |
1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1949 | $as_echo_n "checking for $2... " >&6; } | |
1950 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1951 | $as_echo_n "(cached) " >&6 | |
1952 | else | |
1953 | eval "$3=\$ac_header_compiler" | |
1954 | fi | |
1955 | eval ac_res=\$$3 | |
1956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1957 | $as_echo "$ac_res" >&6; } | |
1958 | fi | |
1959 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 1960 | |
5213506e | 1961 | } # ac_fn_c_check_header_mongrel |
ba479fd2 | 1962 | |
5213506e RW |
1963 | # ac_fn_c_try_run LINENO |
1964 | # ---------------------- | |
1965 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1966 | # that executables *can* be run. | |
1967 | ac_fn_c_try_run () | |
b61ff9c8 | 1968 | { |
5213506e RW |
1969 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1970 | if { { ac_try="$ac_link" | |
1971 | case "(($ac_try" in | |
1972 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1973 | *) ac_try_echo=$ac_try;; | |
1974 | esac | |
1975 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1976 | $as_echo "$ac_try_echo"; } >&5 | |
1977 | (eval "$ac_link") 2>&5 | |
1978 | ac_status=$? | |
1979 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1980 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1981 | { { case "(($ac_try" in | |
1982 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1983 | *) ac_try_echo=$ac_try;; | |
1984 | esac | |
1985 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1986 | $as_echo "$ac_try_echo"; } >&5 | |
1987 | (eval "$ac_try") 2>&5 | |
1988 | ac_status=$? | |
1989 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1990 | test $ac_status = 0; }; }; then : | |
1991 | ac_retval=0 | |
1992 | else | |
1993 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1994 | $as_echo "$as_me: failed program was:" >&5 | |
1995 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1996 | |
5213506e RW |
1997 | ac_retval=$ac_status |
1998 | fi | |
1999 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2000 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2001 | return $ac_retval | |
ba479fd2 | 2002 | |
5213506e | 2003 | } # ac_fn_c_try_run |
ba479fd2 | 2004 | |
5213506e RW |
2005 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2006 | # ------------------------------------------------------- | |
2007 | # Tests whether HEADER exists and can be compiled using the include files in | |
2008 | # INCLUDES, setting the cache variable VAR accordingly. | |
2009 | ac_fn_c_check_header_compile () | |
2010 | { | |
2011 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2013 | $as_echo_n "checking for $2... " >&6; } | |
2014 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2015 | $as_echo_n "(cached) " >&6 | |
2016 | else | |
2017 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2018 | /* end confdefs.h. */ | |
2019 | $4 | |
2020 | #include <$2> | |
ba479fd2 | 2021 | _ACEOF |
5213506e RW |
2022 | if ac_fn_c_try_compile "$LINENO"; then : |
2023 | eval "$3=yes" | |
2024 | else | |
2025 | eval "$3=no" | |
2026 | fi | |
2027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2028 | fi | |
2029 | eval ac_res=\$$3 | |
2030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2031 | $as_echo "$ac_res" >&6; } | |
2032 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2033 | |
5213506e | 2034 | } # ac_fn_c_check_header_compile |
ba479fd2 | 2035 | |
5213506e RW |
2036 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2037 | # -------------------------------------------- | |
2038 | # Tries to find the compile-time value of EXPR in a program that includes | |
2039 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2040 | # computed | |
2041 | ac_fn_c_compute_int () | |
2042 | { | |
2043 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2044 | if test "$cross_compiling" = yes; then | |
2045 | # Depending upon the size, compute the lo and hi bounds. | |
2046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2047 | /* end confdefs.h. */ | |
2048 | $4 | |
2049 | int | |
2050 | main () | |
2051 | { | |
2052 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2053 | test_array [0] = 0 | |
ba479fd2 | 2054 | |
5213506e RW |
2055 | ; |
2056 | return 0; | |
2057 | } | |
ba479fd2 | 2058 | _ACEOF |
5213506e RW |
2059 | if ac_fn_c_try_compile "$LINENO"; then : |
2060 | ac_lo=0 ac_mid=0 | |
2061 | while :; do | |
2062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2063 | /* end confdefs.h. */ | |
2064 | $4 | |
2065 | int | |
2066 | main () | |
2067 | { | |
2068 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2069 | test_array [0] = 0 | |
ba479fd2 | 2070 | |
5213506e RW |
2071 | ; |
2072 | return 0; | |
2073 | } | |
ba479fd2 | 2074 | _ACEOF |
5213506e RW |
2075 | if ac_fn_c_try_compile "$LINENO"; then : |
2076 | ac_hi=$ac_mid; break | |
2077 | else | |
2078 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2079 | if test $ac_lo -le $ac_mid; then | |
2080 | ac_lo= ac_hi= | |
2081 | break | |
2082 | fi | |
2083 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2084 | fi | |
2085 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2086 | done | |
2087 | else | |
2088 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2089 | /* end confdefs.h. */ | |
2090 | $4 | |
2091 | int | |
2092 | main () | |
2093 | { | |
2094 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2095 | test_array [0] = 0 | |
ba479fd2 | 2096 | |
5213506e RW |
2097 | ; |
2098 | return 0; | |
2099 | } | |
ba479fd2 | 2100 | _ACEOF |
5213506e RW |
2101 | if ac_fn_c_try_compile "$LINENO"; then : |
2102 | ac_hi=-1 ac_mid=-1 | |
2103 | while :; do | |
2104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2105 | /* end confdefs.h. */ | |
2106 | $4 | |
2107 | int | |
2108 | main () | |
2109 | { | |
2110 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2111 | test_array [0] = 0 | |
ba479fd2 | 2112 | |
5213506e RW |
2113 | ; |
2114 | return 0; | |
2115 | } | |
2116 | _ACEOF | |
2117 | if ac_fn_c_try_compile "$LINENO"; then : | |
2118 | ac_lo=$ac_mid; break | |
2119 | else | |
2120 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2121 | if test $ac_mid -le $ac_hi; then | |
2122 | ac_lo= ac_hi= | |
2123 | break | |
2124 | fi | |
2125 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
ba479fd2 | 2126 | fi |
5213506e RW |
2127 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2128 | done | |
ba479fd2 | 2129 | else |
5213506e | 2130 | ac_lo= ac_hi= |
ba479fd2 | 2131 | fi |
5213506e RW |
2132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2133 | fi | |
2134 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2135 | # Binary search between lo and hi bounds. | |
2136 | while test "x$ac_lo" != "x$ac_hi"; do | |
2137 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2139 | /* end confdefs.h. */ | |
2140 | $4 | |
2141 | int | |
2142 | main () | |
2143 | { | |
2144 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2145 | test_array [0] = 0 | |
ba479fd2 | 2146 | |
5213506e RW |
2147 | ; |
2148 | return 0; | |
2149 | } | |
2150 | _ACEOF | |
2151 | if ac_fn_c_try_compile "$LINENO"; then : | |
2152 | ac_hi=$ac_mid | |
2153 | else | |
2154 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
ba479fd2 | 2155 | fi |
5213506e RW |
2156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2157 | done | |
2158 | case $ac_lo in #(( | |
2159 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2160 | '') ac_retval=1 ;; | |
2161 | esac | |
2162 | else | |
2163 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2164 | /* end confdefs.h. */ | |
2165 | $4 | |
2166 | static long int longval () { return $2; } | |
2167 | static unsigned long int ulongval () { return $2; } | |
2168 | #include <stdio.h> | |
2169 | #include <stdlib.h> | |
2170 | int | |
2171 | main () | |
2172 | { | |
ba479fd2 | 2173 | |
5213506e RW |
2174 | FILE *f = fopen ("conftest.val", "w"); |
2175 | if (! f) | |
2176 | return 1; | |
2177 | if (($2) < 0) | |
2178 | { | |
2179 | long int i = longval (); | |
2180 | if (i != ($2)) | |
2181 | return 1; | |
2182 | fprintf (f, "%ld", i); | |
2183 | } | |
2184 | else | |
2185 | { | |
2186 | unsigned long int i = ulongval (); | |
2187 | if (i != ($2)) | |
2188 | return 1; | |
2189 | fprintf (f, "%lu", i); | |
2190 | } | |
2191 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2192 | on some platforms. */ | |
2193 | return ferror (f) || fclose (f) != 0; | |
ba479fd2 | 2194 | |
5213506e RW |
2195 | ; |
2196 | return 0; | |
2197 | } | |
2198 | _ACEOF | |
2199 | if ac_fn_c_try_run "$LINENO"; then : | |
2200 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2201 | else | |
2202 | ac_retval=1 | |
2203 | fi | |
2204 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2205 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2206 | rm -f conftest.val | |
ba479fd2 | 2207 | |
5213506e RW |
2208 | fi |
2209 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2210 | return $ac_retval | |
ba479fd2 | 2211 | |
5213506e | 2212 | } # ac_fn_c_compute_int |
ba479fd2 | 2213 | |
5213506e RW |
2214 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2215 | # ------------------------------------------- | |
2216 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2217 | # variable VAR accordingly. | |
2218 | ac_fn_c_check_type () | |
2219 | { | |
2220 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2222 | $as_echo_n "checking for $2... " >&6; } | |
2223 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2224 | $as_echo_n "(cached) " >&6 | |
2225 | else | |
2226 | eval "$3=no" | |
2227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2228 | /* end confdefs.h. */ | |
2229 | $4 | |
2230 | int | |
2231 | main () | |
2232 | { | |
2233 | if (sizeof ($2)) | |
2234 | return 0; | |
2235 | ; | |
2236 | return 0; | |
2237 | } | |
2238 | _ACEOF | |
2239 | if ac_fn_c_try_compile "$LINENO"; then : | |
2240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2241 | /* end confdefs.h. */ | |
2242 | $4 | |
2243 | int | |
2244 | main () | |
2245 | { | |
2246 | if (sizeof (($2))) | |
2247 | return 0; | |
2248 | ; | |
2249 | return 0; | |
2250 | } | |
2251 | _ACEOF | |
2252 | if ac_fn_c_try_compile "$LINENO"; then : | |
ba479fd2 | 2253 | |
5213506e RW |
2254 | else |
2255 | eval "$3=yes" | |
2256 | fi | |
2257 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2258 | fi | |
2259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2260 | fi | |
2261 | eval ac_res=\$$3 | |
2262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2263 | $as_echo "$ac_res" >&6; } | |
2264 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2265 | |
5213506e | 2266 | } # ac_fn_c_check_type |
ba479fd2 | 2267 | |
fa802374 KT |
2268 | # ac_fn_c_find_intX_t LINENO BITS VAR |
2269 | # ----------------------------------- | |
2270 | # Finds a signed integer type with width BITS, setting cache variable VAR | |
2271 | # accordingly. | |
2272 | ac_fn_c_find_intX_t () | |
5213506e RW |
2273 | { |
2274 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
fa802374 KT |
2275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 |
2276 | $as_echo_n "checking for int$2_t... " >&6; } | |
5213506e RW |
2277 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
2278 | $as_echo_n "(cached) " >&6 | |
2279 | else | |
fa802374 KT |
2280 | eval "$3=no" |
2281 | for ac_type in int$2_t 'int' 'long int' \ | |
2282 | 'long long int' 'short int' 'signed char'; do | |
2283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2284 | /* end confdefs.h. */ | |
2285 | $ac_includes_default | |
2286 | int | |
2287 | main () | |
2288 | { | |
2289 | static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))]; | |
2290 | test_array [0] = 0 | |
2291 | ||
2292 | ; | |
2293 | return 0; | |
2294 | } | |
2295 | _ACEOF | |
2296 | if ac_fn_c_try_compile "$LINENO"; then : | |
5213506e RW |
2297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2298 | /* end confdefs.h. */ | |
fa802374 KT |
2299 | $ac_includes_default |
2300 | int | |
2301 | main () | |
2302 | { | |
2303 | static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1) | |
2304 | < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))]; | |
2305 | test_array [0] = 0 | |
2306 | ||
2307 | ; | |
2308 | return 0; | |
2309 | } | |
5213506e | 2310 | _ACEOF |
fa802374 KT |
2311 | if ac_fn_c_try_compile "$LINENO"; then : |
2312 | ||
5213506e | 2313 | else |
fa802374 KT |
2314 | case $ac_type in #( |
2315 | int$2_t) : | |
2316 | eval "$3=yes" ;; #( | |
2317 | *) : | |
2318 | eval "$3=\$ac_type" ;; | |
2319 | esac | |
5213506e | 2320 | fi |
fa802374 KT |
2321 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2322 | fi | |
2323 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2324 | eval as_val=\$$3 | |
2325 | if test "x$as_val" = x""no; then : | |
2326 | ||
2327 | else | |
2328 | break | |
2329 | fi | |
2330 | done | |
5213506e RW |
2331 | fi |
2332 | eval ac_res=\$$3 | |
2333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2334 | $as_echo "$ac_res" >&6; } | |
2335 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2336 | |
fa802374 | 2337 | } # ac_fn_c_find_intX_t |
18c04407 | 2338 | |
5213506e RW |
2339 | # ac_fn_c_try_link LINENO |
2340 | # ----------------------- | |
2341 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2342 | ac_fn_c_try_link () | |
2343 | { | |
2344 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2345 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2346 | if { { ac_try="$ac_link" | |
2347 | case "(($ac_try" in | |
2348 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2349 | *) ac_try_echo=$ac_try;; | |
2350 | esac | |
2351 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2352 | $as_echo "$ac_try_echo"; } >&5 | |
2353 | (eval "$ac_link") 2>conftest.err | |
2354 | ac_status=$? | |
2355 | if test -s conftest.err; then | |
2356 | grep -v '^ *+' conftest.err >conftest.er1 | |
2357 | cat conftest.er1 >&5 | |
2358 | mv -f conftest.er1 conftest.err | |
2359 | fi | |
2360 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2361 | test $ac_status = 0; } && { | |
2362 | test -z "$ac_c_werror_flag" || | |
2363 | test ! -s conftest.err | |
2364 | } && test -s conftest$ac_exeext && { | |
2365 | test "$cross_compiling" = yes || | |
2366 | $as_test_x conftest$ac_exeext | |
2367 | }; then : | |
2368 | ac_retval=0 | |
2369 | else | |
2370 | $as_echo "$as_me: failed program was:" >&5 | |
2371 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18c04407 | 2372 | |
5213506e RW |
2373 | ac_retval=1 |
2374 | fi | |
2375 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2376 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2377 | # interfere with the next link command; also delete a directory that is | |
2378 | # left behind by Apple's compiler. We do this before executing the actions. | |
2379 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2380 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2381 | return $ac_retval | |
18c04407 | 2382 | |
5213506e | 2383 | } # ac_fn_c_try_link |
ba479fd2 | 2384 | |
fa802374 KT |
2385 | # ac_fn_c_find_uintX_t LINENO BITS VAR |
2386 | # ------------------------------------ | |
2387 | # Finds an unsigned integer type with width BITS, setting cache variable VAR | |
2388 | # accordingly. | |
2389 | ac_fn_c_find_uintX_t () | |
2390 | { | |
2391 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 | |
2393 | $as_echo_n "checking for uint$2_t... " >&6; } | |
2394 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2395 | $as_echo_n "(cached) " >&6 | |
2396 | else | |
2397 | eval "$3=no" | |
2398 | for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ | |
2399 | 'unsigned long long int' 'unsigned short int' 'unsigned char'; do | |
2400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2401 | /* end confdefs.h. */ | |
2402 | $ac_includes_default | |
2403 | int | |
2404 | main () | |
2405 | { | |
2406 | static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)]; | |
2407 | test_array [0] = 0 | |
2408 | ||
2409 | ; | |
2410 | return 0; | |
2411 | } | |
2412 | _ACEOF | |
2413 | if ac_fn_c_try_compile "$LINENO"; then : | |
2414 | case $ac_type in #( | |
2415 | uint$2_t) : | |
2416 | eval "$3=yes" ;; #( | |
2417 | *) : | |
2418 | eval "$3=\$ac_type" ;; | |
2419 | esac | |
2420 | fi | |
2421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2422 | eval as_val=\$$3 | |
2423 | if test "x$as_val" = x""no; then : | |
2424 | ||
2425 | else | |
2426 | break | |
2427 | fi | |
2428 | done | |
2429 | fi | |
2430 | eval ac_res=\$$3 | |
2431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2432 | $as_echo "$ac_res" >&6; } | |
2433 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2434 | ||
2435 | } # ac_fn_c_find_uintX_t | |
2436 | ||
2437 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2438 | # ---------------------------------------------- | |
2439 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2440 | ac_fn_c_check_header_preproc () | |
2441 | { | |
2442 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2444 | $as_echo_n "checking for $2... " >&6; } | |
2445 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2446 | $as_echo_n "(cached) " >&6 | |
2447 | else | |
2448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2449 | /* end confdefs.h. */ | |
2450 | #include <$2> | |
2451 | _ACEOF | |
2452 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2453 | eval "$3=yes" | |
2454 | else | |
2455 | eval "$3=no" | |
2456 | fi | |
2457 | rm -f conftest.err conftest.$ac_ext | |
2458 | fi | |
2459 | eval ac_res=\$$3 | |
2460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2461 | $as_echo "$ac_res" >&6; } | |
2462 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2463 | ||
2464 | } # ac_fn_c_check_header_preproc | |
2465 | ||
5213506e RW |
2466 | # ac_fn_c_check_func LINENO FUNC VAR |
2467 | # ---------------------------------- | |
2468 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2469 | ac_fn_c_check_func () | |
2470 | { | |
2471 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2473 | $as_echo_n "checking for $2... " >&6; } | |
2474 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2475 | $as_echo_n "(cached) " >&6 | |
2476 | else | |
2477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2478 | /* end confdefs.h. */ | |
2479 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2480 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2481 | #define $2 innocuous_$2 | |
ba479fd2 | 2482 | |
5213506e RW |
2483 | /* System header to define __stub macros and hopefully few prototypes, |
2484 | which can conflict with char $2 (); below. | |
2485 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2486 | <limits.h> exists even on freestanding compilers. */ | |
914c5af7 | 2487 | |
5213506e RW |
2488 | #ifdef __STDC__ |
2489 | # include <limits.h> | |
2490 | #else | |
2491 | # include <assert.h> | |
2492 | #endif | |
ba479fd2 | 2493 | |
5213506e | 2494 | #undef $2 |
ba479fd2 | 2495 | |
5213506e RW |
2496 | /* Override any GCC internal prototype to avoid an error. |
2497 | Use char because int might match the return type of a GCC | |
2498 | builtin and then its argument prototype would still apply. */ | |
2499 | #ifdef __cplusplus | |
2500 | extern "C" | |
2501 | #endif | |
2502 | char $2 (); | |
2503 | /* The GNU C library defines this for functions which it implements | |
2504 | to always fail with ENOSYS. Some functions are actually named | |
2505 | something starting with __ and the normal name is an alias. */ | |
2506 | #if defined __stub_$2 || defined __stub___$2 | |
2507 | choke me | |
2508 | #endif | |
9f18db39 | 2509 | |
5213506e RW |
2510 | int |
2511 | main () | |
2512 | { | |
2513 | return $2 (); | |
2514 | ; | |
2515 | return 0; | |
2516 | } | |
2517 | _ACEOF | |
2518 | if ac_fn_c_try_link "$LINENO"; then : | |
2519 | eval "$3=yes" | |
2520 | else | |
2521 | eval "$3=no" | |
ba479fd2 | 2522 | fi |
5213506e RW |
2523 | rm -f core conftest.err conftest.$ac_objext \ |
2524 | conftest$ac_exeext conftest.$ac_ext | |
2525 | fi | |
2526 | eval ac_res=\$$3 | |
2527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2528 | $as_echo "$ac_res" >&6; } | |
2529 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
b61ff9c8 | 2530 | |
5213506e | 2531 | } # ac_fn_c_check_func |
b61ff9c8 | 2532 | |
5213506e RW |
2533 | # ac_fn_cxx_try_cpp LINENO |
2534 | # ------------------------ | |
2535 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2536 | ac_fn_cxx_try_cpp () | |
2537 | { | |
2538 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2539 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2540 | case "(($ac_try" in | |
2541 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2542 | *) ac_try_echo=$ac_try;; | |
2543 | esac | |
2544 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2545 | $as_echo "$ac_try_echo"; } >&5 | |
2546 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2547 | ac_status=$? | |
2548 | if test -s conftest.err; then | |
2549 | grep -v '^ *+' conftest.err >conftest.er1 | |
2550 | cat conftest.er1 >&5 | |
2551 | mv -f conftest.er1 conftest.err | |
2552 | fi | |
2553 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2554 | test $ac_status = 0; } >/dev/null && { | |
2555 | test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || | |
2556 | test ! -s conftest.err | |
2557 | }; then : | |
2558 | ac_retval=0 | |
2559 | else | |
2560 | $as_echo "$as_me: failed program was:" >&5 | |
2561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 2562 | |
5213506e | 2563 | ac_retval=1 |
ba479fd2 | 2564 | fi |
5213506e RW |
2565 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
2566 | return $ac_retval | |
b61ff9c8 | 2567 | |
5213506e | 2568 | } # ac_fn_cxx_try_cpp |
b61ff9c8 | 2569 | |
5213506e RW |
2570 | # ac_fn_cxx_try_link LINENO |
2571 | # ------------------------- | |
2572 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2573 | ac_fn_cxx_try_link () | |
2574 | { | |
2575 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2576 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2577 | if { { ac_try="$ac_link" | |
2578 | case "(($ac_try" in | |
2579 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2580 | *) ac_try_echo=$ac_try;; | |
2581 | esac | |
2582 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2583 | $as_echo "$ac_try_echo"; } >&5 | |
2584 | (eval "$ac_link") 2>conftest.err | |
2585 | ac_status=$? | |
2586 | if test -s conftest.err; then | |
2587 | grep -v '^ *+' conftest.err >conftest.er1 | |
2588 | cat conftest.er1 >&5 | |
2589 | mv -f conftest.er1 conftest.err | |
2590 | fi | |
2591 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2592 | test $ac_status = 0; } && { | |
2593 | test -z "$ac_cxx_werror_flag" || | |
2594 | test ! -s conftest.err | |
2595 | } && test -s conftest$ac_exeext && { | |
2596 | test "$cross_compiling" = yes || | |
2597 | $as_test_x conftest$ac_exeext | |
2598 | }; then : | |
2599 | ac_retval=0 | |
2600 | else | |
2601 | $as_echo "$as_me: failed program was:" >&5 | |
2602 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 2603 | |
5213506e | 2604 | ac_retval=1 |
ba479fd2 | 2605 | fi |
5213506e RW |
2606 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
2607 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2608 | # interfere with the next link command; also delete a directory that is | |
2609 | # left behind by Apple's compiler. We do this before executing the actions. | |
2610 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2611 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2612 | return $ac_retval | |
ba479fd2 | 2613 | |
5213506e RW |
2614 | } # ac_fn_cxx_try_link |
2615 | cat >config.log <<_ACEOF | |
2616 | This file contains any messages produced by compilers while | |
2617 | running configure, to aid debugging if configure makes a mistake. | |
ba479fd2 | 2618 | |
5213506e RW |
2619 | It was created by $as_me, which was |
2620 | generated by GNU Autoconf 2.64. Invocation command line was | |
ba479fd2 | 2621 | |
5213506e | 2622 | $ $0 $@ |
18fc9bd4 | 2623 | |
5213506e RW |
2624 | _ACEOF |
2625 | exec 5>>config.log | |
2626 | { | |
2627 | cat <<_ASUNAME | |
2628 | ## --------- ## | |
2629 | ## Platform. ## | |
2630 | ## --------- ## | |
18fc9bd4 | 2631 | |
5213506e RW |
2632 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2633 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2634 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2635 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2636 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2637 | |
5213506e RW |
2638 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2639 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2640 | |
5213506e RW |
2641 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2642 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2643 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2644 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2645 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2646 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2647 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2648 | |
5213506e | 2649 | _ASUNAME |
8f1529e6 | 2650 | |
5213506e RW |
2651 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2652 | for as_dir in $PATH | |
2653 | do | |
2654 | IFS=$as_save_IFS | |
2655 | test -z "$as_dir" && as_dir=. | |
2656 | $as_echo "PATH: $as_dir" | |
2657 | done | |
2658 | IFS=$as_save_IFS | |
57255173 | 2659 | |
5213506e | 2660 | } >&5 |
57255173 | 2661 | |
5213506e | 2662 | cat >&5 <<_ACEOF |
1546bb64 | 2663 | |
18fc9bd4 | 2664 | |
5213506e RW |
2665 | ## ----------- ## |
2666 | ## Core tests. ## | |
2667 | ## ----------- ## | |
73458fb7 | 2668 | |
ba479fd2 | 2669 | _ACEOF |
13c22933 JJ |
2670 | |
2671 | ||
5213506e RW |
2672 | # Keep a trace of the command line. |
2673 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2674 | # Strip out --silent because we don't want to record it for future runs. | |
2675 | # Also quote any args containing shell meta-characters. | |
2676 | # Make two passes to allow for proper duplicate-argument suppression. | |
2677 | ac_configure_args= | |
2678 | ac_configure_args0= | |
2679 | ac_configure_args1= | |
2680 | ac_must_keep_next=false | |
2681 | for ac_pass in 1 2 | |
00020c16 | 2682 | do |
5213506e RW |
2683 | for ac_arg |
2684 | do | |
2685 | case $ac_arg in | |
2686 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2687 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2688 | | -silent | --silent | --silen | --sile | --sil) | |
2689 | continue ;; | |
2690 | *\'*) | |
2691 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2692 | esac | |
2693 | case $ac_pass in | |
2694 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2695 | 2) | |
2696 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2697 | if test $ac_must_keep_next = true; then | |
2698 | ac_must_keep_next=false # Got value, back to normal. | |
2699 | else | |
2700 | case $ac_arg in | |
2701 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2702 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2703 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2704 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2705 | case "$ac_configure_args0 " in | |
2706 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2707 | esac | |
2708 | ;; | |
2709 | -* ) ac_must_keep_next=true ;; | |
2710 | esac | |
2711 | fi | |
2712 | as_fn_append ac_configure_args " '$ac_arg'" | |
2713 | ;; | |
2714 | esac | |
2715 | done | |
00020c16 | 2716 | done |
5213506e RW |
2717 | { ac_configure_args0=; unset ac_configure_args0;} |
2718 | { ac_configure_args1=; unset ac_configure_args1;} | |
60d26958 | 2719 | |
5213506e RW |
2720 | # When interrupted or exit'd, cleanup temporary files, and complete |
2721 | # config.log. We remove comments because anyway the quotes in there | |
2722 | # would cause problems or look ugly. | |
2723 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2724 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2725 | trap 'exit_status=$? | |
2726 | # Save into config.log some information that might help in debugging. | |
2727 | { | |
2728 | echo | |
1a4b763e | 2729 | |
5213506e RW |
2730 | cat <<\_ASBOX |
2731 | ## ---------------- ## | |
2732 | ## Cache variables. ## | |
2733 | ## ---------------- ## | |
2734 | _ASBOX | |
2735 | echo | |
2736 | # The following way of writing the cache mishandles newlines in values, | |
2737 | ( | |
2738 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2739 | eval ac_val=\$$ac_var | |
2740 | case $ac_val in #( | |
2741 | *${as_nl}*) | |
2742 | case $ac_var in #( | |
2743 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2744 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2745 | esac | |
2746 | case $ac_var in #( | |
2747 | _ | IFS | as_nl) ;; #( | |
2748 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2749 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2750 | esac ;; | |
2751 | esac | |
2752 | done | |
2753 | (set) 2>&1 | | |
2754 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2755 | *${as_nl}ac_space=\ *) | |
2756 | sed -n \ | |
2757 | "s/'\''/'\''\\\\'\'''\''/g; | |
2758 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2759 | ;; #( | |
2760 | *) | |
2761 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2762 | ;; | |
2763 | esac | | |
2764 | sort | |
2765 | ) | |
2766 | echo | |
1a4b763e | 2767 | |
5213506e RW |
2768 | cat <<\_ASBOX |
2769 | ## ----------------- ## | |
2770 | ## Output variables. ## | |
2771 | ## ----------------- ## | |
2772 | _ASBOX | |
2773 | echo | |
2774 | for ac_var in $ac_subst_vars | |
2775 | do | |
2776 | eval ac_val=\$$ac_var | |
2777 | case $ac_val in | |
2778 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2779 | esac | |
2780 | $as_echo "$ac_var='\''$ac_val'\''" | |
2781 | done | sort | |
2782 | echo | |
60d26958 | 2783 | |
5213506e RW |
2784 | if test -n "$ac_subst_files"; then |
2785 | cat <<\_ASBOX | |
2786 | ## ------------------- ## | |
2787 | ## File substitutions. ## | |
2788 | ## ------------------- ## | |
2789 | _ASBOX | |
2790 | echo | |
2791 | for ac_var in $ac_subst_files | |
2792 | do | |
2793 | eval ac_val=\$$ac_var | |
2794 | case $ac_val in | |
2795 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2796 | esac | |
2797 | $as_echo "$ac_var='\''$ac_val'\''" | |
2798 | done | sort | |
2799 | echo | |
2800 | fi | |
60d26958 | 2801 | |
5213506e RW |
2802 | if test -s confdefs.h; then |
2803 | cat <<\_ASBOX | |
2804 | ## ----------- ## | |
2805 | ## confdefs.h. ## | |
2806 | ## ----------- ## | |
2807 | _ASBOX | |
2808 | echo | |
2809 | cat confdefs.h | |
2810 | echo | |
2811 | fi | |
2812 | test "$ac_signal" != 0 && | |
2813 | $as_echo "$as_me: caught signal $ac_signal" | |
2814 | $as_echo "$as_me: exit $exit_status" | |
2815 | } >&5 | |
2816 | rm -f core *.core core.conftest.* && | |
2817 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2818 | exit $exit_status | |
2819 | ' 0 | |
2820 | for ac_signal in 1 2 13 15; do | |
2821 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
00020c16 | 2822 | done |
5213506e | 2823 | ac_signal=0 |
00020c16 | 2824 | |
5213506e RW |
2825 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
2826 | rm -f -r conftest* confdefs.h | |
00020c16 | 2827 | |
5213506e RW |
2828 | $as_echo "/* confdefs.h */" > confdefs.h |
2829 | ||
2830 | # Predefined preprocessor variables. | |
2831 | ||
2832 | cat >>confdefs.h <<_ACEOF | |
2833 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
60d26958 | 2834 | _ACEOF |
60d26958 | 2835 | |
5213506e RW |
2836 | cat >>confdefs.h <<_ACEOF |
2837 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2838 | _ACEOF | |
60d26958 | 2839 | |
5213506e RW |
2840 | cat >>confdefs.h <<_ACEOF |
2841 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
60d26958 | 2842 | _ACEOF |
5213506e RW |
2843 | |
2844 | cat >>confdefs.h <<_ACEOF | |
2845 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
60d26958 | 2846 | _ACEOF |
60d26958 | 2847 | |
5213506e RW |
2848 | cat >>confdefs.h <<_ACEOF |
2849 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2850 | _ACEOF | |
60d26958 | 2851 | |
5213506e RW |
2852 | cat >>confdefs.h <<_ACEOF |
2853 | #define PACKAGE_URL "$PACKAGE_URL" | |
2854 | _ACEOF | |
00020c16 | 2855 | |
60d26958 | 2856 | |
5213506e RW |
2857 | # Let the site file select an alternate cache file if it wants to. |
2858 | # Prefer an explicitly selected file to automatically selected ones. | |
2859 | ac_site_file1=NONE | |
2860 | ac_site_file2=NONE | |
2861 | if test -n "$CONFIG_SITE"; then | |
2862 | ac_site_file1=$CONFIG_SITE | |
2863 | elif test "x$prefix" != xNONE; then | |
2864 | ac_site_file1=$prefix/share/config.site | |
2865 | ac_site_file2=$prefix/etc/config.site | |
2866 | else | |
2867 | ac_site_file1=$ac_default_prefix/share/config.site | |
2868 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2869 | fi | |
2870 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
00020c16 | 2871 | do |
5213506e RW |
2872 | test "x$ac_site_file" = xNONE && continue |
2873 | if test -r "$ac_site_file"; then | |
2874 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2875 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2876 | sed 's/^/| /' "$ac_site_file" >&5 | |
2877 | . "$ac_site_file" | |
60d26958 | 2878 | fi |
5213506e | 2879 | done |
60d26958 | 2880 | |
5213506e RW |
2881 | if test -r "$cache_file"; then |
2882 | # Some versions of bash will fail to source /dev/null (special | |
2883 | # files actually), so we avoid doing that. | |
2884 | if test -f "$cache_file"; then | |
2885 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2886 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2887 | case $cache_file in | |
2888 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2889 | *) . "./$cache_file";; | |
2890 | esac | |
60d26958 PB |
2891 | fi |
2892 | else | |
5213506e RW |
2893 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2894 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2895 | >$cache_file | |
bf3b7cd3 JD |
2896 | fi |
2897 | ||
5213506e RW |
2898 | # Check that the precious variables saved in the cache have kept the same |
2899 | # value. | |
2900 | ac_cache_corrupted=false | |
2901 | for ac_var in $ac_precious_vars; do | |
2902 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2903 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2904 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2905 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2906 | case $ac_old_set,$ac_new_set in | |
2907 | set,) | |
2908 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2909 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2910 | ac_cache_corrupted=: ;; | |
2911 | ,set) | |
2912 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2913 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2914 | ac_cache_corrupted=: ;; | |
2915 | ,);; | |
2916 | *) | |
2917 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2918 | # differences in whitespace do not lead to failure. | |
2919 | ac_old_val_w=`echo x $ac_old_val` | |
2920 | ac_new_val_w=`echo x $ac_new_val` | |
2921 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2922 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2923 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2924 | ac_cache_corrupted=: | |
2925 | else | |
2926 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2927 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2928 | eval $ac_var=\$ac_old_val | |
2929 | fi | |
2930 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2931 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2932 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2933 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2934 | fi;; | |
2935 | esac | |
2936 | # Pass precious variables to config.status. | |
2937 | if test "$ac_new_set" = set; then | |
2938 | case $ac_new_val in | |
2939 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2940 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2941 | esac | |
2942 | case " $ac_configure_args " in | |
2943 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2944 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2945 | esac | |
2946 | fi | |
60d26958 | 2947 | done |
5213506e RW |
2948 | if $ac_cache_corrupted; then |
2949 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2950 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2951 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2952 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2953 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
60d26958 | 2954 | fi |
5213506e RW |
2955 | ## -------------------- ## |
2956 | ## Main body of script. ## | |
2957 | ## -------------------- ## | |
60d26958 | 2958 | |
00020c16 ILT |
2959 | ac_ext=c |
2960 | ac_cpp='$CPP $CPPFLAGS' | |
2961 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2962 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2963 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
60d26958 | 2964 | |
00020c16 | 2965 | |
bf3b7cd3 | 2966 | |
bf3b7cd3 | 2967 | |
00020c16 | 2968 | |
bf3b7cd3 | 2969 | |
5213506e | 2970 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
bf3b7cd3 | 2971 | |
bf3b7cd3 | 2972 | |
5213506e | 2973 | gcc_version=`cat $srcdir/BASE-VER` |
bf3b7cd3 | 2974 | |
5213506e RW |
2975 | # Determine the host, build, and target systems |
2976 | ac_aux_dir= | |
2977 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2978 | for ac_t in install-sh install.sh shtool; do | |
2979 | if test -f "$ac_dir/$ac_t"; then | |
2980 | ac_aux_dir=$ac_dir | |
2981 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
2982 | break 2 | |
2983 | fi | |
2984 | done | |
2985 | done | |
2986 | if test -z "$ac_aux_dir"; then | |
2987 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
00020c16 | 2988 | fi |
5213506e RW |
2989 | |
2990 | # These three variables are undocumented and unsupported, | |
2991 | # and are intended to be withdrawn in a future Autoconf release. | |
2992 | # They can cause serious problems if a builder's source tree is in a directory | |
2993 | # whose full name contains unusual characters. | |
2994 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2995 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2996 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2997 | ||
2998 | ||
2999 | # Make sure we can run config.sub. | |
3000 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3001 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3002 | ||
3003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3004 | $as_echo_n "checking build system type... " >&6; } | |
3005 | if test "${ac_cv_build+set}" = set; then : | |
3006 | $as_echo_n "(cached) " >&6 | |
3007 | else | |
3008 | ac_build_alias=$build_alias | |
3009 | test "x$ac_build_alias" = x && | |
3010 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3011 | test "x$ac_build_alias" = x && | |
3012 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3013 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3014 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3015 | ||
3016 | fi | |
3017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3018 | $as_echo "$ac_cv_build" >&6; } | |
3019 | case $ac_cv_build in | |
3020 | *-*-*) ;; | |
3021 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3022 | esac | |
3023 | build=$ac_cv_build | |
3024 | ac_save_IFS=$IFS; IFS='-' | |
3025 | set x $ac_cv_build | |
3026 | shift | |
3027 | build_cpu=$1 | |
3028 | build_vendor=$2 | |
3029 | shift; shift | |
3030 | # Remember, the first character of IFS is used to create $*, | |
3031 | # except with old shells: | |
3032 | build_os=$* | |
3033 | IFS=$ac_save_IFS | |
3034 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3035 | ||
3036 | ||
3037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3038 | $as_echo_n "checking host system type... " >&6; } | |
3039 | if test "${ac_cv_host+set}" = set; then : | |
3040 | $as_echo_n "(cached) " >&6 | |
3041 | else | |
3042 | if test "x$host_alias" = x; then | |
3043 | ac_cv_host=$ac_cv_build | |
3044 | else | |
3045 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3046 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
00020c16 | 3047 | fi |
5213506e | 3048 | |
00020c16 | 3049 | fi |
5213506e RW |
3050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
3051 | $as_echo "$ac_cv_host" >&6; } | |
3052 | case $ac_cv_host in | |
3053 | *-*-*) ;; | |
3054 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3055 | esac | |
3056 | host=$ac_cv_host | |
3057 | ac_save_IFS=$IFS; IFS='-' | |
3058 | set x $ac_cv_host | |
3059 | shift | |
3060 | host_cpu=$1 | |
3061 | host_vendor=$2 | |
3062 | shift; shift | |
3063 | # Remember, the first character of IFS is used to create $*, | |
3064 | # except with old shells: | |
3065 | host_os=$* | |
3066 | IFS=$ac_save_IFS | |
3067 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
00020c16 | 3068 | |
bf3b7cd3 | 3069 | |
5213506e RW |
3070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
3071 | $as_echo_n "checking target system type... " >&6; } | |
3072 | if test "${ac_cv_target+set}" = set; then : | |
3073 | $as_echo_n "(cached) " >&6 | |
3074 | else | |
3075 | if test "x$target_alias" = x; then | |
3076 | ac_cv_target=$ac_cv_host | |
3077 | else | |
3078 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
3079 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
bf3b7cd3 JD |
3080 | fi |
3081 | ||
5213506e RW |
3082 | fi |
3083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
3084 | $as_echo "$ac_cv_target" >&6; } | |
3085 | case $ac_cv_target in | |
3086 | *-*-*) ;; | |
3087 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
3088 | esac | |
3089 | target=$ac_cv_target | |
3090 | ac_save_IFS=$IFS; IFS='-' | |
3091 | set x $ac_cv_target | |
3092 | shift | |
3093 | target_cpu=$1 | |
3094 | target_vendor=$2 | |
3095 | shift; shift | |
3096 | # Remember, the first character of IFS is used to create $*, | |
3097 | # except with old shells: | |
3098 | target_os=$* | |
3099 | IFS=$ac_save_IFS | |
3100 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
60d26958 | 3101 | |
bf3b7cd3 | 3102 | |
5213506e RW |
3103 | # The aliases save the names the user supplied, while $host etc. |
3104 | # will get canonicalized. | |
3105 | test -n "$target_alias" && | |
3106 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
3107 | NONENONEs,x,x, && | |
3108 | program_prefix=${target_alias}- | |
bf3b7cd3 | 3109 | |
5213506e RW |
3110 | # Determine the noncanonical target name, for directory use. |
3111 | case ${build_alias} in | |
3112 | "") build_noncanonical=${build} ;; | |
3113 | *) build_noncanonical=${build_alias} ;; | |
3114 | esac | |
00020c16 | 3115 | |
5213506e RW |
3116 | case ${host_alias} in |
3117 | "") host_noncanonical=${build_noncanonical} ;; | |
3118 | *) host_noncanonical=${host_alias} ;; | |
3119 | esac | |
00020c16 | 3120 | |
5213506e RW |
3121 | case ${target_alias} in |
3122 | "") target_noncanonical=${host_noncanonical} ;; | |
3123 | *) target_noncanonical=${target_alias} ;; | |
3124 | esac | |
00020c16 ILT |
3125 | |
3126 | ||
3127 | ||
3128 | ||
5213506e | 3129 | # Determine the target- and build-specific subdirectories |
00020c16 | 3130 | |
5213506e RW |
3131 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to |
3132 | # have matching libraries, they should use host libraries: Makefile.tpl | |
3133 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
3134 | # However, they still use the build modules, because the corresponding | |
3135 | # host modules (e.g. bison) are only built for the host when bootstrap | |
3136 | # finishes. So: | |
3137 | # - build_subdir is where we find build modules, and never changes. | |
3138 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
bf3b7cd3 | 3139 | |
5213506e RW |
3140 | # Prefix 'build-' so this never conflicts with target_subdir. |
3141 | build_subdir="build-${build_noncanonical}" | |
3142 | ||
3143 | # Check whether --with-build-libsubdir was given. | |
3144 | if test "${with_build_libsubdir+set}" = set; then : | |
3145 | withval=$with_build_libsubdir; build_libsubdir="$withval" | |
3146 | else | |
3147 | build_libsubdir="$build_subdir" | |
bf3b7cd3 | 3148 | fi |
bf3b7cd3 | 3149 | |
5213506e RW |
3150 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
3151 | if ( test $srcdir = . && test -d gcc ) \ | |
3152 | || test -d $srcdir/../host-${host_noncanonical}; then | |
3153 | host_subdir="host-${host_noncanonical}" | |
3154 | else | |
3155 | host_subdir=. | |
00020c16 | 3156 | fi |
5213506e RW |
3157 | # No prefix. |
3158 | target_subdir=${target_noncanonical} | |
00020c16 | 3159 | |
00020c16 | 3160 | |
5213506e RW |
3161 | # Set program_transform_name |
3162 | test "$program_prefix" != NONE && | |
3163 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3164 | # Use a double $ so make ignores it. | |
3165 | test "$program_suffix" != NONE && | |
3166 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3167 | # Double any \ or $. | |
3168 | # By default was `s,x,x', remove it if useless. | |
3169 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3170 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
00020c16 ILT |
3171 | |
3172 | ||
5213506e RW |
3173 | # Check for bogus environment variables. |
3174 | # Test if LIBRARY_PATH contains the notation for the current directory | |
3175 | # since this would lead to problems installing/building glibc. | |
3176 | # LIBRARY_PATH contains the current directory if one of the following | |
3177 | # is true: | |
3178 | # - one of the terminals (":" and ";") is the first or last sign | |
3179 | # - two terminals occur directly after each other | |
3180 | # - the path contains an element with a dot in it | |
3181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5 | |
3182 | $as_echo_n "checking LIBRARY_PATH variable... " >&6; } | |
3183 | case ${LIBRARY_PATH} in | |
3184 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
3185 | library_path_setting="contains current directory" | |
3186 | ;; | |
3187 | *) | |
3188 | library_path_setting="ok" | |
3189 | ;; | |
3190 | esac | |
3191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5 | |
3192 | $as_echo "$library_path_setting" >&6; } | |
3193 | if test "$library_path_setting" != "ok"; then | |
3194 | as_fn_error " | |
3195 | *** LIBRARY_PATH shouldn't contain the current directory when | |
3196 | *** building gcc. Please change the environment variable | |
3197 | *** and run configure again." "$LINENO" 5 | |
00020c16 | 3198 | fi |
00020c16 | 3199 | |
5213506e RW |
3200 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
3201 | # since this would lead to problems installing/building glibc. | |
3202 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
3203 | # is true: | |
3204 | # - one of the terminals (":" and ";") is the first or last sign | |
3205 | # - two terminals occur directly after each other | |
3206 | # - the path contains an element with a dot in it | |
3207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5 | |
3208 | $as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; } | |
3209 | case ${GCC_EXEC_PREFIX} in | |
3210 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
3211 | gcc_exec_prefix_setting="contains current directory" | |
3212 | ;; | |
3213 | *) | |
3214 | gcc_exec_prefix_setting="ok" | |
3215 | ;; | |
3216 | esac | |
3217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5 | |
3218 | $as_echo "$gcc_exec_prefix_setting" >&6; } | |
3219 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
3220 | as_fn_error " | |
3221 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
3222 | *** building gcc. Please change the environment variable | |
3223 | *** and run configure again." "$LINENO" 5 | |
00020c16 | 3224 | fi |
00020c16 | 3225 | |
5213506e RW |
3226 | # ----------- |
3227 | # Directories | |
3228 | # ----------- | |
3229 | ||
3230 | # Specify the local prefix | |
3231 | local_prefix= | |
3232 | ||
3233 | # Check whether --with-local-prefix was given. | |
3234 | if test "${with_local_prefix+set}" = set; then : | |
3235 | withval=$with_local_prefix; case "${withval}" in | |
3236 | yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;; | |
3237 | no) ;; | |
3238 | *) local_prefix=$with_local_prefix ;; | |
3239 | esac | |
00020c16 | 3240 | fi |
bf3b7cd3 | 3241 | |
5213506e RW |
3242 | |
3243 | # Default local prefix if it is empty | |
3244 | if test x$local_prefix = x; then | |
3245 | local_prefix=/usr/local | |
bf3b7cd3 | 3246 | fi |
00020c16 | 3247 | |
5213506e RW |
3248 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
3249 | # passed in by the toplevel make and thus we'd get different behavior | |
3250 | # depending on where we built the sources. | |
3251 | gcc_gxx_include_dir= | |
3252 | # Specify the g++ header file directory | |
3253 | ||
3254 | # Check whether --with-gxx-include-dir was given. | |
3255 | if test "${with_gxx_include_dir+set}" = set; then : | |
3256 | withval=$with_gxx_include_dir; case "${withval}" in | |
3257 | yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;; | |
3258 | no) ;; | |
3259 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
00020c16 | 3260 | esac |
00020c16 | 3261 | fi |
bf3b7cd3 | 3262 | |
5213506e RW |
3263 | |
3264 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. | |
3265 | if test x${gcc_gxx_include_dir} = x; then | |
3266 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
3267 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
3268 | else | |
3269 | libstdcxx_incdir='include/c++/$(version)' | |
3270 | if test x$host != x$target; then | |
3271 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
3272 | fi | |
3273 | gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" | |
3274 | fi | |
00020c16 ILT |
3275 | fi |
3276 | ||
3277 | ||
5213506e RW |
3278 | # Check whether --with-cpp_install_dir was given. |
3279 | if test "${with_cpp_install_dir+set}" = set; then : | |
3280 | withval=$with_cpp_install_dir; if test x$withval = xyes; then | |
3281 | as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5 | |
3282 | elif test x$withval != xno; then | |
3283 | cpp_install_dir=$withval | |
3284 | fi | |
3285 | fi | |
00020c16 | 3286 | |
00020c16 | 3287 | |
5213506e RW |
3288 | # We would like to our source tree to be readonly. However when releases or |
3289 | # pre-releases are generated, the flex/bison generated files as well as the | |
3290 | # various formats of manuals need to be included along with the rest of the | |
3291 | # sources. Therefore we have --enable-generated-files-in-srcdir to do | |
3292 | # just that. | |
00020c16 | 3293 | |
5213506e RW |
3294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5 |
3295 | $as_echo_n "checking whether to place generated files in the source directory... " >&6; } | |
3296 | # Check whether --enable-generated-files-in-srcdir was given. | |
3297 | if test "${enable_generated_files_in_srcdir+set}" = set; then : | |
3298 | enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval | |
3299 | else | |
3300 | generated_files_in_srcdir=no | |
3301 | fi | |
00020c16 ILT |
3302 | |
3303 | ||
5213506e RW |
3304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5 |
3305 | $as_echo "$generated_files_in_srcdir" >&6; } | |
00020c16 | 3306 | |
5213506e RW |
3307 | if test "$generated_files_in_srcdir" = "yes"; then |
3308 | GENINSRC='' | |
3309 | else | |
3310 | GENINSRC='#' | |
3311 | fi | |
00020c16 ILT |
3312 | |
3313 | ||
5213506e RW |
3314 | # ------------------- |
3315 | # Find default linker | |
3316 | # ------------------- | |
3317 | ||
3318 | # With GNU ld | |
00020c16 | 3319 | |
5213506e RW |
3320 | # Check whether --with-gnu-ld was given. |
3321 | if test "${with_gnu_ld+set}" = set; then : | |
3322 | withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld" | |
00020c16 | 3323 | else |
5213506e RW |
3324 | gnu_ld_flag=no |
3325 | fi | |
00020c16 | 3326 | |
bf3b7cd3 | 3327 | |
5213506e | 3328 | # With pre-defined ld |
00020c16 | 3329 | |
5213506e RW |
3330 | # Check whether --with-ld was given. |
3331 | if test "${with_ld+set}" = set; then : | |
3332 | withval=$with_ld; DEFAULT_LINKER="$with_ld" | |
00020c16 | 3333 | fi |
00020c16 | 3334 | |
5213506e RW |
3335 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
3336 | if test ! -x "$DEFAULT_LINKER"; then | |
3337 | as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5 | |
3338 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
3339 | gnu_ld_flag=yes | |
3340 | fi | |
3341 | ||
3342 | cat >>confdefs.h <<_ACEOF | |
3343 | #define DEFAULT_LINKER "$DEFAULT_LINKER" | |
00020c16 ILT |
3344 | _ACEOF |
3345 | ||
5213506e | 3346 | fi |
00020c16 | 3347 | |
5213506e | 3348 | gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi` |
00020c16 | 3349 | |
5213506e RW |
3350 | cat >>confdefs.h <<_ACEOF |
3351 | #define HAVE_GNU_LD $gnu_ld | |
00020c16 ILT |
3352 | _ACEOF |
3353 | ||
3354 | ||
5213506e RW |
3355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5 |
3356 | $as_echo_n "checking whether a default linker was specified... " >&6; } | |
3357 | if test x"${DEFAULT_LINKER+set}" = x"set"; then | |
3358 | if test x"$gnu_ld_flag" = x"no"; then | |
3359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5 | |
3360 | $as_echo "yes ($DEFAULT_LINKER)" >&6; } | |
00020c16 | 3361 | else |
5213506e RW |
3362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
3363 | $as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; } | |
00020c16 | 3364 | fi |
bf3b7cd3 | 3365 | else |
5213506e RW |
3366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3367 | $as_echo "no" >&6; } | |
bf3b7cd3 | 3368 | fi |
bf3b7cd3 | 3369 | |
5213506e | 3370 | # With demangler in GNU ld |
00020c16 | 3371 | |
5213506e RW |
3372 | # Check whether --with-demangler-in-ld was given. |
3373 | if test "${with_demangler_in_ld+set}" = set; then : | |
3374 | withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" | |
00020c16 | 3375 | else |
5213506e | 3376 | demangler_in_ld=no |
00020c16 | 3377 | fi |
bf3b7cd3 | 3378 | |
00020c16 | 3379 | |
5213506e RW |
3380 | # ---------------------- |
3381 | # Find default assembler | |
3382 | # ---------------------- | |
00020c16 | 3383 | |
5213506e | 3384 | # With GNU as |
00020c16 | 3385 | |
5213506e RW |
3386 | # Check whether --with-gnu-as was given. |
3387 | if test "${with_gnu_as+set}" = set; then : | |
3388 | withval=$with_gnu_as; gas_flag="$with_gnu_as" | |
00020c16 | 3389 | else |
5213506e | 3390 | gas_flag=no |
00020c16 | 3391 | fi |
00020c16 | 3392 | |
5213506e RW |
3393 | |
3394 | ||
3395 | # Check whether --with-as was given. | |
3396 | if test "${with_as+set}" = set; then : | |
3397 | withval=$with_as; DEFAULT_ASSEMBLER="$with_as" | |
00020c16 | 3398 | fi |
00020c16 | 3399 | |
5213506e RW |
3400 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
3401 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
3402 | as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5 | |
3403 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
3404 | gas_flag=yes | |
3405 | fi | |
3406 | ||
3407 | cat >>confdefs.h <<_ACEOF | |
3408 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" | |
00020c16 | 3409 | _ACEOF |
5213506e RW |
3410 | |
3411 | fi | |
3412 | ||
3413 | gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi` | |
3414 | ||
3415 | cat >>confdefs.h <<_ACEOF | |
3416 | #define HAVE_GNU_AS $gnu_as | |
00020c16 | 3417 | _ACEOF |
5213506e RW |
3418 | |
3419 | ||
3420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5 | |
3421 | $as_echo_n "checking whether a default assembler was specified... " >&6; } | |
3422 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then | |
3423 | if test x"$gas_flag" = x"no"; then | |
3424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5 | |
3425 | $as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; } | |
00020c16 | 3426 | else |
5213506e RW |
3427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
3428 | $as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } | |
00020c16 | 3429 | fi |
bf3b7cd3 | 3430 | else |
5213506e RW |
3431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3432 | $as_echo "no" >&6; } | |
00020c16 | 3433 | fi |
bf3b7cd3 | 3434 | |
5213506e RW |
3435 | # --------------- |
3436 | # Find C compiler | |
3437 | # --------------- | |
00020c16 | 3438 | |
5213506e RW |
3439 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
3440 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
3441 | # file, even when creating an executable, so an execution test fails. | |
3442 | # Remove possible default executable files to avoid this. | |
3443 | # | |
3444 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
3445 | # Autoconf includes it. | |
3446 | rm -f a.out a.exe b.out | |
bf3b7cd3 | 3447 | |
5213506e | 3448 | # Find the native compiler |
00020c16 ILT |
3449 | ac_ext=c |
3450 | ac_cpp='$CPP $CPPFLAGS' | |
3451 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3452 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3453 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5213506e RW |
3454 | if test -n "$ac_tool_prefix"; then |
3455 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3456 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3458 | $as_echo_n "checking for $ac_word... " >&6; } | |
3459 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3460 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3461 | else |
5213506e RW |
3462 | if test -n "$CC"; then |
3463 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3464 | else | |
3465 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3466 | for as_dir in $PATH | |
3467 | do | |
3468 | IFS=$as_save_IFS | |
3469 | test -z "$as_dir" && as_dir=. | |
3470 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3471 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3472 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3473 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3474 | break 2 | |
3475 | fi | |
3476 | done | |
3477 | done | |
3478 | IFS=$as_save_IFS | |
00020c16 | 3479 | |
5213506e RW |
3480 | fi |
3481 | fi | |
3482 | CC=$ac_cv_prog_CC | |
3483 | if test -n "$CC"; then | |
3484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3485 | $as_echo "$CC" >&6; } | |
bf3b7cd3 | 3486 | else |
5213506e RW |
3487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3488 | $as_echo "no" >&6; } | |
3489 | fi | |
3490 | ||
bf3b7cd3 | 3491 | |
bf3b7cd3 | 3492 | fi |
5213506e RW |
3493 | if test -z "$ac_cv_prog_CC"; then |
3494 | ac_ct_CC=$CC | |
3495 | # Extract the first word of "gcc", so it can be a program name with args. | |
3496 | set dummy gcc; ac_word=$2 | |
3497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3498 | $as_echo_n "checking for $ac_word... " >&6; } | |
3499 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3500 | $as_echo_n "(cached) " >&6 | |
3501 | else | |
3502 | if test -n "$ac_ct_CC"; then | |
3503 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3504 | else | |
3505 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3506 | for as_dir in $PATH | |
3507 | do | |
3508 | IFS=$as_save_IFS | |
3509 | test -z "$as_dir" && as_dir=. | |
3510 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3511 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3512 | ac_cv_prog_ac_ct_CC="gcc" | |
3513 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3514 | break 2 | |
3515 | fi | |
00020c16 | 3516 | done |
5213506e RW |
3517 | done |
3518 | IFS=$as_save_IFS | |
00020c16 | 3519 | |
bf3b7cd3 | 3520 | fi |
5213506e RW |
3521 | fi |
3522 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3523 | if test -n "$ac_ct_CC"; then | |
3524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3525 | $as_echo "$ac_ct_CC" >&6; } | |
3526 | else | |
3527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3528 | $as_echo "no" >&6; } | |
3529 | fi | |
00020c16 | 3530 | |
5213506e RW |
3531 | if test "x$ac_ct_CC" = x; then |
3532 | CC="" | |
3533 | else | |
3534 | case $cross_compiling:$ac_tool_warned in | |
3535 | yes:) | |
3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3537 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3538 | ac_tool_warned=yes ;; | |
3539 | esac | |
3540 | CC=$ac_ct_CC | |
3541 | fi | |
3542 | else | |
3543 | CC="$ac_cv_prog_CC" | |
3544 | fi | |
00020c16 | 3545 | |
5213506e RW |
3546 | if test -z "$CC"; then |
3547 | if test -n "$ac_tool_prefix"; then | |
3548 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3549 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3551 | $as_echo_n "checking for $ac_word... " >&6; } | |
3552 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3553 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3554 | else |
5213506e RW |
3555 | if test -n "$CC"; then |
3556 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
00020c16 | 3557 | else |
5213506e RW |
3558 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3559 | for as_dir in $PATH | |
3560 | do | |
3561 | IFS=$as_save_IFS | |
3562 | test -z "$as_dir" && as_dir=. | |
3563 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3564 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3565 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
3566 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3567 | break 2 | |
3568 | fi | |
3569 | done | |
3570 | done | |
3571 | IFS=$as_save_IFS | |
00020c16 | 3572 | |
00020c16 | 3573 | fi |
00020c16 | 3574 | fi |
5213506e RW |
3575 | CC=$ac_cv_prog_CC |
3576 | if test -n "$CC"; then | |
3577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3578 | $as_echo "$CC" >&6; } | |
00020c16 | 3579 | else |
5213506e RW |
3580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3581 | $as_echo "no" >&6; } | |
3582 | fi | |
bf3b7cd3 | 3583 | |
bf3b7cd3 | 3584 | |
5213506e RW |
3585 | fi |
3586 | fi | |
3587 | if test -z "$CC"; then | |
3588 | # Extract the first word of "cc", so it can be a program name with args. | |
3589 | set dummy cc; ac_word=$2 | |
3590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3591 | $as_echo_n "checking for $ac_word... " >&6; } | |
3592 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3593 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3594 | else |
5213506e RW |
3595 | if test -n "$CC"; then |
3596 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3597 | else | |
3598 | ac_prog_rejected=no | |
3599 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3600 | for as_dir in $PATH | |
3601 | do | |
3602 | IFS=$as_save_IFS | |
3603 | test -z "$as_dir" && as_dir=. | |
3604 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3605 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3606 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3607 | ac_prog_rejected=yes | |
3608 | continue | |
3609 | fi | |
3610 | ac_cv_prog_CC="cc" | |
3611 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3612 | break 2 | |
3613 | fi | |
3614 | done | |
3615 | done | |
3616 | IFS=$as_save_IFS | |
bf3b7cd3 | 3617 | |
5213506e RW |
3618 | if test $ac_prog_rejected = yes; then |
3619 | # We found a bogon in the path, so make sure we never use it. | |
3620 | set dummy $ac_cv_prog_CC | |
3621 | shift | |
3622 | if test $# != 0; then | |
3623 | # We chose a different compiler from the bogus one. | |
3624 | # However, it has the same basename, so the bogon will be chosen | |
3625 | # first if we set CC to just the basename; use the full file name. | |
3626 | shift | |
3627 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3628 | fi | |
bf3b7cd3 | 3629 | fi |
5213506e RW |
3630 | fi |
3631 | fi | |
3632 | CC=$ac_cv_prog_CC | |
3633 | if test -n "$CC"; then | |
3634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3635 | $as_echo "$CC" >&6; } | |
bf3b7cd3 | 3636 | else |
5213506e RW |
3637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3638 | $as_echo "no" >&6; } | |
3639 | fi | |
bf3b7cd3 | 3640 | |
bf3b7cd3 | 3641 | |
5213506e RW |
3642 | fi |
3643 | if test -z "$CC"; then | |
3644 | if test -n "$ac_tool_prefix"; then | |
3645 | for ac_prog in cl.exe | |
3646 | do | |
3647 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3648 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3650 | $as_echo_n "checking for $ac_word... " >&6; } | |
3651 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3652 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3653 | else |
5213506e RW |
3654 | if test -n "$CC"; then |
3655 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3656 | else | |
3657 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3658 | for as_dir in $PATH | |
3659 | do | |
3660 | IFS=$as_save_IFS | |
3661 | test -z "$as_dir" && as_dir=. | |
3662 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3663 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3664 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3665 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3666 | break 2 | |
3667 | fi | |
3668 | done | |
3669 | done | |
3670 | IFS=$as_save_IFS | |
bf3b7cd3 | 3671 | |
bf3b7cd3 | 3672 | fi |
5213506e RW |
3673 | fi |
3674 | CC=$ac_cv_prog_CC | |
3675 | if test -n "$CC"; then | |
3676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3677 | $as_echo "$CC" >&6; } | |
3678 | else | |
3679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3680 | $as_echo "no" >&6; } | |
3681 | fi | |
3682 | ||
3683 | ||
3684 | test -n "$CC" && break | |
bf3b7cd3 | 3685 | done |
5213506e RW |
3686 | fi |
3687 | if test -z "$CC"; then | |
3688 | ac_ct_CC=$CC | |
3689 | for ac_prog in cl.exe | |
3690 | do | |
3691 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3692 | set dummy $ac_prog; ac_word=$2 | |
3693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3694 | $as_echo_n "checking for $ac_word... " >&6; } | |
3695 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3696 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3697 | else |
5213506e RW |
3698 | if test -n "$ac_ct_CC"; then |
3699 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3700 | else | |
3701 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3702 | for as_dir in $PATH | |
3703 | do | |
3704 | IFS=$as_save_IFS | |
3705 | test -z "$as_dir" && as_dir=. | |
3706 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3707 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3708 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3709 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3710 | break 2 | |
3711 | fi | |
3712 | done | |
3713 | done | |
3714 | IFS=$as_save_IFS | |
bf3b7cd3 | 3715 | |
bf3b7cd3 | 3716 | fi |
bf3b7cd3 | 3717 | fi |
5213506e RW |
3718 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
3719 | if test -n "$ac_ct_CC"; then | |
3720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3721 | $as_echo "$ac_ct_CC" >&6; } | |
bf3b7cd3 | 3722 | else |
5213506e RW |
3723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3724 | $as_echo "no" >&6; } | |
3725 | fi | |
3726 | ||
3727 | ||
3728 | test -n "$ac_ct_CC" && break | |
3729 | done | |
3730 | ||
3731 | if test "x$ac_ct_CC" = x; then | |
3732 | CC="" | |
3733 | else | |
3734 | case $cross_compiling:$ac_tool_warned in | |
3735 | yes:) | |
3736 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3737 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3738 | ac_tool_warned=yes ;; | |
3739 | esac | |
3740 | CC=$ac_ct_CC | |
3741 | fi | |
3742 | fi | |
bf3b7cd3 | 3743 | |
bf3b7cd3 | 3744 | fi |
5213506e RW |
3745 | |
3746 | ||
3747 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3748 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3749 | as_fn_error "no acceptable C compiler found in \$PATH | |
3750 | See \`config.log' for more details." "$LINENO" 5; } | |
3751 | ||
3752 | # Provide some information about the compiler. | |
3753 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3754 | set X $ac_compile | |
3755 | ac_compiler=$2 | |
3756 | for ac_option in --version -v -V -qversion; do | |
3757 | { { ac_try="$ac_compiler $ac_option >&5" | |
3758 | case "(($ac_try" in | |
3759 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3760 | *) ac_try_echo=$ac_try;; | |
bf3b7cd3 | 3761 | esac |
5213506e RW |
3762 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3763 | $as_echo "$ac_try_echo"; } >&5 | |
3764 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3765 | ac_status=$? | |
3766 | if test -s conftest.err; then | |
3767 | sed '10a\ | |
3768 | ... rest of stderr output deleted ... | |
3769 | 10q' conftest.err >conftest.er1 | |
3770 | cat conftest.er1 >&5 | |
3771 | rm -f conftest.er1 conftest.err | |
3772 | fi | |
3773 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3774 | test $ac_status = 0; } | |
3775 | done | |
3776 | ||
3777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 3778 | /* end confdefs.h. */ |
5213506e | 3779 | |
bf3b7cd3 JD |
3780 | int |
3781 | main () | |
3782 | { | |
3783 | ||
bf3b7cd3 JD |
3784 | ; |
3785 | return 0; | |
3786 | } | |
3787 | _ACEOF | |
5213506e RW |
3788 | ac_clean_files_save=$ac_clean_files |
3789 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" | |
3790 | # Try to create an executable without -o first, disregard a.out. | |
3791 | # It will help us diagnose broken compilers, and finding out an intuition | |
3792 | # of exeext. | |
3793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3794 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3795 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3796 | ||
3797 | # The possible output files: | |
3798 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3799 | ||
3800 | ac_rmfiles= | |
3801 | for ac_file in $ac_files | |
3802 | do | |
3803 | case $ac_file in | |
3804 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3805 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3806 | esac | |
3807 | done | |
3808 | rm -f $ac_rmfiles | |
3809 | ||
3810 | if { { ac_try="$ac_link_default" | |
3811 | case "(($ac_try" in | |
3812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3813 | *) ac_try_echo=$ac_try;; | |
3814 | esac | |
3815 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3816 | $as_echo "$ac_try_echo"; } >&5 | |
3817 | (eval "$ac_link_default") 2>&5 | |
3818 | ac_status=$? | |
3819 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3820 | test $ac_status = 0; }; then : | |
3821 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3822 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3823 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3824 | # so that the user can short-circuit this test for compilers unknown to | |
3825 | # Autoconf. | |
3826 | for ac_file in $ac_files '' | |
3827 | do | |
3828 | test -f "$ac_file" || continue | |
3829 | case $ac_file in | |
3830 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3831 | ;; | |
3832 | [ab].out ) | |
3833 | # We found the default executable, but exeext='' is most | |
3834 | # certainly right. | |
3835 | break;; | |
3836 | *.* ) | |
3837 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3838 | then :; else | |
3839 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3840 | fi | |
3841 | # We set ac_cv_exeext here because the later test for it is not | |
3842 | # safe: cross compilers may not add the suffix if given an `-o' | |
3843 | # argument, so we may need to know it at that point already. | |
3844 | # Even if this section looks crufty: it has the advantage of | |
3845 | # actually working. | |
3846 | break;; | |
3847 | * ) | |
3848 | break;; | |
3849 | esac | |
3850 | done | |
3851 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
3852 | ||
bf3b7cd3 | 3853 | else |
5213506e RW |
3854 | ac_file='' |
3855 | fi | |
3856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3857 | $as_echo "$ac_file" >&6; } | |
3858 | if test -z "$ac_file"; then : | |
3859 | $as_echo "$as_me: failed program was:" >&5 | |
bf3b7cd3 JD |
3860 | sed 's/^/| /' conftest.$ac_ext >&5 |
3861 | ||
5213506e RW |
3862 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3863 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3864 | { as_fn_set_status 77 | |
3865 | as_fn_error "C compiler cannot create executables | |
3866 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bf3b7cd3 | 3867 | fi |
5213506e RW |
3868 | ac_exeext=$ac_cv_exeext |
3869 | ||
3870 | # Check that the compiler produces executables we can run. If not, either | |
3871 | # the compiler is broken, or we cross compile. | |
3872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3873 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3874 | # If not cross compiling, check that we can run a simple program. | |
3875 | if test "$cross_compiling" != yes; then | |
3876 | if { ac_try='./$ac_file' | |
3877 | { { case "(($ac_try" in | |
3878 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3879 | *) ac_try_echo=$ac_try;; | |
3880 | esac | |
3881 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3882 | $as_echo "$ac_try_echo"; } >&5 | |
3883 | (eval "$ac_try") 2>&5 | |
3884 | ac_status=$? | |
3885 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3886 | test $ac_status = 0; }; }; then | |
3887 | cross_compiling=no | |
3888 | else | |
3889 | if test "$cross_compiling" = maybe; then | |
3890 | cross_compiling=yes | |
3891 | else | |
3892 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3893 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3894 | as_fn_error "cannot run C compiled programs. | |
3895 | If you meant to cross compile, use \`--host'. | |
3896 | See \`config.log' for more details." "$LINENO" 5; } | |
3897 | fi | |
3898 | fi | |
bf3b7cd3 | 3899 | fi |
5213506e RW |
3900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3901 | $as_echo "yes" >&6; } | |
3902 | ||
3903 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out | |
3904 | ac_clean_files=$ac_clean_files_save | |
3905 | # Check that the compiler produces executables we can run. If not, either | |
3906 | # the compiler is broken, or we cross compile. | |
3907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3908 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3910 | $as_echo "$cross_compiling" >&6; } | |
3911 | ||
3912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3913 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3914 | if { { ac_try="$ac_link" | |
3915 | case "(($ac_try" in | |
3916 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3917 | *) ac_try_echo=$ac_try;; | |
3918 | esac | |
3919 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3920 | $as_echo "$ac_try_echo"; } >&5 | |
3921 | (eval "$ac_link") 2>&5 | |
3922 | ac_status=$? | |
3923 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3924 | test $ac_status = 0; }; then : | |
3925 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3926 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3927 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3928 | # `rm'. | |
3929 | for ac_file in conftest.exe conftest conftest.*; do | |
3930 | test -f "$ac_file" || continue | |
3931 | case $ac_file in | |
3932 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3933 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3934 | break;; | |
3935 | * ) break;; | |
3936 | esac | |
3937 | done | |
b61ff9c8 | 3938 | else |
5213506e RW |
3939 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3940 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3941 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3942 | See \`config.log' for more details." "$LINENO" 5; } | |
b61ff9c8 | 3943 | fi |
5213506e RW |
3944 | rm -f conftest$ac_cv_exeext |
3945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
3946 | $as_echo "$ac_cv_exeext" >&6; } | |
bf3b7cd3 | 3947 | |
5213506e RW |
3948 | rm -f conftest.$ac_ext |
3949 | EXEEXT=$ac_cv_exeext | |
3950 | ac_exeext=$EXEEXT | |
3951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
3952 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3953 | if test "${ac_cv_objext+set}" = set; then : | |
3954 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3955 | else |
5213506e | 3956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 3957 | /* end confdefs.h. */ |
5213506e | 3958 | |
bf3b7cd3 JD |
3959 | int |
3960 | main () | |
3961 | { | |
5213506e | 3962 | |
bf3b7cd3 JD |
3963 | ; |
3964 | return 0; | |
3965 | } | |
3966 | _ACEOF | |
5213506e RW |
3967 | rm -f conftest.o conftest.obj |
3968 | if { { ac_try="$ac_compile" | |
3969 | case "(($ac_try" in | |
3970 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3971 | *) ac_try_echo=$ac_try;; | |
3972 | esac | |
3973 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3974 | $as_echo "$ac_try_echo"; } >&5 | |
3975 | (eval "$ac_compile") 2>&5 | |
3976 | ac_status=$? | |
3977 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3978 | test $ac_status = 0; }; then : | |
3979 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3980 | test -f "$ac_file" || continue; | |
3981 | case $ac_file in | |
3982 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
3983 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
3984 | break;; | |
3985 | esac | |
3986 | done | |
bf3b7cd3 | 3987 | else |
5213506e | 3988 | $as_echo "$as_me: failed program was:" >&5 |
bf3b7cd3 JD |
3989 | sed 's/^/| /' conftest.$ac_ext >&5 |
3990 | ||
5213506e RW |
3991 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3992 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3993 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3994 | See \`config.log' for more details." "$LINENO" 5; } | |
bf3b7cd3 | 3995 | fi |
5213506e | 3996 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bf3b7cd3 | 3997 | fi |
5213506e RW |
3998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3999 | $as_echo "$ac_cv_objext" >&6; } | |
4000 | OBJEXT=$ac_cv_objext | |
4001 | ac_objext=$OBJEXT | |
4002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4003 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
4004 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
4005 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4006 | else |
5213506e | 4007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 4008 | /* end confdefs.h. */ |
5213506e | 4009 | |
bf3b7cd3 JD |
4010 | int |
4011 | main () | |
4012 | { | |
5213506e RW |
4013 | #ifndef __GNUC__ |
4014 | choke me | |
4015 | #endif | |
bf3b7cd3 JD |
4016 | |
4017 | ; | |
4018 | return 0; | |
4019 | } | |
4020 | _ACEOF | |
5213506e RW |
4021 | if ac_fn_c_try_compile "$LINENO"; then : |
4022 | ac_compiler_gnu=yes | |
4023 | else | |
4024 | ac_compiler_gnu=no | |
4025 | fi | |
4026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4027 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4028 | ||
4029 | fi | |
4030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4031 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4032 | if test $ac_compiler_gnu = yes; then | |
4033 | GCC=yes | |
4034 | else | |
4035 | GCC= | |
4036 | fi | |
4037 | ac_test_CFLAGS=${CFLAGS+set} | |
4038 | ac_save_CFLAGS=$CFLAGS | |
4039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4040 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
4041 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
4042 | $as_echo_n "(cached) " >&6 | |
4043 | else | |
4044 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4045 | ac_c_werror_flag=yes | |
4046 | ac_cv_prog_cc_g=no | |
4047 | CFLAGS="-g" | |
4048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4049 | /* end confdefs.h. */ |
5213506e | 4050 | |
bf3b7cd3 JD |
4051 | int |
4052 | main () | |
4053 | { | |
bf3b7cd3 JD |
4054 | |
4055 | ; | |
4056 | return 0; | |
4057 | } | |
4058 | _ACEOF | |
5213506e RW |
4059 | if ac_fn_c_try_compile "$LINENO"; then : |
4060 | ac_cv_prog_cc_g=yes | |
bf3b7cd3 | 4061 | else |
5213506e RW |
4062 | CFLAGS="" |
4063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4064 | /* end confdefs.h. */ |
5213506e | 4065 | |
bf3b7cd3 JD |
4066 | int |
4067 | main () | |
4068 | { | |
bf3b7cd3 JD |
4069 | |
4070 | ; | |
4071 | return 0; | |
4072 | } | |
4073 | _ACEOF | |
5213506e RW |
4074 | if ac_fn_c_try_compile "$LINENO"; then : |
4075 | ||
4076 | else | |
4077 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4078 | CFLAGS="-g" | |
4079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4080 | /* end confdefs.h. */ |
5213506e | 4081 | |
bf3b7cd3 JD |
4082 | int |
4083 | main () | |
4084 | { | |
bf3b7cd3 JD |
4085 | |
4086 | ; | |
4087 | return 0; | |
4088 | } | |
4089 | _ACEOF | |
5213506e RW |
4090 | if ac_fn_c_try_compile "$LINENO"; then : |
4091 | ac_cv_prog_cc_g=yes | |
bf3b7cd3 | 4092 | fi |
5213506e | 4093 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4094 | fi |
5213506e | 4095 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4096 | fi |
5213506e RW |
4097 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4098 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4099 | fi | |
4100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4101 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4102 | if test "$ac_test_CFLAGS" = set; then | |
4103 | CFLAGS=$ac_save_CFLAGS | |
4104 | elif test $ac_cv_prog_cc_g = yes; then | |
4105 | if test "$GCC" = yes; then | |
4106 | CFLAGS="-g -O2" | |
4107 | else | |
4108 | CFLAGS="-g" | |
4109 | fi | |
4110 | else | |
4111 | if test "$GCC" = yes; then | |
4112 | CFLAGS="-O2" | |
4113 | else | |
4114 | CFLAGS= | |
4115 | fi | |
4116 | fi | |
4117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4118 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
4119 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
4120 | $as_echo_n "(cached) " >&6 | |
4121 | else | |
4122 | ac_cv_prog_cc_c89=no | |
4123 | ac_save_CC=$CC | |
4124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4125 | /* end confdefs.h. */ |
5213506e RW |
4126 | #include <stdarg.h> |
4127 | #include <stdio.h> | |
4128 | #include <sys/types.h> | |
4129 | #include <sys/stat.h> | |
4130 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4131 | struct buf { int x; }; | |
4132 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4133 | static char *e (p, i) | |
4134 | char **p; | |
4135 | int i; | |
4136 | { | |
4137 | return p[i]; | |
4138 | } | |
4139 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4140 | { | |
4141 | char *s; | |
4142 | va_list v; | |
4143 | va_start (v,p); | |
4144 | s = g (p, va_arg (v,int)); | |
4145 | va_end (v); | |
4146 | return s; | |
4147 | } | |
4148 | ||
4149 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4150 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4151 | These don't provoke an error unfortunately, instead are silently treated | |
4152 | as 'x'. The following induces an error, until -std is added to get | |
4153 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4154 | array size at least. It's necessary to write '\x00'==0 to get something | |
4155 | that's true only with -std. */ | |
4156 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4157 | ||
4158 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4159 | inside strings and character constants. */ | |
4160 | #define FOO(x) 'x' | |
4161 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4162 | ||
4163 | int test (int i, double x); | |
4164 | struct s1 {int (*f) (int a);}; | |
4165 | struct s2 {int (*f) (double a);}; | |
4166 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4167 | int argc; | |
4168 | char **argv; | |
bf3b7cd3 JD |
4169 | int |
4170 | main () | |
4171 | { | |
5213506e | 4172 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bf3b7cd3 JD |
4173 | ; |
4174 | return 0; | |
4175 | } | |
4176 | _ACEOF | |
5213506e RW |
4177 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
4178 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4179 | do | |
4180 | CC="$ac_save_CC $ac_arg" | |
4181 | if ac_fn_c_try_compile "$LINENO"; then : | |
4182 | ac_cv_prog_cc_c89=$ac_arg | |
bf3b7cd3 | 4183 | fi |
5213506e RW |
4184 | rm -f core conftest.err conftest.$ac_objext |
4185 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
bf3b7cd3 | 4186 | done |
5213506e RW |
4187 | rm -f conftest.$ac_ext |
4188 | CC=$ac_save_CC | |
4189 | ||
4190 | fi | |
4191 | # AC_CACHE_VAL | |
4192 | case "x$ac_cv_prog_cc_c89" in | |
4193 | x) | |
4194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4195 | $as_echo "none needed" >&6; } ;; | |
4196 | xno) | |
4197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4198 | $as_echo "unsupported" >&6; } ;; | |
4199 | *) | |
4200 | CC="$CC $ac_cv_prog_cc_c89" | |
4201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4202 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
bf3b7cd3 | 4203 | esac |
5213506e RW |
4204 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
4205 | ||
4206 | fi | |
4207 | ||
4208 | ac_ext=c | |
4209 | ac_cpp='$CPP $CPPFLAGS' | |
4210 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4211 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4212 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4213 | ||
4214 | if test "x$CC" != xcc; then | |
4215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
4216 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
b61ff9c8 | 4217 | else |
5213506e RW |
4218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 |
4219 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
4220 | fi | |
4221 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
4222 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
4223 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4224 | $as_echo_n "(cached) " >&6 | |
4225 | else | |
4226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4227 | /* end confdefs.h. */ |
5213506e | 4228 | |
bf3b7cd3 JD |
4229 | int |
4230 | main () | |
4231 | { | |
4232 | ||
bf3b7cd3 JD |
4233 | ; |
4234 | return 0; | |
4235 | } | |
4236 | _ACEOF | |
5213506e RW |
4237 | # Make sure it works both with $CC and with simple cc. |
4238 | # We do the test twice because some compilers refuse to overwrite an | |
4239 | # existing .o file with -o, though they will create one. | |
4240 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4241 | rm -f conftest2.* | |
4242 | if { { case "(($ac_try" in | |
4243 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4244 | *) ac_try_echo=$ac_try;; | |
4245 | esac | |
4246 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4247 | $as_echo "$ac_try_echo"; } >&5 | |
4248 | (eval "$ac_try") 2>&5 | |
4249 | ac_status=$? | |
4250 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4251 | test $ac_status = 0; } && | |
4252 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4253 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4254 | *) ac_try_echo=$ac_try;; | |
4255 | esac | |
4256 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4257 | $as_echo "$ac_try_echo"; } >&5 | |
4258 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 | 4259 | ac_status=$? |
5213506e RW |
4260 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4261 | test $ac_status = 0; }; | |
4262 | then | |
4263 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
4264 | if test "x$CC" != xcc; then | |
4265 | # Test first that cc exists at all. | |
4266 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
4267 | { { case "(($ac_try" in | |
4268 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4269 | *) ac_try_echo=$ac_try;; | |
4270 | esac | |
4271 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4272 | $as_echo "$ac_try_echo"; } >&5 | |
4273 | (eval "$ac_try") 2>&5 | |
4274 | ac_status=$? | |
4275 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4276 | test $ac_status = 0; }; }; then | |
4277 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4278 | rm -f conftest2.* | |
4279 | if { { case "(($ac_try" in | |
4280 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4281 | *) ac_try_echo=$ac_try;; | |
4282 | esac | |
4283 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4284 | $as_echo "$ac_try_echo"; } >&5 | |
4285 | (eval "$ac_try") 2>&5 | |
4286 | ac_status=$? | |
4287 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4288 | test $ac_status = 0; } && | |
4289 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4290 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4291 | *) ac_try_echo=$ac_try;; | |
4292 | esac | |
4293 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4294 | $as_echo "$ac_try_echo"; } >&5 | |
4295 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 | 4296 | ac_status=$? |
5213506e RW |
4297 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4298 | test $ac_status = 0; }; | |
4299 | then | |
4300 | # cc works too. | |
4301 | : | |
4302 | else | |
4303 | # cc exists but doesn't like -o. | |
4304 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
4305 | fi | |
4306 | fi | |
4307 | fi | |
bf3b7cd3 | 4308 | else |
5213506e RW |
4309 | eval ac_cv_prog_cc_${ac_cc}_c_o=no |
4310 | fi | |
4311 | rm -f core conftest* | |
bf3b7cd3 | 4312 | |
b61ff9c8 | 4313 | fi |
5213506e RW |
4314 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then |
4315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4316 | $as_echo "yes" >&6; } | |
4317 | else | |
4318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4319 | $as_echo "no" >&6; } | |
4320 | ||
4321 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
4322 | ||
bf3b7cd3 | 4323 | fi |
5213506e RW |
4324 | |
4325 | # expand $ac_aux_dir to an absolute path | |
4326 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4327 | ||
4328 | # FIXME: we rely on the cache variable name because | |
4329 | # there is no other way. | |
4330 | set dummy $CC | |
4331 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
4332 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
4333 | if test "$am_t" != yes; then | |
4334 | # Losing compiler, so override with the script. | |
4335 | # FIXME: It is wrong to rewrite CC. | |
4336 | # But if we don't then we get into trouble of one sort or another. | |
4337 | # A longer-term fix would be to have automake use am__CC in this case, | |
4338 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
4339 | CC="$am_aux_dir/compile $CC" | |
bf3b7cd3 | 4340 | fi |
5213506e RW |
4341 | |
4342 | ||
4343 | ac_ext=cpp | |
4344 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4345 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4346 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4347 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4348 | if test -z "$CXX"; then | |
4349 | if test -n "$CCC"; then | |
4350 | CXX=$CCC | |
4351 | else | |
4352 | if test -n "$ac_tool_prefix"; then | |
4353 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4354 | do | |
4355 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4356 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4358 | $as_echo_n "checking for $ac_word... " >&6; } | |
4359 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
4360 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 4361 | else |
5213506e RW |
4362 | if test -n "$CXX"; then |
4363 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
4364 | else | |
4365 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4366 | for as_dir in $PATH | |
4367 | do | |
4368 | IFS=$as_save_IFS | |
4369 | test -z "$as_dir" && as_dir=. | |
4370 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4371 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4372 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
4373 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4374 | break 2 | |
4375 | fi | |
4376 | done | |
4377 | done | |
4378 | IFS=$as_save_IFS | |
4379 | ||
bf3b7cd3 | 4380 | fi |
b61ff9c8 | 4381 | fi |
5213506e RW |
4382 | CXX=$ac_cv_prog_CXX |
4383 | if test -n "$CXX"; then | |
4384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
4385 | $as_echo "$CXX" >&6; } | |
4386 | else | |
4387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4388 | $as_echo "no" >&6; } | |
4389 | fi | |
bf3b7cd3 JD |
4390 | |
4391 | ||
5213506e RW |
4392 | test -n "$CXX" && break |
4393 | done | |
4394 | fi | |
4395 | if test -z "$CXX"; then | |
4396 | ac_ct_CXX=$CXX | |
4397 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4398 | do | |
4399 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4400 | set dummy $ac_prog; ac_word=$2 | |
4401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4402 | $as_echo_n "checking for $ac_word... " >&6; } | |
4403 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
4404 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4405 | else |
5213506e RW |
4406 | if test -n "$ac_ct_CXX"; then |
4407 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
bf3b7cd3 | 4408 | else |
5213506e RW |
4409 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4410 | for as_dir in $PATH | |
4411 | do | |
4412 | IFS=$as_save_IFS | |
4413 | test -z "$as_dir" && as_dir=. | |
4414 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4415 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4416 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
4417 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4418 | break 2 | |
4419 | fi | |
4420 | done | |
4421 | done | |
4422 | IFS=$as_save_IFS | |
bf3b7cd3 | 4423 | |
bf3b7cd3 | 4424 | fi |
bf3b7cd3 | 4425 | fi |
5213506e RW |
4426 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX |
4427 | if test -n "$ac_ct_CXX"; then | |
4428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
4429 | $as_echo "$ac_ct_CXX" >&6; } | |
bf3b7cd3 | 4430 | else |
5213506e RW |
4431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4432 | $as_echo "no" >&6; } | |
4433 | fi | |
bf3b7cd3 | 4434 | |
5213506e RW |
4435 | |
4436 | test -n "$ac_ct_CXX" && break | |
4437 | done | |
4438 | ||
4439 | if test "x$ac_ct_CXX" = x; then | |
4440 | CXX="g++" | |
4441 | else | |
4442 | case $cross_compiling:$ac_tool_warned in | |
4443 | yes:) | |
4444 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4445 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4446 | ac_tool_warned=yes ;; | |
4447 | esac | |
4448 | CXX=$ac_ct_CXX | |
4449 | fi | |
4450 | fi | |
4451 | ||
4452 | fi | |
4453 | fi | |
4454 | # Provide some information about the compiler. | |
4455 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
4456 | set X $ac_compile | |
4457 | ac_compiler=$2 | |
4458 | for ac_option in --version -v -V -qversion; do | |
4459 | { { ac_try="$ac_compiler $ac_option >&5" | |
4460 | case "(($ac_try" in | |
4461 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4462 | *) ac_try_echo=$ac_try;; | |
4463 | esac | |
4464 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4465 | $as_echo "$ac_try_echo"; } >&5 | |
4466 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
b61ff9c8 | 4467 | ac_status=$? |
5213506e RW |
4468 | if test -s conftest.err; then |
4469 | sed '10a\ | |
4470 | ... rest of stderr output deleted ... | |
4471 | 10q' conftest.err >conftest.er1 | |
4472 | cat conftest.er1 >&5 | |
4473 | rm -f conftest.er1 conftest.err | |
4474 | fi | |
4475 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4476 | test $ac_status = 0; } | |
4477 | done | |
4478 | ||
4479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
4480 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
4481 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
4482 | $as_echo_n "(cached) " >&6 | |
4483 | else | |
4484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4485 | /* end confdefs.h. */ |
5213506e | 4486 | |
bf3b7cd3 JD |
4487 | int |
4488 | main () | |
4489 | { | |
5213506e RW |
4490 | #ifndef __GNUC__ |
4491 | choke me | |
4492 | #endif | |
bf3b7cd3 JD |
4493 | |
4494 | ; | |
4495 | return 0; | |
4496 | } | |
4497 | _ACEOF | |
5213506e RW |
4498 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4499 | ac_compiler_gnu=yes | |
bf3b7cd3 | 4500 | else |
5213506e RW |
4501 | ac_compiler_gnu=no |
4502 | fi | |
4503 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4504 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
bf3b7cd3 | 4505 | |
bf3b7cd3 | 4506 | fi |
5213506e RW |
4507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 |
4508 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
4509 | if test $ac_compiler_gnu = yes; then | |
4510 | GXX=yes | |
bf3b7cd3 | 4511 | else |
5213506e RW |
4512 | GXX= |
4513 | fi | |
4514 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
4515 | ac_save_CXXFLAGS=$CXXFLAGS | |
4516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
4517 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
4518 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
4519 | $as_echo_n "(cached) " >&6 | |
4520 | else | |
4521 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
4522 | ac_cxx_werror_flag=yes | |
4523 | ac_cv_prog_cxx_g=no | |
4524 | CXXFLAGS="-g" | |
4525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4526 | /* end confdefs.h. */ |
5213506e | 4527 | |
bf3b7cd3 JD |
4528 | int |
4529 | main () | |
4530 | { | |
bf3b7cd3 JD |
4531 | |
4532 | ; | |
4533 | return 0; | |
4534 | } | |
4535 | _ACEOF | |
5213506e RW |
4536 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4537 | ac_cv_prog_cxx_g=yes | |
4538 | else | |
4539 | CXXFLAGS="" | |
4540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4541 | /* end confdefs.h. */ |
5213506e | 4542 | |
bf3b7cd3 JD |
4543 | int |
4544 | main () | |
4545 | { | |
bf3b7cd3 JD |
4546 | |
4547 | ; | |
4548 | return 0; | |
4549 | } | |
4550 | _ACEOF | |
5213506e | 4551 | if ac_fn_cxx_try_compile "$LINENO"; then : |
bf3b7cd3 | 4552 | |
bf3b7cd3 | 4553 | else |
5213506e RW |
4554 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag |
4555 | CXXFLAGS="-g" | |
4556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4557 | /* end confdefs.h. */ |
5213506e | 4558 | |
bf3b7cd3 JD |
4559 | int |
4560 | main () | |
4561 | { | |
bf3b7cd3 JD |
4562 | |
4563 | ; | |
4564 | return 0; | |
4565 | } | |
4566 | _ACEOF | |
5213506e RW |
4567 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4568 | ac_cv_prog_cxx_g=yes | |
4569 | fi | |
4570 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4571 | fi | |
4572 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4573 | fi | |
4574 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4575 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4576 | fi | |
4577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4578 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4579 | if test "$ac_test_CXXFLAGS" = set; then | |
4580 | CXXFLAGS=$ac_save_CXXFLAGS | |
4581 | elif test $ac_cv_prog_cxx_g = yes; then | |
4582 | if test "$GXX" = yes; then | |
4583 | CXXFLAGS="-g -O2" | |
4584 | else | |
4585 | CXXFLAGS="-g" | |
4586 | fi | |
bf3b7cd3 | 4587 | else |
5213506e RW |
4588 | if test "$GXX" = yes; then |
4589 | CXXFLAGS="-O2" | |
4590 | else | |
4591 | CXXFLAGS= | |
4592 | fi | |
4593 | fi | |
4594 | ac_ext=c | |
4595 | ac_cpp='$CPP $CPPFLAGS' | |
4596 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4597 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4598 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4599 | ||
4600 | ||
4601 | ||
4602 | ||
4603 | if test -n "$ac_tool_prefix"; then | |
4604 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
4605 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 | |
4606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4607 | $as_echo_n "checking for $ac_word... " >&6; } | |
4608 | if test "${ac_cv_prog_GNATBIND+set}" = set; then : | |
4609 | $as_echo_n "(cached) " >&6 | |
4610 | else | |
4611 | if test -n "$GNATBIND"; then | |
4612 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
4613 | else | |
4614 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4615 | for as_dir in $PATH | |
4616 | do | |
4617 | IFS=$as_save_IFS | |
4618 | test -z "$as_dir" && as_dir=. | |
4619 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4620 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4621 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
4622 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4623 | break 2 | |
4624 | fi | |
4625 | done | |
4626 | done | |
4627 | IFS=$as_save_IFS | |
4628 | ||
4629 | fi | |
4630 | fi | |
4631 | GNATBIND=$ac_cv_prog_GNATBIND | |
4632 | if test -n "$GNATBIND"; then | |
4633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5 | |
4634 | $as_echo "$GNATBIND" >&6; } | |
4635 | else | |
4636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4637 | $as_echo "no" >&6; } | |
4638 | fi | |
4639 | ||
bf3b7cd3 | 4640 | |
bf3b7cd3 | 4641 | fi |
5213506e RW |
4642 | if test -z "$ac_cv_prog_GNATBIND"; then |
4643 | ac_ct_GNATBIND=$GNATBIND | |
4644 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
4645 | set dummy gnatbind; ac_word=$2 | |
4646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4647 | $as_echo_n "checking for $ac_word... " >&6; } | |
4648 | if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then : | |
4649 | $as_echo_n "(cached) " >&6 | |
4650 | else | |
4651 | if test -n "$ac_ct_GNATBIND"; then | |
4652 | ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test. | |
4653 | else | |
4654 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4655 | for as_dir in $PATH | |
4656 | do | |
4657 | IFS=$as_save_IFS | |
4658 | test -z "$as_dir" && as_dir=. | |
4659 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4660 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4661 | ac_cv_prog_ac_ct_GNATBIND="gnatbind" | |
4662 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4663 | break 2 | |
4664 | fi | |
bf3b7cd3 | 4665 | done |
5213506e RW |
4666 | done |
4667 | IFS=$as_save_IFS | |
4668 | ||
4669 | fi | |
4670 | fi | |
4671 | ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND | |
4672 | if test -n "$ac_ct_GNATBIND"; then | |
4673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5 | |
4674 | $as_echo "$ac_ct_GNATBIND" >&6; } | |
4675 | else | |
4676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4677 | $as_echo "no" >&6; } | |
4678 | fi | |
4679 | ||
4680 | if test "x$ac_ct_GNATBIND" = x; then | |
4681 | GNATBIND="no" | |
4682 | else | |
4683 | case $cross_compiling:$ac_tool_warned in | |
4684 | yes:) | |
4685 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4686 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4687 | ac_tool_warned=yes ;; | |
bf3b7cd3 | 4688 | esac |
5213506e RW |
4689 | GNATBIND=$ac_ct_GNATBIND |
4690 | fi | |
b61ff9c8 | 4691 | else |
5213506e RW |
4692 | GNATBIND="$ac_cv_prog_GNATBIND" |
4693 | fi | |
bf3b7cd3 | 4694 | |
5213506e RW |
4695 | if test -n "$ac_tool_prefix"; then |
4696 | # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args. | |
4697 | set dummy ${ac_tool_prefix}gnatmake; ac_word=$2 | |
4698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4699 | $as_echo_n "checking for $ac_word... " >&6; } | |
4700 | if test "${ac_cv_prog_GNATMAKE+set}" = set; then : | |
4701 | $as_echo_n "(cached) " >&6 | |
4702 | else | |
4703 | if test -n "$GNATMAKE"; then | |
4704 | ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test. | |
4705 | else | |
4706 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4707 | for as_dir in $PATH | |
4708 | do | |
4709 | IFS=$as_save_IFS | |
4710 | test -z "$as_dir" && as_dir=. | |
4711 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4712 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4713 | ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake" | |
4714 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4715 | break 2 | |
4716 | fi | |
4717 | done | |
4718 | done | |
4719 | IFS=$as_save_IFS | |
4720 | ||
4721 | fi | |
4722 | fi | |
4723 | GNATMAKE=$ac_cv_prog_GNATMAKE | |
4724 | if test -n "$GNATMAKE"; then | |
4725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5 | |
4726 | $as_echo "$GNATMAKE" >&6; } | |
4727 | else | |
4728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4729 | $as_echo "no" >&6; } | |
4730 | fi | |
4731 | ||
4732 | ||
4733 | fi | |
4734 | if test -z "$ac_cv_prog_GNATMAKE"; then | |
4735 | ac_ct_GNATMAKE=$GNATMAKE | |
4736 | # Extract the first word of "gnatmake", so it can be a program name with args. | |
4737 | set dummy gnatmake; ac_word=$2 | |
4738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4739 | $as_echo_n "checking for $ac_word... " >&6; } | |
4740 | if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then : | |
4741 | $as_echo_n "(cached) " >&6 | |
4742 | else | |
4743 | if test -n "$ac_ct_GNATMAKE"; then | |
4744 | ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test. | |
4745 | else | |
4746 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4747 | for as_dir in $PATH | |
4748 | do | |
4749 | IFS=$as_save_IFS | |
4750 | test -z "$as_dir" && as_dir=. | |
4751 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4752 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4753 | ac_cv_prog_ac_ct_GNATMAKE="gnatmake" | |
4754 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4755 | break 2 | |
4756 | fi | |
4757 | done | |
4758 | done | |
4759 | IFS=$as_save_IFS | |
4760 | ||
4761 | fi | |
4762 | fi | |
4763 | ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE | |
4764 | if test -n "$ac_ct_GNATMAKE"; then | |
4765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5 | |
4766 | $as_echo "$ac_ct_GNATMAKE" >&6; } | |
4767 | else | |
4768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4769 | $as_echo "no" >&6; } | |
4770 | fi | |
4771 | ||
4772 | if test "x$ac_ct_GNATMAKE" = x; then | |
4773 | GNATMAKE="no" | |
bf3b7cd3 | 4774 | else |
5213506e RW |
4775 | case $cross_compiling:$ac_tool_warned in |
4776 | yes:) | |
4777 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4778 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4779 | ac_tool_warned=yes ;; | |
4780 | esac | |
4781 | GNATMAKE=$ac_ct_GNATMAKE | |
4782 | fi | |
4783 | else | |
4784 | GNATMAKE="$ac_cv_prog_GNATMAKE" | |
4785 | fi | |
bf3b7cd3 | 4786 | |
5213506e RW |
4787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5 |
4788 | $as_echo_n "checking whether compiler driver understands Ada... " >&6; } | |
4789 | if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then : | |
4790 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4791 | else |
5213506e RW |
4792 | cat >conftest.adb <<EOF |
4793 | procedure conftest is begin null; end conftest; | |
4794 | EOF | |
4795 | acx_cv_cc_gcc_supports_ada=no | |
4796 | # There is a bug in old released versions of GCC which causes the | |
4797 | # driver to exit successfully when the appropriate language module | |
4798 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
4799 | # Therefore we must check for the error message as well as an | |
4800 | # unsuccessful exit. | |
4801 | # Other compilers, like HP Tru64 UNIX cc, exit successfully when | |
4802 | # given a .adb file, but produce no object file. So we must check | |
4803 | # if an object file was really produced to guard against this. | |
4804 | errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure` | |
4805 | if test x"$errors" = x && test -f conftest.$ac_objext; then | |
4806 | acx_cv_cc_gcc_supports_ada=yes | |
4807 | fi | |
4808 | rm -f conftest.* | |
4809 | fi | |
4810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5 | |
4811 | $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; } | |
bf3b7cd3 | 4812 | |
5213506e RW |
4813 | if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then |
4814 | have_gnat=yes | |
4815 | else | |
4816 | have_gnat=no | |
b61ff9c8 | 4817 | fi |
5213506e RW |
4818 | |
4819 | ||
4820 | # autoconf is lame and doesn't give us any substitution variable for this. | |
4821 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
4822 | NO_MINUS_C_MINUS_O=yes | |
4823 | else | |
4824 | OUTPUT_OPTION='-o $@' | |
bf3b7cd3 | 4825 | fi |
5213506e RW |
4826 | |
4827 | ||
4828 | ||
4829 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer | |
4830 | # optimizations to be activated explicitly by the toplevel. | |
4831 | case "$CC" in | |
4832 | */prev-gcc/xgcc*) ;; | |
4833 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
4834 | esac | |
4835 | ||
4836 | ||
4837 | # ------------------------- | |
4838 | # Check C compiler features | |
4839 | # ------------------------- | |
4840 | ||
4841 | ||
4842 | ac_ext=c | |
4843 | ac_cpp='$CPP $CPPFLAGS' | |
4844 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4845 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4846 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4848 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4849 | # On Suns, sometimes $CPP names a directory. | |
4850 | if test -n "$CPP" && test -d "$CPP"; then | |
4851 | CPP= | |
bf3b7cd3 | 4852 | fi |
5213506e RW |
4853 | if test -z "$CPP"; then |
4854 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
4855 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 4856 | else |
5213506e RW |
4857 | # Double quotes because CPP needs to be expanded |
4858 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4859 | do | |
4860 | ac_preproc_ok=false | |
4861 | for ac_c_preproc_warn_flag in '' yes | |
4862 | do | |
4863 | # Use a header file that comes with gcc, so configuring glibc | |
4864 | # with a fresh cross-compiler works. | |
4865 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4866 | # <limits.h> exists even on freestanding compilers. | |
4867 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4868 | # not just through cpp. "Syntax error" is here to catch this case. | |
4869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4870 | /* end confdefs.h. */ | |
4871 | #ifdef __STDC__ | |
4872 | # include <limits.h> | |
4873 | #else | |
4874 | # include <assert.h> | |
4875 | #endif | |
4876 | Syntax error | |
bf3b7cd3 | 4877 | _ACEOF |
5213506e | 4878 | if ac_fn_c_try_cpp "$LINENO"; then : |
bf3b7cd3 | 4879 | |
bf3b7cd3 | 4880 | else |
5213506e RW |
4881 | # Broken: fails on valid input. |
4882 | continue | |
4883 | fi | |
4884 | rm -f conftest.err conftest.$ac_ext | |
4885 | ||
4886 | # OK, works on sane cases. Now check whether nonexistent headers | |
4887 | # can be detected and how. | |
4888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4889 | /* end confdefs.h. */ |
5213506e | 4890 | #include <ac_nonexistent.h> |
bf3b7cd3 | 4891 | _ACEOF |
5213506e RW |
4892 | if ac_fn_c_try_cpp "$LINENO"; then : |
4893 | # Broken: success on invalid input. | |
4894 | continue | |
b61ff9c8 | 4895 | else |
5213506e RW |
4896 | # Passes both tests. |
4897 | ac_preproc_ok=: | |
4898 | break | |
bf3b7cd3 | 4899 | fi |
5213506e | 4900 | rm -f conftest.err conftest.$ac_ext |
bf3b7cd3 | 4901 | |
5213506e RW |
4902 | done |
4903 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4904 | rm -f conftest.err conftest.$ac_ext | |
4905 | if $ac_preproc_ok; then : | |
4906 | break | |
4907 | fi | |
bf3b7cd3 | 4908 | |
5213506e RW |
4909 | done |
4910 | ac_cv_prog_CPP=$CPP | |
bf3b7cd3 | 4911 | |
8b1f719a | 4912 | fi |
5213506e | 4913 | CPP=$ac_cv_prog_CPP |
8b1f719a | 4914 | else |
5213506e RW |
4915 | ac_cv_prog_CPP=$CPP |
4916 | fi | |
4917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4918 | $as_echo "$CPP" >&6; } | |
4919 | ac_preproc_ok=false | |
4920 | for ac_c_preproc_warn_flag in '' yes | |
4921 | do | |
4922 | # Use a header file that comes with gcc, so configuring glibc | |
4923 | # with a fresh cross-compiler works. | |
4924 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4925 | # <limits.h> exists even on freestanding compilers. | |
4926 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4927 | # not just through cpp. "Syntax error" is here to catch this case. | |
4928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4929 | /* end confdefs.h. */ |
5213506e RW |
4930 | #ifdef __STDC__ |
4931 | # include <limits.h> | |
4932 | #else | |
4933 | # include <assert.h> | |
4934 | #endif | |
4935 | Syntax error | |
bf3b7cd3 | 4936 | _ACEOF |
5213506e | 4937 | if ac_fn_c_try_cpp "$LINENO"; then : |
bf3b7cd3 | 4938 | |
bf3b7cd3 | 4939 | else |
5213506e RW |
4940 | # Broken: fails on valid input. |
4941 | continue | |
bf3b7cd3 | 4942 | fi |
5213506e | 4943 | rm -f conftest.err conftest.$ac_ext |
bf3b7cd3 | 4944 | |
5213506e RW |
4945 | # OK, works on sane cases. Now check whether nonexistent headers |
4946 | # can be detected and how. | |
4947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4948 | /* end confdefs.h. */ |
5213506e | 4949 | #include <ac_nonexistent.h> |
bf3b7cd3 | 4950 | _ACEOF |
5213506e RW |
4951 | if ac_fn_c_try_cpp "$LINENO"; then : |
4952 | # Broken: success on invalid input. | |
4953 | continue | |
bf3b7cd3 | 4954 | else |
5213506e RW |
4955 | # Passes both tests. |
4956 | ac_preproc_ok=: | |
4957 | break | |
bf3b7cd3 | 4958 | fi |
5213506e RW |
4959 | rm -f conftest.err conftest.$ac_ext |
4960 | ||
bf3b7cd3 | 4961 | done |
5213506e RW |
4962 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
4963 | rm -f conftest.err conftest.$ac_ext | |
4964 | if $ac_preproc_ok; then : | |
4965 | ||
b61ff9c8 | 4966 | else |
5213506e RW |
4967 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4968 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4969 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
4970 | See \`config.log' for more details." "$LINENO" 5; } | |
4971 | fi | |
bf3b7cd3 | 4972 | |
5213506e RW |
4973 | ac_ext=c |
4974 | ac_cpp='$CPP $CPPFLAGS' | |
4975 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4976 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4977 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bf3b7cd3 | 4978 | |
bf3b7cd3 | 4979 | |
5213506e RW |
4980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4981 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4982 | if test "${ac_cv_path_GREP+set}" = set; then : | |
4983 | $as_echo_n "(cached) " >&6 | |
4984 | else | |
4985 | if test -z "$GREP"; then | |
4986 | ac_path_GREP_found=false | |
4987 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4988 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4989 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4990 | do | |
4991 | IFS=$as_save_IFS | |
4992 | test -z "$as_dir" && as_dir=. | |
4993 | for ac_prog in grep ggrep; do | |
4994 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4995 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4996 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
4997 | # Check for GNU ac_path_GREP and select it if it is found. | |
4998 | # Check for GNU $ac_path_GREP | |
4999 | case `"$ac_path_GREP" --version 2>&1` in | |
5000 | *GNU*) | |
5001 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5002 | *) | |
5003 | ac_count=0 | |
5004 | $as_echo_n 0123456789 >"conftest.in" | |
5005 | while : | |
5006 | do | |
5007 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5008 | mv "conftest.tmp" "conftest.in" | |
5009 | cp "conftest.in" "conftest.nl" | |
5010 | $as_echo 'GREP' >> "conftest.nl" | |
5011 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5012 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5013 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5014 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5015 | # Best one so far, save it but keep looking for a better one | |
5016 | ac_cv_path_GREP="$ac_path_GREP" | |
5017 | ac_path_GREP_max=$ac_count | |
5018 | fi | |
5019 | # 10*(2^10) chars as input seems more than enough | |
5020 | test $ac_count -gt 10 && break | |
5021 | done | |
5022 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5023 | esac | |
5024 | ||
5025 | $ac_path_GREP_found && break 3 | |
5026 | done | |
5027 | done | |
5028 | done | |
5029 | IFS=$as_save_IFS | |
5030 | if test -z "$ac_cv_path_GREP"; then | |
5031 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5032 | fi | |
b61ff9c8 | 5033 | else |
5213506e | 5034 | ac_cv_path_GREP=$GREP |
2f41c1d6 | 5035 | fi |
5213506e | 5036 | |
b61ff9c8 | 5037 | fi |
5213506e RW |
5038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
5039 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5040 | GREP="$ac_cv_path_GREP" | |
bf3b7cd3 JD |
5041 | |
5042 | ||
5213506e RW |
5043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
5044 | $as_echo_n "checking for egrep... " >&6; } | |
5045 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
5046 | $as_echo_n "(cached) " >&6 | |
5ec1c5e6 | 5047 | else |
5213506e RW |
5048 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
5049 | then ac_cv_path_EGREP="$GREP -E" | |
5050 | else | |
5051 | if test -z "$EGREP"; then | |
5052 | ac_path_EGREP_found=false | |
5053 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5054 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5055 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5056 | do | |
5057 | IFS=$as_save_IFS | |
5058 | test -z "$as_dir" && as_dir=. | |
5059 | for ac_prog in egrep; do | |
5060 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5061 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5062 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
5063 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5064 | # Check for GNU $ac_path_EGREP | |
5065 | case `"$ac_path_EGREP" --version 2>&1` in | |
5066 | *GNU*) | |
5067 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5068 | *) | |
5069 | ac_count=0 | |
5070 | $as_echo_n 0123456789 >"conftest.in" | |
5071 | while : | |
5072 | do | |
5073 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5074 | mv "conftest.tmp" "conftest.in" | |
5075 | cp "conftest.in" "conftest.nl" | |
5076 | $as_echo 'EGREP' >> "conftest.nl" | |
5077 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5078 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5079 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5080 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5081 | # Best one so far, save it but keep looking for a better one | |
5082 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5083 | ac_path_EGREP_max=$ac_count | |
5084 | fi | |
5085 | # 10*(2^10) chars as input seems more than enough | |
5086 | test $ac_count -gt 10 && break | |
5087 | done | |
5088 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5089 | esac | |
5ec1c5e6 | 5090 | |
5213506e RW |
5091 | $ac_path_EGREP_found && break 3 |
5092 | done | |
5093 | done | |
5094 | done | |
5095 | IFS=$as_save_IFS | |
5096 | if test -z "$ac_cv_path_EGREP"; then | |
5097 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5098 | fi | |
5099 | else | |
5100 | ac_cv_path_EGREP=$EGREP | |
5ec1c5e6 | 5101 | fi |
5213506e RW |
5102 | |
5103 | fi | |
5ec1c5e6 | 5104 | fi |
5213506e RW |
5105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
5106 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5107 | EGREP="$ac_cv_path_EGREP" | |
5ec1c5e6 | 5108 | |
5ec1c5e6 | 5109 | |
5213506e RW |
5110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
5111 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5112 | if test "${ac_cv_header_stdc+set}" = set; then : | |
5113 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 5114 | else |
5213506e | 5115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 5116 | /* end confdefs.h. */ |
5213506e RW |
5117 | #include <stdlib.h> |
5118 | #include <stdarg.h> | |
5119 | #include <string.h> | |
5120 | #include <float.h> | |
5121 | ||
ba479fd2 NN |
5122 | int |
5123 | main () | |
5124 | { | |
5213506e | 5125 | |
ba479fd2 NN |
5126 | ; |
5127 | return 0; | |
5128 | } | |
5129 | _ACEOF | |
5213506e RW |
5130 | if ac_fn_c_try_compile "$LINENO"; then : |
5131 | ac_cv_header_stdc=yes | |
75b6f3fd | 5132 | else |
5213506e | 5133 | ac_cv_header_stdc=no |
75b6f3fd | 5134 | fi |
5213506e | 5135 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5136 | |
5213506e RW |
5137 | if test $ac_cv_header_stdc = yes; then |
5138 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 5140 | /* end confdefs.h. */ |
5213506e | 5141 | #include <string.h> |
bf3b7cd3 | 5142 | |
ba479fd2 | 5143 | _ACEOF |
5213506e RW |
5144 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5145 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bf3b7cd3 | 5146 | |
75e93faa | 5147 | else |
5213506e RW |
5148 | ac_cv_header_stdc=no |
5149 | fi | |
5150 | rm -f conftest* | |
ba479fd2 | 5151 | |
75e93faa | 5152 | fi |
bf3b7cd3 | 5153 | |
5213506e RW |
5154 | if test $ac_cv_header_stdc = yes; then |
5155 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 5157 | /* end confdefs.h. */ |
5213506e | 5158 | #include <stdlib.h> |
bf3b7cd3 | 5159 | |
ba479fd2 | 5160 | _ACEOF |
5213506e RW |
5161 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5162 | $EGREP "free" >/dev/null 2>&1; then : | |
bf3b7cd3 | 5163 | |
04cabffc | 5164 | else |
5213506e | 5165 | ac_cv_header_stdc=no |
04cabffc | 5166 | fi |
5213506e | 5167 | rm -f conftest* |
04cabffc | 5168 | |
414d23ae | 5169 | fi |
ba479fd2 | 5170 | |
5213506e RW |
5171 | if test $ac_cv_header_stdc = yes; then |
5172 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5173 | if test "$cross_compiling" = yes; then : | |
5174 | : | |
b61ff9c8 | 5175 | else |
5213506e | 5176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 5177 | /* end confdefs.h. */ |
5213506e | 5178 | #include <ctype.h> |
bf3b7cd3 | 5179 | #include <stdlib.h> |
5213506e RW |
5180 | #if ((' ' & 0x0FF) == 0x020) |
5181 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5182 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5183 | #else | |
5184 | # define ISLOWER(c) \ | |
5185 | (('a' <= (c) && (c) <= 'i') \ | |
5186 | || ('j' <= (c) && (c) <= 'r') \ | |
5187 | || ('s' <= (c) && (c) <= 'z')) | |
5188 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5189 | #endif | |
5190 | ||
5191 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
bf3b7cd3 JD |
5192 | int |
5193 | main () | |
5194 | { | |
5213506e RW |
5195 | int i; |
5196 | for (i = 0; i < 256; i++) | |
5197 | if (XOR (islower (i), ISLOWER (i)) | |
5198 | || toupper (i) != TOUPPER (i)) | |
5199 | return 2; | |
bf3b7cd3 JD |
5200 | return 0; |
5201 | } | |
5202 | _ACEOF | |
5213506e | 5203 | if ac_fn_c_try_run "$LINENO"; then : |
75e93faa | 5204 | |
5213506e RW |
5205 | else |
5206 | ac_cv_header_stdc=no | |
b61ff9c8 | 5207 | fi |
5213506e RW |
5208 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5209 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
bf3b7cd3 | 5210 | fi |
5213506e | 5211 | |
bf3b7cd3 | 5212 | fi |
bf3b7cd3 | 5213 | fi |
5213506e RW |
5214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
5215 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5216 | if test $ac_cv_header_stdc = yes; then | |
5217 | ||
5218 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5219 | ||
b61ff9c8 | 5220 | fi |
5213506e RW |
5221 | |
5222 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5223 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5224 | inttypes.h stdint.h unistd.h | |
5225 | do : | |
5226 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5227 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5228 | " | |
5229 | eval as_val=\$$as_ac_Header | |
5230 | if test "x$as_val" = x""yes; then : | |
5231 | cat >>confdefs.h <<_ACEOF | |
5232 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
ba479fd2 | 5233 | _ACEOF |
414d23ae | 5234 | |
5213506e RW |
5235 | fi |
5236 | ||
5237 | done | |
5238 | ||
5239 | ||
cafe096b | 5240 | |
5213506e RW |
5241 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
5242 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
5243 | MINIX=yes | |
5244 | else | |
5245 | MINIX= | |
414d23ae HPN |
5246 | fi |
5247 | ||
5213506e RW |
5248 | |
5249 | if test "$MINIX" = yes; then | |
5250 | ||
5251 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5252 | ||
5253 | ||
5254 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5255 | ||
5256 | ||
5257 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5258 | ||
5259 | fi | |
5260 | ||
5261 | ||
5262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5263 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5264 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
5265 | $as_echo_n "(cached) " >&6 | |
b5472e1d | 5266 | else |
5213506e | 5267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b5472e1d | 5268 | /* end confdefs.h. */ |
5213506e RW |
5269 | |
5270 | # define __EXTENSIONS__ 1 | |
5271 | $ac_includes_default | |
3bbd5a19 PB |
5272 | int |
5273 | main () | |
5274 | { | |
5213506e | 5275 | |
3bbd5a19 PB |
5276 | ; |
5277 | return 0; | |
5278 | } | |
b5472e1d | 5279 | _ACEOF |
5213506e RW |
5280 | if ac_fn_c_try_compile "$LINENO"; then : |
5281 | ac_cv_safe_to_define___extensions__=yes | |
b5472e1d | 5282 | else |
5213506e | 5283 | ac_cv_safe_to_define___extensions__=no |
b5472e1d | 5284 | fi |
5213506e | 5285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3bbd5a19 | 5286 | fi |
5213506e RW |
5287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
5288 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5289 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5290 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
3bbd5a19 | 5291 | |
5213506e RW |
5292 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
5293 | ||
5294 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
3bbd5a19 | 5295 | |
5213506e RW |
5296 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
5297 | ||
5298 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5299 | ||
5300 | ||
5301 | ac_ext=c | |
5302 | ac_cpp='$CPP $CPPFLAGS' | |
5303 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5304 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5305 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5307 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5308 | # On Suns, sometimes $CPP names a directory. | |
5309 | if test -n "$CPP" && test -d "$CPP"; then | |
5310 | CPP= | |
5311 | fi | |
5312 | if test -z "$CPP"; then | |
5313 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
5314 | $as_echo_n "(cached) " >&6 | |
89a42ac8 | 5315 | else |
5213506e RW |
5316 | # Double quotes because CPP needs to be expanded |
5317 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5318 | do | |
5319 | ac_preproc_ok=false | |
5320 | for ac_c_preproc_warn_flag in '' yes | |
5321 | do | |
5322 | # Use a header file that comes with gcc, so configuring glibc | |
5323 | # with a fresh cross-compiler works. | |
5324 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5325 | # <limits.h> exists even on freestanding compilers. | |
5326 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5327 | # not just through cpp. "Syntax error" is here to catch this case. | |
5328 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
89a42ac8 | 5329 | /* end confdefs.h. */ |
5213506e RW |
5330 | #ifdef __STDC__ |
5331 | # include <limits.h> | |
5332 | #else | |
5333 | # include <assert.h> | |
5334 | #endif | |
5335 | Syntax error | |
89a42ac8 | 5336 | _ACEOF |
5213506e RW |
5337 | if ac_fn_c_try_cpp "$LINENO"; then : |
5338 | ||
89a42ac8 | 5339 | else |
5213506e RW |
5340 | # Broken: fails on valid input. |
5341 | continue | |
5342 | fi | |
5343 | rm -f conftest.err conftest.$ac_ext | |
89a42ac8 | 5344 | |
5213506e RW |
5345 | # OK, works on sane cases. Now check whether nonexistent headers |
5346 | # can be detected and how. | |
5347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5348 | /* end confdefs.h. */ | |
5349 | #include <ac_nonexistent.h> | |
5350 | _ACEOF | |
5351 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5352 | # Broken: success on invalid input. | |
5353 | continue | |
5354 | else | |
5355 | # Passes both tests. | |
5356 | ac_preproc_ok=: | |
5357 | break | |
89a42ac8 | 5358 | fi |
5213506e RW |
5359 | rm -f conftest.err conftest.$ac_ext |
5360 | ||
5361 | done | |
5362 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5363 | rm -f conftest.err conftest.$ac_ext | |
5364 | if $ac_preproc_ok; then : | |
5365 | break | |
34a86c2b NN |
5366 | fi |
5367 | ||
5213506e RW |
5368 | done |
5369 | ac_cv_prog_CPP=$CPP | |
5370 | ||
5371 | fi | |
5372 | CPP=$ac_cv_prog_CPP | |
643d3bd2 | 5373 | else |
5213506e RW |
5374 | ac_cv_prog_CPP=$CPP |
5375 | fi | |
5376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5377 | $as_echo "$CPP" >&6; } | |
5378 | ac_preproc_ok=false | |
5379 | for ac_c_preproc_warn_flag in '' yes | |
5380 | do | |
5381 | # Use a header file that comes with gcc, so configuring glibc | |
5382 | # with a fresh cross-compiler works. | |
5383 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5384 | # <limits.h> exists even on freestanding compilers. | |
5385 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5386 | # not just through cpp. "Syntax error" is here to catch this case. | |
5387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
643d3bd2 | 5388 | /* end confdefs.h. */ |
5213506e RW |
5389 | #ifdef __STDC__ |
5390 | # include <limits.h> | |
5391 | #else | |
5392 | # include <assert.h> | |
5393 | #endif | |
5394 | Syntax error | |
00020c16 | 5395 | _ACEOF |
5213506e | 5396 | if ac_fn_c_try_cpp "$LINENO"; then : |
3bbd5a19 | 5397 | |
643d3bd2 | 5398 | else |
5213506e RW |
5399 | # Broken: fails on valid input. |
5400 | continue | |
5401 | fi | |
5402 | rm -f conftest.err conftest.$ac_ext | |
643d3bd2 | 5403 | |
5213506e RW |
5404 | # OK, works on sane cases. Now check whether nonexistent headers |
5405 | # can be detected and how. | |
5406 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5407 | /* end confdefs.h. */ | |
5408 | #include <ac_nonexistent.h> | |
5409 | _ACEOF | |
5410 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5411 | # Broken: success on invalid input. | |
5412 | continue | |
5413 | else | |
5414 | # Passes both tests. | |
5415 | ac_preproc_ok=: | |
5416 | break | |
643d3bd2 | 5417 | fi |
5213506e RW |
5418 | rm -f conftest.err conftest.$ac_ext |
5419 | ||
5420 | done | |
5421 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5422 | rm -f conftest.err conftest.$ac_ext | |
5423 | if $ac_preproc_ok; then : | |
5424 | ||
09a9c095 | 5425 | else |
5213506e RW |
5426 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
5427 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5428 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
5429 | See \`config.log' for more details." "$LINENO" 5; } | |
5430 | fi | |
373477bb | 5431 | |
5213506e RW |
5432 | ac_ext=c |
5433 | ac_cpp='$CPP $CPPFLAGS' | |
5434 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5435 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5436 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5437 | ||
5438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
5439 | $as_echo_n "checking for inline... " >&6; } | |
5440 | if test "${ac_cv_c_inline+set}" = set; then : | |
5441 | $as_echo_n "(cached) " >&6 | |
5442 | else | |
5443 | ac_cv_c_inline=no | |
5444 | for ac_kw in inline __inline__ __inline; do | |
5445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 | 5446 | /* end confdefs.h. */ |
5213506e RW |
5447 | #ifndef __cplusplus |
5448 | typedef int foo_t; | |
5449 | static $ac_kw foo_t static_foo () {return 0; } | |
5450 | $ac_kw foo_t foo () {return 0; } | |
5451 | #endif | |
373477bb | 5452 | |
00020c16 | 5453 | _ACEOF |
5213506e RW |
5454 | if ac_fn_c_try_compile "$LINENO"; then : |
5455 | ac_cv_c_inline=$ac_kw | |
5456 | fi | |
5457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5458 | test "$ac_cv_c_inline" != no && break | |
5459 | done | |
5460 | ||
5461 | fi | |
5462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
5463 | $as_echo "$ac_cv_c_inline" >&6; } | |
5464 | ||
5465 | case $ac_cv_c_inline in | |
5466 | inline | yes) ;; | |
5467 | *) | |
5468 | case $ac_cv_c_inline in | |
5469 | no) ac_val=;; | |
5470 | *) ac_val=$ac_cv_c_inline;; | |
5471 | esac | |
5472 | cat >>confdefs.h <<_ACEOF | |
5473 | #ifndef __cplusplus | |
5474 | #define inline $ac_val | |
5475 | #endif | |
00020c16 | 5476 | _ACEOF |
5213506e RW |
5477 | ;; |
5478 | esac | |
5479 | ||
5480 | ||
5481 | # sizeof(char) is 1 by definition. | |
5482 | # The cast to long int works around a bug in the HP C Compiler | |
5483 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5484 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5485 | # This bug is HP SR number 8606223364. | |
5486 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 | |
5487 | $as_echo_n "checking size of void *... " >&6; } | |
5488 | if test "${ac_cv_sizeof_void_p+set}" = set; then : | |
5489 | $as_echo_n "(cached) " >&6 | |
5490 | else | |
5491 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : | |
5492 | ||
5493 | else | |
5494 | if test "$ac_cv_type_void_p" = yes; then | |
5495 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5496 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5497 | { as_fn_set_status 77 | |
5498 | as_fn_error "cannot compute sizeof (void *) | |
5499 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5500 | else | |
5501 | ac_cv_sizeof_void_p=0 | |
5502 | fi | |
5503 | fi | |
5504 | ||
5505 | fi | |
5506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 | |
5507 | $as_echo "$ac_cv_sizeof_void_p" >&6; } | |
414d23ae | 5508 | |
5213506e RW |
5509 | |
5510 | ||
5511 | cat >>confdefs.h <<_ACEOF | |
5512 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
00020c16 | 5513 | _ACEOF |
5213506e RW |
5514 | |
5515 | ||
5516 | # The cast to long int works around a bug in the HP C Compiler | |
5517 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5518 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5519 | # This bug is HP SR number 8606223364. | |
5520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 | |
5521 | $as_echo_n "checking size of short... " >&6; } | |
5522 | if test "${ac_cv_sizeof_short+set}" = set; then : | |
5523 | $as_echo_n "(cached) " >&6 | |
00020c16 | 5524 | else |
5213506e RW |
5525 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : |
5526 | ||
5527 | else | |
5528 | if test "$ac_cv_type_short" = yes; then | |
5529 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5530 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5531 | { as_fn_set_status 77 | |
5532 | as_fn_error "cannot compute sizeof (short) | |
5533 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5534 | else | |
5535 | ac_cv_sizeof_short=0 | |
5536 | fi | |
5537 | fi | |
414d23ae | 5538 | |
a1286ef5 | 5539 | fi |
5213506e RW |
5540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 |
5541 | $as_echo "$ac_cv_sizeof_short" >&6; } | |
5542 | ||
5543 | ||
5544 | ||
5545 | cat >>confdefs.h <<_ACEOF | |
5546 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
5547 | _ACEOF | |
5548 | ||
5549 | ||
5550 | # The cast to long int works around a bug in the HP C Compiler | |
5551 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5552 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5553 | # This bug is HP SR number 8606223364. | |
5554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | |
5555 | $as_echo_n "checking size of int... " >&6; } | |
5556 | if test "${ac_cv_sizeof_int+set}" = set; then : | |
5557 | $as_echo_n "(cached) " >&6 | |
e1bbfc5c | 5558 | else |
5213506e | 5559 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : |
e1bbfc5c | 5560 | |
5213506e RW |
5561 | else |
5562 | if test "$ac_cv_type_int" = yes; then | |
5563 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5564 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5565 | { as_fn_set_status 77 | |
5566 | as_fn_error "cannot compute sizeof (int) | |
5567 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5568 | else | |
5569 | ac_cv_sizeof_int=0 | |
5570 | fi | |
e1bbfc5c | 5571 | fi |
5213506e | 5572 | |
ba479fd2 | 5573 | fi |
5213506e RW |
5574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
5575 | $as_echo "$ac_cv_sizeof_int" >&6; } | |
00020c16 | 5576 | |
5213506e RW |
5577 | |
5578 | ||
5579 | cat >>confdefs.h <<_ACEOF | |
5580 | #define SIZEOF_INT $ac_cv_sizeof_int | |
ba479fd2 | 5581 | _ACEOF |
5213506e RW |
5582 | |
5583 | ||
5584 | # The cast to long int works around a bug in the HP C Compiler | |
5585 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5586 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5587 | # This bug is HP SR number 8606223364. | |
5588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5589 | $as_echo_n "checking size of long... " >&6; } | |
5590 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5591 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 5592 | else |
5213506e | 5593 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
ba479fd2 | 5594 | |
00020c16 | 5595 | else |
5213506e RW |
5596 | if test "$ac_cv_type_long" = yes; then |
5597 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5598 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5599 | { as_fn_set_status 77 | |
5600 | as_fn_error "cannot compute sizeof (long) | |
5601 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5602 | else | |
5603 | ac_cv_sizeof_long=0 | |
5604 | fi | |
5605 | fi | |
5606 | ||
5607 | fi | |
5608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 | |
5609 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
5610 | ||
5611 | ||
5612 | ||
5613 | cat >>confdefs.h <<_ACEOF | |
5614 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
ba479fd2 | 5615 | _ACEOF |
00020c16 | 5616 | |
00020c16 | 5617 | |
5213506e RW |
5618 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" |
5619 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
5620 | ||
5621 | cat >>confdefs.h <<_ACEOF | |
5622 | #define HAVE_LONG_LONG 1 | |
ba479fd2 | 5623 | _ACEOF |
5213506e RW |
5624 | |
5625 | # The cast to long int works around a bug in the HP C Compiler | |
5626 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5627 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5628 | # This bug is HP SR number 8606223364. | |
5629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
5630 | $as_echo_n "checking size of long long... " >&6; } | |
5631 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
5632 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 5633 | else |
5213506e | 5634 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
ba479fd2 | 5635 | |
5213506e RW |
5636 | else |
5637 | if test "$ac_cv_type_long_long" = yes; then | |
5638 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5639 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5640 | { as_fn_set_status 77 | |
5641 | as_fn_error "cannot compute sizeof (long long) | |
5642 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5643 | else | |
5644 | ac_cv_sizeof_long_long=0 | |
5645 | fi | |
ba479fd2 | 5646 | fi |
5213506e | 5647 | |
6938ec6c | 5648 | fi |
5213506e RW |
5649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
5650 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
5651 | ||
5652 | ||
5653 | ||
5654 | cat >>confdefs.h <<_ACEOF | |
5655 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5656 | _ACEOF | |
5657 | ||
5658 | ||
6e3f3080 | 5659 | fi |
5213506e RW |
5660 | |
5661 | ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default" | |
5662 | if test "x$ac_cv_type___int64" = x""yes; then : | |
5663 | ||
5664 | cat >>confdefs.h <<_ACEOF | |
5665 | #define HAVE___INT64 1 | |
5666 | _ACEOF | |
5667 | ||
5668 | # The cast to long int works around a bug in the HP C Compiler | |
5669 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5670 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5671 | # This bug is HP SR number 8606223364. | |
5672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 | |
5673 | $as_echo_n "checking size of __int64... " >&6; } | |
5674 | if test "${ac_cv_sizeof___int64+set}" = set; then : | |
5675 | $as_echo_n "(cached) " >&6 | |
5676 | else | |
5677 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : | |
5678 | ||
6938ec6c | 5679 | else |
5213506e RW |
5680 | if test "$ac_cv_type___int64" = yes; then |
5681 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5682 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5683 | { as_fn_set_status 77 | |
5684 | as_fn_error "cannot compute sizeof (__int64) | |
5685 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5686 | else | |
5687 | ac_cv_sizeof___int64=0 | |
5688 | fi | |
6938ec6c | 5689 | fi |
5213506e | 5690 | |
00020c16 | 5691 | fi |
5213506e RW |
5692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 |
5693 | $as_echo "$ac_cv_sizeof___int64" >&6; } | |
5694 | ||
5695 | ||
5696 | ||
00020c16 ILT |
5697 | cat >>confdefs.h <<_ACEOF |
5698 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
5699 | _ACEOF | |
6938ec6c NN |
5700 | |
5701 | ||
00020c16 | 5702 | fi |
ba479fd2 | 5703 | |
fa802374 KT |
5704 | ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" |
5705 | case $ac_cv_c_int8_t in #( | |
5706 | no|yes) ;; #( | |
5707 | *) | |
5708 | ||
5709 | cat >>confdefs.h <<_ACEOF | |
5710 | #define int8_t $ac_cv_c_int8_t | |
5711 | _ACEOF | |
5712 | ;; | |
5713 | esac | |
5714 | ||
5715 | ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" | |
5716 | case $ac_cv_c_int16_t in #( | |
5717 | no|yes) ;; #( | |
5718 | *) | |
5719 | ||
5720 | cat >>confdefs.h <<_ACEOF | |
5721 | #define int16_t $ac_cv_c_int16_t | |
5722 | _ACEOF | |
5723 | ;; | |
5724 | esac | |
5725 | ||
5726 | ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" | |
5727 | case $ac_cv_c_int32_t in #( | |
5728 | no|yes) ;; #( | |
5729 | *) | |
5730 | ||
5731 | cat >>confdefs.h <<_ACEOF | |
5732 | #define int32_t $ac_cv_c_int32_t | |
5733 | _ACEOF | |
5734 | ;; | |
5735 | esac | |
5736 | ||
5737 | ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" | |
5738 | case $ac_cv_c_int64_t in #( | |
5739 | no|yes) ;; #( | |
5740 | *) | |
5741 | ||
5742 | cat >>confdefs.h <<_ACEOF | |
5743 | #define int64_t $ac_cv_c_int64_t | |
5744 | _ACEOF | |
5745 | ;; | |
5746 | esac | |
5747 | ||
5748 | ||
5749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
5750 | $as_echo_n "checking for long long int... " >&6; } | |
5751 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5752 | $as_echo_n "(cached) " >&6 | |
5753 | else | |
5754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5755 | /* end confdefs.h. */ | |
5756 | ||
5757 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
5758 | implementations with broken preprocessors. Perhaps this can | |
5759 | be revisited in 2012. In the meantime, code should not expect | |
5760 | #if to work with literals wider than 32 bits. */ | |
5761 | /* Test literals. */ | |
5762 | long long int ll = 9223372036854775807ll; | |
5763 | long long int nll = -9223372036854775807LL; | |
5764 | unsigned long long int ull = 18446744073709551615ULL; | |
5765 | /* Test constant expressions. */ | |
5766 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5767 | ? 1 : -1)]; | |
5768 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5769 | ? 1 : -1)]; | |
5770 | int i = 63; | |
5771 | int | |
5772 | main () | |
5773 | { | |
5774 | /* Test availability of runtime routines for shift and division. */ | |
5775 | long long int llmax = 9223372036854775807ll; | |
5776 | unsigned long long int ullmax = 18446744073709551615ull; | |
5777 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5778 | | (llmax / ll) | (llmax % ll) | |
5779 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5780 | | (ullmax / ull) | (ullmax % ull)); | |
5781 | ; | |
5782 | return 0; | |
5783 | } | |
5784 | ||
5785 | _ACEOF | |
5786 | if ac_fn_c_try_link "$LINENO"; then : | |
5787 | if test "$cross_compiling" = yes; then : | |
5788 | ac_cv_type_long_long_int=yes | |
5789 | else | |
5790 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5791 | /* end confdefs.h. */ | |
5792 | #include <limits.h> | |
5793 | #ifndef LLONG_MAX | |
5794 | # define HALF \ | |
5795 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5796 | # define LLONG_MAX (HALF - 1 + HALF) | |
5797 | #endif | |
5798 | int | |
5799 | main () | |
5800 | { | |
5801 | long long int n = 1; | |
5802 | int i; | |
5803 | for (i = 0; ; i++) | |
5804 | { | |
5805 | long long int m = n << i; | |
5806 | if (m >> i != n) | |
5807 | return 1; | |
5808 | if (LLONG_MAX / 2 < m) | |
5809 | break; | |
5810 | } | |
5811 | return 0; | |
5812 | ; | |
5813 | return 0; | |
5814 | } | |
5815 | _ACEOF | |
5816 | if ac_fn_c_try_run "$LINENO"; then : | |
5817 | ac_cv_type_long_long_int=yes | |
5818 | else | |
5819 | ac_cv_type_long_long_int=no | |
5820 | fi | |
5821 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5822 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5823 | fi | |
5824 | ||
5825 | else | |
5826 | ac_cv_type_long_long_int=no | |
5827 | fi | |
5828 | rm -f core conftest.err conftest.$ac_objext \ | |
5829 | conftest$ac_exeext conftest.$ac_ext | |
5830 | fi | |
5831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
5832 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
5833 | if test $ac_cv_type_long_long_int = yes; then | |
5834 | ||
5835 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |
5836 | ||
5837 | fi | |
5838 | ||
5839 | ||
5840 | ||
5841 | ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" | |
5842 | if test "x$ac_cv_type_intmax_t" = x""yes; then : | |
5843 | ||
5844 | $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h | |
5845 | ||
5846 | else | |
5847 | test $ac_cv_type_long_long_int = yes \ | |
5848 | && ac_type='long long int' \ | |
5849 | || ac_type='long int' | |
5850 | ||
5851 | cat >>confdefs.h <<_ACEOF | |
5852 | #define intmax_t $ac_type | |
5853 | _ACEOF | |
5854 | ||
5855 | fi | |
5856 | ||
5857 | ||
5858 | ||
5859 | ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" | |
5860 | if test "x$ac_cv_type_intptr_t" = x""yes; then : | |
5861 | ||
5862 | $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h | |
5863 | ||
5864 | else | |
5865 | for ac_type in 'int' 'long int' 'long long int'; do | |
5866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5867 | /* end confdefs.h. */ | |
5868 | $ac_includes_default | |
5869 | int | |
5870 | main () | |
5871 | { | |
5872 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
5873 | test_array [0] = 0 | |
5874 | ||
5875 | ; | |
5876 | return 0; | |
5877 | } | |
5878 | _ACEOF | |
5879 | if ac_fn_c_try_compile "$LINENO"; then : | |
5880 | ||
5881 | cat >>confdefs.h <<_ACEOF | |
5882 | #define intptr_t $ac_type | |
5883 | _ACEOF | |
5884 | ||
5885 | ac_type= | |
5886 | fi | |
5887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5888 | test -z "$ac_type" && break | |
5889 | done | |
5890 | fi | |
5891 | ||
5892 | ||
5893 | ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" | |
5894 | case $ac_cv_c_uint8_t in #( | |
5895 | no|yes) ;; #( | |
5896 | *) | |
5897 | ||
5898 | $as_echo "#define _UINT8_T 1" >>confdefs.h | |
5899 | ||
5900 | ||
5901 | cat >>confdefs.h <<_ACEOF | |
5902 | #define uint8_t $ac_cv_c_uint8_t | |
5903 | _ACEOF | |
5904 | ;; | |
5905 | esac | |
5906 | ||
5907 | ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" | |
5908 | case $ac_cv_c_uint16_t in #( | |
5909 | no|yes) ;; #( | |
5910 | *) | |
5911 | ||
5912 | ||
5913 | cat >>confdefs.h <<_ACEOF | |
5914 | #define uint16_t $ac_cv_c_uint16_t | |
5915 | _ACEOF | |
5916 | ;; | |
5917 | esac | |
5918 | ||
5919 | ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" | |
5920 | case $ac_cv_c_uint32_t in #( | |
5921 | no|yes) ;; #( | |
5922 | *) | |
5923 | ||
5924 | $as_echo "#define _UINT32_T 1" >>confdefs.h | |
5925 | ||
5926 | ||
5927 | cat >>confdefs.h <<_ACEOF | |
5928 | #define uint32_t $ac_cv_c_uint32_t | |
5929 | _ACEOF | |
5930 | ;; | |
5931 | esac | |
5932 | ||
5933 | ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" | |
5934 | case $ac_cv_c_uint64_t in #( | |
5935 | no|yes) ;; #( | |
5936 | *) | |
5937 | ||
5938 | $as_echo "#define _UINT64_T 1" >>confdefs.h | |
5939 | ||
5940 | ||
5941 | cat >>confdefs.h <<_ACEOF | |
5942 | #define uint64_t $ac_cv_c_uint64_t | |
5943 | _ACEOF | |
5944 | ;; | |
5945 | esac | |
5946 | ||
5947 | ||
5948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 | |
5949 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5950 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5951 | $as_echo_n "(cached) " >&6 | |
5952 | else | |
5953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5954 | /* end confdefs.h. */ | |
5955 | ||
5956 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
5957 | implementations with broken preprocessors. Perhaps this can | |
5958 | be revisited in 2012. In the meantime, code should not expect | |
5959 | #if to work with literals wider than 32 bits. */ | |
5960 | /* Test literals. */ | |
5961 | long long int ll = 9223372036854775807ll; | |
5962 | long long int nll = -9223372036854775807LL; | |
5963 | unsigned long long int ull = 18446744073709551615ULL; | |
5964 | /* Test constant expressions. */ | |
5965 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5966 | ? 1 : -1)]; | |
5967 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5968 | ? 1 : -1)]; | |
5969 | int i = 63; | |
5970 | int | |
5971 | main () | |
5972 | { | |
5973 | /* Test availability of runtime routines for shift and division. */ | |
5974 | long long int llmax = 9223372036854775807ll; | |
5975 | unsigned long long int ullmax = 18446744073709551615ull; | |
5976 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5977 | | (llmax / ll) | (llmax % ll) | |
5978 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5979 | | (ullmax / ull) | (ullmax % ull)); | |
5980 | ; | |
5981 | return 0; | |
5982 | } | |
5983 | ||
5984 | _ACEOF | |
5985 | if ac_fn_c_try_link "$LINENO"; then : | |
5986 | ac_cv_type_unsigned_long_long_int=yes | |
5987 | else | |
5988 | ac_cv_type_unsigned_long_long_int=no | |
5989 | fi | |
5990 | rm -f core conftest.err conftest.$ac_objext \ | |
5991 | conftest$ac_exeext conftest.$ac_ext | |
5992 | fi | |
5993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
5994 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
5995 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5996 | ||
5997 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h | |
5998 | ||
5999 | fi | |
6000 | ||
6001 | ||
6002 | ||
6003 | ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" | |
6004 | if test "x$ac_cv_type_uintmax_t" = x""yes; then : | |
6005 | ||
6006 | $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h | |
6007 | ||
6008 | else | |
6009 | test $ac_cv_type_unsigned_long_long_int = yes \ | |
6010 | && ac_type='unsigned long long int' \ | |
6011 | || ac_type='unsigned long int' | |
6012 | ||
6013 | cat >>confdefs.h <<_ACEOF | |
6014 | #define uintmax_t $ac_type | |
6015 | _ACEOF | |
6016 | ||
6017 | fi | |
6018 | ||
6019 | ||
6020 | ||
6021 | ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" | |
6022 | if test "x$ac_cv_type_uintptr_t" = x""yes; then : | |
6023 | ||
6024 | $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h | |
6025 | ||
6026 | else | |
6027 | for ac_type in 'unsigned int' 'unsigned long int' \ | |
6028 | 'unsigned long long int'; do | |
6029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6030 | /* end confdefs.h. */ | |
6031 | $ac_includes_default | |
6032 | int | |
6033 | main () | |
6034 | { | |
6035 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
6036 | test_array [0] = 0 | |
6037 | ||
6038 | ; | |
6039 | return 0; | |
6040 | } | |
6041 | _ACEOF | |
6042 | if ac_fn_c_try_compile "$LINENO"; then : | |
6043 | ||
6044 | cat >>confdefs.h <<_ACEOF | |
6045 | #define uintptr_t $ac_type | |
6046 | _ACEOF | |
6047 | ||
6048 | ac_type= | |
6049 | fi | |
6050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6051 | test -z "$ac_type" && break | |
6052 | done | |
6053 | fi | |
6054 | ||
6055 | ||
6056 | ||
6057 | ||
6058 | ||
6059 | ||
6060 | ||
6061 | ||
6062 | ||
6063 | ||
6064 | ||
6065 | ||
6066 | ||
6067 | ||
00020c16 ILT |
6068 | |
6069 | # --------------------- | |
6070 | # Warnings and checking | |
6071 | # --------------------- | |
6072 | ||
6073 | # Check $CC warning features (if it's GCC). | |
6074 | # We want to use -pedantic, but we don't want warnings about | |
6075 | # * 'long long' | |
6076 | # * variadic macros | |
6077 | # * overlong strings | |
6078 | # So, we only use -pedantic if we can disable those warnings. | |
6079 | ||
6080 | loose_warn= | |
6081 | save_CFLAGS="$CFLAGS" | |
6082 | for option in -W -Wall -Wwrite-strings -Wcast-qual; do | |
5213506e | 6083 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6084 | |
5213506e RW |
6085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6086 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6087 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6088 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6089 | else |
6090 | CFLAGS="$option" | |
5213506e | 6091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 6092 | /* end confdefs.h. */ |
00020c16 ILT |
6093 | |
6094 | int | |
6095 | main () | |
6096 | { | |
6097 | ||
6098 | ; | |
6099 | return 0; | |
6100 | } | |
ba479fd2 | 6101 | _ACEOF |
5213506e | 6102 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6103 | eval "$as_acx_Woption=yes" |
a207b594 | 6104 | else |
5213506e | 6105 | eval "$as_acx_Woption=no" |
a207b594 | 6106 | fi |
5213506e | 6107 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 ILT |
6108 | |
6109 | fi | |
5213506e RW |
6110 | eval ac_res=\$$as_acx_Woption |
6111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6112 | $as_echo "$ac_res" >&6; } | |
6113 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6114 | loose_warn="$loose_warn${loose_warn:+ }$option" |
6115 | fi | |
00020c16 ILT |
6116 | done |
6117 | CFLAGS="$save_CFLAGS" | |
6118 | ||
6119 | c_loose_warn= | |
6120 | save_CFLAGS="$CFLAGS" | |
6121 | for option in -Wstrict-prototypes -Wmissing-prototypes; do | |
5213506e | 6122 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6123 | |
5213506e RW |
6124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6125 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6126 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6127 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6128 | else |
6129 | CFLAGS="$option" | |
5213506e | 6130 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 6131 | /* end confdefs.h. */ |
00020c16 ILT |
6132 | |
6133 | int | |
6134 | main () | |
6135 | { | |
6136 | ||
6137 | ; | |
6138 | return 0; | |
6139 | } | |
ba479fd2 | 6140 | _ACEOF |
5213506e | 6141 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6142 | eval "$as_acx_Woption=yes" |
14011ca4 | 6143 | else |
5213506e | 6144 | eval "$as_acx_Woption=no" |
cafe096b | 6145 | fi |
5213506e | 6146 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 6147 | |
56694dd9 | 6148 | fi |
5213506e RW |
6149 | eval ac_res=\$$as_acx_Woption |
6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6151 | $as_echo "$ac_res" >&6; } | |
6152 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 | 6153 | c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option" |
56694dd9 | 6154 | fi |
00020c16 ILT |
6155 | done |
6156 | CFLAGS="$save_CFLAGS" | |
6157 | ||
6158 | strict_warn= | |
6159 | save_CFLAGS="$CFLAGS" | |
6160 | for option in -Wmissing-format-attribute; do | |
5213506e | 6161 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6162 | |
5213506e RW |
6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6164 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6165 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6166 | $as_echo_n "(cached) " >&6 | |
414d23ae | 6167 | else |
00020c16 | 6168 | CFLAGS="$option" |
5213506e | 6169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
6170 | /* end confdefs.h. */ |
6171 | ||
6172 | int | |
6173 | main () | |
6174 | { | |
6175 | ||
6176 | ; | |
6177 | return 0; | |
6178 | } | |
6179 | _ACEOF | |
5213506e | 6180 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6181 | eval "$as_acx_Woption=yes" |
414d23ae | 6182 | else |
5213506e | 6183 | eval "$as_acx_Woption=no" |
414d23ae | 6184 | fi |
5213506e | 6185 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 6186 | |
00020c16 | 6187 | fi |
5213506e RW |
6188 | eval ac_res=\$$as_acx_Woption |
6189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6190 | $as_echo "$ac_res" >&6; } | |
6191 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6192 | strict_warn="$strict_warn${strict_warn:+ }$option" |
6193 | fi | |
00020c16 ILT |
6194 | done |
6195 | CFLAGS="$save_CFLAGS" | |
75e93faa | 6196 | |
00020c16 ILT |
6197 | c_strict_warn= |
6198 | save_CFLAGS="$CFLAGS" | |
6199 | for option in -Wold-style-definition -Wc++-compat; do | |
5213506e | 6200 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
ba479fd2 | 6201 | |
5213506e RW |
6202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6203 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6204 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6205 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6206 | else |
6207 | CFLAGS="$option" | |
5213506e | 6208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 6209 | /* end confdefs.h. */ |
a207b594 | 6210 | |
00020c16 ILT |
6211 | int |
6212 | main () | |
6213 | { | |
ba479fd2 | 6214 | |
00020c16 ILT |
6215 | ; |
6216 | return 0; | |
6217 | } | |
ba479fd2 | 6218 | _ACEOF |
5213506e | 6219 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
6220 | eval "$as_acx_Woption=yes" |
6221 | else | |
5213506e | 6222 | eval "$as_acx_Woption=no" |
414d23ae | 6223 | fi |
5213506e | 6224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa | 6225 | |
00020c16 | 6226 | fi |
5213506e RW |
6227 | eval ac_res=\$$as_acx_Woption |
6228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6229 | $as_echo "$ac_res" >&6; } | |
6230 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6231 | c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option" |
6232 | fi | |
00020c16 ILT |
6233 | done |
6234 | CFLAGS="$save_CFLAGS" | |
75e93faa | 6235 | |
5213506e RW |
6236 | if test "$GCC" = yes; then : |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5 | |
6238 | $as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; } | |
6239 | if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then : | |
6240 | $as_echo_n "(cached) " >&6 | |
75e93faa | 6241 | else |
00020c16 ILT |
6242 | save_CFLAGS="$CFLAGS" |
6243 | CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
5213506e | 6244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 6245 | /* end confdefs.h. */ |
2f41c1d6 | 6246 | |
00020c16 ILT |
6247 | int |
6248 | main () | |
6249 | { | |
b61ff9c8 | 6250 | |
00020c16 ILT |
6251 | ; |
6252 | return 0; | |
6253 | } | |
6254 | _ACEOF | |
5213506e | 6255 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6256 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes |
439a7e54 | 6257 | else |
5213506e | 6258 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no |
00020c16 | 6259 | fi |
5213506e | 6260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 ILT |
6261 | CFLAGS="$save_CFLAGS" |
6262 | fi | |
5213506e RW |
6263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5 |
6264 | $as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; } | |
6265 | if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then : | |
00020c16 ILT |
6266 | strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" |
6267 | fi | |
ba479fd2 | 6268 | |
439a7e54 DN |
6269 | fi |
6270 | ||
5213506e RW |
6271 | # Check whether --enable-werror-always was given. |
6272 | if test "${enable_werror_always+set}" = set; then : | |
6273 | enableval=$enable_werror_always; | |
34a86c2b | 6274 | else |
00020c16 | 6275 | enable_werror_always=no |
00020c16 | 6276 | fi |
cafe096b | 6277 | |
5213506e RW |
6278 | if test $enable_werror_always = yes; then : |
6279 | strict_warn="$strict_warn${strict_warn:+ }-Werror" | |
6280 | fi | |
b61ff9c8 | 6281 | |
75e93faa | 6282 | |
34a86c2b | 6283 | |
00020c16 ILT |
6284 | # The above macros do nothing if the compiler is not GCC. However, the |
6285 | # Makefile has more goo to add other flags, so these variables are used | |
6286 | # to enable warnings only for GCC. | |
6287 | warn_cflags= | |
6288 | warn_cxxflags= | |
6289 | if test "x$GCC" = "xyes"; then | |
6290 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6291 | warn_cxxflags='$(GCC_WARN_CXXFLAGS)' | |
6292 | fi | |
75e93faa ZW |
6293 | |
6294 | ||
b61ff9c8 | 6295 | |
00020c16 ILT |
6296 | # Enable expensive internal checks |
6297 | is_release= | |
6298 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6299 | is_release=yes | |
6300 | fi | |
79b87c74 | 6301 | |
5213506e RW |
6302 | # Check whether --enable-checking was given. |
6303 | if test "${enable_checking+set}" = set; then : | |
6304 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
79b87c74 MM |
6305 | else |
6306 | ||
00020c16 ILT |
6307 | # Determine the default checks. |
6308 | if test x$is_release = x ; then | |
6309 | ac_checking_flags=yes | |
6310 | else | |
6311 | ac_checking_flags=release | |
6312 | fi | |
5213506e RW |
6313 | fi |
6314 | ||
00020c16 ILT |
6315 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6316 | for check in release $ac_checking_flags | |
6317 | do | |
6318 | case $check in | |
6319 | # these set all the flags to specific states | |
6320 | yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ; | |
6321 | ac_fold_checking= ; ac_gc_checking=1 ; | |
6322 | ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ; | |
6323 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6324 | ac_tree_checking=1 ; ac_valgrind_checking= ; | |
6325 | ac_types_checking=1 ;; | |
6326 | no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ; | |
6327 | ac_fold_checking= ; ac_gc_checking= ; | |
6328 | ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ; | |
6329 | ac_rtlflag_checking= ; ac_runtime_checking= ; | |
6330 | ac_tree_checking= ; ac_valgrind_checking= ; | |
6331 | ac_types_checking= ;; | |
6332 | all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ; | |
6333 | ac_fold_checking=1 ; ac_gc_checking=1 ; | |
6334 | ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ; | |
6335 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6336 | ac_tree_checking=1 ; ac_valgrind_checking= ; | |
6337 | ac_types_checking=1 ;; | |
6338 | release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ; | |
6339 | ac_fold_checking= ; ac_gc_checking= ; | |
6340 | ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ; | |
6341 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6342 | ac_tree_checking= ; ac_valgrind_checking= ; | |
6343 | ac_types_checking= ;; | |
6344 | # these enable particular checks | |
6345 | assert) ac_assert_checking=1 ;; | |
6346 | df) ac_df_checking=1 ;; | |
6347 | fold) ac_fold_checking=1 ;; | |
6348 | gc) ac_gc_checking=1 ;; | |
6349 | gcac) ac_gc_always_collect=1 ;; | |
6350 | gimple) ac_gimple_checking=1 ;; | |
6351 | misc) ac_checking=1 ;; | |
6352 | rtl) ac_rtl_checking=1 ;; | |
6353 | rtlflag) ac_rtlflag_checking=1 ;; | |
6354 | runtime) ac_runtime_checking=1 ;; | |
6355 | tree) ac_tree_checking=1 ;; | |
6356 | types) ac_types_checking=1 ;; | |
6357 | valgrind) ac_valgrind_checking=1 ;; | |
5213506e | 6358 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
00020c16 ILT |
6359 | esac |
6360 | done | |
6361 | IFS="$ac_save_IFS" | |
486aa804 | 6362 | |
00020c16 ILT |
6363 | nocommon_flag="" |
6364 | if test x$ac_checking != x ; then | |
79b87c74 | 6365 | |
5213506e | 6366 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h |
79b87c74 | 6367 | |
00020c16 ILT |
6368 | nocommon_flag=-fno-common |
6369 | fi | |
79b87c74 | 6370 | |
00020c16 | 6371 | if test x$ac_df_checking != x ; then |
486aa804 | 6372 | |
5213506e | 6373 | $as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h |
486aa804 | 6374 | |
00020c16 ILT |
6375 | fi |
6376 | if test x$ac_assert_checking != x ; then | |
486aa804 | 6377 | |
5213506e | 6378 | $as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h |
486aa804 | 6379 | |
00020c16 ILT |
6380 | fi |
6381 | if test x$ac_gimple_checking != x ; then | |
486aa804 | 6382 | |
5213506e | 6383 | $as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h |
b61ff9c8 | 6384 | |
00020c16 | 6385 | fi |
ab22c1fa | 6386 | |
00020c16 | 6387 | if test x$ac_runtime_checking != x ; then |
ab22c1fa | 6388 | |
5213506e | 6389 | $as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h |
ab22c1fa | 6390 | |
00020c16 ILT |
6391 | fi |
6392 | if test x$ac_tree_checking != x ; then | |
ab22c1fa | 6393 | |
5213506e | 6394 | $as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h |
ab22c1fa | 6395 | |
00020c16 ILT |
6396 | TREEBROWSER=tree-browser.o |
6397 | fi | |
6398 | if test x$ac_types_checking != x ; then | |
ab22c1fa | 6399 | |
5213506e | 6400 | $as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h |
ab22c1fa | 6401 | |
00020c16 | 6402 | fi |
ab22c1fa | 6403 | |
00020c16 | 6404 | if test x$ac_rtl_checking != x ; then |
2f41c1d6 | 6405 | |
5213506e RW |
6406 | $as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h |
6407 | ||
00020c16 | 6408 | fi |
5213506e RW |
6409 | if test x$ac_rtlflag_checking != x ; then |
6410 | ||
6411 | $as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h | |
4977bab6 | 6412 | |
00020c16 | 6413 | fi |
5213506e RW |
6414 | if test x$ac_gc_checking != x ; then |
6415 | ||
6416 | $as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h | |
6417 | ||
6418 | fi | |
6419 | if test x$ac_gc_always_collect != x ; then | |
6420 | ||
6421 | $as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h | |
4977bab6 | 6422 | |
00020c16 | 6423 | fi |
5213506e RW |
6424 | if test x$ac_fold_checking != x ; then |
6425 | ||
6426 | $as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h | |
2f41c1d6 | 6427 | |
00020c16 | 6428 | fi |
5213506e RW |
6429 | valgrind_path_defines= |
6430 | valgrind_command= | |
6431 | ||
6432 | ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" | |
6433 | if test "x$ac_cv_header_valgrind_h" = x""yes; then : | |
00020c16 | 6434 | have_valgrind_h=yes |
2f41c1d6 | 6435 | else |
00020c16 ILT |
6436 | have_valgrind_h=no |
6437 | fi | |
2f41c1d6 | 6438 | |
1a4b763e | 6439 | |
2f41c1d6 | 6440 | |
00020c16 ILT |
6441 | if test x$ac_valgrind_checking != x ; then |
6442 | # It is certainly possible that there's valgrind but no valgrind.h. | |
6443 | # GCC relies on making annotations so we must have both. | |
5213506e RW |
6444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6445 | $as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; } | |
6446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 ILT |
6447 | /* end confdefs.h. */ |
6448 | #include <valgrind/memcheck.h> | |
6449 | #ifndef VALGRIND_DISCARD | |
6450 | #error VALGRIND_DISCARD not defined | |
6451 | #endif | |
6452 | _ACEOF | |
5213506e | 6453 | if ac_fn_c_try_cpp "$LINENO"; then : |
00020c16 | 6454 | gcc_cv_header_valgrind_memcheck_h=yes |
aca600aa | 6455 | else |
00020c16 ILT |
6456 | gcc_cv_header_valgrind_memcheck_h=no |
6457 | fi | |
6458 | rm -f conftest.err conftest.$ac_ext | |
5213506e RW |
6459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5 |
6460 | $as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; } | |
6461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6462 | $as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; } | |
6463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 ILT |
6464 | /* end confdefs.h. */ |
6465 | #include <memcheck.h> | |
6466 | #ifndef VALGRIND_DISCARD | |
6467 | #error VALGRIND_DISCARD not defined | |
6468 | #endif | |
6469 | _ACEOF | |
5213506e | 6470 | if ac_fn_c_try_cpp "$LINENO"; then : |
00020c16 | 6471 | gcc_cv_header_memcheck_h=yes |
e9a25f70 | 6472 | else |
00020c16 ILT |
6473 | gcc_cv_header_memcheck_h=no |
6474 | fi | |
6475 | rm -f conftest.err conftest.$ac_ext | |
5213506e RW |
6476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5 |
6477 | $as_echo "$gcc_cv_header_memcheck_h" >&6; } | |
00020c16 ILT |
6478 | |
6479 | # Prepare PATH_SEPARATOR. | |
6480 | # The user is always right. | |
6481 | if test "${PATH_SEPARATOR+set}" != set; then | |
6482 | echo "#! /bin/sh" >conf$$.sh | |
6483 | echo "exit 0" >>conf$$.sh | |
6484 | chmod +x conf$$.sh | |
6485 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6486 | PATH_SEPARATOR=';' | |
6487 | else | |
6488 | PATH_SEPARATOR=: | |
6489 | fi | |
6490 | rm -f conf$$.sh | |
e9a25f70 JL |
6491 | fi |
6492 | ||
00020c16 ILT |
6493 | # Find out how to test for executable files. Don't use a zero-byte file, |
6494 | # as systems may use methods other than mode bits to determine executability. | |
6495 | cat >conf$$.file <<_ASEOF | |
6496 | #! /bin/sh | |
6497 | exit 0 | |
6498 | _ASEOF | |
6499 | chmod +x conf$$.file | |
6500 | if test -x conf$$.file >/dev/null 2>&1; then | |
6501 | ac_executable_p="test -x" | |
6502 | else | |
6503 | ac_executable_p="test -f" | |
6504 | fi | |
6505 | rm -f conf$$.file | |
e9a25f70 | 6506 | |
00020c16 ILT |
6507 | # Extract the first word of "valgrind", so it can be a program name with args. |
6508 | set dummy valgrind; ac_word=$2 | |
5213506e RW |
6509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6510 | $as_echo_n "checking for $ac_word... " >&6; } | |
6511 | if test "${ac_cv_path_valgrind_path+set}" = set; then : | |
6512 | $as_echo_n "(cached) " >&6 | |
861bb6c1 | 6513 | else |
00020c16 ILT |
6514 | case "$valgrind_path" in |
6515 | [\\/]* | ?:[\\/]*) | |
6516 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6517 | ;; | |
6518 | *) | |
6519 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
6520 | for ac_dir in $PATH; do | |
6521 | IFS="$ac_save_IFS" | |
6522 | test -z "$ac_dir" && ac_dir=. | |
6523 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6524 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6525 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6526 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6527 | break 2 | |
6528 | fi | |
6529 | fi | |
6530 | done | |
6531 | done | |
6532 | IFS="$ac_save_IFS" | |
6533 | ;; | |
6534 | esac | |
861bb6c1 | 6535 | fi |
00020c16 ILT |
6536 | valgrind_path="$ac_cv_path_valgrind_path" |
6537 | if test -n "$valgrind_path"; then | |
5213506e RW |
6538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5 |
6539 | $as_echo "$valgrind_path" >&6; } | |
861bb6c1 | 6540 | else |
5213506e RW |
6541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6542 | $as_echo "no" >&6; } | |
861bb6c1 JL |
6543 | fi |
6544 | ||
00020c16 ILT |
6545 | if test "x$valgrind_path" = "x" \ |
6546 | || (test $have_valgrind_h = no \ | |
6547 | && test $gcc_cv_header_memcheck_h = no \ | |
6548 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
5213506e | 6549 | as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5 |
00020c16 ILT |
6550 | fi |
6551 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6552 | valgrind_command="$valgrind_path -q" | |
861bb6c1 | 6553 | |
5213506e | 6554 | $as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h |
00020c16 ILT |
6555 | |
6556 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then | |
6557 | ||
5213506e | 6558 | $as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h |
2c4902b9 | 6559 | |
0a4b6309 | 6560 | fi |
00020c16 ILT |
6561 | if test $gcc_cv_header_memcheck_h = yes; then |
6562 | ||
5213506e | 6563 | $as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h |
0a4b6309 | 6564 | |
0a4b6309 RL |
6565 | fi |
6566 | fi | |
6567 | ||
18fc9bd4 | 6568 | |
18fc9bd4 | 6569 | |
00020c16 | 6570 | # Enable code coverage collection |
5213506e RW |
6571 | # Check whether --enable-coverage was given. |
6572 | if test "${enable_coverage+set}" = set; then : | |
6573 | enableval=$enable_coverage; case "${enableval}" in | |
00020c16 ILT |
6574 | yes|noopt) |
6575 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6576 | ;; | |
6577 | opt) | |
6578 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6579 | ;; | |
6580 | no) | |
6581 | # a.k.a. --disable-coverage | |
6582 | coverage_flags="" | |
6583 | ;; | |
6584 | *) | |
5213506e | 6585 | as_fn_error "unknown coverage setting $enableval" "$LINENO" 5 |
00020c16 ILT |
6586 | ;; |
6587 | esac | |
861bb6c1 | 6588 | else |
00020c16 | 6589 | coverage_flags="" |
5213506e | 6590 | fi |
00020c16 ILT |
6591 | |
6592 | ||
ba479fd2 | 6593 | |
5213506e RW |
6594 | # Check whether --enable-gather-detailed-mem-stats was given. |
6595 | if test "${enable_gather_detailed_mem_stats+set}" = set; then : | |
6596 | enableval=$enable_gather_detailed_mem_stats; | |
ba479fd2 | 6597 | else |
00020c16 | 6598 | enable_gather_detailed_mem_stats=no |
5213506e RW |
6599 | fi |
6600 | ||
00020c16 ILT |
6601 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
6602 | ||
5213506e | 6603 | $as_echo "#define GATHER_STATISTICS 1" >>confdefs.h |
ba479fd2 NN |
6604 | |
6605 | fi | |
00020c16 ILT |
6606 | |
6607 | # ------------------------------- | |
6608 | # Miscenalleous configure options | |
6609 | # ------------------------------- | |
6610 | ||
6611 | # See if we are building gcc with C++. | |
5213506e RW |
6612 | # Check whether --enable-build-with-cxx was given. |
6613 | if test "${enable_build_with_cxx+set}" = set; then : | |
6614 | enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval | |
ba479fd2 | 6615 | else |
00020c16 | 6616 | ENABLE_BUILD_WITH_CXX=no |
5213506e RW |
6617 | fi |
6618 | ||
ba479fd2 | 6619 | |
00020c16 ILT |
6620 | |
6621 | # With stabs | |
6622 | ||
5213506e RW |
6623 | # Check whether --with-stabs was given. |
6624 | if test "${with_stabs+set}" = set; then : | |
6625 | withval=$with_stabs; stabs="$with_stabs" | |
6e3f3080 | 6626 | else |
00020c16 | 6627 | stabs=no |
5213506e | 6628 | fi |
00020c16 | 6629 | |
ba479fd2 | 6630 | |
5213506e RW |
6631 | # Determine whether or not multilibs are enabled. |
6632 | # Check whether --enable-multilib was given. | |
6633 | if test "${enable_multilib+set}" = set; then : | |
6634 | enableval=$enable_multilib; | |
ba479fd2 | 6635 | else |
00020c16 | 6636 | enable_multilib=yes |
5213506e RW |
6637 | fi |
6638 | ||
861bb6c1 | 6639 | |
343a6100 | 6640 | |
00020c16 | 6641 | # Enable __cxa_atexit for C++. |
5213506e RW |
6642 | # Check whether --enable-__cxa_atexit was given. |
6643 | if test "${enable___cxa_atexit+set}" = set; then : | |
6644 | enableval=$enable___cxa_atexit; | |
6645 | fi | |
00020c16 | 6646 | |
00020c16 ILT |
6647 | |
6648 | # Enable C extension for decimal float if target supports it. | |
5213506e RW |
6649 | # Check whether --enable-decimal-float was given. |
6650 | if test "${enable_decimal_float+set}" = set; then : | |
6651 | enableval=$enable_decimal_float; | |
00020c16 ILT |
6652 | case $enable_decimal_float in |
6653 | yes | no | bid | dpd) ;; | |
5213506e RW |
6654 | *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float. |
6655 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;; | |
00020c16 | 6656 | esac |
343a6100 | 6657 | |
0a4b6309 | 6658 | else |
00020c16 ILT |
6659 | |
6660 | case $target in | |
6661 | powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) | |
6662 | enable_decimal_float=yes | |
0a4b6309 | 6663 | ;; |
00020c16 | 6664 | *) |
5213506e RW |
6665 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5 |
6666 | $as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
00020c16 ILT |
6667 | enable_decimal_float=no |
6668 | ;; | |
6669 | esac | |
6670 | ||
5213506e RW |
6671 | fi |
6672 | ||
00020c16 ILT |
6673 | |
6674 | dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` | |
6675 | ||
6676 | cat >>confdefs.h <<_ACEOF | |
6677 | #define ENABLE_DECIMAL_FLOAT $dfp | |
6678 | _ACEOF | |
6679 | ||
6680 | ||
6681 | # x86's use BID format instead of DPD | |
6682 | case x$enable_decimal_float in | |
6683 | xyes) | |
6684 | case $target in | |
6685 | i?86*-*-linux* | x86_64*-*-linux*) | |
6686 | enable_decimal_float=bid | |
6687 | ;; | |
6688 | *) | |
6689 | enable_decimal_float=dpd | |
6690 | ;; | |
0a4b6309 | 6691 | esac |
00020c16 ILT |
6692 | ;; |
6693 | xno) | |
6694 | # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
6695 | # dependency on libdecnumber. | |
6696 | enable_decimal_float=dpd | |
6697 | ;; | |
6698 | esac | |
0a4b6309 | 6699 | |
0a4b6309 | 6700 | |
00020c16 | 6701 | bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` |
0a4b6309 | 6702 | |
00020c16 ILT |
6703 | cat >>confdefs.h <<_ACEOF |
6704 | #define ENABLE_DECIMAL_BID_FORMAT $bid | |
6705 | _ACEOF | |
6706 | ||
6707 | ||
6708 | # Enable C extension for fixed-point arithmetic. | |
5213506e RW |
6709 | # Check whether --enable-fixed-point was given. |
6710 | if test "${enable_fixed_point+set}" = set; then : | |
6711 | enableval=$enable_fixed_point; | |
861bb6c1 | 6712 | |
3a000df0 | 6713 | else |
3a000df0 | 6714 | |
00020c16 ILT |
6715 | case $target in |
6716 | mips*-*-*) | |
6717 | case $host in | |
6718 | mips*-sgi-irix*) | |
5213506e RW |
6719 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX" >&5 |
6720 | $as_echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;} | |
00020c16 ILT |
6721 | enable_fixed_point=no |
6722 | ;; | |
6723 | *) | |
6724 | enable_fixed_point=yes | |
6725 | ;; | |
6726 | esac | |
6727 | ;; | |
6728 | *) | |
5213506e RW |
6729 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target" >&5 |
6730 | $as_echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;} | |
00020c16 ILT |
6731 | enable_fixed_point=no |
6732 | ;; | |
6733 | esac | |
3a000df0 | 6734 | |
5213506e RW |
6735 | fi |
6736 | ||
3a000df0 KC |
6737 | |
6738 | ||
00020c16 | 6739 | fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 6740 | |
00020c16 ILT |
6741 | cat >>confdefs.h <<_ACEOF |
6742 | #define ENABLE_FIXED_POINT $fixedpoint | |
6743 | _ACEOF | |
73458fb7 NN |
6744 | |
6745 | ||
00020c16 ILT |
6746 | # Enable threads |
6747 | # Pass with no value to take the default | |
6748 | # Pass with a value to specify a thread package | |
5213506e RW |
6749 | # Check whether --enable-threads was given. |
6750 | if test "${enable_threads+set}" = set; then : | |
6751 | enableval=$enable_threads; | |
73458fb7 | 6752 | else |
00020c16 | 6753 | enable_threads='' |
5213506e | 6754 | fi |
00020c16 | 6755 | |
00020c16 | 6756 | |
5213506e RW |
6757 | # Check whether --enable-tls was given. |
6758 | if test "${enable_tls+set}" = set; then : | |
6759 | enableval=$enable_tls; | |
00020c16 ILT |
6760 | case $enable_tls in |
6761 | yes | no) ;; | |
5213506e RW |
6762 | *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls. |
6763 | Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; | |
00020c16 ILT |
6764 | esac |
6765 | ||
73458fb7 | 6766 | else |
00020c16 | 6767 | enable_tls='' |
5213506e | 6768 | fi |
ba479fd2 | 6769 | |
5213506e RW |
6770 | |
6771 | # Check whether --enable-objc-gc was given. | |
6772 | if test "${enable_objc_gc+set}" = set; then : | |
6773 | enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then | |
00020c16 | 6774 | objc_boehm_gc='' |
73458fb7 | 6775 | else |
00020c16 | 6776 | objc_boehm_gc=1 |
73458fb7 | 6777 | fi |
00020c16 ILT |
6778 | else |
6779 | objc_boehm_gc='' | |
5213506e RW |
6780 | fi |
6781 | ||
73458fb7 | 6782 | |
00020c16 | 6783 | |
5213506e RW |
6784 | # Check whether --with-dwarf2 was given. |
6785 | if test "${with_dwarf2+set}" = set; then : | |
6786 | withval=$with_dwarf2; dwarf2="$with_dwarf2" | |
73458fb7 | 6787 | else |
00020c16 | 6788 | dwarf2=no |
5213506e | 6789 | fi |
3bbd5a19 | 6790 | |
73458fb7 | 6791 | |
5213506e RW |
6792 | # Check whether --enable-shared was given. |
6793 | if test "${enable_shared+set}" = set; then : | |
6794 | enableval=$enable_shared; | |
00020c16 ILT |
6795 | case $enable_shared in |
6796 | yes | no) ;; | |
6797 | *) | |
6798 | enable_shared=no | |
6799 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6800 | for pkg in $enableval; do | |
6801 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6802 | enable_shared=yes | |
6803 | fi | |
6804 | done | |
6805 | IFS="$ac_save_ifs" | |
6806 | ;; | |
6807 | esac | |
73458fb7 | 6808 | |
73458fb7 | 6809 | else |
00020c16 | 6810 | enable_shared=yes |
5213506e | 6811 | fi |
73458fb7 | 6812 | |
7c27e184 | 6813 | |
00020c16 | 6814 | |
00020c16 | 6815 | |
5213506e RW |
6816 | # Check whether --with-build-sysroot was given. |
6817 | if test "${with_build_sysroot+set}" = set; then : | |
6818 | withval=$with_build_sysroot; | |
6819 | fi | |
00020c16 ILT |
6820 | |
6821 | ||
00020c16 | 6822 | |
5213506e RW |
6823 | # Check whether --with-sysroot was given. |
6824 | if test "${with_sysroot+set}" = set; then : | |
6825 | withval=$with_sysroot; | |
00020c16 ILT |
6826 | case ${with_sysroot} in |
6827 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; | |
6828 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; | |
6829 | esac | |
6830 | ||
6831 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
6832 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' | |
6833 | ||
6834 | if test "x$prefix" = xNONE; then | |
6835 | test_prefix=/usr/local | |
6836 | else | |
6837 | test_prefix=$prefix | |
6838 | fi | |
6839 | if test "x$exec_prefix" = xNONE; then | |
6840 | test_exec_prefix=$test_prefix | |
6841 | else | |
6842 | test_exec_prefix=$exec_prefix | |
6843 | fi | |
6844 | case ${TARGET_SYSTEM_ROOT} in | |
6845 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6846 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ | |
6847 | '${prefix}'|'${prefix}/'*|\ | |
6848 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6849 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" | |
6850 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6851 | ;; | |
6852 | esac | |
6853 | ||
6854 | else | |
6855 | ||
6856 | TARGET_SYSTEM_ROOT= | |
6857 | TARGET_SYSTEM_ROOT_DEFINE= | |
6858 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' | |
6859 | ||
5213506e RW |
6860 | fi |
6861 | ||
00020c16 ILT |
6862 | |
6863 | ||
6864 | ||
6865 | ||
e11ddaf5 NS |
6866 | |
6867 | # Check whether --with-specs was given. | |
6868 | if test "${with_specs+set}" = set; then : | |
6869 | withval=$with_specs; CONFIGURE_SPECS=$withval | |
6870 | else | |
6871 | CONFIGURE_SPECS= | |
6872 | ||
6873 | fi | |
6874 | ||
6875 | ||
6876 | ||
00020c16 | 6877 | # Build with intermodule optimisations |
5213506e RW |
6878 | # Check whether --enable-intermodule was given. |
6879 | if test "${enable_intermodule+set}" = set; then : | |
6880 | enableval=$enable_intermodule; case ${enable_intermodule} in | |
00020c16 ILT |
6881 | yes) onestep="-onestep";; |
6882 | *) onestep="";; | |
6883 | esac | |
6884 | else | |
6885 | onestep="" | |
5213506e RW |
6886 | fi |
6887 | ||
00020c16 ILT |
6888 | |
6889 | ||
6890 | ||
6891 | ||
5213506e RW |
6892 | # Check whether --with-pkgversion was given. |
6893 | if test "${with_pkgversion+set}" = set; then : | |
6894 | withval=$with_pkgversion; case "$withval" in | |
6895 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
00020c16 ILT |
6896 | no) PKGVERSION= ;; |
6897 | *) PKGVERSION="($withval) " ;; | |
6898 | esac | |
6899 | else | |
6900 | PKGVERSION="(GCC) " | |
6901 | ||
5213506e | 6902 | fi |
00020c16 ILT |
6903 | |
6904 | ||
6905 | ||
6906 | ||
5213506e RW |
6907 | |
6908 | # Check whether --with-bugurl was given. | |
6909 | if test "${with_bugurl+set}" = set; then : | |
6910 | withval=$with_bugurl; case "$withval" in | |
6911 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
00020c16 ILT |
6912 | no) BUGURL= |
6913 | ;; | |
6914 | *) BUGURL="$withval" | |
6915 | ;; | |
6916 | esac | |
6917 | else | |
6918 | BUGURL="http://gcc.gnu.org/bugs.html" | |
6919 | ||
5213506e RW |
6920 | fi |
6921 | ||
00020c16 ILT |
6922 | case ${BUGURL} in |
6923 | "") | |
6924 | REPORT_BUGS_TO= | |
6925 | REPORT_BUGS_TEXI= | |
6926 | ;; | |
6927 | *) | |
6928 | REPORT_BUGS_TO="<$BUGURL>" | |
6929 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
6930 | ;; | |
6931 | esac; | |
6932 | ||
6933 | ||
6934 | ||
6935 | ||
6936 | # Sanity check enable_languages in case someone does not run the toplevel | |
6937 | # configure # script. | |
5213506e RW |
6938 | # Check whether --enable-languages was given. |
6939 | if test "${enable_languages+set}" = set; then : | |
6940 | enableval=$enable_languages; case ,${enable_languages}, in | |
00020c16 ILT |
6941 | ,,|,yes,) |
6942 | # go safe -- we cannot be much sure without the toplevel | |
6943 | # configure's | |
6944 | # analysis of which target libs are present and usable | |
6945 | enable_languages=c | |
6946 | ;; | |
6947 | *,all,*) | |
5213506e | 6948 | as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5 |
00020c16 ILT |
6949 | ;; |
6950 | *,c,*) | |
6951 | ;; | |
6952 | *) | |
6953 | enable_languages=c,${enable_languages} | |
6954 | ;; | |
6955 | esac | |
6956 | else | |
6957 | enable_languages=c | |
5213506e RW |
6958 | fi |
6959 | ||
00020c16 | 6960 | |
00020c16 | 6961 | |
5213506e RW |
6962 | # Check whether --with-multilib-list was given. |
6963 | if test "${with_multilib_list+set}" = set; then : | |
6964 | withval=$with_multilib_list; : | |
00020c16 ILT |
6965 | else |
6966 | with_multilib_list=default | |
5213506e RW |
6967 | fi |
6968 | ||
00020c16 ILT |
6969 | |
6970 | # ------------------------- | |
6971 | # Checks for other programs | |
6972 | # ------------------------- | |
6973 | ||
5213506e RW |
6974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
6975 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
6976 | set x ${MAKE-make} | |
6977 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
6978 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6979 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6980 | else |
6981 | cat >conftest.make <<\_ACEOF | |
5213506e | 6982 | SHELL = /bin/sh |
00020c16 | 6983 | all: |
5213506e | 6984 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
00020c16 ILT |
6985 | _ACEOF |
6986 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
5213506e RW |
6987 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
6988 | *@@@%%%=?*=@@@%%%*) | |
6989 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
6990 | *) | |
6991 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
6992 | esac | |
00020c16 ILT |
6993 | rm -f conftest.make |
6994 | fi | |
5213506e RW |
6995 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
6996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6997 | $as_echo "yes" >&6; } | |
00020c16 | 6998 | SET_MAKE= |
73458fb7 | 6999 | else |
5213506e RW |
7000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7001 | $as_echo "no" >&6; } | |
00020c16 | 7002 | SET_MAKE="MAKE=${MAKE-make}" |
73458fb7 NN |
7003 | fi |
7004 | ||
7c27e184 | 7005 | |
00020c16 ILT |
7006 | # Find some useful tools |
7007 | for ac_prog in gawk mawk nawk awk | |
7c27e184 PB |
7008 | do |
7009 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7010 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7012 | $as_echo_n "checking for $ac_word... " >&6; } | |
7013 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7014 | $as_echo_n "(cached) " >&6 | |
73458fb7 | 7015 | else |
00020c16 ILT |
7016 | if test -n "$AWK"; then |
7017 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
73458fb7 | 7018 | else |
ba479fd2 NN |
7019 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7020 | for as_dir in $PATH | |
7021 | do | |
7022 | IFS=$as_save_IFS | |
7023 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7024 | for ac_exec_ext in '' $ac_executable_extensions; do |
7025 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7026 | ac_cv_prog_AWK="$ac_prog" |
5213506e | 7027 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
ba479fd2 NN |
7028 | break 2 |
7029 | fi | |
7030 | done | |
5213506e RW |
7031 | done |
7032 | IFS=$as_save_IFS | |
ba479fd2 | 7033 | |
73458fb7 NN |
7034 | fi |
7035 | fi | |
00020c16 ILT |
7036 | AWK=$ac_cv_prog_AWK |
7037 | if test -n "$AWK"; then | |
5213506e RW |
7038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7039 | $as_echo "$AWK" >&6; } | |
73458fb7 | 7040 | else |
5213506e RW |
7041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7042 | $as_echo "no" >&6; } | |
73458fb7 NN |
7043 | fi |
7044 | ||
5213506e | 7045 | |
00020c16 | 7046 | test -n "$AWK" && break |
7c27e184 | 7047 | done |
7c27e184 | 7048 | |
00020c16 ILT |
7049 | # We need awk to create options.c and options.h. |
7050 | # Bail out if it's missing. | |
7051 | case ${AWK} in | |
5213506e | 7052 | "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;; |
00020c16 | 7053 | esac |
73458fb7 | 7054 | |
5213506e RW |
7055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7056 | $as_echo_n "checking whether ln -s works... " >&6; } | |
7057 | if test "${gcc_cv_prog_LN_S+set}" = set; then : | |
7058 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7059 | else |
7060 | rm -f conftestdata_t | |
7061 | echo >conftestdata_f | |
7062 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7063 | then | |
7064 | gcc_cv_prog_LN_S="ln -s" | |
7065 | else | |
7066 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7067 | then | |
7068 | gcc_cv_prog_LN_S=ln | |
7069 | else | |
7070 | if cp -p conftestdata_f conftestdata_t 2>/dev/null | |
7071 | then | |
7072 | gcc_cv_prog_LN_S="cp -p" | |
7073 | else | |
7074 | gcc_cv_prog_LN_S=cp | |
7075 | fi | |
7076 | fi | |
7077 | fi | |
7078 | rm -f conftestdata_f conftestdata_t | |
7079 | ||
7080 | fi | |
7081 | LN_S="$gcc_cv_prog_LN_S" | |
7082 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
5213506e RW |
7083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7084 | $as_echo "yes" >&6; } | |
00020c16 ILT |
7085 | else |
7086 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
5213506e RW |
7087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5 |
7088 | $as_echo "no, using ln" >&6; } | |
00020c16 | 7089 | else |
5213506e RW |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7091 | $as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; } | |
00020c16 ILT |
7092 | fi |
7093 | fi | |
7094 | ||
5213506e RW |
7095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5 |
7096 | $as_echo_n "checking whether ln works... " >&6; } | |
7097 | if test "${acx_cv_prog_LN+set}" = set; then : | |
7098 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7099 | else |
7100 | rm -f conftestdata_t | |
7101 | echo >conftestdata_f | |
7102 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7103 | then | |
7104 | acx_cv_prog_LN=ln | |
7105 | else | |
7106 | acx_cv_prog_LN=no | |
7107 | fi | |
7108 | rm -f conftestdata_f conftestdata_t | |
7109 | ||
7110 | fi | |
7111 | if test $acx_cv_prog_LN = no; then | |
7112 | LN="$LN_S" | |
5213506e RW |
7113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5 |
7114 | $as_echo "no, using $LN" >&6; } | |
00020c16 ILT |
7115 | else |
7116 | LN="$acx_cv_prog_LN" | |
5213506e RW |
7117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7118 | $as_echo "yes" >&6; } | |
00020c16 ILT |
7119 | fi |
7120 | ||
7121 | if test -n "$ac_tool_prefix"; then | |
7122 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7123 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5213506e RW |
7124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7125 | $as_echo_n "checking for $ac_word... " >&6; } | |
7126 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7127 | $as_echo_n "(cached) " >&6 | |
73458fb7 | 7128 | else |
00020c16 ILT |
7129 | if test -n "$RANLIB"; then |
7130 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
73458fb7 | 7131 | else |
ba479fd2 NN |
7132 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7133 | for as_dir in $PATH | |
7134 | do | |
7135 | IFS=$as_save_IFS | |
7136 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7137 | for ac_exec_ext in '' $ac_executable_extensions; do |
7138 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7139 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5213506e | 7140 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
ba479fd2 NN |
7141 | break 2 |
7142 | fi | |
7143 | done | |
5213506e RW |
7144 | done |
7145 | IFS=$as_save_IFS | |
ba479fd2 | 7146 | |
73458fb7 NN |
7147 | fi |
7148 | fi | |
00020c16 ILT |
7149 | RANLIB=$ac_cv_prog_RANLIB |
7150 | if test -n "$RANLIB"; then | |
5213506e RW |
7151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7152 | $as_echo "$RANLIB" >&6; } | |
73458fb7 | 7153 | else |
5213506e RW |
7154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7155 | $as_echo "no" >&6; } | |
73458fb7 NN |
7156 | fi |
7157 | ||
5213506e | 7158 | |
00020c16 ILT |
7159 | fi |
7160 | if test -z "$ac_cv_prog_RANLIB"; then | |
7161 | ac_ct_RANLIB=$RANLIB | |
7162 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7163 | set dummy ranlib; ac_word=$2 | |
5213506e RW |
7164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7165 | $as_echo_n "checking for $ac_word... " >&6; } | |
7166 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7167 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7168 | else |
00020c16 ILT |
7169 | if test -n "$ac_ct_RANLIB"; then |
7170 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
f6a874ac JW |
7171 | else |
7172 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7173 | for as_dir in $PATH | |
7174 | do | |
7175 | IFS=$as_save_IFS | |
7176 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7177 | for ac_exec_ext in '' $ac_executable_extensions; do |
7178 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7179 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
5213506e | 7180 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
f6a874ac JW |
7181 | break 2 |
7182 | fi | |
7183 | done | |
5213506e RW |
7184 | done |
7185 | IFS=$as_save_IFS | |
f6a874ac | 7186 | |
f6a874ac JW |
7187 | fi |
7188 | fi | |
00020c16 ILT |
7189 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
7190 | if test -n "$ac_ct_RANLIB"; then | |
5213506e RW |
7191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7192 | $as_echo "$ac_ct_RANLIB" >&6; } | |
f6a874ac | 7193 | else |
5213506e RW |
7194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7195 | $as_echo "no" >&6; } | |
f6a874ac JW |
7196 | fi |
7197 | ||
5213506e RW |
7198 | if test "x$ac_ct_RANLIB" = x; then |
7199 | RANLIB=":" | |
7200 | else | |
7201 | case $cross_compiling:$ac_tool_warned in | |
7202 | yes:) | |
7203 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7204 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7205 | ac_tool_warned=yes ;; | |
7206 | esac | |
7207 | RANLIB=$ac_ct_RANLIB | |
7208 | fi | |
00020c16 ILT |
7209 | else |
7210 | RANLIB="$ac_cv_prog_RANLIB" | |
f6a874ac JW |
7211 | fi |
7212 | ||
00020c16 ILT |
7213 | case "${host}" in |
7214 | *-*-darwin*) | |
7215 | # By default, the Darwin ranlib will not treat common symbols as | |
7216 | # definitions when building the archive table of contents. Other | |
7217 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7218 | # it behave similarly. | |
7219 | ranlib_flags="-c" | |
7220 | ;; | |
7221 | *) | |
7222 | ranlib_flags="" | |
7223 | esac | |
7224 | ||
7225 | ||
7226 | # Find a good install program. We prefer a C program (faster), | |
7227 | # so one script is as good as another. But avoid the broken or | |
7228 | # incompatible versions: | |
7229 | # SysV /etc/install, /usr/sbin/install | |
7230 | # SunOS /usr/etc/install | |
7231 | # IRIX /sbin/install | |
7232 | # AIX /bin/install | |
7233 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7234 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7235 | # ./install, which can be erroneously created by make from ./install.sh. | |
5213506e RW |
7236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5 |
7237 | $as_echo_n "checking for a BSD compatible install... " >&6; } | |
00020c16 | 7238 | if test -z "$INSTALL"; then |
5213506e RW |
7239 | if test "${ac_cv_path_install+set}" = set; then : |
7240 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7241 | else |
00020c16 ILT |
7242 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
7243 | for ac_dir in $PATH; do | |
7244 | # Account for people who put trailing slashes in PATH elements. | |
7245 | case "$ac_dir/" in | |
7246 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7247 | *) | |
7248 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7249 | for ac_prog in ginstall scoinst install; do | |
7250 | if test -f $ac_dir/$ac_prog; then | |
7251 | if test $ac_prog = install && | |
7252 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7253 | # AIX install. It has an incompatible calling convention. | |
7254 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7255 | : | |
7256 | else | |
7257 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7258 | break 2 | |
7259 | fi | |
7260 | fi | |
7261 | done | |
7262 | ;; | |
7263 | esac | |
7264 | done | |
7265 | IFS="$ac_save_IFS" | |
7266 | ||
7267 | fi | |
7268 | if test "${ac_cv_path_install+set}" = set; then | |
7269 | INSTALL="$ac_cv_path_install" | |
7270 | else | |
7271 | # As a last resort, use the slow shell script. We don't cache a | |
7272 | # path for INSTALL within a source directory, because that will | |
7273 | # break other packages using the cache if that directory is | |
7274 | # removed, or if the path is relative. | |
7275 | INSTALL="$ac_install_sh" | |
7276 | fi | |
7277 | fi | |
5213506e RW |
7278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7279 | $as_echo "$INSTALL" >&6; } | |
00020c16 ILT |
7280 | |
7281 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7282 | # It thinks the first close brace ends the variable substitution. | |
7283 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7284 | ||
7285 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7286 | ||
7287 | ||
7288 | # See if cmp has --ignore-initial. | |
5213506e RW |
7289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5 |
7290 | $as_echo_n "checking for cmp's capabilities... " >&6; } | |
7291 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then : | |
7292 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7293 | else |
7294 | echo abfoo >t1 | |
7295 | echo cdfoo >t2 | |
7296 | gcc_cv_prog_cmp_skip=slowcompare | |
7297 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
7298 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
7299 | : | |
7300 | else | |
7301 | gcc_cv_prog_cmp_skip=gnucompare | |
7302 | fi | |
7303 | fi | |
7304 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7305 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7306 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7307 | : | |
7308 | else | |
7309 | gcc_cv_prog_cmp_skip=fastcompare | |
7310 | fi | |
7311 | fi | |
7312 | fi | |
7313 | rm t1 t2 | |
7314 | ||
7315 | fi | |
5213506e RW |
7316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5 |
7317 | $as_echo "$gcc_cv_prog_cmp_skip" >&6; } | |
00020c16 ILT |
7318 | make_compare_target=$gcc_cv_prog_cmp_skip |
7319 | ||
7320 | ||
7321 | ||
7322 | # See if we have the mktemp command. | |
7323 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7324 | set dummy mktemp; ac_word=$2 | |
5213506e RW |
7325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7326 | $as_echo_n "checking for $ac_word... " >&6; } | |
7327 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then : | |
7328 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7329 | else |
00020c16 ILT |
7330 | if test -n "$have_mktemp_command"; then |
7331 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
f6a874ac JW |
7332 | else |
7333 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7334 | for as_dir in $PATH | |
7335 | do | |
7336 | IFS=$as_save_IFS | |
7337 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7338 | for ac_exec_ext in '' $ac_executable_extensions; do |
7339 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7340 | ac_cv_prog_have_mktemp_command="yes" |
5213506e | 7341 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
f6a874ac JW |
7342 | break 2 |
7343 | fi | |
7344 | done | |
5213506e RW |
7345 | done |
7346 | IFS=$as_save_IFS | |
f6a874ac | 7347 | |
00020c16 | 7348 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
f6a874ac JW |
7349 | fi |
7350 | fi | |
00020c16 ILT |
7351 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
7352 | if test -n "$have_mktemp_command"; then | |
5213506e RW |
7353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5 |
7354 | $as_echo "$have_mktemp_command" >&6; } | |
f6a874ac | 7355 | else |
5213506e RW |
7356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7357 | $as_echo "no" >&6; } | |
f6a874ac JW |
7358 | fi |
7359 | ||
f6a874ac | 7360 | |
5213506e | 7361 | |
00020c16 ILT |
7362 | # See if makeinfo has been installed and is modern enough |
7363 | # that we can use it. | |
ca9bc441 | 7364 | |
00020c16 ILT |
7365 | # Extract the first word of "makeinfo", so it can be a program name with args. |
7366 | set dummy makeinfo; ac_word=$2 | |
5213506e RW |
7367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7368 | $as_echo_n "checking for $ac_word... " >&6; } | |
7369 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then : | |
7370 | $as_echo_n "(cached) " >&6 | |
956d6950 | 7371 | else |
00020c16 ILT |
7372 | if test -n "$MAKEINFO"; then |
7373 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
956d6950 | 7374 | else |
00020c16 ILT |
7375 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7376 | for as_dir in $PATH | |
7377 | do | |
7378 | IFS=$as_save_IFS | |
7379 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7380 | for ac_exec_ext in '' $ac_executable_extensions; do |
7381 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7382 | ac_cv_prog_MAKEINFO="makeinfo" |
5213506e | 7383 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7384 | break 2 |
7385 | fi | |
7386 | done | |
5213506e RW |
7387 | done |
7388 | IFS=$as_save_IFS | |
ba479fd2 | 7389 | |
956d6950 | 7390 | fi |
00020c16 ILT |
7391 | fi |
7392 | MAKEINFO=$ac_cv_prog_MAKEINFO | |
7393 | if test -n "$MAKEINFO"; then | |
5213506e RW |
7394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 |
7395 | $as_echo "$MAKEINFO" >&6; } | |
956d6950 | 7396 | else |
5213506e RW |
7397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7398 | $as_echo "no" >&6; } | |
956d6950 | 7399 | fi |
956d6950 | 7400 | |
5213506e | 7401 | |
00020c16 ILT |
7402 | if test -n "$MAKEINFO"; then |
7403 | # Found it, now check the version. | |
5213506e RW |
7404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5 |
7405 | $as_echo_n "checking for modern makeinfo... " >&6; } | |
7406 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then : | |
7407 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7408 | else |
7409 | ac_prog_version=`eval $MAKEINFO --version 2>&1 | | |
7410 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
956d6950 | 7411 | |
00020c16 ILT |
7412 | case $ac_prog_version in |
7413 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7414 | 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;; | |
7415 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7416 | esac | |
ba479fd2 | 7417 | |
956d6950 | 7418 | fi |
5213506e RW |
7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7420 | $as_echo "$gcc_cv_prog_makeinfo_modern" >&6; } | |
00020c16 ILT |
7421 | else |
7422 | gcc_cv_prog_makeinfo_modern=no | |
7423 | fi | |
7424 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
7425 | MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo" | |
7426 | fi | |
956d6950 | 7427 | |
00020c16 | 7428 | if test $gcc_cv_prog_makeinfo_modern = no; then |
5213506e | 7429 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: |
00020c16 ILT |
7430 | *** Makeinfo is missing or too old. |
7431 | *** Info documentation will not be built." >&5 | |
5213506e | 7432 | $as_echo "$as_me: WARNING: |
00020c16 ILT |
7433 | *** Makeinfo is missing or too old. |
7434 | *** Info documentation will not be built." >&2;} | |
7435 | BUILD_INFO= | |
7436 | else | |
7437 | BUILD_INFO=info | |
956d6950 JL |
7438 | fi |
7439 | ||
63cf211a | 7440 | |
00020c16 | 7441 | # Is pod2man recent enough to regenerate manpages? |
5213506e RW |
7442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5 |
7443 | $as_echo_n "checking for recent Pod::Man... " >&6; } | |
00020c16 | 7444 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
5213506e RW |
7445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7446 | $as_echo "yes" >&6; } | |
00020c16 | 7447 | GENERATED_MANPAGES=generated-manpages |
956d6950 | 7448 | else |
5213506e RW |
7449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7450 | $as_echo "no" >&6; } | |
00020c16 | 7451 | GENERATED_MANPAGES= |
956d6950 | 7452 | fi |
ba479fd2 | 7453 | |
956d6950 | 7454 | |
00020c16 | 7455 | MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing" |
956d6950 | 7456 | |
00020c16 ILT |
7457 | # How about lex? |
7458 | for ac_prog in flex | |
7459 | do | |
7460 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7461 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7463 | $as_echo_n "checking for $ac_word... " >&6; } | |
7464 | if test "${ac_cv_prog_FLEX+set}" = set; then : | |
7465 | $as_echo_n "(cached) " >&6 | |
956d6950 | 7466 | else |
00020c16 ILT |
7467 | if test -n "$FLEX"; then |
7468 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
956d6950 | 7469 | else |
00020c16 ILT |
7470 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7471 | for as_dir in $PATH | |
7472 | do | |
7473 | IFS=$as_save_IFS | |
7474 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7475 | for ac_exec_ext in '' $ac_executable_extensions; do |
7476 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7477 | ac_cv_prog_FLEX="$ac_prog" |
5213506e | 7478 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7479 | break 2 |
7480 | fi | |
7481 | done | |
5213506e RW |
7482 | done |
7483 | IFS=$as_save_IFS | |
ba479fd2 | 7484 | |
956d6950 | 7485 | fi |
956d6950 | 7486 | fi |
00020c16 ILT |
7487 | FLEX=$ac_cv_prog_FLEX |
7488 | if test -n "$FLEX"; then | |
5213506e RW |
7489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 |
7490 | $as_echo "$FLEX" >&6; } | |
00020c16 | 7491 | else |
5213506e RW |
7492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7493 | $as_echo "no" >&6; } | |
00020c16 | 7494 | fi |
ba479fd2 | 7495 | |
5213506e | 7496 | |
00020c16 ILT |
7497 | test -n "$FLEX" && break |
7498 | done | |
7499 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7500 | ||
7501 | ||
7502 | # Bison? | |
7503 | for ac_prog in bison | |
7504 | do | |
7505 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7506 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7508 | $as_echo_n "checking for $ac_word... " >&6; } | |
7509 | if test "${ac_cv_prog_BISON+set}" = set; then : | |
7510 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7511 | else |
7512 | if test -n "$BISON"; then | |
7513 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7514 | else | |
7515 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7516 | for as_dir in $PATH | |
7517 | do | |
7518 | IFS=$as_save_IFS | |
7519 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7520 | for ac_exec_ext in '' $ac_executable_extensions; do |
7521 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7522 | ac_cv_prog_BISON="$ac_prog" |
5213506e | 7523 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7524 | break 2 |
7525 | fi | |
7526 | done | |
5213506e RW |
7527 | done |
7528 | IFS=$as_save_IFS | |
956d6950 | 7529 | |
00020c16 ILT |
7530 | fi |
7531 | fi | |
7532 | BISON=$ac_cv_prog_BISON | |
7533 | if test -n "$BISON"; then | |
5213506e RW |
7534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 |
7535 | $as_echo "$BISON" >&6; } | |
00020c16 | 7536 | else |
5213506e RW |
7537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7538 | $as_echo "no" >&6; } | |
956d6950 JL |
7539 | fi |
7540 | ||
5213506e | 7541 | |
00020c16 ILT |
7542 | test -n "$BISON" && break |
7543 | done | |
7544 | test -n "$BISON" || BISON="$MISSING bison" | |
7545 | ||
7546 | ||
7547 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7548 | # check for build == host before using them. | |
7549 | ||
7550 | # NM | |
7551 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ | |
7552 | && test -d ../binutils ; then | |
7553 | NM='$(objdir)/../binutils/nm-new' | |
7554 | else | |
7555 | # Extract the first word of "nm", so it can be a program name with args. | |
7556 | set dummy nm; ac_word=$2 | |
5213506e RW |
7557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7558 | $as_echo_n "checking for $ac_word... " >&6; } | |
7559 | if test "${ac_cv_prog_NM+set}" = set; then : | |
7560 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7561 | else |
7562 | if test -n "$NM"; then | |
7563 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7564 | else | |
7565 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7566 | for as_dir in $PATH | |
7567 | do | |
7568 | IFS=$as_save_IFS | |
7569 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7570 | for ac_exec_ext in '' $ac_executable_extensions; do |
7571 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7572 | ac_cv_prog_NM="nm" |
5213506e | 7573 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7574 | break 2 |
7575 | fi | |
7576 | done | |
5213506e RW |
7577 | done |
7578 | IFS=$as_save_IFS | |
00020c16 ILT |
7579 | |
7580 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7581 | fi | |
7582 | fi | |
7583 | NM=$ac_cv_prog_NM | |
7584 | if test -n "$NM"; then | |
5213506e RW |
7585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 |
7586 | $as_echo "$NM" >&6; } | |
00020c16 | 7587 | else |
5213506e RW |
7588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7589 | $as_echo "no" >&6; } | |
00020c16 ILT |
7590 | fi |
7591 | ||
5213506e | 7592 | |
00020c16 ILT |
7593 | fi |
7594 | ||
7595 | # AR | |
7596 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ | |
7597 | && test -d ../binutils ; then | |
7598 | AR='$(objdir)/../binutils/ar' | |
7599 | else | |
7600 | # Extract the first word of "ar", so it can be a program name with args. | |
7601 | set dummy ar; ac_word=$2 | |
5213506e RW |
7602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7603 | $as_echo_n "checking for $ac_word... " >&6; } | |
7604 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7605 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7606 | else |
7607 | if test -n "$AR"; then | |
7608 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7609 | else | |
7610 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7611 | for as_dir in $PATH | |
7612 | do | |
7613 | IFS=$as_save_IFS | |
7614 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7615 | for ac_exec_ext in '' $ac_executable_extensions; do |
7616 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7617 | ac_cv_prog_AR="ar" |
5213506e | 7618 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7619 | break 2 |
7620 | fi | |
7621 | done | |
5213506e RW |
7622 | done |
7623 | IFS=$as_save_IFS | |
00020c16 ILT |
7624 | |
7625 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7626 | fi | |
7627 | fi | |
7628 | AR=$ac_cv_prog_AR | |
7629 | if test -n "$AR"; then | |
5213506e RW |
7630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7631 | $as_echo "$AR" >&6; } | |
00020c16 | 7632 | else |
5213506e RW |
7633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7634 | $as_echo "no" >&6; } | |
00020c16 ILT |
7635 | fi |
7636 | ||
5213506e | 7637 | |
00020c16 ILT |
7638 | fi |
7639 | ||
7640 | ||
7641 | # -------------------- | |
7642 | # Checks for C headers | |
7643 | # -------------------- | |
7644 | ||
7645 | # Need to reject headers which give warnings, so that the -Werror bootstrap | |
7646 | # works later. *sigh* This needs to come before all header checks. | |
7647 | ||
7648 | ac_c_preproc_warn_flag=yes | |
7649 | ||
5213506e RW |
7650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
7651 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
7652 | if test "${ac_cv_header_stdc+set}" = set; then : | |
7653 | $as_echo_n "(cached) " >&6 | |
18fc9bd4 | 7654 | else |
5213506e | 7655 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18fc9bd4 | 7656 | /* end confdefs.h. */ |
00020c16 ILT |
7657 | #include <stdlib.h> |
7658 | #include <stdarg.h> | |
18fc9bd4 | 7659 | #include <string.h> |
00020c16 ILT |
7660 | #include <float.h> |
7661 | ||
18fc9bd4 RG |
7662 | int |
7663 | main () | |
7664 | { | |
7665 | ||
7666 | ; | |
7667 | return 0; | |
7668 | } | |
7669 | _ACEOF | |
5213506e | 7670 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 7671 | ac_cv_header_stdc=yes |
18fc9bd4 | 7672 | else |
5213506e | 7673 | ac_cv_header_stdc=no |
18fc9bd4 | 7674 | fi |
5213506e | 7675 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18fc9bd4 | 7676 | |
00020c16 ILT |
7677 | if test $ac_cv_header_stdc = yes; then |
7678 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5213506e | 7679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7680 | /* end confdefs.h. */ |
7681 | #include <string.h> | |
7682 | ||
18fc9bd4 | 7683 | _ACEOF |
00020c16 | 7684 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5213506e RW |
7685 | $EGREP "memchr" >/dev/null 2>&1; then : |
7686 | ||
00020c16 ILT |
7687 | else |
7688 | ac_cv_header_stdc=no | |
7689 | fi | |
7690 | rm -f conftest* | |
18fc9bd4 RG |
7691 | |
7692 | fi | |
7693 | ||
00020c16 ILT |
7694 | if test $ac_cv_header_stdc = yes; then |
7695 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5213506e | 7696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 7697 | /* end confdefs.h. */ |
00020c16 ILT |
7698 | #include <stdlib.h> |
7699 | ||
7700 | _ACEOF | |
7701 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5213506e RW |
7702 | $EGREP "free" >/dev/null 2>&1; then : |
7703 | ||
00020c16 ILT |
7704 | else |
7705 | ac_cv_header_stdc=no | |
7706 | fi | |
7707 | rm -f conftest* | |
7708 | ||
7709 | fi | |
7710 | ||
7711 | if test $ac_cv_header_stdc = yes; then | |
7712 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5213506e | 7713 | if test "$cross_compiling" = yes; then : |
00020c16 ILT |
7714 | : |
7715 | else | |
5213506e | 7716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7717 | /* end confdefs.h. */ |
7718 | #include <ctype.h> | |
5213506e | 7719 | #include <stdlib.h> |
00020c16 ILT |
7720 | #if ((' ' & 0x0FF) == 0x020) |
7721 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7722 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7723 | #else | |
7724 | # define ISLOWER(c) \ | |
7725 | (('a' <= (c) && (c) <= 'i') \ | |
7726 | || ('j' <= (c) && (c) <= 'r') \ | |
7727 | || ('s' <= (c) && (c) <= 'z')) | |
7728 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7729 | #endif | |
7730 | ||
7731 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7732 | int | |
7733 | main () | |
7734 | { | |
7735 | int i; | |
7736 | for (i = 0; i < 256; i++) | |
7737 | if (XOR (islower (i), ISLOWER (i)) | |
7738 | || toupper (i) != TOUPPER (i)) | |
5213506e RW |
7739 | return 2; |
7740 | return 0; | |
00020c16 ILT |
7741 | } |
7742 | _ACEOF | |
5213506e | 7743 | if ac_fn_c_try_run "$LINENO"; then : |
00020c16 | 7744 | |
5213506e RW |
7745 | else |
7746 | ac_cv_header_stdc=no | |
00020c16 | 7747 | fi |
5213506e RW |
7748 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7749 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
00020c16 | 7750 | fi |
5213506e | 7751 | |
00020c16 ILT |
7752 | fi |
7753 | fi | |
5213506e RW |
7754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
7755 | $as_echo "$ac_cv_header_stdc" >&6; } | |
00020c16 ILT |
7756 | if test $ac_cv_header_stdc = yes; then |
7757 | ||
5213506e | 7758 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
00020c16 ILT |
7759 | |
7760 | fi | |
7761 | ||
5213506e RW |
7762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
7763 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
7764 | if test "${ac_cv_header_time+set}" = set; then : | |
7765 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7766 | else |
5213506e | 7767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7768 | /* end confdefs.h. */ |
7769 | #include <sys/types.h> | |
7770 | #include <sys/time.h> | |
7771 | #include <time.h> | |
7772 | ||
7773 | int | |
7774 | main () | |
7775 | { | |
7776 | if ((struct tm *) 0) | |
7777 | return 0; | |
7778 | ; | |
7779 | return 0; | |
7780 | } | |
7781 | _ACEOF | |
5213506e | 7782 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
7783 | ac_cv_header_time=yes |
7784 | else | |
5213506e | 7785 | ac_cv_header_time=no |
00020c16 | 7786 | fi |
5213506e | 7787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 | 7788 | fi |
5213506e RW |
7789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
7790 | $as_echo "$ac_cv_header_time" >&6; } | |
00020c16 ILT |
7791 | if test $ac_cv_header_time = yes; then |
7792 | ||
5213506e | 7793 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
00020c16 ILT |
7794 | |
7795 | fi | |
7796 | ||
5213506e RW |
7797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5 |
7798 | $as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } | |
7799 | if test "${gcc_cv_header_string+set}" = set; then : | |
7800 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7801 | else |
5213506e | 7802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7803 | /* end confdefs.h. */ |
7804 | #include <string.h> | |
7805 | #include <strings.h> | |
7806 | int | |
7807 | main () | |
7808 | { | |
7809 | ||
7810 | ; | |
7811 | return 0; | |
7812 | } | |
7813 | _ACEOF | |
5213506e | 7814 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
7815 | gcc_cv_header_string=yes |
7816 | else | |
5213506e | 7817 | gcc_cv_header_string=no |
00020c16 | 7818 | fi |
5213506e | 7819 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 | 7820 | fi |
5213506e RW |
7821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5 |
7822 | $as_echo "$gcc_cv_header_string" >&6; } | |
00020c16 ILT |
7823 | if test $gcc_cv_header_string = yes; then |
7824 | ||
5213506e | 7825 | $as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h |
00020c16 ILT |
7826 | |
7827 | fi | |
7828 | ||
5213506e RW |
7829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
7830 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
7831 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
7832 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7833 | else |
5213506e | 7834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7835 | /* end confdefs.h. */ |
7836 | #include <sys/types.h> | |
7837 | #include <sys/wait.h> | |
7838 | #ifndef WEXITSTATUS | |
5213506e | 7839 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) |
e9831ca0 KG |
7840 | #endif |
7841 | #ifndef WIFEXITED | |
ba479fd2 | 7842 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 7843 | #endif |
ba479fd2 NN |
7844 | |
7845 | int | |
7846 | main () | |
7847 | { | |
7848 | int s; | |
7849 | wait (&s); | |
5213506e RW |
7850 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; |
7851 | ; | |
7852 | return 0; | |
7853 | } | |
7854 | _ACEOF | |
7855 | if ac_fn_c_try_compile "$LINENO"; then : | |
7856 | ac_cv_header_sys_wait_h=yes | |
7857 | else | |
7858 | ac_cv_header_sys_wait_h=no | |
7859 | fi | |
7860 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7861 | fi | |
7862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
7863 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
7864 | if test $ac_cv_header_sys_wait_h = yes; then | |
ba479fd2 | 7865 | |
5213506e | 7866 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
ba479fd2 | 7867 | |
5213506e | 7868 | fi |
dfb77e37 KC |
7869 | |
7870 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 7871 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 7872 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 7873 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
5213506e RW |
7874 | do : |
7875 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7876 | ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" | |
7877 | eval as_val=\$$as_ac_Header | |
7878 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 7879 | cat >>confdefs.h <<_ACEOF |
5213506e | 7880 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
ba479fd2 NN |
7881 | _ACEOF |
7882 | ||
956d6950 JL |
7883 | fi |
7884 | done | |
7885 | ||
7886 | ||
f24af81b | 7887 | # Check for thread headers. |
5213506e RW |
7888 | ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h" |
7889 | if test "x$ac_cv_header_thread_h" = x""yes; then : | |
f24af81b TT |
7890 | have_thread_h=yes |
7891 | else | |
ba479fd2 | 7892 | have_thread_h= |
f24af81b TT |
7893 | fi |
7894 | ||
5213506e RW |
7895 | ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h" |
7896 | if test "x$ac_cv_header_pthread_h" = x""yes; then : | |
f24af81b TT |
7897 | have_pthread_h=yes |
7898 | else | |
ba479fd2 | 7899 | have_pthread_h= |
f24af81b TT |
7900 | fi |
7901 | ||
7902 | ||
84c041a1 | 7903 | # These tests can't be done till we know if we have limits.h. |
5213506e RW |
7904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5 |
7905 | $as_echo_n "checking for CHAR_BIT... " >&6; } | |
7906 | if test "${gcc_cv_decl_char_bit+set}" = set; then : | |
7907 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 7908 | else |
5213506e | 7909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 7910 | /* end confdefs.h. */ |
75e93faa ZW |
7911 | #ifdef HAVE_LIMITS_H |
7912 | #include <limits.h> | |
7913 | #endif | |
7914 | #ifdef CHAR_BIT | |
7915 | found | |
7916 | #endif | |
ba479fd2 | 7917 | _ACEOF |
75e93faa | 7918 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5213506e | 7919 | $EGREP "found" >/dev/null 2>&1; then : |
75e93faa ZW |
7920 | gcc_cv_decl_char_bit=yes |
7921 | else | |
75e93faa ZW |
7922 | gcc_cv_decl_char_bit=no |
7923 | fi | |
7924 | rm -f conftest* | |
7925 | ||
7926 | ||
7927 | fi | |
5213506e RW |
7928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5 |
7929 | $as_echo "$gcc_cv_decl_char_bit" >&6; } | |
75e93faa | 7930 | if test $gcc_cv_decl_char_bit = no; then |
5213506e RW |
7931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5 |
7932 | $as_echo_n "checking number of bits in a byte... " >&6; } | |
7933 | if test "${gcc_cv_c_nbby+set}" = set; then : | |
7934 | $as_echo_n "(cached) " >&6 | |
75e93faa ZW |
7935 | else |
7936 | i=8 | |
7937 | gcc_cv_c_nbby= | |
7938 | while test $i -lt 65; do | |
5213506e | 7939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 NN |
7940 | /* end confdefs.h. */ |
7941 | ||
7942 | int | |
7943 | main () | |
7944 | { | |
4e70264f ZW |
7945 | switch(0) { |
7946 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
7947 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
7948 | ; } | |
ba479fd2 NN |
7949 | ; |
7950 | return 0; | |
7951 | } | |
7952 | _ACEOF | |
5213506e | 7953 | if ac_fn_c_try_compile "$LINENO"; then : |
4e70264f | 7954 | gcc_cv_c_nbby=$i; break |
75e93faa | 7955 | fi |
5213506e | 7956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
7957 | i=`expr $i + 1` |
7958 | done | |
7959 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
7960 | ||
7961 | fi | |
5213506e RW |
7962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5 |
7963 | $as_echo "$gcc_cv_c_nbby" >&6; } | |
75e93faa | 7964 | if test $gcc_cv_c_nbby = failed; then |
5213506e | 7965 | as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5 |
75e93faa | 7966 | else |
ba479fd2 NN |
7967 | |
7968 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 7969 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 7970 | _ACEOF |
75e93faa ZW |
7971 | |
7972 | fi | |
7973 | fi | |
5213506e RW |
7974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
7975 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
7976 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
7977 | $as_echo_n "(cached) " >&6 | |
84c041a1 | 7978 | else |
5213506e RW |
7979 | ac_cv_c_bigendian=unknown |
7980 | # See if we're dealing with a universal compiler. | |
7981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7982 | /* end confdefs.h. */ | |
7983 | #ifndef __APPLE_CC__ | |
7984 | not a universal capable compiler | |
7985 | #endif | |
7986 | typedef int dummy; | |
7987 | ||
7988 | _ACEOF | |
7989 | if ac_fn_c_try_compile "$LINENO"; then : | |
7990 | ||
7991 | # Check for potential -arch flags. It is not universal unless | |
7992 | # there are at least two -arch flags with different values. | |
7993 | ac_arch= | |
7994 | ac_prev= | |
7995 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
7996 | if test -n "$ac_prev"; then | |
7997 | case $ac_word in | |
7998 | i?86 | x86_64 | ppc | ppc64) | |
7999 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8000 | ac_arch=$ac_word | |
8001 | else | |
8002 | ac_cv_c_bigendian=universal | |
8003 | break | |
8004 | fi | |
8005 | ;; | |
8006 | esac | |
8007 | ac_prev= | |
8008 | elif test "x$ac_word" = "x-arch"; then | |
8009 | ac_prev=arch | |
8010 | fi | |
8011 | done | |
8012 | fi | |
8013 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8014 | if test $ac_cv_c_bigendian = unknown; then | |
8015 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 8017 | /* end confdefs.h. */ |
4977bab6 | 8018 | #include <sys/types.h> |
5213506e | 8019 | #include <sys/param.h> |
9791c75c | 8020 | |
ba479fd2 NN |
8021 | int |
8022 | main () | |
8023 | { | |
5213506e RW |
8024 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
8025 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8026 | && LITTLE_ENDIAN) | |
8027 | bogus endian macros | |
8028 | #endif | |
9791c75c | 8029 | |
ba479fd2 NN |
8030 | ; |
8031 | return 0; | |
8032 | } | |
8033 | _ACEOF | |
5213506e | 8034 | if ac_fn_c_try_compile "$LINENO"; then : |
2f41c1d6 | 8035 | # It does; now see whether it defined to BIG_ENDIAN or not. |
5213506e | 8036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8037 | /* end confdefs.h. */ |
4977bab6 | 8038 | #include <sys/types.h> |
5213506e | 8039 | #include <sys/param.h> |
9791c75c | 8040 | |
ba479fd2 NN |
8041 | int |
8042 | main () | |
8043 | { | |
4977bab6 | 8044 | #if BYTE_ORDER != BIG_ENDIAN |
5213506e RW |
8045 | not big endian |
8046 | #endif | |
9791c75c | 8047 | |
ba479fd2 NN |
8048 | ; |
8049 | return 0; | |
8050 | } | |
8051 | _ACEOF | |
5213506e | 8052 | if ac_fn_c_try_compile "$LINENO"; then : |
b61ff9c8 BS |
8053 | ac_cv_c_bigendian=yes |
8054 | else | |
5213506e | 8055 | ac_cv_c_bigendian=no |
4977bab6 | 8056 | fi |
5213506e RW |
8057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8058 | fi | |
8059 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8060 | fi | |
8061 | if test $ac_cv_c_bigendian = unknown; then | |
8062 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8064 | /* end confdefs.h. */ | |
8065 | #include <limits.h> | |
ba479fd2 | 8066 | |
5213506e RW |
8067 | int |
8068 | main () | |
8069 | { | |
8070 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8071 | bogus endian macros | |
8072 | #endif | |
8073 | ||
8074 | ; | |
8075 | return 0; | |
8076 | } | |
9791c75c | 8077 | _ACEOF |
5213506e RW |
8078 | if ac_fn_c_try_compile "$LINENO"; then : |
8079 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9791c75c | 8081 | /* end confdefs.h. */ |
5213506e RW |
8082 | #include <limits.h> |
8083 | ||
9791c75c KC |
8084 | int |
8085 | main () | |
8086 | { | |
5213506e RW |
8087 | #ifndef _BIG_ENDIAN |
8088 | not big endian | |
8089 | #endif | |
8090 | ||
9791c75c KC |
8091 | ; |
8092 | return 0; | |
8093 | } | |
8094 | _ACEOF | |
5213506e | 8095 | if ac_fn_c_try_compile "$LINENO"; then : |
8b1f719a | 8096 | ac_cv_c_bigendian=yes |
5213506e RW |
8097 | else |
8098 | ac_cv_c_bigendian=no | |
8b1f719a | 8099 | fi |
5213506e | 8100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9791c75c | 8101 | fi |
5213506e RW |
8102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8103 | fi | |
8104 | if test $ac_cv_c_bigendian = unknown; then | |
8105 | # Compile a test program. | |
8106 | if test "$cross_compiling" = yes; then : | |
8107 | # Try to guess by grepping values from an object file. | |
8108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8109 | /* end confdefs.h. */ | |
8110 | short int ascii_mm[] = | |
8111 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8112 | short int ascii_ii[] = | |
8113 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8114 | int use_ascii (int i) { | |
8115 | return ascii_mm[i] + ascii_ii[i]; | |
8116 | } | |
8117 | short int ebcdic_ii[] = | |
8118 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8119 | short int ebcdic_mm[] = | |
8120 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8121 | int use_ebcdic (int i) { | |
8122 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8123 | } | |
8124 | extern int foo; | |
9791c75c | 8125 | |
5213506e RW |
8126 | int |
8127 | main () | |
8128 | { | |
8129 | return use_ascii (foo) == use_ebcdic (foo); | |
8130 | ; | |
8131 | return 0; | |
8132 | } | |
8133 | _ACEOF | |
8134 | if ac_fn_c_try_compile "$LINENO"; then : | |
8135 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
8136 | ac_cv_c_bigendian=yes | |
8137 | fi | |
8138 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8139 | if test "$ac_cv_c_bigendian" = unknown; then | |
8140 | ac_cv_c_bigendian=no | |
8141 | else | |
8142 | # finding both strings is unlikely to happen, but who knows? | |
8143 | ac_cv_c_bigendian=unknown | |
8144 | fi | |
8145 | fi | |
4977bab6 | 8146 | fi |
5213506e | 8147 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 8148 | else |
5213506e | 8149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8150 | /* end confdefs.h. */ |
5213506e | 8151 | $ac_includes_default |
9791c75c KC |
8152 | int |
8153 | main () | |
8154 | { | |
5213506e RW |
8155 | |
8156 | /* Are we little or big endian? From Harbison&Steele. */ | |
8157 | union | |
8158 | { | |
8159 | long int l; | |
8160 | char c[sizeof (long int)]; | |
8161 | } u; | |
8162 | u.l = 1; | |
8163 | return u.c[sizeof (long int) - 1] == 1; | |
8164 | ||
8165 | ; | |
8166 | return 0; | |
4977bab6 | 8167 | } |
ba479fd2 | 8168 | _ACEOF |
5213506e | 8169 | if ac_fn_c_try_run "$LINENO"; then : |
4977bab6 ZW |
8170 | ac_cv_c_bigendian=no |
8171 | else | |
5213506e | 8172 | ac_cv_c_bigendian=yes |
4977bab6 | 8173 | fi |
5213506e RW |
8174 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8175 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4977bab6 | 8176 | fi |
ba479fd2 | 8177 | |
5213506e RW |
8178 | fi |
8179 | fi | |
8180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
8181 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
8182 | case $ac_cv_c_bigendian in #( | |
8183 | yes) | |
8184 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
8185 | ;; #( | |
8186 | no) | |
8187 | ;; #( | |
8188 | universal) | |
8189 | ||
8190 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
8191 | ||
8192 | ;; #( | |
8193 | *) | |
8194 | as_fn_error "unknown endianness | |
8195 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
8196 | esac | |
84c041a1 | 8197 | |
75e93faa | 8198 | |
73458fb7 NN |
8199 | # -------- |
8200 | # UNSORTED | |
8201 | # -------- | |
1e608388 | 8202 | |
1e608388 | 8203 | |
4e70264f ZW |
8204 | # These libraries may be used by collect2. |
8205 | # We may need a special search path to get them linked. | |
5213506e RW |
8206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5 |
8207 | $as_echo_n "checking for collect2 libraries... " >&6; } | |
8208 | if test "${gcc_cv_collect2_libs+set}" = set; then : | |
8209 | $as_echo_n "(cached) " >&6 | |
4e70264f ZW |
8210 | else |
8211 | save_LIBS="$LIBS" | |
7f2749d4 | 8212 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8213 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8214 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8215 | do | |
8216 | LIBS="$libs" | |
5213506e | 8217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 NN |
8218 | /* end confdefs.h. */ |
8219 | ||
5213506e RW |
8220 | /* Override any GCC internal prototype to avoid an error. |
8221 | Use char because int might match the return type of a GCC | |
8222 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
8223 | #ifdef __cplusplus |
8224 | extern "C" | |
8225 | #endif | |
ba479fd2 NN |
8226 | char ldopen (); |
8227 | int | |
8228 | main () | |
8229 | { | |
5213506e | 8230 | return ldopen (); |
ba479fd2 NN |
8231 | ; |
8232 | return 0; | |
8233 | } | |
8234 | _ACEOF | |
5213506e | 8235 | if ac_fn_c_try_link "$LINENO"; then : |
4e70264f | 8236 | gcc_cv_collect2_libs="$libs"; break |
4e70264f | 8237 | fi |
5213506e RW |
8238 | rm -f core conftest.err conftest.$ac_objext \ |
8239 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8240 | done |
8241 | LIBS="$save_LIBS" | |
8242 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8243 | fi | |
5213506e RW |
8244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5 |
8245 | $as_echo "$gcc_cv_collect2_libs" >&6; } | |
4e70264f ZW |
8246 | case $gcc_cv_collect2_libs in |
8247 | "none required") ;; | |
8248 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8249 | esac | |
8250 | ||
8251 | ||
7f2749d4 RK |
8252 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8253 | # -lexc. So test for it. | |
8254 | save_LIBS="$LIBS" | |
8255 | LIBS= | |
5213506e RW |
8256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5 |
8257 | $as_echo_n "checking for library containing exc_resume... " >&6; } | |
8258 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8259 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
8260 | else |
8261 | ac_func_search_save_LIBS=$LIBS | |
5213506e | 8262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8263 | /* end confdefs.h. */ |
7f2749d4 | 8264 | |
5213506e RW |
8265 | /* Override any GCC internal prototype to avoid an error. |
8266 | Use char because int might match the return type of a GCC | |
b61ff9c8 | 8267 | builtin and then its argument prototype would still apply. */ |
b61ff9c8 BS |
8268 | #ifdef __cplusplus |
8269 | extern "C" | |
8270 | #endif | |
b61ff9c8 BS |
8271 | char exc_resume (); |
8272 | int | |
8273 | main () | |
8274 | { | |
5213506e | 8275 | return exc_resume (); |
b61ff9c8 BS |
8276 | ; |
8277 | return 0; | |
8278 | } | |
8279 | _ACEOF | |
5213506e RW |
8280 | for ac_lib in '' exc; do |
8281 | if test -z "$ac_lib"; then | |
8282 | ac_res="none required" | |
8283 | else | |
8284 | ac_res=-l$ac_lib | |
8285 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8286 | fi | |
8287 | if ac_fn_c_try_link "$LINENO"; then : | |
8288 | ac_cv_search_exc_resume=$ac_res | |
b8ec3cc8 | 8289 | fi |
5213506e RW |
8290 | rm -f core conftest.err conftest.$ac_objext \ |
8291 | conftest$ac_exeext | |
8292 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8293 | break | |
b8ec3cc8 | 8294 | fi |
5213506e RW |
8295 | done |
8296 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8297 | ||
dd7f7a6e | 8298 | else |
5213506e RW |
8299 | ac_cv_search_exc_resume=no |
8300 | fi | |
8301 | rm conftest.$ac_ext | |
8302 | LIBS=$ac_func_search_save_LIBS | |
8303 | fi | |
8304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5 | |
8305 | $as_echo "$ac_cv_search_exc_resume" >&6; } | |
8306 | ac_res=$ac_cv_search_exc_resume | |
8307 | if test "$ac_res" != no; then : | |
8308 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e | 8309 | |
1a4b763e | 8310 | fi |
5213506e RW |
8311 | |
8312 | GNAT_LIBEXC="$LIBS" | |
8313 | LIBS="$save_LIBS" | |
8314 | ||
8315 | ||
8316 | # Some systems put ldexp and frexp in libm instead of libc; assume | |
8317 | # they're both in the same place. jcf-dump needs them. | |
8318 | save_LIBS="$LIBS" | |
8319 | LIBS= | |
8320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5 | |
8321 | $as_echo_n "checking for library containing ldexp... " >&6; } | |
8322 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8323 | $as_echo_n "(cached) " >&6 | |
8324 | else | |
8325 | ac_func_search_save_LIBS=$LIBS | |
8326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
b61ff9c8 | 8327 | /* end confdefs.h. */ |
2f41c1d6 | 8328 | |
5213506e RW |
8329 | /* Override any GCC internal prototype to avoid an error. |
8330 | Use char because int might match the return type of a GCC | |
8331 | builtin and then its argument prototype would still apply. */ | |
b61ff9c8 BS |
8332 | #ifdef __cplusplus |
8333 | extern "C" | |
8334 | #endif | |
b61ff9c8 BS |
8335 | char ldexp (); |
8336 | int | |
8337 | main () | |
8338 | { | |
5213506e | 8339 | return ldexp (); |
b61ff9c8 BS |
8340 | ; |
8341 | return 0; | |
8342 | } | |
8343 | _ACEOF | |
5213506e RW |
8344 | for ac_lib in '' m; do |
8345 | if test -z "$ac_lib"; then | |
8346 | ac_res="none required" | |
8347 | else | |
8348 | ac_res=-l$ac_lib | |
8349 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8350 | fi | |
8351 | if ac_fn_c_try_link "$LINENO"; then : | |
8352 | ac_cv_search_ldexp=$ac_res | |
b61ff9c8 | 8353 | fi |
5213506e RW |
8354 | rm -f core conftest.err conftest.$ac_objext \ |
8355 | conftest$ac_exeext | |
8356 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8357 | break | |
8358 | fi | |
8359 | done | |
8360 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8361 | ||
8362 | else | |
8363 | ac_cv_search_ldexp=no | |
dd7f7a6e | 8364 | fi |
5213506e | 8365 | rm conftest.$ac_ext |
dd7f7a6e EC |
8366 | LIBS=$ac_func_search_save_LIBS |
8367 | fi | |
5213506e RW |
8368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5 |
8369 | $as_echo "$ac_cv_search_ldexp" >&6; } | |
8370 | ac_res=$ac_cv_search_ldexp | |
8371 | if test "$ac_res" != no; then : | |
8372 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
8373 | |
8374 | fi | |
8375 | ||
8376 | LDEXP_LIB="$LIBS" | |
8377 | LIBS="$save_LIBS" | |
8378 | ||
8379 | ||
8380 | # Use <inttypes.h> only if it exists, | |
8381 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
5213506e RW |
8382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 |
8383 | $as_echo_n "checking for inttypes.h... " >&6; } | |
8384 | if test "${gcc_cv_header_inttypes_h+set}" = set; then : | |
8385 | $as_echo_n "(cached) " >&6 | |
dd7f7a6e | 8386 | else |
5213506e | 8387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
dd7f7a6e EC |
8388 | /* end confdefs.h. */ |
8389 | #include <sys/types.h> | |
8390 | #include <inttypes.h> | |
8391 | int | |
8392 | main () | |
8393 | { | |
8394 | intmax_t i = -1; | |
8395 | ; | |
8396 | return 0; | |
8397 | } | |
8398 | _ACEOF | |
5213506e | 8399 | if ac_fn_c_try_compile "$LINENO"; then : |
dd7f7a6e EC |
8400 | gcc_cv_header_inttypes_h=yes |
8401 | else | |
5213506e | 8402 | gcc_cv_header_inttypes_h=no |
dd7f7a6e | 8403 | fi |
5213506e | 8404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd7f7a6e EC |
8405 | fi |
8406 | ||
5213506e RW |
8407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5 |
8408 | $as_echo "$gcc_cv_header_inttypes_h" >&6; } | |
dd7f7a6e EC |
8409 | if test $gcc_cv_header_inttypes_h = yes; then |
8410 | ||
5213506e | 8411 | $as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h |
dd7f7a6e | 8412 | |
0056a9b5 | 8413 | fi |
956d6950 | 8414 | |
c149cc37 | 8415 | |
ba479fd2 | 8416 | |
52a6edcc | 8417 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
d2e506f2 | 8418 | sysconf strsignal getrusage nl_langinfo \ |
0d667716 KG |
8419 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ |
8420 | clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked | |
5213506e RW |
8421 | do : |
8422 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8423 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8424 | eval as_val=\$$as_ac_var | |
8425 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 8426 | cat >>confdefs.h <<_ACEOF |
5213506e | 8427 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
ba479fd2 | 8428 | _ACEOF |
956d6950 | 8429 | |
956d6950 JL |
8430 | fi |
8431 | done | |
8432 | ||
6885fc87 | 8433 | |
8ccb78f2 RO |
8434 | save_CPPFLAGS="$CPPFLAGS" |
8435 | save_LIBS="$LIBS" | |
8436 | LIBS="$LIBS $LIBELFLIBS" | |
8437 | for ac_func in elf_getshdrstrndx | |
8438 | do : | |
8439 | ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx" | |
8440 | if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then : | |
8441 | cat >>confdefs.h <<_ACEOF | |
8442 | #define HAVE_ELF_GETSHDRSTRNDX 1 | |
8443 | _ACEOF | |
8444 | ||
8445 | else | |
8446 | for ac_func in elf_getshstrndx | |
8447 | do : | |
8448 | ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx" | |
8449 | if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then : | |
8450 | cat >>confdefs.h <<_ACEOF | |
8451 | #define HAVE_ELF_GETSHSTRNDX 1 | |
8452 | _ACEOF | |
8453 | if test "$cross_compiling" = yes; then : | |
8454 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8455 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8456 | as_fn_error "cannot run test program while cross compiling | |
8457 | See \`config.log' for more details." "$LINENO" 5; } | |
8458 | else | |
8459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8460 | /* end confdefs.h. */ | |
8461 | #include <stdlib.h> | |
8462 | #include <libelf.h> | |
8463 | int main() | |
8464 | { | |
8465 | return elf_getshstrndx (NULL, 0) == 0; | |
479881c3 | 8466 | } |
8ccb78f2 RO |
8467 | _ACEOF |
8468 | if ac_fn_c_try_run "$LINENO"; then : | |
8469 | ||
479881c3 RG |
8470 | $as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h |
8471 | ||
8ccb78f2 RO |
8472 | fi |
8473 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8474 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8475 | fi | |
8476 | ||
8477 | fi | |
8478 | done | |
8479 | ||
8480 | ||
8481 | fi | |
8482 | done | |
8483 | ||
8484 | LIBS="$save_LIBS" | |
8485 | CPPFLAGS="$save_CPPFLAGS" | |
8486 | ||
39f6c4c8 | 8487 | if test x$ac_cv_func_mbstowcs = xyes; then |
5213506e RW |
8488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5 |
8489 | $as_echo_n "checking whether mbstowcs works... " >&6; } | |
8490 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then : | |
8491 | $as_echo_n "(cached) " >&6 | |
39f6c4c8 | 8492 | else |
5213506e | 8493 | if test "$cross_compiling" = yes; then : |
39f6c4c8 KW |
8494 | gcc_cv_func_mbstowcs_works=yes |
8495 | else | |
5213506e | 8496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8497 | /* end confdefs.h. */ |
39f6c4c8 KW |
8498 | #include <stdlib.h> |
8499 | int main() | |
8500 | { | |
8501 | mbstowcs(0, "", 0); | |
8502 | return 0; | |
8503 | } | |
ba479fd2 | 8504 | _ACEOF |
5213506e | 8505 | if ac_fn_c_try_run "$LINENO"; then : |
39f6c4c8 KW |
8506 | gcc_cv_func_mbstowcs_works=yes |
8507 | else | |
5213506e | 8508 | gcc_cv_func_mbstowcs_works=no |
39f6c4c8 | 8509 | fi |
5213506e RW |
8510 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8511 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
39f6c4c8 | 8512 | fi |
5213506e | 8513 | |
39f6c4c8 | 8514 | fi |
5213506e RW |
8515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5 |
8516 | $as_echo "$gcc_cv_func_mbstowcs_works" >&6; } | |
63cf211a | 8517 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 | 8518 | |
5213506e | 8519 | $as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h |
39f6c4c8 KW |
8520 | |
8521 | fi | |
8522 | fi | |
8523 | ||
5213506e RW |
8524 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" |
8525 | if test "x$ac_cv_type_ssize_t" = x""yes; then : | |
6e3f3080 | 8526 | |
8b4fc07a | 8527 | else |
ba479fd2 | 8528 | |
8b4fc07a | 8529 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 8530 | #define ssize_t int |
ba479fd2 | 8531 | _ACEOF |
f12bc141 ZW |
8532 | |
8533 | fi | |
8534 | ||
5213506e RW |
8535 | ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default" |
8536 | if test "x$ac_cv_type_caddr_t" = x""yes; then : | |
bba09b5a | 8537 | |
bba09b5a AT |
8538 | else |
8539 | ||
8540 | cat >>confdefs.h <<_ACEOF | |
8541 | #define caddr_t char * | |
8542 | _ACEOF | |
8543 | ||
8544 | fi | |
8545 | ||
0b9d02c6 | 8546 | |
3b0727a0 | 8547 | |
5213506e RW |
8548 | ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" |
8549 | if test "x$ac_cv_header_sys_mman_h" = x""yes; then : | |
3b0727a0 MR |
8550 | gcc_header_sys_mman_h=yes |
8551 | else | |
8552 | gcc_header_sys_mman_h=no | |
8553 | fi | |
5213506e RW |
8554 | |
8555 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
8556 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
3b0727a0 MR |
8557 | gcc_func_mmap=yes |
8558 | else | |
8559 | gcc_func_mmap=no | |
8560 | fi | |
8561 | ||
8562 | if test "$gcc_header_sys_mman_h" != yes \ | |
8563 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
8564 | gcc_cv_func_mmap_file=no |
8565 | gcc_cv_func_mmap_dev_zero=no | |
8566 | gcc_cv_func_mmap_anon=no | |
8567 | else | |
5213506e RW |
8568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5 |
8569 | $as_echo_n "checking whether read-only mmap of a plain file works... " >&6; } | |
8570 | if test "${gcc_cv_func_mmap_file+set}" = set; then : | |
8571 | $as_echo_n "(cached) " >&6 | |
1072ec3f | 8572 | else |
ba479fd2 | 8573 | # Add a system to this blacklist if |
1072ec3f ZW |
8574 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
8575 | # memory area containing the same data that you'd get if you applied | |
8576 | # read() to the same fd. The only system known to have a problem here | |
8577 | # is VMS, where text files have record structure. | |
8578 | case "$host_os" in | |
ba479fd2 | 8579 | vms* | ultrix*) |
1072ec3f ZW |
8580 | gcc_cv_func_mmap_file=no ;; |
8581 | *) | |
8582 | gcc_cv_func_mmap_file=yes;; | |
8583 | esac | |
8584 | fi | |
5213506e RW |
8585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5 |
8586 | $as_echo "$gcc_cv_func_mmap_file" >&6; } | |
8587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5 | |
8588 | $as_echo_n "checking whether mmap from /dev/zero works... " >&6; } | |
8589 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then : | |
8590 | $as_echo_n "(cached) " >&6 | |
1072ec3f ZW |
8591 | else |
8592 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
8593 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
8594 | # zeroed pages with both the following properties: | |
8595 | # 1. If you map N consecutive pages in with one call, and then | |
8596 | # unmap any subset of those pages, the pages that were not | |
8597 | # explicitly unmapped remain accessible. | |
8598 | # 2. If you map two adjacent blocks of memory and then unmap them | |
8599 | # both at once, they must both go away. | |
8600 | # Systems known to be in this category are Windows (all variants), | |
8601 | # VMS, and Darwin. | |
8602 | case "$host_os" in | |
2ce240d3 | 8603 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
8604 | gcc_cv_func_mmap_dev_zero=no ;; |
8605 | *) | |
8606 | gcc_cv_func_mmap_dev_zero=yes;; | |
8607 | esac | |
8608 | fi | |
5213506e RW |
8609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5 |
8610 | $as_echo "$gcc_cv_func_mmap_dev_zero" >&6; } | |
1072ec3f ZW |
8611 | |
8612 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
5213506e RW |
8613 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5 |
8614 | $as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; } | |
8615 | if test "${gcc_cv_decl_map_anon+set}" = set; then : | |
8616 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 8617 | else |
5213506e | 8618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8619 | /* end confdefs.h. */ |
1072ec3f ZW |
8620 | #include <sys/types.h> |
8621 | #include <sys/mman.h> | |
8622 | #include <unistd.h> | |
8623 | ||
8624 | #ifndef MAP_ANONYMOUS | |
8625 | #define MAP_ANONYMOUS MAP_ANON | |
8626 | #endif | |
8627 | ||
ba479fd2 NN |
8628 | int |
8629 | main () | |
8630 | { | |
1072ec3f | 8631 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
8632 | ; |
8633 | return 0; | |
8634 | } | |
8635 | _ACEOF | |
5213506e | 8636 | if ac_fn_c_try_compile "$LINENO"; then : |
1072ec3f ZW |
8637 | gcc_cv_decl_map_anon=yes |
8638 | else | |
5213506e | 8639 | gcc_cv_decl_map_anon=no |
1072ec3f | 8640 | fi |
5213506e | 8641 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 8642 | fi |
5213506e RW |
8643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5 |
8644 | $as_echo "$gcc_cv_decl_map_anon" >&6; } | |
1072ec3f ZW |
8645 | |
8646 | if test $gcc_cv_decl_map_anon = no; then | |
8647 | gcc_cv_func_mmap_anon=no | |
8648 | else | |
5213506e RW |
8649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
8650 | $as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; } | |
8651 | if test "${gcc_cv_func_mmap_anon+set}" = set; then : | |
8652 | $as_echo_n "(cached) " >&6 | |
1072ec3f ZW |
8653 | else |
8654 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
8655 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
8656 | # doesn't give anonymous zeroed pages with the same properties listed | |
8657 | # above for use of /dev/zero. | |
8658 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
8659 | case "$host_os" in | |
8660 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
8661 | gcc_cv_func_mmap_anon=no ;; | |
8662 | *) | |
8663 | gcc_cv_func_mmap_anon=yes;; | |
8664 | esac | |
8665 | fi | |
5213506e RW |
8666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5 |
8667 | $as_echo "$gcc_cv_func_mmap_anon" >&6; } | |
1072ec3f ZW |
8668 | fi |
8669 | fi | |
8670 | ||
8671 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 | 8672 | |
5213506e | 8673 | $as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h |
1072ec3f ZW |
8674 | |
8675 | fi | |
8676 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 | 8677 | |
5213506e | 8678 | $as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h |
1072ec3f ZW |
8679 | |
8680 | fi | |
8681 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 | 8682 | |
5213506e | 8683 | $as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h |
1072ec3f ZW |
8684 | |
8685 | fi | |
8686 | ||
b27d2bd5 MK |
8687 | |
8688 | case "${host}" in | |
ee262b6f | 8689 | *-*-*vms*) |
ba479fd2 | 8690 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
8691 | # won't work, and it isn't easily adaptable. It makes more sense to |
8692 | # just force it. | |
8693 | ac_cv_func_vfork_works=yes | |
8694 | ;; | |
b27d2bd5 | 8695 | esac |
5213506e RW |
8696 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
8697 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
6e3f3080 | 8698 | |
ba479fd2 NN |
8699 | else |
8700 | ||
8701 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 8702 | #define pid_t int |
ba479fd2 | 8703 | _ACEOF |
c375c43b KG |
8704 | |
8705 | fi | |
8706 | ||
5213506e RW |
8707 | for ac_header in vfork.h |
8708 | do : | |
8709 | ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h" | |
8710 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
ba479fd2 | 8711 | cat >>confdefs.h <<_ACEOF |
5213506e | 8712 | #define HAVE_VFORK_H 1 |
ba479fd2 | 8713 | _ACEOF |
6e3f3080 NN |
8714 | |
8715 | fi | |
ba479fd2 NN |
8716 | done |
8717 | ||
ba479fd2 | 8718 | for ac_func in fork vfork |
5213506e RW |
8719 | do : |
8720 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8721 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8722 | eval as_val=\$$as_ac_var | |
8723 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 8724 | cat >>confdefs.h <<_ACEOF |
5213506e | 8725 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
ba479fd2 NN |
8726 | _ACEOF |
8727 | ||
c375c43b | 8728 | fi |
ba479fd2 | 8729 | done |
c375c43b | 8730 | |
ba479fd2 | 8731 | if test "x$ac_cv_func_fork" = xyes; then |
5213506e RW |
8732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
8733 | $as_echo_n "checking for working fork... " >&6; } | |
8734 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
8735 | $as_echo_n "(cached) " >&6 | |
c375c43b | 8736 | else |
5213506e | 8737 | if test "$cross_compiling" = yes; then : |
ba479fd2 NN |
8738 | ac_cv_func_fork_works=cross |
8739 | else | |
5213506e RW |
8740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8741 | /* end confdefs.h. */ | |
8742 | $ac_includes_default | |
8743 | int | |
8744 | main () | |
8745 | { | |
8746 | ||
8747 | /* By Ruediger Kuhlmann. */ | |
8748 | return fork () < 0; | |
8749 | ||
8750 | ; | |
8751 | return 0; | |
8752 | } | |
1a4b763e | 8753 | _ACEOF |
5213506e | 8754 | if ac_fn_c_try_run "$LINENO"; then : |
ba479fd2 NN |
8755 | ac_cv_func_fork_works=yes |
8756 | else | |
5213506e | 8757 | ac_cv_func_fork_works=no |
ba479fd2 | 8758 | fi |
5213506e RW |
8759 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8760 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ba479fd2 | 8761 | fi |
5213506e | 8762 | |
ba479fd2 | 8763 | fi |
5213506e RW |
8764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
8765 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
ba479fd2 NN |
8766 | |
8767 | else | |
8768 | ac_cv_func_fork_works=$ac_cv_func_fork | |
8769 | fi | |
8770 | if test "x$ac_cv_func_fork_works" = xcross; then | |
8771 | case $host in | |
8772 | *-*-amigaos* | *-*-msdosdjgpp*) | |
8773 | # Override, as these systems have only a dummy fork() stub | |
8774 | ac_cv_func_fork_works=no | |
8775 | ;; | |
8776 | *) | |
8777 | ac_cv_func_fork_works=yes | |
8778 | ;; | |
8779 | esac | |
5213506e RW |
8780 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
8781 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 8782 | fi |
c375c43b | 8783 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 | 8784 | if test "x$ac_cv_func_vfork" = xyes; then |
5213506e RW |
8785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
8786 | $as_echo_n "checking for working vfork... " >&6; } | |
8787 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
8788 | $as_echo_n "(cached) " >&6 | |
c375c43b | 8789 | else |
5213506e | 8790 | if test "$cross_compiling" = yes; then : |
ba479fd2 NN |
8791 | ac_cv_func_vfork_works=cross |
8792 | else | |
5213506e | 8793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8794 | /* end confdefs.h. */ |
c375c43b | 8795 | /* Thanks to Paul Eggert for this test. */ |
5213506e | 8796 | $ac_includes_default |
ba479fd2 | 8797 | #include <sys/wait.h> |
5213506e | 8798 | #ifdef HAVE_VFORK_H |
ba479fd2 | 8799 | # include <vfork.h> |
c375c43b KG |
8800 | #endif |
8801 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
8802 | argument registers are propagated back to the parent. The compiler |
8803 | is told about this with #include <vfork.h>, but some compilers | |
8804 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
8805 | static variable whose address is put into a register that is | |
8806 | clobbered by the vfork. */ | |
8807 | static void | |
c375c43b KG |
8808 | #ifdef __cplusplus |
8809 | sparc_address_test (int arg) | |
ba479fd2 | 8810 | # else |
c375c43b KG |
8811 | sparc_address_test (arg) int arg; |
8812 | #endif | |
8813 | { | |
8814 | static pid_t child; | |
8815 | if (!child) { | |
8816 | child = vfork (); | |
8817 | if (child < 0) { | |
8818 | perror ("vfork"); | |
8819 | _exit(2); | |
8820 | } | |
8821 | if (!child) { | |
8822 | arg = getpid(); | |
8823 | write(-1, "", 0); | |
8824 | _exit (arg); | |
8825 | } | |
8826 | } | |
8827 | } | |
ba479fd2 NN |
8828 | |
8829 | int | |
8830 | main () | |
8831 | { | |
c375c43b KG |
8832 | pid_t parent = getpid (); |
8833 | pid_t child; | |
8834 | ||
ba479fd2 | 8835 | sparc_address_test (0); |
c375c43b KG |
8836 | |
8837 | child = vfork (); | |
8838 | ||
8839 | if (child == 0) { | |
ba479fd2 NN |
8840 | /* Here is another test for sparc vfork register problems. This |
8841 | test uses lots of local variables, at least as many local | |
8842 | variables as main has allocated so far including compiler | |
8843 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
8844 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
8845 | reuse the register of parent for one of the local variables, | |
8846 | since it will think that parent can't possibly be used any more | |
8847 | in this routine. Assigning to the local variable will thus | |
8848 | munge parent in the parent process. */ | |
c375c43b KG |
8849 | pid_t |
8850 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
8851 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
8852 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
8853 | use the same hardware register for all 8 local variables. */ | |
8854 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
8855 | || p != p5 || p != p6 || p != p7) | |
8856 | _exit(1); | |
8857 | ||
ba479fd2 NN |
8858 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
8859 | from child file descriptors. If the child closes a descriptor | |
8860 | before it execs or exits, this munges the parent's descriptor | |
8861 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
8862 | _exit(close(fileno(stdout)) != 0); |
8863 | } else { | |
8864 | int status; | |
8865 | struct stat st; | |
8866 | ||
8867 | while (wait(&status) != child) | |
8868 | ; | |
5213506e | 8869 | return ( |
c375c43b KG |
8870 | /* Was there some problem with vforking? */ |
8871 | child < 0 | |
8872 | ||
8873 | /* Did the child fail? (This shouldn't happen.) */ | |
8874 | || status | |
8875 | ||
8876 | /* Did the vfork/compiler bug occur? */ | |
8877 | || parent != getpid() | |
8878 | ||
8879 | /* Did the file descriptor bug occur? */ | |
8880 | || fstat(fileno(stdout), &st) != 0 | |
8881 | ); | |
8882 | } | |
8883 | } | |
ba479fd2 | 8884 | _ACEOF |
5213506e | 8885 | if ac_fn_c_try_run "$LINENO"; then : |
c375c43b KG |
8886 | ac_cv_func_vfork_works=yes |
8887 | else | |
5213506e | 8888 | ac_cv_func_vfork_works=no |
cafe096b | 8889 | fi |
5213506e RW |
8890 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8891 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6e3f3080 | 8892 | fi |
5213506e | 8893 | |
ba479fd2 | 8894 | fi |
5213506e RW |
8895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
8896 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
c375c43b | 8897 | |
ba479fd2 NN |
8898 | fi; |
8899 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 8900 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
5213506e RW |
8901 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
8902 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
8903 | fi |
8904 | ||
ba479fd2 NN |
8905 | if test "x$ac_cv_func_vfork_works" = xyes; then |
8906 | ||
5213506e | 8907 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
ba479fd2 NN |
8908 | |
8909 | else | |
8910 | ||
5213506e | 8911 | $as_echo "#define vfork fork" >>confdefs.h |
c375c43b KG |
8912 | |
8913 | fi | |
ba479fd2 NN |
8914 | if test "x$ac_cv_func_fork_works" = xyes; then |
8915 | ||
5213506e | 8916 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
ba479fd2 NN |
8917 | |
8918 | fi | |
8919 | ||
c375c43b | 8920 | |
81bf3d9e | 8921 | |
dfb77e37 KC |
8922 | if test "X$prefix" = "XNONE"; then |
8923 | acl_final_prefix="$ac_default_prefix" | |
8924 | else | |
8925 | acl_final_prefix="$prefix" | |
8926 | fi | |
8927 | if test "X$exec_prefix" = "XNONE"; then | |
8928 | acl_final_exec_prefix='${prefix}' | |
8929 | else | |
8930 | acl_final_exec_prefix="$exec_prefix" | |
8931 | fi | |
8932 | acl_save_prefix="$prefix" | |
8933 | prefix="$acl_final_prefix" | |
8934 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8935 | prefix="$acl_save_prefix" | |
f91abfce TT |
8936 | |
8937 | ||
5213506e RW |
8938 | # Check whether --with-gnu-ld was given. |
8939 | if test "${with_gnu_ld+set}" = set; then : | |
8940 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 8941 | else |
dfb77e37 | 8942 | with_gnu_ld=no |
5213506e RW |
8943 | fi |
8944 | ||
dfb77e37 KC |
8945 | # Prepare PATH_SEPARATOR. |
8946 | # The user is always right. | |
8947 | if test "${PATH_SEPARATOR+set}" != set; then | |
8948 | echo "#! /bin/sh" >conf$$.sh | |
8949 | echo "exit 0" >>conf$$.sh | |
8950 | chmod +x conf$$.sh | |
8951 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8952 | PATH_SEPARATOR=';' | |
ba479fd2 | 8953 | else |
dfb77e37 | 8954 | PATH_SEPARATOR=: |
ba479fd2 | 8955 | fi |
dfb77e37 KC |
8956 | rm -f conf$$.sh |
8957 | fi | |
8958 | ac_prog=ld | |
8959 | if test "$GCC" = yes; then | |
8960 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
8961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
8962 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
dfb77e37 KC |
8963 | case $host in |
8964 | *-*-mingw*) | |
8965 | # gcc leaves a trailing carriage return which upsets mingw | |
8966 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8967 | *) | |
8968 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8969 | esac | |
8970 | case $ac_prog in | |
8971 | # Accept absolute paths. | |
8972 | [\\/]* | [A-Za-z]:[\\/]*) | |
8973 | re_direlt='/[^/][^/]*/\.\./' | |
8974 | # Canonicalize the path of ld | |
8975 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8976 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8977 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8978 | done | |
8979 | test -z "$LD" && LD="$ac_prog" | |
8980 | ;; | |
8981 | "") | |
8982 | # If it fails, then pretend we aren't using GCC. | |
8983 | ac_prog=ld | |
8984 | ;; | |
8985 | *) | |
8986 | # If it is relative, then search for the first ld in PATH. | |
8987 | with_gnu_ld=unknown | |
8988 | ;; | |
8989 | esac | |
8990 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
8991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
8992 | $as_echo_n "checking for GNU ld... " >&6; } | |
ba479fd2 | 8993 | else |
5213506e RW |
8994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
8995 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
ba479fd2 | 8996 | fi |
5213506e RW |
8997 | if test "${acl_cv_path_LD+set}" = set; then : |
8998 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 8999 | else |
dfb77e37 KC |
9000 | if test -z "$LD"; then |
9001 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
9002 | for ac_dir in $PATH; do | |
9003 | test -z "$ac_dir" && ac_dir=. | |
9004 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
9005 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
9006 | # Check to see if the program is GNU ld. I'd rather use --version, | |
9007 | # but apparently some GNU ld's only accept -v. | |
9008 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
9009 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
9010 | test "$with_gnu_ld" != no && break | |
9011 | else | |
9012 | test "$with_gnu_ld" != yes && break | |
9013 | fi | |
dfb77e37 KC |
9014 | fi |
9015 | done | |
9016 | IFS="$ac_save_ifs" | |
9017 | else | |
9018 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
9019 | fi | |
9020 | fi | |
ba479fd2 | 9021 | |
dfb77e37 KC |
9022 | LD="$acl_cv_path_LD" |
9023 | if test -n "$LD"; then | |
5213506e RW |
9024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
9025 | $as_echo "$LD" >&6; } | |
dfb77e37 | 9026 | else |
5213506e RW |
9027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9028 | $as_echo "no" >&6; } | |
ba479fd2 | 9029 | fi |
5213506e RW |
9030 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
9031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
9032 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
9033 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
9034 | $as_echo_n "(cached) " >&6 | |
dfb77e37 KC |
9035 | else |
9036 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
9037 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
9038 | acl_cv_prog_gnu_ld=yes | |
9039 | else | |
9040 | acl_cv_prog_gnu_ld=no | |
9041 | fi | |
dfb77e37 | 9042 | fi |
5213506e RW |
9043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
9044 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
dfb77e37 KC |
9045 | with_gnu_ld=$acl_cv_prog_gnu_ld |
9046 | ||
9047 | ||
9048 | ||
5213506e RW |
9049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
9050 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
9051 | if test "${acl_cv_rpath+set}" = set; then : | |
9052 | $as_echo_n "(cached) " >&6 | |
dfb77e37 KC |
9053 | else |
9054 | ||
9055 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
9056 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
9057 | . ./conftest.sh | |
9058 | rm -f ./conftest.sh | |
9059 | acl_cv_rpath=done | |
ba479fd2 | 9060 | |
eb158727 | 9061 | fi |
5213506e RW |
9062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
9063 | $as_echo "$acl_cv_rpath" >&6; } | |
dfb77e37 KC |
9064 | wl="$acl_cv_wl" |
9065 | libext="$acl_cv_libext" | |
9066 | shlibext="$acl_cv_shlibext" | |
9067 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
9068 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
9069 | hardcode_direct="$acl_cv_hardcode_direct" | |
9070 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
5213506e RW |
9071 | # Check whether --enable-rpath was given. |
9072 | if test "${enable_rpath+set}" = set; then : | |
9073 | enableval=$enable_rpath; : | |
dfb77e37 KC |
9074 | else |
9075 | enable_rpath=yes | |
5213506e RW |
9076 | fi |
9077 | ||
8b1f719a | 9078 | |
a6ccdbab | 9079 | |
dfb77e37 KC |
9080 | |
9081 | ||
9082 | ||
9083 | ||
9084 | ||
b639c3c2 JJ |
9085 | use_additional=yes |
9086 | ||
9087 | acl_save_prefix="$prefix" | |
9088 | prefix="$acl_final_prefix" | |
9089 | acl_save_exec_prefix="$exec_prefix" | |
9090 | exec_prefix="$acl_final_exec_prefix" | |
9091 | ||
9092 | eval additional_includedir=\"$includedir\" | |
9093 | eval additional_libdir=\"$libdir\" | |
9094 | ||
9095 | exec_prefix="$acl_save_exec_prefix" | |
9096 | prefix="$acl_save_prefix" | |
dfb77e37 KC |
9097 | |
9098 | ||
5213506e RW |
9099 | # Check whether --with-libiconv-prefix was given. |
9100 | if test "${with_libiconv_prefix+set}" = set; then : | |
9101 | withval=$with_libiconv_prefix; | |
8b1f719a | 9102 | if test "X$withval" = "Xno"; then |
b639c3c2 | 9103 | use_additional=no |
8b1f719a PB |
9104 | else |
9105 | if test "X$withval" = "X"; then | |
dfb77e37 KC |
9106 | |
9107 | acl_save_prefix="$prefix" | |
9108 | prefix="$acl_final_prefix" | |
9109 | acl_save_exec_prefix="$exec_prefix" | |
9110 | exec_prefix="$acl_final_exec_prefix" | |
9111 | ||
b639c3c2 JJ |
9112 | eval additional_includedir=\"$includedir\" |
9113 | eval additional_libdir=\"$libdir\" | |
dfb77e37 KC |
9114 | |
9115 | exec_prefix="$acl_save_exec_prefix" | |
9116 | prefix="$acl_save_prefix" | |
9117 | ||
8b1f719a | 9118 | else |
b639c3c2 JJ |
9119 | additional_includedir="$withval/include" |
9120 | additional_libdir="$withval/lib" | |
8b1f719a PB |
9121 | fi |
9122 | fi | |
9123 | ||
5213506e RW |
9124 | fi |
9125 | ||
dfb77e37 KC |
9126 | LIBICONV= |
9127 | LTLIBICONV= | |
9128 | INCICONV= | |
9129 | rpathdirs= | |
9130 | ltrpathdirs= | |
9131 | names_already_handled= | |
9132 | names_next_round='iconv ' | |
9133 | while test -n "$names_next_round"; do | |
9134 | names_this_round="$names_next_round" | |
9135 | names_next_round= | |
9136 | for name in $names_this_round; do | |
9137 | already_handled= | |
9138 | for n in $names_already_handled; do | |
9139 | if test "$n" = "$name"; then | |
9140 | already_handled=yes | |
9141 | break | |
9142 | fi | |
9143 | done | |
9144 | if test -z "$already_handled"; then | |
9145 | names_already_handled="$names_already_handled $name" | |
9146 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9147 | eval value=\"\$HAVE_LIB$uppername\" | |
9148 | if test -n "$value"; then | |
9149 | if test "$value" = yes; then | |
9150 | eval value=\"\$LIB$uppername\" | |
9151 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
9152 | eval value=\"\$LTLIB$uppername\" | |
9153 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
9154 | else | |
9155 | : | |
9156 | fi | |
9157 | else | |
9158 | found_dir= | |
9159 | found_la= | |
9160 | found_so= | |
9161 | found_a= | |
b639c3c2 JJ |
9162 | if test $use_additional = yes; then |
9163 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9164 | found_dir="$additional_libdir" | |
9165 | found_so="$additional_libdir/lib$name.$shlibext" | |
9166 | if test -f "$additional_libdir/lib$name.la"; then | |
9167 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
9168 | fi |
9169 | else | |
b639c3c2 JJ |
9170 | if test -f "$additional_libdir/lib$name.$libext"; then |
9171 | found_dir="$additional_libdir" | |
9172 | found_a="$additional_libdir/lib$name.$libext" | |
9173 | if test -f "$additional_libdir/lib$name.la"; then | |
9174 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
9175 | fi |
9176 | fi | |
9177 | fi | |
9178 | fi | |
9179 | if test "X$found_dir" = "X"; then | |
9180 | for x in $LDFLAGS $LTLIBICONV; do | |
9181 | ||
9182 | acl_save_prefix="$prefix" | |
9183 | prefix="$acl_final_prefix" | |
9184 | acl_save_exec_prefix="$exec_prefix" | |
9185 | exec_prefix="$acl_final_exec_prefix" | |
9186 | eval x=\"$x\" | |
9187 | exec_prefix="$acl_save_exec_prefix" | |
9188 | prefix="$acl_save_prefix" | |
9189 | ||
9190 | case "$x" in | |
9191 | -L*) | |
9192 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9193 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9194 | found_dir="$dir" | |
9195 | found_so="$dir/lib$name.$shlibext" | |
9196 | if test -f "$dir/lib$name.la"; then | |
9197 | found_la="$dir/lib$name.la" | |
9198 | fi | |
9199 | else | |
9200 | if test -f "$dir/lib$name.$libext"; then | |
9201 | found_dir="$dir" | |
9202 | found_a="$dir/lib$name.$libext" | |
9203 | if test -f "$dir/lib$name.la"; then | |
9204 | found_la="$dir/lib$name.la" | |
9205 | fi | |
9206 | fi | |
9207 | fi | |
9208 | ;; | |
9209 | esac | |
9210 | if test "X$found_dir" != "X"; then | |
9211 | break | |
9212 | fi | |
9213 | done | |
9214 | fi | |
9215 | if test "X$found_dir" != "X"; then | |
9216 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
9217 | if test "X$found_so" != "X"; then | |
9218 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9219 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9220 | else | |
9221 | haveit= | |
9222 | for x in $ltrpathdirs; do | |
9223 | if test "X$x" = "X$found_dir"; then | |
9224 | haveit=yes | |
9225 | break | |
9226 | fi | |
9227 | done | |
9228 | if test -z "$haveit"; then | |
9229 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9230 | fi | |
9231 | if test "$hardcode_direct" = yes; then | |
9232 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9233 | else | |
9234 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9235 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9236 | haveit= | |
9237 | for x in $rpathdirs; do | |
9238 | if test "X$x" = "X$found_dir"; then | |
9239 | haveit=yes | |
9240 | break | |
9241 | fi | |
9242 | done | |
9243 | if test -z "$haveit"; then | |
9244 | rpathdirs="$rpathdirs $found_dir" | |
9245 | fi | |
9246 | else | |
9247 | haveit= | |
9248 | for x in $LDFLAGS $LIBICONV; do | |
9249 | ||
9250 | acl_save_prefix="$prefix" | |
9251 | prefix="$acl_final_prefix" | |
9252 | acl_save_exec_prefix="$exec_prefix" | |
9253 | exec_prefix="$acl_final_exec_prefix" | |
9254 | eval x=\"$x\" | |
9255 | exec_prefix="$acl_save_exec_prefix" | |
9256 | prefix="$acl_save_prefix" | |
9257 | ||
9258 | if test "X$x" = "X-L$found_dir"; then | |
9259 | haveit=yes | |
9260 | break | |
9261 | fi | |
9262 | done | |
9263 | if test -z "$haveit"; then | |
9264 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
9265 | fi | |
9266 | if test "$hardcode_minus_L" != no; then | |
9267 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9268 | else | |
9269 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
9270 | fi | |
9271 | fi | |
9272 | fi | |
9273 | fi | |
9274 | else | |
9275 | if test "X$found_a" != "X"; then | |
9276 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
9277 | else | |
9278 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
9279 | fi | |
9280 | fi | |
9281 | additional_includedir= | |
9282 | case "$found_dir" in | |
9283 | */lib | */lib/) | |
9284 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9285 | additional_includedir="$basedir/include" | |
9286 | ;; | |
9287 | esac | |
9288 | if test "X$additional_includedir" != "X"; then | |
9289 | if test "X$additional_includedir" != "X/usr/include"; then | |
9290 | haveit= | |
9291 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9292 | if test -n "$GCC"; then | |
9293 | case $host_os in | |
18fc9bd4 | 9294 | linux*) haveit=yes;; |
dfb77e37 KC |
9295 | esac |
9296 | fi | |
9297 | fi | |
9298 | if test -z "$haveit"; then | |
9299 | for x in $CPPFLAGS $INCICONV; do | |
9300 | ||
9301 | acl_save_prefix="$prefix" | |
9302 | prefix="$acl_final_prefix" | |
9303 | acl_save_exec_prefix="$exec_prefix" | |
9304 | exec_prefix="$acl_final_exec_prefix" | |
9305 | eval x=\"$x\" | |
9306 | exec_prefix="$acl_save_exec_prefix" | |
9307 | prefix="$acl_save_prefix" | |
9308 | ||
9309 | if test "X$x" = "X-I$additional_includedir"; then | |
9310 | haveit=yes | |
9311 | break | |
9312 | fi | |
9313 | done | |
9314 | if test -z "$haveit"; then | |
9315 | if test -d "$additional_includedir"; then | |
9316 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
9317 | fi | |
9318 | fi | |
9319 | fi | |
9320 | fi | |
9321 | fi | |
9322 | if test -n "$found_la"; then | |
9323 | save_libdir="$libdir" | |
9324 | case "$found_la" in | |
9325 | */* | *\\*) . "$found_la" ;; | |
9326 | *) . "./$found_la" ;; | |
9327 | esac | |
9328 | libdir="$save_libdir" | |
9329 | for dep in $dependency_libs; do | |
9330 | case "$dep" in | |
9331 | -L*) | |
9332 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9333 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9334 | haveit= | |
9335 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9336 | if test -n "$GCC"; then | |
9337 | case $host_os in | |
18fc9bd4 | 9338 | linux*) haveit=yes;; |
dfb77e37 KC |
9339 | esac |
9340 | fi | |
9341 | fi | |
9342 | if test -z "$haveit"; then | |
9343 | haveit= | |
9344 | for x in $LDFLAGS $LIBICONV; do | |
9345 | ||
9346 | acl_save_prefix="$prefix" | |
9347 | prefix="$acl_final_prefix" | |
9348 | acl_save_exec_prefix="$exec_prefix" | |
9349 | exec_prefix="$acl_final_exec_prefix" | |
9350 | eval x=\"$x\" | |
9351 | exec_prefix="$acl_save_exec_prefix" | |
9352 | prefix="$acl_save_prefix" | |
9353 | ||
9354 | if test "X$x" = "X-L$additional_libdir"; then | |
9355 | haveit=yes | |
9356 | break | |
9357 | fi | |
9358 | done | |
9359 | if test -z "$haveit"; then | |
9360 | if test -d "$additional_libdir"; then | |
9361 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
9362 | fi | |
9363 | fi | |
9364 | haveit= | |
9365 | for x in $LDFLAGS $LTLIBICONV; do | |
9366 | ||
9367 | acl_save_prefix="$prefix" | |
9368 | prefix="$acl_final_prefix" | |
9369 | acl_save_exec_prefix="$exec_prefix" | |
9370 | exec_prefix="$acl_final_exec_prefix" | |
9371 | eval x=\"$x\" | |
9372 | exec_prefix="$acl_save_exec_prefix" | |
9373 | prefix="$acl_save_prefix" | |
9374 | ||
9375 | if test "X$x" = "X-L$additional_libdir"; then | |
9376 | haveit=yes | |
9377 | break | |
9378 | fi | |
9379 | done | |
9380 | if test -z "$haveit"; then | |
9381 | if test -d "$additional_libdir"; then | |
9382 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
9383 | fi | |
9384 | fi | |
9385 | fi | |
9386 | fi | |
9387 | ;; | |
9388 | -R*) | |
9389 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9390 | if test "$enable_rpath" != no; then | |
9391 | haveit= | |
9392 | for x in $rpathdirs; do | |
9393 | if test "X$x" = "X$dir"; then | |
9394 | haveit=yes | |
9395 | break | |
9396 | fi | |
9397 | done | |
9398 | if test -z "$haveit"; then | |
9399 | rpathdirs="$rpathdirs $dir" | |
9400 | fi | |
9401 | haveit= | |
9402 | for x in $ltrpathdirs; do | |
9403 | if test "X$x" = "X$dir"; then | |
9404 | haveit=yes | |
9405 | break | |
9406 | fi | |
9407 | done | |
9408 | if test -z "$haveit"; then | |
9409 | ltrpathdirs="$ltrpathdirs $dir" | |
9410 | fi | |
9411 | fi | |
9412 | ;; | |
9413 | -l*) | |
9414 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9415 | ;; | |
9416 | *.la) | |
9417 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9418 | ;; | |
9419 | *) | |
9420 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
9421 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
9422 | ;; | |
9423 | esac | |
9424 | done | |
9425 | fi | |
9426 | else | |
9427 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
9428 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
9429 | fi | |
9430 | fi | |
9431 | fi | |
9432 | done | |
9433 | done | |
9434 | if test "X$rpathdirs" != "X"; then | |
9435 | if test -n "$hardcode_libdir_separator"; then | |
9436 | alldirs= | |
9437 | for found_dir in $rpathdirs; do | |
9438 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9439 | done | |
9440 | acl_save_libdir="$libdir" | |
9441 | libdir="$alldirs" | |
9442 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9443 | libdir="$acl_save_libdir" | |
9444 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
9445 | else | |
9446 | for found_dir in $rpathdirs; do | |
9447 | acl_save_libdir="$libdir" | |
9448 | libdir="$found_dir" | |
9449 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9450 | libdir="$acl_save_libdir" | |
9451 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
9452 | done | |
9453 | fi | |
9454 | fi | |
9455 | if test "X$ltrpathdirs" != "X"; then | |
9456 | for found_dir in $ltrpathdirs; do | |
9457 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
9458 | done | |
9459 | fi | |
9460 | ||
9461 | ||
9462 | ||
9463 | ||
9464 | ||
9465 | ||
9466 | ||
9467 | am_save_CPPFLAGS="$CPPFLAGS" | |
9468 | ||
9469 | for element in $INCICONV; do | |
9470 | haveit= | |
9471 | for x in $CPPFLAGS; do | |
9472 | ||
9473 | acl_save_prefix="$prefix" | |
9474 | prefix="$acl_final_prefix" | |
9475 | acl_save_exec_prefix="$exec_prefix" | |
9476 | exec_prefix="$acl_final_exec_prefix" | |
9477 | eval x=\"$x\" | |
9478 | exec_prefix="$acl_save_exec_prefix" | |
9479 | prefix="$acl_save_prefix" | |
9480 | ||
9481 | if test "X$x" = "X$element"; then | |
9482 | haveit=yes | |
9483 | break | |
9484 | fi | |
9485 | done | |
9486 | if test -z "$haveit"; then | |
9487 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9488 | fi | |
9489 | done | |
eb158727 ZW |
9490 | |
9491 | ||
5213506e RW |
9492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9493 | $as_echo_n "checking for iconv... " >&6; } | |
9494 | if test "${am_cv_func_iconv+set}" = set; then : | |
9495 | $as_echo_n "(cached) " >&6 | |
f91abfce | 9496 | else |
ba479fd2 | 9497 | |
f91abfce TT |
9498 | am_cv_func_iconv="no, consider installing GNU libiconv" |
9499 | am_cv_lib_iconv=no | |
5213506e | 9500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9501 | /* end confdefs.h. */ |
f91abfce TT |
9502 | #include <stdlib.h> |
9503 | #include <iconv.h> | |
ba479fd2 NN |
9504 | int |
9505 | main () | |
9506 | { | |
f91abfce TT |
9507 | iconv_t cd = iconv_open("",""); |
9508 | iconv(cd,NULL,NULL,NULL,NULL); | |
9509 | iconv_close(cd); | |
ba479fd2 NN |
9510 | ; |
9511 | return 0; | |
9512 | } | |
9513 | _ACEOF | |
5213506e | 9514 | if ac_fn_c_try_link "$LINENO"; then : |
f91abfce | 9515 | am_cv_func_iconv=yes |
f91abfce | 9516 | fi |
5213506e RW |
9517 | rm -f core conftest.err conftest.$ac_objext \ |
9518 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
9519 | if test "$am_cv_func_iconv" != yes; then |
9520 | am_save_LIBS="$LIBS" | |
dfb77e37 | 9521 | LIBS="$LIBS $LIBICONV" |
5213506e | 9522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9523 | /* end confdefs.h. */ |
f91abfce TT |
9524 | #include <stdlib.h> |
9525 | #include <iconv.h> | |
ba479fd2 NN |
9526 | int |
9527 | main () | |
9528 | { | |
f91abfce TT |
9529 | iconv_t cd = iconv_open("",""); |
9530 | iconv(cd,NULL,NULL,NULL,NULL); | |
9531 | iconv_close(cd); | |
ba479fd2 NN |
9532 | ; |
9533 | return 0; | |
9534 | } | |
9535 | _ACEOF | |
5213506e | 9536 | if ac_fn_c_try_link "$LINENO"; then : |
f91abfce TT |
9537 | am_cv_lib_iconv=yes |
9538 | am_cv_func_iconv=yes | |
f91abfce | 9539 | fi |
5213506e RW |
9540 | rm -f core conftest.err conftest.$ac_objext \ |
9541 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
9542 | LIBS="$am_save_LIBS" |
9543 | fi | |
6e3f3080 | 9544 | |
ba479fd2 | 9545 | fi |
5213506e RW |
9546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9547 | $as_echo "$am_cv_func_iconv" >&6; } | |
63cf211a | 9548 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 | 9549 | |
5213506e | 9550 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
f91abfce | 9551 | |
dfb77e37 KC |
9552 | fi |
9553 | if test "$am_cv_lib_iconv" = yes; then | |
5213506e RW |
9554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 |
9555 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
9556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
9557 | $as_echo "$LIBICONV" >&6; } | |
dfb77e37 KC |
9558 | else |
9559 | CPPFLAGS="$am_save_CPPFLAGS" | |
9560 | LIBICONV= | |
9561 | LTLIBICONV= | |
9562 | fi | |
9563 | ||
9564 | ||
9565 | ||
9566 | if test "$am_cv_func_iconv" = yes; then | |
5213506e RW |
9567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9568 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9569 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9570 | $as_echo_n "(cached) " >&6 | |
f91abfce | 9571 | else |
ba479fd2 | 9572 | |
5213506e | 9573 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9574 | /* end confdefs.h. */ |
f91abfce TT |
9575 | |
9576 | #include <stdlib.h> | |
9577 | #include <iconv.h> | |
9578 | extern | |
9579 | #ifdef __cplusplus | |
9580 | "C" | |
9581 | #endif | |
9582 | #if defined(__STDC__) || defined(__cplusplus) | |
9583 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9584 | #else | |
9585 | size_t iconv(); | |
9586 | #endif | |
9587 | ||
ba479fd2 NN |
9588 | int |
9589 | main () | |
9590 | { | |
f91abfce | 9591 | |
ba479fd2 NN |
9592 | ; |
9593 | return 0; | |
9594 | } | |
9595 | _ACEOF | |
5213506e | 9596 | if ac_fn_c_try_compile "$LINENO"; then : |
f91abfce TT |
9597 | am_cv_proto_iconv_arg1="" |
9598 | else | |
5213506e | 9599 | am_cv_proto_iconv_arg1="const" |
f91abfce | 9600 | fi |
5213506e | 9601 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
9602 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
9603 | fi | |
9604 | ||
9605 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
5213506e | 9606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
ba479fd2 | 9607 | }$am_cv_proto_iconv" >&5 |
5213506e RW |
9608 | $as_echo "${ac_t:- |
9609 | }$am_cv_proto_iconv" >&6; } | |
ba479fd2 NN |
9610 | |
9611 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 9612 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 9613 | _ACEOF |
f91abfce TT |
9614 | |
9615 | fi | |
f91abfce | 9616 | |
56694dd9 ZW |
9617 | # Until we have in-tree GNU iconv: |
9618 | LIBICONV_DEP= | |
9619 | ||
9620 | ||
18fc9bd4 | 9621 | |
5213506e RW |
9622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9623 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9624 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9625 | $as_echo_n "(cached) " >&6 | |
18fc9bd4 | 9626 | else |
5213506e | 9627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18fc9bd4 RG |
9628 | /* end confdefs.h. */ |
9629 | #include <locale.h> | |
9630 | int | |
9631 | main () | |
9632 | { | |
9633 | return LC_MESSAGES | |
9634 | ; | |
9635 | return 0; | |
9636 | } | |
9637 | _ACEOF | |
5213506e | 9638 | if ac_fn_c_try_link "$LINENO"; then : |
18fc9bd4 RG |
9639 | am_cv_val_LC_MESSAGES=yes |
9640 | else | |
5213506e | 9641 | am_cv_val_LC_MESSAGES=no |
18fc9bd4 | 9642 | fi |
5213506e RW |
9643 | rm -f core conftest.err conftest.$ac_objext \ |
9644 | conftest$ac_exeext conftest.$ac_ext | |
18fc9bd4 | 9645 | fi |
5213506e RW |
9646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
9647 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
18fc9bd4 RG |
9648 | if test $am_cv_val_LC_MESSAGES = yes; then |
9649 | ||
5213506e | 9650 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
18fc9bd4 RG |
9651 | |
9652 | fi | |
9653 | ||
f91abfce | 9654 | |
a03ea89b | 9655 | |
5213506e RW |
9656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
9657 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
9658 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
9659 | $as_echo_n "(cached) " >&6 | |
a03ea89b | 9660 | else |
5213506e | 9661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a03ea89b BM |
9662 | /* end confdefs.h. */ |
9663 | #include <langinfo.h> | |
9664 | int | |
9665 | main () | |
9666 | { | |
9667 | char* cs = nl_langinfo(CODESET); | |
9668 | ; | |
9669 | return 0; | |
9670 | } | |
9671 | _ACEOF | |
5213506e | 9672 | if ac_fn_c_try_link "$LINENO"; then : |
a03ea89b BM |
9673 | am_cv_langinfo_codeset=yes |
9674 | else | |
5213506e | 9675 | am_cv_langinfo_codeset=no |
a03ea89b | 9676 | fi |
5213506e RW |
9677 | rm -f core conftest.err conftest.$ac_objext \ |
9678 | conftest$ac_exeext conftest.$ac_ext | |
a03ea89b BM |
9679 | |
9680 | fi | |
5213506e RW |
9681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
9682 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
a03ea89b BM |
9683 | if test $am_cv_langinfo_codeset = yes; then |
9684 | ||
5213506e | 9685 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a03ea89b BM |
9686 | |
9687 | fi | |
9688 | ||
9689 | ||
86cf1cbd KG |
9690 | # We will need to find libiberty.h and ansidecl.h |
9691 | saved_CFLAGS="$CFLAGS" | |
9692 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ed5b9f96 GK |
9693 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ |
9694 | strsignal strstr strverscmp \ | |
9695 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 9696 | free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked |
81bf3d9e | 9697 | do |
5213506e RW |
9698 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9700 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9701 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9702 | $as_echo_n "(cached) " >&6 | |
9703 | else | |
9704 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9705 | /* end confdefs.h. */ |
7afe8c41 KG |
9706 | #undef $ac_tr_decl |
9707 | #define $ac_tr_decl 1 | |
ba479fd2 | 9708 | |
d02af173 | 9709 | #include "ansidecl.h" |
86cf1cbd | 9710 | #include "system.h" |
f31e826b | 9711 | |
ba479fd2 NN |
9712 | int |
9713 | main () | |
9714 | { | |
86cf1cbd KG |
9715 | #ifndef $ac_func |
9716 | char *(*pfn) = (char *(*)) $ac_func ; | |
9717 | #endif | |
ba479fd2 | 9718 | ; |
5213506e RW |
9719 | return 0; |
9720 | } | |
9721 | _ACEOF | |
9722 | if ac_fn_c_try_compile "$LINENO"; then : | |
f31e826b | 9723 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 9724 | else |
5213506e | 9725 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 9726 | fi |
5213506e | 9727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
9728 | fi |
9729 | ||
f31e826b | 9730 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
5213506e RW |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9732 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 9733 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9734 | _ACEOF |
9735 | ||
81bf3d9e | 9736 | else |
5213506e RW |
9737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9738 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 9739 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9740 | _ACEOF |
9741 | ||
81bf3d9e RH |
9742 | fi |
9743 | ||
9744 | done | |
ba479fd2 | 9745 | |
ba479fd2 | 9746 | |
81bf3d9e RH |
9747 | for ac_func in getrlimit setrlimit getrusage |
9748 | do | |
5213506e RW |
9749 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9751 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9752 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9753 | $as_echo_n "(cached) " >&6 | |
9754 | else | |
9755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9756 | /* end confdefs.h. */ |
7afe8c41 KG |
9757 | #undef $ac_tr_decl |
9758 | #define $ac_tr_decl 1 | |
ba479fd2 | 9759 | |
d02af173 | 9760 | #include "ansidecl.h" |
86cf1cbd | 9761 | #include "system.h" |
81bf3d9e RH |
9762 | #ifdef HAVE_SYS_RESOURCE_H |
9763 | #include <sys/resource.h> | |
9764 | #endif | |
9765 | ||
f31e826b | 9766 | |
ba479fd2 NN |
9767 | int |
9768 | main () | |
9769 | { | |
86cf1cbd KG |
9770 | #ifndef $ac_func |
9771 | char *(*pfn) = (char *(*)) $ac_func ; | |
9772 | #endif | |
ba479fd2 NN |
9773 | ; |
9774 | return 0; | |
9775 | } | |
9776 | _ACEOF | |
5213506e | 9777 | if ac_fn_c_try_compile "$LINENO"; then : |
f31e826b | 9778 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 9779 | else |
5213506e | 9780 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 9781 | fi |
5213506e | 9782 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
9783 | fi |
9784 | ||
f31e826b | 9785 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
5213506e RW |
9786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9787 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 9788 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9789 | _ACEOF |
9790 | ||
81bf3d9e | 9791 | else |
5213506e RW |
9792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9793 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 9794 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9795 | _ACEOF |
9796 | ||
81bf3d9e RH |
9797 | fi |
9798 | ||
9799 | done | |
86cf1cbd | 9800 | |
81bf3d9e | 9801 | |
5213506e | 9802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9803 | /* end confdefs.h. */ |
b2522d2b HPN |
9804 | |
9805 | #include "ansidecl.h" | |
9806 | #include "system.h" | |
9807 | #ifdef HAVE_SYS_RESOURCE_H | |
9808 | #include <sys/resource.h> | |
9809 | #endif | |
9810 | ||
ba479fd2 NN |
9811 | int |
9812 | main () | |
9813 | { | |
b2522d2b | 9814 | rlim_t l = 0; |
ba479fd2 NN |
9815 | ; |
9816 | return 0; | |
9817 | } | |
9818 | _ACEOF | |
5213506e | 9819 | if ac_fn_c_try_compile "$LINENO"; then : |
ba479fd2 | 9820 | |
5213506e | 9821 | else |
ba479fd2 | 9822 | |
5213506e | 9823 | $as_echo "#define rlim_t long" >>confdefs.h |
b2522d2b HPN |
9824 | |
9825 | fi | |
5213506e | 9826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 9827 | |
2102b2fe RS |
9828 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
9829 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
9830 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
9831 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
351df804 | 9832 | for ac_func in ldgetname |
c1800ec8 | 9833 | do |
5213506e RW |
9834 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9836 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9837 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9838 | $as_echo_n "(cached) " >&6 | |
9839 | else | |
9840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9841 | /* end confdefs.h. */ |
c1800ec8 ZW |
9842 | #undef $ac_tr_decl |
9843 | #define $ac_tr_decl 1 | |
ba479fd2 | 9844 | |
351df804 KG |
9845 | #include "ansidecl.h" |
9846 | #include "system.h" | |
9847 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
9848 | #undef FREAD |
9849 | #undef FWRITE | |
351df804 KG |
9850 | #include <ldfcn.h> |
9851 | #endif | |
9852 | ||
9853 | ||
ba479fd2 NN |
9854 | int |
9855 | main () | |
9856 | { | |
351df804 KG |
9857 | #ifndef $ac_func |
9858 | char *(*pfn) = (char *(*)) $ac_func ; | |
9859 | #endif | |
ba479fd2 NN |
9860 | ; |
9861 | return 0; | |
9862 | } | |
9863 | _ACEOF | |
5213506e | 9864 | if ac_fn_c_try_compile "$LINENO"; then : |
351df804 KG |
9865 | eval "gcc_cv_have_decl_$ac_func=yes" |
9866 | else | |
5213506e | 9867 | eval "gcc_cv_have_decl_$ac_func=no" |
351df804 | 9868 | fi |
5213506e | 9869 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
9870 | fi |
9871 | ||
9872 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9874 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 9875 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9876 | _ACEOF |
9877 | ||
351df804 | 9878 | else |
5213506e RW |
9879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9880 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 9881 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9882 | _ACEOF |
9883 | ||
351df804 KG |
9884 | fi |
9885 | ||
9886 | done | |
ba479fd2 | 9887 | |
351df804 | 9888 | |
351df804 KG |
9889 | for ac_func in times |
9890 | do | |
5213506e RW |
9891 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9893 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9894 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9895 | $as_echo_n "(cached) " >&6 | |
9896 | else | |
9897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9898 | /* end confdefs.h. */ |
351df804 KG |
9899 | #undef $ac_tr_decl |
9900 | #define $ac_tr_decl 1 | |
ba479fd2 | 9901 | |
c1800ec8 ZW |
9902 | #include "ansidecl.h" |
9903 | #include "system.h" | |
9904 | #ifdef HAVE_SYS_TIMES_H | |
9905 | #include <sys/times.h> | |
9906 | #endif | |
9907 | ||
9908 | ||
ba479fd2 NN |
9909 | int |
9910 | main () | |
9911 | { | |
c1800ec8 ZW |
9912 | #ifndef $ac_func |
9913 | char *(*pfn) = (char *(*)) $ac_func ; | |
9914 | #endif | |
ba479fd2 NN |
9915 | ; |
9916 | return 0; | |
9917 | } | |
9918 | _ACEOF | |
5213506e | 9919 | if ac_fn_c_try_compile "$LINENO"; then : |
2f41c1d6 PB |
9920 | eval "gcc_cv_have_decl_$ac_func=yes" |
9921 | else | |
5213506e | 9922 | eval "gcc_cv_have_decl_$ac_func=no" |
2f41c1d6 | 9923 | fi |
5213506e | 9924 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
9925 | fi |
9926 | ||
9927 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9929 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 9930 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9931 | _ACEOF |
9932 | ||
c1800ec8 | 9933 | else |
5213506e RW |
9934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9935 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 9936 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9937 | _ACEOF |
9938 | ||
c1800ec8 ZW |
9939 | fi |
9940 | ||
9941 | done | |
c1800ec8 ZW |
9942 | |
9943 | ||
4f6d8cc8 GK |
9944 | for ac_func in sigaltstack |
9945 | do | |
5213506e RW |
9946 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9948 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9949 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9950 | $as_echo_n "(cached) " >&6 | |
9951 | else | |
9952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4f6d8cc8 GK |
9953 | /* end confdefs.h. */ |
9954 | #undef $ac_tr_decl | |
9955 | #define $ac_tr_decl 1 | |
9956 | ||
9957 | #include "ansidecl.h" | |
9958 | #include "system.h" | |
9959 | #include <signal.h> | |
9960 | ||
9961 | ||
9962 | int | |
9963 | main () | |
9964 | { | |
9965 | #ifndef $ac_func | |
9966 | char *(*pfn) = (char *(*)) $ac_func ; | |
9967 | #endif | |
9968 | ; | |
9969 | return 0; | |
9970 | } | |
9971 | _ACEOF | |
5213506e | 9972 | if ac_fn_c_try_compile "$LINENO"; then : |
8b1f719a PB |
9973 | eval "gcc_cv_have_decl_$ac_func=yes" |
9974 | else | |
5213506e | 9975 | eval "gcc_cv_have_decl_$ac_func=no" |
4f6d8cc8 | 9976 | fi |
5213506e | 9977 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 GK |
9978 | fi |
9979 | ||
9980 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9982 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
9983 | #define $ac_tr_decl 1 |
9984 | _ACEOF | |
9985 | ||
9986 | else | |
5213506e RW |
9987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9988 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
9989 | #define $ac_tr_decl 0 |
9990 | _ACEOF | |
9991 | ||
9992 | fi | |
9993 | ||
9994 | done | |
9995 | ||
9996 | ||
c1800ec8 | 9997 | # More time-related stuff. |
5213506e RW |
9998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5 |
9999 | $as_echo_n "checking for struct tms... " >&6; } | |
10000 | if test "${ac_cv_struct_tms+set}" = set; then : | |
10001 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10002 | else |
10003 | ||
5213506e | 10004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10005 | /* end confdefs.h. */ |
c1800ec8 ZW |
10006 | |
10007 | #include "ansidecl.h" | |
10008 | #include "system.h" | |
10009 | #ifdef HAVE_SYS_TIMES_H | |
10010 | #include <sys/times.h> | |
10011 | #endif | |
10012 | ||
ba479fd2 NN |
10013 | int |
10014 | main () | |
10015 | { | |
c1800ec8 | 10016 | struct tms tms; |
ba479fd2 NN |
10017 | ; |
10018 | return 0; | |
10019 | } | |
10020 | _ACEOF | |
5213506e | 10021 | if ac_fn_c_try_compile "$LINENO"; then : |
c1800ec8 ZW |
10022 | ac_cv_struct_tms=yes |
10023 | else | |
5213506e | 10024 | ac_cv_struct_tms=no |
c1800ec8 | 10025 | fi |
5213506e | 10026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 10027 | fi |
5213506e RW |
10028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5 |
10029 | $as_echo "$ac_cv_struct_tms" >&6; } | |
63cf211a | 10030 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 | 10031 | |
5213506e | 10032 | $as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h |
c1800ec8 ZW |
10033 | |
10034 | fi | |
10035 | ||
10036 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
10037 | # revisit after autoconf 2.50. | |
5213506e RW |
10038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 |
10039 | $as_echo_n "checking for clock_t... " >&6; } | |
10040 | if test "${gcc_cv_type_clock_t+set}" = set; then : | |
10041 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10042 | else |
10043 | ||
5213506e | 10044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10045 | /* end confdefs.h. */ |
c1800ec8 ZW |
10046 | |
10047 | #include "ansidecl.h" | |
10048 | #include "system.h" | |
10049 | ||
ba479fd2 NN |
10050 | int |
10051 | main () | |
10052 | { | |
c1800ec8 | 10053 | clock_t x; |
ba479fd2 NN |
10054 | ; |
10055 | return 0; | |
10056 | } | |
10057 | _ACEOF | |
5213506e | 10058 | if ac_fn_c_try_compile "$LINENO"; then : |
c1800ec8 ZW |
10059 | gcc_cv_type_clock_t=yes |
10060 | else | |
5213506e | 10061 | gcc_cv_type_clock_t=no |
c1800ec8 | 10062 | fi |
5213506e | 10063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 10064 | fi |
5213506e RW |
10065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5 |
10066 | $as_echo "$gcc_cv_type_clock_t" >&6; } | |
63cf211a | 10067 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 | 10068 | |
5213506e | 10069 | $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h |
c1800ec8 ZW |
10070 | |
10071 | fi | |
10072 | ||
eb70d86d AS |
10073 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
10074 | CFLAGS="$saved_CFLAGS" | |
10075 | ||
5213506e RW |
10076 | # Check whether --enable-initfini-array was given. |
10077 | if test "${enable_initfini_array+set}" = set; then : | |
10078 | enableval=$enable_initfini_array; | |
07cf4226 | 10079 | else |
ba479fd2 | 10080 | |
5213506e RW |
10081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5 |
10082 | $as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; } | |
10083 | if test "${gcc_cv_initfini_array+set}" = set; then : | |
10084 | $as_echo_n "(cached) " >&6 | |
07cf4226 | 10085 | else |
5213506e | 10086 | if test "$cross_compiling" = yes; then : |
918c4fe4 | 10087 | gcc_cv_initfini_array=no |
eb70d86d | 10088 | else |
5213506e | 10089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10090 | /* end confdefs.h. */ |
eb70d86d | 10091 | |
07cf4226 DM |
10092 | static int x = -1; |
10093 | int main (void) { return x; } | |
10094 | int foo (void) { x = 0; } | |
10095 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 | 10096 | _ACEOF |
5213506e | 10097 | if ac_fn_c_try_run "$LINENO"; then : |
918c4fe4 | 10098 | gcc_cv_initfini_array=yes |
eb70d86d | 10099 | else |
5213506e | 10100 | gcc_cv_initfini_array=no |
eb70d86d | 10101 | fi |
5213506e RW |
10102 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10103 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
eb70d86d | 10104 | fi |
5213506e | 10105 | |
07cf4226 | 10106 | fi |
5213506e RW |
10107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5 |
10108 | $as_echo "$gcc_cv_initfini_array" >&6; } | |
eb70d86d | 10109 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 10110 | |
5213506e RW |
10111 | fi |
10112 | ||
63cf211a | 10113 | if test $enable_initfini_array = yes; then |
ba479fd2 | 10114 | |
5213506e | 10115 | $as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h |
07cf4226 | 10116 | |
eb70d86d | 10117 | fi |
81bf3d9e | 10118 | |
ba479fd2 | 10119 | # mkdir takes a single argument on some systems. |
5213506e RW |
10120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5 |
10121 | $as_echo_n "checking if mkdir takes one argument... " >&6; } | |
10122 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then : | |
10123 | $as_echo_n "(cached) " >&6 | |
75923b2f | 10124 | else |
5213506e | 10125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10126 | /* end confdefs.h. */ |
75923b2f MK |
10127 | |
10128 | #include <sys/types.h> | |
10129 | #ifdef HAVE_SYS_STAT_H | |
10130 | # include <sys/stat.h> | |
10131 | #endif | |
10132 | #ifdef HAVE_UNISTD_H | |
10133 | # include <unistd.h> | |
10134 | #endif | |
10135 | #ifdef HAVE_DIRECT_H | |
10136 | # include <direct.h> | |
10137 | #endif | |
ba479fd2 NN |
10138 | int |
10139 | main () | |
10140 | { | |
75923b2f | 10141 | mkdir ("foo", 0); |
ba479fd2 NN |
10142 | ; |
10143 | return 0; | |
10144 | } | |
10145 | _ACEOF | |
5213506e | 10146 | if ac_fn_c_try_compile "$LINENO"; then : |
75923b2f MK |
10147 | gcc_cv_mkdir_takes_one_arg=no |
10148 | else | |
5213506e | 10149 | gcc_cv_mkdir_takes_one_arg=yes |
75923b2f | 10150 | fi |
5213506e | 10151 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 10152 | fi |
5213506e RW |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
10154 | $as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; } | |
63cf211a | 10155 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 | 10156 | |
5213506e | 10157 | $as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h |
75923b2f MK |
10158 | |
10159 | fi | |
10160 | ||
10161 | ||
861bb6c1 JL |
10162 | # File extensions |
10163 | manext='.1' | |
10164 | objext='.o' | |
10165 | ||
10166 | ||
10167 | ||
4977bab6 | 10168 | # With Setjmp/Longjmp based exception handling. |
5213506e RW |
10169 | # Check whether --enable-sjlj-exceptions was given. |
10170 | if test "${enable_sjlj_exceptions+set}" = set; then : | |
10171 | enableval=$enable_sjlj_exceptions; case $target in | |
399fe3e1 JDA |
10172 | *-*-hpux10*) |
10173 | if test $enableval != yes; then | |
5213506e RW |
10174 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5 |
10175 | $as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;} | |
399fe3e1 JDA |
10176 | enableval=yes |
10177 | fi | |
10178 | ;; | |
10179 | esac | |
10180 | force_sjlj_exceptions=yes | |
10181 | else | |
10182 | case $target in | |
10183 | *-*-hpux10*) | |
10184 | force_sjlj_exceptions=yes | |
10185 | enableval=yes | |
10186 | ;; | |
10187 | *) | |
10188 | force_sjlj_exceptions=no | |
10189 | ;; | |
10190 | esac | |
5213506e RW |
10191 | fi |
10192 | ||
399fe3e1 | 10193 | if test $force_sjlj_exceptions = yes; then |
b61ff9c8 | 10194 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` |
63cf211a | 10195 | |
ba479fd2 NN |
10196 | cat >>confdefs.h <<_ACEOF |
10197 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
10198 | _ACEOF | |
4977bab6 | 10199 | |
399fe3e1 | 10200 | fi |
4977bab6 | 10201 | |
443728bb L |
10202 | # For platforms with the unwind ABI which includes an unwind library, |
10203 | # libunwind, we can choose to use the system libunwind. | |
e61c76c9 SE |
10204 | # config.gcc also contains tests of with_system_libunwind. |
10205 | ||
4977bab6 | 10206 | |
5213506e RW |
10207 | # Check whether --with-system-libunwind was given. |
10208 | if test "${with_system_libunwind+set}" = set; then : | |
10209 | withval=$with_system_libunwind; | |
10210 | fi | |
4977bab6 | 10211 | |
e61c76c9 SE |
10212 | # If system-libunwind was not specifically set, pick a default setting. |
10213 | if test x$with_system_libunwind = x; then | |
10214 | case ${target} in | |
10215 | ia64-*-hpux*) with_system_libunwind=yes ;; | |
10216 | *) with_system_libunwind=no ;; | |
10217 | esac | |
10218 | fi | |
10219 | # Based on system-libunwind and target, do we have ipinfo? | |
10220 | if test x$with_system_libunwind = xyes; then | |
10221 | case ${target} in | |
10222 | ia64-*-*) have_unwind_getipinfo=no ;; | |
10223 | *) have_unwind_getipinfo=yes ;; | |
10224 | esac | |
10225 | else | |
a0e02041 AP |
10226 | # Darwin before version 9 does not have _Unwind_GetIPInfo. |
10227 | ||
10228 | case ${target} in | |
10229 | *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;; | |
10230 | *) have_unwind_getipinfo=yes ;; | |
10231 | esac | |
10232 | ||
e61c76c9 | 10233 | fi |
4977bab6 | 10234 | |
e61c76c9 | 10235 | if test x$have_unwind_getipinfo = xyes; then |
e64f5acf | 10236 | |
5213506e | 10237 | $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h |
e64f5acf | 10238 | |
e61c76c9 SE |
10239 | fi |
10240 | ||
e64f5acf | 10241 | |
34a86c2b NN |
10242 | # -------------------------------------------------------- |
10243 | # Build, host, and target specific configuration fragments | |
10244 | # -------------------------------------------------------- | |
10245 | ||
5b28c537 NN |
10246 | # Collect build-machine-specific information. |
10247 | . ${srcdir}/config.build | |
10248 | ||
a89ea0df NN |
10249 | # Collect host-machine-specific information. |
10250 | . ${srcdir}/config.host | |
10251 | ||
ef69da62 | 10252 | target_gtfiles= |
a89ea0df NN |
10253 | |
10254 | # Collect target-machine-specific information. | |
8ad9fb33 | 10255 | . ${srcdir}/config.gcc |
861bb6c1 JL |
10256 | |
10257 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 10258 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
10259 | |
10260 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 10261 | if test x"$tm_file" = x |
861bb6c1 JL |
10262 | then tm_file=$cpu_type/$cpu_type.h; fi |
10263 | ||
6b2adea9 | 10264 | if test x"$extra_headers" = x |
861bb6c1 JL |
10265 | then extra_headers=; fi |
10266 | ||
75bffa71 | 10267 | if test x$md_file = x |
e98e406f | 10268 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 10269 | |
75bffa71 | 10270 | if test x$out_file = x |
861bb6c1 JL |
10271 | then out_file=$cpu_type/$cpu_type.c; fi |
10272 | ||
75bffa71 | 10273 | if test x"$tmake_file" = x |
861bb6c1 JL |
10274 | then tmake_file=$cpu_type/t-$cpu_type |
10275 | fi | |
10276 | ||
90e6a802 | 10277 | if test x"$dwarf2" = xyes |
756ee602 | 10278 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
10279 | fi |
10280 | ||
861bb6c1 | 10281 | # Say what files are being used for the output code and MD file. |
11642c3a | 10282 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
10283 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
10284 | ||
11642c3a | 10285 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
10286 | # about them and drop them. |
10287 | ||
11642c3a ZW |
10288 | bx= |
10289 | for x in $build_xm_file; do | |
10290 | if test -f $srcdir/config/$x | |
10291 | then bx="$bx $x" | |
5213506e RW |
10292 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10293 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10294 | fi |
10295 | done | |
10296 | build_xm_file="$bx" | |
10297 | ||
10298 | hx= | |
10299 | for x in $host_xm_file; do | |
10300 | if test -f $srcdir/config/$x | |
10301 | then hx="$hx $x" | |
5213506e RW |
10302 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10303 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10304 | fi |
10305 | done | |
10306 | host_xm_file="$hx" | |
10307 | ||
10308 | tx= | |
10309 | for x in $xm_file; do | |
10310 | if test -f $srcdir/config/$x | |
10311 | then tx="$tx $x" | |
5213506e RW |
10312 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10313 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10314 | fi |
10315 | done | |
10316 | xm_file="$tx" | |
10317 | ||
861bb6c1 JL |
10318 | count=a |
10319 | for f in $tm_file; do | |
10320 | count=${count}x | |
10321 | done | |
75bffa71 | 10322 | if test $count = ax; then |
861bb6c1 JL |
10323 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
10324 | else | |
10325 | echo "Using the following target machine macro files:" | |
10326 | for f in $tm_file; do | |
10327 | echo " $srcdir/config/$f" | |
10328 | done | |
10329 | fi | |
10330 | ||
4977bab6 | 10331 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 | 10332 | |
5213506e | 10333 | $as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h |
4977bab6 ZW |
10334 | |
10335 | fi | |
10336 | ||
99fa8911 AP |
10337 | if test x$use_long_long_for_widest_fast_int = xyes; then |
10338 | ||
5213506e | 10339 | $as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h |
99fa8911 AP |
10340 | |
10341 | fi | |
10342 | ||
861bb6c1 JL |
10343 | count=a |
10344 | for f in $host_xm_file; do | |
10345 | count=${count}x | |
10346 | done | |
11642c3a ZW |
10347 | if test $count = a; then |
10348 | : | |
10349 | elif test $count = ax; then | |
861bb6c1 JL |
10350 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
10351 | else | |
10352 | echo "Using the following host machine macro files:" | |
10353 | for f in $host_xm_file; do | |
10354 | echo " $srcdir/config/$f" | |
10355 | done | |
10356 | fi | |
476d9098 | 10357 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 10358 | |
75bffa71 | 10359 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
10360 | count=a |
10361 | for f in $build_xm_file; do | |
10362 | count=${count}x | |
10363 | done | |
11642c3a ZW |
10364 | if test $count = a; then |
10365 | : | |
10366 | elif test $count = ax; then | |
861bb6c1 JL |
10367 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
10368 | else | |
10369 | echo "Using the following build machine macro files:" | |
10370 | for f in $build_xm_file; do | |
10371 | echo " $srcdir/config/$f" | |
10372 | done | |
10373 | fi | |
10374 | fi | |
10375 | ||
4f6d8cc8 | 10376 | case ${host} in |
b8ec3cc8 | 10377 | powerpc*-*-darwin*) |
5213506e RW |
10378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5 |
10379 | $as_echo_n "checking whether mcontext_t fields have underscores... " >&6; } | |
10380 | if test "${gcc_cv_mcontext_underscores+set}" = set; then : | |
10381 | $as_echo_n "(cached) " >&6 | |
4f6d8cc8 | 10382 | else |
5213506e RW |
10383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10384 | /* end confdefs.h. */ | |
4f6d8cc8 | 10385 | |
ba7da42a | 10386 | #include <sys/cdefs.h> |
de4fb767 | 10387 | #include <sys/signal.h> |
4f6d8cc8 GK |
10388 | #include <ucontext.h> |
10389 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
10390 | ||
10391 | _ACEOF | |
5213506e | 10392 | if ac_fn_c_try_compile "$LINENO"; then : |
4f6d8cc8 GK |
10393 | gcc_cv_mcontext_underscores=no |
10394 | else | |
5213506e | 10395 | gcc_cv_mcontext_underscores=yes |
4f6d8cc8 | 10396 | fi |
5213506e | 10397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 | 10398 | fi |
5213506e RW |
10399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5 |
10400 | $as_echo "$gcc_cv_mcontext_underscores" >&6; } | |
4f6d8cc8 GK |
10401 | if test $gcc_cv_mcontext_underscores = yes; then |
10402 | ||
5213506e | 10403 | $as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h |
4f6d8cc8 GK |
10404 | |
10405 | fi | |
10406 | ;; | |
10407 | esac | |
10408 | ||
8bb915b6 NN |
10409 | # --------- |
10410 | # Threading | |
10411 | # --------- | |
10412 | ||
c2e494a8 | 10413 | # Check if a valid thread package |
615be2cf | 10414 | case ${enable_threads} in |
c2e494a8 NN |
10415 | "" | no) |
10416 | # No threads | |
10417 | target_thread_file='single' | |
10418 | ;; | |
10419 | yes) | |
10420 | # default | |
10421 | target_thread_file='single' | |
10422 | ;; | |
18167442 | 10423 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
d9dced13 | 10424 | single | solaris | vxworks | win32 | mipssde) |
615be2cf | 10425 | target_thread_file=${enable_threads} |
c2e494a8 NN |
10426 | ;; |
10427 | *) | |
615be2cf | 10428 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
10429 | exit 1 |
10430 | ;; | |
10431 | esac | |
10432 | ||
10433 | if test x${thread_file} = x; then | |
10434 | # No thread file set by target-specific clauses in config.gcc, | |
10435 | # so use file chosen by default logic above | |
10436 | thread_file=${target_thread_file} | |
861bb6c1 JL |
10437 | fi |
10438 | ||
8bb915b6 NN |
10439 | # Make gthr-default.h if we have a thread file. |
10440 | gthread_flags= | |
10441 | if test $thread_file != single; then | |
b15a9f63 RW |
10442 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t |
10443 | if diff gthr-default.h-t gthr-default.h 2>/dev/null; then | |
10444 | rm -f gthr-default.h-t | |
10445 | else | |
10446 | mv -f gthr-default.h-t gthr-default.h | |
10447 | fi | |
8bb915b6 NN |
10448 | gthread_flags=-DHAVE_GTHR_DEFAULT |
10449 | fi | |
10450 | ||
10451 | ||
10452 | # -------- | |
10453 | # UNSORTED | |
10454 | # -------- | |
10455 | ||
18fbf599 | 10456 | use_cxa_atexit=no |
2121a768 JT |
10457 | if test x$enable___cxa_atexit = xyes || \ |
10458 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 | 10459 | if test x$host = x$target; then |
97388150 DS |
10460 | case $host in |
10461 | # mingw32 doesn't have __cxa_atexit but uses atexit registration | |
10462 | # keyed to flag_use_cxa_atexit | |
10463 | *-*-mingw32*) | |
10464 | use_cxa_atexit=yes | |
10465 | ;; | |
10466 | *) | |
5213506e RW |
10467 | ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit" |
10468 | if test "x$ac_cv_func___cxa_atexit" = x""yes; then : | |
18fbf599 PB |
10469 | use_cxa_atexit=yes |
10470 | else | |
10471 | echo "__cxa_atexit can't be enabled on this target" | |
10472 | fi | |
10473 | ||
5f60e48f | 10474 | ;; |
97388150 | 10475 | esac |
18fbf599 PB |
10476 | else |
10477 | # We can't check for __cxa_atexit when building a cross, so assume | |
10478 | # it is available | |
10479 | use_cxa_atexit=yes | |
10480 | fi | |
10481 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 | 10482 | |
5213506e | 10483 | $as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h |
2121a768 | 10484 | |
18fbf599 | 10485 | fi |
2121a768 JT |
10486 | fi |
10487 | ||
a5381466 | 10488 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
10489 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
10490 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
10491 | |
10492 | ||
10493 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 10494 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 10495 | _ACEOF |
a5381466 ZW |
10496 | |
10497 | fi | |
10498 | ||
75685792 RS |
10499 | # Convert extra_options into a form suitable for Makefile use. |
10500 | extra_opt_files= | |
10501 | for f in $extra_options; do | |
10502 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
10503 | done | |
10504 | ||
10505 | ||
b7cb92ad | 10506 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 10507 | # the first file included by config.h. |
4977bab6 | 10508 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 10509 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 10510 | # work to find out the build config parameters. |
75bffa71 | 10511 | if test x$host = x$build |
db81d74a | 10512 | then |
eaf4e618 | 10513 | build_auto=auto-host.h |
b7cb92ad JL |
10514 | else |
10515 | # We create a subdir, then run autoconf in the subdir. | |
10516 | # To prevent recursion we set host and build for the new | |
10517 | # invocation of configure to the build for this invocation | |
ba479fd2 | 10518 | # of configure. |
b7cb92ad JL |
10519 | tempdir=build.$$ |
10520 | rm -rf $tempdir | |
10521 | mkdir $tempdir | |
10522 | cd $tempdir | |
10523 | case ${srcdir} in | |
255b8a49 | 10524 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
10525 | *) realsrcdir=../${srcdir};; |
10526 | esac | |
d920e825 L |
10527 | saved_CFLAGS="${CFLAGS}" |
10528 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
f8c33439 | 10529 | LDFLAGS="${LDFLAGS_FOR_BUILD}" \ |
d920e825 | 10530 | ${realsrcdir}/configure \ |
33e70558 | 10531 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 10532 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 10533 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
10534 | |
10535 | # We just finished tests for the build machine, so rename | |
10536 | # the file auto-build.h in the gcc directory. | |
10537 | mv auto-host.h ../auto-build.h | |
10538 | cd .. | |
10539 | rm -rf $tempdir | |
eaf4e618 | 10540 | build_auto=auto-build.h |
db81d74a RH |
10541 | fi |
10542 | ||
06f0b04c | 10543 | |
eaf4e618 | 10544 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
10545 | tm_p_file="${tm_p_file} tm-preds.h" |
10546 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
10547 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 10548 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 10549 | # put this back in temporarily. |
232b67d9 | 10550 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 10551 | |
34a86c2b NN |
10552 | # -------- |
10553 | # UNSORTED | |
10554 | # -------- | |
10555 | ||
cc1e60ea | 10556 | # Compile in configure arguments. |
8105825d | 10557 | if test -f configargs.h ; then |
cc1e60ea | 10558 | # Being re-configured. |
022dae81 | 10559 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
10560 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
10561 | else | |
10562 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
10563 | fi | |
eeae7b41 DJ |
10564 | |
10565 | # Double all backslashes and backslash all quotes to turn | |
10566 | # gcc_config_arguments into a C string. | |
10567 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
10568 | $gcc_config_arguments | |
10569 | EOF | |
10570 | gcc_config_arguments_str=`cat conftest.out` | |
10571 | rm -f conftest.out | |
10572 | ||
cc1e60ea JM |
10573 | cat > configargs.h <<EOF |
10574 | /* Generated automatically. */ | |
eeae7b41 | 10575 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 10576 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
10577 | |
10578 | static const struct { | |
10579 | const char *name, *value; | |
10580 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
10581 | EOF |
10582 | ||
40540e68 RAE |
10583 | gcc_BASEVER=`cat $srcdir/BASE-VER` |
10584 | gcc_DEVPHASE=`cat $srcdir/DEV-PHASE` | |
10585 | gcc_DATESTAMP=`cat $srcdir/DATESTAMP` | |
0c463e16 | 10586 | if test -f $srcdir/REVISION ; then |
40540e68 | 10587 | gcc_REVISION=`cat $srcdir/REVISION` |
0c463e16 RAE |
10588 | else |
10589 | gcc_REVISION="" | |
10590 | fi | |
10591 | cat > plugin-version.h <<EOF | |
10592 | #include "configargs.h" | |
10593 | ||
10594 | static char basever[] = "$gcc_BASEVER"; | |
10595 | static char datestamp[] = "$gcc_DATESTAMP"; | |
10596 | static char devphase[] = "$gcc_DEVPHASE"; | |
10597 | static char revision[] = "$gcc_REVISION"; | |
10598 | ||
10599 | /* FIXME plugins: We should make the version information more precise. | |
10600 | One way to do is to add a checksum. */ | |
10601 | ||
10602 | static struct plugin_gcc_version gcc_version = {basever, datestamp, | |
10603 | devphase, revision, | |
10604 | configuration_arguments}; | |
10605 | EOF | |
10606 | ||
ab87f8c8 | 10607 | # Internationalization |
18fc9bd4 RG |
10608 | # If we haven't got the data from the intl directory, |
10609 | # assume NLS is disabled. | |
10610 | USE_NLS=no | |
10611 | LIBINTL= | |
10612 | LIBINTL_DEP= | |
10613 | INCINTL= | |
10614 | XGETTEXT= | |
10615 | GMSGFMT= | |
10616 | POSUB= | |
10617 | ||
10618 | if test -f ../intl/config.intl; then | |
10619 | . ../intl/config.intl | |
10620 | fi | |
5213506e RW |
10621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
10622 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
18fc9bd4 | 10623 | if test x"$USE_NLS" != xyes; then |
5213506e RW |
10624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10625 | $as_echo "no" >&6; } | |
18fc9bd4 | 10626 | else |
5213506e RW |
10627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
10628 | $as_echo "yes" >&6; } | |
18fc9bd4 | 10629 | |
5213506e | 10630 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
18fc9bd4 RG |
10631 | |
10632 | ||
5213506e RW |
10633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
10634 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
18fc9bd4 RG |
10635 | # Look for .po and .gmo files in the source directory. |
10636 | CATALOGS= | |
10637 | XLINGUAS= | |
10638 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
10639 | # If there aren't any .gmo files the shell will give us the | |
10640 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
10641 | # weeded out. | |
10642 | case "$cat" in *\**) | |
10643 | continue;; | |
10644 | esac | |
10645 | # The quadruple backslash is collapsed to a double backslash | |
10646 | # by the backticks, then collapsed again by the double quotes, | |
10647 | # leaving us with one backslash in the sed expression (right | |
10648 | # before the dot that mustn't act as a wildcard). | |
10649 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
10650 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
10651 | # The user is allowed to set LINGUAS to a list of languages to | |
10652 | # install catalogs for. If it's empty that means "all of them." | |
10653 | if test "x$LINGUAS" = x; then | |
10654 | CATALOGS="$CATALOGS $cat" | |
10655 | XLINGUAS="$XLINGUAS $lang" | |
10656 | else | |
10657 | case "$LINGUAS" in *$lang*) | |
10658 | CATALOGS="$CATALOGS $cat" | |
10659 | XLINGUAS="$XLINGUAS $lang" | |
10660 | ;; | |
10661 | esac | |
10662 | fi | |
10663 | done | |
10664 | LINGUAS="$XLINGUAS" | |
5213506e RW |
10665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
10666 | $as_echo "$LINGUAS" >&6; } | |
18fc9bd4 RG |
10667 | |
10668 | ||
10669 | DATADIRNAME=share | |
10670 | ||
10671 | INSTOBJEXT=.mo | |
10672 | ||
10673 | GENCAT=gencat | |
10674 | ||
10675 | CATOBJEXT=.gmo | |
10676 | ||
10677 | fi | |
861bb6c1 | 10678 | |
56694dd9 ZW |
10679 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
10680 | # -liconv on the link line twice. | |
10681 | case "$LIBINTL" in *$LIBICONV*) | |
10682 | LIBICONV= ;; | |
10683 | esac | |
dc6746e7 | 10684 | |
5213506e RW |
10685 | # Check whether --enable-secureplt was given. |
10686 | if test "${enable_secureplt+set}" = set; then : | |
10687 | enableval=$enable_secureplt; | |
10688 | fi | |
7f970b70 | 10689 | |
922e3e33 | 10690 | |
ad211091 KT |
10691 | # Check whether --enable-leading-mingw64-underscores was given. |
10692 | if test "${enable_leading_mingw64_underscores+set}" = set; then : | |
10693 | enableval=$enable_leading_mingw64_underscores; | |
10694 | fi | |
10695 | ||
10696 | if test x"$enable_leading_mingw64_underscores" = xyes ; then : | |
10697 | ||
10698 | $as_echo "#define USE_MINGW64_LEADING_UNDERSCORES 1" >>confdefs.h | |
10699 | ||
10700 | fi | |
10701 | ||
5213506e RW |
10702 | # Check whether --enable-cld was given. |
10703 | if test "${enable_cld+set}" = set; then : | |
10704 | enableval=$enable_cld; | |
922e3e33 UB |
10705 | else |
10706 | enable_cld=no | |
5213506e RW |
10707 | fi |
10708 | ||
922e3e33 | 10709 | |
56694dd9 | 10710 | # Windows32 Registry support for specifying GCC installation paths. |
5213506e RW |
10711 | # Check whether --enable-win32-registry was given. |
10712 | if test "${enable_win32_registry+set}" = set; then : | |
10713 | enableval=$enable_win32_registry; | |
10714 | fi | |
dc6746e7 | 10715 | |
ba479fd2 | 10716 | |
a1286ef5 ZW |
10717 | case $host_os in |
10718 | win32 | pe | cygwin* | mingw32* | uwin*) | |
10719 | if test "x$enable_win32_registry" != xno; then | |
5213506e RW |
10720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5 |
10721 | $as_echo_n "checking for library containing RegOpenKeyExA... " >&6; } | |
10722 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
10723 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10724 | else |
10725 | ac_func_search_save_LIBS=$LIBS | |
5213506e | 10726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10727 | /* end confdefs.h. */ |
861bb6c1 | 10728 | |
5213506e RW |
10729 | /* Override any GCC internal prototype to avoid an error. |
10730 | Use char because int might match the return type of a GCC | |
10731 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
10732 | #ifdef __cplusplus |
10733 | extern "C" | |
10734 | #endif | |
ba479fd2 NN |
10735 | char RegOpenKeyExA (); |
10736 | int | |
10737 | main () | |
10738 | { | |
5213506e | 10739 | return RegOpenKeyExA (); |
ba479fd2 NN |
10740 | ; |
10741 | return 0; | |
10742 | } | |
10743 | _ACEOF | |
5213506e RW |
10744 | for ac_lib in '' advapi32; do |
10745 | if test -z "$ac_lib"; then | |
10746 | ac_res="none required" | |
10747 | else | |
10748 | ac_res=-l$ac_lib | |
b61ff9c8 | 10749 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
5213506e RW |
10750 | fi |
10751 | if ac_fn_c_try_link "$LINENO"; then : | |
10752 | ac_cv_search_RegOpenKeyExA=$ac_res | |
10753 | fi | |
10754 | rm -f core conftest.err conftest.$ac_objext \ | |
10755 | conftest$ac_exeext | |
10756 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
10757 | break | |
10758 | fi | |
10759 | done | |
10760 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
2f41c1d6 | 10761 | |
1a4b763e | 10762 | else |
5213506e | 10763 | ac_cv_search_RegOpenKeyExA=no |
dd7f7a6e | 10764 | fi |
5213506e | 10765 | rm conftest.$ac_ext |
dd7f7a6e EC |
10766 | LIBS=$ac_func_search_save_LIBS |
10767 | fi | |
5213506e RW |
10768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5 |
10769 | $as_echo "$ac_cv_search_RegOpenKeyExA" >&6; } | |
10770 | ac_res=$ac_cv_search_RegOpenKeyExA | |
10771 | if test "$ac_res" != no; then : | |
10772 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
10773 | |
10774 | else | |
10775 | enable_win32_registry=no | |
10776 | fi | |
10777 | ||
10778 | fi | |
10779 | ||
10780 | if test "x$enable_win32_registry" != xno; then | |
10781 | ||
5213506e | 10782 | $as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h |
dd7f7a6e EC |
10783 | |
10784 | ||
10785 | if test "x$enable_win32_registry" != xyes \ | |
10786 | && test "x$enable_win32_registry" != x; then | |
10787 | ||
10788 | cat >>confdefs.h <<_ACEOF | |
10789 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" | |
10790 | _ACEOF | |
10791 | ||
10792 | fi | |
10793 | fi | |
10794 | ;; | |
10795 | esac | |
ab87f8c8 | 10796 | |
56694dd9 ZW |
10797 | # Get an absolute path to the GCC top-level source directory |
10798 | holddir=`${PWDCMD-pwd}` | |
10799 | cd $srcdir | |
10800 | topdir=`${PWDCMD-pwd}` | |
10801 | cd $holddir | |
ab87f8c8 | 10802 | |
56694dd9 | 10803 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 10804 | xmake_file= |
c406e779 | 10805 | for f in ${host_xmake_file} |
56694dd9 ZW |
10806 | do |
10807 | if test -f ${srcdir}/config/$f | |
10808 | then | |
2ed26f6b | 10809 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
10810 | fi |
10811 | done | |
093e61a6 | 10812 | |
56694dd9 | 10813 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 10814 | tmake_file_= |
c406e779 | 10815 | for f in ${tmake_file} |
56694dd9 ZW |
10816 | do |
10817 | if test -f ${srcdir}/config/$f | |
10818 | then | |
2ed26f6b | 10819 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
10820 | fi |
10821 | done | |
2ed26f6b | 10822 | tmake_file="${tmake_file_}" |
71a94577 | 10823 | |
ab87f8c8 JL |
10824 | out_object_file=`basename $out_file .c`.o |
10825 | ||
75685792 RS |
10826 | tm_file_list="options.h" |
10827 | tm_include_list="options.h" | |
ab87f8c8 | 10828 | for f in $tm_file; do |
64ccbc99 | 10829 | case $f in |
3ca43df7 RS |
10830 | ./* ) |
10831 | f=`echo $f | sed 's/^..//'` | |
10832 | tm_file_list="${tm_file_list} $f" | |
10833 | tm_include_list="${tm_include_list} $f" | |
10834 | ;; | |
d02af173 | 10835 | defaults.h ) |
e22340b0 ZW |
10836 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
10837 | tm_include_list="${tm_include_list} $f" | |
10838 | ;; | |
10839 | * ) | |
10840 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
10841 | tm_include_list="${tm_include_list} config/$f" | |
10842 | ;; | |
64ccbc99 | 10843 | esac |
ab87f8c8 JL |
10844 | done |
10845 | ||
11642c3a | 10846 | tm_p_file_list= |
e22340b0 | 10847 | tm_p_include_list= |
11642c3a | 10848 | for f in $tm_p_file; do |
4977bab6 ZW |
10849 | case $f in |
10850 | tm-preds.h ) | |
e22340b0 ZW |
10851 | tm_p_file_list="${tm_p_file_list} $f" |
10852 | tm_p_include_list="${tm_p_include_list} $f" | |
10853 | ;; | |
10854 | * ) | |
10855 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
10856 | tm_p_include_list="${tm_p_include_list} config/$f" | |
10857 | esac | |
10858 | done | |
10859 | ||
10860 | xm_file_list= | |
10861 | xm_include_list= | |
10862 | for f in $xm_file; do | |
10863 | case $f in | |
10864 | ansidecl.h ) | |
10865 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
10866 | xm_include_list="${xm_include_list} $f" | |
10867 | ;; | |
10868 | auto-host.h ) | |
10869 | xm_file_list="${xm_file_list} $f" | |
10870 | xm_include_list="${xm_include_list} $f" | |
10871 | ;; | |
10872 | * ) | |
10873 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
10874 | xm_include_list="${xm_include_list} config/$f" | |
10875 | ;; | |
4977bab6 | 10876 | esac |
11642c3a ZW |
10877 | done |
10878 | ||
ab87f8c8 | 10879 | host_xm_file_list= |
e22340b0 | 10880 | host_xm_include_list= |
ab87f8c8 | 10881 | for f in $host_xm_file; do |
64ccbc99 | 10882 | case $f in |
d02af173 | 10883 | ansidecl.h ) |
e22340b0 ZW |
10884 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
10885 | host_xm_include_list="${host_xm_include_list} $f" | |
10886 | ;; | |
e2500fed | 10887 | auto-host.h ) |
e22340b0 ZW |
10888 | host_xm_file_list="${host_xm_file_list} $f" |
10889 | host_xm_include_list="${host_xm_include_list} $f" | |
10890 | ;; | |
10891 | * ) | |
10892 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
10893 | host_xm_include_list="${host_xm_include_list} config/$f" | |
10894 | ;; | |
64ccbc99 | 10895 | esac |
ab87f8c8 JL |
10896 | done |
10897 | ||
10898 | build_xm_file_list= | |
10899 | for f in $build_xm_file; do | |
64ccbc99 | 10900 | case $f in |
d02af173 | 10901 | ansidecl.h ) |
e22340b0 ZW |
10902 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
10903 | build_xm_include_list="${build_xm_include_list} $f" | |
10904 | ;; | |
e2500fed | 10905 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
10906 | build_xm_file_list="${build_xm_file_list} $f" |
10907 | build_xm_include_list="${build_xm_include_list} $f" | |
10908 | ;; | |
10909 | * ) | |
10910 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
10911 | build_xm_include_list="${build_xm_include_list} config/$f" | |
10912 | ;; | |
64ccbc99 | 10913 | esac |
ab87f8c8 JL |
10914 | done |
10915 | ||
2989d30c GK |
10916 | # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a |
10917 | # cross-compiler which does not use the native headers and libraries. | |
a078a589 | 10918 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. |
ba479fd2 NN |
10919 | CROSS= |
10920 | ALL=all.internal | |
10921 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
10922 | |
10923 | if test "x$with_build_sysroot" != x; then | |
14da6073 | 10924 | build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
b28250ab MM |
10925 | else |
10926 | # This value is used, even on a native system, because | |
10927 | # CROSS_SYSTEM_HEADER_DIR is just | |
10928 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
10929 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
10930 | fi | |
10931 | ||
ab87f8c8 JL |
10932 | if test x$host != x$target |
10933 | then | |
2989d30c | 10934 | CROSS="-DCROSS_DIRECTORY_STRUCTURE" |
a078a589 | 10935 | ALL=all.cross |
160633c6 | 10936 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 10937 | case "$host","$target" in |
3a7e8b87 GK |
10938 | # Darwin crosses can use the host system's libraries and headers, |
10939 | # because of the fat library support. Of course, it must be the | |
10940 | # same version of Darwin on both sides. Allow the user to | |
10941 | # just say --target=foo-darwin without a version number to mean | |
10942 | # "the version on this system". | |
10943 | *-*-darwin*,*-*-darwin*) | |
10944 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
10945 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
10946 | if test $hostos = $targetos -o $targetos = darwin ; then | |
10947 | CROSS= | |
10948 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
10949 | with_headers=yes | |
10950 | fi | |
10951 | ;; | |
10952 | ||
343f59d9 AM |
10953 | i?86-*-*,x86_64-*-* \ |
10954 | | powerpc*-*-*,powerpc64*-*-*) | |
10955 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
10956 | esac | |
7a615b25 | 10957 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 10958 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
10959 | fi |
10960 | ||
b39d221a EC |
10961 | # If this is a cross-compiler that does not |
10962 | # have its own set of headers then define | |
10963 | # inhibit_libc | |
10964 | ||
dc06db20 R |
10965 | # If this is using newlib, without having the headers available now, |
10966 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
10967 | # This prevents libgcc2 from containing any code which requires libc |
10968 | # support. | |
a929bc28 | 10969 | : ${inhibit_libc=false} |
dc06db20 R |
10970 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
10971 | test x$with_newlib = xyes ; } && | |
e50084fa | 10972 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 10973 | inhibit_libc=true |
b39d221a EC |
10974 | fi |
10975 | ||
10976 | ||
a078a589 ZW |
10977 | # When building gcc with a cross-compiler, we need to adjust things so |
10978 | # that the generator programs are still built with the native compiler. | |
52c0e446 | 10979 | # Also, we cannot run fixincludes. |
a078a589 ZW |
10980 | |
10981 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
10982 | CC_FOR_BUILD='$(CC)' |
10983 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
f8c33439 | 10984 | BUILD_LDFLAGS='$(LDFLAGS)' |
ba479fd2 | 10985 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 | 10986 | |
83599948 NS |
10987 | # And these apply if build != host, or we are generating coverage data |
10988 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 10989 | then |
b11e4747 | 10990 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
f8c33439 | 10991 | BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' |
ab87f8c8 JL |
10992 | fi |
10993 | ||
10994 | # Expand extra_headers to include complete path. | |
10995 | # This substitutes for lots of t-* files. | |
10996 | extra_headers_list= | |
b1ef58c8 NN |
10997 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
10998 | for file in ${extra_headers} ; do | |
10999 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
11000 | done | |
ab87f8c8 | 11001 | |
1617e5ee GK |
11002 | # If use_gcc_tgmath is set, append ginclude/tgmath.h. |
11003 | if test x"$use_gcc_tgmath" = xyes | |
11004 | then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h" | |
11005 | fi | |
11006 | ||
c38f02df ILT |
11007 | # Define collect2 in Makefile. |
11008 | case $host_can_use_collect2 in | |
11009 | no) collect2= ;; | |
11010 | *) collect2='collect2$(exeext)' ;; | |
11011 | esac | |
11012 | ||
11013 | ||
ab87f8c8 | 11014 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
11015 | case $use_collect2 in |
11016 | no) use_collect2= ;; | |
11017 | "") ;; | |
ba479fd2 | 11018 | *) |
34a86c2b NN |
11019 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
11020 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
11021 | case $host_can_use_collect2 in |
11022 | no) | |
5213506e | 11023 | as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5 |
c38f02df ILT |
11024 | ;; |
11025 | esac | |
34a86c2b NN |
11026 | ;; |
11027 | esac | |
ab87f8c8 | 11028 | |
8bb915b6 NN |
11029 | # --------------------------- |
11030 | # Assembler & linker features | |
11031 | # --------------------------- | |
11032 | ||
da0f6381 PB |
11033 | # During stage 2, ld is actually gcc/collect-ld, which is a small script to |
11034 | # discern between when to use prev-ld/ld-new and when to use ld/ld-new. | |
11035 | # However when ld-new is first executed from the build tree, libtool will | |
11036 | # relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers | |
11037 | # to the build tree. While doing this we need to use the previous-stage | |
11038 | # linker, or we have an infinite loop. The presence of a shell script as | |
11039 | # ld/ld-new, and the fact that the script *uses ld itself*, is what confuses | |
11040 | # the gcc/collect-ld script. So we need to know how libtool works, or | |
11041 | # exec-tool will fail. | |
e8b05380 | 11042 | |
da0f6381 | 11043 | |
5d47bb02 PG |
11044 | case `pwd` in |
11045 | *\ * | *\ *) | |
5213506e RW |
11046 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 |
11047 | $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; | |
5d47bb02 | 11048 | esac |
da0f6381 PB |
11049 | |
11050 | ||
da0f6381 | 11051 | |
43e02a8a RW |
11052 | macro_version='2.2.7a' |
11053 | macro_revision='1.3134' | |
da0f6381 PB |
11054 | |
11055 | ||
11056 | ||
11057 | ||
11058 | ||
11059 | ||
da0f6381 PB |
11060 | |
11061 | ||
11062 | ||
11063 | ||
11064 | ||
11065 | ||
11066 | ||
5d47bb02 | 11067 | ltmain="$ac_aux_dir/ltmain.sh" |
da0f6381 | 11068 | |
43e02a8a RW |
11069 | # Backslashify metacharacters that are still active within |
11070 | # double-quoted strings. | |
11071 | sed_quote_subst='s/\(["`$\\]\)/\\\1/g' | |
11072 | ||
11073 | # Same as above, but do not quote variable references. | |
11074 | double_quote_subst='s/\(["`\\]\)/\\\1/g' | |
11075 | ||
11076 | # Sed substitution to delay expansion of an escaped shell variable in a | |
11077 | # double_quote_subst'ed string. | |
11078 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
11079 | ||
11080 | # Sed substitution to delay expansion of an escaped single quote. | |
11081 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | |
11082 | ||
11083 | # Sed substitution to avoid accidental globbing in evaled expressions | |
11084 | no_glob_subst='s/\*/\\\*/g' | |
11085 | ||
11086 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
11087 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | |
11088 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | |
11089 | ||
11090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | |
11091 | $as_echo_n "checking how to print strings... " >&6; } | |
11092 | # Test print first, because it will be a builtin if present. | |
11093 | if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | |
11094 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | |
11095 | ECHO='print -r --' | |
11096 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | |
11097 | ECHO='printf %s\n' | |
11098 | else | |
11099 | # Use this function as a fallback that always works. | |
11100 | func_fallback_echo () | |
11101 | { | |
11102 | eval 'cat <<_LTECHO_EOF | |
11103 | $1 | |
11104 | _LTECHO_EOF' | |
11105 | } | |
11106 | ECHO='func_fallback_echo' | |
11107 | fi | |
11108 | ||
11109 | # func_echo_all arg... | |
11110 | # Invoke $ECHO with all args, space-separated. | |
11111 | func_echo_all () | |
11112 | { | |
11113 | $ECHO "" | |
11114 | } | |
11115 | ||
11116 | case "$ECHO" in | |
11117 | printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 | |
11118 | $as_echo "printf" >&6; } ;; | |
11119 | print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 | |
11120 | $as_echo "print -r" >&6; } ;; | |
11121 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 | |
11122 | $as_echo "cat" >&6; } ;; | |
11123 | esac | |
11124 | ||
11125 | ||
11126 | ||
11127 | ||
11128 | ||
11129 | ||
11130 | ||
11131 | ||
11132 | ||
11133 | ||
11134 | ||
11135 | ||
11136 | ||
11137 | ||
5213506e RW |
11138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
11139 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
11140 | if test "${ac_cv_path_SED+set}" = set; then : | |
11141 | $as_echo_n "(cached) " >&6 | |
11142 | else | |
11143 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
11144 | for ac_i in 1 2 3 4 5 6 7; do | |
11145 | ac_script="$ac_script$as_nl$ac_script" | |
11146 | done | |
11147 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
11148 | { ac_script=; unset ac_script;} | |
11149 | if test -z "$SED"; then | |
11150 | ac_path_SED_found=false | |
11151 | # Loop through the user's path and test for each of PROGNAME-LIST | |
11152 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 PB |
11153 | for as_dir in $PATH |
11154 | do | |
11155 | IFS=$as_save_IFS | |
11156 | test -z "$as_dir" && as_dir=. | |
5213506e | 11157 | for ac_prog in sed gsed; do |
da0f6381 | 11158 | for ac_exec_ext in '' $ac_executable_extensions; do |
5213506e RW |
11159 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" |
11160 | { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue | |
11161 | # Check for GNU ac_path_SED and select it if it is found. | |
11162 | # Check for GNU $ac_path_SED | |
11163 | case `"$ac_path_SED" --version 2>&1` in | |
11164 | *GNU*) | |
11165 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
11166 | *) | |
11167 | ac_count=0 | |
11168 | $as_echo_n 0123456789 >"conftest.in" | |
11169 | while : | |
11170 | do | |
11171 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
11172 | mv "conftest.tmp" "conftest.in" | |
11173 | cp "conftest.in" "conftest.nl" | |
11174 | $as_echo '' >> "conftest.nl" | |
11175 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
11176 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
11177 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
11178 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
11179 | # Best one so far, save it but keep looking for a better one | |
11180 | ac_cv_path_SED="$ac_path_SED" | |
11181 | ac_path_SED_max=$ac_count | |
11182 | fi | |
11183 | # 10*(2^10) chars as input seems more than enough | |
11184 | test $ac_count -gt 10 && break | |
11185 | done | |
11186 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
11187 | esac | |
11188 | ||
11189 | $ac_path_SED_found && break 3 | |
da0f6381 PB |
11190 | done |
11191 | done | |
5213506e | 11192 | done |
da0f6381 | 11193 | IFS=$as_save_IFS |
5213506e RW |
11194 | if test -z "$ac_cv_path_SED"; then |
11195 | as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
da0f6381 | 11196 | fi |
5213506e RW |
11197 | else |
11198 | ac_cv_path_SED=$SED | |
e8b05380 | 11199 | fi |
b61ff9c8 | 11200 | |
5213506e RW |
11201 | fi |
11202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
11203 | $as_echo "$ac_cv_path_SED" >&6; } | |
11204 | SED="$ac_cv_path_SED" | |
11205 | rm -f conftest.sed | |
e8b05380 | 11206 | |
da0f6381 PB |
11207 | test -z "$SED" && SED=sed |
11208 | Xsed="$SED -e 1s/^X//" | |
e8b05380 | 11209 | |
e8b05380 PB |
11210 | |
11211 | ||
ad9c4d9f | 11212 | |
da0f6381 PB |
11213 | |
11214 | ||
11215 | ||
11216 | ||
11217 | ||
11218 | ||
11219 | ||
5213506e RW |
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 |
11221 | $as_echo_n "checking for fgrep... " >&6; } | |
11222 | if test "${ac_cv_path_FGREP+set}" = set; then : | |
11223 | $as_echo_n "(cached) " >&6 | |
11224 | else | |
11225 | if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 | |
11226 | then ac_cv_path_FGREP="$GREP -F" | |
11227 | else | |
11228 | if test -z "$FGREP"; then | |
11229 | ac_path_FGREP_found=false | |
11230 | # Loop through the user's path and test for each of PROGNAME-LIST | |
11231 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11232 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
11233 | do | |
11234 | IFS=$as_save_IFS | |
11235 | test -z "$as_dir" && as_dir=. | |
11236 | for ac_prog in fgrep; do | |
11237 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11238 | ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" | |
11239 | { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue | |
11240 | # Check for GNU ac_path_FGREP and select it if it is found. | |
11241 | # Check for GNU $ac_path_FGREP | |
11242 | case `"$ac_path_FGREP" --version 2>&1` in | |
11243 | *GNU*) | |
11244 | ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; | |
11245 | *) | |
11246 | ac_count=0 | |
11247 | $as_echo_n 0123456789 >"conftest.in" | |
11248 | while : | |
11249 | do | |
11250 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
11251 | mv "conftest.tmp" "conftest.in" | |
11252 | cp "conftest.in" "conftest.nl" | |
11253 | $as_echo 'FGREP' >> "conftest.nl" | |
11254 | "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
11255 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
11256 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
11257 | if test $ac_count -gt ${ac_path_FGREP_max-0}; then | |
11258 | # Best one so far, save it but keep looking for a better one | |
11259 | ac_cv_path_FGREP="$ac_path_FGREP" | |
11260 | ac_path_FGREP_max=$ac_count | |
11261 | fi | |
11262 | # 10*(2^10) chars as input seems more than enough | |
11263 | test $ac_count -gt 10 && break | |
11264 | done | |
11265 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
11266 | esac | |
11267 | ||
11268 | $ac_path_FGREP_found && break 3 | |
11269 | done | |
11270 | done | |
11271 | done | |
11272 | IFS=$as_save_IFS | |
11273 | if test -z "$ac_cv_path_FGREP"; then | |
11274 | as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
11275 | fi | |
e8b05380 | 11276 | else |
5213506e RW |
11277 | ac_cv_path_FGREP=$FGREP |
11278 | fi | |
11279 | ||
11280 | fi | |
981d4858 | 11281 | fi |
5213506e RW |
11282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 |
11283 | $as_echo "$ac_cv_path_FGREP" >&6; } | |
11284 | FGREP="$ac_cv_path_FGREP" | |
9e423e6d | 11285 | |
9f18db39 | 11286 | |
da0f6381 | 11287 | test -z "$GREP" && GREP=grep |
9f18db39 | 11288 | |
da0f6381 PB |
11289 | |
11290 | ||
11291 | ||
11292 | ||
11293 | ||
11294 | ||
11295 | ||
11296 | ||
11297 | ||
11298 | ||
11299 | ||
11300 | ||
11301 | ||
11302 | ||
11303 | ||
11304 | ||
11305 | ||
11306 | ||
5213506e RW |
11307 | # Check whether --with-gnu-ld was given. |
11308 | if test "${with_gnu_ld+set}" = set; then : | |
11309 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
da0f6381 PB |
11310 | else |
11311 | with_gnu_ld=no | |
5213506e RW |
11312 | fi |
11313 | ||
da0f6381 PB |
11314 | ac_prog=ld |
11315 | if test "$GCC" = yes; then | |
11316 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
11317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 |
11318 | $as_echo_n "checking for ld used by $CC... " >&6; } | |
da0f6381 PB |
11319 | case $host in |
11320 | *-*-mingw*) | |
11321 | # gcc leaves a trailing carriage return which upsets mingw | |
11322 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
11323 | *) | |
11324 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
11325 | esac | |
11326 | case $ac_prog in | |
11327 | # Accept absolute paths. | |
11328 | [\\/]* | ?:[\\/]*) | |
11329 | re_direlt='/[^/][^/]*/\.\./' | |
11330 | # Canonicalize the pathname of ld | |
11331 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
11332 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
11333 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
11334 | done | |
11335 | test -z "$LD" && LD="$ac_prog" | |
11336 | ;; | |
11337 | "") | |
11338 | # If it fails, then pretend we aren't using GCC. | |
11339 | ac_prog=ld | |
11340 | ;; | |
11341 | *) | |
11342 | # If it is relative, then search for the first ld in PATH. | |
11343 | with_gnu_ld=unknown | |
11344 | ;; | |
11345 | esac | |
11346 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
11347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
11348 | $as_echo_n "checking for GNU ld... " >&6; } | |
da0f6381 | 11349 | else |
5213506e RW |
11350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
11351 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
da0f6381 | 11352 | fi |
5213506e RW |
11353 | if test "${lt_cv_path_LD+set}" = set; then : |
11354 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11355 | else |
11356 | if test -z "$LD"; then | |
11357 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
11358 | for ac_dir in $PATH; do | |
11359 | IFS="$lt_save_ifs" | |
11360 | test -z "$ac_dir" && ac_dir=. | |
11361 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
11362 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
11363 | # Check to see if the program is GNU ld. I'd rather use --version, | |
11364 | # but apparently some variants of GNU ld only accept -v. | |
11365 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
11366 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
11367 | *GNU* | *'with BFD'*) | |
11368 | test "$with_gnu_ld" != no && break | |
11369 | ;; | |
11370 | *) | |
11371 | test "$with_gnu_ld" != yes && break | |
11372 | ;; | |
11373 | esac | |
11374 | fi | |
11375 | done | |
11376 | IFS="$lt_save_ifs" | |
11377 | else | |
11378 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
11379 | fi | |
11380 | fi | |
11381 | ||
11382 | LD="$lt_cv_path_LD" | |
11383 | if test -n "$LD"; then | |
5213506e RW |
11384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
11385 | $as_echo "$LD" >&6; } | |
da0f6381 | 11386 | else |
5213506e RW |
11387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11388 | $as_echo "no" >&6; } | |
da0f6381 | 11389 | fi |
5213506e RW |
11390 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
11391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
11392 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
11393 | if test "${lt_cv_prog_gnu_ld+set}" = set; then : | |
11394 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11395 | else |
11396 | # I'd rather use --version here, but apparently some GNU lds only accept -v. | |
11397 | case `$LD -v 2>&1 </dev/null` in | |
11398 | *GNU* | *'with BFD'*) | |
11399 | lt_cv_prog_gnu_ld=yes | |
11400 | ;; | |
11401 | *) | |
11402 | lt_cv_prog_gnu_ld=no | |
11403 | ;; | |
11404 | esac | |
11405 | fi | |
5213506e RW |
11406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 |
11407 | $as_echo "$lt_cv_prog_gnu_ld" >&6; } | |
da0f6381 PB |
11408 | with_gnu_ld=$lt_cv_prog_gnu_ld |
11409 | ||
11410 | ||
11411 | ||
11412 | ||
11413 | ||
11414 | ||
11415 | ||
11416 | ||
11417 | ||
5213506e RW |
11418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 |
11419 | $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } | |
11420 | if test "${lt_cv_path_NM+set}" = set; then : | |
11421 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11422 | else |
11423 | if test -n "$NM"; then | |
11424 | # Let the user override the test. | |
11425 | lt_cv_path_NM="$NM" | |
11426 | else | |
11427 | lt_nm_to_check="${ac_tool_prefix}nm" | |
11428 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | |
11429 | lt_nm_to_check="$lt_nm_to_check nm" | |
11430 | fi | |
11431 | for lt_tmp_nm in $lt_nm_to_check; do | |
11432 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
11433 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | |
11434 | IFS="$lt_save_ifs" | |
11435 | test -z "$ac_dir" && ac_dir=. | |
11436 | tmp_nm="$ac_dir/$lt_tmp_nm" | |
11437 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
11438 | # Check to see if the nm accepts a BSD-compat flag. | |
11439 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
11440 | # nm: unknown option "B" ignored | |
11441 | # Tru64's nm complains that /dev/null is an invalid object file | |
11442 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | |
11443 | */dev/null* | *'Invalid file or object type'*) | |
11444 | lt_cv_path_NM="$tmp_nm -B" | |
11445 | break | |
11446 | ;; | |
11447 | *) | |
11448 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
11449 | */dev/null*) | |
11450 | lt_cv_path_NM="$tmp_nm -p" | |
11451 | break | |
11452 | ;; | |
11453 | *) | |
11454 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
11455 | continue # so that we can try to find one that supports BSD flags | |
11456 | ;; | |
11457 | esac | |
11458 | ;; | |
11459 | esac | |
11460 | fi | |
11461 | done | |
11462 | IFS="$lt_save_ifs" | |
11463 | done | |
11464 | : ${lt_cv_path_NM=no} | |
11465 | fi | |
11466 | fi | |
5213506e RW |
11467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 |
11468 | $as_echo "$lt_cv_path_NM" >&6; } | |
da0f6381 PB |
11469 | if test "$lt_cv_path_NM" != "no"; then |
11470 | NM="$lt_cv_path_NM" | |
11471 | else | |
11472 | # Didn't find any BSD compatible name lister, look for dumpbin. | |
43e02a8a RW |
11473 | if test -n "$DUMPBIN"; then : |
11474 | # Let the user override the test. | |
11475 | else | |
11476 | if test -n "$ac_tool_prefix"; then | |
11477 | for ac_prog in dumpbin "link -dump" | |
da0f6381 PB |
11478 | do |
11479 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
11480 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
5213506e RW |
11481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11482 | $as_echo_n "checking for $ac_word... " >&6; } | |
11483 | if test "${ac_cv_prog_DUMPBIN+set}" = set; then : | |
11484 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11485 | else |
11486 | if test -n "$DUMPBIN"; then | |
11487 | ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. | |
11488 | else | |
11489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11490 | for as_dir in $PATH | |
11491 | do | |
11492 | IFS=$as_save_IFS | |
11493 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11494 | for ac_exec_ext in '' $ac_executable_extensions; do |
11495 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 11496 | ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" |
5213506e | 11497 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
11498 | break 2 |
11499 | fi | |
11500 | done | |
5213506e RW |
11501 | done |
11502 | IFS=$as_save_IFS | |
da0f6381 PB |
11503 | |
11504 | fi | |
11505 | fi | |
11506 | DUMPBIN=$ac_cv_prog_DUMPBIN | |
11507 | if test -n "$DUMPBIN"; then | |
5213506e RW |
11508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 |
11509 | $as_echo "$DUMPBIN" >&6; } | |
da0f6381 | 11510 | else |
5213506e RW |
11511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11512 | $as_echo "no" >&6; } | |
da0f6381 PB |
11513 | fi |
11514 | ||
5213506e | 11515 | |
da0f6381 PB |
11516 | test -n "$DUMPBIN" && break |
11517 | done | |
11518 | fi | |
11519 | if test -z "$DUMPBIN"; then | |
11520 | ac_ct_DUMPBIN=$DUMPBIN | |
43e02a8a | 11521 | for ac_prog in dumpbin "link -dump" |
da0f6381 PB |
11522 | do |
11523 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
11524 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
11525 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11526 | $as_echo_n "checking for $ac_word... " >&6; } | |
11527 | if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : | |
11528 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11529 | else |
11530 | if test -n "$ac_ct_DUMPBIN"; then | |
11531 | ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. | |
11532 | else | |
11533 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11534 | for as_dir in $PATH | |
11535 | do | |
11536 | IFS=$as_save_IFS | |
11537 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11538 | for ac_exec_ext in '' $ac_executable_extensions; do |
11539 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 11540 | ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" |
5213506e | 11541 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
11542 | break 2 |
11543 | fi | |
11544 | done | |
5213506e RW |
11545 | done |
11546 | IFS=$as_save_IFS | |
da0f6381 PB |
11547 | |
11548 | fi | |
11549 | fi | |
11550 | ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN | |
11551 | if test -n "$ac_ct_DUMPBIN"; then | |
5213506e RW |
11552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 |
11553 | $as_echo "$ac_ct_DUMPBIN" >&6; } | |
da0f6381 | 11554 | else |
5213506e RW |
11555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11556 | $as_echo "no" >&6; } | |
da0f6381 PB |
11557 | fi |
11558 | ||
5213506e | 11559 | |
da0f6381 PB |
11560 | test -n "$ac_ct_DUMPBIN" && break |
11561 | done | |
da0f6381 | 11562 | |
5213506e RW |
11563 | if test "x$ac_ct_DUMPBIN" = x; then |
11564 | DUMPBIN=":" | |
11565 | else | |
11566 | case $cross_compiling:$ac_tool_warned in | |
11567 | yes:) | |
11568 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
11569 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
11570 | ac_tool_warned=yes ;; | |
11571 | esac | |
11572 | DUMPBIN=$ac_ct_DUMPBIN | |
11573 | fi | |
da0f6381 PB |
11574 | fi |
11575 | ||
43e02a8a RW |
11576 | case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in |
11577 | *COFF*) | |
11578 | DUMPBIN="$DUMPBIN -symbols" | |
11579 | ;; | |
11580 | *) | |
11581 | DUMPBIN=: | |
11582 | ;; | |
11583 | esac | |
11584 | fi | |
da0f6381 PB |
11585 | |
11586 | if test "$DUMPBIN" != ":"; then | |
11587 | NM="$DUMPBIN" | |
11588 | fi | |
11589 | fi | |
11590 | test -z "$NM" && NM=nm | |
11591 | ||
11592 | ||
11593 | ||
11594 | ||
11595 | ||
11596 | ||
5213506e RW |
11597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 |
11598 | $as_echo_n "checking the name lister ($NM) interface... " >&6; } | |
11599 | if test "${lt_cv_nm_interface+set}" = set; then : | |
11600 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11601 | else |
11602 | lt_cv_nm_interface="BSD nm" | |
11603 | echo "int some_variable = 0;" > conftest.$ac_ext | |
43e02a8a | 11604 | (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) |
da0f6381 PB |
11605 | (eval "$ac_compile" 2>conftest.err) |
11606 | cat conftest.err >&5 | |
43e02a8a | 11607 | (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
da0f6381 PB |
11608 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
11609 | cat conftest.err >&5 | |
43e02a8a | 11610 | (eval echo "\"\$as_me:$LINENO: output\"" >&5) |
da0f6381 PB |
11611 | cat conftest.out >&5 |
11612 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then | |
11613 | lt_cv_nm_interface="MS dumpbin" | |
11614 | fi | |
11615 | rm -f conftest* | |
11616 | fi | |
5213506e RW |
11617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 |
11618 | $as_echo "$lt_cv_nm_interface" >&6; } | |
da0f6381 | 11619 | |
5213506e RW |
11620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
11621 | $as_echo_n "checking whether ln -s works... " >&6; } | |
da0f6381 PB |
11622 | LN_S=$as_ln_s |
11623 | if test "$LN_S" = "ln -s"; then | |
5213506e RW |
11624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11625 | $as_echo "yes" >&6; } | |
da0f6381 | 11626 | else |
5213506e RW |
11627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
11628 | $as_echo "no, using $LN_S" >&6; } | |
da0f6381 PB |
11629 | fi |
11630 | ||
11631 | # find the maximum length of command line arguments | |
5213506e RW |
11632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 |
11633 | $as_echo_n "checking the maximum length of command line arguments... " >&6; } | |
11634 | if test "${lt_cv_sys_max_cmd_len+set}" = set; then : | |
11635 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11636 | else |
11637 | i=0 | |
11638 | teststring="ABCD" | |
11639 | ||
11640 | case $build_os in | |
11641 | msdosdjgpp*) | |
11642 | # On DJGPP, this test can blow up pretty badly due to problems in libc | |
11643 | # (any single argument exceeding 2000 bytes causes a buffer overrun | |
11644 | # during glob expansion). Even if it were fixed, the result of this | |
11645 | # check would be larger than it should be. | |
11646 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
11647 | ;; | |
11648 | ||
11649 | gnu*) | |
11650 | # Under GNU Hurd, this test is not required because there is | |
11651 | # no limit to the length of command line arguments. | |
11652 | # Libtool will interpret -1 as no limit whatsoever | |
11653 | lt_cv_sys_max_cmd_len=-1; | |
11654 | ;; | |
11655 | ||
5d47bb02 | 11656 | cygwin* | mingw* | cegcc*) |
da0f6381 PB |
11657 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
11658 | # about 5 minutes as the teststring grows exponentially. | |
11659 | # Worse, since 9x/ME are not pre-emptively multitasking, | |
11660 | # you end up with a "frozen" computer, even though with patience | |
11661 | # the test eventually succeeds (with a max line length of 256k). | |
11662 | # Instead, let's just punt: use the minimum linelength reported by | |
11663 | # all of the supported platforms: 8192 (on NT/2K/XP). | |
11664 | lt_cv_sys_max_cmd_len=8192; | |
11665 | ;; | |
11666 | ||
43e02a8a RW |
11667 | mint*) |
11668 | # On MiNT this can take a long time and run out of memory. | |
11669 | lt_cv_sys_max_cmd_len=8192; | |
11670 | ;; | |
11671 | ||
da0f6381 PB |
11672 | amigaos*) |
11673 | # On AmigaOS with pdksh, this test takes hours, literally. | |
11674 | # So we just punt and use a minimum line length of 8192. | |
11675 | lt_cv_sys_max_cmd_len=8192; | |
11676 | ;; | |
11677 | ||
11678 | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) | |
11679 | # This has been around since 386BSD, at least. Likely further. | |
11680 | if test -x /sbin/sysctl; then | |
11681 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | |
11682 | elif test -x /usr/sbin/sysctl; then | |
11683 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | |
11684 | else | |
11685 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | |
11686 | fi | |
11687 | # And add a safety zone | |
11688 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
11689 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
11690 | ;; | |
11691 | ||
11692 | interix*) | |
11693 | # We know the value 262144 and hardcode it with a safety zone (like BSD) | |
11694 | lt_cv_sys_max_cmd_len=196608 | |
11695 | ;; | |
11696 | ||
11697 | osf*) | |
11698 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | |
11699 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | |
11700 | # nice to cause kernel panics so lets avoid the loop below. | |
11701 | # First set a reasonable default. | |
11702 | lt_cv_sys_max_cmd_len=16384 | |
11703 | # | |
11704 | if test -x /sbin/sysconfig; then | |
11705 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | |
11706 | *1*) lt_cv_sys_max_cmd_len=-1 ;; | |
11707 | esac | |
11708 | fi | |
11709 | ;; | |
11710 | sco3.2v5*) | |
11711 | lt_cv_sys_max_cmd_len=102400 | |
11712 | ;; | |
11713 | sysv5* | sco5v6* | sysv4.2uw2*) | |
11714 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | |
11715 | if test -n "$kargmax"; then | |
11716 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` | |
11717 | else | |
11718 | lt_cv_sys_max_cmd_len=32768 | |
11719 | fi | |
11720 | ;; | |
11721 | *) | |
5d47bb02 PG |
11722 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` |
11723 | if test -n "$lt_cv_sys_max_cmd_len"; then | |
da0f6381 PB |
11724 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
11725 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
11726 | else | |
11727 | # Make teststring a little bigger before we do anything with it. | |
11728 | # a 1K string should be a reasonable start. | |
11729 | for i in 1 2 3 4 5 6 7 8 ; do | |
11730 | teststring=$teststring$teststring | |
11731 | done | |
11732 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | |
11733 | # If test is not a shell built-in, we'll probably end up computing a | |
11734 | # maximum length that is only half of the actual maximum length, but | |
11735 | # we can't tell. | |
43e02a8a RW |
11736 | while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ |
11737 | = "X$teststring$teststring"; } >/dev/null 2>&1 && | |
da0f6381 PB |
11738 | test $i != 17 # 1/2 MB should be enough |
11739 | do | |
11740 | i=`expr $i + 1` | |
11741 | teststring=$teststring$teststring | |
11742 | done | |
11743 | # Only check the string length outside the loop. | |
11744 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | |
11745 | teststring= | |
11746 | # Add a significant safety factor because C++ compilers can tack on | |
11747 | # massive amounts of additional arguments before passing them to the | |
11748 | # linker. It appears as though 1/2 is a usable value. | |
11749 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
11750 | fi | |
11751 | ;; | |
11752 | esac | |
11753 | ||
11754 | fi | |
11755 | ||
11756 | if test -n $lt_cv_sys_max_cmd_len ; then | |
5213506e RW |
11757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 |
11758 | $as_echo "$lt_cv_sys_max_cmd_len" >&6; } | |
da0f6381 | 11759 | else |
5213506e RW |
11760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
11761 | $as_echo "none" >&6; } | |
da0f6381 PB |
11762 | fi |
11763 | max_cmd_len=$lt_cv_sys_max_cmd_len | |
11764 | ||
11765 | ||
11766 | ||
11767 | ||
11768 | ||
11769 | ||
da0f6381 PB |
11770 | : ${CP="cp -f"} |
11771 | : ${MV="mv -f"} | |
11772 | : ${RM="rm -f"} | |
11773 | ||
5213506e RW |
11774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 |
11775 | $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } | |
da0f6381 PB |
11776 | # Try some XSI features |
11777 | xsi_shell=no | |
11778 | ( _lt_dummy="a/b/c" | |
11779 | test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | |
5d47bb02 PG |
11780 | = c,a/b,, \ |
11781 | && eval 'test $(( 1 + 1 )) -eq 2 \ | |
11782 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | |
da0f6381 | 11783 | && xsi_shell=yes |
5213506e RW |
11784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 |
11785 | $as_echo "$xsi_shell" >&6; } | |
da0f6381 PB |
11786 | |
11787 | ||
5213506e RW |
11788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 |
11789 | $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } | |
da0f6381 PB |
11790 | lt_shell_append=no |
11791 | ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ | |
11792 | >/dev/null 2>&1 \ | |
11793 | && lt_shell_append=yes | |
5213506e RW |
11794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 |
11795 | $as_echo "$lt_shell_append" >&6; } | |
da0f6381 PB |
11796 | |
11797 | ||
11798 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
11799 | lt_unset=unset | |
11800 | else | |
11801 | lt_unset=false | |
11802 | fi | |
11803 | ||
11804 | ||
11805 | ||
11806 | ||
11807 | ||
11808 | # test EBCDIC or ASCII | |
11809 | case `echo X|tr X '\101'` in | |
11810 | A) # ASCII based system | |
11811 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | |
11812 | lt_SP2NL='tr \040 \012' | |
11813 | lt_NL2SP='tr \015\012 \040\040' | |
11814 | ;; | |
11815 | *) # EBCDIC based system | |
11816 | lt_SP2NL='tr \100 \n' | |
11817 | lt_NL2SP='tr \r\n \100\100' | |
11818 | ;; | |
11819 | esac | |
11820 | ||
11821 | ||
11822 | ||
11823 | ||
11824 | ||
11825 | ||
11826 | ||
11827 | ||
11828 | ||
5213506e RW |
11829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 |
11830 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | |
11831 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | |
11832 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11833 | else |
11834 | lt_cv_ld_reload_flag='-r' | |
11835 | fi | |
5213506e RW |
11836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 |
11837 | $as_echo "$lt_cv_ld_reload_flag" >&6; } | |
da0f6381 PB |
11838 | reload_flag=$lt_cv_ld_reload_flag |
11839 | case $reload_flag in | |
11840 | "" | " "*) ;; | |
11841 | *) reload_flag=" $reload_flag" ;; | |
11842 | esac | |
11843 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
11844 | case $host_os in | |
11845 | darwin*) | |
11846 | if test "$GCC" = yes; then | |
11847 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | |
11848 | else | |
11849 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
11850 | fi | |
11851 | ;; | |
11852 | esac | |
11853 | ||
11854 | ||
11855 | ||
11856 | ||
11857 | ||
11858 | ||
11859 | ||
11860 | ||
11861 | ||
5d47bb02 PG |
11862 | if test -n "$ac_tool_prefix"; then |
11863 | # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. | |
11864 | set dummy ${ac_tool_prefix}objdump; ac_word=$2 | |
5213506e RW |
11865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11866 | $as_echo_n "checking for $ac_word... " >&6; } | |
11867 | if test "${ac_cv_prog_OBJDUMP+set}" = set; then : | |
11868 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
11869 | else |
11870 | if test -n "$OBJDUMP"; then | |
11871 | ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. | |
11872 | else | |
11873 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11874 | for as_dir in $PATH | |
11875 | do | |
11876 | IFS=$as_save_IFS | |
11877 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11878 | for ac_exec_ext in '' $ac_executable_extensions; do |
11879 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 11880 | ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" |
5213506e | 11881 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
11882 | break 2 |
11883 | fi | |
11884 | done | |
5213506e RW |
11885 | done |
11886 | IFS=$as_save_IFS | |
5d47bb02 PG |
11887 | |
11888 | fi | |
11889 | fi | |
11890 | OBJDUMP=$ac_cv_prog_OBJDUMP | |
11891 | if test -n "$OBJDUMP"; then | |
5213506e RW |
11892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 |
11893 | $as_echo "$OBJDUMP" >&6; } | |
5d47bb02 | 11894 | else |
5213506e RW |
11895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11896 | $as_echo "no" >&6; } | |
5d47bb02 PG |
11897 | fi |
11898 | ||
5213506e | 11899 | |
5d47bb02 PG |
11900 | fi |
11901 | if test -z "$ac_cv_prog_OBJDUMP"; then | |
11902 | ac_ct_OBJDUMP=$OBJDUMP | |
11903 | # Extract the first word of "objdump", so it can be a program name with args. | |
11904 | set dummy objdump; ac_word=$2 | |
5213506e RW |
11905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11906 | $as_echo_n "checking for $ac_word... " >&6; } | |
11907 | if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : | |
11908 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
11909 | else |
11910 | if test -n "$ac_ct_OBJDUMP"; then | |
11911 | ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. | |
11912 | else | |
11913 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11914 | for as_dir in $PATH | |
11915 | do | |
11916 | IFS=$as_save_IFS | |
11917 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11918 | for ac_exec_ext in '' $ac_executable_extensions; do |
11919 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 11920 | ac_cv_prog_ac_ct_OBJDUMP="objdump" |
5213506e | 11921 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
11922 | break 2 |
11923 | fi | |
11924 | done | |
5213506e RW |
11925 | done |
11926 | IFS=$as_save_IFS | |
5d47bb02 | 11927 | |
5d47bb02 PG |
11928 | fi |
11929 | fi | |
11930 | ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP | |
11931 | if test -n "$ac_ct_OBJDUMP"; then | |
5213506e RW |
11932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 |
11933 | $as_echo "$ac_ct_OBJDUMP" >&6; } | |
5d47bb02 | 11934 | else |
5213506e RW |
11935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11936 | $as_echo "no" >&6; } | |
5d47bb02 PG |
11937 | fi |
11938 | ||
5213506e RW |
11939 | if test "x$ac_ct_OBJDUMP" = x; then |
11940 | OBJDUMP="false" | |
11941 | else | |
11942 | case $cross_compiling:$ac_tool_warned in | |
11943 | yes:) | |
11944 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
11945 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
11946 | ac_tool_warned=yes ;; | |
11947 | esac | |
11948 | OBJDUMP=$ac_ct_OBJDUMP | |
11949 | fi | |
5d47bb02 PG |
11950 | else |
11951 | OBJDUMP="$ac_cv_prog_OBJDUMP" | |
11952 | fi | |
11953 | ||
11954 | test -z "$OBJDUMP" && OBJDUMP=objdump | |
11955 | ||
11956 | ||
11957 | ||
11958 | ||
11959 | ||
11960 | ||
11961 | ||
11962 | ||
da0f6381 | 11963 | |
5213506e RW |
11964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 |
11965 | $as_echo_n "checking how to recognize dependent libraries... " >&6; } | |
11966 | if test "${lt_cv_deplibs_check_method+set}" = set; then : | |
11967 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11968 | else |
11969 | lt_cv_file_magic_cmd='$MAGIC_CMD' | |
11970 | lt_cv_file_magic_test_file= | |
11971 | lt_cv_deplibs_check_method='unknown' | |
11972 | # Need to set the preceding variable on all platforms that support | |
11973 | # interlibrary dependencies. | |
11974 | # 'none' -- dependencies not supported. | |
11975 | # `unknown' -- same as none, but documents that we really don't know. | |
11976 | # 'pass_all' -- all dependencies passed with no checks. | |
11977 | # 'test_compile' -- check by making test program. | |
11978 | # 'file_magic [[regex]]' -- check by looking for files in library path | |
11979 | # which responds to the $file_magic_cmd with a given extended regex. | |
11980 | # If you have `file' or equivalent on your system and you're not sure | |
11981 | # whether `pass_all' will *always* work, you probably want this one. | |
11982 | ||
11983 | case $host_os in | |
11984 | aix[4-9]*) | |
11985 | lt_cv_deplibs_check_method=pass_all | |
11986 | ;; | |
11987 | ||
11988 | beos*) | |
11989 | lt_cv_deplibs_check_method=pass_all | |
11990 | ;; | |
11991 | ||
11992 | bsdi[45]*) | |
11993 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' | |
11994 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
11995 | lt_cv_file_magic_test_file=/shlib/libc.so | |
11996 | ;; | |
11997 | ||
11998 | cygwin*) | |
11999 | # func_win32_libid is a shell function defined in ltmain.sh | |
12000 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
12001 | lt_cv_file_magic_cmd='func_win32_libid' | |
12002 | ;; | |
12003 | ||
12004 | mingw* | pw32*) | |
12005 | # Base MSYS/MinGW do not provide the 'file' command needed by | |
12006 | # func_win32_libid shell function, so use a weaker test based on 'objdump', | |
12007 | # unless we find 'file', for example because we are cross-compiling. | |
43e02a8a RW |
12008 | # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. |
12009 | if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then | |
da0f6381 PB |
12010 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
12011 | lt_cv_file_magic_cmd='func_win32_libid' | |
12012 | else | |
12013 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
12014 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
12015 | fi | |
12016 | ;; | |
12017 | ||
43e02a8a | 12018 | cegcc*) |
5d47bb02 PG |
12019 | # use the weaker test based on 'objdump'. See mingw*. |
12020 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | |
12021 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
12022 | ;; | |
12023 | ||
da0f6381 PB |
12024 | darwin* | rhapsody*) |
12025 | lt_cv_deplibs_check_method=pass_all | |
12026 | ;; | |
12027 | ||
12028 | freebsd* | dragonfly*) | |
12029 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
12030 | case $host_cpu in | |
12031 | i*86 ) | |
12032 | # Not sure whether the presence of OpenBSD here was a mistake. | |
12033 | # Let's accept both of them until this is cleared up. | |
12034 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' | |
12035 | lt_cv_file_magic_cmd=/usr/bin/file | |
12036 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
12037 | ;; | |
12038 | esac | |
12039 | else | |
12040 | lt_cv_deplibs_check_method=pass_all | |
12041 | fi | |
12042 | ;; | |
12043 | ||
12044 | gnu*) | |
12045 | lt_cv_deplibs_check_method=pass_all | |
12046 | ;; | |
12047 | ||
43e02a8a RW |
12048 | haiku*) |
12049 | lt_cv_deplibs_check_method=pass_all | |
12050 | ;; | |
12051 | ||
da0f6381 PB |
12052 | hpux10.20* | hpux11*) |
12053 | lt_cv_file_magic_cmd=/usr/bin/file | |
12054 | case $host_cpu in | |
12055 | ia64*) | |
12056 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' | |
12057 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
12058 | ;; | |
12059 | hppa*64*) | |
43e02a8a | 12060 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' |
da0f6381 PB |
12061 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
12062 | ;; | |
12063 | *) | |
43e02a8a | 12064 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' |
da0f6381 PB |
12065 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
12066 | ;; | |
12067 | esac | |
12068 | ;; | |
12069 | ||
12070 | interix[3-9]*) | |
12071 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | |
12072 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' | |
12073 | ;; | |
12074 | ||
12075 | irix5* | irix6* | nonstopux*) | |
12076 | case $LD in | |
12077 | *-32|*"-32 ") libmagic=32-bit;; | |
12078 | *-n32|*"-n32 ") libmagic=N32;; | |
12079 | *-64|*"-64 ") libmagic=64-bit;; | |
12080 | *) libmagic=never-match;; | |
12081 | esac | |
12082 | lt_cv_deplibs_check_method=pass_all | |
12083 | ;; | |
12084 | ||
12085 | # This must be Linux ELF. | |
7a9d3fe8 | 12086 | linux* | k*bsd*-gnu | kopensolaris*-gnu) |
da0f6381 PB |
12087 | lt_cv_deplibs_check_method=pass_all |
12088 | ;; | |
12089 | ||
12090 | netbsd*) | |
12091 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
12092 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | |
12093 | else | |
12094 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' | |
12095 | fi | |
12096 | ;; | |
12097 | ||
12098 | newos6*) | |
12099 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' | |
12100 | lt_cv_file_magic_cmd=/usr/bin/file | |
12101 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
12102 | ;; | |
12103 | ||
12104 | *nto* | *qnx*) | |
12105 | lt_cv_deplibs_check_method=pass_all | |
12106 | ;; | |
12107 | ||
12108 | openbsd*) | |
12109 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
12110 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' | |
12111 | else | |
12112 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | |
12113 | fi | |
12114 | ;; | |
12115 | ||
12116 | osf3* | osf4* | osf5*) | |
12117 | lt_cv_deplibs_check_method=pass_all | |
12118 | ;; | |
12119 | ||
12120 | rdos*) | |
12121 | lt_cv_deplibs_check_method=pass_all | |
12122 | ;; | |
12123 | ||
12124 | solaris*) | |
12125 | lt_cv_deplibs_check_method=pass_all | |
12126 | ;; | |
12127 | ||
12128 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
12129 | lt_cv_deplibs_check_method=pass_all | |
12130 | ;; | |
12131 | ||
12132 | sysv4 | sysv4.3*) | |
12133 | case $host_vendor in | |
12134 | motorola) | |
12135 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' | |
12136 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
12137 | ;; | |
12138 | ncr) | |
12139 | lt_cv_deplibs_check_method=pass_all | |
12140 | ;; | |
12141 | sequent) | |
12142 | lt_cv_file_magic_cmd='/bin/file' | |
12143 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' | |
12144 | ;; | |
12145 | sni) | |
12146 | lt_cv_file_magic_cmd='/bin/file' | |
12147 | lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" | |
12148 | lt_cv_file_magic_test_file=/lib/libc.so | |
12149 | ;; | |
12150 | siemens) | |
12151 | lt_cv_deplibs_check_method=pass_all | |
12152 | ;; | |
12153 | pc) | |
12154 | lt_cv_deplibs_check_method=pass_all | |
12155 | ;; | |
12156 | esac | |
12157 | ;; | |
12158 | ||
12159 | tpf*) | |
12160 | lt_cv_deplibs_check_method=pass_all | |
12161 | ;; | |
12162 | esac | |
12163 | ||
12164 | fi | |
5213506e RW |
12165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 |
12166 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | |
da0f6381 PB |
12167 | file_magic_cmd=$lt_cv_file_magic_cmd |
12168 | deplibs_check_method=$lt_cv_deplibs_check_method | |
12169 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
12170 | ||
12171 | ||
12172 | ||
12173 | ||
12174 | ||
12175 | ||
12176 | ||
12177 | ||
12178 | ||
12179 | ||
12180 | ||
12181 | ||
12182 | if test -n "$ac_tool_prefix"; then | |
12183 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
12184 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
5213506e RW |
12185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12186 | $as_echo_n "checking for $ac_word... " >&6; } | |
12187 | if test "${ac_cv_prog_AR+set}" = set; then : | |
12188 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12189 | else |
12190 | if test -n "$AR"; then | |
12191 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
12192 | else | |
12193 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12194 | for as_dir in $PATH | |
12195 | do | |
12196 | IFS=$as_save_IFS | |
12197 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12198 | for ac_exec_ext in '' $ac_executable_extensions; do |
12199 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12200 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
5213506e | 12201 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12202 | break 2 |
12203 | fi | |
12204 | done | |
5213506e RW |
12205 | done |
12206 | IFS=$as_save_IFS | |
da0f6381 PB |
12207 | |
12208 | fi | |
12209 | fi | |
12210 | AR=$ac_cv_prog_AR | |
12211 | if test -n "$AR"; then | |
5213506e RW |
12212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
12213 | $as_echo "$AR" >&6; } | |
da0f6381 | 12214 | else |
5213506e RW |
12215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12216 | $as_echo "no" >&6; } | |
da0f6381 PB |
12217 | fi |
12218 | ||
5213506e | 12219 | |
da0f6381 PB |
12220 | fi |
12221 | if test -z "$ac_cv_prog_AR"; then | |
12222 | ac_ct_AR=$AR | |
12223 | # Extract the first word of "ar", so it can be a program name with args. | |
12224 | set dummy ar; ac_word=$2 | |
5213506e RW |
12225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12226 | $as_echo_n "checking for $ac_word... " >&6; } | |
12227 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
12228 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12229 | else |
12230 | if test -n "$ac_ct_AR"; then | |
12231 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
12232 | else | |
12233 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12234 | for as_dir in $PATH | |
12235 | do | |
12236 | IFS=$as_save_IFS | |
12237 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12238 | for ac_exec_ext in '' $ac_executable_extensions; do |
12239 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12240 | ac_cv_prog_ac_ct_AR="ar" |
5213506e | 12241 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12242 | break 2 |
12243 | fi | |
12244 | done | |
5213506e RW |
12245 | done |
12246 | IFS=$as_save_IFS | |
da0f6381 | 12247 | |
da0f6381 PB |
12248 | fi |
12249 | fi | |
12250 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
12251 | if test -n "$ac_ct_AR"; then | |
5213506e RW |
12252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
12253 | $as_echo "$ac_ct_AR" >&6; } | |
da0f6381 | 12254 | else |
5213506e RW |
12255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12256 | $as_echo "no" >&6; } | |
da0f6381 PB |
12257 | fi |
12258 | ||
5213506e RW |
12259 | if test "x$ac_ct_AR" = x; then |
12260 | AR="false" | |
12261 | else | |
12262 | case $cross_compiling:$ac_tool_warned in | |
12263 | yes:) | |
12264 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12265 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12266 | ac_tool_warned=yes ;; | |
12267 | esac | |
12268 | AR=$ac_ct_AR | |
12269 | fi | |
da0f6381 PB |
12270 | else |
12271 | AR="$ac_cv_prog_AR" | |
12272 | fi | |
12273 | ||
12274 | test -z "$AR" && AR=ar | |
12275 | test -z "$AR_FLAGS" && AR_FLAGS=cru | |
12276 | ||
12277 | ||
12278 | ||
12279 | ||
12280 | ||
12281 | ||
12282 | ||
12283 | ||
12284 | ||
12285 | ||
12286 | ||
12287 | if test -n "$ac_tool_prefix"; then | |
12288 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
12289 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5213506e RW |
12290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12291 | $as_echo_n "checking for $ac_word... " >&6; } | |
12292 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
12293 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12294 | else |
12295 | if test -n "$STRIP"; then | |
12296 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
12297 | else | |
12298 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12299 | for as_dir in $PATH | |
12300 | do | |
12301 | IFS=$as_save_IFS | |
12302 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12303 | for ac_exec_ext in '' $ac_executable_extensions; do |
12304 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12305 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5213506e | 12306 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12307 | break 2 |
12308 | fi | |
12309 | done | |
5213506e RW |
12310 | done |
12311 | IFS=$as_save_IFS | |
da0f6381 PB |
12312 | |
12313 | fi | |
12314 | fi | |
12315 | STRIP=$ac_cv_prog_STRIP | |
12316 | if test -n "$STRIP"; then | |
5213506e RW |
12317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 |
12318 | $as_echo "$STRIP" >&6; } | |
da0f6381 | 12319 | else |
5213506e RW |
12320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12321 | $as_echo "no" >&6; } | |
da0f6381 PB |
12322 | fi |
12323 | ||
5213506e | 12324 | |
da0f6381 PB |
12325 | fi |
12326 | if test -z "$ac_cv_prog_STRIP"; then | |
12327 | ac_ct_STRIP=$STRIP | |
12328 | # Extract the first word of "strip", so it can be a program name with args. | |
12329 | set dummy strip; ac_word=$2 | |
5213506e RW |
12330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12331 | $as_echo_n "checking for $ac_word... " >&6; } | |
12332 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
12333 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12334 | else |
12335 | if test -n "$ac_ct_STRIP"; then | |
12336 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
12337 | else | |
12338 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12339 | for as_dir in $PATH | |
12340 | do | |
12341 | IFS=$as_save_IFS | |
12342 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12343 | for ac_exec_ext in '' $ac_executable_extensions; do |
12344 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12345 | ac_cv_prog_ac_ct_STRIP="strip" |
5213506e | 12346 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12347 | break 2 |
12348 | fi | |
12349 | done | |
5213506e RW |
12350 | done |
12351 | IFS=$as_save_IFS | |
da0f6381 | 12352 | |
da0f6381 PB |
12353 | fi |
12354 | fi | |
12355 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
12356 | if test -n "$ac_ct_STRIP"; then | |
5213506e RW |
12357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 |
12358 | $as_echo "$ac_ct_STRIP" >&6; } | |
da0f6381 | 12359 | else |
5213506e RW |
12360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12361 | $as_echo "no" >&6; } | |
da0f6381 PB |
12362 | fi |
12363 | ||
5213506e RW |
12364 | if test "x$ac_ct_STRIP" = x; then |
12365 | STRIP=":" | |
12366 | else | |
12367 | case $cross_compiling:$ac_tool_warned in | |
12368 | yes:) | |
12369 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12370 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12371 | ac_tool_warned=yes ;; | |
12372 | esac | |
12373 | STRIP=$ac_ct_STRIP | |
12374 | fi | |
da0f6381 PB |
12375 | else |
12376 | STRIP="$ac_cv_prog_STRIP" | |
12377 | fi | |
12378 | ||
12379 | test -z "$STRIP" && STRIP=: | |
12380 | ||
12381 | ||
12382 | ||
12383 | ||
12384 | ||
12385 | ||
12386 | if test -n "$ac_tool_prefix"; then | |
12387 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
12388 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5213506e RW |
12389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12390 | $as_echo_n "checking for $ac_word... " >&6; } | |
12391 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
12392 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12393 | else |
12394 | if test -n "$RANLIB"; then | |
12395 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
12396 | else | |
12397 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12398 | for as_dir in $PATH | |
12399 | do | |
12400 | IFS=$as_save_IFS | |
12401 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12402 | for ac_exec_ext in '' $ac_executable_extensions; do |
12403 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12404 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5213506e | 12405 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12406 | break 2 |
12407 | fi | |
12408 | done | |
5213506e RW |
12409 | done |
12410 | IFS=$as_save_IFS | |
da0f6381 PB |
12411 | |
12412 | fi | |
12413 | fi | |
12414 | RANLIB=$ac_cv_prog_RANLIB | |
12415 | if test -n "$RANLIB"; then | |
5213506e RW |
12416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
12417 | $as_echo "$RANLIB" >&6; } | |
da0f6381 | 12418 | else |
5213506e RW |
12419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12420 | $as_echo "no" >&6; } | |
da0f6381 PB |
12421 | fi |
12422 | ||
5213506e | 12423 | |
da0f6381 PB |
12424 | fi |
12425 | if test -z "$ac_cv_prog_RANLIB"; then | |
12426 | ac_ct_RANLIB=$RANLIB | |
12427 | # Extract the first word of "ranlib", so it can be a program name with args. | |
12428 | set dummy ranlib; ac_word=$2 | |
5213506e RW |
12429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12430 | $as_echo_n "checking for $ac_word... " >&6; } | |
12431 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
12432 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12433 | else |
12434 | if test -n "$ac_ct_RANLIB"; then | |
12435 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
12436 | else | |
12437 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12438 | for as_dir in $PATH | |
12439 | do | |
12440 | IFS=$as_save_IFS | |
12441 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12442 | for ac_exec_ext in '' $ac_executable_extensions; do |
12443 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12444 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
5213506e | 12445 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12446 | break 2 |
12447 | fi | |
12448 | done | |
5213506e RW |
12449 | done |
12450 | IFS=$as_save_IFS | |
da0f6381 | 12451 | |
da0f6381 PB |
12452 | fi |
12453 | fi | |
12454 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
12455 | if test -n "$ac_ct_RANLIB"; then | |
5213506e RW |
12456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
12457 | $as_echo "$ac_ct_RANLIB" >&6; } | |
da0f6381 | 12458 | else |
5213506e RW |
12459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12460 | $as_echo "no" >&6; } | |
da0f6381 PB |
12461 | fi |
12462 | ||
5213506e RW |
12463 | if test "x$ac_ct_RANLIB" = x; then |
12464 | RANLIB=":" | |
12465 | else | |
12466 | case $cross_compiling:$ac_tool_warned in | |
12467 | yes:) | |
12468 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12469 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12470 | ac_tool_warned=yes ;; | |
12471 | esac | |
12472 | RANLIB=$ac_ct_RANLIB | |
12473 | fi | |
da0f6381 PB |
12474 | else |
12475 | RANLIB="$ac_cv_prog_RANLIB" | |
12476 | fi | |
12477 | ||
12478 | test -z "$RANLIB" && RANLIB=: | |
12479 | ||
12480 | ||
12481 | ||
12482 | ||
12483 | ||
12484 | ||
12485 | # Determine commands to create old-style static archives. | |
5d47bb02 | 12486 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' |
da0f6381 PB |
12487 | old_postinstall_cmds='chmod 644 $oldlib' |
12488 | old_postuninstall_cmds= | |
12489 | ||
12490 | if test -n "$RANLIB"; then | |
12491 | case $host_os in | |
12492 | openbsd*) | |
12493 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" | |
12494 | ;; | |
12495 | *) | |
12496 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" | |
12497 | ;; | |
12498 | esac | |
12499 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
12500 | fi | |
12501 | ||
43e02a8a RW |
12502 | case $host_os in |
12503 | darwin*) | |
12504 | lock_old_archive_extraction=yes ;; | |
12505 | *) | |
12506 | lock_old_archive_extraction=no ;; | |
12507 | esac | |
12508 | ||
12509 | ||
12510 | ||
12511 | ||
12512 | ||
12513 | ||
da0f6381 PB |
12514 | |
12515 | ||
12516 | ||
12517 | ||
12518 | ||
12519 | ||
12520 | ||
12521 | ||
12522 | ||
12523 | ||
12524 | ||
12525 | ||
12526 | ||
12527 | ||
12528 | ||
12529 | ||
12530 | ||
12531 | ||
12532 | ||
12533 | ||
12534 | ||
12535 | ||
12536 | ||
12537 | ||
12538 | ||
12539 | ||
12540 | ||
12541 | ||
12542 | ||
12543 | ||
12544 | ||
12545 | ||
12546 | ||
12547 | # If no C compiler was specified, use CC. | |
12548 | LTCC=${LTCC-"$CC"} | |
12549 | ||
12550 | # If no C compiler flags were specified, use CFLAGS. | |
12551 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
12552 | ||
12553 | # Allow CC to be a program name with arguments. | |
12554 | compiler=$CC | |
12555 | ||
12556 | ||
12557 | # Check for command to grab the raw symbol name followed by C symbol from nm. | |
5213506e RW |
12558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 |
12559 | $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } | |
12560 | if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : | |
12561 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12562 | else |
12563 | ||
12564 | # These are sane defaults that work on at least a few old systems. | |
12565 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
12566 | ||
12567 | # Character class describing NM global symbol codes. | |
12568 | symcode='[BCDEGRST]' | |
12569 | ||
12570 | # Regexp to match symbols that can be accessed directly from C. | |
12571 | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' | |
12572 | ||
12573 | # Define system-specific variables. | |
12574 | case $host_os in | |
12575 | aix*) | |
12576 | symcode='[BCDT]' | |
12577 | ;; | |
5d47bb02 | 12578 | cygwin* | mingw* | pw32* | cegcc*) |
da0f6381 PB |
12579 | symcode='[ABCDGISTW]' |
12580 | ;; | |
12581 | hpux*) | |
12582 | if test "$host_cpu" = ia64; then | |
12583 | symcode='[ABCDEGRST]' | |
12584 | fi | |
12585 | ;; | |
12586 | irix* | nonstopux*) | |
12587 | symcode='[BCDEGRST]' | |
12588 | ;; | |
12589 | osf*) | |
12590 | symcode='[BCDEGQRST]' | |
12591 | ;; | |
12592 | solaris*) | |
12593 | symcode='[BDRT]' | |
12594 | ;; | |
12595 | sco3.2v5*) | |
12596 | symcode='[DT]' | |
12597 | ;; | |
12598 | sysv4.2uw2*) | |
12599 | symcode='[DT]' | |
12600 | ;; | |
12601 | sysv5* | sco5v6* | unixware* | OpenUNIX*) | |
12602 | symcode='[ABDT]' | |
12603 | ;; | |
12604 | sysv4) | |
12605 | symcode='[DFNSTU]' | |
12606 | ;; | |
12607 | esac | |
12608 | ||
12609 | # If we're using GNU nm, then use its standard symbol codes. | |
12610 | case `$NM -V 2>&1` in | |
12611 | *GNU* | *'with BFD'*) | |
12612 | symcode='[ABCDGIRSTW]' ;; | |
12613 | esac | |
12614 | ||
12615 | # Transform an extracted symbol line into a proper C declaration. | |
12616 | # Some systems (esp. on ia64) link data and code symbols differently, | |
12617 | # so use this general approach. | |
12618 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
12619 | ||
12620 | # Transform an extracted symbol line into symbol name and symbol address | |
12621 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | |
5d47bb02 | 12622 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" |
da0f6381 PB |
12623 | |
12624 | # Handle CRLF in mingw tool chain | |
12625 | opt_cr= | |
12626 | case $build_os in | |
12627 | mingw*) | |
12628 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
12629 | ;; | |
12630 | esac | |
12631 | ||
12632 | # Try without a prefix underscore, then with it. | |
12633 | for ac_symprfx in "" "_"; do | |
12634 | ||
12635 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | |
12636 | symxfrm="\\1 $ac_symprfx\\2 \\2" | |
12637 | ||
12638 | # Write the raw and C identifiers. | |
12639 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | |
12640 | # Fake it for dumpbin and say T for any non-static function | |
12641 | # and D for any global variable. | |
12642 | # Also find C++ and __fastcall symbols from MSVC++, | |
12643 | # which start with @ or ?. | |
12644 | lt_cv_sys_global_symbol_pipe="$AWK '"\ | |
12645 | " {last_section=section; section=\$ 3};"\ | |
12646 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | |
12647 | " \$ 0!~/External *\|/{next};"\ | |
12648 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | |
12649 | " {if(hide[section]) next};"\ | |
12650 | " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ | |
12651 | " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ | |
12652 | " s[1]~/^[@?]/{print s[1], s[1]; next};"\ | |
12653 | " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ | |
12654 | " ' prfx=^$ac_symprfx" | |
12655 | else | |
12656 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
12657 | fi | |
12658 | ||
12659 | # Check to see that the pipe works correctly. | |
12660 | pipe_works=no | |
12661 | ||
12662 | rm -f conftest* | |
12663 | cat > conftest.$ac_ext <<_LT_EOF | |
12664 | #ifdef __cplusplus | |
12665 | extern "C" { | |
12666 | #endif | |
12667 | char nm_test_var; | |
12668 | void nm_test_func(void); | |
12669 | void nm_test_func(void){} | |
12670 | #ifdef __cplusplus | |
12671 | } | |
12672 | #endif | |
12673 | int main(){nm_test_var='a';nm_test_func();return(0);} | |
12674 | _LT_EOF | |
12675 | ||
5213506e | 12676 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12677 | (eval $ac_compile) 2>&5 |
12678 | ac_status=$? | |
5213506e RW |
12679 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12680 | test $ac_status = 0; }; then | |
da0f6381 PB |
12681 | # Now try to grab the symbols. |
12682 | nlist=conftest.nm | |
43e02a8a RW |
12683 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 |
12684 | (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 | |
da0f6381 | 12685 | ac_status=$? |
5213506e RW |
12686 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12687 | test $ac_status = 0; } && test -s "$nlist"; then | |
da0f6381 PB |
12688 | # Try sorting and uniquifying the output. |
12689 | if sort "$nlist" | uniq > "$nlist"T; then | |
12690 | mv -f "$nlist"T "$nlist" | |
12691 | else | |
12692 | rm -f "$nlist"T | |
12693 | fi | |
12694 | ||
12695 | # Make sure that we snagged all the symbols we need. | |
12696 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | |
12697 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | |
12698 | cat <<_LT_EOF > conftest.$ac_ext | |
12699 | #ifdef __cplusplus | |
12700 | extern "C" { | |
12701 | #endif | |
12702 | ||
12703 | _LT_EOF | |
12704 | # Now generate the symbol file. | |
12705 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | |
12706 | ||
12707 | cat <<_LT_EOF >> conftest.$ac_ext | |
12708 | ||
12709 | /* The mapping between symbol names and symbols. */ | |
12710 | const struct { | |
12711 | const char *name; | |
12712 | void *address; | |
12713 | } | |
12714 | lt__PROGRAM__LTX_preloaded_symbols[] = | |
12715 | { | |
12716 | { "@PROGRAM@", (void *) 0 }, | |
12717 | _LT_EOF | |
12718 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | |
12719 | cat <<\_LT_EOF >> conftest.$ac_ext | |
12720 | {0, (void *) 0} | |
12721 | }; | |
12722 | ||
12723 | /* This works around a problem in FreeBSD linker */ | |
12724 | #ifdef FREEBSD_WORKAROUND | |
12725 | static const void *lt_preloaded_setup() { | |
12726 | return lt__PROGRAM__LTX_preloaded_symbols; | |
12727 | } | |
12728 | #endif | |
12729 | ||
12730 | #ifdef __cplusplus | |
12731 | } | |
12732 | #endif | |
12733 | _LT_EOF | |
12734 | # Now try linking the two files. | |
12735 | mv conftest.$ac_objext conftstm.$ac_objext | |
12736 | lt_save_LIBS="$LIBS" | |
12737 | lt_save_CFLAGS="$CFLAGS" | |
12738 | LIBS="conftstm.$ac_objext" | |
12739 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | |
5213506e | 12740 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
da0f6381 PB |
12741 | (eval $ac_link) 2>&5 |
12742 | ac_status=$? | |
5213506e RW |
12743 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12744 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | |
da0f6381 PB |
12745 | pipe_works=yes |
12746 | fi | |
12747 | LIBS="$lt_save_LIBS" | |
12748 | CFLAGS="$lt_save_CFLAGS" | |
12749 | else | |
12750 | echo "cannot find nm_test_func in $nlist" >&5 | |
12751 | fi | |
12752 | else | |
12753 | echo "cannot find nm_test_var in $nlist" >&5 | |
12754 | fi | |
12755 | else | |
12756 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 | |
12757 | fi | |
12758 | else | |
12759 | echo "$progname: failed program was:" >&5 | |
12760 | cat conftest.$ac_ext >&5 | |
12761 | fi | |
5d47bb02 | 12762 | rm -rf conftest* conftst* |
da0f6381 PB |
12763 | |
12764 | # Do not use the global_symbol_pipe unless it works. | |
12765 | if test "$pipe_works" = yes; then | |
12766 | break | |
12767 | else | |
12768 | lt_cv_sys_global_symbol_pipe= | |
12769 | fi | |
12770 | done | |
12771 | ||
12772 | fi | |
12773 | ||
12774 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
12775 | lt_cv_sys_global_symbol_to_cdecl= | |
12776 | fi | |
12777 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
5213506e RW |
12778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 |
12779 | $as_echo "failed" >&6; } | |
da0f6381 | 12780 | else |
5213506e RW |
12781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 |
12782 | $as_echo "ok" >&6; } | |
da0f6381 PB |
12783 | fi |
12784 | ||
12785 | ||
12786 | ||
12787 | ||
12788 | ||
12789 | ||
12790 | ||
12791 | ||
12792 | ||
12793 | ||
12794 | ||
12795 | ||
12796 | ||
12797 | ||
12798 | ||
5d47bb02 PG |
12799 | |
12800 | ||
12801 | ||
12802 | ||
12803 | ||
da0f6381 PB |
12804 | |
12805 | ||
5213506e RW |
12806 | # Check whether --enable-libtool-lock was given. |
12807 | if test "${enable_libtool_lock+set}" = set; then : | |
12808 | enableval=$enable_libtool_lock; | |
12809 | fi | |
da0f6381 | 12810 | |
da0f6381 PB |
12811 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
12812 | ||
12813 | # Some flags need to be propagated to the compiler or linker for good | |
12814 | # libtool support. | |
12815 | case $host in | |
12816 | ia64-*-hpux*) | |
12817 | # Find out which ABI we are using. | |
12818 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12819 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12820 | (eval $ac_compile) 2>&5 |
12821 | ac_status=$? | |
5213506e RW |
12822 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12823 | test $ac_status = 0; }; then | |
da0f6381 PB |
12824 | case `/usr/bin/file conftest.$ac_objext` in |
12825 | *ELF-32*) | |
12826 | HPUX_IA64_MODE="32" | |
12827 | ;; | |
12828 | *ELF-64*) | |
12829 | HPUX_IA64_MODE="64" | |
12830 | ;; | |
12831 | esac | |
12832 | fi | |
12833 | rm -rf conftest* | |
12834 | ;; | |
12835 | *-*-irix6*) | |
12836 | # Find out which ABI we are using. | |
43e02a8a | 12837 | echo '#line '$LINENO' "configure"' > conftest.$ac_ext |
5213506e | 12838 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12839 | (eval $ac_compile) 2>&5 |
12840 | ac_status=$? | |
5213506e RW |
12841 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12842 | test $ac_status = 0; }; then | |
da0f6381 PB |
12843 | if test "$lt_cv_prog_gnu_ld" = yes; then |
12844 | case `/usr/bin/file conftest.$ac_objext` in | |
12845 | *32-bit*) | |
12846 | LD="${LD-ld} -melf32bsmip" | |
12847 | ;; | |
12848 | *N32*) | |
12849 | LD="${LD-ld} -melf32bmipn32" | |
12850 | ;; | |
12851 | *64-bit*) | |
12852 | LD="${LD-ld} -melf64bmip" | |
12853 | ;; | |
12854 | esac | |
12855 | else | |
12856 | case `/usr/bin/file conftest.$ac_objext` in | |
12857 | *32-bit*) | |
12858 | LD="${LD-ld} -32" | |
12859 | ;; | |
12860 | *N32*) | |
12861 | LD="${LD-ld} -n32" | |
12862 | ;; | |
12863 | *64-bit*) | |
12864 | LD="${LD-ld} -64" | |
12865 | ;; | |
12866 | esac | |
12867 | fi | |
12868 | fi | |
12869 | rm -rf conftest* | |
12870 | ;; | |
12871 | ||
12872 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ | |
12873 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | |
12874 | # Find out which ABI we are using. | |
12875 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12876 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12877 | (eval $ac_compile) 2>&5 |
12878 | ac_status=$? | |
5213506e RW |
12879 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12880 | test $ac_status = 0; }; then | |
da0f6381 PB |
12881 | case `/usr/bin/file conftest.o` in |
12882 | *32-bit*) | |
12883 | case $host in | |
12884 | x86_64-*kfreebsd*-gnu) | |
12885 | LD="${LD-ld} -m elf_i386_fbsd" | |
12886 | ;; | |
12887 | x86_64-*linux*) | |
12888 | LD="${LD-ld} -m elf_i386" | |
12889 | ;; | |
12890 | ppc64-*linux*|powerpc64-*linux*) | |
12891 | LD="${LD-ld} -m elf32ppclinux" | |
12892 | ;; | |
12893 | s390x-*linux*) | |
12894 | LD="${LD-ld} -m elf_s390" | |
12895 | ;; | |
12896 | sparc64-*linux*) | |
12897 | LD="${LD-ld} -m elf32_sparc" | |
12898 | ;; | |
12899 | esac | |
12900 | ;; | |
12901 | *64-bit*) | |
12902 | case $host in | |
12903 | x86_64-*kfreebsd*-gnu) | |
12904 | LD="${LD-ld} -m elf_x86_64_fbsd" | |
12905 | ;; | |
12906 | x86_64-*linux*) | |
12907 | LD="${LD-ld} -m elf_x86_64" | |
12908 | ;; | |
12909 | ppc*-*linux*|powerpc*-*linux*) | |
12910 | LD="${LD-ld} -m elf64ppc" | |
12911 | ;; | |
12912 | s390*-*linux*|s390*-*tpf*) | |
12913 | LD="${LD-ld} -m elf64_s390" | |
12914 | ;; | |
12915 | sparc*-*linux*) | |
12916 | LD="${LD-ld} -m elf64_sparc" | |
12917 | ;; | |
12918 | esac | |
12919 | ;; | |
12920 | esac | |
12921 | fi | |
12922 | rm -rf conftest* | |
12923 | ;; | |
12924 | ||
12925 | *-*-sco3.2v5*) | |
12926 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
12927 | SAVE_CFLAGS="$CFLAGS" | |
12928 | CFLAGS="$CFLAGS -belf" | |
5213506e RW |
12929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 |
12930 | $as_echo_n "checking whether the C compiler needs -belf... " >&6; } | |
12931 | if test "${lt_cv_cc_needs_belf+set}" = set; then : | |
12932 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12933 | else |
12934 | ac_ext=c | |
12935 | ac_cpp='$CPP $CPPFLAGS' | |
12936 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12937 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12938 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12939 | ||
5213506e | 12940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
12941 | /* end confdefs.h. */ |
12942 | ||
12943 | int | |
12944 | main () | |
12945 | { | |
12946 | ||
12947 | ; | |
12948 | return 0; | |
12949 | } | |
12950 | _ACEOF | |
5213506e | 12951 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
12952 | lt_cv_cc_needs_belf=yes |
12953 | else | |
5213506e | 12954 | lt_cv_cc_needs_belf=no |
da0f6381 | 12955 | fi |
5213506e RW |
12956 | rm -f core conftest.err conftest.$ac_objext \ |
12957 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
12958 | ac_ext=c |
12959 | ac_cpp='$CPP $CPPFLAGS' | |
12960 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12961 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12962 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12963 | ||
12964 | fi | |
5213506e RW |
12965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 |
12966 | $as_echo "$lt_cv_cc_needs_belf" >&6; } | |
da0f6381 PB |
12967 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
12968 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
12969 | CFLAGS="$SAVE_CFLAGS" | |
12970 | fi | |
12971 | ;; | |
12972 | sparc*-*solaris*) | |
12973 | # Find out which ABI we are using. | |
12974 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12975 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12976 | (eval $ac_compile) 2>&5 |
12977 | ac_status=$? | |
5213506e RW |
12978 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12979 | test $ac_status = 0; }; then | |
da0f6381 PB |
12980 | case `/usr/bin/file conftest.o` in |
12981 | *64-bit*) | |
12982 | case $lt_cv_prog_gnu_ld in | |
12983 | yes*) LD="${LD-ld} -m elf64_sparc" ;; | |
5d47bb02 PG |
12984 | *) |
12985 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | |
12986 | LD="${LD-ld} -64" | |
12987 | fi | |
12988 | ;; | |
da0f6381 PB |
12989 | esac |
12990 | ;; | |
12991 | esac | |
12992 | fi | |
12993 | rm -rf conftest* | |
12994 | ;; | |
12995 | esac | |
12996 | ||
5d47bb02 PG |
12997 | need_locks="$enable_libtool_lock" |
12998 | ||
12999 | ||
13000 | case $host_os in | |
13001 | rhapsody* | darwin*) | |
13002 | if test -n "$ac_tool_prefix"; then | |
13003 | # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. | |
13004 | set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 | |
5213506e RW |
13005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13006 | $as_echo_n "checking for $ac_word... " >&6; } | |
13007 | if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : | |
13008 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13009 | else |
13010 | if test -n "$DSYMUTIL"; then | |
13011 | ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. | |
13012 | else | |
13013 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13014 | for as_dir in $PATH | |
13015 | do | |
13016 | IFS=$as_save_IFS | |
13017 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13018 | for ac_exec_ext in '' $ac_executable_extensions; do |
13019 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13020 | ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" |
5213506e | 13021 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13022 | break 2 |
13023 | fi | |
13024 | done | |
5213506e RW |
13025 | done |
13026 | IFS=$as_save_IFS | |
5d47bb02 PG |
13027 | |
13028 | fi | |
13029 | fi | |
13030 | DSYMUTIL=$ac_cv_prog_DSYMUTIL | |
13031 | if test -n "$DSYMUTIL"; then | |
5213506e RW |
13032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 |
13033 | $as_echo "$DSYMUTIL" >&6; } | |
5d47bb02 | 13034 | else |
5213506e RW |
13035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13036 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13037 | fi |
13038 | ||
5213506e | 13039 | |
5d47bb02 PG |
13040 | fi |
13041 | if test -z "$ac_cv_prog_DSYMUTIL"; then | |
13042 | ac_ct_DSYMUTIL=$DSYMUTIL | |
13043 | # Extract the first word of "dsymutil", so it can be a program name with args. | |
13044 | set dummy dsymutil; ac_word=$2 | |
5213506e RW |
13045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13046 | $as_echo_n "checking for $ac_word... " >&6; } | |
13047 | if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : | |
13048 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13049 | else |
13050 | if test -n "$ac_ct_DSYMUTIL"; then | |
13051 | ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. | |
13052 | else | |
13053 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13054 | for as_dir in $PATH | |
13055 | do | |
13056 | IFS=$as_save_IFS | |
13057 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13058 | for ac_exec_ext in '' $ac_executable_extensions; do |
13059 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13060 | ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" |
5213506e | 13061 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13062 | break 2 |
13063 | fi | |
13064 | done | |
5213506e RW |
13065 | done |
13066 | IFS=$as_save_IFS | |
5d47bb02 | 13067 | |
5d47bb02 PG |
13068 | fi |
13069 | fi | |
13070 | ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL | |
13071 | if test -n "$ac_ct_DSYMUTIL"; then | |
5213506e RW |
13072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 |
13073 | $as_echo "$ac_ct_DSYMUTIL" >&6; } | |
5d47bb02 | 13074 | else |
5213506e RW |
13075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13076 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13077 | fi |
13078 | ||
5213506e RW |
13079 | if test "x$ac_ct_DSYMUTIL" = x; then |
13080 | DSYMUTIL=":" | |
13081 | else | |
13082 | case $cross_compiling:$ac_tool_warned in | |
13083 | yes:) | |
13084 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13085 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13086 | ac_tool_warned=yes ;; | |
13087 | esac | |
13088 | DSYMUTIL=$ac_ct_DSYMUTIL | |
13089 | fi | |
5d47bb02 PG |
13090 | else |
13091 | DSYMUTIL="$ac_cv_prog_DSYMUTIL" | |
13092 | fi | |
13093 | ||
13094 | if test -n "$ac_tool_prefix"; then | |
13095 | # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. | |
13096 | set dummy ${ac_tool_prefix}nmedit; ac_word=$2 | |
5213506e RW |
13097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13098 | $as_echo_n "checking for $ac_word... " >&6; } | |
13099 | if test "${ac_cv_prog_NMEDIT+set}" = set; then : | |
13100 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13101 | else |
13102 | if test -n "$NMEDIT"; then | |
13103 | ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. | |
13104 | else | |
13105 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13106 | for as_dir in $PATH | |
13107 | do | |
13108 | IFS=$as_save_IFS | |
13109 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13110 | for ac_exec_ext in '' $ac_executable_extensions; do |
13111 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13112 | ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" |
5213506e | 13113 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13114 | break 2 |
13115 | fi | |
13116 | done | |
5213506e RW |
13117 | done |
13118 | IFS=$as_save_IFS | |
5d47bb02 PG |
13119 | |
13120 | fi | |
13121 | fi | |
13122 | NMEDIT=$ac_cv_prog_NMEDIT | |
13123 | if test -n "$NMEDIT"; then | |
5213506e RW |
13124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 |
13125 | $as_echo "$NMEDIT" >&6; } | |
5d47bb02 | 13126 | else |
5213506e RW |
13127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13128 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13129 | fi |
13130 | ||
5213506e | 13131 | |
5d47bb02 PG |
13132 | fi |
13133 | if test -z "$ac_cv_prog_NMEDIT"; then | |
13134 | ac_ct_NMEDIT=$NMEDIT | |
13135 | # Extract the first word of "nmedit", so it can be a program name with args. | |
13136 | set dummy nmedit; ac_word=$2 | |
5213506e RW |
13137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13138 | $as_echo_n "checking for $ac_word... " >&6; } | |
13139 | if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : | |
13140 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13141 | else |
13142 | if test -n "$ac_ct_NMEDIT"; then | |
13143 | ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. | |
13144 | else | |
13145 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13146 | for as_dir in $PATH | |
13147 | do | |
13148 | IFS=$as_save_IFS | |
13149 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13150 | for ac_exec_ext in '' $ac_executable_extensions; do |
13151 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13152 | ac_cv_prog_ac_ct_NMEDIT="nmedit" |
5213506e | 13153 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13154 | break 2 |
13155 | fi | |
13156 | done | |
5213506e RW |
13157 | done |
13158 | IFS=$as_save_IFS | |
5d47bb02 | 13159 | |
5d47bb02 PG |
13160 | fi |
13161 | fi | |
13162 | ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT | |
13163 | if test -n "$ac_ct_NMEDIT"; then | |
5213506e RW |
13164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 |
13165 | $as_echo "$ac_ct_NMEDIT" >&6; } | |
5d47bb02 | 13166 | else |
5213506e RW |
13167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13168 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13169 | fi |
13170 | ||
5213506e RW |
13171 | if test "x$ac_ct_NMEDIT" = x; then |
13172 | NMEDIT=":" | |
13173 | else | |
13174 | case $cross_compiling:$ac_tool_warned in | |
13175 | yes:) | |
13176 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13177 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13178 | ac_tool_warned=yes ;; | |
13179 | esac | |
13180 | NMEDIT=$ac_ct_NMEDIT | |
13181 | fi | |
5d47bb02 PG |
13182 | else |
13183 | NMEDIT="$ac_cv_prog_NMEDIT" | |
13184 | fi | |
13185 | ||
13186 | if test -n "$ac_tool_prefix"; then | |
13187 | # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. | |
13188 | set dummy ${ac_tool_prefix}lipo; ac_word=$2 | |
5213506e RW |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13190 | $as_echo_n "checking for $ac_word... " >&6; } | |
13191 | if test "${ac_cv_prog_LIPO+set}" = set; then : | |
13192 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13193 | else |
13194 | if test -n "$LIPO"; then | |
13195 | ac_cv_prog_LIPO="$LIPO" # Let the user override the test. | |
13196 | else | |
13197 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13198 | for as_dir in $PATH | |
13199 | do | |
13200 | IFS=$as_save_IFS | |
13201 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13202 | for ac_exec_ext in '' $ac_executable_extensions; do |
13203 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13204 | ac_cv_prog_LIPO="${ac_tool_prefix}lipo" |
5213506e | 13205 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13206 | break 2 |
13207 | fi | |
13208 | done | |
5213506e RW |
13209 | done |
13210 | IFS=$as_save_IFS | |
5d47bb02 PG |
13211 | |
13212 | fi | |
13213 | fi | |
13214 | LIPO=$ac_cv_prog_LIPO | |
13215 | if test -n "$LIPO"; then | |
5213506e RW |
13216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 |
13217 | $as_echo "$LIPO" >&6; } | |
5d47bb02 | 13218 | else |
5213506e RW |
13219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13220 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13221 | fi |
13222 | ||
5213506e | 13223 | |
5d47bb02 PG |
13224 | fi |
13225 | if test -z "$ac_cv_prog_LIPO"; then | |
13226 | ac_ct_LIPO=$LIPO | |
13227 | # Extract the first word of "lipo", so it can be a program name with args. | |
13228 | set dummy lipo; ac_word=$2 | |
5213506e RW |
13229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13230 | $as_echo_n "checking for $ac_word... " >&6; } | |
13231 | if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : | |
13232 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13233 | else |
13234 | if test -n "$ac_ct_LIPO"; then | |
13235 | ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. | |
13236 | else | |
13237 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13238 | for as_dir in $PATH | |
13239 | do | |
13240 | IFS=$as_save_IFS | |
13241 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13242 | for ac_exec_ext in '' $ac_executable_extensions; do |
13243 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13244 | ac_cv_prog_ac_ct_LIPO="lipo" |
5213506e | 13245 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13246 | break 2 |
13247 | fi | |
13248 | done | |
5213506e RW |
13249 | done |
13250 | IFS=$as_save_IFS | |
5d47bb02 | 13251 | |
5d47bb02 PG |
13252 | fi |
13253 | fi | |
13254 | ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO | |
13255 | if test -n "$ac_ct_LIPO"; then | |
5213506e RW |
13256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 |
13257 | $as_echo "$ac_ct_LIPO" >&6; } | |
5d47bb02 | 13258 | else |
5213506e RW |
13259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13260 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13261 | fi |
13262 | ||
5213506e RW |
13263 | if test "x$ac_ct_LIPO" = x; then |
13264 | LIPO=":" | |
13265 | else | |
13266 | case $cross_compiling:$ac_tool_warned in | |
13267 | yes:) | |
13268 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13269 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13270 | ac_tool_warned=yes ;; | |
13271 | esac | |
13272 | LIPO=$ac_ct_LIPO | |
13273 | fi | |
5d47bb02 PG |
13274 | else |
13275 | LIPO="$ac_cv_prog_LIPO" | |
13276 | fi | |
13277 | ||
13278 | if test -n "$ac_tool_prefix"; then | |
13279 | # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. | |
13280 | set dummy ${ac_tool_prefix}otool; ac_word=$2 | |
5213506e RW |
13281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13282 | $as_echo_n "checking for $ac_word... " >&6; } | |
13283 | if test "${ac_cv_prog_OTOOL+set}" = set; then : | |
13284 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13285 | else |
13286 | if test -n "$OTOOL"; then | |
13287 | ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. | |
13288 | else | |
13289 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13290 | for as_dir in $PATH | |
13291 | do | |
13292 | IFS=$as_save_IFS | |
13293 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13294 | for ac_exec_ext in '' $ac_executable_extensions; do |
13295 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13296 | ac_cv_prog_OTOOL="${ac_tool_prefix}otool" |
5213506e | 13297 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13298 | break 2 |
13299 | fi | |
13300 | done | |
5213506e RW |
13301 | done |
13302 | IFS=$as_save_IFS | |
5d47bb02 PG |
13303 | |
13304 | fi | |
13305 | fi | |
13306 | OTOOL=$ac_cv_prog_OTOOL | |
13307 | if test -n "$OTOOL"; then | |
5213506e RW |
13308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 |
13309 | $as_echo "$OTOOL" >&6; } | |
5d47bb02 | 13310 | else |
5213506e RW |
13311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13312 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13313 | fi |
13314 | ||
5213506e | 13315 | |
5d47bb02 PG |
13316 | fi |
13317 | if test -z "$ac_cv_prog_OTOOL"; then | |
13318 | ac_ct_OTOOL=$OTOOL | |
13319 | # Extract the first word of "otool", so it can be a program name with args. | |
13320 | set dummy otool; ac_word=$2 | |
5213506e RW |
13321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13322 | $as_echo_n "checking for $ac_word... " >&6; } | |
13323 | if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : | |
13324 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13325 | else |
13326 | if test -n "$ac_ct_OTOOL"; then | |
13327 | ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. | |
13328 | else | |
13329 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13330 | for as_dir in $PATH | |
13331 | do | |
13332 | IFS=$as_save_IFS | |
13333 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13334 | for ac_exec_ext in '' $ac_executable_extensions; do |
13335 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13336 | ac_cv_prog_ac_ct_OTOOL="otool" |
5213506e | 13337 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13338 | break 2 |
13339 | fi | |
13340 | done | |
5213506e RW |
13341 | done |
13342 | IFS=$as_save_IFS | |
5d47bb02 | 13343 | |
5d47bb02 PG |
13344 | fi |
13345 | fi | |
13346 | ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL | |
13347 | if test -n "$ac_ct_OTOOL"; then | |
5213506e RW |
13348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 |
13349 | $as_echo "$ac_ct_OTOOL" >&6; } | |
5d47bb02 | 13350 | else |
5213506e RW |
13351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13352 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13353 | fi |
13354 | ||
5213506e RW |
13355 | if test "x$ac_ct_OTOOL" = x; then |
13356 | OTOOL=":" | |
13357 | else | |
13358 | case $cross_compiling:$ac_tool_warned in | |
13359 | yes:) | |
13360 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13361 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13362 | ac_tool_warned=yes ;; | |
13363 | esac | |
13364 | OTOOL=$ac_ct_OTOOL | |
13365 | fi | |
5d47bb02 PG |
13366 | else |
13367 | OTOOL="$ac_cv_prog_OTOOL" | |
13368 | fi | |
13369 | ||
13370 | if test -n "$ac_tool_prefix"; then | |
13371 | # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. | |
13372 | set dummy ${ac_tool_prefix}otool64; ac_word=$2 | |
5213506e RW |
13373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13374 | $as_echo_n "checking for $ac_word... " >&6; } | |
13375 | if test "${ac_cv_prog_OTOOL64+set}" = set; then : | |
13376 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13377 | else |
13378 | if test -n "$OTOOL64"; then | |
13379 | ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. | |
13380 | else | |
13381 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13382 | for as_dir in $PATH | |
13383 | do | |
13384 | IFS=$as_save_IFS | |
13385 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13386 | for ac_exec_ext in '' $ac_executable_extensions; do |
13387 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13388 | ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" |
5213506e | 13389 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13390 | break 2 |
13391 | fi | |
13392 | done | |
5213506e RW |
13393 | done |
13394 | IFS=$as_save_IFS | |
5d47bb02 PG |
13395 | |
13396 | fi | |
13397 | fi | |
13398 | OTOOL64=$ac_cv_prog_OTOOL64 | |
13399 | if test -n "$OTOOL64"; then | |
5213506e RW |
13400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 |
13401 | $as_echo "$OTOOL64" >&6; } | |
5d47bb02 | 13402 | else |
5213506e RW |
13403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13404 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13405 | fi |
13406 | ||
5213506e | 13407 | |
5d47bb02 PG |
13408 | fi |
13409 | if test -z "$ac_cv_prog_OTOOL64"; then | |
13410 | ac_ct_OTOOL64=$OTOOL64 | |
13411 | # Extract the first word of "otool64", so it can be a program name with args. | |
13412 | set dummy otool64; ac_word=$2 | |
5213506e RW |
13413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13414 | $as_echo_n "checking for $ac_word... " >&6; } | |
13415 | if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : | |
13416 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13417 | else |
13418 | if test -n "$ac_ct_OTOOL64"; then | |
13419 | ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. | |
13420 | else | |
13421 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13422 | for as_dir in $PATH | |
13423 | do | |
13424 | IFS=$as_save_IFS | |
13425 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13426 | for ac_exec_ext in '' $ac_executable_extensions; do |
13427 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13428 | ac_cv_prog_ac_ct_OTOOL64="otool64" |
5213506e | 13429 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13430 | break 2 |
13431 | fi | |
13432 | done | |
5213506e RW |
13433 | done |
13434 | IFS=$as_save_IFS | |
5d47bb02 | 13435 | |
5d47bb02 PG |
13436 | fi |
13437 | fi | |
13438 | ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 | |
13439 | if test -n "$ac_ct_OTOOL64"; then | |
5213506e RW |
13440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 |
13441 | $as_echo "$ac_ct_OTOOL64" >&6; } | |
5d47bb02 | 13442 | else |
5213506e RW |
13443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13444 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13445 | fi |
13446 | ||
5213506e RW |
13447 | if test "x$ac_ct_OTOOL64" = x; then |
13448 | OTOOL64=":" | |
13449 | else | |
13450 | case $cross_compiling:$ac_tool_warned in | |
13451 | yes:) | |
13452 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13453 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13454 | ac_tool_warned=yes ;; | |
13455 | esac | |
13456 | OTOOL64=$ac_ct_OTOOL64 | |
13457 | fi | |
5d47bb02 PG |
13458 | else |
13459 | OTOOL64="$ac_cv_prog_OTOOL64" | |
13460 | fi | |
13461 | ||
13462 | ||
13463 | ||
13464 | ||
13465 | ||
13466 | ||
13467 | ||
13468 | ||
13469 | ||
13470 | ||
13471 | ||
13472 | ||
13473 | ||
13474 | ||
13475 | ||
13476 | ||
13477 | ||
13478 | ||
13479 | ||
13480 | ||
13481 | ||
13482 | ||
13483 | ||
13484 | ||
13485 | ||
13486 | ||
13487 | ||
5213506e RW |
13488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 |
13489 | $as_echo_n "checking for -single_module linker flag... " >&6; } | |
13490 | if test "${lt_cv_apple_cc_single_mod+set}" = set; then : | |
13491 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13492 | else |
13493 | lt_cv_apple_cc_single_mod=no | |
13494 | if test -z "${LT_MULTI_MODULE}"; then | |
13495 | # By default we will add the -single_module flag. You can override | |
13496 | # by either setting the environment variable LT_MULTI_MODULE | |
13497 | # non-empty at configure time, or by adding -multi_module to the | |
13498 | # link flags. | |
13499 | rm -rf libconftest.dylib* | |
13500 | echo "int foo(void){return 1;}" > conftest.c | |
13501 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
13502 | -dynamiclib -Wl,-single_module conftest.c" >&5 | |
13503 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
13504 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | |
13505 | _lt_result=$? | |
13506 | if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then | |
13507 | lt_cv_apple_cc_single_mod=yes | |
13508 | else | |
13509 | cat conftest.err >&5 | |
13510 | fi | |
13511 | rm -rf libconftest.dylib* | |
13512 | rm -f conftest.* | |
13513 | fi | |
13514 | fi | |
5213506e RW |
13515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 |
13516 | $as_echo "$lt_cv_apple_cc_single_mod" >&6; } | |
13517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 | |
13518 | $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } | |
13519 | if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : | |
13520 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13521 | else |
13522 | lt_cv_ld_exported_symbols_list=no | |
13523 | save_LDFLAGS=$LDFLAGS | |
13524 | echo "_main" > conftest.sym | |
13525 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | |
5213506e | 13526 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5d47bb02 PG |
13527 | /* end confdefs.h. */ |
13528 | ||
13529 | int | |
13530 | main () | |
13531 | { | |
13532 | ||
13533 | ; | |
13534 | return 0; | |
13535 | } | |
13536 | _ACEOF | |
5213506e | 13537 | if ac_fn_c_try_link "$LINENO"; then : |
5d47bb02 PG |
13538 | lt_cv_ld_exported_symbols_list=yes |
13539 | else | |
5213506e | 13540 | lt_cv_ld_exported_symbols_list=no |
5d47bb02 | 13541 | fi |
5213506e RW |
13542 | rm -f core conftest.err conftest.$ac_objext \ |
13543 | conftest$ac_exeext conftest.$ac_ext | |
5d47bb02 PG |
13544 | LDFLAGS="$save_LDFLAGS" |
13545 | ||
13546 | fi | |
5213506e RW |
13547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 |
13548 | $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } | |
43e02a8a RW |
13549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 |
13550 | $as_echo_n "checking for -force_load linker flag... " >&6; } | |
13551 | if test "${lt_cv_ld_force_load+set}" = set; then : | |
13552 | $as_echo_n "(cached) " >&6 | |
13553 | else | |
13554 | lt_cv_ld_force_load=no | |
13555 | cat > conftest.c << _LT_EOF | |
13556 | int forced_loaded() { return 2;} | |
13557 | _LT_EOF | |
13558 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 | |
13559 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | |
13560 | echo "$AR cru libconftest.a conftest.o" >&5 | |
13561 | $AR cru libconftest.a conftest.o 2>&5 | |
13562 | cat > conftest.c << _LT_EOF | |
13563 | int main() { return 0;} | |
13564 | _LT_EOF | |
13565 | echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 | |
13566 | $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err | |
13567 | _lt_result=$? | |
13568 | if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then | |
13569 | lt_cv_ld_force_load=yes | |
13570 | else | |
13571 | cat conftest.err >&5 | |
13572 | fi | |
13573 | rm -f conftest.err libconftest.a conftest conftest.c | |
13574 | rm -rf conftest.dSYM | |
13575 | ||
13576 | fi | |
13577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 | |
13578 | $as_echo "$lt_cv_ld_force_load" >&6; } | |
5d47bb02 PG |
13579 | case $host_os in |
13580 | rhapsody* | darwin1.[012]) | |
13581 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | |
13582 | darwin1.*) | |
13583 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
13584 | darwin*) # darwin 5.x on | |
13585 | # if running on 10.5 or later, the deployment target defaults | |
13586 | # to the OS version, if on x86, and 10.4, the deployment | |
13587 | # target defaults to 10.4. Don't you love it? | |
13588 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
13589 | 10.0,*86*-darwin8*|10.0,*-darwin[91]*) | |
13590 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
13591 | 10.[012]*) | |
13592 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
13593 | 10.*) | |
13594 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
13595 | esac | |
13596 | ;; | |
13597 | esac | |
13598 | if test "$lt_cv_apple_cc_single_mod" = "yes"; then | |
13599 | _lt_dar_single_mod='$single_module' | |
13600 | fi | |
13601 | if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | |
13602 | _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | |
13603 | else | |
13604 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
13605 | fi | |
43e02a8a | 13606 | if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then |
5d47bb02 PG |
13607 | _lt_dsymutil='~$DSYMUTIL $lib || :' |
13608 | else | |
13609 | _lt_dsymutil= | |
13610 | fi | |
13611 | ;; | |
13612 | esac | |
da0f6381 | 13613 | |
da0f6381 | 13614 | for ac_header in dlfcn.h |
5213506e RW |
13615 | do : |
13616 | ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" | |
13617 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
da0f6381 | 13618 | cat >>confdefs.h <<_ACEOF |
5213506e | 13619 | #define HAVE_DLFCN_H 1 |
da0f6381 PB |
13620 | _ACEOF |
13621 | ||
13622 | fi | |
13623 | done | |
13624 | ||
13625 | ||
13626 | ||
5d47bb02 PG |
13627 | |
13628 | ||
5213506e | 13629 | |
43e02a8a | 13630 | # Set options |
5d47bb02 | 13631 | |
43e02a8a RW |
13632 | |
13633 | ||
13634 | enable_dlopen=no | |
13635 | ||
13636 | ||
13637 | enable_win32_dll=no | |
13638 | ||
13639 | ||
13640 | # Check whether --enable-shared was given. | |
13641 | if test "${enable_shared+set}" = set; then : | |
13642 | enableval=$enable_shared; p=${PACKAGE-default} | |
13643 | case $enableval in | |
13644 | yes) enable_shared=yes ;; | |
13645 | no) enable_shared=no ;; | |
13646 | *) | |
13647 | enable_shared=no | |
13648 | # Look at the argument we got. We use all the common list separators. | |
13649 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13650 | for pkg in $enableval; do | |
13651 | IFS="$lt_save_ifs" | |
13652 | if test "X$pkg" = "X$p"; then | |
13653 | enable_shared=yes | |
13654 | fi | |
13655 | done | |
13656 | IFS="$lt_save_ifs" | |
13657 | ;; | |
13658 | esac | |
5d47bb02 | 13659 | else |
43e02a8a | 13660 | enable_shared=yes |
5213506e RW |
13661 | fi |
13662 | ||
da0f6381 PB |
13663 | |
13664 | ||
13665 | ||
13666 | ||
13667 | ||
da0f6381 | 13668 | |
da0f6381 | 13669 | |
da0f6381 | 13670 | |
5213506e RW |
13671 | # Check whether --enable-static was given. |
13672 | if test "${enable_static+set}" = set; then : | |
13673 | enableval=$enable_static; p=${PACKAGE-default} | |
00020c16 ILT |
13674 | case $enableval in |
13675 | yes) enable_static=yes ;; | |
13676 | no) enable_static=no ;; | |
13677 | *) | |
13678 | enable_static=no | |
13679 | # Look at the argument we got. We use all the common list separators. | |
13680 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13681 | for pkg in $enableval; do | |
13682 | IFS="$lt_save_ifs" | |
13683 | if test "X$pkg" = "X$p"; then | |
13684 | enable_static=yes | |
13685 | fi | |
13686 | done | |
13687 | IFS="$lt_save_ifs" | |
13688 | ;; | |
13689 | esac | |
da0f6381 | 13690 | else |
00020c16 | 13691 | enable_static=yes |
5213506e | 13692 | fi |
da0f6381 PB |
13693 | |
13694 | ||
da0f6381 | 13695 | |
da0f6381 | 13696 | |
da0f6381 | 13697 | |
da0f6381 PB |
13698 | |
13699 | ||
da0f6381 | 13700 | |
da0f6381 | 13701 | |
5213506e RW |
13702 | |
13703 | # Check whether --with-pic was given. | |
13704 | if test "${with_pic+set}" = set; then : | |
13705 | withval=$with_pic; pic_mode="$withval" | |
00020c16 ILT |
13706 | else |
13707 | pic_mode=default | |
5213506e RW |
13708 | fi |
13709 | ||
da0f6381 | 13710 | |
00020c16 | 13711 | test -z "$pic_mode" && pic_mode=default |
da0f6381 PB |
13712 | |
13713 | ||
13714 | ||
13715 | ||
13716 | ||
13717 | ||
13718 | ||
5213506e RW |
13719 | # Check whether --enable-fast-install was given. |
13720 | if test "${enable_fast_install+set}" = set; then : | |
13721 | enableval=$enable_fast_install; p=${PACKAGE-default} | |
00020c16 ILT |
13722 | case $enableval in |
13723 | yes) enable_fast_install=yes ;; | |
13724 | no) enable_fast_install=no ;; | |
13725 | *) | |
13726 | enable_fast_install=no | |
13727 | # Look at the argument we got. We use all the common list separators. | |
13728 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13729 | for pkg in $enableval; do | |
13730 | IFS="$lt_save_ifs" | |
13731 | if test "X$pkg" = "X$p"; then | |
13732 | enable_fast_install=yes | |
13733 | fi | |
13734 | done | |
13735 | IFS="$lt_save_ifs" | |
13736 | ;; | |
13737 | esac | |
13738 | else | |
13739 | enable_fast_install=yes | |
5213506e RW |
13740 | fi |
13741 | ||
da0f6381 | 13742 | |
da0f6381 | 13743 | |
da0f6381 | 13744 | |
da0f6381 | 13745 | |
da0f6381 | 13746 | |
da0f6381 PB |
13747 | |
13748 | ||
da0f6381 | 13749 | |
da0f6381 | 13750 | |
da0f6381 | 13751 | |
00020c16 ILT |
13752 | # This can be used to rebuild libtool when needed |
13753 | LIBTOOL_DEPS="$ltmain" | |
da0f6381 | 13754 | |
00020c16 ILT |
13755 | # Always use our own libtool. |
13756 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
da0f6381 | 13757 | |
da0f6381 | 13758 | |
da0f6381 PB |
13759 | |
13760 | ||
13761 | ||
13762 | ||
13763 | ||
13764 | ||
da0f6381 | 13765 | |
da0f6381 | 13766 | |
da0f6381 | 13767 | |
da0f6381 | 13768 | |
da0f6381 | 13769 | |
da0f6381 | 13770 | |
da0f6381 | 13771 | |
da0f6381 | 13772 | |
da0f6381 | 13773 | |
da0f6381 | 13774 | |
da0f6381 | 13775 | |
da0f6381 | 13776 | |
da0f6381 | 13777 | |
da0f6381 | 13778 | |
da0f6381 | 13779 | |
43e02a8a | 13780 | |
da0f6381 | 13781 | |
da0f6381 | 13782 | |
00020c16 | 13783 | test -z "$LN_S" && LN_S="ln -s" |
da0f6381 | 13784 | |
da0f6381 | 13785 | |
da0f6381 | 13786 | |
da0f6381 | 13787 | |
da0f6381 | 13788 | |
da0f6381 | 13789 | |
da0f6381 | 13790 | |
da0f6381 | 13791 | |
da0f6381 | 13792 | |
da0f6381 | 13793 | |
da0f6381 | 13794 | |
da0f6381 | 13795 | |
da0f6381 | 13796 | |
da0f6381 | 13797 | |
00020c16 ILT |
13798 | if test -n "${ZSH_VERSION+set}" ; then |
13799 | setopt NO_GLOB_SUBST | |
13800 | fi | |
da0f6381 | 13801 | |
5213506e RW |
13802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 |
13803 | $as_echo_n "checking for objdir... " >&6; } | |
13804 | if test "${lt_cv_objdir+set}" = set; then : | |
13805 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
13806 | else |
13807 | rm -f .libs 2>/dev/null | |
13808 | mkdir .libs 2>/dev/null | |
13809 | if test -d .libs; then | |
13810 | lt_cv_objdir=.libs | |
13811 | else | |
13812 | # MS-DOS does not allow filenames that begin with a dot. | |
13813 | lt_cv_objdir=_libs | |
13814 | fi | |
13815 | rmdir .libs 2>/dev/null | |
13816 | fi | |
5213506e RW |
13817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 |
13818 | $as_echo "$lt_cv_objdir" >&6; } | |
00020c16 | 13819 | objdir=$lt_cv_objdir |
da0f6381 PB |
13820 | |
13821 | ||
13822 | ||
13823 | ||
da0f6381 | 13824 | |
00020c16 ILT |
13825 | cat >>confdefs.h <<_ACEOF |
13826 | #define LT_OBJDIR "$lt_cv_objdir/" | |
13827 | _ACEOF | |
da0f6381 | 13828 | |
da0f6381 | 13829 | |
da0f6381 PB |
13830 | |
13831 | ||
00020c16 ILT |
13832 | case $host_os in |
13833 | aix3*) | |
13834 | # AIX sometimes has problems with the GCC collect2 program. For some | |
13835 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
13836 | # vanish in a puff of smoke. | |
13837 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
13838 | COLLECT_NAMES= | |
13839 | export COLLECT_NAMES | |
13840 | fi | |
13841 | ;; | |
13842 | esac | |
da0f6381 | 13843 | |
00020c16 ILT |
13844 | # Global variables: |
13845 | ofile=libtool | |
13846 | can_build_shared=yes | |
da0f6381 | 13847 | |
00020c16 ILT |
13848 | # All known linkers require a `.a' archive for static linking (except MSVC, |
13849 | # which needs '.lib'). | |
13850 | libext=a | |
da0f6381 | 13851 | |
00020c16 | 13852 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
da0f6381 | 13853 | |
00020c16 ILT |
13854 | old_CC="$CC" |
13855 | old_CFLAGS="$CFLAGS" | |
da0f6381 | 13856 | |
00020c16 ILT |
13857 | # Set sane defaults for various variables |
13858 | test -z "$CC" && CC=cc | |
13859 | test -z "$LTCC" && LTCC=$CC | |
13860 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | |
13861 | test -z "$LD" && LD=ld | |
13862 | test -z "$ac_objext" && ac_objext=o | |
da0f6381 | 13863 | |
00020c16 ILT |
13864 | for cc_temp in $compiler""; do |
13865 | case $cc_temp in | |
13866 | compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; | |
13867 | distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; | |
13868 | \-*) ;; | |
13869 | *) break;; | |
13870 | esac | |
13871 | done | |
43e02a8a | 13872 | cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
da0f6381 PB |
13873 | |
13874 | ||
00020c16 ILT |
13875 | # Only perform the check for file, if the check method requires it |
13876 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
13877 | case $deplibs_check_method in | |
13878 | file_magic*) | |
13879 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
5213506e RW |
13880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 |
13881 | $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } | |
13882 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : | |
13883 | $as_echo_n "(cached) " >&6 | |
da0f6381 | 13884 | else |
00020c16 ILT |
13885 | case $MAGIC_CMD in |
13886 | [\\/*] | ?:[\\/]*) | |
13887 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
13888 | ;; | |
13889 | *) | |
13890 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
13891 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
13892 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | |
13893 | for ac_dir in $ac_dummy; do | |
13894 | IFS="$lt_save_ifs" | |
13895 | test -z "$ac_dir" && ac_dir=. | |
13896 | if test -f $ac_dir/${ac_tool_prefix}file; then | |
13897 | lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" | |
13898 | if test -n "$file_magic_test_file"; then | |
13899 | case $deplibs_check_method in | |
13900 | "file_magic "*) | |
13901 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
13902 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
13903 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
13904 | $EGREP "$file_magic_regex" > /dev/null; then | |
13905 | : | |
13906 | else | |
13907 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 13908 | |
00020c16 ILT |
13909 | *** Warning: the command libtool uses to detect shared libraries, |
13910 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
13911 | *** The result is that libtool may fail to recognize shared libraries | |
13912 | *** as such. This will affect the creation of libtool libraries that | |
13913 | *** depend on shared libraries, but programs linked with such libtool | |
13914 | *** libraries will work regardless of this problem. Nevertheless, you | |
13915 | *** may want to report the problem to your system manager and/or to | |
13916 | *** bug-libtool@gnu.org | |
da0f6381 | 13917 | |
00020c16 ILT |
13918 | _LT_EOF |
13919 | fi ;; | |
13920 | esac | |
13921 | fi | |
13922 | break | |
13923 | fi | |
13924 | done | |
13925 | IFS="$lt_save_ifs" | |
13926 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
13927 | ;; | |
13928 | esac | |
13929 | fi | |
da0f6381 | 13930 | |
00020c16 ILT |
13931 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
13932 | if test -n "$MAGIC_CMD"; then | |
5213506e RW |
13933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 |
13934 | $as_echo "$MAGIC_CMD" >&6; } | |
00020c16 | 13935 | else |
5213506e RW |
13936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13937 | $as_echo "no" >&6; } | |
00020c16 | 13938 | fi |
da0f6381 PB |
13939 | |
13940 | ||
13941 | ||
da0f6381 | 13942 | |
da0f6381 | 13943 | |
00020c16 ILT |
13944 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
13945 | if test -n "$ac_tool_prefix"; then | |
5213506e RW |
13946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 |
13947 | $as_echo_n "checking for file... " >&6; } | |
13948 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : | |
13949 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
13950 | else |
13951 | case $MAGIC_CMD in | |
13952 | [\\/*] | ?:[\\/]*) | |
13953 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
13954 | ;; | |
13955 | *) | |
13956 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
13957 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
13958 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | |
13959 | for ac_dir in $ac_dummy; do | |
13960 | IFS="$lt_save_ifs" | |
13961 | test -z "$ac_dir" && ac_dir=. | |
13962 | if test -f $ac_dir/file; then | |
13963 | lt_cv_path_MAGIC_CMD="$ac_dir/file" | |
13964 | if test -n "$file_magic_test_file"; then | |
13965 | case $deplibs_check_method in | |
13966 | "file_magic "*) | |
13967 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
13968 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
13969 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
13970 | $EGREP "$file_magic_regex" > /dev/null; then | |
13971 | : | |
13972 | else | |
13973 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 13974 | |
00020c16 ILT |
13975 | *** Warning: the command libtool uses to detect shared libraries, |
13976 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
13977 | *** The result is that libtool may fail to recognize shared libraries | |
13978 | *** as such. This will affect the creation of libtool libraries that | |
13979 | *** depend on shared libraries, but programs linked with such libtool | |
13980 | *** libraries will work regardless of this problem. Nevertheless, you | |
13981 | *** may want to report the problem to your system manager and/or to | |
13982 | *** bug-libtool@gnu.org | |
da0f6381 | 13983 | |
00020c16 ILT |
13984 | _LT_EOF |
13985 | fi ;; | |
13986 | esac | |
13987 | fi | |
13988 | break | |
da0f6381 | 13989 | fi |
00020c16 ILT |
13990 | done |
13991 | IFS="$lt_save_ifs" | |
13992 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
13993 | ;; | |
13994 | esac | |
13995 | fi | |
da0f6381 | 13996 | |
00020c16 ILT |
13997 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
13998 | if test -n "$MAGIC_CMD"; then | |
5213506e RW |
13999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 |
14000 | $as_echo "$MAGIC_CMD" >&6; } | |
00020c16 | 14001 | else |
5213506e RW |
14002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14003 | $as_echo "no" >&6; } | |
00020c16 | 14004 | fi |
da0f6381 | 14005 | |
da0f6381 | 14006 | |
00020c16 ILT |
14007 | else |
14008 | MAGIC_CMD=: | |
14009 | fi | |
14010 | fi | |
da0f6381 | 14011 | |
00020c16 ILT |
14012 | fi |
14013 | ;; | |
14014 | esac | |
da0f6381 | 14015 | |
00020c16 | 14016 | # Use C for the default configuration in the libtool script |
da0f6381 | 14017 | |
00020c16 ILT |
14018 | lt_save_CC="$CC" |
14019 | ac_ext=c | |
14020 | ac_cpp='$CPP $CPPFLAGS' | |
14021 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14022 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14023 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
da0f6381 | 14024 | |
da0f6381 | 14025 | |
00020c16 ILT |
14026 | # Source file extension for C test sources. |
14027 | ac_ext=c | |
da0f6381 | 14028 | |
00020c16 ILT |
14029 | # Object file extension for compiled C test sources. |
14030 | objext=o | |
14031 | objext=$objext | |
da0f6381 | 14032 | |
00020c16 ILT |
14033 | # Code to be used in simple compile tests |
14034 | lt_simple_compile_test_code="int some_variable = 0;" | |
5d47bb02 | 14035 | |
00020c16 ILT |
14036 | # Code to be used in simple link tests |
14037 | lt_simple_link_test_code='int main(){return(0);}' | |
da0f6381 | 14038 | |
da0f6381 | 14039 | |
da0f6381 | 14040 | |
da0f6381 | 14041 | |
00020c16 ILT |
14042 | |
14043 | ||
14044 | ||
14045 | # If no C compiler was specified, use CC. | |
14046 | LTCC=${LTCC-"$CC"} | |
14047 | ||
14048 | # If no C compiler flags were specified, use CFLAGS. | |
14049 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
14050 | ||
14051 | # Allow CC to be a program name with arguments. | |
14052 | compiler=$CC | |
14053 | ||
14054 | # Save the default compiler, since it gets overwritten when the other | |
14055 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | |
14056 | compiler_DEFAULT=$CC | |
14057 | ||
14058 | # save warnings/boilerplate of simple test code | |
14059 | ac_outfile=conftest.$ac_objext | |
14060 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
14061 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
14062 | _lt_compiler_boilerplate=`cat conftest.err` | |
14063 | $RM conftest* | |
14064 | ||
14065 | ac_outfile=conftest.$ac_objext | |
14066 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
14067 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
14068 | _lt_linker_boilerplate=`cat conftest.err` | |
14069 | $RM -r conftest* | |
14070 | ||
14071 | ||
14072 | ## CAVEAT EMPTOR: | |
14073 | ## There is no encapsulation within the following macros, do not change | |
14074 | ## the running order or otherwise move them around unless you know exactly | |
14075 | ## what you are doing... | |
14076 | if test -n "$compiler"; then | |
14077 | ||
14078 | lt_prog_compiler_no_builtin_flag= | |
14079 | ||
14080 | if test "$GCC" = yes; then | |
43e02a8a RW |
14081 | case $cc_basename in |
14082 | nvcc*) | |
14083 | lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; | |
14084 | *) | |
14085 | lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; | |
14086 | esac | |
00020c16 | 14087 | |
5213506e RW |
14088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 |
14089 | $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } | |
14090 | if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : | |
14091 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14092 | else |
14093 | lt_cv_prog_compiler_rtti_exceptions=no | |
14094 | ac_outfile=conftest.$ac_objext | |
14095 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
14096 | lt_compiler_flag="-fno-rtti -fno-exceptions" | |
14097 | # Insert the option either (1) after the last *FLAGS variable, or | |
14098 | # (2) before a word containing "conftest.", or (3) at the end. | |
14099 | # Note that $ac_compile itself does not contain backslashes and begins | |
14100 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14101 | # The option is referenced via a variable to avoid confusing sed. | |
14102 | lt_compile=`echo "$ac_compile" | $SED \ | |
14103 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14104 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14105 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14106 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14107 | (eval "$lt_compile" 2>conftest.err) |
14108 | ac_status=$? | |
14109 | cat conftest.err >&5 | |
43e02a8a | 14110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14111 | if (exit $ac_status) && test -s "$ac_outfile"; then |
14112 | # The compiler can only warn and ignore the option if not recognized | |
14113 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 14114 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
14115 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14116 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
14117 | lt_cv_prog_compiler_rtti_exceptions=yes | |
14118 | fi | |
14119 | fi | |
14120 | $RM conftest* | |
14121 | ||
14122 | fi | |
5213506e RW |
14123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 |
14124 | $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } | |
00020c16 ILT |
14125 | |
14126 | if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then | |
14127 | lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" | |
14128 | else | |
14129 | : | |
14130 | fi | |
14131 | ||
14132 | fi | |
14133 | ||
14134 | ||
14135 | ||
14136 | ||
14137 | ||
14138 | ||
14139 | lt_prog_compiler_wl= | |
14140 | lt_prog_compiler_pic= | |
14141 | lt_prog_compiler_static= | |
14142 | ||
5213506e RW |
14143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 |
14144 | $as_echo_n "checking for $compiler option to produce PIC... " >&6; } | |
00020c16 ILT |
14145 | |
14146 | if test "$GCC" = yes; then | |
14147 | lt_prog_compiler_wl='-Wl,' | |
14148 | lt_prog_compiler_static='-static' | |
14149 | ||
14150 | case $host_os in | |
14151 | aix*) | |
14152 | # All AIX code is PIC. | |
14153 | if test "$host_cpu" = ia64; then | |
14154 | # AIX 5 now supports IA64 processor | |
14155 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14156 | fi |
14157 | ;; | |
14158 | ||
00020c16 ILT |
14159 | amigaos*) |
14160 | case $host_cpu in | |
14161 | powerpc) | |
14162 | # see comment about AmigaOS4 .so support | |
14163 | lt_prog_compiler_pic='-fPIC' | |
14164 | ;; | |
14165 | m68k) | |
14166 | # FIXME: we need at least 68020 code to build shared libraries, but | |
14167 | # adding the `-m68020' flag to GCC prevents building anything better, | |
14168 | # like `-m68040'. | |
14169 | lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' | |
14170 | ;; | |
14171 | esac | |
14172 | ;; | |
da0f6381 | 14173 | |
00020c16 ILT |
14174 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
14175 | # PIC is the default for these OSes. | |
14176 | ;; | |
da0f6381 | 14177 | |
00020c16 ILT |
14178 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
14179 | # This hack is so that the source file can tell whether it is being | |
14180 | # built for inclusion in a dll (and should export symbols for example). | |
14181 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
14182 | # (--disable-auto-import) libraries | |
14183 | lt_prog_compiler_pic='-DDLL_EXPORT' | |
14184 | ;; | |
14185 | ||
14186 | darwin* | rhapsody*) | |
14187 | # PIC is the default on this platform | |
14188 | # Common symbols not allowed in MH_DYLIB files | |
14189 | lt_prog_compiler_pic='-fno-common' | |
14190 | ;; | |
14191 | ||
43e02a8a RW |
14192 | haiku*) |
14193 | # PIC is the default for Haiku. | |
14194 | # The "-static" flag exists, but is broken. | |
14195 | lt_prog_compiler_static= | |
14196 | ;; | |
14197 | ||
00020c16 ILT |
14198 | hpux*) |
14199 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
14200 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
14201 | # sets the default TLS model and affects inlining. | |
14202 | case $host_cpu in | |
14203 | hppa*64*) | |
14204 | # +Z the default | |
da0f6381 | 14205 | ;; |
00020c16 ILT |
14206 | *) |
14207 | lt_prog_compiler_pic='-fPIC' | |
da0f6381 PB |
14208 | ;; |
14209 | esac | |
14210 | ;; | |
14211 | ||
00020c16 ILT |
14212 | interix[3-9]*) |
14213 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
14214 | # Instead, we relocate shared libraries at runtime. | |
da0f6381 PB |
14215 | ;; |
14216 | ||
00020c16 ILT |
14217 | msdosdjgpp*) |
14218 | # Just because we use GCC doesn't mean we suddenly get shared libraries | |
14219 | # on systems that don't support them. | |
14220 | lt_prog_compiler_can_build_shared=no | |
14221 | enable_shared=no | |
da0f6381 | 14222 | ;; |
da0f6381 | 14223 | |
00020c16 ILT |
14224 | *nto* | *qnx*) |
14225 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
14226 | # it will coredump. | |
14227 | lt_prog_compiler_pic='-fPIC -shared' | |
14228 | ;; | |
14229 | ||
14230 | sysv4*MP*) | |
14231 | if test -d /usr/nec; then | |
14232 | lt_prog_compiler_pic=-Kconform_pic | |
da0f6381 PB |
14233 | fi |
14234 | ;; | |
14235 | ||
43e02a8a RW |
14236 | *) |
14237 | lt_prog_compiler_pic='-fPIC' | |
14238 | ;; | |
14239 | esac | |
14240 | ||
14241 | case $cc_basename in | |
14242 | nvcc*) # Cuda Compiler Driver 2.2 | |
14243 | lt_prog_compiler_wl='-Xlinker ' | |
14244 | lt_prog_compiler_pic='-Xcompiler -fPIC' | |
00020c16 ILT |
14245 | ;; |
14246 | esac | |
14247 | else | |
14248 | # PORTME Check for flag to pass linker flags through the system compiler. | |
14249 | case $host_os in | |
14250 | aix*) | |
14251 | lt_prog_compiler_wl='-Wl,' | |
da0f6381 | 14252 | if test "$host_cpu" = ia64; then |
00020c16 ILT |
14253 | # AIX 5 now supports IA64 processor |
14254 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 | 14255 | else |
00020c16 | 14256 | lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' |
da0f6381 | 14257 | fi |
00020c16 | 14258 | ;; |
da0f6381 | 14259 | |
00020c16 ILT |
14260 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
14261 | # This hack is so that the source file can tell whether it is being | |
14262 | # built for inclusion in a dll (and should export symbols for example). | |
14263 | lt_prog_compiler_pic='-DDLL_EXPORT' | |
14264 | ;; | |
da0f6381 | 14265 | |
00020c16 ILT |
14266 | hpux9* | hpux10* | hpux11*) |
14267 | lt_prog_compiler_wl='-Wl,' | |
14268 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
14269 | # not for PA HP-UX. | |
14270 | case $host_cpu in | |
14271 | hppa*64*|ia64*) | |
14272 | # +Z the default | |
14273 | ;; | |
14274 | *) | |
14275 | lt_prog_compiler_pic='+Z' | |
14276 | ;; | |
14277 | esac | |
14278 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
14279 | lt_prog_compiler_static='${wl}-a ${wl}archive' | |
14280 | ;; | |
da0f6381 | 14281 | |
00020c16 ILT |
14282 | irix5* | irix6* | nonstopux*) |
14283 | lt_prog_compiler_wl='-Wl,' | |
14284 | # PIC (with -KPIC) is the default. | |
14285 | lt_prog_compiler_static='-non_shared' | |
14286 | ;; | |
14287 | ||
14288 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
14289 | case $cc_basename in | |
14290 | # old Intel for x86_64 which still supported -KPIC. | |
14291 | ecc*) | |
14292 | lt_prog_compiler_wl='-Wl,' | |
14293 | lt_prog_compiler_pic='-KPIC' | |
14294 | lt_prog_compiler_static='-static' | |
14295 | ;; | |
14296 | # icc used to be incompatible with GCC. | |
14297 | # ICC 10 doesn't accept -KPIC any more. | |
14298 | icc* | ifort*) | |
14299 | lt_prog_compiler_wl='-Wl,' | |
14300 | lt_prog_compiler_pic='-fPIC' | |
14301 | lt_prog_compiler_static='-static' | |
14302 | ;; | |
14303 | # Lahey Fortran 8.1. | |
14304 | lf95*) | |
14305 | lt_prog_compiler_wl='-Wl,' | |
14306 | lt_prog_compiler_pic='--shared' | |
14307 | lt_prog_compiler_static='--static' | |
14308 | ;; | |
43e02a8a | 14309 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) |
00020c16 ILT |
14310 | # Portland Group compilers (*not* the Pentium gcc compiler, |
14311 | # which looks to be a dead project) | |
14312 | lt_prog_compiler_wl='-Wl,' | |
14313 | lt_prog_compiler_pic='-fpic' | |
14314 | lt_prog_compiler_static='-Bstatic' | |
14315 | ;; | |
14316 | ccc*) | |
14317 | lt_prog_compiler_wl='-Wl,' | |
14318 | # All Alpha code is PIC. | |
14319 | lt_prog_compiler_static='-non_shared' | |
14320 | ;; | |
43e02a8a RW |
14321 | xl* | bgxl* | bgf* | mpixl*) |
14322 | # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene | |
00020c16 ILT |
14323 | lt_prog_compiler_wl='-Wl,' |
14324 | lt_prog_compiler_pic='-qpic' | |
14325 | lt_prog_compiler_static='-qstaticlink' | |
14326 | ;; | |
14327 | *) | |
14328 | case `$CC -V 2>&1 | sed 5q` in | |
43e02a8a RW |
14329 | *Sun\ F* | *Sun*Fortran*) |
14330 | # Sun Fortran 8.3 passes all unrecognized flags to the linker | |
00020c16 ILT |
14331 | lt_prog_compiler_pic='-KPIC' |
14332 | lt_prog_compiler_static='-Bstatic' | |
43e02a8a | 14333 | lt_prog_compiler_wl='' |
00020c16 | 14334 | ;; |
43e02a8a RW |
14335 | *Sun\ C*) |
14336 | # Sun C 5.9 | |
00020c16 ILT |
14337 | lt_prog_compiler_pic='-KPIC' |
14338 | lt_prog_compiler_static='-Bstatic' | |
43e02a8a | 14339 | lt_prog_compiler_wl='-Wl,' |
da0f6381 PB |
14340 | ;; |
14341 | esac | |
00020c16 ILT |
14342 | ;; |
14343 | esac | |
14344 | ;; | |
da0f6381 | 14345 | |
00020c16 ILT |
14346 | newsos6) |
14347 | lt_prog_compiler_pic='-KPIC' | |
14348 | lt_prog_compiler_static='-Bstatic' | |
14349 | ;; | |
da0f6381 | 14350 | |
00020c16 ILT |
14351 | *nto* | *qnx*) |
14352 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
14353 | # it will coredump. | |
14354 | lt_prog_compiler_pic='-fPIC -shared' | |
14355 | ;; | |
da0f6381 | 14356 | |
00020c16 ILT |
14357 | osf3* | osf4* | osf5*) |
14358 | lt_prog_compiler_wl='-Wl,' | |
14359 | # All OSF/1 code is PIC. | |
14360 | lt_prog_compiler_static='-non_shared' | |
14361 | ;; | |
da0f6381 | 14362 | |
00020c16 ILT |
14363 | rdos*) |
14364 | lt_prog_compiler_static='-non_shared' | |
da0f6381 PB |
14365 | ;; |
14366 | ||
00020c16 ILT |
14367 | solaris*) |
14368 | lt_prog_compiler_pic='-KPIC' | |
14369 | lt_prog_compiler_static='-Bstatic' | |
14370 | case $cc_basename in | |
14371 | f77* | f90* | f95*) | |
14372 | lt_prog_compiler_wl='-Qoption ld ';; | |
14373 | *) | |
14374 | lt_prog_compiler_wl='-Wl,';; | |
5d47bb02 | 14375 | esac |
da0f6381 PB |
14376 | ;; |
14377 | ||
00020c16 ILT |
14378 | sunos4*) |
14379 | lt_prog_compiler_wl='-Qoption ld ' | |
14380 | lt_prog_compiler_pic='-PIC' | |
14381 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14382 | ;; |
14383 | ||
00020c16 ILT |
14384 | sysv4 | sysv4.2uw2* | sysv4.3*) |
14385 | lt_prog_compiler_wl='-Wl,' | |
14386 | lt_prog_compiler_pic='-KPIC' | |
14387 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14388 | ;; |
14389 | ||
00020c16 ILT |
14390 | sysv4*MP*) |
14391 | if test -d /usr/nec ;then | |
14392 | lt_prog_compiler_pic='-Kconform_pic' | |
14393 | lt_prog_compiler_static='-Bstatic' | |
14394 | fi | |
da0f6381 PB |
14395 | ;; |
14396 | ||
00020c16 ILT |
14397 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
14398 | lt_prog_compiler_wl='-Wl,' | |
14399 | lt_prog_compiler_pic='-KPIC' | |
14400 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14401 | ;; |
14402 | ||
00020c16 ILT |
14403 | unicos*) |
14404 | lt_prog_compiler_wl='-Wl,' | |
14405 | lt_prog_compiler_can_build_shared=no | |
da0f6381 PB |
14406 | ;; |
14407 | ||
00020c16 ILT |
14408 | uts4*) |
14409 | lt_prog_compiler_pic='-pic' | |
14410 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14411 | ;; |
14412 | ||
00020c16 ILT |
14413 | *) |
14414 | lt_prog_compiler_can_build_shared=no | |
da0f6381 | 14415 | ;; |
00020c16 ILT |
14416 | esac |
14417 | fi | |
da0f6381 | 14418 | |
00020c16 ILT |
14419 | case $host_os in |
14420 | # For platforms which do not support PIC, -DPIC is meaningless: | |
14421 | *djgpp*) | |
14422 | lt_prog_compiler_pic= | |
14423 | ;; | |
14424 | *) | |
14425 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | |
14426 | ;; | |
14427 | esac | |
5213506e RW |
14428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 |
14429 | $as_echo "$lt_prog_compiler_pic" >&6; } | |
da0f6381 | 14430 | |
da0f6381 | 14431 | |
da0f6381 | 14432 | |
da0f6381 | 14433 | |
da0f6381 | 14434 | |
da0f6381 | 14435 | |
00020c16 ILT |
14436 | # |
14437 | # Check to make sure the PIC flag actually works. | |
14438 | # | |
14439 | if test -n "$lt_prog_compiler_pic"; then | |
5213506e RW |
14440 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 |
14441 | $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } | |
14442 | if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : | |
14443 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14444 | else |
14445 | lt_cv_prog_compiler_pic_works=no | |
14446 | ac_outfile=conftest.$ac_objext | |
14447 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
14448 | lt_compiler_flag="$lt_prog_compiler_pic -DPIC" | |
14449 | # Insert the option either (1) after the last *FLAGS variable, or | |
14450 | # (2) before a word containing "conftest.", or (3) at the end. | |
14451 | # Note that $ac_compile itself does not contain backslashes and begins | |
14452 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14453 | # The option is referenced via a variable to avoid confusing sed. | |
14454 | lt_compile=`echo "$ac_compile" | $SED \ | |
14455 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14456 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14457 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14458 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14459 | (eval "$lt_compile" 2>conftest.err) |
14460 | ac_status=$? | |
14461 | cat conftest.err >&5 | |
43e02a8a | 14462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14463 | if (exit $ac_status) && test -s "$ac_outfile"; then |
14464 | # The compiler can only warn and ignore the option if not recognized | |
14465 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 14466 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
14467 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14468 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
14469 | lt_cv_prog_compiler_pic_works=yes | |
14470 | fi | |
14471 | fi | |
14472 | $RM conftest* | |
da0f6381 | 14473 | |
00020c16 | 14474 | fi |
5213506e RW |
14475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 |
14476 | $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } | |
da0f6381 | 14477 | |
00020c16 ILT |
14478 | if test x"$lt_cv_prog_compiler_pic_works" = xyes; then |
14479 | case $lt_prog_compiler_pic in | |
14480 | "" | " "*) ;; | |
14481 | *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; | |
14482 | esac | |
da0f6381 | 14483 | else |
00020c16 ILT |
14484 | lt_prog_compiler_pic= |
14485 | lt_prog_compiler_can_build_shared=no | |
da0f6381 | 14486 | fi |
da0f6381 | 14487 | |
00020c16 | 14488 | fi |
da0f6381 | 14489 | |
da0f6381 | 14490 | |
da0f6381 | 14491 | |
da0f6381 | 14492 | |
da0f6381 | 14493 | |
da0f6381 | 14494 | |
00020c16 ILT |
14495 | # |
14496 | # Check to make sure the static flag actually works. | |
14497 | # | |
14498 | wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" | |
5213506e RW |
14499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 |
14500 | $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } | |
14501 | if test "${lt_cv_prog_compiler_static_works+set}" = set; then : | |
14502 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14503 | else |
14504 | lt_cv_prog_compiler_static_works=no | |
14505 | save_LDFLAGS="$LDFLAGS" | |
14506 | LDFLAGS="$LDFLAGS $lt_tmp_static_flag" | |
14507 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
14508 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
14509 | # The linker can only warn and ignore the option if not recognized | |
14510 | # So say no if there are warnings | |
14511 | if test -s conftest.err; then | |
14512 | # Append any errors to the config.log. | |
14513 | cat conftest.err 1>&5 | |
43e02a8a | 14514 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp |
00020c16 ILT |
14515 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14516 | if diff conftest.exp conftest.er2 >/dev/null; then | |
14517 | lt_cv_prog_compiler_static_works=yes | |
14518 | fi | |
14519 | else | |
14520 | lt_cv_prog_compiler_static_works=yes | |
14521 | fi | |
14522 | fi | |
14523 | $RM -r conftest* | |
14524 | LDFLAGS="$save_LDFLAGS" | |
da0f6381 | 14525 | |
00020c16 | 14526 | fi |
5213506e RW |
14527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 |
14528 | $as_echo "$lt_cv_prog_compiler_static_works" >&6; } | |
da0f6381 | 14529 | |
00020c16 ILT |
14530 | if test x"$lt_cv_prog_compiler_static_works" = xyes; then |
14531 | : | |
14532 | else | |
14533 | lt_prog_compiler_static= | |
14534 | fi | |
da0f6381 | 14535 | |
da0f6381 | 14536 | |
da0f6381 | 14537 | |
da0f6381 | 14538 | |
da0f6381 | 14539 | |
da0f6381 | 14540 | |
da0f6381 | 14541 | |
5213506e RW |
14542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
14543 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
14544 | if test "${lt_cv_prog_compiler_c_o+set}" = set; then : | |
14545 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14546 | else |
14547 | lt_cv_prog_compiler_c_o=no | |
14548 | $RM -r conftest 2>/dev/null | |
14549 | mkdir conftest | |
14550 | cd conftest | |
14551 | mkdir out | |
14552 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 14553 | |
00020c16 ILT |
14554 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
14555 | # Insert the option either (1) after the last *FLAGS variable, or | |
14556 | # (2) before a word containing "conftest.", or (3) at the end. | |
14557 | # Note that $ac_compile itself does not contain backslashes and begins | |
14558 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14559 | lt_compile=`echo "$ac_compile" | $SED \ | |
14560 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14561 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14562 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14563 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14564 | (eval "$lt_compile" 2>out/conftest.err) |
14565 | ac_status=$? | |
14566 | cat out/conftest.err >&5 | |
43e02a8a | 14567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14568 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
14569 | then | |
14570 | # The compiler can only warn and ignore the option if not recognized | |
14571 | # So say no if there are warnings | |
43e02a8a | 14572 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
14573 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
14574 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
14575 | lt_cv_prog_compiler_c_o=yes | |
14576 | fi | |
14577 | fi | |
14578 | chmod u+w . 2>&5 | |
14579 | $RM conftest* | |
14580 | # SGI C++ compiler will create directory out/ii_files/ for | |
14581 | # template instantiation | |
14582 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
14583 | $RM out/* && rmdir out | |
14584 | cd .. | |
14585 | $RM -r conftest | |
14586 | $RM conftest* | |
da0f6381 | 14587 | |
00020c16 | 14588 | fi |
5213506e RW |
14589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 |
14590 | $as_echo "$lt_cv_prog_compiler_c_o" >&6; } | |
da0f6381 PB |
14591 | |
14592 | ||
14593 | ||
14594 | ||
14595 | ||
14596 | ||
5213506e RW |
14597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
14598 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
14599 | if test "${lt_cv_prog_compiler_c_o+set}" = set; then : | |
14600 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14601 | else |
14602 | lt_cv_prog_compiler_c_o=no | |
14603 | $RM -r conftest 2>/dev/null | |
14604 | mkdir conftest | |
14605 | cd conftest | |
14606 | mkdir out | |
14607 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 14608 | |
00020c16 ILT |
14609 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
14610 | # Insert the option either (1) after the last *FLAGS variable, or | |
14611 | # (2) before a word containing "conftest.", or (3) at the end. | |
14612 | # Note that $ac_compile itself does not contain backslashes and begins | |
14613 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14614 | lt_compile=`echo "$ac_compile" | $SED \ | |
14615 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14616 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14617 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14618 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14619 | (eval "$lt_compile" 2>out/conftest.err) |
14620 | ac_status=$? | |
14621 | cat out/conftest.err >&5 | |
43e02a8a | 14622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14623 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
14624 | then | |
14625 | # The compiler can only warn and ignore the option if not recognized | |
14626 | # So say no if there are warnings | |
43e02a8a | 14627 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
14628 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
14629 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
14630 | lt_cv_prog_compiler_c_o=yes | |
14631 | fi | |
14632 | fi | |
14633 | chmod u+w . 2>&5 | |
14634 | $RM conftest* | |
14635 | # SGI C++ compiler will create directory out/ii_files/ for | |
14636 | # template instantiation | |
14637 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
14638 | $RM out/* && rmdir out | |
14639 | cd .. | |
14640 | $RM -r conftest | |
14641 | $RM conftest* | |
da0f6381 | 14642 | |
00020c16 | 14643 | fi |
5213506e RW |
14644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 |
14645 | $as_echo "$lt_cv_prog_compiler_c_o" >&6; } | |
da0f6381 PB |
14646 | |
14647 | ||
14648 | ||
14649 | ||
00020c16 ILT |
14650 | hard_links="nottested" |
14651 | if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then | |
14652 | # do not overwrite the value of need_locks provided by the user | |
5213506e RW |
14653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 |
14654 | $as_echo_n "checking if we can lock with hard links... " >&6; } | |
00020c16 | 14655 | hard_links=yes |
baafc534 | 14656 | $RM conftest* |
00020c16 ILT |
14657 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
14658 | touch conftest.a | |
14659 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
14660 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
5213506e RW |
14661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 |
14662 | $as_echo "$hard_links" >&6; } | |
00020c16 | 14663 | if test "$hard_links" = no; then |
5213506e RW |
14664 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 |
14665 | $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | |
00020c16 | 14666 | need_locks=warn |
da0f6381 | 14667 | fi |
00020c16 ILT |
14668 | else |
14669 | need_locks=no | |
14670 | fi | |
da0f6381 PB |
14671 | |
14672 | ||
14673 | ||
14674 | ||
14675 | ||
14676 | ||
5213506e RW |
14677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
14678 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
da0f6381 | 14679 | |
00020c16 ILT |
14680 | runpath_var= |
14681 | allow_undefined_flag= | |
14682 | always_export_symbols=no | |
14683 | archive_cmds= | |
14684 | archive_expsym_cmds= | |
14685 | compiler_needs_object=no | |
14686 | enable_shared_with_static_runtimes=no | |
14687 | export_dynamic_flag_spec= | |
14688 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
14689 | hardcode_automatic=no | |
14690 | hardcode_direct=no | |
14691 | hardcode_direct_absolute=no | |
14692 | hardcode_libdir_flag_spec= | |
14693 | hardcode_libdir_flag_spec_ld= | |
14694 | hardcode_libdir_separator= | |
14695 | hardcode_minus_L=no | |
14696 | hardcode_shlibpath_var=unsupported | |
14697 | inherit_rpath=no | |
14698 | link_all_deplibs=unknown | |
14699 | module_cmds= | |
14700 | module_expsym_cmds= | |
14701 | old_archive_from_new_cmds= | |
14702 | old_archive_from_expsyms_cmds= | |
14703 | thread_safe_flag_spec= | |
14704 | whole_archive_flag_spec= | |
14705 | # include_expsyms should be a list of space-separated symbols to be *always* | |
14706 | # included in the symbol list | |
14707 | include_expsyms= | |
14708 | # exclude_expsyms can be an extended regexp of symbols to exclude | |
14709 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
14710 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
14711 | # as well as any symbol that contains `d'. | |
14712 | exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | |
14713 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
14714 | # platforms (ab)use it in PIC code, but their linkers get confused if | |
14715 | # the symbol is explicitly referenced. Since portable code cannot | |
14716 | # rely on this symbol name, it's probably fine to never include it in | |
14717 | # preloaded symbol tables. | |
14718 | # Exclude shared library initialization/finalization symbols. | |
14719 | extract_expsyms_cmds= | |
da0f6381 | 14720 | |
00020c16 ILT |
14721 | case $host_os in |
14722 | cygwin* | mingw* | pw32* | cegcc*) | |
14723 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
14724 | # When not using gcc, we currently assume that we are using | |
14725 | # Microsoft Visual C++. | |
14726 | if test "$GCC" != yes; then | |
14727 | with_gnu_ld=no | |
14728 | fi | |
14729 | ;; | |
14730 | interix*) | |
14731 | # we just hope/assume this is gcc and not c89 (= MSVC++) | |
14732 | with_gnu_ld=yes | |
14733 | ;; | |
14734 | openbsd*) | |
14735 | with_gnu_ld=no | |
14736 | ;; | |
14737 | esac | |
da0f6381 | 14738 | |
00020c16 | 14739 | ld_shlibs=yes |
43e02a8a RW |
14740 | |
14741 | # On some targets, GNU ld is compatible enough with the native linker | |
14742 | # that we're better off using the native interface for both. | |
14743 | lt_use_gnu_ld_interface=no | |
00020c16 | 14744 | if test "$with_gnu_ld" = yes; then |
43e02a8a RW |
14745 | case $host_os in |
14746 | aix*) | |
14747 | # The AIX port of GNU ld has always aspired to compatibility | |
14748 | # with the native linker. However, as the warning in the GNU ld | |
14749 | # block says, versions before 2.19.5* couldn't really create working | |
14750 | # shared libraries, regardless of the interface used. | |
14751 | case `$LD -v 2>&1` in | |
14752 | *\ \(GNU\ Binutils\)\ 2.19.5*) ;; | |
14753 | *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; | |
14754 | *\ \(GNU\ Binutils\)\ [3-9]*) ;; | |
14755 | *) | |
14756 | lt_use_gnu_ld_interface=yes | |
14757 | ;; | |
14758 | esac | |
14759 | ;; | |
14760 | *) | |
14761 | lt_use_gnu_ld_interface=yes | |
14762 | ;; | |
14763 | esac | |
14764 | fi | |
14765 | ||
14766 | if test "$lt_use_gnu_ld_interface" = yes; then | |
00020c16 ILT |
14767 | # If archive_cmds runs LD, not CC, wlarc should be empty |
14768 | wlarc='${wl}' | |
da0f6381 | 14769 | |
00020c16 ILT |
14770 | # Set some defaults for GNU ld with shared library support. These |
14771 | # are reset later if shared libraries are not supported. Putting them | |
14772 | # here allows them to be overridden if necessary. | |
14773 | runpath_var=LD_RUN_PATH | |
14774 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
14775 | export_dynamic_flag_spec='${wl}--export-dynamic' | |
14776 | # ancient GNU ld didn't support --whole-archive et. al. | |
14777 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | |
14778 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
14779 | else | |
14780 | whole_archive_flag_spec= | |
14781 | fi | |
14782 | supports_anon_versioning=no | |
14783 | case `$LD -v 2>&1` in | |
43e02a8a | 14784 | *GNU\ gold*) supports_anon_versioning=yes ;; |
00020c16 ILT |
14785 | *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 |
14786 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | |
14787 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | |
14788 | *\ 2.11.*) ;; # other 2.11 versions | |
14789 | *) supports_anon_versioning=yes ;; | |
14790 | esac | |
da0f6381 | 14791 | |
00020c16 ILT |
14792 | # See if GNU ld supports shared libraries. |
14793 | case $host_os in | |
14794 | aix[3-9]*) | |
14795 | # On AIX/PPC, the GNU linker is very broken | |
14796 | if test "$host_cpu" != ia64; then | |
14797 | ld_shlibs=no | |
14798 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 14799 | |
43e02a8a | 14800 | *** Warning: the GNU linker, at least up to release 2.19, is reported |
00020c16 ILT |
14801 | *** to be unable to reliably create shared libraries on AIX. |
14802 | *** Therefore, libtool is disabling shared libraries support. If you | |
43e02a8a RW |
14803 | *** really care for shared libraries, you may want to install binutils |
14804 | *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. | |
14805 | *** You will then need to restart the configuration process. | |
da0f6381 | 14806 | |
00020c16 ILT |
14807 | _LT_EOF |
14808 | fi | |
14809 | ;; | |
da0f6381 | 14810 | |
00020c16 ILT |
14811 | amigaos*) |
14812 | case $host_cpu in | |
14813 | powerpc) | |
14814 | # see comment about AmigaOS4 .so support | |
14815 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14816 | archive_expsym_cmds='' | |
14817 | ;; | |
14818 | m68k) | |
14819 | archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
14820 | hardcode_libdir_flag_spec='-L$libdir' | |
14821 | hardcode_minus_L=yes | |
14822 | ;; | |
14823 | esac | |
14824 | ;; | |
da0f6381 | 14825 | |
00020c16 ILT |
14826 | beos*) |
14827 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
14828 | allow_undefined_flag=unsupported | |
14829 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
14830 | # support --undefined. This deserves some investigation. FIXME | |
14831 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14832 | else | |
14833 | ld_shlibs=no | |
14834 | fi | |
14835 | ;; | |
da0f6381 | 14836 | |
00020c16 ILT |
14837 | cygwin* | mingw* | pw32* | cegcc*) |
14838 | # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, | |
14839 | # as there is no search path for DLLs. | |
14840 | hardcode_libdir_flag_spec='-L$libdir' | |
43e02a8a | 14841 | export_dynamic_flag_spec='${wl}--export-all-symbols' |
00020c16 ILT |
14842 | allow_undefined_flag=unsupported |
14843 | always_export_symbols=no | |
14844 | enable_shared_with_static_runtimes=yes | |
14845 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | |
da0f6381 | 14846 | |
00020c16 ILT |
14847 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then |
14848 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
14849 | # If the export-symbols file already is a .def file (1st line | |
14850 | # is EXPORTS), use it as is; otherwise, prepend... | |
14851 | archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
14852 | cp $export_symbols $output_objdir/$soname.def; | |
14853 | else | |
14854 | echo EXPORTS > $output_objdir/$soname.def; | |
14855 | cat $export_symbols >> $output_objdir/$soname.def; | |
14856 | fi~ | |
14857 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
14858 | else | |
14859 | ld_shlibs=no | |
14860 | fi | |
14861 | ;; | |
da0f6381 | 14862 | |
43e02a8a RW |
14863 | haiku*) |
14864 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14865 | link_all_deplibs=yes | |
14866 | ;; | |
14867 | ||
00020c16 ILT |
14868 | interix[3-9]*) |
14869 | hardcode_direct=no | |
14870 | hardcode_shlibpath_var=no | |
14871 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
14872 | export_dynamic_flag_spec='${wl}-E' | |
14873 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
14874 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
14875 | # default) and relocated if they conflict, which is a slow very memory | |
14876 | # consuming and fragmenting process. To avoid this, we pick a random, | |
14877 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
14878 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
14879 | archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
14880 | archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
14881 | ;; | |
da0f6381 | 14882 | |
00020c16 ILT |
14883 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
14884 | tmp_diet=no | |
14885 | if test "$host_os" = linux-dietlibc; then | |
14886 | case $cc_basename in | |
14887 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | |
14888 | esac | |
14889 | fi | |
14890 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | |
14891 | && test "$tmp_diet" = no | |
14892 | then | |
14893 | tmp_addflag= | |
14894 | tmp_sharedflag='-shared' | |
14895 | case $cc_basename,$host_cpu in | |
14896 | pgcc*) # Portland Group C compiler | |
43e02a8a | 14897 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
14898 | tmp_addflag=' $pic_flag' |
14899 | ;; | |
43e02a8a RW |
14900 | pgf77* | pgf90* | pgf95* | pgfortran*) |
14901 | # Portland Group f77 and f90 compilers | |
14902 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | |
00020c16 ILT |
14903 | tmp_addflag=' $pic_flag -Mnomain' ;; |
14904 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | |
14905 | tmp_addflag=' -i_dynamic' ;; | |
14906 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | |
14907 | tmp_addflag=' -i_dynamic -nofor_main' ;; | |
14908 | ifc* | ifort*) # Intel Fortran compiler | |
14909 | tmp_addflag=' -nofor_main' ;; | |
14910 | lf95*) # Lahey Fortran 8.1 | |
14911 | whole_archive_flag_spec= | |
14912 | tmp_sharedflag='--shared' ;; | |
43e02a8a | 14913 | xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) |
00020c16 ILT |
14914 | tmp_sharedflag='-qmkshrobj' |
14915 | tmp_addflag= ;; | |
43e02a8a RW |
14916 | nvcc*) # Cuda Compiler Driver 2.2 |
14917 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | |
14918 | compiler_needs_object=yes | |
14919 | ;; | |
00020c16 ILT |
14920 | esac |
14921 | case `$CC -V 2>&1 | sed 5q` in | |
14922 | *Sun\ C*) # Sun C 5.9 | |
43e02a8a | 14923 | whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
14924 | compiler_needs_object=yes |
14925 | tmp_sharedflag='-G' ;; | |
14926 | *Sun\ F*) # Sun Fortran 8.3 | |
14927 | tmp_sharedflag='-G' ;; | |
14928 | esac | |
14929 | archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
da0f6381 | 14930 | |
00020c16 ILT |
14931 | if test "x$supports_anon_versioning" = xyes; then |
14932 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | |
14933 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
14934 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
14935 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
14936 | fi | |
da0f6381 | 14937 | |
00020c16 | 14938 | case $cc_basename in |
43e02a8a | 14939 | xlf* | bgf* | bgxlf* | mpixlf*) |
00020c16 ILT |
14940 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself |
14941 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | |
14942 | hardcode_libdir_flag_spec= | |
14943 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | |
14944 | archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | |
14945 | if test "x$supports_anon_versioning" = xyes; then | |
14946 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | |
14947 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
14948 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
14949 | $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | |
14950 | fi | |
14951 | ;; | |
14952 | esac | |
14953 | else | |
14954 | ld_shlibs=no | |
14955 | fi | |
14956 | ;; | |
da0f6381 | 14957 | |
00020c16 ILT |
14958 | netbsd*) |
14959 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
14960 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
14961 | wlarc= | |
14962 | else | |
14963 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14964 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
14965 | fi | |
14966 | ;; | |
da0f6381 | 14967 | |
00020c16 ILT |
14968 | solaris*) |
14969 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | |
14970 | ld_shlibs=no | |
14971 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 14972 | |
00020c16 ILT |
14973 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
14974 | *** create shared libraries on Solaris systems. Therefore, libtool | |
14975 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
14976 | *** binutils to release 2.9.1 or newer. Another option is to modify | |
14977 | *** your PATH or compiler configuration so that the native linker is | |
14978 | *** used, and then restart. | |
da0f6381 | 14979 | |
00020c16 ILT |
14980 | _LT_EOF |
14981 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
14982 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14983 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
14984 | else | |
14985 | ld_shlibs=no | |
14986 | fi | |
14987 | ;; | |
da0f6381 | 14988 | |
00020c16 ILT |
14989 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
14990 | case `$LD -v 2>&1` in | |
14991 | *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) | |
14992 | ld_shlibs=no | |
14993 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 14994 | |
00020c16 ILT |
14995 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not |
14996 | *** reliably create shared libraries on SCO systems. Therefore, libtool | |
14997 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
14998 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | |
14999 | *** your PATH or compiler configuration so that the native linker is | |
15000 | *** used, and then restart. | |
da0f6381 | 15001 | |
00020c16 ILT |
15002 | _LT_EOF |
15003 | ;; | |
15004 | *) | |
15005 | # For security reasons, it is highly recommended that you always | |
15006 | # use absolute paths for naming shared libraries, and exclude the | |
15007 | # DT_RUNPATH tag from executables and libraries. But doing so | |
15008 | # requires that you compile everything twice, which is a pain. | |
15009 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
15010 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15011 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15012 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
15013 | else | |
15014 | ld_shlibs=no | |
15015 | fi | |
15016 | ;; | |
15017 | esac | |
15018 | ;; | |
da0f6381 | 15019 | |
00020c16 ILT |
15020 | sunos4*) |
15021 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15022 | wlarc= | |
15023 | hardcode_direct=yes | |
15024 | hardcode_shlibpath_var=no | |
15025 | ;; | |
da0f6381 | 15026 | |
00020c16 ILT |
15027 | *) |
15028 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
15029 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15030 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
15031 | else | |
15032 | ld_shlibs=no | |
15033 | fi | |
15034 | ;; | |
15035 | esac | |
da0f6381 | 15036 | |
00020c16 ILT |
15037 | if test "$ld_shlibs" = no; then |
15038 | runpath_var= | |
15039 | hardcode_libdir_flag_spec= | |
15040 | export_dynamic_flag_spec= | |
15041 | whole_archive_flag_spec= | |
15042 | fi | |
15043 | else | |
15044 | # PORTME fill in a description of your system's linker (not GNU ld) | |
15045 | case $host_os in | |
15046 | aix3*) | |
15047 | allow_undefined_flag=unsupported | |
15048 | always_export_symbols=yes | |
15049 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | |
15050 | # Note: this linker hardcodes the directories in LIBPATH if there | |
15051 | # are no directories specified by -L. | |
15052 | hardcode_minus_L=yes | |
15053 | if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | |
15054 | # Neither direct hardcoding nor static linking is supported with a | |
15055 | # broken collect2. | |
15056 | hardcode_direct=unsupported | |
15057 | fi | |
15058 | ;; | |
da0f6381 | 15059 | |
00020c16 ILT |
15060 | aix[4-9]*) |
15061 | if test "$host_cpu" = ia64; then | |
15062 | # On IA64, the linker does run time linking by default, so we don't | |
15063 | # have to do anything special. | |
15064 | aix_use_runtimelinking=no | |
15065 | exp_sym_flag='-Bexport' | |
15066 | no_entry_flag="" | |
15067 | else | |
15068 | # If we're using GNU nm, then we don't want the "-C" option. | |
15069 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
43e02a8a RW |
15070 | # Also, AIX nm treats weak defined symbols like other global |
15071 | # defined symbols, whereas GNU nm marks them as "W". | |
00020c16 | 15072 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
43e02a8a | 15073 | export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
00020c16 ILT |
15074 | else |
15075 | export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
15076 | fi | |
15077 | aix_use_runtimelinking=no | |
da0f6381 | 15078 | |
00020c16 ILT |
15079 | # Test if we are trying to use run time linking or normal |
15080 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
15081 | # need to do runtime linking. | |
15082 | case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) | |
15083 | for ld_flag in $LDFLAGS; do | |
15084 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
15085 | aix_use_runtimelinking=yes | |
15086 | break | |
15087 | fi | |
15088 | done | |
15089 | ;; | |
15090 | esac | |
da0f6381 | 15091 | |
00020c16 ILT |
15092 | exp_sym_flag='-bexport' |
15093 | no_entry_flag='-bnoentry' | |
15094 | fi | |
da0f6381 | 15095 | |
00020c16 ILT |
15096 | # When large executables or shared objects are built, AIX ld can |
15097 | # have problems creating the table of contents. If linking a library | |
15098 | # or program results in "error TOC overflow" add -mminimal-toc to | |
15099 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
15100 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
da0f6381 | 15101 | |
00020c16 ILT |
15102 | archive_cmds='' |
15103 | hardcode_direct=yes | |
15104 | hardcode_direct_absolute=yes | |
15105 | hardcode_libdir_separator=':' | |
15106 | link_all_deplibs=yes | |
15107 | file_list_spec='${wl}-f,' | |
da0f6381 | 15108 | |
00020c16 ILT |
15109 | if test "$GCC" = yes; then |
15110 | case $host_os in aix4.[012]|aix4.[012].*) | |
15111 | # We only want to do this on AIX 4.2 and lower, the check | |
15112 | # below for broken collect2 doesn't work under 4.3+ | |
15113 | collect2name=`${CC} -print-prog-name=collect2` | |
15114 | if test -f "$collect2name" && | |
15115 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
15116 | then | |
15117 | # We have reworked collect2 | |
15118 | : | |
15119 | else | |
15120 | # We have old collect2 | |
15121 | hardcode_direct=unsupported | |
15122 | # It fails to find uninstalled libraries when the uninstalled | |
15123 | # path is not listed in the libpath. Setting hardcode_minus_L | |
15124 | # to unsupported forces relinking | |
15125 | hardcode_minus_L=yes | |
15126 | hardcode_libdir_flag_spec='-L$libdir' | |
15127 | hardcode_libdir_separator= | |
15128 | fi | |
15129 | ;; | |
15130 | esac | |
15131 | shared_flag='-shared' | |
15132 | if test "$aix_use_runtimelinking" = yes; then | |
15133 | shared_flag="$shared_flag "'${wl}-G' | |
15134 | fi | |
15135 | else | |
15136 | # not using gcc | |
15137 | if test "$host_cpu" = ia64; then | |
15138 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
15139 | # chokes on -Wl,-G. The following line is correct: | |
15140 | shared_flag='-G' | |
15141 | else | |
15142 | if test "$aix_use_runtimelinking" = yes; then | |
15143 | shared_flag='${wl}-G' | |
15144 | else | |
15145 | shared_flag='${wl}-bM:SRE' | |
15146 | fi | |
15147 | fi | |
15148 | fi | |
da0f6381 | 15149 | |
00020c16 ILT |
15150 | export_dynamic_flag_spec='${wl}-bexpall' |
15151 | # It seems that -bexpall does not export symbols beginning with | |
15152 | # underscore (_), so it is better to generate a list of symbols to export. | |
15153 | always_export_symbols=yes | |
15154 | if test "$aix_use_runtimelinking" = yes; then | |
15155 | # Warning - without using the other runtime loading flags (-brtl), | |
15156 | # -berok will link without error, but may produce a broken library. | |
15157 | allow_undefined_flag='-berok' | |
15158 | # Determine the default libpath from the value encoded in an | |
15159 | # empty executable. | |
5213506e | 15160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 15161 | /* end confdefs.h. */ |
da0f6381 | 15162 | |
00020c16 ILT |
15163 | int |
15164 | main () | |
15165 | { | |
da0f6381 | 15166 | |
00020c16 ILT |
15167 | ; |
15168 | return 0; | |
15169 | } | |
15170 | _ACEOF | |
5213506e | 15171 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 | 15172 | |
00020c16 ILT |
15173 | lt_aix_libpath_sed=' |
15174 | /Import File Strings/,/^$/ { | |
15175 | /^0/ { | |
15176 | s/^0 *\(.*\)$/\1/ | |
15177 | p | |
15178 | } | |
15179 | }' | |
15180 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15181 | # Check for a 64-bit object if we didn't find anything. | |
15182 | if test -z "$aix_libpath"; then | |
15183 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15184 | fi | |
00020c16 | 15185 | fi |
5213506e RW |
15186 | rm -f core conftest.err conftest.$ac_objext \ |
15187 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 | 15188 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
da0f6381 | 15189 | |
00020c16 | 15190 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
43e02a8a | 15191 | archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
00020c16 ILT |
15192 | else |
15193 | if test "$host_cpu" = ia64; then | |
15194 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | |
15195 | allow_undefined_flag="-z nodefs" | |
15196 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
15197 | else | |
15198 | # Determine the default libpath from the value encoded in an | |
15199 | # empty executable. | |
5213506e | 15200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 15201 | /* end confdefs.h. */ |
da0f6381 | 15202 | |
00020c16 ILT |
15203 | int |
15204 | main () | |
15205 | { | |
da0f6381 | 15206 | |
00020c16 ILT |
15207 | ; |
15208 | return 0; | |
15209 | } | |
15210 | _ACEOF | |
5213506e | 15211 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 | 15212 | |
00020c16 ILT |
15213 | lt_aix_libpath_sed=' |
15214 | /Import File Strings/,/^$/ { | |
15215 | /^0/ { | |
15216 | s/^0 *\(.*\)$/\1/ | |
15217 | p | |
15218 | } | |
15219 | }' | |
15220 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15221 | # Check for a 64-bit object if we didn't find anything. | |
15222 | if test -z "$aix_libpath"; then | |
15223 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15224 | fi | |
00020c16 | 15225 | fi |
5213506e RW |
15226 | rm -f core conftest.err conftest.$ac_objext \ |
15227 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 | 15228 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
da0f6381 | 15229 | |
00020c16 ILT |
15230 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
15231 | # Warning - without using the other run time loading flags, | |
15232 | # -berok will link without error, but may produce a broken library. | |
15233 | no_undefined_flag=' ${wl}-bernotok' | |
15234 | allow_undefined_flag=' ${wl}-berok' | |
43e02a8a RW |
15235 | if test "$with_gnu_ld" = yes; then |
15236 | # We only use this code for GNU lds that support --whole-archive. | |
15237 | whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
15238 | else | |
15239 | # Exported symbols can be pulled into shared objects from archives | |
15240 | whole_archive_flag_spec='$convenience' | |
15241 | fi | |
00020c16 ILT |
15242 | archive_cmds_need_lc=yes |
15243 | # This is similar to how AIX traditionally builds its shared libraries. | |
15244 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
15245 | fi | |
15246 | fi | |
15247 | ;; | |
da0f6381 | 15248 | |
00020c16 ILT |
15249 | amigaos*) |
15250 | case $host_cpu in | |
15251 | powerpc) | |
15252 | # see comment about AmigaOS4 .so support | |
15253 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15254 | archive_expsym_cmds='' | |
15255 | ;; | |
15256 | m68k) | |
15257 | archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
15258 | hardcode_libdir_flag_spec='-L$libdir' | |
15259 | hardcode_minus_L=yes | |
15260 | ;; | |
15261 | esac | |
15262 | ;; | |
da0f6381 | 15263 | |
00020c16 ILT |
15264 | bsdi[45]*) |
15265 | export_dynamic_flag_spec=-rdynamic | |
15266 | ;; | |
da0f6381 | 15267 | |
00020c16 ILT |
15268 | cygwin* | mingw* | pw32* | cegcc*) |
15269 | # When not using gcc, we currently assume that we are using | |
15270 | # Microsoft Visual C++. | |
15271 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
15272 | # no search path for DLLs. | |
15273 | hardcode_libdir_flag_spec=' ' | |
15274 | allow_undefined_flag=unsupported | |
15275 | # Tell ltmain to make .lib files, not .a files. | |
15276 | libext=lib | |
15277 | # Tell ltmain to make .dll files, not .so files. | |
15278 | shrext_cmds=".dll" | |
15279 | # FIXME: Setting linknames here is a bad hack. | |
43e02a8a | 15280 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' |
00020c16 ILT |
15281 | # The linker will automatically build a .lib file if we build a DLL. |
15282 | old_archive_from_new_cmds='true' | |
15283 | # FIXME: Should let the user specify the lib program. | |
15284 | old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | |
15285 | fix_srcfile_path='`cygpath -w "$srcfile"`' | |
15286 | enable_shared_with_static_runtimes=yes | |
15287 | ;; | |
da0f6381 | 15288 | |
00020c16 | 15289 | darwin* | rhapsody*) |
da0f6381 PB |
15290 | |
15291 | ||
00020c16 ILT |
15292 | archive_cmds_need_lc=no |
15293 | hardcode_direct=no | |
15294 | hardcode_automatic=yes | |
15295 | hardcode_shlibpath_var=unsupported | |
43e02a8a RW |
15296 | if test "$lt_cv_ld_force_load" = "yes"; then |
15297 | whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | |
15298 | else | |
15299 | whole_archive_flag_spec='' | |
15300 | fi | |
00020c16 ILT |
15301 | link_all_deplibs=yes |
15302 | allow_undefined_flag="$_lt_dar_allow_undefined" | |
15303 | case $cc_basename in | |
15304 | ifort*) _lt_dar_can_shared=yes ;; | |
15305 | *) _lt_dar_can_shared=$GCC ;; | |
15306 | esac | |
15307 | if test "$_lt_dar_can_shared" = "yes"; then | |
43e02a8a | 15308 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
15309 | archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
15310 | module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
15311 | archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
15312 | module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
da0f6381 | 15313 | |
00020c16 ILT |
15314 | else |
15315 | ld_shlibs=no | |
15316 | fi | |
da0f6381 | 15317 | |
00020c16 | 15318 | ;; |
da0f6381 | 15319 | |
00020c16 ILT |
15320 | dgux*) |
15321 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15322 | hardcode_libdir_flag_spec='-L$libdir' | |
15323 | hardcode_shlibpath_var=no | |
15324 | ;; | |
da0f6381 | 15325 | |
00020c16 ILT |
15326 | freebsd1*) |
15327 | ld_shlibs=no | |
15328 | ;; | |
da0f6381 | 15329 | |
00020c16 ILT |
15330 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
15331 | # support. Future versions do this automatically, but an explicit c++rt0.o | |
15332 | # does not break anything, and helps significantly (at the cost of a little | |
15333 | # extra space). | |
15334 | freebsd2.2*) | |
15335 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
15336 | hardcode_libdir_flag_spec='-R$libdir' | |
15337 | hardcode_direct=yes | |
15338 | hardcode_shlibpath_var=no | |
15339 | ;; | |
da0f6381 | 15340 | |
00020c16 ILT |
15341 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
15342 | freebsd2*) | |
15343 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15344 | hardcode_direct=yes | |
15345 | hardcode_minus_L=yes | |
15346 | hardcode_shlibpath_var=no | |
15347 | ;; | |
da0f6381 | 15348 | |
00020c16 ILT |
15349 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
15350 | freebsd* | dragonfly*) | |
15351 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
15352 | hardcode_libdir_flag_spec='-R$libdir' | |
15353 | hardcode_direct=yes | |
15354 | hardcode_shlibpath_var=no | |
15355 | ;; | |
da0f6381 | 15356 | |
00020c16 ILT |
15357 | hpux9*) |
15358 | if test "$GCC" = yes; then | |
15359 | archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
15360 | else | |
15361 | archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
15362 | fi | |
15363 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15364 | hardcode_libdir_separator=: | |
15365 | hardcode_direct=yes | |
da0f6381 | 15366 | |
00020c16 ILT |
15367 | # hardcode_minus_L: Not really in the search PATH, |
15368 | # but as the default location of the library. | |
15369 | hardcode_minus_L=yes | |
15370 | export_dynamic_flag_spec='${wl}-E' | |
15371 | ;; | |
da0f6381 | 15372 | |
00020c16 | 15373 | hpux10*) |
43e02a8a | 15374 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then |
00020c16 ILT |
15375 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
15376 | else | |
15377 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
15378 | fi | |
15379 | if test "$with_gnu_ld" = no; then | |
15380 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15381 | hardcode_libdir_flag_spec_ld='+b $libdir' | |
15382 | hardcode_libdir_separator=: | |
15383 | hardcode_direct=yes | |
15384 | hardcode_direct_absolute=yes | |
15385 | export_dynamic_flag_spec='${wl}-E' | |
15386 | # hardcode_minus_L: Not really in the search PATH, | |
15387 | # but as the default location of the library. | |
15388 | hardcode_minus_L=yes | |
15389 | fi | |
15390 | ;; | |
da0f6381 | 15391 | |
00020c16 | 15392 | hpux11*) |
43e02a8a | 15393 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then |
00020c16 ILT |
15394 | case $host_cpu in |
15395 | hppa*64*) | |
15396 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15397 | ;; | |
15398 | ia64*) | |
15399 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
15400 | ;; | |
15401 | *) | |
15402 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
15403 | ;; | |
15404 | esac | |
15405 | else | |
15406 | case $host_cpu in | |
15407 | hppa*64*) | |
15408 | archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15409 | ;; | |
15410 | ia64*) | |
15411 | archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
15412 | ;; | |
15413 | *) | |
43e02a8a RW |
15414 | |
15415 | # Older versions of the 11.00 compiler do not understand -b yet | |
15416 | # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) | |
15417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 | |
15418 | $as_echo_n "checking if $CC understands -b... " >&6; } | |
15419 | if test "${lt_cv_prog_compiler__b+set}" = set; then : | |
15420 | $as_echo_n "(cached) " >&6 | |
15421 | else | |
15422 | lt_cv_prog_compiler__b=no | |
15423 | save_LDFLAGS="$LDFLAGS" | |
15424 | LDFLAGS="$LDFLAGS -b" | |
15425 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
15426 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
15427 | # The linker can only warn and ignore the option if not recognized | |
15428 | # So say no if there are warnings | |
15429 | if test -s conftest.err; then | |
15430 | # Append any errors to the config.log. | |
15431 | cat conftest.err 1>&5 | |
15432 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp | |
15433 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
15434 | if diff conftest.exp conftest.er2 >/dev/null; then | |
15435 | lt_cv_prog_compiler__b=yes | |
15436 | fi | |
15437 | else | |
15438 | lt_cv_prog_compiler__b=yes | |
15439 | fi | |
15440 | fi | |
15441 | $RM -r conftest* | |
15442 | LDFLAGS="$save_LDFLAGS" | |
15443 | ||
15444 | fi | |
15445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 | |
15446 | $as_echo "$lt_cv_prog_compiler__b" >&6; } | |
15447 | ||
15448 | if test x"$lt_cv_prog_compiler__b" = xyes; then | |
15449 | archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
15450 | else | |
15451 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
15452 | fi | |
15453 | ||
00020c16 ILT |
15454 | ;; |
15455 | esac | |
15456 | fi | |
15457 | if test "$with_gnu_ld" = no; then | |
15458 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15459 | hardcode_libdir_separator=: | |
da0f6381 | 15460 | |
00020c16 ILT |
15461 | case $host_cpu in |
15462 | hppa*64*|ia64*) | |
15463 | hardcode_direct=no | |
15464 | hardcode_shlibpath_var=no | |
15465 | ;; | |
15466 | *) | |
15467 | hardcode_direct=yes | |
15468 | hardcode_direct_absolute=yes | |
15469 | export_dynamic_flag_spec='${wl}-E' | |
da0f6381 | 15470 | |
00020c16 ILT |
15471 | # hardcode_minus_L: Not really in the search PATH, |
15472 | # but as the default location of the library. | |
15473 | hardcode_minus_L=yes | |
15474 | ;; | |
15475 | esac | |
15476 | fi | |
15477 | ;; | |
da0f6381 | 15478 | |
00020c16 ILT |
15479 | irix5* | irix6* | nonstopux*) |
15480 | if test "$GCC" = yes; then | |
43e02a8a | 15481 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15482 | # Try to use the -exported_symbol ld option, if it does not |
15483 | # work, assume that -exports_file does not work either and | |
15484 | # implicitly export all symbols. | |
15485 | save_LDFLAGS="$LDFLAGS" | |
15486 | LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | |
5213506e RW |
15487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15488 | /* end confdefs.h. */ | |
00020c16 ILT |
15489 | int foo(void) {} |
15490 | _ACEOF | |
5213506e | 15491 | if ac_fn_c_try_link "$LINENO"; then : |
43e02a8a | 15492 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' |
da0f6381 | 15493 | |
00020c16 | 15494 | fi |
5213506e RW |
15495 | rm -f core conftest.err conftest.$ac_objext \ |
15496 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
15497 | LDFLAGS="$save_LDFLAGS" |
15498 | else | |
43e02a8a RW |
15499 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
15500 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' | |
00020c16 ILT |
15501 | fi |
15502 | archive_cmds_need_lc='no' | |
15503 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15504 | hardcode_libdir_separator=: | |
15505 | inherit_rpath=yes | |
15506 | link_all_deplibs=yes | |
15507 | ;; | |
da0f6381 | 15508 | |
00020c16 ILT |
15509 | netbsd*) |
15510 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
15511 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
15512 | else | |
15513 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
15514 | fi | |
15515 | hardcode_libdir_flag_spec='-R$libdir' | |
15516 | hardcode_direct=yes | |
15517 | hardcode_shlibpath_var=no | |
15518 | ;; | |
da0f6381 | 15519 | |
00020c16 ILT |
15520 | newsos6) |
15521 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15522 | hardcode_direct=yes | |
15523 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15524 | hardcode_libdir_separator=: | |
15525 | hardcode_shlibpath_var=no | |
15526 | ;; | |
da0f6381 | 15527 | |
00020c16 ILT |
15528 | *nto* | *qnx*) |
15529 | ;; | |
da0f6381 | 15530 | |
00020c16 ILT |
15531 | openbsd*) |
15532 | if test -f /usr/libexec/ld.so; then | |
15533 | hardcode_direct=yes | |
15534 | hardcode_shlibpath_var=no | |
15535 | hardcode_direct_absolute=yes | |
15536 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
15537 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
15538 | archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | |
15539 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
15540 | export_dynamic_flag_spec='${wl}-E' | |
15541 | else | |
15542 | case $host_os in | |
15543 | openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | |
15544 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15545 | hardcode_libdir_flag_spec='-R$libdir' | |
15546 | ;; | |
15547 | *) | |
15548 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
15549 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
15550 | ;; | |
15551 | esac | |
15552 | fi | |
15553 | else | |
15554 | ld_shlibs=no | |
15555 | fi | |
15556 | ;; | |
da0f6381 | 15557 | |
00020c16 ILT |
15558 | os2*) |
15559 | hardcode_libdir_flag_spec='-L$libdir' | |
15560 | hardcode_minus_L=yes | |
15561 | allow_undefined_flag=unsupported | |
43e02a8a | 15562 | archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
00020c16 ILT |
15563 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
15564 | ;; | |
da0f6381 | 15565 | |
00020c16 ILT |
15566 | osf3*) |
15567 | if test "$GCC" = yes; then | |
15568 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 15569 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15570 | else |
15571 | allow_undefined_flag=' -expect_unresolved \*' | |
43e02a8a | 15572 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15573 | fi |
15574 | archive_cmds_need_lc='no' | |
15575 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15576 | hardcode_libdir_separator=: | |
15577 | ;; | |
da0f6381 | 15578 | |
00020c16 ILT |
15579 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
15580 | if test "$GCC" = yes; then | |
15581 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 15582 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15583 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
15584 | else | |
15585 | allow_undefined_flag=' -expect_unresolved \*' | |
43e02a8a | 15586 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 | 15587 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ |
43e02a8a | 15588 | $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' |
da0f6381 | 15589 | |
00020c16 ILT |
15590 | # Both c and cxx compiler support -rpath directly |
15591 | hardcode_libdir_flag_spec='-rpath $libdir' | |
15592 | fi | |
15593 | archive_cmds_need_lc='no' | |
15594 | hardcode_libdir_separator=: | |
15595 | ;; | |
da0f6381 | 15596 | |
00020c16 ILT |
15597 | solaris*) |
15598 | no_undefined_flag=' -z defs' | |
15599 | if test "$GCC" = yes; then | |
15600 | wlarc='${wl}' | |
15601 | archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15602 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15603 | $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
15604 | else | |
15605 | case `$CC -V 2>&1` in | |
15606 | *"Compilers 5.0"*) | |
15607 | wlarc='' | |
15608 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15609 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15610 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | |
15611 | ;; | |
15612 | *) | |
15613 | wlarc='${wl}' | |
15614 | archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
15615 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15616 | $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
15617 | ;; | |
15618 | esac | |
15619 | fi | |
15620 | hardcode_libdir_flag_spec='-R$libdir' | |
15621 | hardcode_shlibpath_var=no | |
15622 | case $host_os in | |
15623 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
15624 | *) | |
15625 | # The compiler driver will combine and reorder linker options, | |
15626 | # but understands `-z linker_flag'. GCC discards it without `$wl', | |
15627 | # but is careful enough not to reorder. | |
15628 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
15629 | if test "$GCC" = yes; then | |
15630 | whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
15631 | else | |
15632 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' | |
15633 | fi | |
15634 | ;; | |
15635 | esac | |
15636 | link_all_deplibs=yes | |
15637 | ;; | |
da0f6381 | 15638 | |
00020c16 ILT |
15639 | sunos4*) |
15640 | if test "x$host_vendor" = xsequent; then | |
15641 | # Use $CC to link under sequent, because it throws in some extra .o | |
15642 | # files that make .init and .fini sections work. | |
15643 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
15644 | else | |
15645 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
15646 | fi | |
15647 | hardcode_libdir_flag_spec='-L$libdir' | |
15648 | hardcode_direct=yes | |
15649 | hardcode_minus_L=yes | |
15650 | hardcode_shlibpath_var=no | |
15651 | ;; | |
da0f6381 | 15652 | |
00020c16 ILT |
15653 | sysv4) |
15654 | case $host_vendor in | |
15655 | sni) | |
15656 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15657 | hardcode_direct=yes # is this really true??? | |
15658 | ;; | |
15659 | siemens) | |
15660 | ## LD is ld it makes a PLAMLIB | |
15661 | ## CC just makes a GrossModule. | |
15662 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
15663 | reload_cmds='$CC -r -o $output$reload_objs' | |
15664 | hardcode_direct=no | |
15665 | ;; | |
15666 | motorola) | |
15667 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15668 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |
15669 | ;; | |
15670 | esac | |
15671 | runpath_var='LD_RUN_PATH' | |
15672 | hardcode_shlibpath_var=no | |
15673 | ;; | |
da0f6381 | 15674 | |
00020c16 ILT |
15675 | sysv4.3*) |
15676 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15677 | hardcode_shlibpath_var=no | |
15678 | export_dynamic_flag_spec='-Bexport' | |
15679 | ;; | |
da0f6381 | 15680 | |
00020c16 ILT |
15681 | sysv4*MP*) |
15682 | if test -d /usr/nec; then | |
15683 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15684 | hardcode_shlibpath_var=no | |
15685 | runpath_var=LD_RUN_PATH | |
15686 | hardcode_runpath_var=yes | |
15687 | ld_shlibs=yes | |
15688 | fi | |
15689 | ;; | |
da0f6381 | 15690 | |
00020c16 ILT |
15691 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) |
15692 | no_undefined_flag='${wl}-z,text' | |
15693 | archive_cmds_need_lc=no | |
15694 | hardcode_shlibpath_var=no | |
15695 | runpath_var='LD_RUN_PATH' | |
da0f6381 | 15696 | |
00020c16 ILT |
15697 | if test "$GCC" = yes; then |
15698 | archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15699 | archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15700 | else | |
15701 | archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15702 | archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15703 | fi | |
15704 | ;; | |
da0f6381 | 15705 | |
00020c16 ILT |
15706 | sysv5* | sco3.2v5* | sco5v6*) |
15707 | # Note: We can NOT use -z defs as we might desire, because we do not | |
15708 | # link with -lc, and that would cause any symbols used from libc to | |
15709 | # always be unresolved, which means just about no library would | |
15710 | # ever link correctly. If we're not using GNU ld we use -z text | |
15711 | # though, which does catch some bad symbols but isn't as heavy-handed | |
15712 | # as -z defs. | |
15713 | no_undefined_flag='${wl}-z,text' | |
15714 | allow_undefined_flag='${wl}-z,nodefs' | |
15715 | archive_cmds_need_lc=no | |
15716 | hardcode_shlibpath_var=no | |
15717 | hardcode_libdir_flag_spec='${wl}-R,$libdir' | |
15718 | hardcode_libdir_separator=':' | |
15719 | link_all_deplibs=yes | |
15720 | export_dynamic_flag_spec='${wl}-Bexport' | |
15721 | runpath_var='LD_RUN_PATH' | |
da0f6381 | 15722 | |
00020c16 ILT |
15723 | if test "$GCC" = yes; then |
15724 | archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15725 | archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15726 | else | |
15727 | archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15728 | archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15729 | fi | |
15730 | ;; | |
da0f6381 | 15731 | |
00020c16 ILT |
15732 | uts4*) |
15733 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15734 | hardcode_libdir_flag_spec='-L$libdir' | |
15735 | hardcode_shlibpath_var=no | |
15736 | ;; | |
da0f6381 | 15737 | |
00020c16 ILT |
15738 | *) |
15739 | ld_shlibs=no | |
15740 | ;; | |
15741 | esac | |
da0f6381 | 15742 | |
00020c16 ILT |
15743 | if test x$host_vendor = xsni; then |
15744 | case $host in | |
15745 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
15746 | export_dynamic_flag_spec='${wl}-Blargedynsym' | |
15747 | ;; | |
15748 | esac | |
15749 | fi | |
15750 | fi | |
da0f6381 | 15751 | |
5213506e RW |
15752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 |
15753 | $as_echo "$ld_shlibs" >&6; } | |
00020c16 | 15754 | test "$ld_shlibs" = no && can_build_shared=no |
da0f6381 | 15755 | |
00020c16 | 15756 | with_gnu_ld=$with_gnu_ld |
da0f6381 PB |
15757 | |
15758 | ||
15759 | ||
15760 | ||
15761 | ||
15762 | ||
15763 | ||
15764 | ||
15765 | ||
15766 | ||
15767 | ||
15768 | ||
15769 | ||
15770 | ||
15771 | ||
00020c16 ILT |
15772 | # |
15773 | # Do we need to explicitly link libc? | |
15774 | # | |
15775 | case "x$archive_cmds_need_lc" in | |
15776 | x|xyes) | |
15777 | # Assume -lc should be added | |
15778 | archive_cmds_need_lc=yes | |
da0f6381 | 15779 | |
00020c16 ILT |
15780 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
15781 | case $archive_cmds in | |
15782 | *'~'*) | |
15783 | # FIXME: we may have to deal with multi-command sequences. | |
15784 | ;; | |
15785 | '$CC '*) | |
15786 | # Test whether the compiler implicitly links with -lc since on some | |
15787 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
15788 | # to ld, don't add -lc before -lgcc. | |
5213506e RW |
15789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 |
15790 | $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } | |
15791 | if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : | |
15792 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
15793 | else |
15794 | $RM conftest* | |
15795 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 15796 | |
5213506e | 15797 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
15798 | (eval $ac_compile) 2>&5 |
15799 | ac_status=$? | |
5213506e RW |
15800 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
15801 | test $ac_status = 0; } 2>conftest.err; then | |
00020c16 ILT |
15802 | soname=conftest |
15803 | lib=conftest | |
15804 | libobjs=conftest.$ac_objext | |
15805 | deplibs= | |
15806 | wl=$lt_prog_compiler_wl | |
15807 | pic_flag=$lt_prog_compiler_pic | |
15808 | compiler_flags=-v | |
15809 | linker_flags=-v | |
15810 | verstring= | |
15811 | output_objdir=. | |
15812 | libname=conftest | |
15813 | lt_save_allow_undefined_flag=$allow_undefined_flag | |
15814 | allow_undefined_flag= | |
5213506e | 15815 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 |
00020c16 ILT |
15816 | (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 |
15817 | ac_status=$? | |
5213506e RW |
15818 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
15819 | test $ac_status = 0; } | |
00020c16 ILT |
15820 | then |
15821 | lt_cv_archive_cmds_need_lc=no | |
15822 | else | |
15823 | lt_cv_archive_cmds_need_lc=yes | |
15824 | fi | |
15825 | allow_undefined_flag=$lt_save_allow_undefined_flag | |
15826 | else | |
15827 | cat conftest.err 1>&5 | |
15828 | fi | |
15829 | $RM conftest* | |
da0f6381 | 15830 | |
00020c16 | 15831 | fi |
5213506e RW |
15832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 |
15833 | $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } | |
00020c16 ILT |
15834 | archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc |
15835 | ;; | |
15836 | esac | |
15837 | fi | |
15838 | ;; | |
15839 | esac | |
da0f6381 PB |
15840 | |
15841 | ||
15842 | ||
15843 | ||
5d47bb02 | 15844 | |
da0f6381 | 15845 | |
da0f6381 | 15846 | |
da0f6381 | 15847 | |
da0f6381 | 15848 | |
00020c16 ILT |
15849 | |
15850 | ||
15851 | ||
15852 | ||
15853 | ||
15854 | ||
15855 | ||
15856 | ||
15857 | ||
15858 | ||
15859 | ||
15860 | ||
15861 | ||
15862 | ||
15863 | ||
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | ||
15869 | ||
15870 | ||
15871 | ||
15872 | ||
15873 | ||
15874 | ||
15875 | ||
15876 | ||
15877 | ||
15878 | ||
15879 | ||
15880 | ||
15881 | ||
15882 | ||
15883 | ||
15884 | ||
15885 | ||
15886 | ||
15887 | ||
15888 | ||
15889 | ||
15890 | ||
15891 | ||
15892 | ||
15893 | ||
15894 | ||
15895 | ||
15896 | ||
15897 | ||
15898 | ||
15899 | ||
15900 | ||
15901 | ||
15902 | ||
15903 | ||
15904 | ||
15905 | ||
15906 | ||
15907 | ||
15908 | ||
15909 | ||
15910 | ||
15911 | ||
15912 | ||
15913 | ||
15914 | ||
15915 | ||
15916 | ||
15917 | ||
15918 | ||
15919 | ||
15920 | ||
15921 | ||
15922 | ||
15923 | ||
15924 | ||
15925 | ||
15926 | ||
15927 | ||
15928 | ||
15929 | ||
15930 | ||
15931 | ||
15932 | ||
15933 | ||
15934 | ||
15935 | ||
15936 | ||
15937 | ||
15938 | ||
15939 | ||
15940 | ||
15941 | ||
15942 | ||
15943 | ||
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | ||
15949 | ||
15950 | ||
15951 | ||
15952 | ||
15953 | ||
15954 | ||
15955 | ||
15956 | ||
15957 | ||
15958 | ||
15959 | ||
15960 | ||
15961 | ||
15962 | ||
15963 | ||
15964 | ||
15965 | ||
15966 | ||
15967 | ||
15968 | ||
15969 | ||
15970 | ||
15971 | ||
15972 | ||
15973 | ||
15974 | ||
15975 | ||
15976 | ||
15977 | ||
15978 | ||
15979 | ||
15980 | ||
15981 | ||
15982 | ||
15983 | ||
15984 | ||
15985 | ||
15986 | ||
15987 | ||
15988 | ||
15989 | ||
15990 | ||
15991 | ||
15992 | ||
15993 | ||
15994 | ||
15995 | ||
15996 | ||
5213506e RW |
15997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 |
15998 | $as_echo_n "checking dynamic linker characteristics... " >&6; } | |
00020c16 ILT |
15999 | |
16000 | if test "$GCC" = yes; then | |
16001 | case $host_os in | |
16002 | darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | |
16003 | *) lt_awk_arg="/^libraries:/" ;; | |
16004 | esac | |
43e02a8a RW |
16005 | case $host_os in |
16006 | mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; | |
16007 | *) lt_sed_strip_eq="s,=/,/,g" ;; | |
16008 | esac | |
16009 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` | |
16010 | case $lt_search_path_spec in | |
16011 | *\;*) | |
00020c16 ILT |
16012 | # if the path contains ";" then we assume it to be the separator |
16013 | # otherwise default to the standard path separator (i.e. ":") - it is | |
16014 | # assumed that no part of a normal pathname contains ";" but that should | |
16015 | # okay in the real world where ";" in dirpaths is itself problematic. | |
43e02a8a RW |
16016 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` |
16017 | ;; | |
16018 | *) | |
16019 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` | |
16020 | ;; | |
16021 | esac | |
00020c16 ILT |
16022 | # Ok, now we have the path, separated by spaces, we can step through it |
16023 | # and add multilib dir if necessary. | |
16024 | lt_tmp_lt_search_path_spec= | |
16025 | lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | |
16026 | for lt_sys_path in $lt_search_path_spec; do | |
16027 | if test -d "$lt_sys_path/$lt_multi_os_dir"; then | |
16028 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | |
16029 | else | |
16030 | test -d "$lt_sys_path" && \ | |
16031 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | |
16032 | fi | |
16033 | done | |
43e02a8a | 16034 | lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' |
00020c16 ILT |
16035 | BEGIN {RS=" "; FS="/|\n";} { |
16036 | lt_foo=""; | |
16037 | lt_count=0; | |
16038 | for (lt_i = NF; lt_i > 0; lt_i--) { | |
16039 | if ($lt_i != "" && $lt_i != ".") { | |
16040 | if ($lt_i == "..") { | |
16041 | lt_count++; | |
16042 | } else { | |
16043 | if (lt_count == 0) { | |
16044 | lt_foo="/" $lt_i lt_foo; | |
16045 | } else { | |
16046 | lt_count--; | |
16047 | } | |
16048 | } | |
16049 | } | |
16050 | } | |
16051 | if (lt_foo != "") { lt_freq[lt_foo]++; } | |
16052 | if (lt_freq[lt_foo] == 1) { print lt_foo; } | |
16053 | }'` | |
43e02a8a RW |
16054 | # AWK program above erroneously prepends '/' to C:/dos/paths |
16055 | # for these hosts. | |
16056 | case $host_os in | |
16057 | mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ | |
16058 | $SED 's,/\([A-Za-z]:\),\1,g'` ;; | |
16059 | esac | |
16060 | sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` | |
00020c16 ILT |
16061 | else |
16062 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
16063 | fi | |
16064 | library_names_spec= | |
16065 | libname_spec='lib$name' | |
16066 | soname_spec= | |
16067 | shrext_cmds=".so" | |
16068 | postinstall_cmds= | |
16069 | postuninstall_cmds= | |
16070 | finish_cmds= | |
16071 | finish_eval= | |
16072 | shlibpath_var= | |
16073 | shlibpath_overrides_runpath=unknown | |
16074 | version_type=none | |
16075 | dynamic_linker="$host_os ld.so" | |
16076 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
16077 | need_lib_prefix=unknown | |
16078 | hardcode_into_libs=no | |
16079 | ||
16080 | # when you set need_version to no, make sure it does not cause -set_version | |
16081 | # flags to be left without arguments | |
16082 | need_version=unknown | |
16083 | ||
16084 | case $host_os in | |
16085 | aix3*) | |
16086 | version_type=linux | |
16087 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
16088 | shlibpath_var=LIBPATH | |
16089 | ||
16090 | # AIX 3 has no versioning support, so we append a major version to the name. | |
16091 | soname_spec='${libname}${release}${shared_ext}$major' | |
16092 | ;; | |
16093 | ||
16094 | aix[4-9]*) | |
16095 | version_type=linux | |
16096 | need_lib_prefix=no | |
16097 | need_version=no | |
16098 | hardcode_into_libs=yes | |
16099 | if test "$host_cpu" = ia64; then | |
16100 | # AIX 5 supports IA64 | |
16101 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
16102 | shlibpath_var=LD_LIBRARY_PATH | |
16103 | else | |
16104 | # With GCC up to 2.95.x, collect2 would create an import file | |
16105 | # for dependence libraries. The import file would start with | |
16106 | # the line `#! .'. This would cause the generated library to | |
16107 | # depend on `.', always an invalid library. This was fixed in | |
16108 | # development snapshots of GCC prior to 3.0. | |
16109 | case $host_os in | |
16110 | aix4 | aix4.[01] | aix4.[01].*) | |
16111 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
16112 | echo ' yes ' | |
da0f6381 PB |
16113 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then |
16114 | : | |
16115 | else | |
16116 | can_build_shared=no | |
16117 | fi | |
16118 | ;; | |
16119 | esac | |
16120 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
16121 | # soname into executable. Probably we can add versioning support to | |
16122 | # collect2, so additional links can be useful in future. | |
16123 | if test "$aix_use_runtimelinking" = yes; then | |
16124 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
16125 | # instead of lib<name>.a to let people know that these are not | |
16126 | # typical AIX shared libraries. | |
16127 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16128 | else | |
16129 | # We preserve .a as extension for shared libraries through AIX4.2 | |
16130 | # and later when we are not doing run time linking. | |
16131 | library_names_spec='${libname}${release}.a $libname.a' | |
16132 | soname_spec='${libname}${release}${shared_ext}$major' | |
16133 | fi | |
16134 | shlibpath_var=LIBPATH | |
16135 | fi | |
16136 | ;; | |
16137 | ||
16138 | amigaos*) | |
5d47bb02 PG |
16139 | case $host_cpu in |
16140 | powerpc) | |
16141 | # Since July 2007 AmigaOS4 officially supports .so libraries. | |
16142 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
16143 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16144 | ;; | |
16145 | m68k) | |
da0f6381 PB |
16146 | library_names_spec='$libname.ixlibrary $libname.a' |
16147 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
43e02a8a | 16148 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
5d47bb02 PG |
16149 | ;; |
16150 | esac | |
da0f6381 PB |
16151 | ;; |
16152 | ||
16153 | beos*) | |
16154 | library_names_spec='${libname}${shared_ext}' | |
16155 | dynamic_linker="$host_os ld.so" | |
16156 | shlibpath_var=LIBRARY_PATH | |
16157 | ;; | |
16158 | ||
16159 | bsdi[45]*) | |
16160 | version_type=linux | |
16161 | need_version=no | |
16162 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16163 | soname_spec='${libname}${release}${shared_ext}$major' | |
16164 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
16165 | shlibpath_var=LD_LIBRARY_PATH | |
16166 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
16167 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
16168 | # the default ld.so.conf also contains /usr/contrib/lib and | |
16169 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
16170 | # libtool to hard-code these into programs | |
16171 | ;; | |
16172 | ||
5d47bb02 | 16173 | cygwin* | mingw* | pw32* | cegcc*) |
da0f6381 PB |
16174 | version_type=windows |
16175 | shrext_cmds=".dll" | |
16176 | need_version=no | |
16177 | need_lib_prefix=no | |
16178 | ||
5d47bb02 PG |
16179 | case $GCC,$host_os in |
16180 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | |
da0f6381 PB |
16181 | library_names_spec='$libname.dll.a' |
16182 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
16183 | postinstall_cmds='base_file=`basename \${file}`~ | |
16184 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
16185 | dldir=$destdir/`dirname \$dlpath`~ | |
16186 | test -d \$dldir || mkdir -p \$dldir~ | |
16187 | $install_prog $dir/$dlname \$dldir/$dlname~ | |
16188 | chmod a+x \$dldir/$dlname~ | |
16189 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
16190 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
16191 | fi' | |
16192 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
16193 | dlpath=$dir/\$dldll~ | |
16194 | $RM \$dlpath' | |
16195 | shlibpath_overrides_runpath=yes | |
16196 | ||
16197 | case $host_os in | |
16198 | cygwin*) | |
16199 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
16200 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
43e02a8a RW |
16201 | |
16202 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" | |
da0f6381 | 16203 | ;; |
5d47bb02 | 16204 | mingw* | cegcc*) |
da0f6381 PB |
16205 | # MinGW DLLs use traditional 'lib' prefix |
16206 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
da0f6381 PB |
16207 | ;; |
16208 | pw32*) | |
16209 | # pw32 DLLs use 'pw' prefix rather than 'lib' | |
16210 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
16211 | ;; | |
16212 | esac | |
16213 | ;; | |
16214 | ||
16215 | *) | |
16216 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
16217 | ;; | |
16218 | esac | |
16219 | dynamic_linker='Win32 ld.exe' | |
16220 | # FIXME: first we should search . and the directory the executable is in | |
16221 | shlibpath_var=PATH | |
16222 | ;; | |
16223 | ||
16224 | darwin* | rhapsody*) | |
16225 | dynamic_linker="$host_os dyld" | |
16226 | version_type=darwin | |
16227 | need_lib_prefix=no | |
16228 | need_version=no | |
16229 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
16230 | soname_spec='${libname}${release}${major}$shared_ext' | |
16231 | shlibpath_overrides_runpath=yes | |
16232 | shlibpath_var=DYLD_LIBRARY_PATH | |
16233 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
16234 | ||
16235 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" | |
16236 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
16237 | ;; | |
16238 | ||
16239 | dgux*) | |
16240 | version_type=linux | |
16241 | need_lib_prefix=no | |
16242 | need_version=no | |
16243 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
16244 | soname_spec='${libname}${release}${shared_ext}$major' | |
16245 | shlibpath_var=LD_LIBRARY_PATH | |
16246 | ;; | |
16247 | ||
16248 | freebsd1*) | |
16249 | dynamic_linker=no | |
16250 | ;; | |
16251 | ||
16252 | freebsd* | dragonfly*) | |
16253 | # DragonFly does not have aout. When/if they implement a new | |
16254 | # versioning mechanism, adjust this. | |
16255 | if test -x /usr/bin/objformat; then | |
16256 | objformat=`/usr/bin/objformat` | |
16257 | else | |
16258 | case $host_os in | |
16259 | freebsd[123]*) objformat=aout ;; | |
16260 | *) objformat=elf ;; | |
16261 | esac | |
16262 | fi | |
16263 | version_type=freebsd-$objformat | |
16264 | case $version_type in | |
16265 | freebsd-elf*) | |
16266 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16267 | need_version=no | |
16268 | need_lib_prefix=no | |
16269 | ;; | |
16270 | freebsd-*) | |
16271 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
16272 | need_version=yes | |
16273 | ;; | |
16274 | esac | |
16275 | shlibpath_var=LD_LIBRARY_PATH | |
16276 | case $host_os in | |
16277 | freebsd2*) | |
16278 | shlibpath_overrides_runpath=yes | |
16279 | ;; | |
16280 | freebsd3.[01]* | freebsdelf3.[01]*) | |
16281 | shlibpath_overrides_runpath=yes | |
16282 | hardcode_into_libs=yes | |
16283 | ;; | |
16284 | freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ | |
16285 | freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) | |
16286 | shlibpath_overrides_runpath=no | |
16287 | hardcode_into_libs=yes | |
16288 | ;; | |
16289 | *) # from 4.6 on, and DragonFly | |
16290 | shlibpath_overrides_runpath=yes | |
16291 | hardcode_into_libs=yes | |
16292 | ;; | |
16293 | esac | |
16294 | ;; | |
16295 | ||
16296 | gnu*) | |
16297 | version_type=linux | |
16298 | need_lib_prefix=no | |
16299 | need_version=no | |
16300 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
16301 | soname_spec='${libname}${release}${shared_ext}$major' | |
16302 | shlibpath_var=LD_LIBRARY_PATH | |
16303 | hardcode_into_libs=yes | |
16304 | ;; | |
16305 | ||
43e02a8a RW |
16306 | haiku*) |
16307 | version_type=linux | |
16308 | need_lib_prefix=no | |
16309 | need_version=no | |
16310 | dynamic_linker="$host_os runtime_loader" | |
16311 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
16312 | soname_spec='${libname}${release}${shared_ext}$major' | |
16313 | shlibpath_var=LIBRARY_PATH | |
16314 | shlibpath_overrides_runpath=yes | |
16315 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | |
16316 | hardcode_into_libs=yes | |
16317 | ;; | |
16318 | ||
da0f6381 PB |
16319 | hpux9* | hpux10* | hpux11*) |
16320 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
16321 | # link against other versions. | |
16322 | version_type=sunos | |
16323 | need_lib_prefix=no | |
16324 | need_version=no | |
16325 | case $host_cpu in | |
16326 | ia64*) | |
16327 | shrext_cmds='.so' | |
16328 | hardcode_into_libs=yes | |
16329 | dynamic_linker="$host_os dld.so" | |
16330 | shlibpath_var=LD_LIBRARY_PATH | |
16331 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
16332 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16333 | soname_spec='${libname}${release}${shared_ext}$major' | |
16334 | if test "X$HPUX_IA64_MODE" = X32; then | |
16335 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
16336 | else | |
16337 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
16338 | fi | |
16339 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
16340 | ;; | |
16341 | hppa*64*) | |
16342 | shrext_cmds='.sl' | |
16343 | hardcode_into_libs=yes | |
16344 | dynamic_linker="$host_os dld.sl" | |
16345 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
16346 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
16347 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16348 | soname_spec='${libname}${release}${shared_ext}$major' | |
16349 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
16350 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
16351 | ;; | |
16352 | *) | |
16353 | shrext_cmds='.sl' | |
16354 | dynamic_linker="$host_os dld.sl" | |
16355 | shlibpath_var=SHLIB_PATH | |
16356 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
16357 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16358 | soname_spec='${libname}${release}${shared_ext}$major' | |
16359 | ;; | |
16360 | esac | |
43e02a8a | 16361 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... |
da0f6381 | 16362 | postinstall_cmds='chmod 555 $lib' |
43e02a8a RW |
16363 | # or fails outright, so override atomically: |
16364 | install_override_mode=555 | |
da0f6381 PB |
16365 | ;; |
16366 | ||
16367 | interix[3-9]*) | |
16368 | version_type=linux | |
16369 | need_lib_prefix=no | |
16370 | need_version=no | |
16371 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
16372 | soname_spec='${libname}${release}${shared_ext}$major' | |
16373 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
16374 | shlibpath_var=LD_LIBRARY_PATH | |
16375 | shlibpath_overrides_runpath=no | |
16376 | hardcode_into_libs=yes | |
16377 | ;; | |
16378 | ||
16379 | irix5* | irix6* | nonstopux*) | |
16380 | case $host_os in | |
16381 | nonstopux*) version_type=nonstopux ;; | |
16382 | *) | |
16383 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
16384 | version_type=linux | |
16385 | else | |
16386 | version_type=irix | |
16387 | fi ;; | |
16388 | esac | |
16389 | need_lib_prefix=no | |
16390 | need_version=no | |
16391 | soname_spec='${libname}${release}${shared_ext}$major' | |
16392 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16393 | case $host_os in | |
16394 | irix5* | nonstopux*) | |
16395 | libsuff= shlibsuff= | |
16396 | ;; | |
16397 | *) | |
16398 | case $LD in # libtool.m4 will add one of these switches to LD | |
16399 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
16400 | libsuff= shlibsuff= libmagic=32-bit;; | |
16401 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
16402 | libsuff=32 shlibsuff=N32 libmagic=N32;; | |
16403 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
16404 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
16405 | *) libsuff= shlibsuff= libmagic=never-match;; | |
16406 | esac | |
16407 | ;; | |
16408 | esac | |
16409 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
16410 | shlibpath_overrides_runpath=no | |
16411 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
16412 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
16413 | hardcode_into_libs=yes | |
16414 | ;; | |
16415 | ||
16416 | # No shared lib support for Linux oldld, aout, or coff. | |
16417 | linux*oldld* | linux*aout* | linux*coff*) | |
16418 | dynamic_linker=no | |
16419 | ;; | |
16420 | ||
16421 | # This must be Linux ELF. | |
7a9d3fe8 | 16422 | linux* | k*bsd*-gnu | kopensolaris*-gnu) |
da0f6381 PB |
16423 | version_type=linux |
16424 | need_lib_prefix=no | |
16425 | need_version=no | |
16426 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16427 | soname_spec='${libname}${release}${shared_ext}$major' | |
16428 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
16429 | shlibpath_var=LD_LIBRARY_PATH | |
16430 | shlibpath_overrides_runpath=no | |
baafc534 | 16431 | |
da0f6381 | 16432 | # Some binutils ld are patched to set DT_RUNPATH |
5213506e RW |
16433 | if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : |
16434 | $as_echo_n "(cached) " >&6 | |
baafc534 RW |
16435 | else |
16436 | lt_cv_shlibpath_overrides_runpath=no | |
16437 | save_LDFLAGS=$LDFLAGS | |
16438 | save_libdir=$libdir | |
16439 | eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ | |
16440 | LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" | |
5213506e | 16441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
16442 | /* end confdefs.h. */ |
16443 | ||
16444 | int | |
16445 | main () | |
16446 | { | |
16447 | ||
16448 | ; | |
16449 | return 0; | |
16450 | } | |
16451 | _ACEOF | |
5213506e RW |
16452 | if ac_fn_c_try_link "$LINENO"; then : |
16453 | if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : | |
baafc534 | 16454 | lt_cv_shlibpath_overrides_runpath=yes |
da0f6381 | 16455 | fi |
da0f6381 | 16456 | fi |
5213506e RW |
16457 | rm -f core conftest.err conftest.$ac_objext \ |
16458 | conftest$ac_exeext conftest.$ac_ext | |
baafc534 RW |
16459 | LDFLAGS=$save_LDFLAGS |
16460 | libdir=$save_libdir | |
16461 | ||
16462 | fi | |
16463 | ||
16464 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath | |
da0f6381 PB |
16465 | |
16466 | # This implies no fast_install, which is unacceptable. | |
16467 | # Some rework will be needed to allow for fast_install | |
16468 | # before this can be enabled. | |
16469 | hardcode_into_libs=yes | |
16470 | ||
16471 | # Append ld.so.conf contents to the search path | |
16472 | if test -f /etc/ld.so.conf; then | |
43e02a8a | 16473 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` |
da0f6381 PB |
16474 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
16475 | fi | |
16476 | ||
16477 | # We used to test for /lib/ld.so.1 and disable shared libraries on | |
16478 | # powerpc, because MkLinux only supported shared libraries with the | |
16479 | # GNU dynamic linker. Since this was broken with cross compilers, | |
16480 | # most powerpc-linux boxes support dynamic linking these days and | |
16481 | # people can always --disable-shared, the test was removed, and we | |
16482 | # assume the GNU/Linux dynamic linker is in use. | |
16483 | dynamic_linker='GNU/Linux ld.so' | |
16484 | ;; | |
16485 | ||
16486 | netbsd*) | |
16487 | version_type=sunos | |
16488 | need_lib_prefix=no | |
16489 | need_version=no | |
16490 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
16491 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16492 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
16493 | dynamic_linker='NetBSD (a.out) ld.so' | |
16494 | else | |
16495 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
16496 | soname_spec='${libname}${release}${shared_ext}$major' | |
16497 | dynamic_linker='NetBSD ld.elf_so' | |
16498 | fi | |
16499 | shlibpath_var=LD_LIBRARY_PATH | |
16500 | shlibpath_overrides_runpath=yes | |
16501 | hardcode_into_libs=yes | |
16502 | ;; | |
16503 | ||
16504 | newsos6) | |
16505 | version_type=linux | |
16506 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16507 | shlibpath_var=LD_LIBRARY_PATH | |
16508 | shlibpath_overrides_runpath=yes | |
16509 | ;; | |
16510 | ||
16511 | *nto* | *qnx*) | |
16512 | version_type=qnx | |
16513 | need_lib_prefix=no | |
16514 | need_version=no | |
16515 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16516 | soname_spec='${libname}${release}${shared_ext}$major' | |
16517 | shlibpath_var=LD_LIBRARY_PATH | |
16518 | shlibpath_overrides_runpath=no | |
16519 | hardcode_into_libs=yes | |
16520 | dynamic_linker='ldqnx.so' | |
16521 | ;; | |
16522 | ||
16523 | openbsd*) | |
16524 | version_type=sunos | |
16525 | sys_lib_dlsearch_path_spec="/usr/lib" | |
16526 | need_lib_prefix=no | |
16527 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
16528 | case $host_os in | |
16529 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
16530 | *) need_version=no ;; | |
16531 | esac | |
16532 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16533 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
16534 | shlibpath_var=LD_LIBRARY_PATH | |
16535 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
16536 | case $host_os in | |
16537 | openbsd2.[89] | openbsd2.[89].*) | |
16538 | shlibpath_overrides_runpath=no | |
16539 | ;; | |
16540 | *) | |
16541 | shlibpath_overrides_runpath=yes | |
16542 | ;; | |
16543 | esac | |
16544 | else | |
16545 | shlibpath_overrides_runpath=yes | |
16546 | fi | |
16547 | ;; | |
16548 | ||
16549 | os2*) | |
16550 | libname_spec='$name' | |
16551 | shrext_cmds=".dll" | |
16552 | need_lib_prefix=no | |
16553 | library_names_spec='$libname${shared_ext} $libname.a' | |
16554 | dynamic_linker='OS/2 ld.exe' | |
16555 | shlibpath_var=LIBPATH | |
16556 | ;; | |
16557 | ||
16558 | osf3* | osf4* | osf5*) | |
16559 | version_type=osf | |
16560 | need_lib_prefix=no | |
16561 | need_version=no | |
16562 | soname_spec='${libname}${release}${shared_ext}$major' | |
16563 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16564 | shlibpath_var=LD_LIBRARY_PATH | |
16565 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
16566 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
16567 | ;; | |
16568 | ||
16569 | rdos*) | |
16570 | dynamic_linker=no | |
16571 | ;; | |
16572 | ||
16573 | solaris*) | |
16574 | version_type=linux | |
16575 | need_lib_prefix=no | |
16576 | need_version=no | |
16577 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16578 | soname_spec='${libname}${release}${shared_ext}$major' | |
16579 | shlibpath_var=LD_LIBRARY_PATH | |
16580 | shlibpath_overrides_runpath=yes | |
16581 | hardcode_into_libs=yes | |
16582 | # ldd complains unless libraries are executable | |
16583 | postinstall_cmds='chmod +x $lib' | |
16584 | ;; | |
16585 | ||
16586 | sunos4*) | |
16587 | version_type=sunos | |
16588 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16589 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
16590 | shlibpath_var=LD_LIBRARY_PATH | |
16591 | shlibpath_overrides_runpath=yes | |
16592 | if test "$with_gnu_ld" = yes; then | |
16593 | need_lib_prefix=no | |
16594 | fi | |
16595 | need_version=yes | |
16596 | ;; | |
16597 | ||
16598 | sysv4 | sysv4.3*) | |
16599 | version_type=linux | |
16600 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16601 | soname_spec='${libname}${release}${shared_ext}$major' | |
16602 | shlibpath_var=LD_LIBRARY_PATH | |
16603 | case $host_vendor in | |
16604 | sni) | |
16605 | shlibpath_overrides_runpath=no | |
16606 | need_lib_prefix=no | |
16607 | runpath_var=LD_RUN_PATH | |
16608 | ;; | |
16609 | siemens) | |
16610 | need_lib_prefix=no | |
16611 | ;; | |
16612 | motorola) | |
16613 | need_lib_prefix=no | |
16614 | need_version=no | |
16615 | shlibpath_overrides_runpath=no | |
16616 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
16617 | ;; | |
16618 | esac | |
16619 | ;; | |
16620 | ||
16621 | sysv4*MP*) | |
16622 | if test -d /usr/nec ;then | |
16623 | version_type=linux | |
16624 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
16625 | soname_spec='$libname${shared_ext}.$major' | |
16626 | shlibpath_var=LD_LIBRARY_PATH | |
16627 | fi | |
16628 | ;; | |
16629 | ||
16630 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
16631 | version_type=freebsd-elf | |
16632 | need_lib_prefix=no | |
16633 | need_version=no | |
16634 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16635 | soname_spec='${libname}${release}${shared_ext}$major' | |
16636 | shlibpath_var=LD_LIBRARY_PATH | |
16637 | shlibpath_overrides_runpath=yes | |
16638 | hardcode_into_libs=yes | |
16639 | if test "$with_gnu_ld" = yes; then | |
16640 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
16641 | else | |
16642 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | |
16643 | case $host_os in | |
16644 | sco3.2v5*) | |
16645 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
16646 | ;; | |
16647 | esac | |
16648 | fi | |
16649 | sys_lib_dlsearch_path_spec='/usr/lib' | |
16650 | ;; | |
16651 | ||
16652 | tpf*) | |
16653 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
16654 | version_type=linux | |
16655 | need_lib_prefix=no | |
16656 | need_version=no | |
5d47bb02 | 16657 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
da0f6381 PB |
16658 | shlibpath_var=LD_LIBRARY_PATH |
16659 | shlibpath_overrides_runpath=no | |
16660 | hardcode_into_libs=yes | |
16661 | ;; | |
16662 | ||
16663 | uts4*) | |
16664 | version_type=linux | |
16665 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16666 | soname_spec='${libname}${release}${shared_ext}$major' | |
16667 | shlibpath_var=LD_LIBRARY_PATH | |
16668 | ;; | |
16669 | ||
16670 | *) | |
16671 | dynamic_linker=no | |
16672 | ;; | |
16673 | esac | |
5213506e RW |
16674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 |
16675 | $as_echo "$dynamic_linker" >&6; } | |
da0f6381 PB |
16676 | test "$dynamic_linker" = no && can_build_shared=no |
16677 | ||
16678 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
16679 | if test "$GCC" = yes; then | |
16680 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
16681 | fi | |
16682 | ||
5d47bb02 PG |
16683 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
16684 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
16685 | fi | |
16686 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
16687 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
16688 | fi | |
16689 | ||
da0f6381 PB |
16690 | |
16691 | ||
16692 | ||
16693 | ||
16694 | ||
16695 | ||
16696 | ||
16697 | ||
16698 | ||
16699 | ||
16700 | ||
16701 | ||
16702 | ||
16703 | ||
16704 | ||
16705 | ||
16706 | ||
16707 | ||
16708 | ||
16709 | ||
16710 | ||
16711 | ||
16712 | ||
16713 | ||
16714 | ||
16715 | ||
16716 | ||
16717 | ||
16718 | ||
16719 | ||
16720 | ||
16721 | ||
16722 | ||
16723 | ||
16724 | ||
16725 | ||
16726 | ||
16727 | ||
16728 | ||
16729 | ||
16730 | ||
16731 | ||
16732 | ||
16733 | ||
16734 | ||
16735 | ||
16736 | ||
16737 | ||
16738 | ||
16739 | ||
16740 | ||
16741 | ||
16742 | ||
16743 | ||
16744 | ||
16745 | ||
16746 | ||
16747 | ||
16748 | ||
16749 | ||
16750 | ||
16751 | ||
16752 | ||
16753 | ||
16754 | ||
16755 | ||
16756 | ||
16757 | ||
16758 | ||
16759 | ||
16760 | ||
16761 | ||
16762 | ||
16763 | ||
16764 | ||
16765 | ||
16766 | ||
16767 | ||
16768 | ||
16769 | ||
43e02a8a RW |
16770 | |
16771 | ||
16772 | ||
16773 | ||
16774 | ||
da0f6381 PB |
16775 | |
16776 | ||
16777 | ||
16778 | ||
16779 | ||
16780 | ||
5213506e RW |
16781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 |
16782 | $as_echo_n "checking how to hardcode library paths into programs... " >&6; } | |
da0f6381 PB |
16783 | hardcode_action= |
16784 | if test -n "$hardcode_libdir_flag_spec" || | |
16785 | test -n "$runpath_var" || | |
16786 | test "X$hardcode_automatic" = "Xyes" ; then | |
16787 | ||
16788 | # We can hardcode non-existent directories. | |
16789 | if test "$hardcode_direct" != no && | |
16790 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
16791 | # have to relink, otherwise we might link with an installed library | |
16792 | # when we should be linking with a yet-to-be-installed one | |
16793 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && | |
16794 | test "$hardcode_minus_L" != no; then | |
16795 | # Linking always hardcodes the temporary library directory. | |
16796 | hardcode_action=relink | |
16797 | else | |
16798 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
16799 | hardcode_action=immediate | |
16800 | fi | |
16801 | else | |
16802 | # We cannot hardcode anything, or else we can only hardcode existing | |
16803 | # directories. | |
16804 | hardcode_action=unsupported | |
16805 | fi | |
5213506e RW |
16806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 |
16807 | $as_echo "$hardcode_action" >&6; } | |
da0f6381 PB |
16808 | |
16809 | if test "$hardcode_action" = relink || | |
16810 | test "$inherit_rpath" = yes; then | |
16811 | # Fast installation is not supported | |
16812 | enable_fast_install=no | |
16813 | elif test "$shlibpath_overrides_runpath" = yes || | |
16814 | test "$enable_shared" = no; then | |
16815 | # Fast installation is not necessary | |
16816 | enable_fast_install=needless | |
16817 | fi | |
16818 | ||
16819 | ||
16820 | ||
16821 | ||
16822 | ||
16823 | ||
16824 | if test "x$enable_dlopen" != xyes; then | |
16825 | enable_dlopen=unknown | |
16826 | enable_dlopen_self=unknown | |
16827 | enable_dlopen_self_static=unknown | |
16828 | else | |
16829 | lt_cv_dlopen=no | |
16830 | lt_cv_dlopen_libs= | |
16831 | ||
16832 | case $host_os in | |
16833 | beos*) | |
16834 | lt_cv_dlopen="load_add_on" | |
16835 | lt_cv_dlopen_libs= | |
16836 | lt_cv_dlopen_self=yes | |
16837 | ;; | |
16838 | ||
5d47bb02 | 16839 | mingw* | pw32* | cegcc*) |
da0f6381 | 16840 | lt_cv_dlopen="LoadLibrary" |
5213506e RW |
16841 | lt_cv_dlopen_libs= |
16842 | ;; | |
da0f6381 | 16843 | |
5213506e RW |
16844 | cygwin*) |
16845 | lt_cv_dlopen="dlopen" | |
16846 | lt_cv_dlopen_libs= | |
16847 | ;; | |
16848 | ||
16849 | darwin*) | |
16850 | # if libdl is installed we need to link against it | |
16851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
16852 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
16853 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
16854 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
16855 | else |
16856 | ac_check_lib_save_LIBS=$LIBS | |
5213506e RW |
16857 | LIBS="-ldl $LIBS" |
16858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
da0f6381 PB |
16859 | /* end confdefs.h. */ |
16860 | ||
5213506e RW |
16861 | /* Override any GCC internal prototype to avoid an error. |
16862 | Use char because int might match the return type of a GCC | |
16863 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
16864 | #ifdef __cplusplus |
16865 | extern "C" | |
16866 | #endif | |
5213506e | 16867 | char dlopen (); |
da0f6381 PB |
16868 | int |
16869 | main () | |
16870 | { | |
5213506e | 16871 | return dlopen (); |
da0f6381 PB |
16872 | ; |
16873 | return 0; | |
16874 | } | |
16875 | _ACEOF | |
5213506e RW |
16876 | if ac_fn_c_try_link "$LINENO"; then : |
16877 | ac_cv_lib_dl_dlopen=yes | |
da0f6381 | 16878 | else |
5213506e | 16879 | ac_cv_lib_dl_dlopen=no |
da0f6381 | 16880 | fi |
5213506e RW |
16881 | rm -f core conftest.err conftest.$ac_objext \ |
16882 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
16883 | LIBS=$ac_check_lib_save_LIBS |
16884 | fi | |
5213506e RW |
16885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
16886 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
16887 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
16888 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | |
da0f6381 | 16889 | else |
da0f6381 | 16890 | |
5213506e RW |
16891 | lt_cv_dlopen="dyld" |
16892 | lt_cv_dlopen_libs= | |
16893 | lt_cv_dlopen_self=yes | |
da0f6381 | 16894 | |
5213506e | 16895 | fi |
da0f6381 | 16896 | |
5213506e | 16897 | ;; |
da0f6381 | 16898 | |
5213506e RW |
16899 | *) |
16900 | ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" | |
16901 | if test "x$ac_cv_func_shl_load" = x""yes; then : | |
16902 | lt_cv_dlopen="shl_load" | |
16903 | else | |
16904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 | |
16905 | $as_echo_n "checking for shl_load in -ldld... " >&6; } | |
16906 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then : | |
16907 | $as_echo_n "(cached) " >&6 | |
16908 | else | |
16909 | ac_check_lib_save_LIBS=$LIBS | |
16910 | LIBS="-ldld $LIBS" | |
16911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16912 | /* end confdefs.h. */ | |
16913 | ||
16914 | /* Override any GCC internal prototype to avoid an error. | |
16915 | Use char because int might match the return type of a GCC | |
da0f6381 | 16916 | builtin and then its argument prototype would still apply. */ |
da0f6381 | 16917 | #ifdef __cplusplus |
5213506e | 16918 | extern "C" |
da0f6381 | 16919 | #endif |
5213506e | 16920 | char shl_load (); |
da0f6381 PB |
16921 | int |
16922 | main () | |
16923 | { | |
5213506e | 16924 | return shl_load (); |
da0f6381 PB |
16925 | ; |
16926 | return 0; | |
16927 | } | |
16928 | _ACEOF | |
5213506e RW |
16929 | if ac_fn_c_try_link "$LINENO"; then : |
16930 | ac_cv_lib_dld_shl_load=yes | |
da0f6381 | 16931 | else |
5213506e | 16932 | ac_cv_lib_dld_shl_load=no |
da0f6381 | 16933 | fi |
5213506e RW |
16934 | rm -f core conftest.err conftest.$ac_objext \ |
16935 | conftest$ac_exeext conftest.$ac_ext | |
16936 | LIBS=$ac_check_lib_save_LIBS | |
da0f6381 | 16937 | fi |
5213506e RW |
16938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 |
16939 | $as_echo "$ac_cv_lib_dld_shl_load" >&6; } | |
16940 | if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : | |
16941 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" | |
16942 | else | |
16943 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" | |
16944 | if test "x$ac_cv_func_dlopen" = x""yes; then : | |
da0f6381 PB |
16945 | lt_cv_dlopen="dlopen" |
16946 | else | |
5213506e RW |
16947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
16948 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
16949 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
16950 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
16951 | else |
16952 | ac_check_lib_save_LIBS=$LIBS | |
16953 | LIBS="-ldl $LIBS" | |
5213506e | 16954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
16955 | /* end confdefs.h. */ |
16956 | ||
5213506e RW |
16957 | /* Override any GCC internal prototype to avoid an error. |
16958 | Use char because int might match the return type of a GCC | |
16959 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
16960 | #ifdef __cplusplus |
16961 | extern "C" | |
16962 | #endif | |
da0f6381 PB |
16963 | char dlopen (); |
16964 | int | |
16965 | main () | |
16966 | { | |
5213506e | 16967 | return dlopen (); |
da0f6381 PB |
16968 | ; |
16969 | return 0; | |
16970 | } | |
16971 | _ACEOF | |
5213506e | 16972 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
16973 | ac_cv_lib_dl_dlopen=yes |
16974 | else | |
5213506e | 16975 | ac_cv_lib_dl_dlopen=no |
da0f6381 | 16976 | fi |
5213506e RW |
16977 | rm -f core conftest.err conftest.$ac_objext \ |
16978 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
16979 | LIBS=$ac_check_lib_save_LIBS |
16980 | fi | |
5213506e RW |
16981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
16982 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
16983 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
da0f6381 PB |
16984 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" |
16985 | else | |
5213506e RW |
16986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 |
16987 | $as_echo_n "checking for dlopen in -lsvld... " >&6; } | |
16988 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then : | |
16989 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
16990 | else |
16991 | ac_check_lib_save_LIBS=$LIBS | |
16992 | LIBS="-lsvld $LIBS" | |
5213506e | 16993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
16994 | /* end confdefs.h. */ |
16995 | ||
5213506e RW |
16996 | /* Override any GCC internal prototype to avoid an error. |
16997 | Use char because int might match the return type of a GCC | |
16998 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
16999 | #ifdef __cplusplus |
17000 | extern "C" | |
17001 | #endif | |
da0f6381 PB |
17002 | char dlopen (); |
17003 | int | |
17004 | main () | |
17005 | { | |
5213506e | 17006 | return dlopen (); |
da0f6381 PB |
17007 | ; |
17008 | return 0; | |
17009 | } | |
17010 | _ACEOF | |
5213506e | 17011 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
17012 | ac_cv_lib_svld_dlopen=yes |
17013 | else | |
5213506e | 17014 | ac_cv_lib_svld_dlopen=no |
da0f6381 | 17015 | fi |
5213506e RW |
17016 | rm -f core conftest.err conftest.$ac_objext \ |
17017 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
17018 | LIBS=$ac_check_lib_save_LIBS |
17019 | fi | |
5213506e RW |
17020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 |
17021 | $as_echo "$ac_cv_lib_svld_dlopen" >&6; } | |
17022 | if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : | |
da0f6381 PB |
17023 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" |
17024 | else | |
5213506e RW |
17025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 |
17026 | $as_echo_n "checking for dld_link in -ldld... " >&6; } | |
17027 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then : | |
17028 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
17029 | else |
17030 | ac_check_lib_save_LIBS=$LIBS | |
17031 | LIBS="-ldld $LIBS" | |
5213506e | 17032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
17033 | /* end confdefs.h. */ |
17034 | ||
5213506e RW |
17035 | /* Override any GCC internal prototype to avoid an error. |
17036 | Use char because int might match the return type of a GCC | |
17037 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
17038 | #ifdef __cplusplus |
17039 | extern "C" | |
17040 | #endif | |
da0f6381 PB |
17041 | char dld_link (); |
17042 | int | |
17043 | main () | |
17044 | { | |
5213506e | 17045 | return dld_link (); |
00020c16 ILT |
17046 | ; |
17047 | return 0; | |
17048 | } | |
17049 | _ACEOF | |
5213506e | 17050 | if ac_fn_c_try_link "$LINENO"; then : |
00020c16 ILT |
17051 | ac_cv_lib_dld_dld_link=yes |
17052 | else | |
5213506e | 17053 | ac_cv_lib_dld_dld_link=no |
00020c16 | 17054 | fi |
5213506e RW |
17055 | rm -f core conftest.err conftest.$ac_objext \ |
17056 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
17057 | LIBS=$ac_check_lib_save_LIBS |
17058 | fi | |
5213506e RW |
17059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 |
17060 | $as_echo "$ac_cv_lib_dld_dld_link" >&6; } | |
17061 | if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : | |
00020c16 ILT |
17062 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" |
17063 | fi | |
17064 | ||
17065 | ||
17066 | fi | |
17067 | ||
17068 | ||
17069 | fi | |
17070 | ||
17071 | ||
17072 | fi | |
17073 | ||
17074 | ||
17075 | fi | |
17076 | ||
17077 | ||
17078 | fi | |
17079 | ||
17080 | ;; | |
17081 | esac | |
17082 | ||
17083 | if test "x$lt_cv_dlopen" != xno; then | |
17084 | enable_dlopen=yes | |
17085 | else | |
17086 | enable_dlopen=no | |
17087 | fi | |
17088 | ||
17089 | case $lt_cv_dlopen in | |
17090 | dlopen) | |
17091 | save_CPPFLAGS="$CPPFLAGS" | |
17092 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
17093 | ||
17094 | save_LDFLAGS="$LDFLAGS" | |
17095 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
17096 | ||
17097 | save_LIBS="$LIBS" | |
17098 | LIBS="$lt_cv_dlopen_libs $LIBS" | |
17099 | ||
5213506e RW |
17100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 |
17101 | $as_echo_n "checking whether a program can dlopen itself... " >&6; } | |
17102 | if test "${lt_cv_dlopen_self+set}" = set; then : | |
17103 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17104 | else |
17105 | if test "$cross_compiling" = yes; then : | |
17106 | lt_cv_dlopen_self=cross | |
17107 | else | |
17108 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
17109 | lt_status=$lt_dlunknown | |
17110 | cat > conftest.$ac_ext <<_LT_EOF | |
ad211091 | 17111 | #line 17111 "configure" |
00020c16 ILT |
17112 | #include "confdefs.h" |
17113 | ||
17114 | #if HAVE_DLFCN_H | |
17115 | #include <dlfcn.h> | |
17116 | #endif | |
17117 | ||
17118 | #include <stdio.h> | |
17119 | ||
17120 | #ifdef RTLD_GLOBAL | |
17121 | # define LT_DLGLOBAL RTLD_GLOBAL | |
17122 | #else | |
17123 | # ifdef DL_GLOBAL | |
17124 | # define LT_DLGLOBAL DL_GLOBAL | |
17125 | # else | |
17126 | # define LT_DLGLOBAL 0 | |
17127 | # endif | |
17128 | #endif | |
17129 | ||
17130 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
17131 | find out it does not work in some platform. */ | |
17132 | #ifndef LT_DLLAZY_OR_NOW | |
17133 | # ifdef RTLD_LAZY | |
17134 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
17135 | # else | |
17136 | # ifdef DL_LAZY | |
17137 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
17138 | # else | |
17139 | # ifdef RTLD_NOW | |
17140 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
17141 | # else | |
17142 | # ifdef DL_NOW | |
17143 | # define LT_DLLAZY_OR_NOW DL_NOW | |
17144 | # else | |
17145 | # define LT_DLLAZY_OR_NOW 0 | |
17146 | # endif | |
17147 | # endif | |
17148 | # endif | |
17149 | # endif | |
17150 | #endif | |
17151 | ||
43e02a8a RW |
17152 | /* When -fvisbility=hidden is used, assume the code has been annotated |
17153 | correspondingly for the symbols needed. */ | |
17154 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | |
17155 | void fnord () __attribute__((visibility("default"))); | |
17156 | #endif | |
17157 | ||
17158 | void fnord () { int i=42; } | |
00020c16 ILT |
17159 | int main () |
17160 | { | |
17161 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
17162 | int status = $lt_dlunknown; | |
17163 | ||
17164 | if (self) | |
17165 | { | |
17166 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
43e02a8a RW |
17167 | else |
17168 | { | |
17169 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
17170 | else puts (dlerror ()); | |
17171 | } | |
00020c16 ILT |
17172 | /* dlclose (self); */ |
17173 | } | |
17174 | else | |
17175 | puts (dlerror ()); | |
17176 | ||
17177 | return status; | |
17178 | } | |
17179 | _LT_EOF | |
5213506e | 17180 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
00020c16 ILT |
17181 | (eval $ac_link) 2>&5 |
17182 | ac_status=$? | |
5213506e RW |
17183 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
17184 | test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then | |
00020c16 ILT |
17185 | (./conftest; exit; ) >&5 2>/dev/null |
17186 | lt_status=$? | |
17187 | case x$lt_status in | |
17188 | x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; | |
17189 | x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; | |
17190 | x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; | |
17191 | esac | |
17192 | else : | |
17193 | # compilation failed | |
17194 | lt_cv_dlopen_self=no | |
17195 | fi | |
17196 | fi | |
17197 | rm -fr conftest* | |
17198 | ||
17199 | ||
17200 | fi | |
5213506e RW |
17201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 |
17202 | $as_echo "$lt_cv_dlopen_self" >&6; } | |
00020c16 ILT |
17203 | |
17204 | if test "x$lt_cv_dlopen_self" = xyes; then | |
17205 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | |
5213506e RW |
17206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 |
17207 | $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } | |
17208 | if test "${lt_cv_dlopen_self_static+set}" = set; then : | |
17209 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17210 | else |
17211 | if test "$cross_compiling" = yes; then : | |
17212 | lt_cv_dlopen_self_static=cross | |
17213 | else | |
17214 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
17215 | lt_status=$lt_dlunknown | |
17216 | cat > conftest.$ac_ext <<_LT_EOF | |
ad211091 | 17217 | #line 17217 "configure" |
00020c16 ILT |
17218 | #include "confdefs.h" |
17219 | ||
17220 | #if HAVE_DLFCN_H | |
17221 | #include <dlfcn.h> | |
17222 | #endif | |
17223 | ||
17224 | #include <stdio.h> | |
17225 | ||
17226 | #ifdef RTLD_GLOBAL | |
17227 | # define LT_DLGLOBAL RTLD_GLOBAL | |
17228 | #else | |
17229 | # ifdef DL_GLOBAL | |
17230 | # define LT_DLGLOBAL DL_GLOBAL | |
17231 | # else | |
17232 | # define LT_DLGLOBAL 0 | |
17233 | # endif | |
17234 | #endif | |
17235 | ||
17236 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
17237 | find out it does not work in some platform. */ | |
17238 | #ifndef LT_DLLAZY_OR_NOW | |
17239 | # ifdef RTLD_LAZY | |
17240 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
17241 | # else | |
17242 | # ifdef DL_LAZY | |
17243 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
17244 | # else | |
17245 | # ifdef RTLD_NOW | |
17246 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
17247 | # else | |
17248 | # ifdef DL_NOW | |
17249 | # define LT_DLLAZY_OR_NOW DL_NOW | |
17250 | # else | |
17251 | # define LT_DLLAZY_OR_NOW 0 | |
17252 | # endif | |
17253 | # endif | |
17254 | # endif | |
17255 | # endif | |
17256 | #endif | |
17257 | ||
43e02a8a RW |
17258 | /* When -fvisbility=hidden is used, assume the code has been annotated |
17259 | correspondingly for the symbols needed. */ | |
17260 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | |
17261 | void fnord () __attribute__((visibility("default"))); | |
17262 | #endif | |
17263 | ||
17264 | void fnord () { int i=42; } | |
00020c16 ILT |
17265 | int main () |
17266 | { | |
17267 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
17268 | int status = $lt_dlunknown; | |
17269 | ||
17270 | if (self) | |
17271 | { | |
17272 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
43e02a8a RW |
17273 | else |
17274 | { | |
17275 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
17276 | else puts (dlerror ()); | |
17277 | } | |
00020c16 ILT |
17278 | /* dlclose (self); */ |
17279 | } | |
17280 | else | |
17281 | puts (dlerror ()); | |
17282 | ||
17283 | return status; | |
17284 | } | |
17285 | _LT_EOF | |
5213506e | 17286 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
00020c16 ILT |
17287 | (eval $ac_link) 2>&5 |
17288 | ac_status=$? | |
5213506e RW |
17289 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
17290 | test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then | |
00020c16 ILT |
17291 | (./conftest; exit; ) >&5 2>/dev/null |
17292 | lt_status=$? | |
17293 | case x$lt_status in | |
17294 | x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; | |
17295 | x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; | |
17296 | x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; | |
17297 | esac | |
17298 | else : | |
17299 | # compilation failed | |
17300 | lt_cv_dlopen_self_static=no | |
17301 | fi | |
17302 | fi | |
17303 | rm -fr conftest* | |
17304 | ||
17305 | ||
17306 | fi | |
5213506e RW |
17307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 |
17308 | $as_echo "$lt_cv_dlopen_self_static" >&6; } | |
00020c16 ILT |
17309 | fi |
17310 | ||
17311 | CPPFLAGS="$save_CPPFLAGS" | |
17312 | LDFLAGS="$save_LDFLAGS" | |
17313 | LIBS="$save_LIBS" | |
17314 | ;; | |
17315 | esac | |
17316 | ||
17317 | case $lt_cv_dlopen_self in | |
17318 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
17319 | *) enable_dlopen_self=unknown ;; | |
17320 | esac | |
17321 | ||
17322 | case $lt_cv_dlopen_self_static in | |
17323 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
17324 | *) enable_dlopen_self_static=unknown ;; | |
17325 | esac | |
17326 | fi | |
17327 | ||
17328 | ||
17329 | ||
17330 | ||
17331 | ||
17332 | ||
17333 | ||
17334 | ||
17335 | ||
17336 | ||
17337 | ||
17338 | ||
17339 | ||
17340 | ||
17341 | ||
17342 | ||
17343 | ||
17344 | striplib= | |
17345 | old_striplib= | |
5213506e RW |
17346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 |
17347 | $as_echo_n "checking whether stripping libraries is possible... " >&6; } | |
00020c16 ILT |
17348 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then |
17349 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
17350 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
5213506e RW |
17351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17352 | $as_echo "yes" >&6; } | |
00020c16 ILT |
17353 | else |
17354 | # FIXME - insert some real tests, host_os isn't really good enough | |
17355 | case $host_os in | |
17356 | darwin*) | |
17357 | if test -n "$STRIP" ; then | |
17358 | striplib="$STRIP -x" | |
17359 | old_striplib="$STRIP -S" | |
5213506e RW |
17360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17361 | $as_echo "yes" >&6; } | |
00020c16 | 17362 | else |
5213506e RW |
17363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17364 | $as_echo "no" >&6; } | |
00020c16 ILT |
17365 | fi |
17366 | ;; | |
17367 | *) | |
5213506e RW |
17368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17369 | $as_echo "no" >&6; } | |
00020c16 ILT |
17370 | ;; |
17371 | esac | |
17372 | fi | |
17373 | ||
17374 | ||
17375 | ||
17376 | ||
17377 | ||
17378 | ||
17379 | ||
17380 | ||
17381 | ||
17382 | ||
17383 | ||
17384 | ||
17385 | # Report which library types will actually be built | |
5213506e RW |
17386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 |
17387 | $as_echo_n "checking if libtool supports shared libraries... " >&6; } | |
17388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 | |
17389 | $as_echo "$can_build_shared" >&6; } | |
00020c16 | 17390 | |
5213506e RW |
17391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 |
17392 | $as_echo_n "checking whether to build shared libraries... " >&6; } | |
00020c16 ILT |
17393 | test "$can_build_shared" = "no" && enable_shared=no |
17394 | ||
17395 | # On AIX, shared libraries and static libraries use the same namespace, and | |
17396 | # are all built from PIC. | |
17397 | case $host_os in | |
17398 | aix3*) | |
17399 | test "$enable_shared" = yes && enable_static=no | |
17400 | if test -n "$RANLIB"; then | |
17401 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
17402 | postinstall_cmds='$RANLIB $lib' | |
17403 | fi | |
17404 | ;; | |
17405 | ||
17406 | aix[4-9]*) | |
17407 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
17408 | test "$enable_shared" = yes && enable_static=no | |
17409 | fi | |
17410 | ;; | |
17411 | esac | |
5213506e RW |
17412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 |
17413 | $as_echo "$enable_shared" >&6; } | |
00020c16 | 17414 | |
5213506e RW |
17415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 |
17416 | $as_echo_n "checking whether to build static libraries... " >&6; } | |
00020c16 ILT |
17417 | # Make sure either enable_shared or enable_static is yes. |
17418 | test "$enable_shared" = yes || enable_static=yes | |
5213506e RW |
17419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 |
17420 | $as_echo "$enable_static" >&6; } | |
00020c16 ILT |
17421 | |
17422 | ||
17423 | ||
17424 | ||
17425 | fi | |
17426 | ac_ext=c | |
17427 | ac_cpp='$CPP $CPPFLAGS' | |
17428 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17429 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17430 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17431 | ||
17432 | CC="$lt_save_CC" | |
17433 | ||
43e02a8a RW |
17434 | if test -n "$CXX" && ( test "X$CXX" != "Xno" && |
17435 | ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
17436 | (test "X$CXX" != "Xg++"))) ; then | |
17437 | ac_ext=cpp | |
17438 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17439 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17440 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17441 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 | |
17443 | $as_echo_n "checking how to run the C++ preprocessor... " >&6; } | |
17444 | if test -z "$CXXCPP"; then | |
17445 | if test "${ac_cv_prog_CXXCPP+set}" = set; then : | |
17446 | $as_echo_n "(cached) " >&6 | |
17447 | else | |
17448 | # Double quotes because CXXCPP needs to be expanded | |
17449 | for CXXCPP in "$CXX -E" "/lib/cpp" | |
17450 | do | |
17451 | ac_preproc_ok=false | |
17452 | for ac_cxx_preproc_warn_flag in '' yes | |
17453 | do | |
17454 | # Use a header file that comes with gcc, so configuring glibc | |
17455 | # with a fresh cross-compiler works. | |
17456 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
17457 | # <limits.h> exists even on freestanding compilers. | |
17458 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
17459 | # not just through cpp. "Syntax error" is here to catch this case. | |
17460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17461 | /* end confdefs.h. */ | |
17462 | #ifdef __STDC__ | |
17463 | # include <limits.h> | |
17464 | #else | |
17465 | # include <assert.h> | |
17466 | #endif | |
17467 | Syntax error | |
17468 | _ACEOF | |
17469 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17470 | ||
17471 | else | |
17472 | # Broken: fails on valid input. | |
17473 | continue | |
17474 | fi | |
17475 | rm -f conftest.err conftest.$ac_ext | |
17476 | ||
17477 | # OK, works on sane cases. Now check whether nonexistent headers | |
17478 | # can be detected and how. | |
17479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17480 | /* end confdefs.h. */ | |
17481 | #include <ac_nonexistent.h> | |
17482 | _ACEOF | |
17483 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17484 | # Broken: success on invalid input. | |
17485 | continue | |
17486 | else | |
17487 | # Passes both tests. | |
17488 | ac_preproc_ok=: | |
17489 | break | |
17490 | fi | |
17491 | rm -f conftest.err conftest.$ac_ext | |
17492 | ||
17493 | done | |
17494 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
17495 | rm -f conftest.err conftest.$ac_ext | |
17496 | if $ac_preproc_ok; then : | |
17497 | break | |
17498 | fi | |
17499 | ||
17500 | done | |
17501 | ac_cv_prog_CXXCPP=$CXXCPP | |
17502 | ||
17503 | fi | |
17504 | CXXCPP=$ac_cv_prog_CXXCPP | |
17505 | else | |
17506 | ac_cv_prog_CXXCPP=$CXXCPP | |
17507 | fi | |
17508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 | |
17509 | $as_echo "$CXXCPP" >&6; } | |
17510 | ac_preproc_ok=false | |
17511 | for ac_cxx_preproc_warn_flag in '' yes | |
17512 | do | |
17513 | # Use a header file that comes with gcc, so configuring glibc | |
17514 | # with a fresh cross-compiler works. | |
17515 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
17516 | # <limits.h> exists even on freestanding compilers. | |
17517 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
17518 | # not just through cpp. "Syntax error" is here to catch this case. | |
17519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17520 | /* end confdefs.h. */ | |
17521 | #ifdef __STDC__ | |
17522 | # include <limits.h> | |
17523 | #else | |
17524 | # include <assert.h> | |
17525 | #endif | |
17526 | Syntax error | |
17527 | _ACEOF | |
17528 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17529 | ||
17530 | else | |
17531 | # Broken: fails on valid input. | |
17532 | continue | |
17533 | fi | |
17534 | rm -f conftest.err conftest.$ac_ext | |
17535 | ||
17536 | # OK, works on sane cases. Now check whether nonexistent headers | |
17537 | # can be detected and how. | |
17538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17539 | /* end confdefs.h. */ | |
17540 | #include <ac_nonexistent.h> | |
17541 | _ACEOF | |
17542 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17543 | # Broken: success on invalid input. | |
17544 | continue | |
17545 | else | |
17546 | # Passes both tests. | |
17547 | ac_preproc_ok=: | |
17548 | break | |
17549 | fi | |
17550 | rm -f conftest.err conftest.$ac_ext | |
17551 | ||
17552 | done | |
17553 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
17554 | rm -f conftest.err conftest.$ac_ext | |
17555 | if $ac_preproc_ok; then : | |
17556 | ||
17557 | else | |
17558 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17559 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17560 | as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check | |
17561 | See \`config.log' for more details." "$LINENO" 5; } | |
17562 | fi | |
17563 | ||
17564 | ac_ext=c | |
17565 | ac_cpp='$CPP $CPPFLAGS' | |
17566 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17567 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17568 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17569 | ||
17570 | else | |
17571 | _lt_caught_CXX_error=yes | |
17572 | fi | |
00020c16 | 17573 | |
5213506e | 17574 | ac_ext=cpp |
00020c16 ILT |
17575 | ac_cpp='$CXXCPP $CPPFLAGS' |
17576 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17577 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17578 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17579 | ||
17580 | archive_cmds_need_lc_CXX=no | |
17581 | allow_undefined_flag_CXX= | |
17582 | always_export_symbols_CXX=no | |
17583 | archive_expsym_cmds_CXX= | |
17584 | compiler_needs_object_CXX=no | |
17585 | export_dynamic_flag_spec_CXX= | |
17586 | hardcode_direct_CXX=no | |
17587 | hardcode_direct_absolute_CXX=no | |
17588 | hardcode_libdir_flag_spec_CXX= | |
17589 | hardcode_libdir_flag_spec_ld_CXX= | |
17590 | hardcode_libdir_separator_CXX= | |
17591 | hardcode_minus_L_CXX=no | |
17592 | hardcode_shlibpath_var_CXX=unsupported | |
17593 | hardcode_automatic_CXX=no | |
17594 | inherit_rpath_CXX=no | |
17595 | module_cmds_CXX= | |
17596 | module_expsym_cmds_CXX= | |
17597 | link_all_deplibs_CXX=unknown | |
17598 | old_archive_cmds_CXX=$old_archive_cmds | |
43e02a8a RW |
17599 | reload_flag_CXX=$reload_flag |
17600 | reload_cmds_CXX=$reload_cmds | |
00020c16 ILT |
17601 | no_undefined_flag_CXX= |
17602 | whole_archive_flag_spec_CXX= | |
17603 | enable_shared_with_static_runtimes_CXX=no | |
17604 | ||
17605 | # Source file extension for C++ test sources. | |
17606 | ac_ext=cpp | |
17607 | ||
17608 | # Object file extension for compiled C++ test sources. | |
17609 | objext=o | |
17610 | objext_CXX=$objext | |
17611 | ||
17612 | # No sense in running all these tests if we already determined that | |
17613 | # the CXX compiler isn't working. Some variables (like enable_shared) | |
17614 | # are currently assumed to apply to all compilers on this platform, | |
17615 | # and will be corrupted by setting them based on a non-working compiler. | |
17616 | if test "$_lt_caught_CXX_error" != yes; then | |
17617 | # Code to be used in simple compile tests | |
17618 | lt_simple_compile_test_code="int some_variable = 0;" | |
17619 | ||
17620 | # Code to be used in simple link tests | |
17621 | lt_simple_link_test_code='int main(int, char *[]) { return(0); }' | |
17622 | ||
17623 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
17624 | ||
17625 | ||
17626 | ||
17627 | ||
17628 | ||
17629 | ||
17630 | # If no C compiler was specified, use CC. | |
17631 | LTCC=${LTCC-"$CC"} | |
17632 | ||
17633 | # If no C compiler flags were specified, use CFLAGS. | |
17634 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
17635 | ||
17636 | # Allow CC to be a program name with arguments. | |
17637 | compiler=$CC | |
17638 | ||
17639 | ||
17640 | # save warnings/boilerplate of simple test code | |
17641 | ac_outfile=conftest.$ac_objext | |
17642 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
17643 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
17644 | _lt_compiler_boilerplate=`cat conftest.err` | |
17645 | $RM conftest* | |
17646 | ||
17647 | ac_outfile=conftest.$ac_objext | |
17648 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
17649 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
17650 | _lt_linker_boilerplate=`cat conftest.err` | |
17651 | $RM -r conftest* | |
17652 | ||
17653 | ||
17654 | # Allow CC to be a program name with arguments. | |
17655 | lt_save_CC=$CC | |
17656 | lt_save_LD=$LD | |
17657 | lt_save_GCC=$GCC | |
17658 | GCC=$GXX | |
17659 | lt_save_with_gnu_ld=$with_gnu_ld | |
17660 | lt_save_path_LD=$lt_cv_path_LD | |
17661 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | |
17662 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | |
17663 | else | |
17664 | $as_unset lt_cv_prog_gnu_ld | |
17665 | fi | |
17666 | if test -n "${lt_cv_path_LDCXX+set}"; then | |
17667 | lt_cv_path_LD=$lt_cv_path_LDCXX | |
17668 | else | |
17669 | $as_unset lt_cv_path_LD | |
17670 | fi | |
17671 | test -z "${LDCXX+set}" || LD=$LDCXX | |
17672 | CC=${CXX-"c++"} | |
17673 | compiler=$CC | |
17674 | compiler_CXX=$CC | |
17675 | for cc_temp in $compiler""; do | |
17676 | case $cc_temp in | |
17677 | compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; | |
17678 | distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; | |
17679 | \-*) ;; | |
17680 | *) break;; | |
17681 | esac | |
17682 | done | |
43e02a8a | 17683 | cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
00020c16 ILT |
17684 | |
17685 | ||
17686 | if test -n "$compiler"; then | |
17687 | # We don't want -fno-exception when compiling C++ code, so set the | |
17688 | # no_builtin_flag separately | |
17689 | if test "$GXX" = yes; then | |
17690 | lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' | |
17691 | else | |
17692 | lt_prog_compiler_no_builtin_flag_CXX= | |
17693 | fi | |
17694 | ||
17695 | if test "$GXX" = yes; then | |
17696 | # Set up default GNU C++ configuration | |
17697 | ||
17698 | ||
17699 | ||
5213506e RW |
17700 | # Check whether --with-gnu-ld was given. |
17701 | if test "${with_gnu_ld+set}" = set; then : | |
17702 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
00020c16 ILT |
17703 | else |
17704 | with_gnu_ld=no | |
5213506e RW |
17705 | fi |
17706 | ||
00020c16 ILT |
17707 | ac_prog=ld |
17708 | if test "$GCC" = yes; then | |
17709 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
17710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 |
17711 | $as_echo_n "checking for ld used by $CC... " >&6; } | |
00020c16 ILT |
17712 | case $host in |
17713 | *-*-mingw*) | |
17714 | # gcc leaves a trailing carriage return which upsets mingw | |
17715 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
17716 | *) | |
17717 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
17718 | esac | |
17719 | case $ac_prog in | |
17720 | # Accept absolute paths. | |
17721 | [\\/]* | ?:[\\/]*) | |
17722 | re_direlt='/[^/][^/]*/\.\./' | |
17723 | # Canonicalize the pathname of ld | |
17724 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
17725 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
17726 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
17727 | done | |
17728 | test -z "$LD" && LD="$ac_prog" | |
17729 | ;; | |
17730 | "") | |
17731 | # If it fails, then pretend we aren't using GCC. | |
17732 | ac_prog=ld | |
17733 | ;; | |
17734 | *) | |
17735 | # If it is relative, then search for the first ld in PATH. | |
17736 | with_gnu_ld=unknown | |
17737 | ;; | |
17738 | esac | |
17739 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
17740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
17741 | $as_echo_n "checking for GNU ld... " >&6; } | |
00020c16 | 17742 | else |
5213506e RW |
17743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
17744 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
00020c16 | 17745 | fi |
5213506e RW |
17746 | if test "${lt_cv_path_LD+set}" = set; then : |
17747 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17748 | else |
17749 | if test -z "$LD"; then | |
17750 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
17751 | for ac_dir in $PATH; do | |
17752 | IFS="$lt_save_ifs" | |
17753 | test -z "$ac_dir" && ac_dir=. | |
17754 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
17755 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
17756 | # Check to see if the program is GNU ld. I'd rather use --version, | |
17757 | # but apparently some variants of GNU ld only accept -v. | |
17758 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
17759 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
17760 | *GNU* | *'with BFD'*) | |
17761 | test "$with_gnu_ld" != no && break | |
17762 | ;; | |
17763 | *) | |
17764 | test "$with_gnu_ld" != yes && break | |
17765 | ;; | |
17766 | esac | |
17767 | fi | |
17768 | done | |
17769 | IFS="$lt_save_ifs" | |
17770 | else | |
17771 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
17772 | fi | |
17773 | fi | |
17774 | ||
17775 | LD="$lt_cv_path_LD" | |
17776 | if test -n "$LD"; then | |
5213506e RW |
17777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
17778 | $as_echo "$LD" >&6; } | |
00020c16 | 17779 | else |
5213506e RW |
17780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17781 | $as_echo "no" >&6; } | |
00020c16 | 17782 | fi |
5213506e RW |
17783 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
17784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
17785 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
17786 | if test "${lt_cv_prog_gnu_ld+set}" = set; then : | |
17787 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17788 | else |
17789 | # I'd rather use --version here, but apparently some GNU lds only accept -v. | |
17790 | case `$LD -v 2>&1 </dev/null` in | |
17791 | *GNU* | *'with BFD'*) | |
17792 | lt_cv_prog_gnu_ld=yes | |
17793 | ;; | |
17794 | *) | |
17795 | lt_cv_prog_gnu_ld=no | |
17796 | ;; | |
17797 | esac | |
17798 | fi | |
5213506e RW |
17799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 |
17800 | $as_echo "$lt_cv_prog_gnu_ld" >&6; } | |
00020c16 ILT |
17801 | with_gnu_ld=$lt_cv_prog_gnu_ld |
17802 | ||
17803 | ||
17804 | ||
17805 | ||
17806 | ||
17807 | ||
17808 | ||
17809 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
17810 | # archiving commands below assume that GNU ld is being used. | |
17811 | if test "$with_gnu_ld" = yes; then | |
17812 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
17813 | archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
17814 | ||
17815 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
17816 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
17817 | ||
17818 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
17819 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
17820 | # investigate it a little bit more. (MM) | |
17821 | wlarc='${wl}' | |
17822 | ||
17823 | # ancient GNU ld didn't support --whole-archive et. al. | |
17824 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | | |
17825 | $GREP 'no-whole-archive' > /dev/null; then | |
17826 | whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
17827 | else | |
17828 | whole_archive_flag_spec_CXX= | |
17829 | fi | |
17830 | else | |
17831 | with_gnu_ld=no | |
17832 | wlarc= | |
17833 | ||
17834 | # A generic and very simple default shared library creation | |
17835 | # command for GNU C++ for the case where it uses the native | |
17836 | # linker, instead of GNU ld. If possible, this setting should | |
17837 | # overridden to take advantage of the native linker features on | |
17838 | # the platform it is being used on. | |
17839 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
17840 | fi | |
17841 | ||
17842 | # Commands to make compiler produce verbose output that lists | |
17843 | # what "hidden" libraries, object files and flags are used when | |
17844 | # linking a shared library. | |
43e02a8a | 17845 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
17846 | |
17847 | else | |
17848 | GXX=no | |
17849 | with_gnu_ld=no | |
17850 | wlarc= | |
17851 | fi | |
17852 | ||
17853 | # PORTME: fill in a description of your system's C++ link characteristics | |
5213506e RW |
17854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
17855 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
00020c16 ILT |
17856 | ld_shlibs_CXX=yes |
17857 | case $host_os in | |
17858 | aix3*) | |
17859 | # FIXME: insert proper C++ library support | |
17860 | ld_shlibs_CXX=no | |
17861 | ;; | |
17862 | aix[4-9]*) | |
17863 | if test "$host_cpu" = ia64; then | |
17864 | # On IA64, the linker does run time linking by default, so we don't | |
17865 | # have to do anything special. | |
17866 | aix_use_runtimelinking=no | |
17867 | exp_sym_flag='-Bexport' | |
17868 | no_entry_flag="" | |
17869 | else | |
17870 | aix_use_runtimelinking=no | |
17871 | ||
17872 | # Test if we are trying to use run time linking or normal | |
17873 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
17874 | # need to do runtime linking. | |
17875 | case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) | |
17876 | for ld_flag in $LDFLAGS; do | |
17877 | case $ld_flag in | |
17878 | *-brtl*) | |
17879 | aix_use_runtimelinking=yes | |
17880 | break | |
17881 | ;; | |
17882 | esac | |
17883 | done | |
17884 | ;; | |
17885 | esac | |
17886 | ||
17887 | exp_sym_flag='-bexport' | |
17888 | no_entry_flag='-bnoentry' | |
17889 | fi | |
17890 | ||
17891 | # When large executables or shared objects are built, AIX ld can | |
17892 | # have problems creating the table of contents. If linking a library | |
17893 | # or program results in "error TOC overflow" add -mminimal-toc to | |
17894 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
17895 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
17896 | ||
17897 | archive_cmds_CXX='' | |
17898 | hardcode_direct_CXX=yes | |
17899 | hardcode_direct_absolute_CXX=yes | |
17900 | hardcode_libdir_separator_CXX=':' | |
17901 | link_all_deplibs_CXX=yes | |
17902 | file_list_spec_CXX='${wl}-f,' | |
17903 | ||
17904 | if test "$GXX" = yes; then | |
17905 | case $host_os in aix4.[012]|aix4.[012].*) | |
17906 | # We only want to do this on AIX 4.2 and lower, the check | |
17907 | # below for broken collect2 doesn't work under 4.3+ | |
17908 | collect2name=`${CC} -print-prog-name=collect2` | |
17909 | if test -f "$collect2name" && | |
17910 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
17911 | then | |
17912 | # We have reworked collect2 | |
17913 | : | |
17914 | else | |
17915 | # We have old collect2 | |
17916 | hardcode_direct_CXX=unsupported | |
17917 | # It fails to find uninstalled libraries when the uninstalled | |
17918 | # path is not listed in the libpath. Setting hardcode_minus_L | |
17919 | # to unsupported forces relinking | |
17920 | hardcode_minus_L_CXX=yes | |
17921 | hardcode_libdir_flag_spec_CXX='-L$libdir' | |
17922 | hardcode_libdir_separator_CXX= | |
17923 | fi | |
17924 | esac | |
17925 | shared_flag='-shared' | |
17926 | if test "$aix_use_runtimelinking" = yes; then | |
17927 | shared_flag="$shared_flag "'${wl}-G' | |
17928 | fi | |
17929 | else | |
17930 | # not using gcc | |
17931 | if test "$host_cpu" = ia64; then | |
17932 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
17933 | # chokes on -Wl,-G. The following line is correct: | |
17934 | shared_flag='-G' | |
17935 | else | |
17936 | if test "$aix_use_runtimelinking" = yes; then | |
17937 | shared_flag='${wl}-G' | |
17938 | else | |
17939 | shared_flag='${wl}-bM:SRE' | |
17940 | fi | |
17941 | fi | |
17942 | fi | |
17943 | ||
17944 | export_dynamic_flag_spec_CXX='${wl}-bexpall' | |
17945 | # It seems that -bexpall does not export symbols beginning with | |
17946 | # underscore (_), so it is better to generate a list of symbols to | |
17947 | # export. | |
17948 | always_export_symbols_CXX=yes | |
17949 | if test "$aix_use_runtimelinking" = yes; then | |
17950 | # Warning - without using the other runtime loading flags (-brtl), | |
17951 | # -berok will link without error, but may produce a broken library. | |
17952 | allow_undefined_flag_CXX='-berok' | |
17953 | # Determine the default libpath from the value encoded in an empty | |
17954 | # executable. | |
5213506e | 17955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
17956 | /* end confdefs.h. */ |
17957 | ||
17958 | int | |
17959 | main () | |
17960 | { | |
17961 | ||
17962 | ; | |
17963 | return 0; | |
17964 | } | |
17965 | _ACEOF | |
5213506e | 17966 | if ac_fn_cxx_try_link "$LINENO"; then : |
00020c16 ILT |
17967 | |
17968 | lt_aix_libpath_sed=' | |
17969 | /Import File Strings/,/^$/ { | |
17970 | /^0/ { | |
17971 | s/^0 *\(.*\)$/\1/ | |
17972 | p | |
17973 | } | |
17974 | }' | |
17975 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
17976 | # Check for a 64-bit object if we didn't find anything. | |
17977 | if test -z "$aix_libpath"; then | |
17978 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
17979 | fi | |
00020c16 | 17980 | fi |
5213506e RW |
17981 | rm -f core conftest.err conftest.$ac_objext \ |
17982 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
17983 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
17984 | ||
17985 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | |
17986 | ||
43e02a8a | 17987 | archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
00020c16 ILT |
17988 | else |
17989 | if test "$host_cpu" = ia64; then | |
17990 | hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' | |
17991 | allow_undefined_flag_CXX="-z nodefs" | |
17992 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
17993 | else | |
17994 | # Determine the default libpath from the value encoded in an | |
17995 | # empty executable. | |
5213506e | 17996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
17997 | /* end confdefs.h. */ |
17998 | ||
17999 | int | |
18000 | main () | |
18001 | { | |
18002 | ||
18003 | ; | |
18004 | return 0; | |
18005 | } | |
18006 | _ACEOF | |
5213506e | 18007 | if ac_fn_cxx_try_link "$LINENO"; then : |
00020c16 ILT |
18008 | |
18009 | lt_aix_libpath_sed=' | |
18010 | /Import File Strings/,/^$/ { | |
18011 | /^0/ { | |
18012 | s/^0 *\(.*\)$/\1/ | |
18013 | p | |
18014 | } | |
18015 | }' | |
18016 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
18017 | # Check for a 64-bit object if we didn't find anything. | |
18018 | if test -z "$aix_libpath"; then | |
18019 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
18020 | fi | |
00020c16 | 18021 | fi |
5213506e RW |
18022 | rm -f core conftest.err conftest.$ac_objext \ |
18023 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
18024 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
18025 | ||
18026 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | |
18027 | # Warning - without using the other run time loading flags, | |
18028 | # -berok will link without error, but may produce a broken library. | |
18029 | no_undefined_flag_CXX=' ${wl}-bernotok' | |
18030 | allow_undefined_flag_CXX=' ${wl}-berok' | |
43e02a8a RW |
18031 | if test "$with_gnu_ld" = yes; then |
18032 | # We only use this code for GNU lds that support --whole-archive. | |
18033 | whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
18034 | else | |
18035 | # Exported symbols can be pulled into shared objects from archives | |
18036 | whole_archive_flag_spec_CXX='$convenience' | |
18037 | fi | |
00020c16 ILT |
18038 | archive_cmds_need_lc_CXX=yes |
18039 | # This is similar to how AIX traditionally builds its shared | |
18040 | # libraries. | |
18041 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
18042 | fi | |
18043 | fi | |
18044 | ;; | |
18045 | ||
18046 | beos*) | |
18047 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
18048 | allow_undefined_flag_CXX=unsupported | |
18049 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
18050 | # support --undefined. This deserves some investigation. FIXME | |
18051 | archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18052 | else | |
18053 | ld_shlibs_CXX=no | |
18054 | fi | |
18055 | ;; | |
18056 | ||
18057 | chorus*) | |
18058 | case $cc_basename in | |
18059 | *) | |
18060 | # FIXME: insert proper C++ library support | |
18061 | ld_shlibs_CXX=no | |
18062 | ;; | |
18063 | esac | |
18064 | ;; | |
18065 | ||
18066 | cygwin* | mingw* | pw32* | cegcc*) | |
18067 | # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, | |
18068 | # as there is no search path for DLLs. | |
18069 | hardcode_libdir_flag_spec_CXX='-L$libdir' | |
43e02a8a | 18070 | export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' |
00020c16 ILT |
18071 | allow_undefined_flag_CXX=unsupported |
18072 | always_export_symbols_CXX=no | |
18073 | enable_shared_with_static_runtimes_CXX=yes | |
18074 | ||
18075 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
18076 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
18077 | # If the export-symbols file already is a .def file (1st line | |
18078 | # is EXPORTS), use it as is; otherwise, prepend... | |
18079 | archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
18080 | cp $export_symbols $output_objdir/$soname.def; | |
18081 | else | |
18082 | echo EXPORTS > $output_objdir/$soname.def; | |
18083 | cat $export_symbols >> $output_objdir/$soname.def; | |
18084 | fi~ | |
18085 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
18086 | else | |
18087 | ld_shlibs_CXX=no | |
18088 | fi | |
18089 | ;; | |
18090 | darwin* | rhapsody*) | |
18091 | ||
18092 | ||
18093 | archive_cmds_need_lc_CXX=no | |
18094 | hardcode_direct_CXX=no | |
18095 | hardcode_automatic_CXX=yes | |
18096 | hardcode_shlibpath_var_CXX=unsupported | |
43e02a8a RW |
18097 | if test "$lt_cv_ld_force_load" = "yes"; then |
18098 | whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | |
18099 | else | |
18100 | whole_archive_flag_spec_CXX='' | |
18101 | fi | |
00020c16 ILT |
18102 | link_all_deplibs_CXX=yes |
18103 | allow_undefined_flag_CXX="$_lt_dar_allow_undefined" | |
18104 | case $cc_basename in | |
18105 | ifort*) _lt_dar_can_shared=yes ;; | |
18106 | *) _lt_dar_can_shared=$GCC ;; | |
18107 | esac | |
18108 | if test "$_lt_dar_can_shared" = "yes"; then | |
43e02a8a | 18109 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
18110 | archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
18111 | module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
18112 | archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
18113 | module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
18114 | if test "$lt_cv_apple_cc_single_mod" != "yes"; then | |
18115 | archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" | |
18116 | archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" | |
18117 | fi | |
18118 | ||
18119 | else | |
18120 | ld_shlibs_CXX=no | |
18121 | fi | |
18122 | ||
18123 | ;; | |
18124 | ||
18125 | dgux*) | |
18126 | case $cc_basename in | |
18127 | ec++*) | |
18128 | # FIXME: insert proper C++ library support | |
18129 | ld_shlibs_CXX=no | |
18130 | ;; | |
18131 | ghcx*) | |
18132 | # Green Hills C++ Compiler | |
18133 | # FIXME: insert proper C++ library support | |
18134 | ld_shlibs_CXX=no | |
18135 | ;; | |
18136 | *) | |
18137 | # FIXME: insert proper C++ library support | |
18138 | ld_shlibs_CXX=no | |
18139 | ;; | |
18140 | esac | |
18141 | ;; | |
18142 | ||
18143 | freebsd[12]*) | |
18144 | # C++ shared libraries reported to be fairly broken before | |
18145 | # switch to ELF | |
18146 | ld_shlibs_CXX=no | |
18147 | ;; | |
18148 | ||
18149 | freebsd-elf*) | |
18150 | archive_cmds_need_lc_CXX=no | |
18151 | ;; | |
18152 | ||
18153 | freebsd* | dragonfly*) | |
18154 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
18155 | # conventions | |
18156 | ld_shlibs_CXX=yes | |
18157 | ;; | |
18158 | ||
18159 | gnu*) | |
18160 | ;; | |
18161 | ||
43e02a8a RW |
18162 | haiku*) |
18163 | archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18164 | link_all_deplibs_CXX=yes | |
18165 | ;; | |
18166 | ||
00020c16 ILT |
18167 | hpux9*) |
18168 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | |
18169 | hardcode_libdir_separator_CXX=: | |
18170 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18171 | hardcode_direct_CXX=yes | |
18172 | hardcode_minus_L_CXX=yes # Not in the search PATH, | |
18173 | # but as the default | |
18174 | # location of the library. | |
18175 | ||
18176 | case $cc_basename in | |
18177 | CC*) | |
18178 | # FIXME: insert proper C++ library support | |
18179 | ld_shlibs_CXX=no | |
18180 | ;; | |
18181 | aCC*) | |
18182 | archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
18183 | # Commands to make compiler produce verbose output that lists | |
18184 | # what "hidden" libraries, object files and flags are used when | |
18185 | # linking a shared library. | |
18186 | # | |
18187 | # There doesn't appear to be a way to prevent this compiler from | |
18188 | # explicitly linking system object files so we need to strip them | |
18189 | # from the output so that they don't get included in the library | |
18190 | # dependencies. | |
43e02a8a | 18191 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18192 | ;; |
18193 | *) | |
18194 | if test "$GXX" = yes; then | |
18195 | archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
18196 | else | |
18197 | # FIXME: insert proper C++ library support | |
18198 | ld_shlibs_CXX=no | |
18199 | fi | |
18200 | ;; | |
18201 | esac | |
18202 | ;; | |
18203 | ||
18204 | hpux10*|hpux11*) | |
18205 | if test $with_gnu_ld = no; then | |
18206 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | |
18207 | hardcode_libdir_separator_CXX=: | |
18208 | ||
18209 | case $host_cpu in | |
18210 | hppa*64*|ia64*) | |
18211 | ;; | |
18212 | *) | |
18213 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18214 | ;; | |
18215 | esac | |
18216 | fi | |
18217 | case $host_cpu in | |
18218 | hppa*64*|ia64*) | |
18219 | hardcode_direct_CXX=no | |
18220 | hardcode_shlibpath_var_CXX=no | |
18221 | ;; | |
18222 | *) | |
18223 | hardcode_direct_CXX=yes | |
18224 | hardcode_direct_absolute_CXX=yes | |
18225 | hardcode_minus_L_CXX=yes # Not in the search PATH, | |
18226 | # but as the default | |
18227 | # location of the library. | |
18228 | ;; | |
18229 | esac | |
18230 | ||
18231 | case $cc_basename in | |
18232 | CC*) | |
18233 | # FIXME: insert proper C++ library support | |
18234 | ld_shlibs_CXX=no | |
18235 | ;; | |
18236 | aCC*) | |
18237 | case $host_cpu in | |
18238 | hppa*64*) | |
18239 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18240 | ;; | |
18241 | ia64*) | |
18242 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18243 | ;; | |
18244 | *) | |
18245 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18246 | ;; | |
18247 | esac | |
18248 | # Commands to make compiler produce verbose output that lists | |
18249 | # what "hidden" libraries, object files and flags are used when | |
18250 | # linking a shared library. | |
18251 | # | |
18252 | # There doesn't appear to be a way to prevent this compiler from | |
18253 | # explicitly linking system object files so we need to strip them | |
18254 | # from the output so that they don't get included in the library | |
18255 | # dependencies. | |
43e02a8a | 18256 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18257 | ;; |
18258 | *) | |
18259 | if test "$GXX" = yes; then | |
18260 | if test $with_gnu_ld = no; then | |
18261 | case $host_cpu in | |
18262 | hppa*64*) | |
18263 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18264 | ;; | |
18265 | ia64*) | |
18266 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18267 | ;; | |
18268 | *) | |
18269 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18270 | ;; | |
18271 | esac | |
18272 | fi | |
18273 | else | |
18274 | # FIXME: insert proper C++ library support | |
18275 | ld_shlibs_CXX=no | |
18276 | fi | |
18277 | ;; | |
18278 | esac | |
18279 | ;; | |
18280 | ||
18281 | interix[3-9]*) | |
18282 | hardcode_direct_CXX=no | |
18283 | hardcode_shlibpath_var_CXX=no | |
18284 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18285 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18286 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
18287 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
18288 | # default) and relocated if they conflict, which is a slow very memory | |
18289 | # consuming and fragmenting process. To avoid this, we pick a random, | |
18290 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
18291 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
18292 | archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
18293 | archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
18294 | ;; | |
18295 | irix5* | irix6*) | |
18296 | case $cc_basename in | |
18297 | CC*) | |
18298 | # SGI C++ | |
43e02a8a | 18299 | archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18300 | |
18301 | # Archives containing C++ object files must be created using | |
18302 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
18303 | # necessary to make sure instantiated templates are included | |
18304 | # in the archive. | |
18305 | old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
18306 | ;; | |
18307 | *) | |
18308 | if test "$GXX" = yes; then | |
18309 | if test "$with_gnu_ld" = no; then | |
43e02a8a | 18310 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 | 18311 | else |
43e02a8a | 18312 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' |
00020c16 ILT |
18313 | fi |
18314 | fi | |
18315 | link_all_deplibs_CXX=yes | |
18316 | ;; | |
18317 | esac | |
18318 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18319 | hardcode_libdir_separator_CXX=: | |
18320 | inherit_rpath_CXX=yes | |
18321 | ;; | |
18322 | ||
18323 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
18324 | case $cc_basename in | |
18325 | KCC*) | |
18326 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
18327 | ||
18328 | # KCC will only create a shared library if the output file | |
18329 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
18330 | # to its proper name (with version) after linking. | |
18331 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
18332 | archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | |
18333 | # Commands to make compiler produce verbose output that lists | |
18334 | # what "hidden" libraries, object files and flags are used when | |
18335 | # linking a shared library. | |
18336 | # | |
18337 | # There doesn't appear to be a way to prevent this compiler from | |
18338 | # explicitly linking system object files so we need to strip them | |
18339 | # from the output so that they don't get included in the library | |
18340 | # dependencies. | |
43e02a8a | 18341 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18342 | |
18343 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18344 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18345 | ||
18346 | # Archives containing C++ object files must be created using | |
18347 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
18348 | old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' | |
18349 | ;; | |
18350 | icpc* | ecpc* ) | |
18351 | # Intel C++ | |
18352 | with_gnu_ld=yes | |
18353 | # version 8.0 and above of icpc choke on multiply defined symbols | |
18354 | # if we add $predep_objects and $postdep_objects, however 7.1 and | |
18355 | # earlier do not add the objects themselves. | |
18356 | case `$CC -V 2>&1` in | |
18357 | *"Version 7."*) | |
18358 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18359 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
18360 | ;; | |
18361 | *) # Version 8.0 or newer | |
18362 | tmp_idyn= | |
18363 | case $host_cpu in | |
18364 | ia64*) tmp_idyn=' -i_dynamic';; | |
18365 | esac | |
18366 | archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18367 | archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
18368 | ;; | |
18369 | esac | |
18370 | archive_cmds_need_lc_CXX=no | |
18371 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18372 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18373 | whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
18374 | ;; | |
18375 | pgCC* | pgcpp*) | |
18376 | # Portland Group C++ compiler | |
18377 | case `$CC -V` in | |
43e02a8a | 18378 | *pgCC\ [1-5].* | *pgcpp\ [1-5].*) |
00020c16 ILT |
18379 | prelink_cmds_CXX='tpldir=Template.dir~ |
18380 | rm -rf $tpldir~ | |
18381 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | |
18382 | compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' | |
18383 | old_archive_cmds_CXX='tpldir=Template.dir~ | |
18384 | rm -rf $tpldir~ | |
18385 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | |
18386 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ | |
18387 | $RANLIB $oldlib' | |
18388 | archive_cmds_CXX='tpldir=Template.dir~ | |
18389 | rm -rf $tpldir~ | |
18390 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
18391 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
18392 | archive_expsym_cmds_CXX='tpldir=Template.dir~ | |
18393 | rm -rf $tpldir~ | |
18394 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
18395 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
18396 | ;; | |
43e02a8a | 18397 | *) # Version 6 and above use weak symbols |
00020c16 ILT |
18398 | archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' |
18399 | archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
18400 | ;; | |
18401 | esac | |
18402 | ||
18403 | hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' | |
18404 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
43e02a8a | 18405 | whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
18406 | ;; |
18407 | cxx*) | |
18408 | # Compaq C++ | |
18409 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18410 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | |
18411 | ||
18412 | runpath_var=LD_RUN_PATH | |
18413 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | |
18414 | hardcode_libdir_separator_CXX=: | |
18415 | ||
18416 | # Commands to make compiler produce verbose output that lists | |
18417 | # what "hidden" libraries, object files and flags are used when | |
18418 | # linking a shared library. | |
18419 | # | |
18420 | # There doesn't appear to be a way to prevent this compiler from | |
18421 | # explicitly linking system object files so we need to strip them | |
18422 | # from the output so that they don't get included in the library | |
18423 | # dependencies. | |
43e02a8a | 18424 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' |
00020c16 | 18425 | ;; |
43e02a8a | 18426 | xl* | mpixl* | bgxl*) |
00020c16 ILT |
18427 | # IBM XL 8.0 on PPC, with GNU ld |
18428 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18429 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18430 | archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18431 | if test "x$supports_anon_versioning" = xyes; then | |
18432 | archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ | |
18433 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
18434 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
18435 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
18436 | fi | |
18437 | ;; | |
18438 | *) | |
18439 | case `$CC -V 2>&1 | sed 5q` in | |
18440 | *Sun\ C*) | |
18441 | # Sun C++ 5.9 | |
18442 | no_undefined_flag_CXX=' -zdefs' | |
18443 | archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18444 | archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' | |
18445 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
43e02a8a | 18446 | whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
18447 | compiler_needs_object_CXX=yes |
18448 | ||
18449 | # Not sure whether something based on | |
18450 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | |
18451 | # would be better. | |
43e02a8a | 18452 | output_verbose_link_cmd='func_echo_all' |
00020c16 ILT |
18453 | |
18454 | # Archives containing C++ object files must be created using | |
18455 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
18456 | # necessary to make sure instantiated templates are included | |
18457 | # in the archive. | |
18458 | old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' | |
18459 | ;; | |
18460 | esac | |
18461 | ;; | |
18462 | esac | |
18463 | ;; | |
18464 | ||
18465 | lynxos*) | |
18466 | # FIXME: insert proper C++ library support | |
18467 | ld_shlibs_CXX=no | |
18468 | ;; | |
18469 | ||
18470 | m88k*) | |
18471 | # FIXME: insert proper C++ library support | |
18472 | ld_shlibs_CXX=no | |
18473 | ;; | |
18474 | ||
18475 | mvs*) | |
18476 | case $cc_basename in | |
18477 | cxx*) | |
18478 | # FIXME: insert proper C++ library support | |
18479 | ld_shlibs_CXX=no | |
18480 | ;; | |
18481 | *) | |
18482 | # FIXME: insert proper C++ library support | |
18483 | ld_shlibs_CXX=no | |
18484 | ;; | |
18485 | esac | |
18486 | ;; | |
18487 | ||
18488 | netbsd*) | |
18489 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
18490 | archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | |
18491 | wlarc= | |
18492 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
18493 | hardcode_direct_CXX=yes | |
18494 | hardcode_shlibpath_var_CXX=no | |
18495 | fi | |
18496 | # Workaround some broken pre-1.5 toolchains | |
18497 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | |
18498 | ;; | |
18499 | ||
18500 | *nto* | *qnx*) | |
18501 | ld_shlibs_CXX=yes | |
18502 | ;; | |
18503 | ||
18504 | openbsd2*) | |
18505 | # C++ shared libraries are fairly broken | |
18506 | ld_shlibs_CXX=no | |
18507 | ;; | |
18508 | ||
18509 | openbsd*) | |
18510 | if test -f /usr/libexec/ld.so; then | |
18511 | hardcode_direct_CXX=yes | |
18512 | hardcode_shlibpath_var_CXX=no | |
18513 | hardcode_direct_absolute_CXX=yes | |
18514 | archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
18515 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18516 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
18517 | archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' | |
18518 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18519 | whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
18520 | fi | |
43e02a8a | 18521 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
18522 | else |
18523 | ld_shlibs_CXX=no | |
18524 | fi | |
18525 | ;; | |
18526 | ||
18527 | osf3* | osf4* | osf5*) | |
18528 | case $cc_basename in | |
18529 | KCC*) | |
18530 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
18531 | ||
18532 | # KCC will only create a shared library if the output file | |
18533 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
18534 | # to its proper name (with version) after linking. | |
18535 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
18536 | ||
18537 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18538 | hardcode_libdir_separator_CXX=: | |
18539 | ||
18540 | # Archives containing C++ object files must be created using | |
18541 | # the KAI C++ compiler. | |
18542 | case $host in | |
18543 | osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; | |
18544 | *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; | |
18545 | esac | |
18546 | ;; | |
18547 | RCC*) | |
18548 | # Rational C++ 2.4.1 | |
18549 | # FIXME: insert proper C++ library support | |
18550 | ld_shlibs_CXX=no | |
18551 | ;; | |
18552 | cxx*) | |
18553 | case $host in | |
18554 | osf3*) | |
18555 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 18556 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18557 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' |
18558 | ;; | |
18559 | *) | |
18560 | allow_undefined_flag_CXX=' -expect_unresolved \*' | |
43e02a8a | 18561 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18562 | archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
18563 | echo "-hidden">> $lib.exp~ | |
43e02a8a | 18564 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ |
00020c16 ILT |
18565 | $RM $lib.exp' |
18566 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | |
18567 | ;; | |
18568 | esac | |
18569 | ||
18570 | hardcode_libdir_separator_CXX=: | |
18571 | ||
18572 | # Commands to make compiler produce verbose output that lists | |
18573 | # what "hidden" libraries, object files and flags are used when | |
18574 | # linking a shared library. | |
18575 | # | |
18576 | # There doesn't appear to be a way to prevent this compiler from | |
18577 | # explicitly linking system object files so we need to strip them | |
18578 | # from the output so that they don't get included in the library | |
18579 | # dependencies. | |
43e02a8a | 18580 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18581 | ;; |
18582 | *) | |
18583 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
18584 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | |
18585 | case $host in | |
18586 | osf3*) | |
43e02a8a | 18587 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18588 | ;; |
18589 | *) | |
43e02a8a | 18590 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18591 | ;; |
18592 | esac | |
18593 | ||
18594 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18595 | hardcode_libdir_separator_CXX=: | |
18596 | ||
18597 | # Commands to make compiler produce verbose output that lists | |
18598 | # what "hidden" libraries, object files and flags are used when | |
18599 | # linking a shared library. | |
43e02a8a | 18600 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18601 | |
18602 | else | |
18603 | # FIXME: insert proper C++ library support | |
18604 | ld_shlibs_CXX=no | |
18605 | fi | |
18606 | ;; | |
18607 | esac | |
18608 | ;; | |
18609 | ||
18610 | psos*) | |
18611 | # FIXME: insert proper C++ library support | |
18612 | ld_shlibs_CXX=no | |
18613 | ;; | |
18614 | ||
18615 | sunos4*) | |
18616 | case $cc_basename in | |
18617 | CC*) | |
18618 | # Sun C++ 4.x | |
18619 | # FIXME: insert proper C++ library support | |
18620 | ld_shlibs_CXX=no | |
18621 | ;; | |
18622 | lcc*) | |
18623 | # Lucid | |
18624 | # FIXME: insert proper C++ library support | |
18625 | ld_shlibs_CXX=no | |
18626 | ;; | |
18627 | *) | |
18628 | # FIXME: insert proper C++ library support | |
18629 | ld_shlibs_CXX=no | |
18630 | ;; | |
18631 | esac | |
18632 | ;; | |
18633 | ||
18634 | solaris*) | |
18635 | case $cc_basename in | |
18636 | CC*) | |
18637 | # Sun C++ 4.2, 5.x and Centerline C++ | |
18638 | archive_cmds_need_lc_CXX=yes | |
18639 | no_undefined_flag_CXX=' -zdefs' | |
18640 | archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18641 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18642 | $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18643 | ||
18644 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
18645 | hardcode_shlibpath_var_CXX=no | |
18646 | case $host_os in | |
18647 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
18648 | *) | |
18649 | # The compiler driver will combine and reorder linker options, | |
18650 | # but understands `-z linker_flag'. | |
18651 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
18652 | whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' | |
18653 | ;; | |
18654 | esac | |
18655 | link_all_deplibs_CXX=yes | |
18656 | ||
43e02a8a | 18657 | output_verbose_link_cmd='func_echo_all' |
00020c16 ILT |
18658 | |
18659 | # Archives containing C++ object files must be created using | |
18660 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
18661 | # necessary to make sure instantiated templates are included | |
18662 | # in the archive. | |
18663 | old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' | |
18664 | ;; | |
18665 | gcx*) | |
18666 | # Green Hills C++ Compiler | |
18667 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18668 | ||
18669 | # The C++ compiler must be used to create the archive. | |
18670 | old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
18671 | ;; | |
18672 | *) | |
18673 | # GNU C++ compiler with Solaris linker | |
18674 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
18675 | no_undefined_flag_CXX=' ${wl}-z ${wl}defs' | |
18676 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | |
18677 | archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18678 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18679 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18680 | ||
18681 | # Commands to make compiler produce verbose output that lists | |
18682 | # what "hidden" libraries, object files and flags are used when | |
18683 | # linking a shared library. | |
43e02a8a | 18684 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18685 | else |
18686 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
18687 | # platform. | |
18688 | archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18689 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18690 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18691 | ||
18692 | # Commands to make compiler produce verbose output that lists | |
18693 | # what "hidden" libraries, object files and flags are used when | |
18694 | # linking a shared library. | |
43e02a8a | 18695 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18696 | fi |
18697 | ||
18698 | hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' | |
18699 | case $host_os in | |
18700 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
18701 | *) | |
18702 | whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
18703 | ;; | |
18704 | esac | |
18705 | fi | |
18706 | ;; | |
18707 | esac | |
18708 | ;; | |
18709 | ||
18710 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) | |
18711 | no_undefined_flag_CXX='${wl}-z,text' | |
18712 | archive_cmds_need_lc_CXX=no | |
18713 | hardcode_shlibpath_var_CXX=no | |
18714 | runpath_var='LD_RUN_PATH' | |
18715 | ||
18716 | case $cc_basename in | |
18717 | CC*) | |
18718 | archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18719 | archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18720 | ;; | |
18721 | *) | |
18722 | archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18723 | archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18724 | ;; | |
18725 | esac | |
18726 | ;; | |
18727 | ||
18728 | sysv5* | sco3.2v5* | sco5v6*) | |
18729 | # Note: We can NOT use -z defs as we might desire, because we do not | |
18730 | # link with -lc, and that would cause any symbols used from libc to | |
18731 | # always be unresolved, which means just about no library would | |
18732 | # ever link correctly. If we're not using GNU ld we use -z text | |
18733 | # though, which does catch some bad symbols but isn't as heavy-handed | |
18734 | # as -z defs. | |
18735 | no_undefined_flag_CXX='${wl}-z,text' | |
18736 | allow_undefined_flag_CXX='${wl}-z,nodefs' | |
18737 | archive_cmds_need_lc_CXX=no | |
18738 | hardcode_shlibpath_var_CXX=no | |
18739 | hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' | |
18740 | hardcode_libdir_separator_CXX=':' | |
18741 | link_all_deplibs_CXX=yes | |
18742 | export_dynamic_flag_spec_CXX='${wl}-Bexport' | |
18743 | runpath_var='LD_RUN_PATH' | |
18744 | ||
18745 | case $cc_basename in | |
18746 | CC*) | |
18747 | archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18748 | archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
43e02a8a RW |
18749 | old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ |
18750 | '"$old_archive_cmds_CXX" | |
18751 | reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ | |
18752 | '"$reload_cmds_CXX" | |
00020c16 ILT |
18753 | ;; |
18754 | *) | |
18755 | archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18756 | archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18757 | ;; | |
18758 | esac | |
18759 | ;; | |
18760 | ||
18761 | tandem*) | |
18762 | case $cc_basename in | |
18763 | NCC*) | |
18764 | # NonStop-UX NCC 3.20 | |
18765 | # FIXME: insert proper C++ library support | |
18766 | ld_shlibs_CXX=no | |
18767 | ;; | |
18768 | *) | |
18769 | # FIXME: insert proper C++ library support | |
18770 | ld_shlibs_CXX=no | |
18771 | ;; | |
18772 | esac | |
18773 | ;; | |
18774 | ||
18775 | vxworks*) | |
18776 | # FIXME: insert proper C++ library support | |
18777 | ld_shlibs_CXX=no | |
18778 | ;; | |
18779 | ||
18780 | *) | |
18781 | # FIXME: insert proper C++ library support | |
18782 | ld_shlibs_CXX=no | |
18783 | ;; | |
18784 | esac | |
18785 | ||
5213506e RW |
18786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 |
18787 | $as_echo "$ld_shlibs_CXX" >&6; } | |
00020c16 ILT |
18788 | test "$ld_shlibs_CXX" = no && can_build_shared=no |
18789 | ||
18790 | GCC_CXX="$GXX" | |
18791 | LD_CXX="$LD" | |
18792 | ||
18793 | ## CAVEAT EMPTOR: | |
18794 | ## There is no encapsulation within the following macros, do not change | |
18795 | ## the running order or otherwise move them around unless you know exactly | |
18796 | ## what you are doing... | |
18797 | # Dependencies to place before and after the object being linked: | |
18798 | predep_objects_CXX= | |
18799 | postdep_objects_CXX= | |
18800 | predeps_CXX= | |
18801 | postdeps_CXX= | |
18802 | compiler_lib_search_path_CXX= | |
18803 | ||
18804 | cat > conftest.$ac_ext <<_LT_EOF | |
18805 | class Foo | |
18806 | { | |
18807 | public: | |
18808 | Foo (void) { a = 0; } | |
18809 | private: | |
18810 | int a; | |
18811 | }; | |
18812 | _LT_EOF | |
18813 | ||
5213506e | 18814 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
18815 | (eval $ac_compile) 2>&5 |
18816 | ac_status=$? | |
5213506e RW |
18817 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
18818 | test $ac_status = 0; }; then | |
00020c16 ILT |
18819 | # Parse the compiler output and extract the necessary |
18820 | # objects, libraries and library flags. | |
18821 | ||
18822 | # Sentinel used to keep track of whether or not we are before | |
18823 | # the conftest object file. | |
18824 | pre_test_object_deps_done=no | |
18825 | ||
18826 | for p in `eval "$output_verbose_link_cmd"`; do | |
18827 | case $p in | |
18828 | ||
18829 | -L* | -R* | -l*) | |
18830 | # Some compilers place space between "-{L,R}" and the path. | |
18831 | # Remove the space. | |
18832 | if test $p = "-L" || | |
18833 | test $p = "-R"; then | |
18834 | prev=$p | |
18835 | continue | |
18836 | else | |
18837 | prev= | |
18838 | fi | |
18839 | ||
18840 | if test "$pre_test_object_deps_done" = no; then | |
18841 | case $p in | |
18842 | -L* | -R*) | |
18843 | # Internal compiler library paths should come after those | |
18844 | # provided the user. The postdeps already come after the | |
18845 | # user supplied libs so there is no need to process them. | |
18846 | if test -z "$compiler_lib_search_path_CXX"; then | |
18847 | compiler_lib_search_path_CXX="${prev}${p}" | |
18848 | else | |
18849 | compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" | |
18850 | fi | |
18851 | ;; | |
18852 | # The "-l" case would never come before the object being | |
18853 | # linked, so don't bother handling this case. | |
18854 | esac | |
18855 | else | |
18856 | if test -z "$postdeps_CXX"; then | |
18857 | postdeps_CXX="${prev}${p}" | |
18858 | else | |
18859 | postdeps_CXX="${postdeps_CXX} ${prev}${p}" | |
18860 | fi | |
18861 | fi | |
18862 | ;; | |
18863 | ||
18864 | *.$objext) | |
18865 | # This assumes that the test object file only shows up | |
18866 | # once in the compiler output. | |
18867 | if test "$p" = "conftest.$objext"; then | |
18868 | pre_test_object_deps_done=yes | |
18869 | continue | |
18870 | fi | |
18871 | ||
18872 | if test "$pre_test_object_deps_done" = no; then | |
18873 | if test -z "$predep_objects_CXX"; then | |
18874 | predep_objects_CXX="$p" | |
18875 | else | |
18876 | predep_objects_CXX="$predep_objects_CXX $p" | |
18877 | fi | |
18878 | else | |
18879 | if test -z "$postdep_objects_CXX"; then | |
18880 | postdep_objects_CXX="$p" | |
18881 | else | |
18882 | postdep_objects_CXX="$postdep_objects_CXX $p" | |
18883 | fi | |
18884 | fi | |
18885 | ;; | |
18886 | ||
18887 | *) ;; # Ignore the rest. | |
18888 | ||
18889 | esac | |
18890 | done | |
18891 | ||
18892 | # Clean up. | |
18893 | rm -f a.out a.exe | |
18894 | else | |
18895 | echo "libtool.m4: error: problem compiling CXX test program" | |
18896 | fi | |
18897 | ||
18898 | $RM -f confest.$objext | |
18899 | ||
18900 | # PORTME: override above test on systems where it is broken | |
18901 | case $host_os in | |
18902 | interix[3-9]*) | |
18903 | # Interix 3.5 installs completely hosed .la files for C++, so rather than | |
18904 | # hack all around it, let's just trust "g++" to DTRT. | |
18905 | predep_objects_CXX= | |
18906 | postdep_objects_CXX= | |
18907 | postdeps_CXX= | |
18908 | ;; | |
18909 | ||
18910 | linux*) | |
18911 | case `$CC -V 2>&1 | sed 5q` in | |
18912 | *Sun\ C*) | |
18913 | # Sun C++ 5.9 | |
18914 | ||
18915 | # The more standards-conforming stlport4 library is | |
18916 | # incompatible with the Cstd library. Avoid specifying | |
18917 | # it if it's in CXXFLAGS. Ignore libCrun as | |
18918 | # -library=stlport4 depends on it. | |
18919 | case " $CXX $CXXFLAGS " in | |
18920 | *" -library=stlport4 "*) | |
18921 | solaris_use_stlport4=yes | |
18922 | ;; | |
18923 | esac | |
18924 | ||
18925 | if test "$solaris_use_stlport4" != yes; then | |
18926 | postdeps_CXX='-library=Cstd -library=Crun' | |
18927 | fi | |
18928 | ;; | |
18929 | esac | |
18930 | ;; | |
18931 | ||
18932 | solaris*) | |
18933 | case $cc_basename in | |
18934 | CC*) | |
18935 | # The more standards-conforming stlport4 library is | |
18936 | # incompatible with the Cstd library. Avoid specifying | |
18937 | # it if it's in CXXFLAGS. Ignore libCrun as | |
18938 | # -library=stlport4 depends on it. | |
18939 | case " $CXX $CXXFLAGS " in | |
18940 | *" -library=stlport4 "*) | |
18941 | solaris_use_stlport4=yes | |
18942 | ;; | |
18943 | esac | |
18944 | ||
18945 | # Adding this requires a known-good setup of shared libraries for | |
18946 | # Sun compiler versions before 5.6, else PIC objects from an old | |
18947 | # archive will be linked into the output, leading to subtle bugs. | |
18948 | if test "$solaris_use_stlport4" != yes; then | |
18949 | postdeps_CXX='-library=Cstd -library=Crun' | |
18950 | fi | |
18951 | ;; | |
18952 | esac | |
18953 | ;; | |
18954 | esac | |
18955 | ||
18956 | ||
18957 | case " $postdeps_CXX " in | |
18958 | *" -lc "*) archive_cmds_need_lc_CXX=no ;; | |
18959 | esac | |
18960 | compiler_lib_search_dirs_CXX= | |
18961 | if test -n "${compiler_lib_search_path_CXX}"; then | |
18962 | compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | |
18963 | fi | |
18964 | ||
18965 | ||
18966 | ||
18967 | ||
18968 | ||
18969 | ||
18970 | ||
18971 | ||
18972 | ||
18973 | ||
18974 | ||
18975 | ||
18976 | ||
18977 | ||
18978 | ||
18979 | ||
18980 | ||
18981 | ||
18982 | ||
18983 | ||
18984 | ||
18985 | ||
18986 | ||
18987 | ||
18988 | ||
18989 | ||
18990 | ||
18991 | ||
18992 | ||
18993 | ||
18994 | ||
18995 | lt_prog_compiler_wl_CXX= | |
18996 | lt_prog_compiler_pic_CXX= | |
18997 | lt_prog_compiler_static_CXX= | |
18998 | ||
5213506e RW |
18999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 |
19000 | $as_echo_n "checking for $compiler option to produce PIC... " >&6; } | |
00020c16 ILT |
19001 | |
19002 | # C++ specific cases for pic, static, wl, etc. | |
19003 | if test "$GXX" = yes; then | |
19004 | lt_prog_compiler_wl_CXX='-Wl,' | |
19005 | lt_prog_compiler_static_CXX='-static' | |
19006 | ||
19007 | case $host_os in | |
19008 | aix*) | |
19009 | # All AIX code is PIC. | |
19010 | if test "$host_cpu" = ia64; then | |
19011 | # AIX 5 now supports IA64 processor | |
19012 | lt_prog_compiler_static_CXX='-Bstatic' | |
19013 | fi | |
19014 | ;; | |
19015 | ||
19016 | amigaos*) | |
19017 | case $host_cpu in | |
19018 | powerpc) | |
19019 | # see comment about AmigaOS4 .so support | |
19020 | lt_prog_compiler_pic_CXX='-fPIC' | |
19021 | ;; | |
19022 | m68k) | |
19023 | # FIXME: we need at least 68020 code to build shared libraries, but | |
19024 | # adding the `-m68020' flag to GCC prevents building anything better, | |
19025 | # like `-m68040'. | |
19026 | lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' | |
19027 | ;; | |
19028 | esac | |
19029 | ;; | |
19030 | ||
19031 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
19032 | # PIC is the default for these OSes. | |
19033 | ;; | |
19034 | mingw* | cygwin* | os2* | pw32* | cegcc*) | |
19035 | # This hack is so that the source file can tell whether it is being | |
19036 | # built for inclusion in a dll (and should export symbols for example). | |
19037 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
19038 | # (--disable-auto-import) libraries | |
19039 | lt_prog_compiler_pic_CXX='-DDLL_EXPORT' | |
19040 | ;; | |
19041 | darwin* | rhapsody*) | |
19042 | # PIC is the default on this platform | |
19043 | # Common symbols not allowed in MH_DYLIB files | |
19044 | lt_prog_compiler_pic_CXX='-fno-common' | |
19045 | ;; | |
19046 | *djgpp*) | |
19047 | # DJGPP does not support shared libraries at all | |
19048 | lt_prog_compiler_pic_CXX= | |
19049 | ;; | |
43e02a8a RW |
19050 | haiku*) |
19051 | # PIC is the default for Haiku. | |
19052 | # The "-static" flag exists, but is broken. | |
19053 | lt_prog_compiler_static_CXX= | |
19054 | ;; | |
00020c16 ILT |
19055 | interix[3-9]*) |
19056 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
19057 | # Instead, we relocate shared libraries at runtime. | |
19058 | ;; | |
19059 | sysv4*MP*) | |
19060 | if test -d /usr/nec; then | |
19061 | lt_prog_compiler_pic_CXX=-Kconform_pic | |
19062 | fi | |
19063 | ;; | |
19064 | hpux*) | |
19065 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
19066 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
19067 | # sets the default TLS model and affects inlining. | |
19068 | case $host_cpu in | |
19069 | hppa*64*) | |
19070 | ;; | |
19071 | *) | |
19072 | lt_prog_compiler_pic_CXX='-fPIC' | |
19073 | ;; | |
19074 | esac | |
19075 | ;; | |
19076 | *qnx* | *nto*) | |
19077 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
19078 | # it will coredump. | |
19079 | lt_prog_compiler_pic_CXX='-fPIC -shared' | |
19080 | ;; | |
19081 | *) | |
19082 | lt_prog_compiler_pic_CXX='-fPIC' | |
19083 | ;; | |
19084 | esac | |
19085 | else | |
19086 | case $host_os in | |
19087 | aix[4-9]*) | |
19088 | # All AIX code is PIC. | |
19089 | if test "$host_cpu" = ia64; then | |
19090 | # AIX 5 now supports IA64 processor | |
19091 | lt_prog_compiler_static_CXX='-Bstatic' | |
19092 | else | |
19093 | lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' | |
19094 | fi | |
19095 | ;; | |
19096 | chorus*) | |
19097 | case $cc_basename in | |
19098 | cxch68*) | |
19099 | # Green Hills C++ Compiler | |
19100 | # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | |
19101 | ;; | |
19102 | esac | |
19103 | ;; | |
19104 | dgux*) | |
19105 | case $cc_basename in | |
19106 | ec++*) | |
19107 | lt_prog_compiler_pic_CXX='-KPIC' | |
19108 | ;; | |
19109 | ghcx*) | |
19110 | # Green Hills C++ Compiler | |
19111 | lt_prog_compiler_pic_CXX='-pic' | |
19112 | ;; | |
19113 | *) | |
19114 | ;; | |
19115 | esac | |
19116 | ;; | |
19117 | freebsd* | dragonfly*) | |
19118 | # FreeBSD uses GNU C++ | |
19119 | ;; | |
19120 | hpux9* | hpux10* | hpux11*) | |
19121 | case $cc_basename in | |
19122 | CC*) | |
19123 | lt_prog_compiler_wl_CXX='-Wl,' | |
19124 | lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' | |
19125 | if test "$host_cpu" != ia64; then | |
19126 | lt_prog_compiler_pic_CXX='+Z' | |
19127 | fi | |
19128 | ;; | |
19129 | aCC*) | |
19130 | lt_prog_compiler_wl_CXX='-Wl,' | |
19131 | lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' | |
19132 | case $host_cpu in | |
19133 | hppa*64*|ia64*) | |
19134 | # +Z the default | |
19135 | ;; | |
19136 | *) | |
19137 | lt_prog_compiler_pic_CXX='+Z' | |
19138 | ;; | |
19139 | esac | |
19140 | ;; | |
19141 | *) | |
19142 | ;; | |
19143 | esac | |
19144 | ;; | |
19145 | interix*) | |
19146 | # This is c89, which is MS Visual C++ (no shared libs) | |
19147 | # Anyone wants to do a port? | |
19148 | ;; | |
19149 | irix5* | irix6* | nonstopux*) | |
19150 | case $cc_basename in | |
19151 | CC*) | |
19152 | lt_prog_compiler_wl_CXX='-Wl,' | |
19153 | lt_prog_compiler_static_CXX='-non_shared' | |
19154 | # CC pic flag -KPIC is the default. | |
19155 | ;; | |
19156 | *) | |
19157 | ;; | |
19158 | esac | |
19159 | ;; | |
19160 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
19161 | case $cc_basename in | |
19162 | KCC*) | |
19163 | # KAI C++ Compiler | |
19164 | lt_prog_compiler_wl_CXX='--backend -Wl,' | |
19165 | lt_prog_compiler_pic_CXX='-fPIC' | |
19166 | ;; | |
19167 | ecpc* ) | |
19168 | # old Intel C++ for x86_64 which still supported -KPIC. | |
19169 | lt_prog_compiler_wl_CXX='-Wl,' | |
19170 | lt_prog_compiler_pic_CXX='-KPIC' | |
19171 | lt_prog_compiler_static_CXX='-static' | |
19172 | ;; | |
19173 | icpc* ) | |
19174 | # Intel C++, used to be incompatible with GCC. | |
19175 | # ICC 10 doesn't accept -KPIC any more. | |
19176 | lt_prog_compiler_wl_CXX='-Wl,' | |
19177 | lt_prog_compiler_pic_CXX='-fPIC' | |
19178 | lt_prog_compiler_static_CXX='-static' | |
19179 | ;; | |
19180 | pgCC* | pgcpp*) | |
19181 | # Portland Group C++ compiler | |
19182 | lt_prog_compiler_wl_CXX='-Wl,' | |
19183 | lt_prog_compiler_pic_CXX='-fpic' | |
19184 | lt_prog_compiler_static_CXX='-Bstatic' | |
19185 | ;; | |
19186 | cxx*) | |
19187 | # Compaq C++ | |
19188 | # Make sure the PIC flag is empty. It appears that all Alpha | |
19189 | # Linux and Compaq Tru64 Unix objects are PIC. | |
19190 | lt_prog_compiler_pic_CXX= | |
19191 | lt_prog_compiler_static_CXX='-non_shared' | |
19192 | ;; | |
43e02a8a RW |
19193 | xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) |
19194 | # IBM XL 8.0, 9.0 on PPC and BlueGene | |
00020c16 ILT |
19195 | lt_prog_compiler_wl_CXX='-Wl,' |
19196 | lt_prog_compiler_pic_CXX='-qpic' | |
19197 | lt_prog_compiler_static_CXX='-qstaticlink' | |
19198 | ;; | |
19199 | *) | |
19200 | case `$CC -V 2>&1 | sed 5q` in | |
19201 | *Sun\ C*) | |
19202 | # Sun C++ 5.9 | |
19203 | lt_prog_compiler_pic_CXX='-KPIC' | |
19204 | lt_prog_compiler_static_CXX='-Bstatic' | |
19205 | lt_prog_compiler_wl_CXX='-Qoption ld ' | |
19206 | ;; | |
19207 | esac | |
19208 | ;; | |
19209 | esac | |
19210 | ;; | |
19211 | lynxos*) | |
19212 | ;; | |
19213 | m88k*) | |
19214 | ;; | |
19215 | mvs*) | |
19216 | case $cc_basename in | |
19217 | cxx*) | |
19218 | lt_prog_compiler_pic_CXX='-W c,exportall' | |
19219 | ;; | |
19220 | *) | |
19221 | ;; | |
19222 | esac | |
19223 | ;; | |
19224 | netbsd*) | |
19225 | ;; | |
19226 | *qnx* | *nto*) | |
19227 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
19228 | # it will coredump. | |
19229 | lt_prog_compiler_pic_CXX='-fPIC -shared' | |
19230 | ;; | |
19231 | osf3* | osf4* | osf5*) | |
19232 | case $cc_basename in | |
19233 | KCC*) | |
19234 | lt_prog_compiler_wl_CXX='--backend -Wl,' | |
19235 | ;; | |
19236 | RCC*) | |
19237 | # Rational C++ 2.4.1 | |
19238 | lt_prog_compiler_pic_CXX='-pic' | |
19239 | ;; | |
19240 | cxx*) | |
19241 | # Digital/Compaq C++ | |
19242 | lt_prog_compiler_wl_CXX='-Wl,' | |
19243 | # Make sure the PIC flag is empty. It appears that all Alpha | |
19244 | # Linux and Compaq Tru64 Unix objects are PIC. | |
19245 | lt_prog_compiler_pic_CXX= | |
19246 | lt_prog_compiler_static_CXX='-non_shared' | |
19247 | ;; | |
19248 | *) | |
19249 | ;; | |
19250 | esac | |
19251 | ;; | |
19252 | psos*) | |
19253 | ;; | |
19254 | solaris*) | |
19255 | case $cc_basename in | |
19256 | CC*) | |
19257 | # Sun C++ 4.2, 5.x and Centerline C++ | |
19258 | lt_prog_compiler_pic_CXX='-KPIC' | |
19259 | lt_prog_compiler_static_CXX='-Bstatic' | |
19260 | lt_prog_compiler_wl_CXX='-Qoption ld ' | |
19261 | ;; | |
19262 | gcx*) | |
19263 | # Green Hills C++ Compiler | |
19264 | lt_prog_compiler_pic_CXX='-PIC' | |
19265 | ;; | |
19266 | *) | |
19267 | ;; | |
19268 | esac | |
19269 | ;; | |
19270 | sunos4*) | |
19271 | case $cc_basename in | |
19272 | CC*) | |
19273 | # Sun C++ 4.x | |
19274 | lt_prog_compiler_pic_CXX='-pic' | |
19275 | lt_prog_compiler_static_CXX='-Bstatic' | |
19276 | ;; | |
19277 | lcc*) | |
19278 | # Lucid | |
19279 | lt_prog_compiler_pic_CXX='-pic' | |
19280 | ;; | |
19281 | *) | |
19282 | ;; | |
19283 | esac | |
19284 | ;; | |
19285 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
19286 | case $cc_basename in | |
19287 | CC*) | |
19288 | lt_prog_compiler_wl_CXX='-Wl,' | |
19289 | lt_prog_compiler_pic_CXX='-KPIC' | |
19290 | lt_prog_compiler_static_CXX='-Bstatic' | |
19291 | ;; | |
19292 | esac | |
19293 | ;; | |
19294 | tandem*) | |
19295 | case $cc_basename in | |
19296 | NCC*) | |
19297 | # NonStop-UX NCC 3.20 | |
19298 | lt_prog_compiler_pic_CXX='-KPIC' | |
19299 | ;; | |
19300 | *) | |
19301 | ;; | |
19302 | esac | |
19303 | ;; | |
19304 | vxworks*) | |
19305 | ;; | |
19306 | *) | |
19307 | lt_prog_compiler_can_build_shared_CXX=no | |
19308 | ;; | |
19309 | esac | |
19310 | fi | |
19311 | ||
19312 | case $host_os in | |
19313 | # For platforms which do not support PIC, -DPIC is meaningless: | |
19314 | *djgpp*) | |
19315 | lt_prog_compiler_pic_CXX= | |
19316 | ;; | |
19317 | *) | |
19318 | lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" | |
19319 | ;; | |
19320 | esac | |
5213506e RW |
19321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 |
19322 | $as_echo "$lt_prog_compiler_pic_CXX" >&6; } | |
00020c16 ILT |
19323 | |
19324 | ||
19325 | ||
19326 | # | |
19327 | # Check to make sure the PIC flag actually works. | |
19328 | # | |
19329 | if test -n "$lt_prog_compiler_pic_CXX"; then | |
5213506e RW |
19330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 |
19331 | $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } | |
19332 | if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : | |
19333 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19334 | else |
19335 | lt_cv_prog_compiler_pic_works_CXX=no | |
19336 | ac_outfile=conftest.$ac_objext | |
19337 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19338 | lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" | |
19339 | # Insert the option either (1) after the last *FLAGS variable, or | |
19340 | # (2) before a word containing "conftest.", or (3) at the end. | |
19341 | # Note that $ac_compile itself does not contain backslashes and begins | |
19342 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19343 | # The option is referenced via a variable to avoid confusing sed. | |
19344 | lt_compile=`echo "$ac_compile" | $SED \ | |
19345 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19346 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19347 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19348 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19349 | (eval "$lt_compile" 2>conftest.err) |
19350 | ac_status=$? | |
19351 | cat conftest.err >&5 | |
43e02a8a | 19352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19353 | if (exit $ac_status) && test -s "$ac_outfile"; then |
19354 | # The compiler can only warn and ignore the option if not recognized | |
19355 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 19356 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
19357 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
19358 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
19359 | lt_cv_prog_compiler_pic_works_CXX=yes | |
19360 | fi | |
19361 | fi | |
19362 | $RM conftest* | |
19363 | ||
19364 | fi | |
5213506e RW |
19365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 |
19366 | $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } | |
00020c16 ILT |
19367 | |
19368 | if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then | |
19369 | case $lt_prog_compiler_pic_CXX in | |
19370 | "" | " "*) ;; | |
19371 | *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; | |
19372 | esac | |
19373 | else | |
19374 | lt_prog_compiler_pic_CXX= | |
19375 | lt_prog_compiler_can_build_shared_CXX=no | |
19376 | fi | |
19377 | ||
19378 | fi | |
19379 | ||
19380 | ||
19381 | ||
19382 | # | |
19383 | # Check to make sure the static flag actually works. | |
19384 | # | |
19385 | wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" | |
5213506e RW |
19386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 |
19387 | $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } | |
19388 | if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : | |
19389 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19390 | else |
19391 | lt_cv_prog_compiler_static_works_CXX=no | |
19392 | save_LDFLAGS="$LDFLAGS" | |
19393 | LDFLAGS="$LDFLAGS $lt_tmp_static_flag" | |
19394 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
19395 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
19396 | # The linker can only warn and ignore the option if not recognized | |
19397 | # So say no if there are warnings | |
19398 | if test -s conftest.err; then | |
19399 | # Append any errors to the config.log. | |
19400 | cat conftest.err 1>&5 | |
43e02a8a | 19401 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp |
00020c16 ILT |
19402 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
19403 | if diff conftest.exp conftest.er2 >/dev/null; then | |
19404 | lt_cv_prog_compiler_static_works_CXX=yes | |
19405 | fi | |
19406 | else | |
19407 | lt_cv_prog_compiler_static_works_CXX=yes | |
19408 | fi | |
19409 | fi | |
19410 | $RM -r conftest* | |
19411 | LDFLAGS="$save_LDFLAGS" | |
19412 | ||
19413 | fi | |
5213506e RW |
19414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 |
19415 | $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } | |
00020c16 ILT |
19416 | |
19417 | if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then | |
19418 | : | |
19419 | else | |
19420 | lt_prog_compiler_static_CXX= | |
19421 | fi | |
19422 | ||
19423 | ||
19424 | ||
19425 | ||
5213506e RW |
19426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
19427 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
19428 | if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : | |
19429 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19430 | else |
19431 | lt_cv_prog_compiler_c_o_CXX=no | |
19432 | $RM -r conftest 2>/dev/null | |
19433 | mkdir conftest | |
19434 | cd conftest | |
19435 | mkdir out | |
19436 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19437 | ||
19438 | lt_compiler_flag="-o out/conftest2.$ac_objext" | |
19439 | # Insert the option either (1) after the last *FLAGS variable, or | |
19440 | # (2) before a word containing "conftest.", or (3) at the end. | |
19441 | # Note that $ac_compile itself does not contain backslashes and begins | |
19442 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19443 | lt_compile=`echo "$ac_compile" | $SED \ | |
19444 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19445 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19446 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19447 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19448 | (eval "$lt_compile" 2>out/conftest.err) |
19449 | ac_status=$? | |
19450 | cat out/conftest.err >&5 | |
43e02a8a | 19451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19452 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
19453 | then | |
19454 | # The compiler can only warn and ignore the option if not recognized | |
19455 | # So say no if there are warnings | |
43e02a8a | 19456 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
19457 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
19458 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
19459 | lt_cv_prog_compiler_c_o_CXX=yes | |
19460 | fi | |
19461 | fi | |
19462 | chmod u+w . 2>&5 | |
19463 | $RM conftest* | |
19464 | # SGI C++ compiler will create directory out/ii_files/ for | |
19465 | # template instantiation | |
19466 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
19467 | $RM out/* && rmdir out | |
19468 | cd .. | |
19469 | $RM -r conftest | |
19470 | $RM conftest* | |
19471 | ||
19472 | fi | |
5213506e RW |
19473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 |
19474 | $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } | |
00020c16 ILT |
19475 | |
19476 | ||
19477 | ||
5213506e RW |
19478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
19479 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
19480 | if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : | |
19481 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19482 | else |
19483 | lt_cv_prog_compiler_c_o_CXX=no | |
19484 | $RM -r conftest 2>/dev/null | |
19485 | mkdir conftest | |
19486 | cd conftest | |
19487 | mkdir out | |
19488 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19489 | ||
19490 | lt_compiler_flag="-o out/conftest2.$ac_objext" | |
19491 | # Insert the option either (1) after the last *FLAGS variable, or | |
19492 | # (2) before a word containing "conftest.", or (3) at the end. | |
19493 | # Note that $ac_compile itself does not contain backslashes and begins | |
19494 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19495 | lt_compile=`echo "$ac_compile" | $SED \ | |
19496 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19497 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19498 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19499 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19500 | (eval "$lt_compile" 2>out/conftest.err) |
19501 | ac_status=$? | |
19502 | cat out/conftest.err >&5 | |
43e02a8a | 19503 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19504 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
19505 | then | |
19506 | # The compiler can only warn and ignore the option if not recognized | |
19507 | # So say no if there are warnings | |
43e02a8a | 19508 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
19509 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
19510 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
19511 | lt_cv_prog_compiler_c_o_CXX=yes | |
19512 | fi | |
19513 | fi | |
19514 | chmod u+w . 2>&5 | |
19515 | $RM conftest* | |
19516 | # SGI C++ compiler will create directory out/ii_files/ for | |
19517 | # template instantiation | |
19518 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
19519 | $RM out/* && rmdir out | |
19520 | cd .. | |
19521 | $RM -r conftest | |
19522 | $RM conftest* | |
19523 | ||
19524 | fi | |
5213506e RW |
19525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 |
19526 | $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } | |
00020c16 ILT |
19527 | |
19528 | ||
19529 | ||
19530 | ||
19531 | hard_links="nottested" | |
19532 | if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then | |
19533 | # do not overwrite the value of need_locks provided by the user | |
5213506e RW |
19534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 |
19535 | $as_echo_n "checking if we can lock with hard links... " >&6; } | |
00020c16 ILT |
19536 | hard_links=yes |
19537 | $RM conftest* | |
19538 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
19539 | touch conftest.a | |
19540 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
19541 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
5213506e RW |
19542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 |
19543 | $as_echo "$hard_links" >&6; } | |
00020c16 | 19544 | if test "$hard_links" = no; then |
5213506e RW |
19545 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 |
19546 | $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | |
00020c16 ILT |
19547 | need_locks=warn |
19548 | fi | |
19549 | else | |
19550 | need_locks=no | |
19551 | fi | |
19552 | ||
19553 | ||
19554 | ||
5213506e RW |
19555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
19556 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
00020c16 ILT |
19557 | |
19558 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
19559 | case $host_os in | |
19560 | aix[4-9]*) | |
19561 | # If we're using GNU nm, then we don't want the "-C" option. | |
19562 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
43e02a8a RW |
19563 | # Also, AIX nm treats weak defined symbols like other global defined |
19564 | # symbols, whereas GNU nm marks them as "W". | |
00020c16 | 19565 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
43e02a8a | 19566 | export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
00020c16 ILT |
19567 | else |
19568 | export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
19569 | fi | |
19570 | ;; | |
19571 | pw32*) | |
19572 | export_symbols_cmds_CXX="$ltdll_cmds" | |
19573 | ;; | |
19574 | cygwin* | mingw* | cegcc*) | |
19575 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' | |
19576 | ;; | |
19577 | *) | |
19578 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
19579 | ;; | |
19580 | esac | |
19581 | exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | |
19582 | ||
5213506e RW |
19583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 |
19584 | $as_echo "$ld_shlibs_CXX" >&6; } | |
00020c16 ILT |
19585 | test "$ld_shlibs_CXX" = no && can_build_shared=no |
19586 | ||
19587 | with_gnu_ld_CXX=$with_gnu_ld | |
19588 | ||
19589 | ||
19590 | ||
19591 | ||
19592 | ||
19593 | ||
19594 | # | |
19595 | # Do we need to explicitly link libc? | |
19596 | # | |
19597 | case "x$archive_cmds_need_lc_CXX" in | |
19598 | x|xyes) | |
19599 | # Assume -lc should be added | |
19600 | archive_cmds_need_lc_CXX=yes | |
19601 | ||
19602 | if test "$enable_shared" = yes && test "$GCC" = yes; then | |
19603 | case $archive_cmds_CXX in | |
19604 | *'~'*) | |
19605 | # FIXME: we may have to deal with multi-command sequences. | |
19606 | ;; | |
19607 | '$CC '*) | |
19608 | # Test whether the compiler implicitly links with -lc since on some | |
19609 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
19610 | # to ld, don't add -lc before -lgcc. | |
5213506e RW |
19611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 |
19612 | $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } | |
19613 | if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then : | |
19614 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19615 | else |
19616 | $RM conftest* | |
19617 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19618 | ||
5213506e | 19619 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
19620 | (eval $ac_compile) 2>&5 |
19621 | ac_status=$? | |
5213506e RW |
19622 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
19623 | test $ac_status = 0; } 2>conftest.err; then | |
00020c16 ILT |
19624 | soname=conftest |
19625 | lib=conftest | |
19626 | libobjs=conftest.$ac_objext | |
19627 | deplibs= | |
19628 | wl=$lt_prog_compiler_wl_CXX | |
19629 | pic_flag=$lt_prog_compiler_pic_CXX | |
19630 | compiler_flags=-v | |
19631 | linker_flags=-v | |
19632 | verstring= | |
19633 | output_objdir=. | |
19634 | libname=conftest | |
19635 | lt_save_allow_undefined_flag=$allow_undefined_flag_CXX | |
19636 | allow_undefined_flag_CXX= | |
5213506e | 19637 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 |
00020c16 ILT |
19638 | (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 |
19639 | ac_status=$? | |
5213506e RW |
19640 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
19641 | test $ac_status = 0; } | |
00020c16 ILT |
19642 | then |
19643 | lt_cv_archive_cmds_need_lc_CXX=no | |
19644 | else | |
19645 | lt_cv_archive_cmds_need_lc_CXX=yes | |
19646 | fi | |
19647 | allow_undefined_flag_CXX=$lt_save_allow_undefined_flag | |
19648 | else | |
19649 | cat conftest.err 1>&5 | |
19650 | fi | |
19651 | $RM conftest* | |
19652 | ||
19653 | fi | |
5213506e RW |
19654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 |
19655 | $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } | |
00020c16 ILT |
19656 | archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX |
19657 | ;; | |
19658 | esac | |
19659 | fi | |
19660 | ;; | |
19661 | esac | |
19662 | ||
19663 | ||
19664 | ||
19665 | ||
19666 | ||
19667 | ||
19668 | ||
19669 | ||
19670 | ||
19671 | ||
19672 | ||
19673 | ||
19674 | ||
19675 | ||
19676 | ||
19677 | ||
19678 | ||
19679 | ||
19680 | ||
19681 | ||
19682 | ||
19683 | ||
19684 | ||
19685 | ||
19686 | ||
19687 | ||
19688 | ||
19689 | ||
19690 | ||
19691 | ||
19692 | ||
19693 | ||
19694 | ||
19695 | ||
19696 | ||
19697 | ||
19698 | ||
19699 | ||
19700 | ||
19701 | ||
19702 | ||
19703 | ||
19704 | ||
19705 | ||
19706 | ||
19707 | ||
19708 | ||
19709 | ||
19710 | ||
19711 | ||
19712 | ||
19713 | ||
19714 | ||
19715 | ||
19716 | ||
19717 | ||
19718 | ||
19719 | ||
19720 | ||
19721 | ||
19722 | ||
19723 | ||
19724 | ||
19725 | ||
5213506e RW |
19726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 |
19727 | $as_echo_n "checking dynamic linker characteristics... " >&6; } | |
00020c16 ILT |
19728 | |
19729 | library_names_spec= | |
19730 | libname_spec='lib$name' | |
19731 | soname_spec= | |
19732 | shrext_cmds=".so" | |
19733 | postinstall_cmds= | |
19734 | postuninstall_cmds= | |
19735 | finish_cmds= | |
19736 | finish_eval= | |
19737 | shlibpath_var= | |
19738 | shlibpath_overrides_runpath=unknown | |
19739 | version_type=none | |
19740 | dynamic_linker="$host_os ld.so" | |
19741 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
19742 | need_lib_prefix=unknown | |
19743 | hardcode_into_libs=no | |
19744 | ||
19745 | # when you set need_version to no, make sure it does not cause -set_version | |
19746 | # flags to be left without arguments | |
19747 | need_version=unknown | |
19748 | ||
19749 | case $host_os in | |
19750 | aix3*) | |
19751 | version_type=linux | |
19752 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
19753 | shlibpath_var=LIBPATH | |
19754 | ||
19755 | # AIX 3 has no versioning support, so we append a major version to the name. | |
19756 | soname_spec='${libname}${release}${shared_ext}$major' | |
19757 | ;; | |
19758 | ||
19759 | aix[4-9]*) | |
19760 | version_type=linux | |
19761 | need_lib_prefix=no | |
19762 | need_version=no | |
19763 | hardcode_into_libs=yes | |
19764 | if test "$host_cpu" = ia64; then | |
19765 | # AIX 5 supports IA64 | |
19766 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
19767 | shlibpath_var=LD_LIBRARY_PATH | |
19768 | else | |
19769 | # With GCC up to 2.95.x, collect2 would create an import file | |
19770 | # for dependence libraries. The import file would start with | |
19771 | # the line `#! .'. This would cause the generated library to | |
19772 | # depend on `.', always an invalid library. This was fixed in | |
19773 | # development snapshots of GCC prior to 3.0. | |
19774 | case $host_os in | |
19775 | aix4 | aix4.[01] | aix4.[01].*) | |
19776 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
19777 | echo ' yes ' | |
19778 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then | |
19779 | : | |
19780 | else | |
19781 | can_build_shared=no | |
19782 | fi | |
19783 | ;; | |
19784 | esac | |
19785 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
19786 | # soname into executable. Probably we can add versioning support to | |
19787 | # collect2, so additional links can be useful in future. | |
19788 | if test "$aix_use_runtimelinking" = yes; then | |
19789 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
19790 | # instead of lib<name>.a to let people know that these are not | |
19791 | # typical AIX shared libraries. | |
19792 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19793 | else | |
19794 | # We preserve .a as extension for shared libraries through AIX4.2 | |
19795 | # and later when we are not doing run time linking. | |
19796 | library_names_spec='${libname}${release}.a $libname.a' | |
19797 | soname_spec='${libname}${release}${shared_ext}$major' | |
19798 | fi | |
19799 | shlibpath_var=LIBPATH | |
19800 | fi | |
19801 | ;; | |
19802 | ||
19803 | amigaos*) | |
19804 | case $host_cpu in | |
19805 | powerpc) | |
19806 | # Since July 2007 AmigaOS4 officially supports .so libraries. | |
19807 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
19808 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19809 | ;; | |
19810 | m68k) | |
19811 | library_names_spec='$libname.ixlibrary $libname.a' | |
19812 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
43e02a8a | 19813 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
00020c16 ILT |
19814 | ;; |
19815 | esac | |
19816 | ;; | |
19817 | ||
19818 | beos*) | |
19819 | library_names_spec='${libname}${shared_ext}' | |
19820 | dynamic_linker="$host_os ld.so" | |
19821 | shlibpath_var=LIBRARY_PATH | |
19822 | ;; | |
19823 | ||
19824 | bsdi[45]*) | |
19825 | version_type=linux | |
19826 | need_version=no | |
19827 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19828 | soname_spec='${libname}${release}${shared_ext}$major' | |
19829 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
19830 | shlibpath_var=LD_LIBRARY_PATH | |
19831 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
19832 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
19833 | # the default ld.so.conf also contains /usr/contrib/lib and | |
19834 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
19835 | # libtool to hard-code these into programs | |
19836 | ;; | |
19837 | ||
19838 | cygwin* | mingw* | pw32* | cegcc*) | |
19839 | version_type=windows | |
19840 | shrext_cmds=".dll" | |
19841 | need_version=no | |
19842 | need_lib_prefix=no | |
19843 | ||
19844 | case $GCC,$host_os in | |
19845 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | |
19846 | library_names_spec='$libname.dll.a' | |
19847 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
19848 | postinstall_cmds='base_file=`basename \${file}`~ | |
19849 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
19850 | dldir=$destdir/`dirname \$dlpath`~ | |
19851 | test -d \$dldir || mkdir -p \$dldir~ | |
19852 | $install_prog $dir/$dlname \$dldir/$dlname~ | |
19853 | chmod a+x \$dldir/$dlname~ | |
19854 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
19855 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
19856 | fi' | |
19857 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
19858 | dlpath=$dir/\$dldll~ | |
19859 | $RM \$dlpath' | |
19860 | shlibpath_overrides_runpath=yes | |
19861 | ||
19862 | case $host_os in | |
19863 | cygwin*) | |
19864 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
19865 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
43e02a8a | 19866 | |
00020c16 ILT |
19867 | ;; |
19868 | mingw* | cegcc*) | |
19869 | # MinGW DLLs use traditional 'lib' prefix | |
19870 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
00020c16 ILT |
19871 | ;; |
19872 | pw32*) | |
19873 | # pw32 DLLs use 'pw' prefix rather than 'lib' | |
19874 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
19875 | ;; | |
19876 | esac | |
19877 | ;; | |
19878 | ||
19879 | *) | |
19880 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
19881 | ;; | |
19882 | esac | |
19883 | dynamic_linker='Win32 ld.exe' | |
19884 | # FIXME: first we should search . and the directory the executable is in | |
19885 | shlibpath_var=PATH | |
19886 | ;; | |
19887 | ||
19888 | darwin* | rhapsody*) | |
19889 | dynamic_linker="$host_os dyld" | |
19890 | version_type=darwin | |
19891 | need_lib_prefix=no | |
19892 | need_version=no | |
19893 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
19894 | soname_spec='${libname}${release}${major}$shared_ext' | |
19895 | shlibpath_overrides_runpath=yes | |
19896 | shlibpath_var=DYLD_LIBRARY_PATH | |
19897 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
19898 | ||
19899 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
19900 | ;; | |
19901 | ||
19902 | dgux*) | |
19903 | version_type=linux | |
19904 | need_lib_prefix=no | |
19905 | need_version=no | |
19906 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
19907 | soname_spec='${libname}${release}${shared_ext}$major' | |
19908 | shlibpath_var=LD_LIBRARY_PATH | |
19909 | ;; | |
19910 | ||
19911 | freebsd1*) | |
19912 | dynamic_linker=no | |
19913 | ;; | |
19914 | ||
19915 | freebsd* | dragonfly*) | |
19916 | # DragonFly does not have aout. When/if they implement a new | |
19917 | # versioning mechanism, adjust this. | |
19918 | if test -x /usr/bin/objformat; then | |
19919 | objformat=`/usr/bin/objformat` | |
19920 | else | |
19921 | case $host_os in | |
19922 | freebsd[123]*) objformat=aout ;; | |
19923 | *) objformat=elf ;; | |
19924 | esac | |
19925 | fi | |
19926 | version_type=freebsd-$objformat | |
19927 | case $version_type in | |
19928 | freebsd-elf*) | |
19929 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
19930 | need_version=no | |
19931 | need_lib_prefix=no | |
19932 | ;; | |
19933 | freebsd-*) | |
19934 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
19935 | need_version=yes | |
19936 | ;; | |
19937 | esac | |
19938 | shlibpath_var=LD_LIBRARY_PATH | |
19939 | case $host_os in | |
19940 | freebsd2*) | |
19941 | shlibpath_overrides_runpath=yes | |
19942 | ;; | |
19943 | freebsd3.[01]* | freebsdelf3.[01]*) | |
19944 | shlibpath_overrides_runpath=yes | |
19945 | hardcode_into_libs=yes | |
19946 | ;; | |
19947 | freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ | |
19948 | freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) | |
19949 | shlibpath_overrides_runpath=no | |
19950 | hardcode_into_libs=yes | |
19951 | ;; | |
19952 | *) # from 4.6 on, and DragonFly | |
19953 | shlibpath_overrides_runpath=yes | |
19954 | hardcode_into_libs=yes | |
19955 | ;; | |
19956 | esac | |
19957 | ;; | |
19958 | ||
19959 | gnu*) | |
19960 | version_type=linux | |
19961 | need_lib_prefix=no | |
19962 | need_version=no | |
19963 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
19964 | soname_spec='${libname}${release}${shared_ext}$major' | |
19965 | shlibpath_var=LD_LIBRARY_PATH | |
19966 | hardcode_into_libs=yes | |
19967 | ;; | |
19968 | ||
43e02a8a RW |
19969 | haiku*) |
19970 | version_type=linux | |
19971 | need_lib_prefix=no | |
19972 | need_version=no | |
19973 | dynamic_linker="$host_os runtime_loader" | |
19974 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
19975 | soname_spec='${libname}${release}${shared_ext}$major' | |
19976 | shlibpath_var=LIBRARY_PATH | |
19977 | shlibpath_overrides_runpath=yes | |
19978 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | |
19979 | hardcode_into_libs=yes | |
19980 | ;; | |
19981 | ||
00020c16 ILT |
19982 | hpux9* | hpux10* | hpux11*) |
19983 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
19984 | # link against other versions. | |
19985 | version_type=sunos | |
19986 | need_lib_prefix=no | |
19987 | need_version=no | |
19988 | case $host_cpu in | |
19989 | ia64*) | |
19990 | shrext_cmds='.so' | |
19991 | hardcode_into_libs=yes | |
19992 | dynamic_linker="$host_os dld.so" | |
19993 | shlibpath_var=LD_LIBRARY_PATH | |
19994 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
19995 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19996 | soname_spec='${libname}${release}${shared_ext}$major' | |
19997 | if test "X$HPUX_IA64_MODE" = X32; then | |
19998 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
19999 | else | |
20000 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
20001 | fi | |
20002 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
20003 | ;; | |
20004 | hppa*64*) | |
20005 | shrext_cmds='.sl' | |
20006 | hardcode_into_libs=yes | |
20007 | dynamic_linker="$host_os dld.sl" | |
20008 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
20009 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
20010 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20011 | soname_spec='${libname}${release}${shared_ext}$major' | |
20012 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
20013 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
20014 | ;; | |
20015 | *) | |
20016 | shrext_cmds='.sl' | |
20017 | dynamic_linker="$host_os dld.sl" | |
20018 | shlibpath_var=SHLIB_PATH | |
20019 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
20020 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20021 | soname_spec='${libname}${release}${shared_ext}$major' | |
20022 | ;; | |
20023 | esac | |
43e02a8a | 20024 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... |
00020c16 | 20025 | postinstall_cmds='chmod 555 $lib' |
43e02a8a RW |
20026 | # or fails outright, so override atomically: |
20027 | install_override_mode=555 | |
00020c16 ILT |
20028 | ;; |
20029 | ||
20030 | interix[3-9]*) | |
20031 | version_type=linux | |
20032 | need_lib_prefix=no | |
20033 | need_version=no | |
20034 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
20035 | soname_spec='${libname}${release}${shared_ext}$major' | |
20036 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
20037 | shlibpath_var=LD_LIBRARY_PATH | |
20038 | shlibpath_overrides_runpath=no | |
20039 | hardcode_into_libs=yes | |
20040 | ;; | |
20041 | ||
20042 | irix5* | irix6* | nonstopux*) | |
20043 | case $host_os in | |
20044 | nonstopux*) version_type=nonstopux ;; | |
20045 | *) | |
20046 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
20047 | version_type=linux | |
20048 | else | |
20049 | version_type=irix | |
20050 | fi ;; | |
20051 | esac | |
20052 | need_lib_prefix=no | |
20053 | need_version=no | |
20054 | soname_spec='${libname}${release}${shared_ext}$major' | |
20055 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
20056 | case $host_os in | |
20057 | irix5* | nonstopux*) | |
20058 | libsuff= shlibsuff= | |
20059 | ;; | |
20060 | *) | |
20061 | case $LD in # libtool.m4 will add one of these switches to LD | |
20062 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
20063 | libsuff= shlibsuff= libmagic=32-bit;; | |
20064 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
20065 | libsuff=32 shlibsuff=N32 libmagic=N32;; | |
20066 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
20067 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
20068 | *) libsuff= shlibsuff= libmagic=never-match;; | |
20069 | esac | |
20070 | ;; | |
20071 | esac | |
20072 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
20073 | shlibpath_overrides_runpath=no | |
20074 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
20075 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
20076 | hardcode_into_libs=yes | |
20077 | ;; | |
20078 | ||
20079 | # No shared lib support for Linux oldld, aout, or coff. | |
20080 | linux*oldld* | linux*aout* | linux*coff*) | |
20081 | dynamic_linker=no | |
20082 | ;; | |
20083 | ||
20084 | # This must be Linux ELF. | |
20085 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
20086 | version_type=linux | |
20087 | need_lib_prefix=no | |
20088 | need_version=no | |
20089 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20090 | soname_spec='${libname}${release}${shared_ext}$major' | |
20091 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
20092 | shlibpath_var=LD_LIBRARY_PATH | |
20093 | shlibpath_overrides_runpath=no | |
20094 | ||
20095 | # Some binutils ld are patched to set DT_RUNPATH | |
5213506e RW |
20096 | if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : |
20097 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
20098 | else |
20099 | lt_cv_shlibpath_overrides_runpath=no | |
20100 | save_LDFLAGS=$LDFLAGS | |
20101 | save_libdir=$libdir | |
20102 | eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ | |
20103 | LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" | |
5213506e | 20104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
20105 | /* end confdefs.h. */ |
20106 | ||
20107 | int | |
20108 | main () | |
20109 | { | |
20110 | ||
da0f6381 PB |
20111 | ; |
20112 | return 0; | |
20113 | } | |
20114 | _ACEOF | |
5213506e RW |
20115 | if ac_fn_cxx_try_link "$LINENO"; then : |
20116 | if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : | |
00020c16 ILT |
20117 | lt_cv_shlibpath_overrides_runpath=yes |
20118 | fi | |
da0f6381 | 20119 | fi |
5213506e RW |
20120 | rm -f core conftest.err conftest.$ac_objext \ |
20121 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
20122 | LDFLAGS=$save_LDFLAGS |
20123 | libdir=$save_libdir | |
da0f6381 PB |
20124 | |
20125 | fi | |
20126 | ||
00020c16 | 20127 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath |
da0f6381 | 20128 | |
00020c16 ILT |
20129 | # This implies no fast_install, which is unacceptable. |
20130 | # Some rework will be needed to allow for fast_install | |
20131 | # before this can be enabled. | |
20132 | hardcode_into_libs=yes | |
da0f6381 | 20133 | |
00020c16 ILT |
20134 | # Append ld.so.conf contents to the search path |
20135 | if test -f /etc/ld.so.conf; then | |
43e02a8a | 20136 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` |
00020c16 ILT |
20137 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
20138 | fi | |
da0f6381 | 20139 | |
00020c16 ILT |
20140 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
20141 | # powerpc, because MkLinux only supported shared libraries with the | |
20142 | # GNU dynamic linker. Since this was broken with cross compilers, | |
20143 | # most powerpc-linux boxes support dynamic linking these days and | |
20144 | # people can always --disable-shared, the test was removed, and we | |
20145 | # assume the GNU/Linux dynamic linker is in use. | |
20146 | dynamic_linker='GNU/Linux ld.so' | |
20147 | ;; | |
da0f6381 | 20148 | |
00020c16 ILT |
20149 | netbsd*) |
20150 | version_type=sunos | |
20151 | need_lib_prefix=no | |
20152 | need_version=no | |
20153 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
20154 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
20155 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
20156 | dynamic_linker='NetBSD (a.out) ld.so' | |
20157 | else | |
20158 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
20159 | soname_spec='${libname}${release}${shared_ext}$major' | |
20160 | dynamic_linker='NetBSD ld.elf_so' | |
20161 | fi | |
20162 | shlibpath_var=LD_LIBRARY_PATH | |
20163 | shlibpath_overrides_runpath=yes | |
20164 | hardcode_into_libs=yes | |
20165 | ;; | |
da0f6381 | 20166 | |
00020c16 ILT |
20167 | newsos6) |
20168 | version_type=linux | |
20169 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20170 | shlibpath_var=LD_LIBRARY_PATH | |
20171 | shlibpath_overrides_runpath=yes | |
20172 | ;; | |
da0f6381 | 20173 | |
00020c16 ILT |
20174 | *nto* | *qnx*) |
20175 | version_type=qnx | |
20176 | need_lib_prefix=no | |
20177 | need_version=no | |
20178 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20179 | soname_spec='${libname}${release}${shared_ext}$major' | |
20180 | shlibpath_var=LD_LIBRARY_PATH | |
20181 | shlibpath_overrides_runpath=no | |
20182 | hardcode_into_libs=yes | |
20183 | dynamic_linker='ldqnx.so' | |
20184 | ;; | |
da0f6381 | 20185 | |
00020c16 ILT |
20186 | openbsd*) |
20187 | version_type=sunos | |
20188 | sys_lib_dlsearch_path_spec="/usr/lib" | |
20189 | need_lib_prefix=no | |
20190 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
20191 | case $host_os in | |
20192 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
20193 | *) need_version=no ;; | |
da0f6381 | 20194 | esac |
00020c16 ILT |
20195 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
20196 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
20197 | shlibpath_var=LD_LIBRARY_PATH | |
20198 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
20199 | case $host_os in | |
20200 | openbsd2.[89] | openbsd2.[89].*) | |
20201 | shlibpath_overrides_runpath=no | |
20202 | ;; | |
20203 | *) | |
20204 | shlibpath_overrides_runpath=yes | |
20205 | ;; | |
20206 | esac | |
da0f6381 | 20207 | else |
00020c16 | 20208 | shlibpath_overrides_runpath=yes |
da0f6381 | 20209 | fi |
00020c16 | 20210 | ;; |
da0f6381 | 20211 | |
00020c16 ILT |
20212 | os2*) |
20213 | libname_spec='$name' | |
20214 | shrext_cmds=".dll" | |
20215 | need_lib_prefix=no | |
20216 | library_names_spec='$libname${shared_ext} $libname.a' | |
20217 | dynamic_linker='OS/2 ld.exe' | |
20218 | shlibpath_var=LIBPATH | |
20219 | ;; | |
da0f6381 | 20220 | |
00020c16 ILT |
20221 | osf3* | osf4* | osf5*) |
20222 | version_type=osf | |
20223 | need_lib_prefix=no | |
20224 | need_version=no | |
20225 | soname_spec='${libname}${release}${shared_ext}$major' | |
20226 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20227 | shlibpath_var=LD_LIBRARY_PATH | |
20228 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
20229 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
20230 | ;; | |
da0f6381 | 20231 | |
00020c16 ILT |
20232 | rdos*) |
20233 | dynamic_linker=no | |
20234 | ;; | |
da0f6381 | 20235 | |
00020c16 ILT |
20236 | solaris*) |
20237 | version_type=linux | |
20238 | need_lib_prefix=no | |
20239 | need_version=no | |
20240 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20241 | soname_spec='${libname}${release}${shared_ext}$major' | |
20242 | shlibpath_var=LD_LIBRARY_PATH | |
20243 | shlibpath_overrides_runpath=yes | |
20244 | hardcode_into_libs=yes | |
20245 | # ldd complains unless libraries are executable | |
20246 | postinstall_cmds='chmod +x $lib' | |
20247 | ;; | |
da0f6381 | 20248 | |
00020c16 ILT |
20249 | sunos4*) |
20250 | version_type=sunos | |
20251 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
20252 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
20253 | shlibpath_var=LD_LIBRARY_PATH | |
20254 | shlibpath_overrides_runpath=yes | |
20255 | if test "$with_gnu_ld" = yes; then | |
20256 | need_lib_prefix=no | |
20257 | fi | |
20258 | need_version=yes | |
20259 | ;; | |
da0f6381 | 20260 | |
00020c16 ILT |
20261 | sysv4 | sysv4.3*) |
20262 | version_type=linux | |
20263 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20264 | soname_spec='${libname}${release}${shared_ext}$major' | |
20265 | shlibpath_var=LD_LIBRARY_PATH | |
20266 | case $host_vendor in | |
20267 | sni) | |
20268 | shlibpath_overrides_runpath=no | |
20269 | need_lib_prefix=no | |
20270 | runpath_var=LD_RUN_PATH | |
20271 | ;; | |
20272 | siemens) | |
20273 | need_lib_prefix=no | |
20274 | ;; | |
20275 | motorola) | |
20276 | need_lib_prefix=no | |
20277 | need_version=no | |
20278 | shlibpath_overrides_runpath=no | |
20279 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
20280 | ;; | |
20281 | esac | |
20282 | ;; | |
da0f6381 | 20283 | |
00020c16 ILT |
20284 | sysv4*MP*) |
20285 | if test -d /usr/nec ;then | |
20286 | version_type=linux | |
20287 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
20288 | soname_spec='$libname${shared_ext}.$major' | |
20289 | shlibpath_var=LD_LIBRARY_PATH | |
20290 | fi | |
20291 | ;; | |
da0f6381 | 20292 | |
00020c16 ILT |
20293 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
20294 | version_type=freebsd-elf | |
20295 | need_lib_prefix=no | |
20296 | need_version=no | |
20297 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
20298 | soname_spec='${libname}${release}${shared_ext}$major' | |
20299 | shlibpath_var=LD_LIBRARY_PATH | |
20300 | shlibpath_overrides_runpath=yes | |
20301 | hardcode_into_libs=yes | |
20302 | if test "$with_gnu_ld" = yes; then | |
20303 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
da0f6381 | 20304 | else |
00020c16 ILT |
20305 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' |
20306 | case $host_os in | |
20307 | sco3.2v5*) | |
20308 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
20309 | ;; | |
da0f6381 | 20310 | esac |
da0f6381 | 20311 | fi |
00020c16 ILT |
20312 | sys_lib_dlsearch_path_spec='/usr/lib' |
20313 | ;; | |
da0f6381 | 20314 | |
00020c16 ILT |
20315 | tpf*) |
20316 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
20317 | version_type=linux | |
20318 | need_lib_prefix=no | |
20319 | need_version=no | |
20320 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20321 | shlibpath_var=LD_LIBRARY_PATH | |
20322 | shlibpath_overrides_runpath=no | |
20323 | hardcode_into_libs=yes | |
20324 | ;; | |
da0f6381 | 20325 | |
00020c16 ILT |
20326 | uts4*) |
20327 | version_type=linux | |
20328 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20329 | soname_spec='${libname}${release}${shared_ext}$major' | |
20330 | shlibpath_var=LD_LIBRARY_PATH | |
20331 | ;; | |
da0f6381 | 20332 | |
00020c16 ILT |
20333 | *) |
20334 | dynamic_linker=no | |
20335 | ;; | |
20336 | esac | |
5213506e RW |
20337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 |
20338 | $as_echo "$dynamic_linker" >&6; } | |
00020c16 | 20339 | test "$dynamic_linker" = no && can_build_shared=no |
da0f6381 | 20340 | |
00020c16 ILT |
20341 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
20342 | if test "$GCC" = yes; then | |
20343 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
20344 | fi | |
da0f6381 | 20345 | |
00020c16 ILT |
20346 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
20347 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
20348 | fi | |
20349 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
20350 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
20351 | fi | |
da0f6381 | 20352 | |
da0f6381 | 20353 | |
da0f6381 | 20354 | |
da0f6381 | 20355 | |
da0f6381 | 20356 | |
da0f6381 PB |
20357 | |
20358 | ||
da0f6381 | 20359 | |
da0f6381 | 20360 | |
da0f6381 | 20361 | |
da0f6381 PB |
20362 | |
20363 | ||
20364 | ||
20365 | ||
20366 | ||
20367 | ||
20368 | ||
20369 | ||
20370 | ||
20371 | ||
20372 | ||
20373 | ||
20374 | ||
20375 | ||
20376 | ||
20377 | ||
20378 | ||
da0f6381 PB |
20379 | |
20380 | ||
20381 | ||
20382 | ||
20383 | ||
20384 | ||
43e02a8a RW |
20385 | |
20386 | ||
da0f6381 PB |
20387 | |
20388 | ||
20389 | ||
5213506e RW |
20390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 |
20391 | $as_echo_n "checking how to hardcode library paths into programs... " >&6; } | |
00020c16 ILT |
20392 | hardcode_action_CXX= |
20393 | if test -n "$hardcode_libdir_flag_spec_CXX" || | |
20394 | test -n "$runpath_var_CXX" || | |
20395 | test "X$hardcode_automatic_CXX" = "Xyes" ; then | |
da0f6381 | 20396 | |
00020c16 ILT |
20397 | # We can hardcode non-existent directories. |
20398 | if test "$hardcode_direct_CXX" != no && | |
20399 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
20400 | # have to relink, otherwise we might link with an installed library | |
20401 | # when we should be linking with a yet-to-be-installed one | |
20402 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && | |
20403 | test "$hardcode_minus_L_CXX" != no; then | |
20404 | # Linking always hardcodes the temporary library directory. | |
20405 | hardcode_action_CXX=relink | |
20406 | else | |
20407 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
20408 | hardcode_action_CXX=immediate | |
20409 | fi | |
20410 | else | |
20411 | # We cannot hardcode anything, or else we can only hardcode existing | |
20412 | # directories. | |
20413 | hardcode_action_CXX=unsupported | |
20414 | fi | |
5213506e RW |
20415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 |
20416 | $as_echo "$hardcode_action_CXX" >&6; } | |
da0f6381 | 20417 | |
00020c16 ILT |
20418 | if test "$hardcode_action_CXX" = relink || |
20419 | test "$inherit_rpath_CXX" = yes; then | |
20420 | # Fast installation is not supported | |
20421 | enable_fast_install=no | |
20422 | elif test "$shlibpath_overrides_runpath" = yes || | |
20423 | test "$enable_shared" = no; then | |
20424 | # Fast installation is not necessary | |
20425 | enable_fast_install=needless | |
20426 | fi | |
da0f6381 | 20427 | |
da0f6381 | 20428 | |
da0f6381 | 20429 | |
da0f6381 | 20430 | |
da0f6381 | 20431 | |
da0f6381 PB |
20432 | |
20433 | ||
00020c16 | 20434 | fi # test -n "$compiler" |
da0f6381 | 20435 | |
00020c16 ILT |
20436 | CC=$lt_save_CC |
20437 | LDCXX=$LD | |
20438 | LD=$lt_save_LD | |
20439 | GCC=$lt_save_GCC | |
20440 | with_gnu_ld=$lt_save_with_gnu_ld | |
20441 | lt_cv_path_LDCXX=$lt_cv_path_LD | |
20442 | lt_cv_path_LD=$lt_save_path_LD | |
20443 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | |
20444 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | |
20445 | fi # test "$_lt_caught_CXX_error" != yes | |
da0f6381 | 20446 | |
da0f6381 PB |
20447 | ac_ext=c |
20448 | ac_cpp='$CPP $CPPFLAGS' | |
20449 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
20450 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
20451 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
20452 | ||
da0f6381 PB |
20453 | |
20454 | ||
20455 | ||
20456 | ||
20457 | ||
20458 | ||
20459 | ||
20460 | ||
20461 | ||
20462 | ||
20463 | ||
20464 | ||
20465 | ||
20466 | ||
20467 | ||
20468 | # Only expand once: | |
20469 | ||
20470 | ||
20471 | ||
20472 | ||
20473 | ||
20474 | # Identify the assembler which will work hand-in-glove with the newly | |
20475 | # built GCC, so that we can examine its features. This is the assembler | |
20476 | # which will be driven by the driver program. | |
20477 | # | |
20478 | # If build != host, and we aren't building gas in-tree, we identify a | |
20479 | # build->target assembler and hope that it will have the same features | |
20480 | # as the host->target assembler we'll be using. | |
20481 | gcc_cv_gas_major_version= | |
20482 | gcc_cv_gas_minor_version= | |
20483 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas | |
20484 | ||
5213506e RW |
20485 | if test "${gcc_cv_as+set}" = set; then : |
20486 | ||
da0f6381 PB |
20487 | else |
20488 | ||
20489 | if test -x "$DEFAULT_ASSEMBLER"; then | |
20490 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
20491 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ | |
20492 | && test -f ../gas/Makefile \ | |
20493 | && test x$build = x$host; then | |
20494 | gcc_cv_as=../gas/as-new$build_exeext | |
20495 | elif test -x as$build_exeext; then | |
20496 | # Build using assembler in the current directory. | |
20497 | gcc_cv_as=./as$build_exeext | |
20498 | elif test -x $AS_FOR_TARGET; then | |
20499 | gcc_cv_as="$AS_FOR_TARGET" | |
20500 | else | |
20501 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
20502 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20504 | $as_echo_n "checking for $ac_word... " >&6; } | |
20505 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then : | |
20506 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
20507 | else |
20508 | case $gcc_cv_as in | |
20509 | [\\/]* | ?:[\\/]*) | |
20510 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
20511 | ;; | |
20512 | *) | |
20513 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20514 | for as_dir in $PATH | |
20515 | do | |
20516 | IFS=$as_save_IFS | |
20517 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20518 | for ac_exec_ext in '' $ac_executable_extensions; do |
20519 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 20520 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20521 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
20522 | break 2 |
20523 | fi | |
20524 | done | |
5213506e RW |
20525 | done |
20526 | IFS=$as_save_IFS | |
da0f6381 PB |
20527 | |
20528 | ;; | |
20529 | esac | |
20530 | fi | |
20531 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
da0f6381 | 20532 | if test -n "$gcc_cv_as"; then |
5213506e RW |
20533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5 |
20534 | $as_echo "$gcc_cv_as" >&6; } | |
da0f6381 | 20535 | else |
5213506e RW |
20536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20537 | $as_echo "no" >&6; } | |
da0f6381 PB |
20538 | fi |
20539 | ||
5213506e | 20540 | |
da0f6381 PB |
20541 | fi |
20542 | fi | |
20543 | ||
da0f6381 PB |
20544 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as |
20545 | ||
20546 | case "$ORIGINAL_AS_FOR_TARGET" in | |
20547 | ./as | ./as$build_exeext) ;; | |
5213506e | 20548 | *) ac_config_files="$ac_config_files as:exec-tool.in" |
da0f6381 PB |
20549 | ;; |
20550 | esac | |
20551 | ||
5213506e RW |
20552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5 |
20553 | $as_echo_n "checking what assembler to use... " >&6; } | |
da0f6381 PB |
20554 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then |
20555 | # Single tree build which includes gas. We want to prefer it | |
20556 | # over whatever linker top-level may have detected, since | |
20557 | # we'll use what we're building after installation anyway. | |
5213506e RW |
20558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5 |
20559 | $as_echo "newly built gas" >&6; } | |
da0f6381 PB |
20560 | in_tree_gas=yes |
20561 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
20562 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
20563 | $gcc_cv_as_gas_srcdir/configure \ | |
20564 | $gcc_cv_as_gas_srcdir/configure.in \ | |
20565 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
20566 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
20567 | if test x$gcc_cv_gas_version != x; then | |
20568 | break | |
20569 | fi | |
20570 | done | |
20571 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
20572 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
20573 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
20574 | case $gcc_cv_gas_patch_version in | |
20575 | "") gcc_cv_gas_patch_version="0" ;; | |
20576 | esac | |
20577 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ | |
20578 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
20579 | + $gcc_cv_gas_patch_version` | |
20580 | ||
20581 | in_tree_gas_is_elf=no | |
20582 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
20583 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
20584 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
20585 | then | |
20586 | in_tree_gas_is_elf=yes | |
20587 | fi | |
20588 | else | |
5213506e RW |
20589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5 |
20590 | $as_echo "$gcc_cv_as" >&6; } | |
da0f6381 PB |
20591 | in_tree_gas=no |
20592 | fi | |
20593 | ||
20594 | # Identify the linker which will work hand-in-glove with the newly | |
20595 | # built GCC, so that we can examine its features. This is the linker | |
20596 | # which will be driven by the driver program. | |
20597 | # | |
20598 | # If build != host, and we aren't building gas in-tree, we identify a | |
20599 | # build->target linker and hope that it will have the same features | |
20600 | # as the host->target linker we'll be using. | |
20601 | gcc_cv_gld_major_version= | |
20602 | gcc_cv_gld_minor_version= | |
20603 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
20604 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
20605 | ||
5213506e RW |
20606 | if test "${gcc_cv_ld+set}" = set; then : |
20607 | ||
da0f6381 PB |
20608 | else |
20609 | ||
20610 | if test -x "$DEFAULT_LINKER"; then | |
20611 | gcc_cv_ld="$DEFAULT_LINKER" | |
20612 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
20613 | && test -f ../ld/Makefile \ | |
20614 | && test x$build = x$host; then | |
20615 | gcc_cv_ld=../ld/ld-new$build_exeext | |
e8b05380 PB |
20616 | elif test -x collect-ld$build_exeext; then |
20617 | # Build using linker in the current directory. | |
20618 | gcc_cv_ld=./collect-ld$build_exeext | |
20619 | elif test -x $LD_FOR_TARGET; then | |
20620 | gcc_cv_ld="$LD_FOR_TARGET" | |
20621 | else | |
20622 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
20623 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20625 | $as_echo_n "checking for $ac_word... " >&6; } | |
20626 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then : | |
20627 | $as_echo_n "(cached) " >&6 | |
d739199a | 20628 | else |
e8b05380 | 20629 | case $gcc_cv_ld in |
d739199a | 20630 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20631 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
20632 | ;; |
20633 | *) | |
20634 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20635 | for as_dir in $PATH | |
20636 | do | |
20637 | IFS=$as_save_IFS | |
20638 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20639 | for ac_exec_ext in '' $ac_executable_extensions; do |
20640 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20641 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20642 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
d739199a DJ |
20643 | break 2 |
20644 | fi | |
20645 | done | |
5213506e RW |
20646 | done |
20647 | IFS=$as_save_IFS | |
d739199a DJ |
20648 | |
20649 | ;; | |
20650 | esac | |
20651 | fi | |
e8b05380 | 20652 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
e8b05380 | 20653 | if test -n "$gcc_cv_ld"; then |
5213506e RW |
20654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5 |
20655 | $as_echo "$gcc_cv_ld" >&6; } | |
d739199a | 20656 | else |
5213506e RW |
20657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20658 | $as_echo "no" >&6; } | |
d739199a DJ |
20659 | fi |
20660 | ||
5213506e | 20661 | |
d739199a | 20662 | fi |
e8b05380 PB |
20663 | fi |
20664 | ||
5938f74d L |
20665 | ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld |
20666 | PLUGIN_LD=`basename $gcc_cv_ld` | |
20667 | ||
20668 | # Check whether --with-plugin-ld was given. | |
20669 | if test "${with_plugin_ld+set}" = set; then : | |
20670 | withval=$with_plugin_ld; if test x"$withval" != x; then | |
20671 | ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval" | |
20672 | PLUGIN_LD="$withval" | |
20673 | fi | |
20674 | fi | |
20675 | ||
20676 | ||
20677 | ||
20678 | cat >>confdefs.h <<_ACEOF | |
20679 | #define PLUGIN_LD "$PLUGIN_LD" | |
20680 | _ACEOF | |
20681 | ||
20682 | ||
1dcc82c2 DK |
20683 | # Check to see if we are using gold instead of ld |
20684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5 | |
20685 | $as_echo_n "checking whether we are using gold... " >&6; } | |
20686 | ld_is_gold=no | |
20687 | if test x$gcc_cv_ld != x; then | |
20688 | if $gcc_cv_ld --version 2>/dev/null | sed 1q \ | |
20689 | | grep "GNU gold" > /dev/null; then | |
20690 | ld_is_gold=yes | |
20691 | fi | |
20692 | fi | |
20693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5 | |
20694 | $as_echo "$ld_is_gold" >&6; } | |
20695 | ||
e8b05380 PB |
20696 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld |
20697 | ||
be0fe523 PB |
20698 | case "$ORIGINAL_LD_FOR_TARGET" in |
20699 | ./collect-ld | ./collect-ld$build_exeext) ;; | |
5213506e | 20700 | *) ac_config_files="$ac_config_files collect-ld:exec-tool.in" |
be0fe523 PB |
20701 | ;; |
20702 | esac | |
e8b05380 | 20703 | |
5213506e RW |
20704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 |
20705 | $as_echo_n "checking what linker to use... " >&6; } | |
e8b05380 PB |
20706 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then |
20707 | # Single tree build which includes ld. We want to prefer it | |
20708 | # over whatever linker top-level may have detected, since | |
20709 | # we'll use what we're building after installation anyway. | |
5213506e RW |
20710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5 |
20711 | $as_echo "newly built ld" >&6; } | |
e8b05380 PB |
20712 | in_tree_ld=yes |
20713 | in_tree_ld_is_elf=no | |
20714 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
20715 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
20716 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
20717 | in_tree_ld_is_elf=yes | |
20718 | fi | |
20719 | for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in | |
20720 | do | |
20721 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
20722 | if test x$gcc_cv_gld_version != x; then | |
20723 | break | |
20724 | fi | |
20725 | done | |
20726 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
20727 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
20728 | else | |
5213506e RW |
20729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5 |
20730 | $as_echo "$gcc_cv_ld" >&6; } | |
e8b05380 PB |
20731 | in_tree_ld=no |
20732 | fi | |
20733 | ||
20734 | # Figure out what nm we will be using. | |
20735 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
5213506e RW |
20736 | if test "${gcc_cv_nm+set}" = set; then : |
20737 | ||
e8b05380 PB |
20738 | else |
20739 | ||
20740 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
20741 | && test -f ../binutils/Makefile \ |
20742 | && test x$build = x$host; then | |
e8b05380 PB |
20743 | gcc_cv_nm=../binutils/nm-new$build_exeext |
20744 | elif test -x nm$build_exeext; then | |
20745 | gcc_cv_nm=./nm$build_exeext | |
20746 | elif test -x $NM_FOR_TARGET; then | |
20747 | gcc_cv_nm="$NM_FOR_TARGET" | |
20748 | else | |
20749 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
20750 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20752 | $as_echo_n "checking for $ac_word... " >&6; } | |
20753 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then : | |
20754 | $as_echo_n "(cached) " >&6 | |
d739199a | 20755 | else |
e8b05380 | 20756 | case $gcc_cv_nm in |
d739199a | 20757 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20758 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
20759 | ;; |
20760 | *) | |
20761 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20762 | for as_dir in $PATH | |
20763 | do | |
20764 | IFS=$as_save_IFS | |
20765 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20766 | for ac_exec_ext in '' $ac_executable_extensions; do |
20767 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20768 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20769 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
d739199a DJ |
20770 | break 2 |
20771 | fi | |
20772 | done | |
5213506e RW |
20773 | done |
20774 | IFS=$as_save_IFS | |
d739199a DJ |
20775 | |
20776 | ;; | |
20777 | esac | |
20778 | fi | |
e8b05380 | 20779 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
e8b05380 | 20780 | if test -n "$gcc_cv_nm"; then |
5213506e RW |
20781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5 |
20782 | $as_echo "$gcc_cv_nm" >&6; } | |
d739199a | 20783 | else |
5213506e RW |
20784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20785 | $as_echo "no" >&6; } | |
d739199a DJ |
20786 | fi |
20787 | ||
5213506e | 20788 | |
d739199a | 20789 | fi |
e8b05380 | 20790 | fi |
d739199a | 20791 | |
5213506e RW |
20792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5 |
20793 | $as_echo_n "checking what nm to use... " >&6; } | |
e8b05380 PB |
20794 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then |
20795 | # Single tree build which includes binutils. | |
5213506e RW |
20796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5 |
20797 | $as_echo "newly built nm" >&6; } | |
e8b05380 PB |
20798 | in_tree_nm=yes |
20799 | else | |
5213506e RW |
20800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5 |
20801 | $as_echo "$gcc_cv_nm" >&6; } | |
e8b05380 PB |
20802 | in_tree_nm=no |
20803 | fi | |
20804 | ||
20805 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
20806 | ||
be0fe523 PB |
20807 | case "$ORIGINAL_NM_FOR_TARGET" in |
20808 | ./nm | ./nm$build_exeext) ;; | |
5213506e | 20809 | *) ac_config_files="$ac_config_files nm:exec-tool.in" |
be0fe523 PB |
20810 | ;; |
20811 | esac | |
20812 | ||
e8b05380 PB |
20813 | |
20814 | # Figure out what objdump we will be using. | |
5213506e RW |
20815 | if test "${gcc_cv_objdump+set}" = set; then : |
20816 | ||
e8b05380 PB |
20817 | else |
20818 | ||
20819 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
20820 | && test -f ../binutils/Makefile \ |
20821 | && test x$build = x$host; then | |
e8b05380 PB |
20822 | # Single tree build which includes binutils. |
20823 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
20824 | elif test -x objdump$build_exeext; then | |
20825 | gcc_cv_objdump=./objdump$build_exeext | |
20826 | elif test -x $OBJDUMP_FOR_TARGET; then | |
20827 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
20828 | else | |
20829 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
20830 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20832 | $as_echo_n "checking for $ac_word... " >&6; } | |
20833 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then : | |
20834 | $as_echo_n "(cached) " >&6 | |
9f18db39 | 20835 | else |
e8b05380 | 20836 | case $gcc_cv_objdump in |
9f18db39 | 20837 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20838 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
20839 | ;; |
20840 | *) | |
20841 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 20842 | for as_dir in $PATH |
9f18db39 PB |
20843 | do |
20844 | IFS=$as_save_IFS | |
20845 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20846 | for ac_exec_ext in '' $ac_executable_extensions; do |
20847 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20848 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20849 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
9f18db39 PB |
20850 | break 2 |
20851 | fi | |
20852 | done | |
5213506e RW |
20853 | done |
20854 | IFS=$as_save_IFS | |
779243f7 | 20855 | |
9f18db39 PB |
20856 | ;; |
20857 | esac | |
20858 | fi | |
e8b05380 | 20859 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
e8b05380 | 20860 | if test -n "$gcc_cv_objdump"; then |
5213506e RW |
20861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5 |
20862 | $as_echo "$gcc_cv_objdump" >&6; } | |
9f18db39 | 20863 | else |
5213506e RW |
20864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20865 | $as_echo "no" >&6; } | |
9f18db39 PB |
20866 | fi |
20867 | ||
5213506e | 20868 | |
e8b05380 PB |
20869 | fi |
20870 | fi | |
9f18db39 | 20871 | |
5213506e RW |
20872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5 |
20873 | $as_echo_n "checking what objdump to use... " >&6; } | |
e8b05380 PB |
20874 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then |
20875 | # Single tree build which includes binutils. | |
5213506e RW |
20876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5 |
20877 | $as_echo "newly built objdump" >&6; } | |
e8b05380 | 20878 | elif test x$gcc_cv_objdump = x; then |
5213506e RW |
20879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 |
20880 | $as_echo "not found" >&6; } | |
e8b05380 | 20881 | else |
5213506e RW |
20882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5 |
20883 | $as_echo "$gcc_cv_objdump" >&6; } | |
a2eafc76 | 20884 | fi |
3cae5780 | 20885 | |
6e97481b | 20886 | # Figure out what readelf we will be using. |
5213506e RW |
20887 | if test "${gcc_cv_readelf+set}" = set; then : |
20888 | ||
6e97481b JJ |
20889 | else |
20890 | ||
20891 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
20892 | && test -f ../binutils/Makefile \ | |
20893 | && test x$build = x$host; then | |
20894 | # Single tree build which includes binutils. | |
20895 | gcc_cv_readelf=../binutils/readelf$build_exeext | |
20896 | elif test -x readelf$build_exeext; then | |
20897 | gcc_cv_readelf=./readelf$build_exeext | |
20898 | else | |
20899 | # Extract the first word of "readelf", so it can be a program name with args. | |
20900 | set dummy readelf; ac_word=$2 | |
5213506e RW |
20901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20902 | $as_echo_n "checking for $ac_word... " >&6; } | |
20903 | if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then : | |
20904 | $as_echo_n "(cached) " >&6 | |
6e97481b JJ |
20905 | else |
20906 | case $gcc_cv_readelf in | |
20907 | [\\/]* | ?:[\\/]*) | |
20908 | ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path. | |
20909 | ;; | |
20910 | *) | |
20911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20912 | for as_dir in $PATH | |
20913 | do | |
20914 | IFS=$as_save_IFS | |
20915 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20916 | for ac_exec_ext in '' $ac_executable_extensions; do |
20917 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6e97481b | 20918 | ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20919 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
6e97481b JJ |
20920 | break 2 |
20921 | fi | |
20922 | done | |
5213506e RW |
20923 | done |
20924 | IFS=$as_save_IFS | |
6e97481b JJ |
20925 | |
20926 | ;; | |
20927 | esac | |
20928 | fi | |
20929 | gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf | |
6e97481b | 20930 | if test -n "$gcc_cv_readelf"; then |
5213506e RW |
20931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5 |
20932 | $as_echo "$gcc_cv_readelf" >&6; } | |
6e97481b | 20933 | else |
5213506e RW |
20934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20935 | $as_echo "no" >&6; } | |
6e97481b JJ |
20936 | fi |
20937 | ||
5213506e | 20938 | |
6e97481b JJ |
20939 | fi |
20940 | fi | |
20941 | ||
5213506e RW |
20942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5 |
20943 | $as_echo_n "checking what readelf to use... " >&6; } | |
6e97481b JJ |
20944 | if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then |
20945 | # Single tree build which includes binutils. | |
5213506e RW |
20946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5 |
20947 | $as_echo "newly built readelf" >&6; } | |
6e97481b | 20948 | elif test x$gcc_cv_readelf = x; then |
5213506e RW |
20949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 |
20950 | $as_echo "not found" >&6; } | |
6e97481b | 20951 | else |
5213506e RW |
20952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5 |
20953 | $as_echo "$gcc_cv_readelf" >&6; } | |
6e97481b JJ |
20954 | fi |
20955 | ||
981d4858 | 20956 | # Figure out what assembler alignment features are present. |
e0b0fd74 L |
20957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5 |
20958 | $as_echo_n "checking assembler flags... " >&6; } | |
20959 | if test "${gcc_cv_as_flags+set}" = set; then : | |
20960 | $as_echo_n "(cached) " >&6 | |
20961 | else | |
20962 | case "$target" in | |
20963 | i[34567]86-*-linux*) | |
20964 | gcc_cv_as_flags="--32" | |
20965 | ;; | |
20966 | *) | |
20967 | gcc_cv_as_flags=" " | |
20968 | ;; | |
20969 | esac | |
20970 | fi | |
20971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_flags" >&5 | |
20972 | $as_echo "$gcc_cv_as_flags" >&6; } | |
20973 | ||
5213506e RW |
20974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5 |
20975 | $as_echo_n "checking assembler for .balign and .p2align... " >&6; } | |
20976 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then : | |
20977 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
20978 | else |
20979 | gcc_cv_as_balign_and_p2align=no | |
20980 | if test $in_tree_gas = yes; then | |
20981 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
20982 | then gcc_cv_as_balign_and_p2align=yes | |
20983 | fi | |
20984 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 20985 | echo '.balign 4 |
8ada417f | 20986 | .p2align 2' > conftest.s |
e0b0fd74 | 20987 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 20988 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
20989 | (eval $ac_try) 2>&5 |
20990 | ac_status=$? | |
5213506e RW |
20991 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
20992 | test $ac_status = 0; }; } | |
8ada417f ZW |
20993 | then |
20994 | gcc_cv_as_balign_and_p2align=yes | |
20995 | else | |
20996 | echo "configure: failed program was" >&5 | |
20997 | cat conftest.s >&5 | |
20998 | fi | |
20999 | rm -f conftest.o conftest.s | |
21000 | fi | |
21001 | fi | |
5213506e RW |
21002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5 |
21003 | $as_echo "$gcc_cv_as_balign_and_p2align" >&6; } | |
63cf211a | 21004 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 | 21005 | |
5213506e | 21006 | $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h |
981d4858 | 21007 | |
ad9c4d9f NN |
21008 | fi |
21009 | ||
5213506e RW |
21010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5 |
21011 | $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; } | |
21012 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then : | |
21013 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21014 | else |
21015 | gcc_cv_as_max_skip_p2align=no | |
21016 | if test $in_tree_gas = yes; then | |
21017 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
21018 | then gcc_cv_as_max_skip_p2align=yes | |
21019 | fi | |
21020 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21021 | echo '.p2align 4,,7' > conftest.s |
e0b0fd74 | 21022 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21023 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21024 | (eval $ac_try) 2>&5 |
21025 | ac_status=$? | |
5213506e RW |
21026 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21027 | test $ac_status = 0; }; } | |
8ada417f ZW |
21028 | then |
21029 | gcc_cv_as_max_skip_p2align=yes | |
21030 | else | |
21031 | echo "configure: failed program was" >&5 | |
21032 | cat conftest.s >&5 | |
21033 | fi | |
21034 | rm -f conftest.o conftest.s | |
21035 | fi | |
ad9c4d9f | 21036 | fi |
5213506e RW |
21037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5 |
21038 | $as_echo "$gcc_cv_as_max_skip_p2align" >&6; } | |
63cf211a | 21039 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 | 21040 | |
5213506e | 21041 | $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h |
9e423e6d | 21042 | |
9e423e6d | 21043 | fi |
ad9c4d9f | 21044 | |
5213506e RW |
21045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5 |
21046 | $as_echo_n "checking assembler for .literal16... " >&6; } | |
21047 | if test "${gcc_cv_as_literal16+set}" = set; then : | |
21048 | $as_echo_n "(cached) " >&6 | |
5708d18d MS |
21049 | else |
21050 | gcc_cv_as_literal16=no | |
21051 | if test $in_tree_gas = yes; then | |
21052 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
21053 | then gcc_cv_as_literal16=yes | |
21054 | fi | |
21055 | elif test x$gcc_cv_as != x; then | |
21056 | echo '.literal16' > conftest.s | |
e0b0fd74 | 21057 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21058 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
5708d18d MS |
21059 | (eval $ac_try) 2>&5 |
21060 | ac_status=$? | |
5213506e RW |
21061 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21062 | test $ac_status = 0; }; } | |
5708d18d MS |
21063 | then |
21064 | gcc_cv_as_literal16=yes | |
21065 | else | |
21066 | echo "configure: failed program was" >&5 | |
21067 | cat conftest.s >&5 | |
21068 | fi | |
21069 | rm -f conftest.o conftest.s | |
21070 | fi | |
21071 | fi | |
5213506e RW |
21072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5 |
21073 | $as_echo "$gcc_cv_as_literal16" >&6; } | |
5708d18d MS |
21074 | if test $gcc_cv_as_literal16 = yes; then |
21075 | ||
5213506e | 21076 | $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h |
5708d18d MS |
21077 | |
21078 | fi | |
21079 | ||
5213506e RW |
21080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5 |
21081 | $as_echo_n "checking assembler for working .subsection -1... " >&6; } | |
21082 | if test "${gcc_cv_as_subsection_m1+set}" = set; then : | |
21083 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21084 | else |
21085 | gcc_cv_as_subsection_m1=no | |
21086 | if test $in_tree_gas = yes; then | |
21087 | if test $in_tree_gas_is_elf = yes \ | |
21088 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
21089 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 21090 | fi |
8ada417f | 21091 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21092 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
21093 | .subsection -1 |
21094 | conftest_label2: .word 0 | |
8ada417f | 21095 | .previous' > conftest.s |
e0b0fd74 | 21096 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21097 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21098 | (eval $ac_try) 2>&5 |
21099 | ac_status=$? | |
5213506e RW |
21100 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21101 | test $ac_status = 0; }; } | |
8ada417f ZW |
21102 | then |
21103 | if test x$gcc_cv_nm != x; then | |
21104 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
21105 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
21106 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
21107 | then : | |
21108 | else gcc_cv_as_subsection_m1=yes | |
21109 | fi | |
21110 | rm -f conftest.nm1 conftest.nm2 | |
21111 | fi | |
21112 | else | |
21113 | echo "configure: failed program was" >&5 | |
21114 | cat conftest.s >&5 | |
21115 | fi | |
21116 | rm -f conftest.o conftest.s | |
21117 | fi | |
981d4858 | 21118 | fi |
5213506e RW |
21119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5 |
21120 | $as_echo "$gcc_cv_as_subsection_m1" >&6; } | |
63cf211a | 21121 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 | 21122 | |
5213506e | 21123 | $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h |
981d4858 | 21124 | |
d1accaa3 | 21125 | fi |
ad9c4d9f | 21126 | |
5213506e RW |
21127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5 |
21128 | $as_echo_n "checking assembler for .weak... " >&6; } | |
21129 | if test "${gcc_cv_as_weak+set}" = set; then : | |
21130 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21131 | else |
21132 | gcc_cv_as_weak=no | |
21133 | if test $in_tree_gas = yes; then | |
21134 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
21135 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 21136 | fi |
8ada417f | 21137 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21138 | echo ' .weak foobar' > conftest.s |
e0b0fd74 | 21139 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21140 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21141 | (eval $ac_try) 2>&5 |
21142 | ac_status=$? | |
5213506e RW |
21143 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21144 | test $ac_status = 0; }; } | |
8ada417f ZW |
21145 | then |
21146 | gcc_cv_as_weak=yes | |
21147 | else | |
21148 | echo "configure: failed program was" >&5 | |
21149 | cat conftest.s >&5 | |
21150 | fi | |
21151 | rm -f conftest.o conftest.s | |
21152 | fi | |
981d4858 | 21153 | fi |
5213506e RW |
21154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5 |
21155 | $as_echo "$gcc_cv_as_weak" >&6; } | |
63cf211a | 21156 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 | 21157 | |
5213506e | 21158 | $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h |
981d4858 | 21159 | |
12822146 | 21160 | fi |
ad9c4d9f | 21161 | |
5213506e RW |
21162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5 |
21163 | $as_echo_n "checking assembler for .weakref... " >&6; } | |
21164 | if test "${gcc_cv_as_weakref+set}" = set; then : | |
21165 | $as_echo_n "(cached) " >&6 | |
a0203ca7 AO |
21166 | else |
21167 | gcc_cv_as_weakref=no | |
21168 | if test $in_tree_gas = yes; then | |
21169 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
21170 | then gcc_cv_as_weakref=yes | |
21171 | fi | |
21172 | elif test x$gcc_cv_as != x; then | |
21173 | echo ' .weakref foobar, barfnot' > conftest.s | |
e0b0fd74 | 21174 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21175 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a0203ca7 AO |
21176 | (eval $ac_try) 2>&5 |
21177 | ac_status=$? | |
5213506e RW |
21178 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21179 | test $ac_status = 0; }; } | |
a0203ca7 AO |
21180 | then |
21181 | gcc_cv_as_weakref=yes | |
21182 | else | |
21183 | echo "configure: failed program was" >&5 | |
21184 | cat conftest.s >&5 | |
21185 | fi | |
21186 | rm -f conftest.o conftest.s | |
21187 | fi | |
21188 | fi | |
5213506e RW |
21189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5 |
21190 | $as_echo "$gcc_cv_as_weakref" >&6; } | |
a0203ca7 AO |
21191 | if test $gcc_cv_as_weakref = yes; then |
21192 | ||
5213506e | 21193 | $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h |
a0203ca7 AO |
21194 | |
21195 | fi | |
21196 | ||
5213506e RW |
21197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5 |
21198 | $as_echo_n "checking assembler for .nsubspa comdat... " >&6; } | |
21199 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then : | |
21200 | $as_echo_n "(cached) " >&6 | |
e41f3691 JDA |
21201 | else |
21202 | gcc_cv_as_nsubspa_comdat=no | |
21203 | if test $in_tree_gas = yes; then | |
21204 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
21205 | then gcc_cv_as_nsubspa_comdat=yes | |
21206 | fi | |
21207 | elif test x$gcc_cv_as != x; then | |
21208 | echo ' .SPACE $TEXT$ | |
21209 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
e0b0fd74 | 21210 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21211 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e41f3691 JDA |
21212 | (eval $ac_try) 2>&5 |
21213 | ac_status=$? | |
5213506e RW |
21214 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21215 | test $ac_status = 0; }; } | |
e41f3691 JDA |
21216 | then |
21217 | gcc_cv_as_nsubspa_comdat=yes | |
21218 | else | |
21219 | echo "configure: failed program was" >&5 | |
21220 | cat conftest.s >&5 | |
21221 | fi | |
21222 | rm -f conftest.o conftest.s | |
21223 | fi | |
21224 | fi | |
5213506e RW |
21225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5 |
21226 | $as_echo "$gcc_cv_as_nsubspa_comdat" >&6; } | |
e41f3691 JDA |
21227 | if test $gcc_cv_as_nsubspa_comdat = yes; then |
21228 | ||
5213506e | 21229 | $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h |
e41f3691 JDA |
21230 | |
21231 | fi | |
21232 | ||
8ada417f ZW |
21233 | # .hidden needs to be supported in both the assembler and the linker, |
21234 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
21235 | # This is irritatingly difficult to feature test for; we have to check the | |
21236 | # date string after the version number. If we've got an in-tree | |
21237 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
21238 | # to be safe. | |
21239 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
5213506e RW |
21240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5 |
21241 | $as_echo_n "checking assembler for .hidden... " >&6; } | |
21242 | if test "${gcc_cv_as_hidden+set}" = set; then : | |
21243 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21244 | else |
21245 | gcc_cv_as_hidden=no | |
21246 | if test $in_tree_gas = yes; then | |
21247 | if test $in_tree_gas_is_elf = yes \ | |
21248 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
21249 | then gcc_cv_as_hidden=yes | |
21250 | fi | |
21251 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21252 | echo ' .hidden foobar |
8ada417f | 21253 | foobar:' > conftest.s |
e0b0fd74 | 21254 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21255 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21256 | (eval $ac_try) 2>&5 |
21257 | ac_status=$? | |
5213506e RW |
21258 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21259 | test $ac_status = 0; }; } | |
8ada417f ZW |
21260 | then |
21261 | gcc_cv_as_hidden=yes | |
21262 | else | |
21263 | echo "configure: failed program was" >&5 | |
21264 | cat conftest.s >&5 | |
21265 | fi | |
21266 | rm -f conftest.o conftest.s | |
21267 | fi | |
21268 | fi | |
5213506e RW |
21269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5 |
21270 | $as_echo "$gcc_cv_as_hidden" >&6; } | |
63cf211a | 21271 | |
ad9c4d9f | 21272 | |
10ca6198 JJ |
21273 | if test $in_tree_ld != yes ; then |
21274 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | |
1dcc82c2 DK |
21275 | if test x"$ld_is_gold" = xyes; then |
21276 | gcc_cv_ld_hidden=yes | |
21277 | elif echo "$ld_ver" | grep GNU > /dev/null; then | |
10ca6198 JJ |
21278 | ld_vers=`echo $ld_ver | sed -n \ |
21279 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` | |
21280 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |
21281 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
21282 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
21283 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
55c4f715 RO |
21284 | else |
21285 | case "${target}" in | |
21286 | *-*-solaris2*) | |
21287 | # | |
21288 | # Solaris 2 ld -V output looks like this for a regular version: | |
21289 | # | |
21290 | # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 | |
21291 | # | |
21292 | # but test versions add stuff at the end: | |
21293 | # | |
21294 | # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 | |
21295 | # | |
21296 | ld_ver=`$gcc_cv_ld -V 2>&1` | |
21297 | if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then | |
21298 | ld_vers=`echo $ld_ver | sed -n \ | |
21299 | -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` | |
21300 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
21301 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
21302 | fi | |
21303 | ;; | |
21304 | esac | |
10ca6198 JJ |
21305 | fi |
21306 | fi | |
21307 | ||
5213506e RW |
21308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5 |
21309 | $as_echo_n "checking linker for .hidden support... " >&6; } | |
21310 | if test "${gcc_cv_ld_hidden+set}" = set; then : | |
21311 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21312 | else |
21313 | if test $in_tree_ld = yes ; then | |
21314 | gcc_cv_ld_hidden=no | |
21315 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21316 | && test $in_tree_ld_is_elf = yes; then | |
21317 | gcc_cv_ld_hidden=yes | |
21318 | fi | |
21319 | else | |
21320 | gcc_cv_ld_hidden=yes | |
8ada417f | 21321 | if echo "$ld_ver" | grep GNU > /dev/null; then |
8ada417f ZW |
21322 | if test 0"$ld_date" -lt 20020404; then |
21323 | if test -n "$ld_date"; then | |
21324 | # If there was date string, but was earlier than 2002-04-04, fail | |
21325 | gcc_cv_ld_hidden=no | |
21326 | elif test -z "$ld_vers"; then | |
21327 | # If there was no date string nor ld version number, something is wrong | |
21328 | gcc_cv_ld_hidden=no | |
21329 | else | |
8ada417f ZW |
21330 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
21331 | if test "$ld_vers_major" -lt 2; then | |
21332 | gcc_cv_ld_hidden=no | |
21333 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
21334 | gcc_cv_ld_hidden="no" | |
21335 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
21336 | gcc_cv_ld_hidden=no | |
c72931a6 | 21337 | fi |
8ada417f | 21338 | fi |
789b7de5 | 21339 | fi |
8ada417f | 21340 | else |
28690784 | 21341 | case "${target}" in |
b0fd7d27 | 21342 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
21343 | gcc_cv_ld_hidden=yes |
21344 | ;; | |
5e87dc23 | 21345 | *-*-solaris2.9* | *-*-solaris2.1[0-9]*) |
a93e1899 RO |
21346 | # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but |
21347 | # .symbolic was only added in Solaris 9 12/02. | |
5e87dc23 RO |
21348 | gcc_cv_ld_hidden=yes |
21349 | ;; | |
28690784 JDA |
21350 | *) |
21351 | gcc_cv_ld_hidden=no | |
21352 | ;; | |
21353 | esac | |
8ada417f ZW |
21354 | fi |
21355 | fi | |
6d07784a | 21356 | fi |
5213506e RW |
21357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5 |
21358 | $as_echo "$gcc_cv_ld_hidden" >&6; } | |
8ada417f | 21359 | libgcc_visibility=no |
ad9c4d9f | 21360 | |
232b67d9 | 21361 | |
8e3940b2 | 21362 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 21363 | libgcc_visibility=yes |
ba479fd2 | 21364 | |
5213506e | 21365 | $as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h |
ad9c4d9f NN |
21366 | |
21367 | fi | |
21368 | ||
5213506e RW |
21369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5 |
21370 | $as_echo_n "checking linker read-only and read-write section mixing... " >&6; } | |
e73da78e RO |
21371 | gcc_cv_ld_ro_rw_mix=unknown |
21372 | if test $in_tree_ld = yes ; then | |
21373 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21374 | && test $in_tree_ld_is_elf = yes; then | |
21375 | gcc_cv_ld_ro_rw_mix=read-write | |
21376 | fi | |
21377 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
21378 | echo '.section myfoosect, "a"' > conftest1.s | |
21379 | echo '.section myfoosect, "aw"' > conftest2.s | |
21380 | echo '.byte 1' >> conftest2.s | |
21381 | echo '.section myfoosect, "a"' > conftest3.s | |
21382 | echo '.byte 0' >> conftest3.s | |
21383 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
21384 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
21385 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
21386 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ | |
21387 | conftest2.o conftest3.o > /dev/null 2>&1; then | |
21388 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ | |
21389 | | sed -e '/myfoosect/!d' -e N` | |
21390 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then | |
21391 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
21392 | gcc_cv_ld_ro_rw_mix=read-only | |
21393 | else | |
21394 | gcc_cv_ld_ro_rw_mix=read-write | |
21395 | fi | |
21396 | fi | |
21397 | fi | |
21398 | rm -f conftest.* conftest[123].* | |
21399 | fi | |
21400 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
21401 | ||
5213506e | 21402 | $as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h |
e73da78e RO |
21403 | |
21404 | fi | |
5213506e RW |
21405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5 |
21406 | $as_echo "$gcc_cv_ld_ro_rw_mix" >&6; } | |
e73da78e | 21407 | |
8ada417f | 21408 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
5213506e RW |
21409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5 |
21410 | $as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; } | |
21411 | if test "${gcc_cv_as_leb128+set}" = set; then : | |
21412 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21413 | else |
21414 | gcc_cv_as_leb128=no | |
21415 | if test $in_tree_gas = yes; then | |
21416 | if test $in_tree_gas_is_elf = yes \ | |
21417 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
21418 | then gcc_cv_as_leb128=yes | |
21419 | fi | |
21420 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21421 | echo ' .data |
b7460f24 RH |
21422 | .uleb128 L2 - L1 |
21423 | L1: | |
21424 | .uleb128 1280 | |
21425 | .sleb128 -1010 | |
8ada417f | 21426 | L2:' > conftest.s |
e0b0fd74 | 21427 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21428 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21429 | (eval $ac_try) 2>&5 |
21430 | ac_status=$? | |
5213506e RW |
21431 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21432 | test $ac_status = 0; }; } | |
8ada417f ZW |
21433 | then |
21434 | # GAS versions before 2.11 do not support uleb128, | |
21435 | # despite appearing to. | |
21436 | # ??? There exists an elf-specific test that will crash | |
21437 | # the assembler. Perhaps it's better to figure out whether | |
21438 | # arbitrary sections are supported and try the test. | |
bace148a | 21439 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f | 21440 | if echo "$as_ver" | grep GNU > /dev/null; then |
ddcd0f6f | 21441 | as_vers=`echo $as_ver | sed -n \ |
115e6e55 | 21442 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` |
ddcd0f6f BS |
21443 | as_major=`expr "$as_vers" : '\([0-9]*\)'` |
21444 | as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
21445 | if test $as_major -eq 2 && test $as_minor -lt 11 |
21446 | then : | |
21447 | else gcc_cv_as_leb128=yes | |
21448 | fi | |
21449 | fi | |
21450 | else | |
21451 | echo "configure: failed program was" >&5 | |
21452 | cat conftest.s >&5 | |
21453 | fi | |
21454 | rm -f conftest.o conftest.s | |
21455 | fi | |
b7460f24 | 21456 | fi |
5213506e RW |
21457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5 |
21458 | $as_echo "$gcc_cv_as_leb128" >&6; } | |
63cf211a | 21459 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 | 21460 | |
5213506e | 21461 | $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h |
b7460f24 RH |
21462 | |
21463 | fi | |
ad9c4d9f | 21464 | |
d4ea4622 | 21465 | # Check if we have assembler support for unwind directives. |
5213506e RW |
21466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5 |
21467 | $as_echo_n "checking assembler for cfi directives... " >&6; } | |
21468 | if test "${gcc_cv_as_cfi_directive+set}" = set; then : | |
21469 | $as_echo_n "(cached) " >&6 | |
d4ea4622 RH |
21470 | else |
21471 | gcc_cv_as_cfi_directive=no | |
6e60703f | 21472 | if test x$gcc_cv_as != x; then |
d4ea4622 RH |
21473 | echo ' .text |
21474 | .cfi_startproc | |
21475 | .cfi_offset 0, 0 | |
21476 | .cfi_same_value 1 | |
21477 | .cfi_def_cfa 1, 2 | |
21478 | .cfi_escape 1, 2, 3, 4, 5 | |
21479 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21480 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21481 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d4ea4622 RH |
21482 | (eval $ac_try) 2>&5 |
21483 | ac_status=$? | |
5213506e RW |
21484 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21485 | test $ac_status = 0; }; } | |
d4ea4622 | 21486 | then |
e73da78e RO |
21487 | case "$target" in |
21488 | *-*-solaris*) | |
21489 | # If the linker used on Solaris (like Sun ld) isn't capable of merging | |
21490 | # read-only and read-write sections, we need to make sure that the | |
21491 | # assembler used emits read-write .eh_frame sections. | |
21492 | if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then | |
21493 | if test "x$gcc_cv_objdump" != x; then | |
21494 | if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
21495 | sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then | |
21496 | gcc_cv_as_cfi_directive=no | |
21497 | else | |
eb2573ee RO |
21498 | case "$target" in |
21499 | i?86-*-solaris2.1[0-9]*) | |
21500 | # On Solaris/x86, make sure that GCC and gas agree on using | |
21501 | # read-only .eh_frame sections for 64-bit. | |
21502 | if $gcc_cv_as --64 -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
21503 | $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
21504 | sed -e /.eh_frame/!d -e N | \ | |
21505 | grep READONLY > /dev/null; then | |
21506 | gcc_cv_as_cfi_directive=yes | |
21507 | else | |
21508 | gcc_cv_as_cfi_directive=no | |
21509 | fi | |
21510 | ;; | |
21511 | *) | |
21512 | gcc_cv_as_cfi_directive=yes | |
21513 | ;; | |
21514 | esac | |
e73da78e RO |
21515 | fi |
21516 | else | |
21517 | # no objdump, err on the side of caution | |
21518 | gcc_cv_as_cfi_directive=no | |
21519 | fi | |
21520 | else | |
21521 | gcc_cv_as_cfi_directive=yes | |
21522 | fi | |
21523 | ;; | |
21524 | *-*-*) | |
21525 | gcc_cv_as_cfi_directive=yes | |
21526 | ;; | |
21527 | esac | |
d4ea4622 RH |
21528 | else |
21529 | echo "configure: failed program was" >&5 | |
21530 | cat conftest.s >&5 | |
21531 | fi | |
21532 | rm -f conftest.o conftest.s | |
21533 | fi | |
21534 | fi | |
5213506e RW |
21535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5 |
21536 | $as_echo "$gcc_cv_as_cfi_directive" >&6; } | |
d4ea4622 | 21537 | |
6e97481b | 21538 | if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then |
5213506e RW |
21539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5 |
21540 | $as_echo_n "checking assembler for working cfi advance... " >&6; } | |
21541 | if test "${gcc_cv_as_cfi_advance_working+set}" = set; then : | |
21542 | $as_echo_n "(cached) " >&6 | |
6e97481b JJ |
21543 | else |
21544 | gcc_cv_as_cfi_advance_working=no | |
21545 | if test x$gcc_cv_as != x; then | |
21546 | echo ' .text | |
21547 | .cfi_startproc | |
21548 | .cfi_adjust_cfa_offset 64 | |
7ac22e17 | 21549 | .skip 75040, 0 |
6e97481b JJ |
21550 | .cfi_adjust_cfa_offset 128 |
21551 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21552 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21553 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
6e97481b JJ |
21554 | (eval $ac_try) 2>&5 |
21555 | ac_status=$? | |
5213506e RW |
21556 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21557 | test $ac_status = 0; }; } | |
6e97481b JJ |
21558 | then |
21559 | ||
21560 | if $gcc_cv_readelf -wf conftest.o 2>/dev/null \ | |
7ac22e17 | 21561 | | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then |
6e97481b JJ |
21562 | gcc_cv_as_cfi_advance_working=yes |
21563 | fi | |
21564 | ||
21565 | else | |
21566 | echo "configure: failed program was" >&5 | |
21567 | cat conftest.s >&5 | |
21568 | fi | |
21569 | rm -f conftest.o conftest.s | |
21570 | fi | |
21571 | fi | |
5213506e RW |
21572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5 |
21573 | $as_echo "$gcc_cv_as_cfi_advance_working" >&6; } | |
6e97481b JJ |
21574 | |
21575 | else | |
66f91112 EB |
21576 | # no readelf, err on the side of caution |
21577 | gcc_cv_as_cfi_advance_working=no | |
6e97481b | 21578 | fi |
d4ea4622 RH |
21579 | |
21580 | cat >>confdefs.h <<_ACEOF | |
6e97481b JJ |
21581 | #define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \ |
21582 | && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi` | |
d4ea4622 RH |
21583 | _ACEOF |
21584 | ||
21585 | ||
5213506e RW |
21586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5 |
21587 | $as_echo_n "checking assembler for cfi personality directive... " >&6; } | |
21588 | if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then : | |
21589 | $as_echo_n "(cached) " >&6 | |
058514b3 RH |
21590 | else |
21591 | gcc_cv_as_cfi_personality_directive=no | |
6e60703f | 21592 | if test x$gcc_cv_as != x; then |
058514b3 | 21593 | echo ' .text |
042628f9 | 21594 | .cfi_startproc |
058514b3 RH |
21595 | .cfi_personality 0, symbol |
21596 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21597 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21598 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
058514b3 RH |
21599 | (eval $ac_try) 2>&5 |
21600 | ac_status=$? | |
5213506e RW |
21601 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21602 | test $ac_status = 0; }; } | |
058514b3 RH |
21603 | then |
21604 | gcc_cv_as_cfi_personality_directive=yes | |
21605 | else | |
21606 | echo "configure: failed program was" >&5 | |
21607 | cat conftest.s >&5 | |
21608 | fi | |
21609 | rm -f conftest.o conftest.s | |
21610 | fi | |
21611 | fi | |
5213506e RW |
21612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5 |
21613 | $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; } | |
058514b3 RH |
21614 | |
21615 | ||
21616 | cat >>confdefs.h <<_ACEOF | |
21617 | #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes; | |
21618 | then echo 1; else echo 0; fi` | |
21619 | _ACEOF | |
21620 | ||
21621 | ||
7d45fb94 JJ |
21622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5 |
21623 | $as_echo_n "checking assembler for cfi sections directive... " >&6; } | |
21624 | if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then : | |
21625 | $as_echo_n "(cached) " >&6 | |
21626 | else | |
21627 | gcc_cv_as_cfi_sections_directive=no | |
21628 | if test x$gcc_cv_as != x; then | |
21629 | echo ' .text | |
21630 | .cfi_sections .debug_frame, .eh_frame | |
21631 | .cfi_startproc | |
21632 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21633 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
7d45fb94 JJ |
21634 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
21635 | (eval $ac_try) 2>&5 | |
21636 | ac_status=$? | |
21637 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
21638 | test $ac_status = 0; }; } | |
21639 | then | |
21640 | gcc_cv_as_cfi_sections_directive=yes | |
21641 | else | |
21642 | echo "configure: failed program was" >&5 | |
21643 | cat conftest.s >&5 | |
21644 | fi | |
21645 | rm -f conftest.o conftest.s | |
21646 | fi | |
21647 | fi | |
21648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5 | |
21649 | $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; } | |
21650 | ||
21651 | ||
21652 | cat >>confdefs.h <<_ACEOF | |
21653 | #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes; | |
21654 | then echo 1; else echo 0; fi` | |
21655 | _ACEOF | |
21656 | ||
21657 | ||
8ada417f ZW |
21658 | # GAS versions up to and including 2.11.0 may mis-optimize |
21659 | # .eh_frame data. | |
5213506e RW |
21660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5 |
21661 | $as_echo_n "checking assembler for eh_frame optimization... " >&6; } | |
21662 | if test "${gcc_cv_as_eh_frame+set}" = set; then : | |
21663 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21664 | else |
21665 | gcc_cv_as_eh_frame=no | |
21666 | if test $in_tree_gas = yes; then | |
21667 | if test $in_tree_gas_is_elf = yes \ | |
21668 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21669 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 21670 | fi |
8ada417f | 21671 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21672 | echo ' .text |
c64688ae RH |
21673 | .LFB1: |
21674 | .4byte 0 | |
21675 | .L1: | |
21676 | .4byte 0 | |
21677 | .LFE1: | |
21678 | .section .eh_frame,"aw",@progbits | |
21679 | __FRAME_BEGIN__: | |
21680 | .4byte .LECIE1-.LSCIE1 | |
21681 | .LSCIE1: | |
21682 | .4byte 0x0 | |
21683 | .byte 0x1 | |
21684 | .ascii "z\0" | |
21685 | .byte 0x1 | |
21686 | .byte 0x78 | |
21687 | .byte 0x1a | |
21688 | .byte 0x0 | |
21689 | .byte 0x4 | |
21690 | .4byte 1 | |
21691 | .p2align 1 | |
21692 | .LECIE1: | |
21693 | .LSFDE1: | |
21694 | .4byte .LEFDE1-.LASFDE1 | |
21695 | .LASFDE1: | |
21696 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
21697 | .4byte .LFB1 | |
21698 | .4byte .LFE1-.LFB1 | |
21699 | .byte 0x4 | |
21700 | .4byte .LFE1-.LFB1 | |
21701 | .byte 0x4 | |
21702 | .4byte .L1-.LFB1 | |
8ada417f | 21703 | .LEFDE1:' > conftest.s |
e0b0fd74 | 21704 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21705 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21706 | (eval $ac_try) 2>&5 |
21707 | ac_status=$? | |
5213506e RW |
21708 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21709 | test $ac_status = 0; }; } | |
8ada417f ZW |
21710 | then |
21711 | cat > conftest.lit <<EOF | |
c64688ae RH |
21712 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
21713 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 21714 | 0020 08000000 04080000 0044 .........D |
01efb963 | 21715 | EOF |
ba479fd2 | 21716 | cat > conftest.big <<EOF |
01efb963 AS |
21717 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
21718 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 21719 | 0020 00000008 04000000 0844 .........D |
c64688ae | 21720 | EOF |
8ada417f ZW |
21721 | # If the assembler didn't choke, and we can objdump, |
21722 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
21723 | # The text in the here-document typically retains its unix-style line |
21724 | # endings, while the output of objdump will use host line endings. | |
21725 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
21726 | if test x$gcc_cv_objdump != x \ |
21727 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
21728 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
21729 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
21730 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
21731 | then |
21732 | gcc_cv_as_eh_frame=yes | |
ba479fd2 | 21733 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
5213506e | 21734 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21735 | (eval $ac_try) 2>&5 |
21736 | ac_status=$? | |
5213506e RW |
21737 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21738 | test $ac_status = 0; }; }; then | |
8ada417f ZW |
21739 | gcc_cv_as_eh_frame=buggy |
21740 | else | |
21741 | # Uh oh, what do we do now? | |
21742 | gcc_cv_as_eh_frame=no | |
21743 | fi | |
21744 | else | |
21745 | echo "configure: failed program was" >&5 | |
21746 | cat conftest.s >&5 | |
21747 | fi | |
21748 | rm -f conftest.o conftest.s | |
21749 | fi | |
c64688ae | 21750 | fi |
5213506e RW |
21751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5 |
21752 | $as_echo "$gcc_cv_as_eh_frame" >&6; } | |
ad9c4d9f | 21753 | |
6e3f3080 | 21754 | |
63cf211a | 21755 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 | 21756 | |
5213506e | 21757 | $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h |
ad9c4d9f NN |
21758 | |
21759 | fi | |
21760 | ||
5213506e RW |
21761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 |
21762 | $as_echo_n "checking assembler for section merging support... " >&6; } | |
21763 | if test "${gcc_cv_as_shf_merge+set}" = set; then : | |
21764 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21765 | else |
21766 | gcc_cv_as_shf_merge=no | |
21767 | if test $in_tree_gas = yes; then | |
21768 | if test $in_tree_gas_is_elf = yes \ | |
21769 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21770 | then gcc_cv_as_shf_merge=yes | |
21771 | fi | |
21772 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21773 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
e0b0fd74 | 21774 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21775 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21776 | (eval $ac_try) 2>&5 |
21777 | ac_status=$? | |
5213506e RW |
21778 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21779 | test $ac_status = 0; }; } | |
8ada417f ZW |
21780 | then |
21781 | gcc_cv_as_shf_merge=yes | |
21782 | else | |
21783 | echo "configure: failed program was" >&5 | |
21784 | cat conftest.s >&5 | |
21785 | fi | |
21786 | rm -f conftest.o conftest.s | |
21787 | fi | |
201556f0 | 21788 | fi |
5213506e RW |
21789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 |
21790 | $as_echo "$gcc_cv_as_shf_merge" >&6; } | |
8ada417f | 21791 | |
c18a5b6c | 21792 | if test $gcc_cv_as_shf_merge = no; then |
5213506e RW |
21793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 |
21794 | $as_echo_n "checking assembler for section merging support... " >&6; } | |
21795 | if test "${gcc_cv_as_shf_merge+set}" = set; then : | |
21796 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21797 | else |
21798 | gcc_cv_as_shf_merge=no | |
21799 | if test $in_tree_gas = yes; then | |
21800 | if test $in_tree_gas_is_elf = yes \ | |
21801 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21802 | then gcc_cv_as_shf_merge=yes | |
21803 | fi | |
21804 | elif test x$gcc_cv_as != x; then | |
21805 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
e0b0fd74 | 21806 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21807 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21808 | (eval $ac_try) 2>&5 |
21809 | ac_status=$? | |
5213506e RW |
21810 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21811 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21812 | then |
21813 | gcc_cv_as_shf_merge=yes | |
21814 | else | |
21815 | echo "configure: failed program was" >&5 | |
21816 | cat conftest.s >&5 | |
21817 | fi | |
21818 | rm -f conftest.o conftest.s | |
21819 | fi | |
21820 | fi | |
5213506e RW |
21821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 |
21822 | $as_echo "$gcc_cv_as_shf_merge" >&6; } | |
c18a5b6c MM |
21823 | |
21824 | fi | |
8ad9fb33 | 21825 | |
ba479fd2 | 21826 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 21827 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 21828 | _ACEOF |
201556f0 | 21829 | |
201556f0 | 21830 | |
5213506e RW |
21831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5 |
21832 | $as_echo_n "checking assembler for COMDAT group support... " >&6; } | |
21833 | if test "${gcc_cv_as_comdat_group+set}" = set; then : | |
21834 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21835 | else |
21836 | gcc_cv_as_comdat_group=no | |
21837 | if test $in_tree_gas = yes; then | |
21838 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 21839 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
21840 | then gcc_cv_as_comdat_group=yes |
21841 | fi | |
21842 | elif test x$gcc_cv_as != x; then | |
21843 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
e0b0fd74 | 21844 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21845 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21846 | (eval $ac_try) 2>&5 |
21847 | ac_status=$? | |
5213506e RW |
21848 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21849 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21850 | then |
21851 | gcc_cv_as_comdat_group=yes | |
21852 | else | |
21853 | echo "configure: failed program was" >&5 | |
21854 | cat conftest.s >&5 | |
21855 | fi | |
21856 | rm -f conftest.o conftest.s | |
21857 | fi | |
21858 | fi | |
5213506e RW |
21859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5 |
21860 | $as_echo "$gcc_cv_as_comdat_group" >&6; } | |
c18a5b6c MM |
21861 | |
21862 | if test $gcc_cv_as_comdat_group = yes; then | |
21863 | gcc_cv_as_comdat_group_percent=no | |
21864 | else | |
5213506e RW |
21865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5 |
21866 | $as_echo_n "checking assembler for COMDAT group support... " >&6; } | |
21867 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then : | |
21868 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21869 | else |
21870 | gcc_cv_as_comdat_group_percent=no | |
21871 | if test $in_tree_gas = yes; then | |
21872 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 21873 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
21874 | then gcc_cv_as_comdat_group_percent=yes |
21875 | fi | |
21876 | elif test x$gcc_cv_as != x; then | |
21877 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
e0b0fd74 | 21878 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21879 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21880 | (eval $ac_try) 2>&5 |
21881 | ac_status=$? | |
5213506e RW |
21882 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21883 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21884 | then |
21885 | gcc_cv_as_comdat_group_percent=yes | |
21886 | else | |
21887 | echo "configure: failed program was" >&5 | |
21888 | cat conftest.s >&5 | |
21889 | fi | |
21890 | rm -f conftest.o conftest.s | |
21891 | fi | |
21892 | fi | |
5213506e RW |
21893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5 |
21894 | $as_echo "$gcc_cv_as_comdat_group_percent" >&6; } | |
c18a5b6c MM |
21895 | |
21896 | fi | |
1dcc82c2 DK |
21897 | if test x"$ld_is_gold" = xyes; then |
21898 | comdat_group=yes | |
21899 | elif test $in_tree_ld = yes ; then | |
39ba7b7d JB |
21900 | comdat_group=no |
21901 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21902 | && test $in_tree_ld_is_elf = yes; then | |
21903 | comdat_group=yes | |
21904 | fi | |
55c4f715 | 21905 | elif echo "$ld_ver" | grep GNU > /dev/null; then |
11176d2a JB |
21906 | comdat_group=yes |
21907 | if test 0"$ld_date" -lt 20050308; then | |
21908 | if test -n "$ld_date"; then | |
21909 | # If there was date string, but was earlier than 2005-03-08, fail | |
21910 | comdat_group=no | |
21911 | elif test "$ld_vers_major" -lt 2; then | |
21912 | comdat_group=no | |
21913 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
21914 | comdat_group=no | |
21915 | fi | |
21916 | fi | |
1cf0118d | 21917 | else |
55c4f715 RO |
21918 | case "${target}" in |
21919 | *-*-solaris2.1[1-9]*) | |
21920 | # Sun ld has COMDAT group support since Solaris 9, but it doesn't | |
21921 | # interoperate with GNU as until Solaris 11 build 130, i.e. ld | |
21922 | # version 1.688. | |
21923 | # | |
21924 | # FIXME: Maybe need to refine later when COMDAT group support with | |
21925 | # Sun as is implemented. | |
21926 | if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 1688; then | |
21927 | comdat_group=yes | |
21928 | else | |
21929 | comdat_group=no | |
21930 | fi | |
21931 | ;; | |
21932 | *) | |
21933 | # Assume linkers other than GNU ld don't support COMDAT group. | |
21934 | comdat_group=no | |
21935 | ;; | |
21936 | esac | |
21937 | fi | |
21938 | # Allow overriding the automatic COMDAT group tests above. | |
21939 | # Check whether --enable-comdat was given. | |
21940 | if test "${enable_comdat+set}" = set; then : | |
21941 | enableval=$enable_comdat; comdat_group="$enable_comdat" | |
1cf0118d | 21942 | fi |
55c4f715 | 21943 | |
1cf0118d RO |
21944 | if test $comdat_group = no; then |
21945 | gcc_cv_as_comdat_group=no | |
21946 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 21947 | fi |
c18a5b6c MM |
21948 | |
21949 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 21950 | #define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi` |
c18a5b6c MM |
21951 | _ACEOF |
21952 | ||
21953 | ||
5213506e RW |
21954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5 |
21955 | $as_echo_n "checking assembler for line table discriminator support... " >&6; } | |
21956 | if test "${gcc_cv_as_discriminator+set}" = set; then : | |
21957 | $as_echo_n "(cached) " >&6 | |
6c52e687 CC |
21958 | else |
21959 | gcc_cv_as_discriminator=no | |
21960 | if test $in_tree_gas = yes; then | |
21961 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51` | |
21962 | then gcc_cv_as_discriminator=yes | |
21963 | fi | |
21964 | elif test x$gcc_cv_as != x; then | |
21965 | echo ' .text | |
21966 | .file 1 "conf.c" | |
21967 | .loc 1 1 0 discriminator 1' > conftest.s | |
e0b0fd74 | 21968 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21969 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
6c52e687 CC |
21970 | (eval $ac_try) 2>&5 |
21971 | ac_status=$? | |
5213506e RW |
21972 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21973 | test $ac_status = 0; }; } | |
6c52e687 CC |
21974 | then |
21975 | gcc_cv_as_discriminator=yes | |
21976 | else | |
21977 | echo "configure: failed program was" >&5 | |
21978 | cat conftest.s >&5 | |
21979 | fi | |
21980 | rm -f conftest.o conftest.s | |
21981 | fi | |
21982 | fi | |
5213506e RW |
21983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5 |
21984 | $as_echo "$gcc_cv_as_discriminator" >&6; } | |
6c52e687 CC |
21985 | if test $gcc_cv_as_discriminator = yes; then |
21986 | ||
5213506e | 21987 | $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h |
6c52e687 CC |
21988 | |
21989 | fi | |
21990 | ||
6a7a462c | 21991 | # Thread-local storage - the check is heavily parameterized. |
f996902d RH |
21992 | conftest_s= |
21993 | tls_first_major= | |
21994 | tls_first_minor= | |
9739c90c | 21995 | tls_as_opt= |
f996902d | 21996 | case "$target" in |
6f9b006d RH |
21997 | alpha*-*-*) |
21998 | conftest_s=' | |
21999 | .section ".tdata","awT",@progbits | |
22000 | foo: .long 25 | |
22001 | .text | |
22002 | ldq $27,__tls_get_addr($29) !literal!1 | |
22003 | lda $16,foo($29) !tlsgd!1 | |
22004 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
22005 | ldq $27,__tls_get_addr($29) !literal!2 | |
22006 | lda $16,foo($29) !tlsldm!2 | |
22007 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
22008 | ldq $1,foo($29) !gotdtprel | |
22009 | ldah $2,foo($29) !dtprelhi | |
22010 | lda $3,foo($2) !dtprello | |
22011 | lda $4,foo($29) !dtprel | |
22012 | ldq $1,foo($29) !gottprel | |
22013 | ldah $2,foo($29) !tprelhi | |
22014 | lda $3,foo($2) !tprello | |
22015 | lda $4,foo($29) !tprel' | |
22016 | tls_first_major=2 | |
22017 | tls_first_minor=13 | |
2f3321ca | 22018 | tls_as_opt=--fatal-warnings |
6f9b006d | 22019 | ;; |
ad9646c7 HPN |
22020 | cris-*-*|crisv32-*-*) |
22021 | conftest_s=' | |
22022 | .section ".tdata","awT",@progbits | |
22023 | x: .long 25 | |
22024 | .text | |
22025 | move.d x:IE,$r10 | |
22026 | nop' | |
22027 | tls_first_major=2 | |
22028 | tls_first_minor=20 | |
22029 | tls_as_opt=--fatal-warnings | |
22030 | ;; | |
e4dd71de AH |
22031 | frv*-*-*) |
22032 | conftest_s=' | |
22033 | .section ".tdata","awT",@progbits | |
22034 | x: .long 25 | |
22035 | .text | |
22036 | call #gettlsoff(x)' | |
22037 | tls_first_major=2 | |
22038 | tls_first_minor=14 | |
22039 | ;; | |
51076f96 RC |
22040 | hppa*-*-linux*) |
22041 | conftest_s=' | |
22042 | t1: .reg %r20 | |
22043 | t2: .reg %r21 | |
22044 | gp: .reg %r19 | |
22045 | .section ".tdata","awT",@progbits | |
22046 | foo: .long 25 | |
22047 | .text | |
22048 | .align 4 | |
22049 | addil LT%foo-$tls_gdidx$,gp | |
22050 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
22051 | b __tls_get_addr | |
22052 | nop | |
22053 | addil LT%foo-$tls_ldidx$,gp | |
22054 | b __tls_get_addr | |
22055 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
22056 | addil LR%foo-$tls_dtpoff$,%ret0 | |
22057 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
22058 | mfctl %cr27,%t1 | |
22059 | addil LT%foo-$tls_ieoff$,gp | |
22060 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
22061 | add %t1,%t2,%t3 | |
22062 | mfctl %cr27,%t1 | |
22063 | addil LR%foo-$tls_leoff$,%t1 | |
22064 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
22065 | tls_first_major=2 | |
22066 | tls_first_minor=15 | |
22067 | tls_as_opt=--fatal-warnings | |
22068 | ;; | |
d3585b76 DJ |
22069 | arm*-*-*) |
22070 | conftest_s=' | |
22071 | .section ".tdata","awT",%progbits | |
22072 | foo: .long 25 | |
22073 | .text | |
22074 | .word foo(gottpoff) | |
22075 | .word foo(tpoff) | |
22076 | .word foo(tlsgd) | |
22077 | .word foo(tlsldm) | |
22078 | .word foo(tlsldo)' | |
22079 | tls_first_major=2 | |
22080 | tls_first_minor=17 | |
22081 | ;; | |
f996902d | 22082 | i[34567]86-*-*) |
f1c26cad | 22083 | case "$target" in |
bafaef55 | 22084 | i[34567]86-*-solaris2.[89]*) |
f1c26cad RO |
22085 | # TLS was introduced in the Solaris 9 4/04 release but |
22086 | # we do not enable it by default on Solaris 9 either. | |
22087 | if test "x$enable_tls" = xyes ; then | |
22088 | on_solaris=yes | |
22089 | else | |
22090 | enable_tls=no; | |
22091 | fi | |
22092 | ;; | |
22093 | i[34567]86-*-solaris2.*) | |
22094 | on_solaris=yes | |
22095 | ;; | |
22096 | *) | |
22097 | on_solaris=no | |
22098 | ;; | |
22099 | esac | |
22100 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
22101 | conftest_s=' | |
22102 | .section .tdata,"awt",@progbits' | |
22103 | tls_first_major=0 | |
22104 | tls_first_minor=0 | |
22105 | ||
22106 | $as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h | |
22107 | ||
22108 | else | |
22109 | conftest_s=' | |
22110 | .section ".tdata","awT",@progbits' | |
22111 | tls_first_major=2 | |
22112 | tls_first_minor=14 | |
22113 | tls_as_opt="--fatal-warnings" | |
22114 | fi | |
22115 | conftest_s="$conftest_s | |
f996902d RH |
22116 | foo: .long 25 |
22117 | .text | |
22118 | movl %gs:0, %eax | |
f1c26cad RO |
22119 | leal foo@tlsgd(,%ebx,1), %eax |
22120 | leal foo@tlsldm(%ebx), %eax | |
22121 | leal foo@dtpoff(%eax), %edx | |
22122 | movl foo@gottpoff(%ebx), %eax | |
22123 | subl foo@gottpoff(%ebx), %eax | |
22124 | addl foo@gotntpoff(%ebx), %eax | |
22125 | movl foo@indntpoff, %eax | |
22126 | movl \$foo@tpoff, %eax | |
22127 | subl \$foo@tpoff, %eax | |
22128 | leal foo@ntpoff(%ecx), %eax" | |
22129 | ;; | |
75d38379 JJ |
22130 | x86_64-*-*) |
22131 | conftest_s=' | |
22132 | .section ".tdata","awT",@progbits | |
22133 | foo: .long 25 | |
22134 | .text | |
22135 | movq %fs:0, %rax | |
22136 | leaq foo@TLSGD(%rip), %rdi | |
22137 | leaq foo@TLSLD(%rip), %rdi | |
22138 | leaq foo@DTPOFF(%rax), %rdx | |
22139 | movq foo@GOTTPOFF(%rip), %rax | |
22140 | movq $foo@TPOFF, %rax' | |
22141 | tls_first_major=2 | |
22142 | tls_first_minor=14 | |
2f3321ca | 22143 | tls_as_opt=--fatal-warnings |
f996902d | 22144 | ;; |
7b6e506e RH |
22145 | ia64-*-*) |
22146 | conftest_s=' | |
22147 | .section ".tdata","awT",@progbits | |
22148 | foo: data8 25 | |
22149 | .text | |
22150 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
22151 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
22152 | addl r18 = @ltoff(@tprel(foo#)), gp | |
22153 | addl r19 = @dtprel(foo#), gp | |
22154 | adds r21 = @dtprel(foo#), r13 | |
22155 | movl r23 = @dtprel(foo#) | |
22156 | addl r20 = @tprel(foo#), gp | |
22157 | adds r22 = @tprel(foo#), r13 | |
22158 | movl r24 = @tprel(foo#)' | |
22159 | tls_first_major=2 | |
22160 | tls_first_minor=13 | |
2f3321ca | 22161 | tls_as_opt=--fatal-warnings |
7b6e506e | 22162 | ;; |
69229b81 DJ |
22163 | mips*-*-*) |
22164 | conftest_s=' | |
22165 | .section .tdata,"awT",@progbits | |
22166 | x: | |
22167 | .word 2 | |
22168 | .text | |
22169 | addiu $4, $28, %tlsgd(x) | |
22170 | addiu $4, $28, %tlsldm(x) | |
22171 | lui $4, %dtprel_hi(x) | |
22172 | addiu $4, $4, %dtprel_lo(x) | |
22173 | lw $4, %gottprel(x)($28) | |
22174 | lui $4, %tprel_hi(x) | |
22175 | addiu $4, $4, %tprel_lo(x)' | |
22176 | tls_first_major=2 | |
22177 | tls_first_minor=16 | |
22178 | tls_as_opt='-32 --fatal-warnings' | |
22179 | ;; | |
75df395f MK |
22180 | m68k-*-*) |
22181 | conftest_s=' | |
22182 | .section .tdata,"awT",@progbits | |
22183 | x: | |
22184 | .word 2 | |
22185 | .text | |
22186 | foo: | |
22187 | move.l x@TLSGD(%a5),%a0 | |
22188 | move.l x@TLSLDM(%a5),%a0 | |
22189 | move.l x@TLSLDO(%a5),%a0 | |
22190 | move.l x@TLSIE(%a5),%a0 | |
22191 | move.l x@TLSLE(%a5),%a0' | |
22192 | tls_first_major=2 | |
22193 | tls_first_minor=19 | |
22194 | tls_as_opt='--fatal-warnings' | |
22195 | ;; | |
c4501e62 JJ |
22196 | powerpc-*-*) |
22197 | conftest_s=' | |
22198 | .section ".tdata","awT",@progbits | |
22199 | .align 2 | |
22200 | ld0: .space 4 | |
22201 | ld1: .space 4 | |
22202 | x1: .space 4 | |
22203 | x2: .space 4 | |
22204 | x3: .space 4 | |
22205 | .text | |
22206 | addi 3,31,ld0@got@tlsgd | |
22207 | bl __tls_get_addr | |
22208 | addi 3,31,x1@got@tlsld | |
22209 | bl __tls_get_addr | |
22210 | addi 9,3,x1@dtprel | |
22211 | addis 9,3,x2@dtprel@ha | |
22212 | addi 9,9,x2@dtprel@l | |
22213 | lwz 9,x3@got@tprel(31) | |
22214 | add 9,9,x@tls | |
22215 | addi 9,2,x1@tprel | |
22216 | addis 9,2,x2@tprel@ha | |
22217 | addi 9,9,x2@tprel@l' | |
22218 | tls_first_major=2 | |
22219 | tls_first_minor=14 | |
2f3321ca | 22220 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
22221 | ;; |
22222 | powerpc64-*-*) | |
22223 | conftest_s=' | |
22224 | .section ".tdata","awT",@progbits | |
22225 | .align 3 | |
22226 | ld0: .space 8 | |
22227 | ld1: .space 8 | |
22228 | x1: .space 8 | |
22229 | x2: .space 8 | |
22230 | x3: .space 8 | |
22231 | .text | |
22232 | addi 3,2,ld0@got@tlsgd | |
22233 | bl .__tls_get_addr | |
22234 | nop | |
22235 | addi 3,2,ld1@toc | |
22236 | bl .__tls_get_addr | |
22237 | nop | |
22238 | addi 3,2,x1@got@tlsld | |
22239 | bl .__tls_get_addr | |
22240 | nop | |
22241 | addi 9,3,x1@dtprel | |
22242 | bl .__tls_get_addr | |
22243 | nop | |
22244 | addis 9,3,x2@dtprel@ha | |
22245 | addi 9,9,x2@dtprel@l | |
22246 | bl .__tls_get_addr | |
22247 | nop | |
22248 | ld 9,x3@got@dtprel(2) | |
22249 | add 9,9,3 | |
22250 | bl .__tls_get_addr | |
22251 | nop' | |
22252 | tls_first_major=2 | |
22253 | tls_first_minor=14 | |
2f3321ca | 22254 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 22255 | ;; |
fd3cd001 UW |
22256 | s390-*-*) |
22257 | conftest_s=' | |
22258 | .section ".tdata","awT",@progbits | |
22259 | foo: .long 25 | |
22260 | .text | |
22261 | .long foo@TLSGD | |
22262 | .long foo@TLSLDM | |
22263 | .long foo@DTPOFF | |
22264 | .long foo@NTPOFF | |
22265 | .long foo@GOTNTPOFF | |
22266 | .long foo@INDNTPOFF | |
22267 | l %r1,foo@GOTNTPOFF(%r12) | |
22268 | l %r1,0(%r1):tls_load:foo | |
22269 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
22270 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
22271 | tls_first_major=2 | |
22272 | tls_first_minor=14 | |
2f3321ca | 22273 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
22274 | ;; |
22275 | s390x-*-*) | |
22276 | conftest_s=' | |
22277 | .section ".tdata","awT",@progbits | |
22278 | foo: .long 25 | |
22279 | .text | |
22280 | .quad foo@TLSGD | |
22281 | .quad foo@TLSLDM | |
22282 | .quad foo@DTPOFF | |
22283 | .quad foo@NTPOFF | |
22284 | .quad foo@GOTNTPOFF | |
22285 | lg %r1,foo@GOTNTPOFF(%r12) | |
22286 | larl %r1,foo@INDNTPOFF | |
22287 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
22288 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
22289 | tls_first_major=2 | |
22290 | tls_first_minor=14 | |
2f3321ca | 22291 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 22292 | ;; |
9ff13962 KK |
22293 | sh-*-* | sh[34]-*-*) |
22294 | conftest_s=' | |
22295 | .section ".tdata","awT",@progbits | |
22296 | foo: .long 25 | |
22297 | .text | |
22298 | .long foo@TLSGD | |
22299 | .long foo@TLSLDM | |
22300 | .long foo@DTPOFF | |
22301 | .long foo@GOTTPOFF | |
22302 | .long foo@TPOFF' | |
22303 | tls_first_major=2 | |
22304 | tls_first_minor=13 | |
2f3321ca | 22305 | tls_as_opt=--fatal-warnings |
9ff13962 | 22306 | ;; |
5751a10b | 22307 | sparc*-*-*) |
2f3321ca | 22308 | case "$target" in |
bafaef55 | 22309 | sparc*-sun-solaris2.[89]*) |
7935dc1b EB |
22310 | # TLS was introduced in the Solaris 9 4/04 release but |
22311 | # we do not enable it by default on Solaris 9 either. | |
22312 | if test "x$enable_tls" = xyes ; then | |
22313 | on_solaris=yes | |
22314 | else | |
22315 | enable_tls=no; | |
22316 | fi | |
22317 | ;; | |
2f3321ca EB |
22318 | sparc*-sun-solaris2.*) |
22319 | on_solaris=yes | |
22320 | ;; | |
22321 | *) | |
22322 | on_solaris=no | |
22323 | ;; | |
22324 | esac | |
22325 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
22326 | conftest_s=' | |
22327 | .section ".tdata",#alloc,#write,#tls | |
22328 | foo: .long 25 | |
22329 | .text | |
22330 | sethi %tgd_hi22(foo), %o0 | |
22331 | add %o0, %tgd_lo10(foo), %o1 | |
22332 | add %l7, %o1, %o0, %tgd_add(foo) | |
22333 | call __tls_get_addr, %tgd_call(foo) | |
22334 | sethi %tldm_hi22(foo), %l1 | |
22335 | add %l1, %tldm_lo10(foo), %l2 | |
22336 | add %l7, %l2, %o0, %tldm_add(foo) | |
22337 | call __tls_get_addr, %tldm_call(foo) | |
22338 | sethi %tldo_hix22(foo), %l3 | |
22339 | xor %l3, %tldo_lox10(foo), %l4 | |
22340 | add %o0, %l4, %l5, %tldo_add(foo) | |
22341 | sethi %tie_hi22(foo), %o3 | |
22342 | add %o3, %tie_lo10(foo), %o3 | |
22343 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
22344 | add %g7, %o2, %o4, %tie_add(foo) | |
22345 | sethi %tle_hix22(foo), %l1 | |
22346 | xor %l1, %tle_lox10(foo), %o5 | |
22347 | ld [%g7 + %o5], %o1' | |
22348 | tls_first_major=0 | |
22349 | tls_first_minor=0 | |
22350 | else | |
22351 | conftest_s=' | |
5751a10b JJ |
22352 | .section ".tdata","awT",@progbits |
22353 | foo: .long 25 | |
22354 | .text | |
22355 | sethi %tgd_hi22(foo), %o0 | |
22356 | add %o0, %tgd_lo10(foo), %o1 | |
22357 | add %l7, %o1, %o0, %tgd_add(foo) | |
22358 | call __tls_get_addr, %tgd_call(foo) | |
22359 | sethi %tldm_hi22(foo), %l1 | |
22360 | add %l1, %tldm_lo10(foo), %l2 | |
22361 | add %l7, %l2, %o0, %tldm_add(foo) | |
22362 | call __tls_get_addr, %tldm_call(foo) | |
22363 | sethi %tldo_hix22(foo), %l3 | |
22364 | xor %l3, %tldo_lox10(foo), %l4 | |
22365 | add %o0, %l4, %l5, %tldo_add(foo) | |
22366 | sethi %tie_hi22(foo), %o3 | |
22367 | add %o3, %tie_lo10(foo), %o3 | |
22368 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
22369 | add %g7, %o2, %o4, %tie_add(foo) | |
22370 | sethi %tle_hix22(foo), %l1 | |
22371 | xor %l1, %tle_lox10(foo), %o5 | |
22372 | ld [%g7 + %o5], %o1' | |
22373 | tls_first_major=2 | |
22374 | tls_first_minor=14 | |
2f3321ca EB |
22375 | tls_as_opt="-32 --fatal-warnings" |
22376 | fi | |
5751a10b | 22377 | ;; |
6a7a462c BW |
22378 | xtensa*-*-*) |
22379 | conftest_s=' | |
22380 | .section ".tdata","awT",@progbits | |
22381 | foo: .long 25 | |
22382 | .text | |
22383 | movi a8, foo@TLSFUNC | |
22384 | movi a10, foo@TLSARG | |
22385 | callx8.tls a8, foo@TLSCALL' | |
22386 | tls_first_major=2 | |
22387 | tls_first_minor=19 | |
22388 | ;; | |
f996902d | 22389 | esac |
8dea1cca DD |
22390 | set_have_as_tls=no |
22391 | if test "x$enable_tls" = xno ; then | |
22392 | : # TLS explicitly disabled. | |
22393 | elif test "x$enable_tls" = xyes ; then | |
22394 | set_have_as_tls=yes # TLS explicitly enabled. | |
22395 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
22396 | : # If we don't have a check, assume no support. |
22397 | else | |
5213506e RW |
22398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5 |
22399 | $as_echo_n "checking assembler for thread-local storage support... " >&6; } | |
22400 | if test "${gcc_cv_as_tls+set}" = set; then : | |
22401 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
22402 | else |
22403 | gcc_cv_as_tls=no | |
22404 | if test $in_tree_gas = yes; then | |
22405 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
22406 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 22407 | fi |
8ada417f | 22408 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 22409 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 22410 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5' |
5213506e | 22411 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22412 | (eval $ac_try) 2>&5 |
22413 | ac_status=$? | |
5213506e RW |
22414 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22415 | test $ac_status = 0; }; } | |
8ada417f ZW |
22416 | then |
22417 | gcc_cv_as_tls=yes | |
22418 | else | |
22419 | echo "configure: failed program was" >&5 | |
22420 | cat conftest.s >&5 | |
22421 | fi | |
22422 | rm -f conftest.o conftest.s | |
f996902d | 22423 | fi |
f996902d | 22424 | fi |
5213506e RW |
22425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5 |
22426 | $as_echo "$gcc_cv_as_tls" >&6; } | |
63cf211a | 22427 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
22428 | set_have_as_tls=yes |
22429 | fi | |
22430 | fi | |
22431 | if test $set_have_as_tls = yes ; then | |
ba479fd2 | 22432 | |
5213506e | 22433 | $as_echo "#define HAVE_AS_TLS 1" >>confdefs.h |
f996902d | 22434 | |
8ada417f ZW |
22435 | fi |
22436 | ||
22437 | # Target-specific assembler checks. | |
f996902d | 22438 | |
5213506e RW |
22439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5 |
22440 | $as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; } | |
7e9d8517 L |
22441 | gcc_cv_ld_static_dynamic=no |
22442 | if test $in_tree_ld = yes ; then | |
83f0ccb8 | 22443 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2; then |
7e9d8517 L |
22444 | gcc_cv_ld_static_dynamic=yes |
22445 | fi | |
22446 | elif test x$gcc_cv_ld != x; then | |
22447 | # Check if linker supports -Bstatic/-Bdynamic option | |
22448 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
22449 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
22450 | gcc_cv_ld_static_dynamic=yes | |
22451 | fi | |
22452 | fi | |
22453 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
22454 | ||
5213506e | 22455 | $as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h |
7e9d8517 L |
22456 | |
22457 | fi | |
5213506e RW |
22458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5 |
22459 | $as_echo "$gcc_cv_ld_static_dynamic" >&6; } | |
7e9d8517 | 22460 | |
d594623a | 22461 | if test x"$demangler_in_ld" = xyes; then |
5213506e RW |
22462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5 |
22463 | $as_echo_n "checking linker --demangle support... " >&6; } | |
d594623a L |
22464 | gcc_cv_ld_demangle=no |
22465 | if test $in_tree_ld = yes; then | |
22466 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ | |
22467 | gcc_cv_ld_demangle=yes | |
22468 | fi | |
22469 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
22470 | # Check if the GNU linker supports --demangle option | |
22471 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
22472 | gcc_cv_ld_demangle=yes | |
22473 | fi | |
22474 | fi | |
22475 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
22476 | ||
5213506e | 22477 | $as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h |
d594623a L |
22478 | |
22479 | fi | |
5213506e RW |
22480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5 |
22481 | $as_echo "$gcc_cv_ld_demangle" >&6; } | |
d594623a L |
22482 | fi |
22483 | ||
3a37b08e RH |
22484 | case "$target" in |
22485 | # All TARGET_ABI_OSF targets. | |
22486 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
5213506e RW |
22487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5 |
22488 | $as_echo_n "checking assembler for explicit relocation support... " >&6; } | |
22489 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then : | |
22490 | $as_echo_n "(cached) " >&6 | |
3a37b08e | 22491 | else |
8ada417f ZW |
22492 | gcc_cv_as_alpha_explicit_relocs=no |
22493 | if test $in_tree_gas = yes; then | |
22494 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
22495 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 22496 | fi |
8ada417f | 22497 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 22498 | echo ' .set nomacro |
3a37b08e RH |
22499 | .text |
22500 | extbl $3, $2, $3 !lituse_bytoff!1 | |
22501 | ldq $2, a($29) !literal!1 | |
22502 | ldq $4, b($29) !literal!2 | |
22503 | ldq_u $3, 0($2) !lituse_base!1 | |
22504 | ldq $27, f($29) !literal!5 | |
22505 | jsr $26, ($27), f !lituse_jsr!5 | |
22506 | ldah $29, 0($26) !gpdisp!3 | |
22507 | lda $0, c($29) !gprel | |
22508 | ldah $1, d($29) !gprelhigh | |
22509 | lda $1, d($1) !gprellow | |
8ada417f | 22510 | lda $29, 0($29) !gpdisp!3' > conftest.s |
e0b0fd74 | 22511 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22512 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22513 | (eval $ac_try) 2>&5 |
22514 | ac_status=$? | |
5213506e RW |
22515 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22516 | test $ac_status = 0; }; } | |
8ada417f ZW |
22517 | then |
22518 | gcc_cv_as_alpha_explicit_relocs=yes | |
22519 | else | |
22520 | echo "configure: failed program was" >&5 | |
22521 | cat conftest.s >&5 | |
22522 | fi | |
22523 | rm -f conftest.o conftest.s | |
22524 | fi | |
cafe096b | 22525 | fi |
5213506e RW |
22526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
22527 | $as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; } | |
63cf211a | 22528 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 | 22529 | |
5213506e | 22530 | $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h |
3a37b08e | 22531 | |
d006f5eb | 22532 | fi |
5213506e RW |
22533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5 |
22534 | $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; } | |
22535 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then : | |
22536 | $as_echo_n "(cached) " >&6 | |
d006f5eb RH |
22537 | else |
22538 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
22539 | if test $in_tree_gas = yes; then | |
22540 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
22541 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
22542 | fi | |
22543 | elif test x$gcc_cv_as != x; then | |
22544 | echo ' .set nomacro | |
22545 | .text | |
22546 | ldq $27, a($29) !literal!1 | |
22547 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
e0b0fd74 | 22548 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22549 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d006f5eb RH |
22550 | (eval $ac_try) 2>&5 |
22551 | ac_status=$? | |
5213506e RW |
22552 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22553 | test $ac_status = 0; }; } | |
d006f5eb RH |
22554 | then |
22555 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
22556 | else | |
22557 | echo "configure: failed program was" >&5 | |
22558 | cat conftest.s >&5 | |
22559 | fi | |
22560 | rm -f conftest.o conftest.s | |
22561 | fi | |
22562 | fi | |
5213506e RW |
22563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 |
22564 | $as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; } | |
d006f5eb RH |
22565 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then |
22566 | ||
5213506e | 22567 | $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h |
d006f5eb | 22568 | |
86da66b5 HPN |
22569 | fi |
22570 | ;; | |
22571 | ||
22572 | cris-*-*) | |
5213506e RW |
22573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5 |
22574 | $as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; } | |
22575 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then : | |
22576 | $as_echo_n "(cached) " >&6 | |
86da66b5 HPN |
22577 | else |
22578 | gcc_cv_as_cris_no_mul_bug=no | |
22579 | if test $in_tree_gas = yes; then | |
22580 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
22581 | then gcc_cv_as_cris_no_mul_bug=yes | |
22582 | fi | |
22583 | elif test x$gcc_cv_as != x; then | |
22584 | echo '.text' > conftest.s | |
e0b0fd74 | 22585 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5' |
5213506e | 22586 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
86da66b5 HPN |
22587 | (eval $ac_try) 2>&5 |
22588 | ac_status=$? | |
5213506e RW |
22589 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22590 | test $ac_status = 0; }; } | |
86da66b5 HPN |
22591 | then |
22592 | gcc_cv_as_cris_no_mul_bug=yes | |
22593 | else | |
22594 | echo "configure: failed program was" >&5 | |
22595 | cat conftest.s >&5 | |
22596 | fi | |
22597 | rm -f conftest.o conftest.s | |
22598 | fi | |
22599 | fi | |
5213506e RW |
22600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5 |
22601 | $as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; } | |
86da66b5 HPN |
22602 | if test $gcc_cv_as_cris_no_mul_bug = yes; then |
22603 | ||
5213506e | 22604 | $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h |
86da66b5 | 22605 | |
8ada417f | 22606 | fi |
3a37b08e | 22607 | ;; |
8ada417f | 22608 | |
1cb36a98 | 22609 | sparc*-*-*) |
5213506e RW |
22610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5 |
22611 | $as_echo_n "checking assembler for .register... " >&6; } | |
22612 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then : | |
22613 | $as_echo_n "(cached) " >&6 | |
5b68c389 | 22614 | else |
8ada417f ZW |
22615 | gcc_cv_as_sparc_register_op=no |
22616 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22617 | echo '.register %g2, #scratch' > conftest.s |
e0b0fd74 | 22618 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22619 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22620 | (eval $ac_try) 2>&5 |
22621 | ac_status=$? | |
5213506e RW |
22622 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22623 | test $ac_status = 0; }; } | |
8ada417f ZW |
22624 | then |
22625 | gcc_cv_as_sparc_register_op=yes | |
22626 | else | |
22627 | echo "configure: failed program was" >&5 | |
22628 | cat conftest.s >&5 | |
22629 | fi | |
22630 | rm -f conftest.o conftest.s | |
22631 | fi | |
cafe096b | 22632 | fi |
5213506e RW |
22633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5 |
22634 | $as_echo "$gcc_cv_as_sparc_register_op" >&6; } | |
63cf211a | 22635 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 | 22636 | |
5213506e | 22637 | $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h |
1cb36a98 | 22638 | |
8ada417f | 22639 | fi |
1cb36a98 | 22640 | |
5213506e RW |
22641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5 |
22642 | $as_echo_n "checking assembler for -relax option... " >&6; } | |
22643 | if test "${gcc_cv_as_sparc_relax+set}" = set; then : | |
22644 | $as_echo_n "(cached) " >&6 | |
e95b1e6a | 22645 | else |
8ada417f ZW |
22646 | gcc_cv_as_sparc_relax=no |
22647 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22648 | echo '.text' > conftest.s |
e0b0fd74 | 22649 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5' |
5213506e | 22650 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22651 | (eval $ac_try) 2>&5 |
22652 | ac_status=$? | |
5213506e RW |
22653 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22654 | test $ac_status = 0; }; } | |
8ada417f ZW |
22655 | then |
22656 | gcc_cv_as_sparc_relax=yes | |
22657 | else | |
22658 | echo "configure: failed program was" >&5 | |
22659 | cat conftest.s >&5 | |
22660 | fi | |
22661 | rm -f conftest.o conftest.s | |
22662 | fi | |
cafe096b | 22663 | fi |
5213506e RW |
22664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5 |
22665 | $as_echo "$gcc_cv_as_sparc_relax" >&6; } | |
63cf211a | 22666 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 | 22667 | |
5213506e | 22668 | $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h |
e95b1e6a | 22669 | |
878ee0ab DM |
22670 | fi |
22671 | ||
22672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5 | |
22673 | $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; } | |
22674 | if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then : | |
22675 | $as_echo_n "(cached) " >&6 | |
22676 | else | |
22677 | gcc_cv_as_sparc_gotdata_op=no | |
22678 | if test x$gcc_cv_as != x; then | |
22679 | echo '.text | |
22680 | foo: | |
22681 | nop | |
22682 | bar: | |
22683 | sethi %gdop_hix22(foo), %g1 | |
22684 | xor %g1, %gdop_lox10(foo), %g1 | |
22685 | ld [%l7 + %g1], %g2, %gdop(foo)' > conftest.s | |
22686 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' | |
22687 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
22688 | (eval $ac_try) 2>&5 | |
22689 | ac_status=$? | |
22690 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
22691 | test $ac_status = 0; }; } | |
22692 | then | |
22693 | if test x$gcc_cv_ld != x \ | |
46bc665f DM |
22694 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then |
22695 | if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then | |
22696 | if test x$gcc_cv_objdump != x; then | |
22697 | if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \ | |
22698 | | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then | |
22699 | gcc_cv_as_sparc_gotdata_op=no | |
22700 | else | |
22701 | gcc_cv_as_sparc_gotdata_op=yes | |
22702 | fi | |
22703 | fi | |
22704 | else | |
22705 | gcc_cv_as_sparc_gotdata_op=yes | |
22706 | fi | |
878ee0ab DM |
22707 | fi |
22708 | rm -f conftest | |
22709 | else | |
22710 | echo "configure: failed program was" >&5 | |
22711 | cat conftest.s >&5 | |
22712 | fi | |
22713 | rm -f conftest.o conftest.s | |
22714 | fi | |
22715 | fi | |
22716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5 | |
22717 | $as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; } | |
22718 | if test $gcc_cv_as_sparc_gotdata_op = yes; then | |
22719 | ||
22720 | $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h | |
22721 | ||
8ada417f | 22722 | fi |
e95b1e6a | 22723 | |
5213506e RW |
22724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5 |
22725 | $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; } | |
22726 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then : | |
22727 | $as_echo_n "(cached) " >&6 | |
17e9e88c | 22728 | else |
8ada417f ZW |
22729 | gcc_cv_as_sparc_ua_pcrel=no |
22730 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22731 | echo '.text |
8ada417f ZW |
22732 | foo: |
22733 | nop | |
22734 | .data | |
22735 | .align 4 | |
22736 | .byte 0 | |
22737 | .uaword %r_disp32(foo)' > conftest.s | |
e0b0fd74 | 22738 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' |
5213506e | 22739 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22740 | (eval $ac_try) 2>&5 |
22741 | ac_status=$? | |
5213506e RW |
22742 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22743 | test $ac_status = 0; }; } | |
8ada417f ZW |
22744 | then |
22745 | if test x$gcc_cv_ld != x \ | |
22746 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
22747 | gcc_cv_as_sparc_ua_pcrel=yes | |
22748 | fi | |
22749 | rm -f conftest | |
22750 | else | |
22751 | echo "configure: failed program was" >&5 | |
22752 | cat conftest.s >&5 | |
22753 | fi | |
22754 | rm -f conftest.o conftest.s | |
22755 | fi | |
cafe096b | 22756 | fi |
5213506e RW |
22757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
22758 | $as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; } | |
63cf211a | 22759 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 | 22760 | |
5213506e | 22761 | $as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h |
17e9e88c | 22762 | |
17e9e88c | 22763 | |
5213506e RW |
22764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
22765 | $as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; } | |
22766 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then : | |
22767 | $as_echo_n "(cached) " >&6 | |
cf7b8b0d | 22768 | else |
8ada417f ZW |
22769 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
22770 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22771 | echo '.data |
8ada417f ZW |
22772 | .align 4 |
22773 | .byte 0x31 | |
22774 | .uaword %r_disp32(foo) | |
22775 | .byte 0x32, 0x33, 0x34 | |
22776 | .global foo | |
22777 | .hidden foo | |
22778 | foo: | |
22779 | .skip 4' > conftest.s | |
e0b0fd74 | 22780 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' |
5213506e | 22781 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22782 | (eval $ac_try) 2>&5 |
22783 | ac_status=$? | |
5213506e RW |
22784 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22785 | test $ac_status = 0; }; } | |
8ada417f ZW |
22786 | then |
22787 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
22788 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
22789 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
22790 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
22791 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
22792 | | grep 'DISP32' > /dev/null 2>&1; then | |
22793 | : | |
22794 | else | |
22795 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 22796 | fi |
8ada417f ZW |
22797 | fi |
22798 | rm -f conftest | |
22799 | else | |
22800 | echo "configure: failed program was" >&5 | |
22801 | cat conftest.s >&5 | |
22802 | fi | |
22803 | rm -f conftest.o conftest.s | |
22804 | fi | |
cafe096b | 22805 | fi |
5213506e RW |
22806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
22807 | $as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; } | |
63cf211a | 22808 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 | 22809 | |
5213506e | 22810 | $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h |
cf7b8b0d | 22811 | |
8ada417f | 22812 | fi |
ba479fd2 | 22813 | |
8ada417f | 22814 | fi # unaligned pcrel relocs |
cf7b8b0d | 22815 | |
5213506e RW |
22816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5 |
22817 | $as_echo_n "checking assembler for offsetable %lo()... " >&6; } | |
22818 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then : | |
22819 | $as_echo_n "(cached) " >&6 | |
5b68c389 | 22820 | else |
8ada417f ZW |
22821 | gcc_cv_as_sparc_offsetable_lo10=no |
22822 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22823 | echo '.text |
8ada417f ZW |
22824 | or %g1, %lo(ab) + 12, %g1 |
22825 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
e0b0fd74 | 22826 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=v9 -o conftest.o conftest.s >&5' |
5213506e | 22827 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22828 | (eval $ac_try) 2>&5 |
22829 | ac_status=$? | |
5213506e RW |
22830 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22831 | test $ac_status = 0; }; } | |
8ada417f ZW |
22832 | then |
22833 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 22834 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 22835 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 22836 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
22837 | fi |
22838 | else | |
22839 | echo "configure: failed program was" >&5 | |
22840 | cat conftest.s >&5 | |
22841 | fi | |
22842 | rm -f conftest.o conftest.s | |
22843 | fi | |
cafe096b | 22844 | fi |
5213506e RW |
22845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
22846 | $as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; } | |
63cf211a | 22847 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 | 22848 | |
5213506e | 22849 | $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h |
1cb36a98 | 22850 | |
8ada417f | 22851 | fi |
1cb36a98 RH |
22852 | ;; |
22853 | ||
c307e6dd | 22854 | i[34567]86-*-* | x86_64-*-*) |
f7e413e2 DK |
22855 | case $target_os in |
22856 | cygwin*) | |
22857 | # Full C++ conformance when using a shared libstdc++-v3 requires some | |
22858 | # support from the Cygwin DLL, which in more recent versions exports | |
22859 | # wrappers to aid in interposing and redirecting operators new, delete, | |
22860 | # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we | |
22861 | # are configuring for a version of Cygwin that exports the wrappers. | |
22862 | if test x$host = x$target; then | |
22863 | ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj" | |
22864 | if test "x$ac_cv_func___wrap__Znaj" = x""yes; then : | |
22865 | gcc_ac_cygwin_dll_wrappers=yes | |
22866 | else | |
22867 | gcc_ac_cygwin_dll_wrappers=no | |
22868 | fi | |
22869 | ||
22870 | else | |
22871 | # Can't check presence of libc functions during cross-compile, so | |
22872 | # we just have to assume we're building for an up-to-date target. | |
22873 | gcc_ac_cygwin_dll_wrappers=yes | |
22874 | fi | |
22875 | ||
22876 | cat >>confdefs.h <<_ACEOF | |
22877 | #define USE_CYGWIN_LIBSTDCXX_WRAPPERS `if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi` | |
22878 | _ACEOF | |
22879 | ||
22880 | esac | |
d38bc601 BF |
22881 | case $target_os in |
22882 | cygwin* | pe | mingw32*) | |
233215fe DK |
22883 | # Recent binutils allows the three-operand form of ".comm" on PE. This |
22884 | # definition is used unconditionally to initialise the default state of | |
22885 | # the target option variable that governs usage of the feature. | |
5213506e RW |
22886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5 |
22887 | $as_echo_n "checking assembler for .comm with alignment... " >&6; } | |
22888 | if test "${gcc_cv_as_comm_has_align+set}" = set; then : | |
22889 | $as_echo_n "(cached) " >&6 | |
233215fe DK |
22890 | else |
22891 | gcc_cv_as_comm_has_align=no | |
22892 | if test $in_tree_gas = yes; then | |
22893 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52` | |
22894 | then gcc_cv_as_comm_has_align=yes | |
22895 | fi | |
22896 | elif test x$gcc_cv_as != x; then | |
22897 | echo '.comm foo,1,32' > conftest.s | |
e0b0fd74 | 22898 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22899 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
233215fe DK |
22900 | (eval $ac_try) 2>&5 |
22901 | ac_status=$? | |
5213506e RW |
22902 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22903 | test $ac_status = 0; }; } | |
233215fe DK |
22904 | then |
22905 | gcc_cv_as_comm_has_align=yes | |
22906 | else | |
22907 | echo "configure: failed program was" >&5 | |
22908 | cat conftest.s >&5 | |
22909 | fi | |
22910 | rm -f conftest.o conftest.s | |
22911 | fi | |
22912 | fi | |
5213506e RW |
22913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5 |
22914 | $as_echo "$gcc_cv_as_comm_has_align" >&6; } | |
233215fe DK |
22915 | |
22916 | ||
22917 | cat >>confdefs.h <<_ACEOF | |
22918 | #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi` | |
22919 | _ACEOF | |
22920 | ||
d38bc601 | 22921 | # Used for DWARF 2 in PE |
5213506e RW |
22922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5 |
22923 | $as_echo_n "checking assembler for .secrel32 relocs... " >&6; } | |
22924 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then : | |
22925 | $as_echo_n "(cached) " >&6 | |
d38bc601 BF |
22926 | else |
22927 | gcc_cv_as_ix86_pe_secrel32=no | |
22928 | if test $in_tree_gas = yes; then | |
22929 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
22930 | then gcc_cv_as_ix86_pe_secrel32=yes | |
22931 | fi | |
22932 | elif test x$gcc_cv_as != x; then | |
22933 | echo '.text | |
22934 | foo: nop | |
22935 | .data | |
22936 | .secrel32 foo' > conftest.s | |
e0b0fd74 | 22937 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22938 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d38bc601 BF |
22939 | (eval $ac_try) 2>&5 |
22940 | ac_status=$? | |
5213506e RW |
22941 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22942 | test $ac_status = 0; }; } | |
d38bc601 BF |
22943 | then |
22944 | if test x$gcc_cv_ld != x \ | |
22945 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
22946 | gcc_cv_as_ix86_pe_secrel32=yes | |
22947 | fi | |
22948 | rm -f conftest | |
22949 | else | |
22950 | echo "configure: failed program was" >&5 | |
22951 | cat conftest.s >&5 | |
22952 | fi | |
22953 | rm -f conftest.o conftest.s | |
22954 | fi | |
22955 | fi | |
5213506e RW |
22956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5 |
22957 | $as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; } | |
d38bc601 BF |
22958 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then |
22959 | ||
5213506e | 22960 | $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h |
d38bc601 BF |
22961 | |
22962 | fi | |
3bec79c5 DK |
22963 | # Test if the assembler supports the extended form of the .section |
22964 | # directive that specifies section alignment. LTO support uses this, | |
22965 | # but normally only after installation, so we warn but don't fail the | |
22966 | # configure if LTO is enabled but the assembler does not support it. | |
22967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with alignment" >&5 | |
22968 | $as_echo_n "checking assembler for .section with alignment... " >&6; } | |
22969 | if test "${gcc_cv_as_section_has_align+set}" = set; then : | |
22970 | $as_echo_n "(cached) " >&6 | |
22971 | else | |
22972 | gcc_cv_as_section_has_align=no | |
22973 | if test $in_tree_gas = yes; then | |
22974 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1` | |
22975 | then gcc_cv_as_section_has_align=yes | |
22976 | fi | |
22977 | elif test x$gcc_cv_as != x; then | |
22978 | echo '.section lto_test,"dr0"' > conftest.s | |
22979 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5' | |
22980 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
22981 | (eval $ac_try) 2>&5 | |
22982 | ac_status=$? | |
22983 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
22984 | test $ac_status = 0; }; } | |
22985 | then | |
22986 | gcc_cv_as_section_has_align=yes | |
22987 | else | |
22988 | echo "configure: failed program was" >&5 | |
22989 | cat conftest.s >&5 | |
22990 | fi | |
22991 | rm -f conftest.o conftest.s | |
22992 | fi | |
22993 | fi | |
22994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5 | |
22995 | $as_echo "$gcc_cv_as_section_has_align" >&6; } | |
22996 | ||
22997 | if test x$gcc_cv_as_section_has_align != xyes; then | |
22998 | case ",$enable_languages," in | |
22999 | *,lto,*) | |
23000 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&5 | |
23001 | $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&2;} | |
23002 | ;; | |
23003 | esac | |
23004 | fi | |
d38bc601 BF |
23005 | ;; |
23006 | esac | |
23007 | ||
5213506e RW |
23008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5 |
23009 | $as_echo_n "checking assembler for filds and fists mnemonics... " >&6; } | |
23010 | if test "${gcc_cv_as_ix86_filds+set}" = set; then : | |
23011 | $as_echo_n "(cached) " >&6 | |
8ada417f | 23012 | else |
a3a5e3d1 UB |
23013 | gcc_cv_as_ix86_filds=no |
23014 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 23015 | echo 'filds mem; fists mem' > conftest.s |
e0b0fd74 | 23016 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23017 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23018 | (eval $ac_try) 2>&5 |
23019 | ac_status=$? | |
5213506e RW |
23020 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23021 | test $ac_status = 0; }; } | |
8ada417f | 23022 | then |
a3a5e3d1 UB |
23023 | gcc_cv_as_ix86_filds=yes |
23024 | else | |
23025 | echo "configure: failed program was" >&5 | |
23026 | cat conftest.s >&5 | |
23027 | fi | |
23028 | rm -f conftest.o conftest.s | |
23029 | fi | |
23030 | fi | |
5213506e RW |
23031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5 |
23032 | $as_echo "$gcc_cv_as_ix86_filds" >&6; } | |
a3a5e3d1 UB |
23033 | if test $gcc_cv_as_ix86_filds = yes; then |
23034 | ||
5213506e | 23035 | $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h |
a3a5e3d1 UB |
23036 | |
23037 | fi | |
23038 | ||
5213506e RW |
23039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5 |
23040 | $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; } | |
23041 | if test "${gcc_cv_as_ix86_fildq+set}" = set; then : | |
23042 | $as_echo_n "(cached) " >&6 | |
a3a5e3d1 UB |
23043 | else |
23044 | gcc_cv_as_ix86_fildq=no | |
23045 | if test x$gcc_cv_as != x; then | |
23046 | echo 'fildq mem; fistpq mem' > conftest.s | |
e0b0fd74 | 23047 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23048 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a3a5e3d1 UB |
23049 | (eval $ac_try) 2>&5 |
23050 | ac_status=$? | |
5213506e RW |
23051 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23052 | test $ac_status = 0; }; } | |
a3a5e3d1 UB |
23053 | then |
23054 | gcc_cv_as_ix86_fildq=yes | |
8ada417f ZW |
23055 | else |
23056 | echo "configure: failed program was" >&5 | |
23057 | cat conftest.s >&5 | |
981d4858 | 23058 | fi |
8ada417f ZW |
23059 | rm -f conftest.o conftest.s |
23060 | fi | |
23061 | fi | |
5213506e RW |
23062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5 |
23063 | $as_echo "$gcc_cv_as_ix86_fildq" >&6; } | |
a3a5e3d1 | 23064 | if test $gcc_cv_as_ix86_fildq = yes; then |
ba479fd2 | 23065 | |
5213506e | 23066 | $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h |
ad9c4d9f | 23067 | |
f6f5dff2 RO |
23068 | fi |
23069 | ||
5213506e RW |
23070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5 |
23071 | $as_echo_n "checking assembler for cmov syntax... " >&6; } | |
23072 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then : | |
23073 | $as_echo_n "(cached) " >&6 | |
f6f5dff2 RO |
23074 | else |
23075 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
23076 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 23077 | echo 'cmovl.l %edx, %eax' > conftest.s |
e0b0fd74 | 23078 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23079 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23080 | (eval $ac_try) 2>&5 |
23081 | ac_status=$? | |
5213506e RW |
23082 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23083 | test $ac_status = 0; }; } | |
f6f5dff2 RO |
23084 | then |
23085 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
23086 | else | |
23087 | echo "configure: failed program was" >&5 | |
23088 | cat conftest.s >&5 | |
23089 | fi | |
23090 | rm -f conftest.o conftest.s | |
23091 | fi | |
23092 | fi | |
5213506e RW |
23093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
23094 | $as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; } | |
63cf211a | 23095 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 | 23096 | |
5213506e | 23097 | $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h |
f6f5dff2 | 23098 | |
b6c03bcd RS |
23099 | fi |
23100 | ||
5213506e RW |
23101 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5 |
23102 | $as_echo_n "checking assembler for ffreep mnemonic... " >&6; } | |
23103 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then : | |
23104 | $as_echo_n "(cached) " >&6 | |
b6c03bcd RS |
23105 | else |
23106 | gcc_cv_as_ix86_ffreep=no | |
23107 | if test x$gcc_cv_as != x; then | |
23108 | echo 'ffreep %st(1)' > conftest.s | |
e0b0fd74 | 23109 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23110 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b6c03bcd RS |
23111 | (eval $ac_try) 2>&5 |
23112 | ac_status=$? | |
5213506e RW |
23113 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23114 | test $ac_status = 0; }; } | |
b6c03bcd RS |
23115 | then |
23116 | gcc_cv_as_ix86_ffreep=yes | |
23117 | else | |
23118 | echo "configure: failed program was" >&5 | |
23119 | cat conftest.s >&5 | |
23120 | fi | |
23121 | rm -f conftest.o conftest.s | |
23122 | fi | |
23123 | fi | |
5213506e RW |
23124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5 |
23125 | $as_echo "$gcc_cv_as_ix86_ffreep" >&6; } | |
b6c03bcd RS |
23126 | if test $gcc_cv_as_ix86_ffreep = yes; then |
23127 | ||
5213506e | 23128 | $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h |
b6c03bcd | 23129 | |
38ca3765 UB |
23130 | fi |
23131 | ||
5213506e RW |
23132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5 |
23133 | $as_echo_n "checking assembler for sahf mnemonic... " >&6; } | |
23134 | if test "${gcc_cv_as_ix86_sahf+set}" = set; then : | |
23135 | $as_echo_n "(cached) " >&6 | |
38ca3765 UB |
23136 | else |
23137 | gcc_cv_as_ix86_sahf=no | |
23138 | if test x$gcc_cv_as != x; then | |
23139 | echo 'sahf' > conftest.s | |
e0b0fd74 | 23140 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23141 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
38ca3765 UB |
23142 | (eval $ac_try) 2>&5 |
23143 | ac_status=$? | |
5213506e RW |
23144 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23145 | test $ac_status = 0; }; } | |
38ca3765 UB |
23146 | then |
23147 | gcc_cv_as_ix86_sahf=yes | |
23148 | else | |
23149 | echo "configure: failed program was" >&5 | |
23150 | cat conftest.s >&5 | |
23151 | fi | |
23152 | rm -f conftest.o conftest.s | |
23153 | fi | |
23154 | fi | |
5213506e RW |
23155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_sahf" >&5 |
23156 | $as_echo "$gcc_cv_as_ix86_sahf" >&6; } | |
38ca3765 UB |
23157 | if test $gcc_cv_as_ix86_sahf = yes; then |
23158 | ||
5213506e | 23159 | $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h |
38ca3765 | 23160 | |
bad72d7a RH |
23161 | fi |
23162 | ||
23163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5 | |
23164 | $as_echo_n "checking assembler for swap suffix... " >&6; } | |
23165 | if test "${gcc_cv_as_ix86_swap+set}" = set; then : | |
23166 | $as_echo_n "(cached) " >&6 | |
23167 | else | |
23168 | gcc_cv_as_ix86_swap=no | |
23169 | if test x$gcc_cv_as != x; then | |
23170 | echo 'movl.s %esp, %ebp' > conftest.s | |
e0b0fd74 | 23171 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
bad72d7a RH |
23172 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
23173 | (eval $ac_try) 2>&5 | |
23174 | ac_status=$? | |
23175 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23176 | test $ac_status = 0; }; } | |
23177 | then | |
23178 | gcc_cv_as_ix86_swap=yes | |
23179 | else | |
23180 | echo "configure: failed program was" >&5 | |
23181 | cat conftest.s >&5 | |
23182 | fi | |
23183 | rm -f conftest.o conftest.s | |
23184 | fi | |
23185 | fi | |
23186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_swap" >&5 | |
23187 | $as_echo "$gcc_cv_as_ix86_swap" >&6; } | |
23188 | if test $gcc_cv_as_ix86_swap = yes; then | |
23189 | ||
23190 | $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h | |
23191 | ||
68b92f78 RS |
23192 | fi |
23193 | ||
5213506e RW |
23194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5 |
23195 | $as_echo_n "checking assembler for different section symbol subtraction... " >&6; } | |
23196 | if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then : | |
23197 | $as_echo_n "(cached) " >&6 | |
68b92f78 RS |
23198 | else |
23199 | gcc_cv_as_ix86_diff_sect_delta=no | |
23200 | if test x$gcc_cv_as != x; then | |
23201 | echo '.section .rodata | |
23202 | .L1: | |
23203 | .long .L2-.L1 | |
23204 | .long .L3-.L1 | |
23205 | .text | |
23206 | .L3: nop | |
23207 | .L2: nop' > conftest.s | |
e0b0fd74 | 23208 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23209 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
68b92f78 RS |
23210 | (eval $ac_try) 2>&5 |
23211 | ac_status=$? | |
5213506e RW |
23212 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23213 | test $ac_status = 0; }; } | |
68b92f78 RS |
23214 | then |
23215 | gcc_cv_as_ix86_diff_sect_delta=yes | |
23216 | else | |
23217 | echo "configure: failed program was" >&5 | |
23218 | cat conftest.s >&5 | |
23219 | fi | |
23220 | rm -f conftest.o conftest.s | |
23221 | fi | |
23222 | fi | |
5213506e RW |
23223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5 |
23224 | $as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; } | |
68b92f78 RS |
23225 | if test $gcc_cv_as_ix86_diff_sect_delta = yes; then |
23226 | ||
5213506e | 23227 | $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h |
68b92f78 | 23228 | |
ad9c4d9f NN |
23229 | fi |
23230 | ||
6f3ca281 ZW |
23231 | # This one is used unconditionally by i386.[ch]; it is to be defined |
23232 | # to 1 if the feature is present, 0 otherwise. | |
5213506e RW |
23233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5 |
23234 | $as_echo_n "checking assembler for GOTOFF in data... " >&6; } | |
23235 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then : | |
23236 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
23237 | else |
23238 | gcc_cv_as_ix86_gotoff_in_data=no | |
23239 | if test $in_tree_gas = yes; then | |
23240 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
23241 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
23242 | fi | |
23243 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 23244 | echo ' .text |
f88c65f7 RH |
23245 | .L0: |
23246 | nop | |
23247 | .data | |
8ada417f | 23248 | .long .L0@GOTOFF' > conftest.s |
e0b0fd74 | 23249 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23250 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23251 | (eval $ac_try) 2>&5 |
23252 | ac_status=$? | |
5213506e RW |
23253 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23254 | test $ac_status = 0; }; } | |
8ada417f ZW |
23255 | then |
23256 | gcc_cv_as_ix86_gotoff_in_data=yes | |
23257 | else | |
23258 | echo "configure: failed program was" >&5 | |
23259 | cat conftest.s >&5 | |
f88c65f7 | 23260 | fi |
8ada417f ZW |
23261 | rm -f conftest.o conftest.s |
23262 | fi | |
23263 | fi | |
5213506e RW |
23264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
23265 | $as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; } | |
8ada417f | 23266 | |
6f3ca281 | 23267 | |
ba479fd2 | 23268 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 23269 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 23270 | _ACEOF |
f88c65f7 | 23271 | |
1cb36a98 | 23272 | ;; |
ef1ecf87 RH |
23273 | |
23274 | ia64*-*-*) | |
5213506e RW |
23275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5 |
23276 | $as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; } | |
23277 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then : | |
23278 | $as_echo_n "(cached) " >&6 | |
ef1ecf87 | 23279 | else |
8ada417f ZW |
23280 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
23281 | if test $in_tree_gas = yes; then | |
23282 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
23283 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 23284 | fi |
8ada417f | 23285 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 23286 | echo ' .text |
ef1ecf87 RH |
23287 | addl r15 = @ltoffx(x#), gp |
23288 | ;; | |
cfa9ee99 | 23289 | ld8.mov r16 = [r15], x#' > conftest.s |
e0b0fd74 | 23290 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23291 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23292 | (eval $ac_try) 2>&5 |
23293 | ac_status=$? | |
5213506e RW |
23294 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23295 | test $ac_status = 0; }; } | |
8ada417f | 23296 | then |
cfa9ee99 | 23297 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
23298 | else |
23299 | echo "configure: failed program was" >&5 | |
23300 | cat conftest.s >&5 | |
2c4a9cff | 23301 | fi |
8ada417f ZW |
23302 | rm -f conftest.o conftest.s |
23303 | fi | |
23304 | fi | |
5213506e RW |
23305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
23306 | $as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; } | |
63cf211a | 23307 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 | 23308 | |
5213506e | 23309 | $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h |
8ada417f | 23310 | |
cfa9ee99 | 23311 | fi |
8ada417f | 23312 | |
2c4a9cff | 23313 | ;; |
8ada417f | 23314 | |
2c4a9cff | 23315 | powerpc*-*-*) |
8ada417f | 23316 | case $target in |
432218ba DE |
23317 | *-*-aix*) conftest_s=' .machine "pwr5" |
23318 | .csect .text[PR] | |
6b37db3c | 23319 | mfcr 3,128';; |
8af4d362 | 23320 | *-*-darwin*) |
5213506e RW |
23321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5 |
23322 | $as_echo_n "checking assembler for .machine directive support... " >&6; } | |
23323 | if test "${gcc_cv_as_machine_directive+set}" = set; then : | |
23324 | $as_echo_n "(cached) " >&6 | |
8af4d362 PB |
23325 | else |
23326 | gcc_cv_as_machine_directive=no | |
23327 | if test x$gcc_cv_as != x; then | |
23328 | echo ' .machine ppc7400' > conftest.s | |
e0b0fd74 | 23329 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23330 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
8af4d362 PB |
23331 | (eval $ac_try) 2>&5 |
23332 | ac_status=$? | |
5213506e RW |
23333 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23334 | test $ac_status = 0; }; } | |
8af4d362 PB |
23335 | then |
23336 | gcc_cv_as_machine_directive=yes | |
23337 | else | |
23338 | echo "configure: failed program was" >&5 | |
23339 | cat conftest.s >&5 | |
23340 | fi | |
23341 | rm -f conftest.o conftest.s | |
23342 | fi | |
23343 | fi | |
5213506e RW |
23344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5 |
23345 | $as_echo "$gcc_cv_as_machine_directive" >&6; } | |
8af4d362 PB |
23346 | |
23347 | if test x$gcc_cv_as_machine_directive != xyes; then | |
23348 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
23349 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
23350 | test x$build = x$target && exit 1 | |
23351 | fi | |
23352 | conftest_s=' .text | |
6b37db3c | 23353 | mfcr r3,128';; |
4c67db14 | 23354 | *) conftest_s=' .machine power4 |
d2ab3e37 | 23355 | .text |
6b37db3c | 23356 | mfcr 3,128';; |
8ada417f | 23357 | esac |
8ada417f | 23358 | |
5213506e RW |
23359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5 |
23360 | $as_echo_n "checking assembler for mfcr field support... " >&6; } | |
23361 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then : | |
23362 | $as_echo_n "(cached) " >&6 | |
2c4a9cff | 23363 | else |
8ada417f ZW |
23364 | gcc_cv_as_powerpc_mfcrf=no |
23365 | if test $in_tree_gas = yes; then | |
23366 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
23367 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 23368 | fi |
8ada417f | 23369 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 23370 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 23371 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23372 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23373 | (eval $ac_try) 2>&5 |
23374 | ac_status=$? | |
5213506e RW |
23375 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23376 | test $ac_status = 0; }; } | |
8ada417f ZW |
23377 | then |
23378 | gcc_cv_as_powerpc_mfcrf=yes | |
23379 | else | |
23380 | echo "configure: failed program was" >&5 | |
23381 | cat conftest.s >&5 | |
23382 | fi | |
23383 | rm -f conftest.o conftest.s | |
23384 | fi | |
2c4a9cff | 23385 | fi |
5213506e RW |
23386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
23387 | $as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; } | |
63cf211a | 23388 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 | 23389 | |
5213506e | 23390 | $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h |
ef1ecf87 | 23391 | |
8ada417f | 23392 | fi |
432218ba DE |
23393 | |
23394 | case $target in | |
23395 | *-*-aix*) conftest_s=' .machine "pwr5" | |
23396 | .csect .text[PR] | |
23397 | popcntb 3,3';; | |
23398 | *) conftest_s=' .machine power5 | |
23399 | .text | |
23400 | popcntb 3,3';; | |
23401 | esac | |
23402 | ||
5213506e RW |
23403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5 |
23404 | $as_echo_n "checking assembler for popcntb support... " >&6; } | |
23405 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then : | |
23406 | $as_echo_n "(cached) " >&6 | |
432218ba DE |
23407 | else |
23408 | gcc_cv_as_powerpc_popcntb=no | |
23409 | if test $in_tree_gas = yes; then | |
23410 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23411 | then gcc_cv_as_powerpc_popcntb=yes | |
23412 | fi | |
23413 | elif test x$gcc_cv_as != x; then | |
23414 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23415 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23416 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
432218ba DE |
23417 | (eval $ac_try) 2>&5 |
23418 | ac_status=$? | |
5213506e RW |
23419 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23420 | test $ac_status = 0; }; } | |
432218ba DE |
23421 | then |
23422 | gcc_cv_as_powerpc_popcntb=yes | |
23423 | else | |
23424 | echo "configure: failed program was" >&5 | |
23425 | cat conftest.s >&5 | |
23426 | fi | |
23427 | rm -f conftest.o conftest.s | |
23428 | fi | |
23429 | fi | |
5213506e RW |
23430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5 |
23431 | $as_echo "$gcc_cv_as_powerpc_popcntb" >&6; } | |
432218ba DE |
23432 | if test $gcc_cv_as_powerpc_popcntb = yes; then |
23433 | ||
5213506e | 23434 | $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h |
432218ba | 23435 | |
9719f3b7 DE |
23436 | fi |
23437 | ||
23438 | case $target in | |
23439 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
23440 | .csect .text[PR] | |
23441 | frin 1,1';; | |
1e04bfdc | 23442 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
23443 | .text |
23444 | frin 1,1';; | |
23445 | esac | |
23446 | ||
5213506e RW |
23447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5 |
23448 | $as_echo_n "checking assembler for fp round support... " >&6; } | |
23449 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then : | |
23450 | $as_echo_n "(cached) " >&6 | |
9719f3b7 DE |
23451 | else |
23452 | gcc_cv_as_powerpc_fprnd=no | |
23453 | if test $in_tree_gas = yes; then | |
23454 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23455 | then gcc_cv_as_powerpc_fprnd=yes | |
23456 | fi | |
23457 | elif test x$gcc_cv_as != x; then | |
23458 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23459 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23460 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
9719f3b7 DE |
23461 | (eval $ac_try) 2>&5 |
23462 | ac_status=$? | |
5213506e RW |
23463 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23464 | test $ac_status = 0; }; } | |
9719f3b7 DE |
23465 | then |
23466 | gcc_cv_as_powerpc_fprnd=yes | |
23467 | else | |
23468 | echo "configure: failed program was" >&5 | |
23469 | cat conftest.s >&5 | |
23470 | fi | |
23471 | rm -f conftest.o conftest.s | |
23472 | fi | |
23473 | fi | |
5213506e RW |
23474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5 |
23475 | $as_echo "$gcc_cv_as_powerpc_fprnd" >&6; } | |
9719f3b7 DE |
23476 | if test $gcc_cv_as_powerpc_fprnd = yes; then |
23477 | ||
5213506e | 23478 | $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h |
9719f3b7 | 23479 | |
44cd321e PS |
23480 | fi |
23481 | ||
23482 | case $target in | |
23483 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23484 | .csect .text[PR] | |
23485 | mffgpr 1,3';; | |
23486 | *) conftest_s=' .machine power6 | |
23487 | .text | |
23488 | mffgpr 1,3';; | |
23489 | esac | |
23490 | ||
5213506e RW |
23491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5 |
23492 | $as_echo_n "checking assembler for move fp gpr support... " >&6; } | |
23493 | if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then : | |
23494 | $as_echo_n "(cached) " >&6 | |
44cd321e PS |
23495 | else |
23496 | gcc_cv_as_powerpc_mfpgpr=no | |
23497 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23498 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
44cd321e PS |
23499 | then gcc_cv_as_powerpc_mfpgpr=yes |
23500 | fi | |
23501 | elif test x$gcc_cv_as != x; then | |
23502 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23503 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23504 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
44cd321e PS |
23505 | (eval $ac_try) 2>&5 |
23506 | ac_status=$? | |
5213506e RW |
23507 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23508 | test $ac_status = 0; }; } | |
44cd321e PS |
23509 | then |
23510 | gcc_cv_as_powerpc_mfpgpr=yes | |
23511 | else | |
23512 | echo "configure: failed program was" >&5 | |
23513 | cat conftest.s >&5 | |
23514 | fi | |
23515 | rm -f conftest.o conftest.s | |
23516 | fi | |
23517 | fi | |
5213506e RW |
23518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5 |
23519 | $as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; } | |
44cd321e PS |
23520 | if test $gcc_cv_as_powerpc_mfpgpr = yes; then |
23521 | ||
5213506e | 23522 | $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h |
44cd321e | 23523 | |
432218ba DE |
23524 | fi |
23525 | ||
7f970b70 AM |
23526 | case $target in |
23527 | *-*-aix*) conftest_s=' .csect .text[PR] | |
23528 | LCF..0: | |
23529 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
23530 | *-*-darwin*) | |
23531 | conftest_s=' .text | |
23532 | LCF0: | |
23533 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
23534 | *) conftest_s=' .text | |
23535 | .LCF0: | |
23536 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
23537 | esac | |
23538 | ||
5213506e RW |
23539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5 |
23540 | $as_echo_n "checking assembler for rel16 relocs... " >&6; } | |
23541 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then : | |
23542 | $as_echo_n "(cached) " >&6 | |
695d8830 AS |
23543 | else |
23544 | gcc_cv_as_powerpc_rel16=no | |
23545 | if test $in_tree_gas = yes; then | |
23546 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23547 | then gcc_cv_as_powerpc_rel16=yes | |
23548 | fi | |
23549 | elif test x$gcc_cv_as != x; then | |
23550 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23551 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23552 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
695d8830 AS |
23553 | (eval $ac_try) 2>&5 |
23554 | ac_status=$? | |
5213506e RW |
23555 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23556 | test $ac_status = 0; }; } | |
695d8830 AS |
23557 | then |
23558 | gcc_cv_as_powerpc_rel16=yes | |
23559 | else | |
23560 | echo "configure: failed program was" >&5 | |
23561 | cat conftest.s >&5 | |
23562 | fi | |
23563 | rm -f conftest.o conftest.s | |
23564 | fi | |
23565 | fi | |
5213506e RW |
23566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5 |
23567 | $as_echo "$gcc_cv_as_powerpc_rel16" >&6; } | |
695d8830 AS |
23568 | if test $gcc_cv_as_powerpc_rel16 = yes; then |
23569 | ||
5213506e | 23570 | $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h |
695d8830 AS |
23571 | |
23572 | fi | |
23573 | ||
b639c3c2 JJ |
23574 | case $target in |
23575 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23576 | .csect .text[PR] | |
23577 | cmpb 3,4,5';; | |
23578 | *) conftest_s=' .machine power6 | |
23579 | .text | |
23580 | cmpb 3,4,5';; | |
23581 | esac | |
23582 | ||
5213506e RW |
23583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5 |
23584 | $as_echo_n "checking assembler for compare bytes support... " >&6; } | |
23585 | if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then : | |
23586 | $as_echo_n "(cached) " >&6 | |
b639c3c2 JJ |
23587 | else |
23588 | gcc_cv_as_powerpc_cmpb=no | |
23589 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23590 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
b639c3c2 JJ |
23591 | then gcc_cv_as_powerpc_cmpb=yes |
23592 | fi | |
23593 | elif test x$gcc_cv_as != x; then | |
23594 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23595 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23596 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b639c3c2 JJ |
23597 | (eval $ac_try) 2>&5 |
23598 | ac_status=$? | |
5213506e RW |
23599 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23600 | test $ac_status = 0; }; } | |
b639c3c2 JJ |
23601 | then |
23602 | gcc_cv_as_powerpc_cmpb=yes | |
23603 | else | |
23604 | echo "configure: failed program was" >&5 | |
23605 | cat conftest.s >&5 | |
23606 | fi | |
23607 | rm -f conftest.o conftest.s | |
23608 | fi | |
23609 | fi | |
5213506e RW |
23610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5 |
23611 | $as_echo "$gcc_cv_as_powerpc_cmpb" >&6; } | |
b639c3c2 JJ |
23612 | if test $gcc_cv_as_powerpc_cmpb = yes; then |
23613 | ||
5213506e | 23614 | $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h |
b639c3c2 JJ |
23615 | |
23616 | fi | |
23617 | ||
23618 | case $target in | |
23619 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23620 | .csect .text[PR] | |
0d74c0ee | 23621 | dadd 1,2,3';; |
b639c3c2 JJ |
23622 | *) conftest_s=' .machine power6 |
23623 | .text | |
0d74c0ee | 23624 | dadd 1,2,3';; |
b639c3c2 JJ |
23625 | esac |
23626 | ||
5213506e RW |
23627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5 |
23628 | $as_echo_n "checking assembler for decimal float support... " >&6; } | |
23629 | if test "${gcc_cv_as_powerpc_dfp+set}" = set; then : | |
23630 | $as_echo_n "(cached) " >&6 | |
b639c3c2 JJ |
23631 | else |
23632 | gcc_cv_as_powerpc_dfp=no | |
23633 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23634 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
b639c3c2 JJ |
23635 | then gcc_cv_as_powerpc_dfp=yes |
23636 | fi | |
23637 | elif test x$gcc_cv_as != x; then | |
23638 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23639 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23640 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b639c3c2 JJ |
23641 | (eval $ac_try) 2>&5 |
23642 | ac_status=$? | |
5213506e RW |
23643 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23644 | test $ac_status = 0; }; } | |
b639c3c2 JJ |
23645 | then |
23646 | gcc_cv_as_powerpc_dfp=yes | |
23647 | else | |
23648 | echo "configure: failed program was" >&5 | |
23649 | cat conftest.s >&5 | |
23650 | fi | |
23651 | rm -f conftest.o conftest.s | |
23652 | fi | |
23653 | fi | |
5213506e RW |
23654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5 |
23655 | $as_echo "$gcc_cv_as_powerpc_dfp" >&6; } | |
b639c3c2 JJ |
23656 | if test $gcc_cv_as_powerpc_dfp = yes; then |
23657 | ||
5213506e | 23658 | $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h |
b639c3c2 | 23659 | |
d40c9e33 PB |
23660 | fi |
23661 | ||
23662 | case $target in | |
23663 | *-*-aix*) conftest_s=' .machine "pwr7" | |
23664 | .csect .text[PR] | |
23665 | lxvd2x 1,2,3';; | |
23666 | *) conftest_s=' .machine power7 | |
23667 | .text | |
23668 | lxvd2x 1,2,3';; | |
23669 | esac | |
23670 | ||
5213506e RW |
23671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5 |
23672 | $as_echo_n "checking assembler for vector-scalar support... " >&6; } | |
23673 | if test "${gcc_cv_as_powerpc_vsx+set}" = set; then : | |
23674 | $as_echo_n "(cached) " >&6 | |
d40c9e33 PB |
23675 | else |
23676 | gcc_cv_as_powerpc_vsx=no | |
23677 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23678 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
d40c9e33 PB |
23679 | then gcc_cv_as_powerpc_vsx=yes |
23680 | fi | |
23681 | elif test x$gcc_cv_as != x; then | |
23682 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23683 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23684 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d40c9e33 PB |
23685 | (eval $ac_try) 2>&5 |
23686 | ac_status=$? | |
5213506e RW |
23687 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23688 | test $ac_status = 0; }; } | |
d40c9e33 PB |
23689 | then |
23690 | gcc_cv_as_powerpc_vsx=yes | |
23691 | else | |
23692 | echo "configure: failed program was" >&5 | |
23693 | cat conftest.s >&5 | |
23694 | fi | |
23695 | rm -f conftest.o conftest.s | |
23696 | fi | |
23697 | fi | |
5213506e RW |
23698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5 |
23699 | $as_echo "$gcc_cv_as_powerpc_vsx" >&6; } | |
d40c9e33 PB |
23700 | if test $gcc_cv_as_powerpc_vsx = yes; then |
23701 | ||
5213506e | 23702 | $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h |
d40c9e33 | 23703 | |
cacf1ca8 MM |
23704 | fi |
23705 | ||
23706 | case $target in | |
23707 | *-*-aix*) conftest_s=' .machine "pwr7" | |
23708 | .csect .text[PR] | |
23709 | popcntd 3,3';; | |
23710 | *) conftest_s=' .machine power7 | |
23711 | .text | |
23712 | popcntd 3,3';; | |
23713 | esac | |
23714 | ||
5213506e RW |
23715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5 |
23716 | $as_echo_n "checking assembler for popcntd support... " >&6; } | |
23717 | if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then : | |
23718 | $as_echo_n "(cached) " >&6 | |
cacf1ca8 MM |
23719 | else |
23720 | gcc_cv_as_powerpc_popcntd=no | |
23721 | if test $in_tree_gas = yes; then | |
23722 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` | |
23723 | then gcc_cv_as_powerpc_popcntd=yes | |
23724 | fi | |
23725 | elif test x$gcc_cv_as != x; then | |
23726 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23727 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23728 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
cacf1ca8 MM |
23729 | (eval $ac_try) 2>&5 |
23730 | ac_status=$? | |
5213506e RW |
23731 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23732 | test $ac_status = 0; }; } | |
cacf1ca8 MM |
23733 | then |
23734 | gcc_cv_as_powerpc_popcntd=yes | |
23735 | else | |
23736 | echo "configure: failed program was" >&5 | |
23737 | cat conftest.s >&5 | |
23738 | fi | |
23739 | rm -f conftest.o conftest.s | |
23740 | fi | |
23741 | fi | |
5213506e RW |
23742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5 |
23743 | $as_echo "$gcc_cv_as_powerpc_popcntd" >&6; } | |
cacf1ca8 MM |
23744 | if test $gcc_cv_as_powerpc_popcntd = yes; then |
23745 | ||
5213506e | 23746 | $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h |
cacf1ca8 MM |
23747 | |
23748 | fi | |
23749 | ||
23750 | case $target in | |
23751 | *-*-aix*) conftest_s=' .csect .text[PR] | |
23752 | lwsync';; | |
23753 | *) conftest_s=' .text | |
23754 | lwsync';; | |
23755 | esac | |
23756 | ||
5213506e RW |
23757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5 |
23758 | $as_echo_n "checking assembler for lwsync support... " >&6; } | |
23759 | if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then : | |
23760 | $as_echo_n "(cached) " >&6 | |
cacf1ca8 MM |
23761 | else |
23762 | gcc_cv_as_powerpc_lwsync=no | |
23763 | if test $in_tree_gas = yes; then | |
23764 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` | |
23765 | then gcc_cv_as_powerpc_lwsync=yes | |
23766 | fi | |
23767 | elif test x$gcc_cv_as != x; then | |
23768 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23769 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23770 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
cacf1ca8 MM |
23771 | (eval $ac_try) 2>&5 |
23772 | ac_status=$? | |
5213506e RW |
23773 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23774 | test $ac_status = 0; }; } | |
cacf1ca8 MM |
23775 | then |
23776 | gcc_cv_as_powerpc_lwsync=yes | |
23777 | else | |
23778 | echo "configure: failed program was" >&5 | |
23779 | cat conftest.s >&5 | |
23780 | fi | |
23781 | rm -f conftest.o conftest.s | |
23782 | fi | |
23783 | fi | |
5213506e RW |
23784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5 |
23785 | $as_echo "$gcc_cv_as_powerpc_lwsync" >&6; } | |
cacf1ca8 MM |
23786 | if test $gcc_cv_as_powerpc_lwsync = yes; then |
23787 | ||
5213506e | 23788 | $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h |
cacf1ca8 | 23789 | |
47f67e51 PB |
23790 | fi |
23791 | ||
23792 | case $target in | |
23793 | *-*-aix*) conftest_s=' .machine "476" | |
23794 | .csect .text[PR] | |
23795 | dci 0';; | |
23796 | *) conftest_s=' .machine "476" | |
23797 | .text | |
23798 | dci 0';; | |
23799 | esac | |
23800 | ||
23801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5 | |
23802 | $as_echo_n "checking assembler for data cache invalidate support... " >&6; } | |
23803 | if test "${gcc_cv_as_powerpc_dci+set}" = set; then : | |
23804 | $as_echo_n "(cached) " >&6 | |
23805 | else | |
23806 | gcc_cv_as_powerpc_dci=no | |
23807 | if test $in_tree_gas = yes; then | |
23808 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
23809 | then gcc_cv_as_powerpc_dci=yes | |
23810 | fi | |
23811 | elif test x$gcc_cv_as != x; then | |
23812 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23813 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
47f67e51 PB |
23814 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
23815 | (eval $ac_try) 2>&5 | |
23816 | ac_status=$? | |
23817 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23818 | test $ac_status = 0; }; } | |
23819 | then | |
23820 | gcc_cv_as_powerpc_dci=yes | |
23821 | else | |
23822 | echo "configure: failed program was" >&5 | |
23823 | cat conftest.s >&5 | |
23824 | fi | |
23825 | rm -f conftest.o conftest.s | |
23826 | fi | |
23827 | fi | |
23828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5 | |
23829 | $as_echo "$gcc_cv_as_powerpc_dci" >&6; } | |
23830 | if test $gcc_cv_as_powerpc_dci = yes; then | |
23831 | ||
23832 | $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h | |
23833 | ||
e51917ae JM |
23834 | fi |
23835 | ||
5213506e RW |
23836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 |
23837 | $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } | |
23838 | if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then : | |
23839 | $as_echo_n "(cached) " >&6 | |
e51917ae JM |
23840 | else |
23841 | gcc_cv_as_powerpc_gnu_attribute=no | |
23842 | if test $in_tree_gas = yes; then | |
23843 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
23844 | then gcc_cv_as_powerpc_gnu_attribute=yes | |
23845 | fi | |
23846 | elif test x$gcc_cv_as != x; then | |
23847 | echo '.gnu_attribute 4,1' > conftest.s | |
e0b0fd74 | 23848 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23849 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e51917ae JM |
23850 | (eval $ac_try) 2>&5 |
23851 | ac_status=$? | |
5213506e RW |
23852 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23853 | test $ac_status = 0; }; } | |
e51917ae JM |
23854 | then |
23855 | gcc_cv_as_powerpc_gnu_attribute=yes | |
23856 | else | |
23857 | echo "configure: failed program was" >&5 | |
23858 | cat conftest.s >&5 | |
23859 | fi | |
23860 | rm -f conftest.o conftest.s | |
23861 | fi | |
23862 | fi | |
5213506e RW |
23863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5 |
23864 | $as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; } | |
e51917ae JM |
23865 | if test $gcc_cv_as_powerpc_gnu_attribute = yes; then |
23866 | ||
5213506e | 23867 | $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h |
e51917ae | 23868 | |
9752c4ad AM |
23869 | fi |
23870 | ||
5213506e RW |
23871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5 |
23872 | $as_echo_n "checking assembler for tls marker support... " >&6; } | |
23873 | if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then : | |
23874 | $as_echo_n "(cached) " >&6 | |
9752c4ad AM |
23875 | else |
23876 | gcc_cv_as_powerpc_tls_markers=no | |
23877 | if test $in_tree_gas = yes; then | |
207bf79d | 23878 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0` |
9752c4ad AM |
23879 | then gcc_cv_as_powerpc_tls_markers=yes |
23880 | fi | |
23881 | elif test x$gcc_cv_as != x; then | |
23882 | echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s | |
e0b0fd74 | 23883 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23884 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
9752c4ad AM |
23885 | (eval $ac_try) 2>&5 |
23886 | ac_status=$? | |
5213506e RW |
23887 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23888 | test $ac_status = 0; }; } | |
9752c4ad AM |
23889 | then |
23890 | gcc_cv_as_powerpc_tls_markers=yes | |
23891 | else | |
23892 | echo "configure: failed program was" >&5 | |
23893 | cat conftest.s >&5 | |
23894 | fi | |
23895 | rm -f conftest.o conftest.s | |
23896 | fi | |
23897 | fi | |
5213506e RW |
23898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5 |
23899 | $as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; } | |
9752c4ad AM |
23900 | if test $gcc_cv_as_powerpc_tls_markers = yes; then |
23901 | ||
5213506e | 23902 | $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h |
9752c4ad | 23903 | |
7f970b70 | 23904 | fi |
636cf8b1 RS |
23905 | |
23906 | case $target in | |
23907 | *-*-aix*) | |
23908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5 | |
23909 | $as_echo_n "checking assembler for .ref support... " >&6; } | |
23910 | if test "${gcc_cv_as_aix_ref+set}" = set; then : | |
23911 | $as_echo_n "(cached) " >&6 | |
23912 | else | |
23913 | gcc_cv_as_aix_ref=no | |
23914 | if test $in_tree_gas = yes; then | |
23915 | if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + ` | |
23916 | then : | |
23917 | fi | |
23918 | elif test x$gcc_cv_as != x; then | |
23919 | echo ' .csect stuff[rw] | |
23920 | stuff: | |
23921 | .long 1 | |
23922 | .extern sym | |
23923 | .ref sym | |
23924 | ' > conftest.s | |
23925 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' | |
23926 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
23927 | (eval $ac_try) 2>&5 | |
23928 | ac_status=$? | |
23929 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23930 | test $ac_status = 0; }; } | |
23931 | then | |
23932 | gcc_cv_as_aix_ref=yes | |
23933 | else | |
23934 | echo "configure: failed program was" >&5 | |
23935 | cat conftest.s >&5 | |
23936 | fi | |
23937 | rm -f conftest.o conftest.s | |
23938 | fi | |
23939 | fi | |
23940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5 | |
23941 | $as_echo "$gcc_cv_as_aix_ref" >&6; } | |
23942 | if test $gcc_cv_as_aix_ref = yes; then | |
23943 | ||
23944 | $as_echo "#define HAVE_AS_REF 1" >>confdefs.h | |
23945 | ||
23946 | fi | |
23947 | ;; | |
23948 | esac | |
8ada417f ZW |
23949 | ;; |
23950 | ||
23951 | mips*-*-*) | |
5213506e RW |
23952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5 |
23953 | $as_echo_n "checking assembler for explicit relocation support... " >&6; } | |
23954 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then : | |
23955 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
23956 | else |
23957 | gcc_cv_as_mips_explicit_relocs=no | |
23958 | if test $in_tree_gas = yes; then | |
23959 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
23960 | then gcc_cv_as_mips_explicit_relocs=yes | |
23961 | fi | |
23962 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 23963 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
e0b0fd74 | 23964 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23965 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23966 | (eval $ac_try) 2>&5 |
23967 | ac_status=$? | |
5213506e RW |
23968 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23969 | test $ac_status = 0; }; } | |
8ada417f ZW |
23970 | then |
23971 | gcc_cv_as_mips_explicit_relocs=yes | |
23972 | else | |
23973 | echo "configure: failed program was" >&5 | |
23974 | cat conftest.s >&5 | |
ef1ecf87 | 23975 | fi |
8ada417f ZW |
23976 | rm -f conftest.o conftest.s |
23977 | fi | |
23978 | fi | |
5213506e RW |
23979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
23980 | $as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; } | |
8ada417f ZW |
23981 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
23982 | if test x$target_cpu_default = x | |
23983 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
23984 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
23985 | fi | |
4551169f | 23986 | fi |
5213506e RW |
23987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5 |
23988 | $as_echo_n "checking assembler for -mno-shared support... " >&6; } | |
23989 | if test "${gcc_cv_as_mips_no_shared+set}" = set; then : | |
23990 | $as_echo_n "(cached) " >&6 | |
4551169f RS |
23991 | else |
23992 | gcc_cv_as_mips_no_shared=no | |
23993 | if test $in_tree_gas = yes; then | |
23994 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` | |
23995 | then gcc_cv_as_mips_no_shared=yes | |
23996 | fi | |
23997 | elif test x$gcc_cv_as != x; then | |
23998 | echo 'nop' > conftest.s | |
e0b0fd74 | 23999 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5' |
5213506e | 24000 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
4551169f RS |
24001 | (eval $ac_try) 2>&5 |
24002 | ac_status=$? | |
5213506e RW |
24003 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24004 | test $ac_status = 0; }; } | |
4551169f RS |
24005 | then |
24006 | gcc_cv_as_mips_no_shared=yes | |
24007 | else | |
24008 | echo "configure: failed program was" >&5 | |
24009 | cat conftest.s >&5 | |
24010 | fi | |
24011 | rm -f conftest.o conftest.s | |
24012 | fi | |
24013 | fi | |
5213506e RW |
24014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5 |
24015 | $as_echo "$gcc_cv_as_mips_no_shared" >&6; } | |
4551169f RS |
24016 | if test $gcc_cv_as_mips_no_shared = yes; then |
24017 | ||
5213506e | 24018 | $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h |
4551169f | 24019 | |
dcb957d9 JM |
24020 | fi |
24021 | ||
5213506e RW |
24022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 |
24023 | $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } | |
24024 | if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then : | |
24025 | $as_echo_n "(cached) " >&6 | |
dcb957d9 JM |
24026 | else |
24027 | gcc_cv_as_mips_gnu_attribute=no | |
24028 | if test $in_tree_gas = yes; then | |
24029 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
24030 | then gcc_cv_as_mips_gnu_attribute=yes | |
24031 | fi | |
24032 | elif test x$gcc_cv_as != x; then | |
24033 | echo '.gnu_attribute 4,1' > conftest.s | |
e0b0fd74 | 24034 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24035 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
dcb957d9 JM |
24036 | (eval $ac_try) 2>&5 |
24037 | ac_status=$? | |
5213506e RW |
24038 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24039 | test $ac_status = 0; }; } | |
dcb957d9 JM |
24040 | then |
24041 | gcc_cv_as_mips_gnu_attribute=yes | |
24042 | else | |
24043 | echo "configure: failed program was" >&5 | |
24044 | cat conftest.s >&5 | |
24045 | fi | |
24046 | rm -f conftest.o conftest.s | |
24047 | fi | |
24048 | fi | |
5213506e RW |
24049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5 |
24050 | $as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; } | |
dcb957d9 JM |
24051 | if test $gcc_cv_as_mips_gnu_attribute = yes; then |
24052 | ||
5213506e | 24053 | $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h |
dcb957d9 | 24054 | |
a44380d2 JM |
24055 | fi |
24056 | ||
5213506e RW |
24057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5 |
24058 | $as_echo_n "checking assembler for .dtprelword support... " >&6; } | |
24059 | if test "${gcc_cv_as_mips_dtprelword+set}" = set; then : | |
24060 | $as_echo_n "(cached) " >&6 | |
a44380d2 JM |
24061 | else |
24062 | gcc_cv_as_mips_dtprelword=no | |
24063 | if test $in_tree_gas = yes; then | |
24064 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
24065 | then gcc_cv_as_mips_dtprelword=yes | |
24066 | fi | |
24067 | elif test x$gcc_cv_as != x; then | |
24068 | echo '.section .tdata,"awT",@progbits | |
24069 | x: | |
24070 | .word 2 | |
24071 | .text | |
24072 | .dtprelword x+0x8000' > conftest.s | |
e0b0fd74 | 24073 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24074 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a44380d2 JM |
24075 | (eval $ac_try) 2>&5 |
24076 | ac_status=$? | |
5213506e RW |
24077 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24078 | test $ac_status = 0; }; } | |
a44380d2 JM |
24079 | then |
24080 | gcc_cv_as_mips_dtprelword=yes | |
24081 | else | |
24082 | echo "configure: failed program was" >&5 | |
24083 | cat conftest.s >&5 | |
24084 | fi | |
24085 | rm -f conftest.o conftest.s | |
24086 | fi | |
24087 | fi | |
5213506e RW |
24088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5 |
24089 | $as_echo "$gcc_cv_as_mips_dtprelword" >&6; } | |
a44380d2 JM |
24090 | if test $gcc_cv_as_mips_dtprelword = yes; then |
24091 | ||
5213506e | 24092 | $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h |
a44380d2 | 24093 | |
8ada417f | 24094 | fi |
b53da244 AN |
24095 | |
24096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5 | |
24097 | $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; } | |
24098 | gcc_cv_as_ld_jalr_reloc=no | |
24099 | if test $gcc_cv_as_mips_explicit_relocs = yes; then | |
24100 | if test $in_tree_ld = yes ; then | |
24101 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24102 | && test $in_tree_ld_is_elf = yes; then | |
24103 | gcc_cv_as_ld_jalr_reloc=yes | |
24104 | fi | |
24105 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then | |
24106 | echo ' .ent x' > conftest.s | |
24107 | echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s | |
24108 | echo ' ld $25,%call16(y)($28)' >> conftest.s | |
24109 | echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s | |
24110 | echo '1: jalr $25' >> conftest.s | |
24111 | echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s | |
24112 | echo '1: jalr $25' >> conftest.s | |
24113 | echo ' .end x' >> conftest.s | |
24114 | if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \ | |
24115 | && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then | |
24116 | if $gcc_cv_objdump -d conftest.so | grep -q jalr \ | |
24117 | && $gcc_cv_objdump -d conftest.so | grep -q "bal.*<x>"; then | |
24118 | gcc_cv_as_ld_jalr_reloc=yes | |
24119 | fi | |
24120 | fi | |
24121 | rm -f conftest.* | |
24122 | fi | |
24123 | fi | |
24124 | if test $gcc_cv_as_ld_jalr_reloc = yes; then | |
24125 | if test x$target_cpu_default = x; then | |
24126 | target_cpu_default=MASK_RELAX_PIC_CALLS | |
24127 | else | |
24128 | target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | |
24129 | fi | |
24130 | fi | |
24131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 | |
24132 | $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } | |
49576e25 RS |
24133 | |
24134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5 | |
24135 | $as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; } | |
24136 | if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then : | |
24137 | $as_echo_n "(cached) " >&6 | |
24138 | else | |
24139 | gcc_cv_ld_mips_personality_relaxation=no | |
24140 | if test $in_tree_ld = yes ; then | |
24141 | if test "$gcc_cv_gld_major_version" -eq 2 \ | |
24142 | -a "$gcc_cv_gld_minor_version" -ge 21 \ | |
24143 | -o "$gcc_cv_gld_major_version" -gt 2; then | |
24144 | gcc_cv_ld_mips_personality_relaxation=yes | |
24145 | fi | |
24146 | elif test x$gcc_cv_as != x \ | |
24147 | -a x$gcc_cv_ld != x \ | |
24148 | -a x$gcc_cv_readelf != x ; then | |
24149 | cat > conftest.s <<EOF | |
24150 | .cfi_startproc | |
24151 | .cfi_personality 0x80,indirect_ptr | |
24152 | .ent test | |
24153 | test: | |
24154 | nop | |
24155 | .end test | |
24156 | .cfi_endproc | |
24157 | ||
24158 | .section .data,"aw",@progbits | |
24159 | indirect_ptr: | |
24160 | .dc.a personality | |
24161 | EOF | |
24162 | if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
24163 | && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then | |
24164 | if $gcc_cv_readelf -d conftest 2>&1 \ | |
24165 | | grep TEXTREL > /dev/null 2>&1; then | |
24166 | : | |
24167 | elif $gcc_cv_readelf --relocs conftest 2>&1 \ | |
24168 | | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then | |
24169 | : | |
24170 | else | |
24171 | gcc_cv_ld_mips_personality_relaxation=yes | |
24172 | fi | |
24173 | fi | |
24174 | fi | |
24175 | rm -f conftest.s conftest.o conftest | |
24176 | fi | |
24177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5 | |
24178 | $as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; } | |
24179 | if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then | |
24180 | ||
24181 | $as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h | |
24182 | ||
24183 | fi | |
dbad5e72 SE |
24184 | ;; |
24185 | esac | |
8ada417f | 24186 | |
dbad5e72 SE |
24187 | # Mips and HP-UX need the GNU assembler. |
24188 | # Linux on IA64 might be able to use the Intel assembler. | |
24189 | ||
24190 | case "$target" in | |
24191 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
24192 | if test x$gas_flag = xyes \ |
24193 | || test x"$host" != x"$build" \ | |
24194 | || test ! -x "$gcc_cv_as" \ | |
24195 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
24196 | : | |
24197 | else | |
24198 | echo "*** This configuration requires the GNU assembler" >&2 | |
24199 | exit 1 | |
24200 | fi | |
ef1ecf87 | 24201 | ;; |
1cb36a98 | 24202 | esac |
dbad5e72 | 24203 | |
9d147085 RH |
24204 | # ??? Not all targets support dwarf2 debug_line, even within a version |
24205 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
24206 | # info to the output file. So, as supported targets are added to gas 2.11, | |
24207 | # add some instruction here to (also) show we expect this might work. | |
24208 | # ??? Once 2.11 is released, probably need to add first known working | |
24209 | # version to the per-target configury. | |
24210 | case "$target" in | |
80486e06 | 24211 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
cd985f66 | 24212 | | x86_64*-*-* | hppa*-*-* | arm*-*-* \ |
ad9646c7 | 24213 | | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \ |
15a43677 | 24214 | | spu-*-* | fido*-*-* | m32c-*-*) |
9d147085 RH |
24215 | insn="nop" |
24216 | ;; | |
57116d8d | 24217 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
24218 | insn="nop 0" |
24219 | ;; | |
2853bc5a HPN |
24220 | mmix-*-*) |
24221 | insn="swym 0" | |
24222 | ;; | |
8ada417f ZW |
24223 | esac |
24224 | if test x"$insn" != x; then | |
24225 | conftest_s="\ | |
24226 | .file 1 \"conftest.s\" | |
24227 | .loc 1 3 0 | |
24228 | $insn" | |
5213506e RW |
24229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5 |
24230 | $as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; } | |
24231 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then : | |
24232 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24233 | else |
24234 | gcc_cv_as_dwarf2_debug_line=no | |
24235 | if test $in_tree_gas = yes; then | |
24236 | if test $in_tree_gas_is_elf = yes \ | |
24237 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24238 | then gcc_cv_as_dwarf2_debug_line=yes | |
24239 | fi | |
24240 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24241 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 24242 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24243 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24244 | (eval $ac_try) 2>&5 |
24245 | ac_status=$? | |
5213506e RW |
24246 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24247 | test $ac_status = 0; }; } | |
8ada417f | 24248 | then |
080a5bb0 EB |
24249 | if test x$gcc_cv_objdump != x \ |
24250 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
24251 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
24252 | gcc_cv_as_dwarf2_debug_line=yes |
24253 | fi | |
24254 | else | |
24255 | echo "configure: failed program was" >&5 | |
24256 | cat conftest.s >&5 | |
24257 | fi | |
24258 | rm -f conftest.o conftest.s | |
24259 | fi | |
24260 | fi | |
5213506e RW |
24261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
24262 | $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; } | |
ad9c4d9f | 24263 | |
ad9c4d9f | 24264 | |
8ada417f ZW |
24265 | # The .debug_line file table must be in the exact order that |
24266 | # we specified the files, since these indices are also used | |
24267 | # by DW_AT_decl_file. Approximate this test by testing if | |
24268 | # the assembler bitches if the same index is assigned twice. | |
5213506e RW |
24269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5 |
24270 | $as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; } | |
24271 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then : | |
24272 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24273 | else |
24274 | gcc_cv_as_dwarf2_file_buggy=no | |
24275 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 24276 | echo ' .file 1 "foo.s" |
8ada417f | 24277 | .file 1 "bar.s"' > conftest.s |
e0b0fd74 | 24278 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24279 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24280 | (eval $ac_try) 2>&5 |
24281 | ac_status=$? | |
5213506e RW |
24282 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24283 | test $ac_status = 0; }; } | |
8ada417f ZW |
24284 | then |
24285 | gcc_cv_as_dwarf2_file_buggy=yes | |
24286 | else | |
24287 | echo "configure: failed program was" >&5 | |
24288 | cat conftest.s >&5 | |
24289 | fi | |
24290 | rm -f conftest.o conftest.s | |
24291 | fi | |
ad9c4d9f | 24292 | fi |
5213506e RW |
24293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
24294 | $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; } | |
8ada417f ZW |
24295 | |
24296 | ||
24297 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
24298 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 | 24299 | |
5213506e | 24300 | $as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h |
9d147085 | 24301 | |
8ada417f | 24302 | fi |
ad9c4d9f | 24303 | |
5213506e RW |
24304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5 |
24305 | $as_echo_n "checking assembler for --gdwarf2 option... " >&6; } | |
24306 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then : | |
24307 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24308 | else |
24309 | gcc_cv_as_gdwarf2_flag=no | |
24310 | if test $in_tree_gas = yes; then | |
24311 | if test $in_tree_gas_is_elf = yes \ | |
24312 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24313 | then gcc_cv_as_gdwarf2_flag=yes | |
24314 | fi | |
24315 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24316 | echo "$insn" > conftest.s |
e0b0fd74 | 24317 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5' |
5213506e | 24318 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24319 | (eval $ac_try) 2>&5 |
24320 | ac_status=$? | |
5213506e RW |
24321 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24322 | test $ac_status = 0; }; } | |
8ada417f ZW |
24323 | then |
24324 | gcc_cv_as_gdwarf2_flag=yes | |
24325 | else | |
24326 | echo "configure: failed program was" >&5 | |
24327 | cat conftest.s >&5 | |
24328 | fi | |
24329 | rm -f conftest.o conftest.s | |
24330 | fi | |
ad9c4d9f | 24331 | fi |
5213506e RW |
24332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5 |
24333 | $as_echo "$gcc_cv_as_gdwarf2_flag" >&6; } | |
63cf211a | 24334 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 | 24335 | |
5213506e | 24336 | $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h |
5f0e9ea2 GK |
24337 | |
24338 | fi | |
ad9c4d9f | 24339 | |
5213506e RW |
24340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5 |
24341 | $as_echo_n "checking assembler for --gstabs option... " >&6; } | |
24342 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then : | |
24343 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24344 | else |
24345 | gcc_cv_as_gstabs_flag=no | |
24346 | if test $in_tree_gas = yes; then | |
24347 | if test $in_tree_gas_is_elf = yes \ | |
24348 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24349 | then gcc_cv_as_gstabs_flag=yes | |
24350 | fi | |
24351 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24352 | echo "$insn" > conftest.s |
e0b0fd74 | 24353 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5' |
5213506e | 24354 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24355 | (eval $ac_try) 2>&5 |
24356 | ac_status=$? | |
5213506e RW |
24357 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24358 | test $ac_status = 0; }; } | |
8ada417f ZW |
24359 | then |
24360 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
24361 | # and warns about it, but still exits successfully. So check for | |
24362 | # this. | |
ba479fd2 | 24363 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
5213506e | 24364 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24365 | (eval $ac_try) 2>&5 |
24366 | ac_status=$? | |
5213506e RW |
24367 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24368 | test $ac_status = 0; }; } | |
8ada417f ZW |
24369 | then : |
24370 | else gcc_cv_as_gstabs_flag=yes | |
24371 | fi | |
24372 | else | |
24373 | echo "configure: failed program was" >&5 | |
24374 | cat conftest.s >&5 | |
24375 | fi | |
24376 | rm -f conftest.o conftest.s | |
24377 | fi | |
ad9c4d9f | 24378 | fi |
5213506e RW |
24379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5 |
24380 | $as_echo "$gcc_cv_as_gstabs_flag" >&6; } | |
63cf211a | 24381 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 | 24382 | |
5213506e | 24383 | $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h |
5f0e9ea2 | 24384 | |
c8aea42c PB |
24385 | fi |
24386 | ||
5213506e RW |
24387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5 |
24388 | $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; } | |
24389 | if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then : | |
24390 | $as_echo_n "(cached) " >&6 | |
c8aea42c PB |
24391 | else |
24392 | gcc_cv_as_debug_prefix_map_flag=no | |
24393 | if test $in_tree_gas = yes; then | |
303a4698 | 24394 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` |
c8aea42c PB |
24395 | then gcc_cv_as_debug_prefix_map_flag=yes |
24396 | fi | |
24397 | elif test x$gcc_cv_as != x; then | |
24398 | echo "$insn" > conftest.s | |
e0b0fd74 | 24399 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5' |
5213506e | 24400 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c8aea42c PB |
24401 | (eval $ac_try) 2>&5 |
24402 | ac_status=$? | |
5213506e RW |
24403 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24404 | test $ac_status = 0; }; } | |
c8aea42c PB |
24405 | then |
24406 | gcc_cv_as_debug_prefix_map_flag=yes | |
24407 | else | |
24408 | echo "configure: failed program was" >&5 | |
24409 | cat conftest.s >&5 | |
24410 | fi | |
24411 | rm -f conftest.o conftest.s | |
24412 | fi | |
24413 | fi | |
5213506e RW |
24414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5 |
24415 | $as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; } | |
c8aea42c PB |
24416 | if test $gcc_cv_as_debug_prefix_map_flag = yes; then |
24417 | ||
5213506e | 24418 | $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h |
c8aea42c | 24419 | |
5f0e9ea2 | 24420 | fi |
8ada417f | 24421 | fi |
5f0e9ea2 | 24422 | |
5213506e RW |
24423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5 |
24424 | $as_echo_n "checking assembler for .lcomm with alignment... " >&6; } | |
24425 | if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then : | |
24426 | $as_echo_n "(cached) " >&6 | |
28e6bb13 NC |
24427 | else |
24428 | gcc_cv_as_lcomm_with_alignment=no | |
24429 | if test x$gcc_cv_as != x; then | |
24430 | echo '.lcomm bar,4,16' > conftest.s | |
e0b0fd74 | 24431 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24432 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
28e6bb13 NC |
24433 | (eval $ac_try) 2>&5 |
24434 | ac_status=$? | |
5213506e RW |
24435 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24436 | test $ac_status = 0; }; } | |
28e6bb13 NC |
24437 | then |
24438 | gcc_cv_as_lcomm_with_alignment=yes | |
24439 | else | |
24440 | echo "configure: failed program was" >&5 | |
24441 | cat conftest.s >&5 | |
24442 | fi | |
24443 | rm -f conftest.o conftest.s | |
24444 | fi | |
24445 | fi | |
5213506e RW |
24446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5 |
24447 | $as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; } | |
28e6bb13 NC |
24448 | if test $gcc_cv_as_lcomm_with_alignment = yes; then |
24449 | ||
5213506e | 24450 | $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h |
28e6bb13 NC |
24451 | |
24452 | fi | |
24453 | ||
5213506e RW |
24454 | # Check whether --enable-gnu-unique-object was given. |
24455 | if test "${enable_gnu_unique_object+set}" = set; then : | |
24456 | enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in | |
e31bcd1b | 24457 | yes | no) ;; |
5213506e RW |
24458 | *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object. |
24459 | Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; | |
e31bcd1b JM |
24460 | esac |
24461 | else | |
5213506e RW |
24462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5 |
24463 | $as_echo_n "checking assembler for gnu_unique_object... " >&6; } | |
24464 | if test "${gcc_cv_as_gnu_unique_object+set}" = set; then : | |
24465 | $as_echo_n "(cached) " >&6 | |
e31bcd1b JM |
24466 | else |
24467 | gcc_cv_as_gnu_unique_object=no | |
24468 | if test $in_tree_gas = yes; then | |
24469 | if test $in_tree_gas_is_elf = yes \ | |
24470 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52` | |
24471 | then gcc_cv_as_gnu_unique_object=yes | |
24472 | fi | |
24473 | elif test x$gcc_cv_as != x; then | |
24474 | echo '.type foo, @gnu_unique_object' > conftest.s | |
e0b0fd74 | 24475 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24476 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e31bcd1b JM |
24477 | (eval $ac_try) 2>&5 |
24478 | ac_status=$? | |
5213506e RW |
24479 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24480 | test $ac_status = 0; }; } | |
e31bcd1b | 24481 | then |
e00ded68 | 24482 | gcc_cv_as_gnu_unique_object=yes |
e31bcd1b JM |
24483 | else |
24484 | echo "configure: failed program was" >&5 | |
24485 | cat conftest.s >&5 | |
24486 | fi | |
24487 | rm -f conftest.o conftest.s | |
24488 | fi | |
24489 | fi | |
5213506e RW |
24490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5 |
24491 | $as_echo "$gcc_cv_as_gnu_unique_object" >&6; } | |
e31bcd1b | 24492 | if test $gcc_cv_as_gnu_unique_object = yes; then |
e00ded68 JM |
24493 | # Also check for ld.so support, i.e. glibc 2.11 or higher. |
24494 | if test x$host = x$build -a x$host = x$target && | |
cdf6bfb7 | 24495 | glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then |
1a242e3c UB |
24496 | glibcmajor=`expr "$glibcver" : "\([0-9]*\)"` |
24497 | glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"` | |
e00ded68 JM |
24498 | glibcnum=`expr $glibcmajor \* 1000 + $glibcminor` |
24499 | if test "$glibcnum" -ge 2011 ; then | |
24500 | enable_gnu_unique_object=yes | |
24501 | fi | |
24502 | fi | |
e31bcd1b | 24503 | fi |
5213506e RW |
24504 | fi |
24505 | ||
e31bcd1b JM |
24506 | if test x$enable_gnu_unique_object = xyes; then |
24507 | ||
5213506e | 24508 | $as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h |
e31bcd1b JM |
24509 | |
24510 | fi | |
24511 | ||
5213506e RW |
24512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5 |
24513 | $as_echo_n "checking assembler for tolerance to line number 0... " >&6; } | |
24514 | if test "${gcc_cv_as_line_zero+set}" = set; then : | |
24515 | $as_echo_n "(cached) " >&6 | |
03943c05 AO |
24516 | else |
24517 | gcc_cv_as_line_zero=no | |
24518 | if test $in_tree_gas = yes; then | |
cf0eb7a1 AO |
24519 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91` |
24520 | then gcc_cv_as_line_zero=yes | |
03943c05 AO |
24521 | fi |
24522 | elif test "x$gcc_cv_as" != x; then | |
24523 | { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s | |
24524 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out' | |
5213506e | 24525 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
03943c05 AO |
24526 | (eval $ac_try) 2>&5 |
24527 | ac_status=$? | |
5213506e RW |
24528 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24529 | test $ac_status = 0; }; } && | |
03943c05 AO |
24530 | test "x`cat conftest.out`" = x |
24531 | then | |
24532 | gcc_cv_as_line_zero=yes | |
24533 | else | |
24534 | echo "configure: failed program was" >&5 | |
24535 | cat conftest.s >&5 | |
24536 | echo "configure: error output was" >&5 | |
24537 | cat conftest.out >&5 | |
24538 | fi | |
24539 | rm -f conftest.o conftest.s conftest.out | |
24540 | fi | |
24541 | fi | |
5213506e RW |
24542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5 |
24543 | $as_echo "$gcc_cv_as_line_zero" >&6; } | |
03943c05 AO |
24544 | if test "x$gcc_cv_as_line_zero" = xyes; then |
24545 | ||
5213506e | 24546 | $as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h |
03943c05 AO |
24547 | |
24548 | fi | |
24549 | ||
5213506e RW |
24550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5 |
24551 | $as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; } | |
275b60d6 | 24552 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 24553 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
24554 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ |
24555 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
24556 | gcc_cv_ld_eh_frame_hdr=yes |
24557 | fi | |
24558 | elif test x$gcc_cv_ld != x; then | |
24559 | # Check if linker supports --eh-frame-hdr option | |
24560 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
24561 | gcc_cv_ld_eh_frame_hdr=yes | |
24562 | fi | |
24563 | fi | |
232b67d9 | 24564 | |
275b60d6 | 24565 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 | 24566 | |
5213506e | 24567 | $as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h |
275b60d6 JJ |
24568 | |
24569 | fi | |
5213506e RW |
24570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
24571 | $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; } | |
275b60d6 | 24572 | |
5213506e RW |
24573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5 |
24574 | $as_echo_n "checking linker position independent executable support... " >&6; } | |
24a4dd31 JJ |
24575 | gcc_cv_ld_pie=no |
24576 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
24577 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \ |
24578 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
24579 | gcc_cv_ld_pie=yes |
24580 | fi | |
24581 | elif test x$gcc_cv_ld != x; then | |
24582 | # Check if linker supports -pie option | |
24583 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
24584 | gcc_cv_ld_pie=yes | |
24585 | fi | |
24586 | fi | |
24587 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 | 24588 | |
5213506e | 24589 | $as_echo "#define HAVE_LD_PIE 1" >>confdefs.h |
24a4dd31 JJ |
24590 | |
24591 | fi | |
5213506e RW |
24592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5 |
24593 | $as_echo "$gcc_cv_ld_pie" >&6; } | |
24a4dd31 | 24594 | |
5213506e RW |
24595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5 |
24596 | $as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; } | |
22ba88ef | 24597 | gcc_cv_ld_eh_gc_sections=no |
b639c3c2 JJ |
24598 | if test $in_tree_ld = yes ; then |
24599 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24600 | && test $in_tree_ld_is_elf = yes; then | |
24601 | gcc_cv_ld_eh_gc_sections=yes | |
24602 | fi | |
24603 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
24604 | cat > conftest.s <<EOF | |
24605 | .section .text | |
24606 | .globl _start | |
24607 | .type _start, @function | |
24608 | _start: | |
24609 | .long foo | |
24610 | .size _start, .-_start | |
24611 | .section .text.foo,"ax",@progbits | |
24612 | .type foo, @function | |
24613 | foo: | |
24614 | .long 0 | |
24615 | .size foo, .-foo | |
24616 | .section .gcc_except_table.foo,"a",@progbits | |
24617 | .L0: | |
24618 | .long 0 | |
24619 | .section .eh_frame,"a",@progbits | |
24620 | .long .L0 | |
24621 | EOF | |
24622 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
24623 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
24624 | | grep "gc-sections option ignored" > /dev/null; then | |
24625 | gcc_cv_ld_eh_gc_sections=no | |
24626 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
24627 | gcc_cv_ld_eh_gc_sections=yes | |
24628 | # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections. | |
24629 | if test x$gcc_cv_as_comdat_group != xyes; then | |
24630 | gcc_cv_ld_eh_gc_sections=no | |
24631 | cat > conftest.s <<EOF | |
24632 | .section .text | |
24633 | .globl _start | |
24634 | .type _start, @function | |
24635 | _start: | |
24636 | .long foo | |
24637 | .size _start, .-_start | |
24638 | .section .gnu.linkonce.t.foo,"ax",@progbits | |
24639 | .type foo, @function | |
24640 | foo: | |
24641 | .long 0 | |
24642 | .size foo, .-foo | |
24643 | .section .gcc_except_table.foo,"a",@progbits | |
24644 | .L0: | |
24645 | .long 0 | |
24646 | .section .eh_frame,"a",@progbits | |
24647 | .long .L0 | |
24648 | EOF | |
24649 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
24650 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
24651 | | grep "gc-sections option ignored" > /dev/null; then | |
24652 | gcc_cv_ld_eh_gc_sections=no | |
24653 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
24654 | gcc_cv_ld_eh_gc_sections=yes | |
24655 | fi | |
24656 | fi | |
24657 | fi | |
24658 | fi | |
24659 | fi | |
24660 | rm -f conftest.s conftest.o conftest | |
24661 | fi | |
e9d207d9 EB |
24662 | case "$target" in |
24663 | hppa*-*-linux*) | |
24664 | # ??? This apparently exposes a binutils bug with PC-relative relocations. | |
24665 | gcc_cv_ld_eh_gc_sections=no | |
24666 | ;; | |
24667 | esac | |
22ba88ef EB |
24668 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then |
24669 | ||
5213506e | 24670 | $as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h |
22ba88ef EB |
24671 | |
24672 | fi | |
5213506e RW |
24673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5 |
24674 | $as_echo "$gcc_cv_ld_eh_gc_sections" >&6; } | |
22ba88ef | 24675 | |
8bb915b6 NN |
24676 | # -------- |
24677 | # UNSORTED | |
24678 | # -------- | |
24679 | ||
5213506e RW |
24680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5 |
24681 | $as_echo_n "checking linker --as-needed support... " >&6; } | |
24682 | if test "${gcc_cv_ld_as_needed+set}" = set; then : | |
24683 | $as_echo_n "(cached) " >&6 | |
82e923f6 RS |
24684 | else |
24685 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
24686 | if test $in_tree_ld = yes ; then |
24687 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24688 | && test $in_tree_ld_is_elf = yes; then | |
24689 | gcc_cv_ld_as_needed=yes | |
24690 | fi | |
24691 | elif test x$gcc_cv_ld != x; then | |
24692 | # Check if linker supports --as-needed and --no-as-needed options | |
24693 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
24694 | gcc_cv_ld_as_needed=yes | |
24695 | fi | |
24696 | fi | |
82e923f6 RS |
24697 | |
24698 | fi | |
5213506e RW |
24699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5 |
24700 | $as_echo "$gcc_cv_ld_as_needed" >&6; } | |
765f1bf9 AM |
24701 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
24702 | ||
5213506e | 24703 | $as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h |
765f1bf9 AM |
24704 | |
24705 | fi | |
765f1bf9 | 24706 | |
d82bf747 AM |
24707 | case "$target:$tm_file" in |
24708 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
5213506e RW |
24709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5 |
24710 | $as_echo_n "checking linker support for omitting dot symbols... " >&6; } | |
24711 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then : | |
24712 | $as_echo_n "(cached) " >&6 | |
85b776df AM |
24713 | else |
24714 | gcc_cv_ld_no_dot_syms=no | |
24715 | if test $in_tree_ld = yes ; then | |
24716 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then | |
24717 | gcc_cv_ld_no_dot_syms=yes | |
24718 | fi | |
24719 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
24720 | cat > conftest1.s <<EOF | |
24721 | .text | |
24722 | bl .foo | |
24723 | EOF | |
24724 | cat > conftest2.s <<EOF | |
24725 | .section ".opd","aw" | |
24726 | .align 3 | |
24727 | .globl foo | |
24728 | .type foo,@function | |
24729 | foo: | |
24730 | .quad .LEfoo,.TOC.@tocbase,0 | |
24731 | .text | |
24732 | .LEfoo: | |
24733 | blr | |
24734 | .size foo,.-.LEfoo | |
24735 | EOF | |
24736 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
24737 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
24738 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
24739 | gcc_cv_ld_no_dot_syms=yes | |
24740 | fi | |
24741 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
24742 | fi | |
24743 | ||
24744 | fi | |
5213506e RW |
24745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5 |
24746 | $as_echo "$gcc_cv_ld_no_dot_syms" >&6; } | |
85b776df AM |
24747 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
24748 | ||
5213506e | 24749 | $as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h |
85b776df AM |
24750 | |
24751 | fi | |
24752 | ;; | |
24753 | esac | |
24754 | ||
5213506e RW |
24755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 |
24756 | $as_echo_n "checking linker --build-id support... " >&6; } | |
24757 | if test "${gcc_cv_ld_buildid+set}" = set; then : | |
24758 | $as_echo_n "(cached) " >&6 | |
cd533689 PP |
24759 | else |
24760 | gcc_cv_ld_buildid=no | |
24761 | if test $in_tree_ld = yes ; then | |
24762 | if test "$gcc_cv_gld_major_version" -eq 2 -a \ | |
24763 | "$gcc_cv_gld_minor_version" -ge 18 -o \ | |
24764 | "$gcc_cv_gld_major_version" -gt 2 \ | |
24765 | && test $in_tree_ld_is_elf = yes; then | |
24766 | gcc_cv_ld_buildid=yes | |
24767 | fi | |
24768 | elif test x$gcc_cv_ld != x; then | |
24769 | if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then | |
24770 | gcc_cv_ld_buildid=yes | |
24771 | fi | |
24772 | fi | |
24773 | fi | |
5213506e RW |
24774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5 |
24775 | $as_echo "$gcc_cv_ld_buildid" >&6; } | |
cd533689 PP |
24776 | if test x"$gcc_cv_ld_buildid" = xyes; then |
24777 | ||
5213506e | 24778 | $as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h |
cd533689 PP |
24779 | |
24780 | fi | |
24781 | ||
5213506e RW |
24782 | # Check whether --enable-linker-build-id was given. |
24783 | if test "${enable_linker_build_id+set}" = set; then : | |
24784 | enableval=$enable_linker_build_id; | |
cd533689 PP |
24785 | else |
24786 | enable_linker_build_id=no | |
5213506e RW |
24787 | fi |
24788 | ||
cd533689 PP |
24789 | |
24790 | if test x"$enable_linker_build_id" = xyes; then | |
24791 | if test x"$gcc_cv_ld_buildid" = xyes; then | |
24792 | ||
5213506e | 24793 | $as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h |
cd533689 PP |
24794 | |
24795 | else | |
5213506e RW |
24796 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5 |
24797 | $as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;} | |
cd533689 PP |
24798 | fi |
24799 | fi | |
24800 | ||
5213506e RW |
24801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5 |
24802 | $as_echo_n "checking linker --sysroot support... " >&6; } | |
24803 | if test "${gcc_cv_ld_sysroot+set}" = set; then : | |
24804 | $as_echo_n "(cached) " >&6 | |
380e5ca4 MM |
24805 | else |
24806 | gcc_cv_ld_sysroot=no | |
24807 | if test $in_tree_ld = yes ; then | |
24808 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then | |
7032df40 | 24809 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
24810 | fi |
24811 | elif test x$gcc_cv_ld != x; then | |
24812 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
24813 | gcc_cv_ld_sysroot=yes | |
24814 | fi | |
24815 | fi | |
24816 | fi | |
5213506e RW |
24817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5 |
24818 | $as_echo "$gcc_cv_ld_sysroot" >&6; } | |
380e5ca4 MM |
24819 | if test x"$gcc_cv_ld_sysroot" = xyes; then |
24820 | ||
5213506e | 24821 | $as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h |
380e5ca4 MM |
24822 | |
24823 | fi | |
24824 | ||
9fb28a67 | 24825 | if test x$with_sysroot = x && test x$host = x$target \ |
c794c06f CD |
24826 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ |
24827 | && test "$prefix" != "NONE"; then | |
ba479fd2 NN |
24828 | |
24829 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 24830 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 24831 | _ACEOF |
793e9558 PB |
24832 | |
24833 | fi | |
24834 | ||
77008252 | 24835 | # Test for stack protector support in target C library. |
5213506e RW |
24836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5 |
24837 | $as_echo_n "checking __stack_chk_fail in target C library... " >&6; } | |
24838 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then : | |
24839 | $as_echo_n "(cached) " >&6 | |
77008252 JJ |
24840 | else |
24841 | gcc_cv_libc_provides_ssp=no | |
a6ccdbab | 24842 | case "$target" in |
22f96a0f | 24843 | *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) |
77008252 | 24844 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then |
b0a69d20 MK |
24845 | if test "x$with_headers" != x; then |
24846 | glibc_header_dir=$with_headers | |
24847 | elif test "x$with_sysroot" = x; then | |
77008252 | 24848 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" |
c9ecbf86 JM |
24849 | elif test "x$with_build_sysroot" != "x"; then |
24850 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
77008252 JJ |
24851 | elif test "x$with_sysroot" = xyes; then |
24852 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
24853 | else | |
24854 | glibc_header_dir="${with_sysroot}/usr/include" | |
24855 | fi | |
24856 | else | |
24857 | glibc_header_dir=/usr/include | |
24858 | fi | |
24859 | # glibc 2.4 and later provides __stack_chk_fail and | |
24860 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
24861 | if test -f $glibc_header_dir/features.h \ | |
24862 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
24863 | $glibc_header_dir/features.h > /dev/null; then | |
24864 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
24865 | $glibc_header_dir/features.h > /dev/null; then | |
24866 | gcc_cv_libc_provides_ssp=yes | |
24867 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
24868 | $glibc_header_dir/features.h > /dev/null \ | |
24869 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
24870 | $glibc_header_dir/features.h > /dev/null; then | |
24871 | gcc_cv_libc_provides_ssp=yes | |
fed6d628 BF |
24872 | elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ |
24873 | $glibc_header_dir/features.h > /dev/null && \ | |
24874 | test -f $glibc_header_dir/bits/uClibc_config.h && \ | |
24875 | $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \ | |
24876 | $glibc_header_dir/bits/uClibc_config.h > /dev/null; then | |
24877 | gcc_cv_libc_provides_ssp=yes | |
77008252 | 24878 | fi |
fed6d628 | 24879 | fi |
a6ccdbab | 24880 | ;; |
4cc115a2 TS |
24881 | *-*-gnu*) |
24882 | # Avoid complicated tests (see | |
24883 | # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now | |
24884 | # simply assert that glibc does provide this, which is true for all | |
24885 | # realistically usable GNU/Hurd configurations. | |
24886 | gcc_cv_libc_provides_ssp=yes;; | |
61e1d511 | 24887 | *-*-darwin* | *-*-freebsd*) |
5213506e RW |
24888 | ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" |
24889 | if test "x$ac_cv_func___stack_chk_fail" = x""yes; then : | |
a6ccdbab EC |
24890 | gcc_cv_libc_provides_ssp=yes |
24891 | else | |
24892 | echo "no __stack_chk_fail on this target" | |
77008252 | 24893 | fi |
a6ccdbab EC |
24894 | |
24895 | ;; | |
77008252 | 24896 | *) gcc_cv_libc_provides_ssp=no ;; |
a6ccdbab EC |
24897 | esac |
24898 | fi | |
5213506e RW |
24899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5 |
24900 | $as_echo "$gcc_cv_libc_provides_ssp" >&6; } | |
a6ccdbab | 24901 | |
77008252 JJ |
24902 | if test x$gcc_cv_libc_provides_ssp = xyes; then |
24903 | ||
5213506e | 24904 | $as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h |
77008252 JJ |
24905 | |
24906 | fi | |
24907 | ||
ed965309 JJ |
24908 | # Check if TFmode long double should be used by default or not. |
24909 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
24910 | # and later they can use TFmode. | |
24911 | case "$target" in | |
f7cc5390 JM |
24912 | powerpc*-*-linux* | \ |
24913 | powerpc*-*-gnu* | \ | |
ed965309 JJ |
24914 | sparc*-*-linux* | \ |
24915 | s390*-*-linux* | \ | |
24916 | alpha*-*-linux*) | |
24917 | ||
5213506e RW |
24918 | # Check whether --with-long-double-128 was given. |
24919 | if test "${with_long_double_128+set}" = set; then : | |
24920 | withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" | |
ed965309 JJ |
24921 | else |
24922 | gcc_cv_target_ldbl128=no | |
24923 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
24924 | if test "x$with_sysroot" = x; then | |
24925 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
24926 | elif test "x$with_build_sysroot" != "x"; then |
24927 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
ed965309 JJ |
24928 | elif test "x$with_sysroot" = xyes; then |
24929 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
24930 | else | |
24931 | glibc_header_dir="${with_sysroot}/usr/include" | |
24932 | fi | |
24933 | else | |
24934 | glibc_header_dir=/usr/include | |
24935 | fi | |
65280f6c | 24936 | grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
ed965309 JJ |
24937 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
24938 | && gcc_cv_target_ldbl128=yes | |
65280f6c | 24939 | |
5213506e RW |
24940 | fi |
24941 | ||
ed965309 JJ |
24942 | ;; |
24943 | esac | |
24944 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
24945 | ||
5213506e | 24946 | $as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h |
ed965309 JJ |
24947 | |
24948 | fi | |
24949 | ||
81bf3d9e | 24950 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 24951 | |
5213506e RW |
24952 | # Check whether --with-gc was given. |
24953 | if test "${with_gc+set}" = set; then : | |
24954 | withval=$with_gc; case "$withval" in | |
08cee789 | 24955 | page) |
81bf3d9e | 24956 | GGC=ggc-$withval |
08cee789 DJ |
24957 | ;; |
24958 | zone) | |
24959 | GGC=ggc-$withval | |
24960 | ||
5213506e | 24961 | $as_echo "#define GGC_ZONE 1" >>confdefs.h |
08cee789 | 24962 | |
81bf3d9e RH |
24963 | ;; |
24964 | *) | |
5213506e | 24965 | as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5 |
81bf3d9e RH |
24966 | ;; |
24967 | esac | |
24968 | else | |
005537df | 24969 | GGC=ggc-page |
5213506e RW |
24970 | fi |
24971 | ||
81bf3d9e RH |
24972 | |
24973 | echo "Using $GGC for garbage collection." | |
24974 | ||
00020c16 ILT |
24975 | # Libraries to use on the host. This will normally be set by the top |
24976 | # level Makefile. Here we simply capture the value for our Makefile. | |
24977 | if test -z "${HOST_LIBS+set}"; then | |
24978 | HOST_LIBS= | |
24979 | fi | |
24980 | ||
24981 | ||
3c809ba4 | 24982 | # Use the system's zlib library. |
b8dad04b ZW |
24983 | zlibdir=-L../zlib |
24984 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 24985 | |
5213506e RW |
24986 | # Check whether --with-system-zlib was given. |
24987 | if test "${with_system_zlib+set}" = set; then : | |
24988 | withval=$with_system_zlib; zlibdir= | |
3c809ba4 AG |
24989 | zlibinc= |
24990 | ||
5213506e RW |
24991 | fi |
24992 | ||
b8ec3cc8 | 24993 | |
703d89ab | 24994 | |
ab22c1fa | 24995 | |
1a4b763e | 24996 | |
5213506e RW |
24997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
24998 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
24999 | # Check whether --enable-maintainer-mode was given. | |
25000 | if test "${enable_maintainer_mode+set}" = set; then : | |
25001 | enableval=$enable_maintainer_mode; maintainer_mode=$enableval | |
dc6746e7 PT |
25002 | else |
25003 | maintainer_mode=no | |
5213506e | 25004 | fi |
a6ccdbab | 25005 | |
5213506e RW |
25006 | |
25007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5 | |
25008 | $as_echo "$maintainer_mode" >&6; } | |
dc6746e7 PT |
25009 | |
25010 | if test "$maintainer_mode" = "yes"; then | |
25011 | MAINT='' | |
25012 | else | |
25013 | MAINT='#' | |
25014 | fi | |
25015 | ||
8bb915b6 NN |
25016 | # -------------- |
25017 | # Language hooks | |
25018 | # -------------- | |
25019 | ||
861bb6c1 JL |
25020 | # Make empty files to contain the specs and options for each language. |
25021 | # Then add #include lines to for a compiler that has specs and/or options. | |
25022 | ||
cc11cc9b | 25023 | subdirs= |
d7b42618 | 25024 | lang_opt_files= |
861bb6c1 | 25025 | lang_specs_files= |
3103b7db | 25026 | lang_tree_files= |
861bb6c1 JL |
25027 | # These (without "all_") are set in each config-lang.in. |
25028 | # `language' must be a single word so is spelled singularly. | |
25029 | all_languages= | |
861bb6c1 | 25030 | all_compilers= |
47ad7893 | 25031 | all_outputs='Makefile gccbug' |
861bb6c1 | 25032 | # List of language makefile fragments. |
2ed26f6b ZW |
25033 | all_lang_makefrags= |
25034 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 25035 | all_lang_makefiles= |
703d89ab | 25036 | # Additional files for gengtype |
ef69da62 | 25037 | all_gtfiles="$target_gtfiles" |
861bb6c1 | 25038 | |
cc11cc9b PB |
25039 | # These are the languages that are set in --enable-languages, |
25040 | # and are available in the GCC tree. | |
25041 | all_selected_languages= | |
25042 | ||
861bb6c1 JL |
25043 | # Add the language fragments. |
25044 | # Languages are added via two mechanisms. Some information must be | |
25045 | # recorded in makefile variables, these are defined in config-lang.in. | |
25046 | # We accumulate them and plug them into the main Makefile. | |
25047 | # The other mechanism is a set of hooks for each of the main targets | |
25048 | # like `clean', `install', etc. | |
25049 | ||
861bb6c1 | 25050 | language_hooks="Make-hooks" |
861bb6c1 | 25051 | |
cc11cc9b | 25052 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 25053 | do |
1546bb64 PB |
25054 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
25055 | ||
cc11cc9b PB |
25056 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
25057 | if test "x$lang_alias" = x | |
25058 | then | |
25059 | echo "$lang doesn't set \$language." 1>&2 | |
25060 | exit 1 | |
25061 | fi | |
25062 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
25063 | subdirs="$subdirs $subdir" | |
349c3166 OH |
25064 | |
25065 | # $gcc_subdir is where the gcc integration files are to be found | |
25066 | # for a language, both for internal compiler purposes (compiler | |
25067 | # sources implementing front-end to GCC tree converters), and for | |
25068 | # build infrastructure purposes (Make-lang.in, etc.) | |
25069 | # | |
25070 | # This will be <subdir> (relative to $srcdir) if a line like | |
25071 | # gcc_subdir="<subdir>" or gcc_subdir=<subdir> | |
25072 | # is found in <langdir>/config-lang.in, and will remain <langdir> | |
25073 | # otherwise. | |
25074 | # | |
25075 | # Except for the language alias (fetched above), the regular | |
25076 | # "config-lang.in" contents are always retrieved from $gcc_subdir, | |
25077 | # so a <langdir>/config-lang.in setting gcc_subdir typically sets | |
25078 | # only this and the language alias. | |
25079 | ||
25080 | gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang` | |
25081 | if [ "$gcc_subdir" = "" ]; then | |
25082 | gcc_subdir="$subdir" | |
25083 | fi | |
25084 | ||
cc11cc9b PB |
25085 | case ",$enable_languages," in |
25086 | *,$lang_alias,*) | |
25087 | all_selected_languages="$all_selected_languages $lang_alias" | |
349c3166 OH |
25088 | if test -f $srcdir/$gcc_subdir/lang-specs.h; then |
25089 | lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h" | |
cc11cc9b PB |
25090 | fi |
25091 | ;; | |
25092 | esac | |
25093 | ||
cc11cc9b PB |
25094 | language= |
25095 | boot_language= | |
25096 | compilers= | |
cc11cc9b PB |
25097 | outputs= |
25098 | gtfiles= | |
1546bb64 | 25099 | subdir_requires= |
349c3166 | 25100 | . ${srcdir}/$gcc_subdir/config-lang.in |
cc11cc9b PB |
25101 | if test "x$language" = x |
25102 | then | |
349c3166 | 25103 | echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2 |
cc11cc9b PB |
25104 | exit 1 |
25105 | fi | |
1546bb64 PB |
25106 | |
25107 | ok=: | |
25108 | case ",$enable_languages," in | |
25109 | *,$lang_alias,*) ;; | |
25110 | *) | |
25111 | for i in $subdir_requires; do | |
b6348cb3 | 25112 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
25113 | ok=false |
25114 | break | |
25115 | done | |
25116 | ;; | |
25117 | esac | |
25118 | $ok || continue | |
25119 | ||
349c3166 OH |
25120 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" |
25121 | if test -f $srcdir/$gcc_subdir/lang.opt; then | |
25122 | lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" | |
1546bb64 | 25123 | fi |
349c3166 OH |
25124 | if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then |
25125 | lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def" | |
1546bb64 | 25126 | fi |
349c3166 OH |
25127 | if test -f ${srcdir}/$gcc_subdir/Makefile.in |
25128 | then all_lang_makefiles="$gcc_subdir/Makefile" | |
cc11cc9b PB |
25129 | fi |
25130 | all_languages="$all_languages $language" | |
cc11cc9b | 25131 | all_compilers="$all_compilers $compilers" |
cc11cc9b | 25132 | all_outputs="$all_outputs $outputs" |
703d89ab | 25133 | all_gtfiles="$all_gtfiles [$subdir] $gtfiles" |
d7f09764 DN |
25134 | case ",$enable_languages," in |
25135 | *,lto,*) | |
25136 | ||
25137 | $as_echo "#define ENABLE_LTO 1" >>confdefs.h | |
25138 | ||
25139 | enable_lto=yes | |
25140 | ||
3bec79c5 DK |
25141 | # LTO needs to speak the platform's object file format, and has a |
25142 | # number of implementations of the required binary file access APIs. | |
25143 | # ELF is the most common, and default. We only link libelf if ELF | |
25144 | # is indeed the selected format. | |
25145 | LTO_BINARY_READER=${lto_binary_reader} | |
25146 | LTO_USE_LIBELF=-lelf | |
25147 | if test "x$lto_binary_reader" != "xlto-elf" ; then | |
25148 | LTO_USE_LIBELF= | |
25149 | fi | |
25150 | ||
25151 | ||
d7f09764 DN |
25152 | ;; |
25153 | *) ;; | |
25154 | esac | |
861bb6c1 JL |
25155 | done |
25156 | ||
8ac9d31f TJ |
25157 | # Pick up gtfiles for c |
25158 | gtfiles= | |
8ac9d31f | 25159 | . ${srcdir}/c-config-lang.in |
703d89ab | 25160 | all_gtfiles="$all_gtfiles [c] $gtfiles" |
8ac9d31f | 25161 | |
cbc59f01 | 25162 | check_languages= |
cc11cc9b | 25163 | for language in $all_selected_languages |
cbc59f01 | 25164 | do |
cc11cc9b | 25165 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
25166 | done |
25167 | ||
62b81e45 | 25168 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 25169 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
25170 | |
25171 | rm -f Make-hooks | |
25172 | touch Make-hooks | |
bd97af06 | 25173 | target_list="all.cross start.encap rest.encap tags \ |
55bcd32b AJ |
25174 | install-common install-man install-info install-pdf install-html dvi \ |
25175 | pdf html uninstall info man srcextra srcman srcinfo \ | |
2a4c0366 | 25176 | mostlyclean clean distclean maintainer-clean install-plugin" |
cc11cc9b | 25177 | |
861bb6c1 JL |
25178 | for t in $target_list |
25179 | do | |
25180 | x= | |
cc11cc9b | 25181 | for lang in $all_selected_languages |
861bb6c1 | 25182 | do |
cc11cc9b | 25183 | x="$x $lang.$t" |
861bb6c1 JL |
25184 | done |
25185 | echo "lang.$t: $x" >> Make-hooks | |
25186 | done | |
25187 | ||
8bb915b6 NN |
25188 | # -------- |
25189 | # UNSORTED | |
25190 | # -------- | |
25191 | ||
cc06d68c | 25192 | # Create .gdbinit. |
861bb6c1 | 25193 | |
cc06d68c GP |
25194 | echo "dir ." > .gdbinit |
25195 | echo "dir ${srcdir}" >> .gdbinit | |
25196 | if test x$gdb_needs_out_file_path = xyes | |
25197 | then | |
25198 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
25199 | fi | |
25200 | if test "x$subdirs" != x; then | |
25201 | for s in $subdirs | |
25202 | do | |
25203 | echo "dir ${srcdir}/$s" >> .gdbinit | |
25204 | done | |
861bb6c1 | 25205 | fi |
cc06d68c | 25206 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 25207 | |
15c723f3 | 25208 | gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' |
d062c304 JL |
25209 | |
25210 | ||
2ce3c6c6 | 25211 | |
2bbea3a6 RH |
25212 | # Find a directory in which to install a shared libgcc. |
25213 | ||
5213506e RW |
25214 | # Check whether --enable-version-specific-runtime-libs was given. |
25215 | if test "${enable_version_specific_runtime_libs+set}" = set; then : | |
25216 | enableval=$enable_version_specific_runtime_libs; | |
25217 | fi | |
ba479fd2 | 25218 | |
2bbea3a6 RH |
25219 | |
25220 | ||
5213506e RW |
25221 | # Check whether --with-slibdir was given. |
25222 | if test "${with_slibdir+set}" = set; then : | |
25223 | withval=$with_slibdir; slibdir="$with_slibdir" | |
5b15f277 RH |
25224 | else |
25225 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 25226 | slibdir='$(libsubdir)' |
5b15f277 | 25227 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
25228 | slibdir='$(build_tooldir)/lib' |
25229 | else | |
5b15f277 | 25230 | slibdir='$(libdir)' |
2bbea3a6 | 25231 | fi |
5213506e RW |
25232 | fi |
25233 | ||
2bbea3a6 RH |
25234 | |
25235 | ||
703d89ab | 25236 | # Substitute configuration variables |
861bb6c1 JL |
25237 | |
25238 | ||
25239 | ||
25240 | ||
25241 | ||
25242 | ||
25243 | ||
25244 | ||
25245 | ||
25246 | ||
25247 | ||
25248 | ||
25249 | ||
25250 | ||
25251 | ||
25252 | ||
25253 | ||
25254 | ||
25255 | ||
25256 | ||
25257 | ||
25258 | ||
25259 | ||
25260 | ||
25261 | ||
25262 | ||
25263 | ||
25264 | ||
25265 | ||
25266 | ||
25267 | ||
25268 | ||
25269 | ||
25270 | ||
25271 | ||
25272 | ||
25273 | ||
25274 | ||
25275 | ||
25276 | ||
25277 | ||
25278 | ||
25279 | ||
25280 | ||
9b16d2c4 | 25281 | |
e9a25f70 | 25282 | |
6e26218f | 25283 | |
c8724862 | 25284 | |
11642c3a ZW |
25285 | |
25286 | ||
25287 | ||
3d9d2476 | 25288 | |
e2500fed | 25289 | |
a0e527e3 | 25290 | |
aca600aa AS |
25291 | |
25292 | ||
25293 | ||
c776a6d0 | 25294 | |
207bf79d | 25295 | |
51b9ff45 | 25296 | |
861bb6c1 | 25297 | |
6e3f3080 NN |
25298 | # Echo link setup. |
25299 | if test x${build} = x${host} ; then | |
25300 | if test x${host} = x${target} ; then | |
25301 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
25302 | else | |
25303 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
25304 | echo " from ${host} to ${target}." 1>&2 | |
25305 | fi | |
25306 | else | |
25307 | if test x${host} = x${target} ; then | |
25308 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
25309 | echo " for ${target}." 1>&2 | |
25310 | else | |
25311 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
25312 | echo " from ${host} to ${target}." 1>&2 | |
25313 | fi | |
25314 | fi | |
25315 | ||
6de9cd9a DN |
25316 | |
25317 | ||
25318 | ||
f8bf9252 SP |
25319 | |
25320 | ||
25321 | ||
25322 | ||
25323 | ||
25324 | if test "x${CLOOGLIBS}" != "x" ; then | |
25325 | ||
5213506e | 25326 | $as_echo "#define HAVE_cloog 1" >>confdefs.h |
f8bf9252 | 25327 | |
f8bf9252 SP |
25328 | fi |
25329 | ||
d7f09764 DN |
25330 | |
25331 | ||
25332 | if test "x${LIBELFLIBS}" != "x" ; then | |
25333 | ||
25334 | $as_echo "#define HAVE_libelf 1" >>confdefs.h | |
25335 | ||
25336 | fi | |
25337 | ||
68a607d8 | 25338 | # Check for plugin support |
5213506e RW |
25339 | # Check whether --enable-plugin was given. |
25340 | if test "${enable_plugin+set}" = set; then : | |
25341 | enableval=$enable_plugin; enable_plugin=$enableval | |
68a607d8 DN |
25342 | else |
25343 | enable_plugin=yes; default_plugin=yes | |
5213506e RW |
25344 | fi |
25345 | ||
68a607d8 DN |
25346 | |
25347 | pluginlibs= | |
25348 | if test x"$enable_plugin" = x"yes"; then | |
68a607d8 | 25349 | |
9ec69d2e JH |
25350 | case "${host}" in |
25351 | *-*-darwin*) | |
25352 | export_sym_check="$gcc_cv_nm -g" | |
25353 | ;; | |
25354 | *) | |
25355 | export_sym_check="$gcc_cv_objdump -T" | |
25356 | ;; | |
25357 | esac | |
601fc26e SE |
25358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5 |
25359 | $as_echo_n "checking for exported symbols... " >&6; } | |
25360 | echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c | |
25361 | ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 | |
9ec69d2e | 25362 | if $export_sym_check conftest | grep foobar > /dev/null; then |
601fc26e SE |
25363 | : # No need to use a flag |
25364 | else | |
25365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5 | |
25366 | $as_echo_n "checking for -rdynamic... " >&6; } | |
25367 | ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 | |
9ec69d2e | 25368 | if $export_sym_check conftest | grep foobar > /dev/null; then |
fcf52686 | 25369 | plugin_rdynamic=yes |
601fc26e SE |
25370 | pluginlibs="-rdynamic" |
25371 | else | |
fcf52686 | 25372 | plugin_rdynamic=no |
601fc26e SE |
25373 | enable_plugin=no |
25374 | fi | |
fcf52686 RO |
25375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5 |
25376 | $as_echo "$plugin_rdynamic" >&6; } | |
68a607d8 DN |
25377 | fi |
25378 | ||
25379 | # Check -ldl | |
30ce157e | 25380 | saved_LIBS="$LIBS" |
0c2edd9f ILT |
25381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
25382 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
25383 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25384 | $as_echo_n "(cached) " >&6 | |
25385 | else | |
25386 | ac_func_search_save_LIBS=$LIBS | |
25387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
68a607d8 | 25388 | /* end confdefs.h. */ |
0c2edd9f ILT |
25389 | |
25390 | /* Override any GCC internal prototype to avoid an error. | |
25391 | Use char because int might match the return type of a GCC | |
25392 | builtin and then its argument prototype would still apply. */ | |
25393 | #ifdef __cplusplus | |
25394 | extern "C" | |
25395 | #endif | |
25396 | char dlopen (); | |
68a607d8 DN |
25397 | int |
25398 | main () | |
25399 | { | |
0c2edd9f | 25400 | return dlopen (); |
68a607d8 DN |
25401 | ; |
25402 | return 0; | |
25403 | } | |
25404 | _ACEOF | |
0c2edd9f ILT |
25405 | for ac_lib in '' dl; do |
25406 | if test -z "$ac_lib"; then | |
25407 | ac_res="none required" | |
25408 | else | |
25409 | ac_res=-l$ac_lib | |
25410 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
25411 | fi | |
25412 | if ac_fn_c_try_link "$LINENO"; then : | |
25413 | ac_cv_search_dlopen=$ac_res | |
68a607d8 | 25414 | fi |
5213506e | 25415 | rm -f core conftest.err conftest.$ac_objext \ |
0c2edd9f ILT |
25416 | conftest$ac_exeext |
25417 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25418 | break | |
25419 | fi | |
25420 | done | |
25421 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25422 | ||
25423 | else | |
25424 | ac_cv_search_dlopen=no | |
25425 | fi | |
25426 | rm conftest.$ac_ext | |
25427 | LIBS=$ac_func_search_save_LIBS | |
25428 | fi | |
25429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
25430 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
25431 | ac_res=$ac_cv_search_dlopen | |
25432 | if test "$ac_res" != no; then : | |
25433 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
25434 | ||
25435 | fi | |
25436 | ||
25437 | if test x"$ac_cv_search_dlopen" = x"-ldl"; then | |
68a607d8 DN |
25438 | pluginlibs="$pluginlibs -ldl" |
25439 | fi | |
30ce157e | 25440 | LIBS="$saved_LIBS" |
68a607d8 DN |
25441 | |
25442 | # Check that we can build shared objects with -fPIC -shared | |
30ce157e | 25443 | saved_LDFLAGS="$LDFLAGS" |
9ec69d2e JH |
25444 | case "${host}" in |
25445 | *-*-darwin*) | |
25446 | LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup" | |
25447 | ;; | |
25448 | *) | |
25449 | LDFLAGS="$LDFLAGS -fPIC -shared" | |
25450 | ;; | |
25451 | esac | |
5213506e RW |
25452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 |
25453 | $as_echo_n "checking for -fPIC -shared... " >&6; } | |
25454 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
68a607d8 DN |
25455 | /* end confdefs.h. */ |
25456 | extern int X; | |
25457 | int | |
25458 | main () | |
25459 | { | |
25460 | return X == 0; | |
25461 | ; | |
25462 | return 0; | |
25463 | } | |
25464 | _ACEOF | |
5213506e RW |
25465 | if ac_fn_c_try_link "$LINENO"; then : |
25466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
25467 | $as_echo "yes" >&6; }; have_pic_shared=yes | |
68a607d8 | 25468 | else |
5213506e RW |
25469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
25470 | $as_echo "no" >&6; }; have_pic_shared=no | |
68a607d8 | 25471 | fi |
5213506e RW |
25472 | rm -f core conftest.err conftest.$ac_objext \ |
25473 | conftest$ac_exeext conftest.$ac_ext | |
0c2edd9f | 25474 | if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then |
68a607d8 DN |
25475 | pluginlibs= |
25476 | enable_plugin=no | |
25477 | fi | |
30ce157e | 25478 | LDFLAGS="$saved_LDFLAGS" |
68a607d8 DN |
25479 | |
25480 | # If plugin support had been requested but not available, fail. | |
25481 | if test x"$enable_plugin" = x"no" ; then | |
25482 | if test x"$default_plugin" != x"yes"; then | |
5213506e | 25483 | as_fn_error " |
68a607d8 | 25484 | Building GCC with plugin support requires a host that supports |
5213506e | 25485 | -fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5 |
68a607d8 DN |
25486 | fi |
25487 | fi | |
68a607d8 DN |
25488 | fi |
25489 | ||
25490 | ||
25491 | ||
25492 | if test x"$enable_plugin" = x"yes"; then | |
25493 | ||
5213506e | 25494 | $as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h |
68a607d8 DN |
25495 | |
25496 | fi | |
25497 | ||
6e3f3080 NN |
25498 | # Configure the subdirectories |
25499 | # AC_CONFIG_SUBDIRS($subdirs) | |
25500 | ||
25501 | # Create the Makefile | |
25502 | # and configure language subdirectories | |
5213506e | 25503 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
25504 | |
25505 | ||
5213506e | 25506 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 25507 | |
ba479fd2 | 25508 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
25509 | # This file is a shell script that caches the results of configure |
25510 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
25511 | # scripts and configure runs, see configure's option --config-cache. |
25512 | # It is not useful on other systems. If it contains results you don't | |
25513 | # want to keep, you may remove or edit it. | |
6e3f3080 | 25514 | # |
ba479fd2 NN |
25515 | # config.status only pays attention to the cache file if you give it |
25516 | # the --recheck option to rerun configure. | |
6e3f3080 | 25517 | # |
ba479fd2 NN |
25518 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
25519 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
25520 | # following values. | |
25521 | ||
25522 | _ACEOF | |
25523 | ||
6e3f3080 NN |
25524 | # The following way of writing the cache mishandles newlines in values, |
25525 | # but we know of no workaround that is simple, portable, and efficient. | |
5213506e | 25526 | # So, we kill variables containing newlines. |
6e3f3080 NN |
25527 | # Ultrix sh set writes to stderr and can't be redirected directly, |
25528 | # and sets the high bit in the cache file unless we assign to the vars. | |
5213506e RW |
25529 | ( |
25530 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
25531 | eval ac_val=\$$ac_var | |
25532 | case $ac_val in #( | |
25533 | *${as_nl}*) | |
25534 | case $ac_var in #( | |
25535 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
25536 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
25537 | esac | |
25538 | case $ac_var in #( | |
25539 | _ | IFS | as_nl) ;; #( | |
25540 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
25541 | *) { eval $ac_var=; unset $ac_var;} ;; | |
25542 | esac ;; | |
25543 | esac | |
25544 | done | |
25545 | ||
ba479fd2 | 25546 | (set) 2>&1 | |
5213506e RW |
25547 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
25548 | *${as_nl}ac_space=\ *) | |
25549 | # `set' does not quote correctly, so add quotes: double-quote | |
25550 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
ba479fd2 | 25551 | sed -n \ |
86da66b5 HPN |
25552 | "s/'/'\\\\''/g; |
25553 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
5213506e | 25554 | ;; #( |
ba479fd2 NN |
25555 | *) |
25556 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5213506e | 25557 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 25558 | ;; |
5213506e RW |
25559 | esac | |
25560 | sort | |
25561 | ) | | |
ba479fd2 | 25562 | sed ' |
5213506e | 25563 | /^ac_cv_env_/b end |
ba479fd2 | 25564 | t clear |
5213506e | 25565 | :clear |
ba479fd2 NN |
25566 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
25567 | t end | |
5213506e RW |
25568 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
25569 | :end' >>confcache | |
25570 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
25571 | if test -w "$cache_file"; then | |
25572 | test "x$cache_file" != "x/dev/null" && | |
25573 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
25574 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
ba479fd2 | 25575 | cat confcache >$cache_file |
6e3f3080 | 25576 | else |
5213506e RW |
25577 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
25578 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
6e3f3080 NN |
25579 | fi |
25580 | fi | |
25581 | rm -f confcache | |
25582 | ||
25583 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
25584 | # Let make expand exec_prefix. | |
25585 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
25586 | ||
63cf211a | 25587 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 25588 | |
ba479fd2 NN |
25589 | ac_libobjs= |
25590 | ac_ltlibobjs= | |
25591 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
25592 | # 1. Remove the extension, and $U if already installed. | |
5213506e RW |
25593 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
25594 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
25595 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
25596 | # will be set to the directory where LIBOBJS objects are built. | |
25597 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
25598 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
ba479fd2 NN |
25599 | done |
25600 | LIBOBJS=$ac_libobjs | |
63cf211a | 25601 | |
ba479fd2 NN |
25602 | LTLIBOBJS=$ac_ltlibobjs |
25603 | ||
25604 | ||
25605 | ||
5213506e | 25606 | |
ba479fd2 | 25607 | : ${CONFIG_STATUS=./config.status} |
5213506e | 25608 | ac_write_fail=0 |
ba479fd2 NN |
25609 | ac_clean_files_save=$ac_clean_files |
25610 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
5213506e RW |
25611 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
25612 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
25613 | as_write_fail=0 | |
25614 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
ba479fd2 NN |
25615 | #! $SHELL |
25616 | # Generated by $as_me. | |
6e3f3080 NN |
25617 | # Run this file to recreate the current configuration. |
25618 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 25619 | # configure, is in config.log if it exists. |
6e3f3080 | 25620 | |
ba479fd2 NN |
25621 | debug=false |
25622 | ac_cs_recheck=false | |
25623 | ac_cs_silent=false | |
ba479fd2 | 25624 | |
5213506e RW |
25625 | SHELL=\${CONFIG_SHELL-$SHELL} |
25626 | export SHELL | |
25627 | _ASEOF | |
25628 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
25629 | ## -------------------- ## | |
25630 | ## M4sh Initialization. ## | |
25631 | ## -------------------- ## | |
ba479fd2 | 25632 | |
5213506e RW |
25633 | # Be more Bourne compatible |
25634 | DUALCASE=1; export DUALCASE # for MKS sh | |
25635 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
ba479fd2 NN |
25636 | emulate sh |
25637 | NULLCMD=: | |
5213506e | 25638 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
ba479fd2 NN |
25639 | # is contrary to our usage. Disable this feature. |
25640 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
25641 | setopt NO_GLOB_SUBST |
25642 | else | |
25643 | case `(set -o) 2>/dev/null` in #( | |
25644 | *posix*) : | |
25645 | set -o posix ;; #( | |
25646 | *) : | |
25647 | ;; | |
25648 | esac | |
2f41c1d6 | 25649 | fi |
ab22c1fa | 25650 | |
5213506e RW |
25651 | |
25652 | as_nl=' | |
25653 | ' | |
25654 | export as_nl | |
25655 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
25656 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
25657 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
25658 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
25659 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
25660 | # but without wasting forks for bash or zsh. | |
25661 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
25662 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
25663 | as_echo='print -r --' | |
25664 | as_echo_n='print -rn --' | |
25665 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
25666 | as_echo='printf %s\n' | |
25667 | as_echo_n='printf %s' | |
25668 | else | |
25669 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
25670 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
25671 | as_echo_n='/usr/ucb/echo -n' | |
25672 | else | |
25673 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
25674 | as_echo_n_body='eval | |
25675 | arg=$1; | |
25676 | case $arg in #( | |
25677 | *"$as_nl"*) | |
25678 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
25679 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
25680 | esac; | |
25681 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
25682 | ' | |
25683 | export as_echo_n_body | |
25684 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
25685 | fi | |
25686 | export as_echo_body | |
25687 | as_echo='sh -c $as_echo_body as_echo' | |
25688 | fi | |
25689 | ||
25690 | # The user is always right. | |
25691 | if test "${PATH_SEPARATOR+set}" != set; then | |
25692 | PATH_SEPARATOR=: | |
25693 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
25694 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
25695 | PATH_SEPARATOR=';' | |
25696 | } | |
1a4b763e BS |
25697 | fi |
25698 | ||
ab22c1fa | 25699 | |
5213506e RW |
25700 | # IFS |
25701 | # We need space, tab and new line, in precisely that order. Quoting is | |
25702 | # there to prevent editors from complaining about space-tab. | |
25703 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
25704 | # splitting by setting IFS to empty value.) | |
25705 | IFS=" "" $as_nl" | |
25706 | ||
25707 | # Find who we are. Look in the path if we contain no directory separator. | |
25708 | case $0 in #(( | |
25709 | *[\\/]* ) as_myself=$0 ;; | |
25710 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
25711 | for as_dir in $PATH | |
25712 | do | |
25713 | IFS=$as_save_IFS | |
25714 | test -z "$as_dir" && as_dir=. | |
25715 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
25716 | done | |
25717 | IFS=$as_save_IFS | |
25718 | ||
25719 | ;; | |
25720 | esac | |
25721 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
25722 | # in which case we are not to be found in the path. | |
25723 | if test "x$as_myself" = x; then | |
25724 | as_myself=$0 | |
25725 | fi | |
25726 | if test ! -f "$as_myself"; then | |
25727 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
25728 | exit 1 | |
25729 | fi | |
25730 | ||
25731 | # Unset variables that we do not need and which cause bugs (e.g. in | |
25732 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
25733 | # suppresses any "Segmentation fault" message there. '((' could | |
25734 | # trigger a bug in pdksh 5.2.14. | |
25735 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
25736 | do eval test x\${$as_var+set} = xset \ | |
25737 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
25738 | done | |
1a4b763e BS |
25739 | PS1='$ ' |
25740 | PS2='> ' | |
25741 | PS4='+ ' | |
25742 | ||
25743 | # NLS nuisances. | |
5213506e RW |
25744 | LC_ALL=C |
25745 | export LC_ALL | |
25746 | LANGUAGE=C | |
25747 | export LANGUAGE | |
25748 | ||
25749 | # CDPATH. | |
25750 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
25751 | ||
25752 | ||
25753 | # as_fn_error ERROR [LINENO LOG_FD] | |
25754 | # --------------------------------- | |
25755 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
25756 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
25757 | # script with status $?, using 1 if that was 0. | |
25758 | as_fn_error () | |
25759 | { | |
25760 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
25761 | if test "$3"; then | |
25762 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
25763 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
1a4b763e | 25764 | fi |
5213506e RW |
25765 | $as_echo "$as_me: error: $1" >&2 |
25766 | as_fn_exit $as_status | |
25767 | } # as_fn_error | |
25768 | ||
25769 | ||
25770 | # as_fn_set_status STATUS | |
25771 | # ----------------------- | |
25772 | # Set $? to STATUS, without forking. | |
25773 | as_fn_set_status () | |
25774 | { | |
25775 | return $1 | |
25776 | } # as_fn_set_status | |
25777 | ||
25778 | # as_fn_exit STATUS | |
25779 | # ----------------- | |
25780 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
25781 | as_fn_exit () | |
25782 | { | |
25783 | set +e | |
25784 | as_fn_set_status $1 | |
25785 | exit $1 | |
25786 | } # as_fn_exit | |
25787 | ||
25788 | # as_fn_unset VAR | |
25789 | # --------------- | |
25790 | # Portably unset VAR. | |
25791 | as_fn_unset () | |
25792 | { | |
25793 | { eval $1=; unset $1;} | |
25794 | } | |
25795 | as_unset=as_fn_unset | |
25796 | # as_fn_append VAR VALUE | |
25797 | # ---------------------- | |
25798 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
25799 | # advantage of any shell optimizations that allow amortized linear growth over | |
25800 | # repeated appends, instead of the typical quadratic growth present in naive | |
25801 | # implementations. | |
25802 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
25803 | eval 'as_fn_append () | |
25804 | { | |
25805 | eval $1+=\$2 | |
25806 | }' | |
25807 | else | |
25808 | as_fn_append () | |
25809 | { | |
25810 | eval $1=\$$1\$2 | |
25811 | } | |
25812 | fi # as_fn_append | |
25813 | ||
25814 | # as_fn_arith ARG... | |
25815 | # ------------------ | |
25816 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
25817 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
25818 | # must be portable across $(()) and expr. | |
25819 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
25820 | eval 'as_fn_arith () | |
25821 | { | |
25822 | as_val=$(( $* )) | |
25823 | }' | |
25824 | else | |
25825 | as_fn_arith () | |
25826 | { | |
25827 | as_val=`expr "$@" || test $? -eq 1` | |
25828 | } | |
25829 | fi # as_fn_arith | |
1a4b763e | 25830 | |
5213506e RW |
25831 | |
25832 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
25833 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
1a4b763e BS |
25834 | as_expr=expr |
25835 | else | |
25836 | as_expr=false | |
25837 | fi | |
25838 | ||
5213506e | 25839 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
1a4b763e BS |
25840 | as_basename=basename |
25841 | else | |
25842 | as_basename=false | |
25843 | fi | |
25844 | ||
5213506e RW |
25845 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
25846 | as_dirname=dirname | |
25847 | else | |
25848 | as_dirname=false | |
25849 | fi | |
1a4b763e | 25850 | |
5213506e | 25851 | as_me=`$as_basename -- "$0" || |
1a4b763e BS |
25852 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
25853 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
25854 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
25855 | $as_echo X/"$0" | | |
25856 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
25857 | s//\1/ | |
25858 | q | |
25859 | } | |
25860 | /^X\/\(\/\/\)$/{ | |
25861 | s//\1/ | |
25862 | q | |
25863 | } | |
25864 | /^X\/\(\/\).*/{ | |
25865 | s//\1/ | |
25866 | q | |
25867 | } | |
25868 | s/.*/./; q'` | |
b61ff9c8 | 25869 | |
b61ff9c8 BS |
25870 | # Avoid depending upon Character Ranges. |
25871 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
25872 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
25873 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
25874 | as_cr_digits='0123456789' | |
25875 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
25876 | ||
5213506e RW |
25877 | ECHO_C= ECHO_N= ECHO_T= |
25878 | case `echo -n x` in #((((( | |
25879 | -n*) | |
25880 | case `echo 'xy\c'` in | |
25881 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
25882 | xy) ECHO_C='\c';; | |
25883 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
25884 | ECHO_T=' ';; | |
25885 | esac;; | |
25886 | *) | |
25887 | ECHO_N='-n';; | |
ba479fd2 NN |
25888 | esac |
25889 | ||
ba479fd2 | 25890 | rm -f conf$$ conf$$.exe conf$$.file |
5213506e RW |
25891 | if test -d conf$$.dir; then |
25892 | rm -f conf$$.dir/conf$$.file | |
25893 | else | |
25894 | rm -f conf$$.dir | |
25895 | mkdir conf$$.dir 2>/dev/null | |
25896 | fi | |
25897 | if (echo >conf$$.file) 2>/dev/null; then | |
25898 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b61ff9c8 | 25899 | as_ln_s='ln -s' |
5213506e RW |
25900 | # ... but there are two gotchas: |
25901 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
25902 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
25903 | # In both cases, we have to default to `cp -p'. | |
25904 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
25905 | as_ln_s='cp -p' | |
25906 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
25907 | as_ln_s=ln | |
25908 | else | |
25909 | as_ln_s='cp -p' | |
b61ff9c8 | 25910 | fi |
ba479fd2 NN |
25911 | else |
25912 | as_ln_s='cp -p' | |
25913 | fi | |
5213506e RW |
25914 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
25915 | rmdir conf$$.dir 2>/dev/null | |
25916 | ||
25917 | ||
25918 | # as_fn_mkdir_p | |
25919 | # ------------- | |
25920 | # Create "$as_dir" as a directory, including parents if necessary. | |
25921 | as_fn_mkdir_p () | |
25922 | { | |
25923 | ||
25924 | case $as_dir in #( | |
25925 | -*) as_dir=./$as_dir;; | |
25926 | esac | |
25927 | test -d "$as_dir" || eval $as_mkdir_p || { | |
25928 | as_dirs= | |
25929 | while :; do | |
25930 | case $as_dir in #( | |
25931 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
25932 | *) as_qdir=$as_dir;; | |
25933 | esac | |
25934 | as_dirs="'$as_qdir' $as_dirs" | |
25935 | as_dir=`$as_dirname -- "$as_dir" || | |
25936 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
25937 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
25938 | X"$as_dir" : 'X\(//\)$' \| \ | |
25939 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
25940 | $as_echo X"$as_dir" | | |
25941 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
25942 | s//\1/ | |
25943 | q | |
25944 | } | |
25945 | /^X\(\/\/\)[^/].*/{ | |
25946 | s//\1/ | |
25947 | q | |
25948 | } | |
25949 | /^X\(\/\/\)$/{ | |
25950 | s//\1/ | |
25951 | q | |
25952 | } | |
25953 | /^X\(\/\).*/{ | |
25954 | s//\1/ | |
25955 | q | |
25956 | } | |
25957 | s/.*/./; q'` | |
25958 | test -d "$as_dir" && break | |
25959 | done | |
25960 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
25961 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
25962 | ||
ba479fd2 | 25963 | |
5213506e | 25964 | } # as_fn_mkdir_p |
ba479fd2 | 25965 | if mkdir -p . 2>/dev/null; then |
5213506e | 25966 | as_mkdir_p='mkdir -p "$as_dir"' |
ba479fd2 | 25967 | else |
86da66b5 | 25968 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
25969 | as_mkdir_p=false |
25970 | fi | |
25971 | ||
5213506e RW |
25972 | if test -x / >/dev/null 2>&1; then |
25973 | as_test_x='test -x' | |
25974 | else | |
25975 | if ls -dL / >/dev/null 2>&1; then | |
25976 | as_ls_L_option=L | |
25977 | else | |
25978 | as_ls_L_option= | |
25979 | fi | |
25980 | as_test_x=' | |
25981 | eval sh -c '\'' | |
25982 | if test -d "$1"; then | |
25983 | test -d "$1/."; | |
25984 | else | |
25985 | case $1 in #( | |
25986 | -*)set "./$1";; | |
25987 | esac; | |
25988 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
25989 | ???[sx]*):;;*)false;;esac;fi | |
25990 | '\'' sh | |
25991 | ' | |
25992 | fi | |
25993 | as_executable_p=$as_test_x | |
ba479fd2 NN |
25994 | |
25995 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 25996 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
25997 | |
25998 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 25999 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
26000 | |
26001 | ||
ba479fd2 | 26002 | exec 6>&1 |
5213506e RW |
26003 | ## ----------------------------------- ## |
26004 | ## Main body of $CONFIG_STATUS script. ## | |
26005 | ## ----------------------------------- ## | |
26006 | _ASEOF | |
26007 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
ba479fd2 | 26008 | |
5213506e RW |
26009 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26010 | # Save the log message, to keep $0 and so on meaningful, and to | |
ba479fd2 | 26011 | # report actual input values of CONFIG_FILES etc. instead of their |
5213506e RW |
26012 | # values after options handling. |
26013 | ac_log=" | |
ba479fd2 | 26014 | This file was extended by $as_me, which was |
5213506e | 26015 | generated by GNU Autoconf 2.64. Invocation command line was |
ba479fd2 NN |
26016 | |
26017 | CONFIG_FILES = $CONFIG_FILES | |
26018 | CONFIG_HEADERS = $CONFIG_HEADERS | |
26019 | CONFIG_LINKS = $CONFIG_LINKS | |
26020 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
26021 | $ $0 $@ | |
26022 | ||
5213506e RW |
26023 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
26024 | " | |
26025 | ||
ba479fd2 NN |
26026 | _ACEOF |
26027 | ||
5213506e RW |
26028 | case $ac_config_files in *" |
26029 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
26030 | esac | |
2f41c1d6 | 26031 | |
5213506e RW |
26032 | case $ac_config_headers in *" |
26033 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
26034 | esac | |
b61ff9c8 | 26035 | |
b61ff9c8 | 26036 | |
5213506e RW |
26037 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
26038 | # Files that config.status was made for. | |
26039 | config_files="$ac_config_files" | |
26040 | config_headers="$ac_config_headers" | |
26041 | config_commands="$ac_config_commands" | |
ba479fd2 | 26042 | |
5213506e | 26043 | _ACEOF |
b61ff9c8 | 26044 | |
5213506e | 26045 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ba479fd2 | 26046 | ac_cs_usage="\ |
5213506e RW |
26047 | \`$as_me' instantiates files and other configuration actions |
26048 | from templates according to the current configuration. Unless the files | |
26049 | and actions are specified as TAGs, all are instantiated by default. | |
ba479fd2 | 26050 | |
5213506e | 26051 | Usage: $0 [OPTION]... [TAG]... |
ba479fd2 NN |
26052 | |
26053 | -h, --help print this help, then exit | |
5213506e RW |
26054 | -V, --version print version number and configuration settings, then exit |
26055 | -q, --quiet, --silent | |
26056 | do not print progress messages | |
ba479fd2 NN |
26057 | -d, --debug don't remove temporary files |
26058 | --recheck update $as_me by reconfiguring in the same conditions | |
5213506e RW |
26059 | --file=FILE[:TEMPLATE] |
26060 | instantiate the configuration file FILE | |
26061 | --header=FILE[:TEMPLATE] | |
26062 | instantiate the configuration header FILE | |
ba479fd2 NN |
26063 | |
26064 | Configuration files: | |
26065 | $config_files | |
26066 | ||
26067 | Configuration headers: | |
26068 | $config_headers | |
26069 | ||
26070 | Configuration commands: | |
26071 | $config_commands | |
26072 | ||
5213506e | 26073 | Report bugs to the package provider." |
b61ff9c8 | 26074 | |
5213506e RW |
26075 | _ACEOF |
26076 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
ba479fd2 NN |
26077 | ac_cs_version="\\ |
26078 | config.status | |
5213506e RW |
26079 | configured by $0, generated by GNU Autoconf 2.64, |
26080 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
ba479fd2 | 26081 | |
5213506e | 26082 | Copyright (C) 2009 Free Software Foundation, Inc. |
ba479fd2 NN |
26083 | This config.status script is free software; the Free Software Foundation |
26084 | gives unlimited permission to copy, distribute and modify it." | |
5213506e RW |
26085 | |
26086 | ac_pwd='$ac_pwd' | |
26087 | srcdir='$srcdir' | |
26088 | AWK='$AWK' | |
26089 | test -n "\$AWK" || AWK=awk | |
ba479fd2 NN |
26090 | _ACEOF |
26091 | ||
5213506e RW |
26092 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26093 | # The default lists apply if the user does not specify any file. | |
ba479fd2 NN |
26094 | ac_need_defaults=: |
26095 | while test $# != 0 | |
26096 | do | |
26097 | case $1 in | |
26098 | --*=*) | |
5213506e RW |
26099 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
26100 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
ba479fd2 NN |
26101 | ac_shift=: |
26102 | ;; | |
5213506e | 26103 | *) |
ba479fd2 NN |
26104 | ac_option=$1 |
26105 | ac_optarg=$2 | |
26106 | ac_shift=shift | |
26107 | ;; | |
ba479fd2 NN |
26108 | esac |
26109 | ||
26110 | case $ac_option in | |
26111 | # Handling of the options. | |
ba479fd2 NN |
26112 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
26113 | ac_cs_recheck=: ;; | |
5213506e RW |
26114 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
26115 | $as_echo "$ac_cs_version"; exit ;; | |
26116 | --debug | --debu | --deb | --de | --d | -d ) | |
ba479fd2 NN |
26117 | debug=: ;; |
26118 | --file | --fil | --fi | --f ) | |
26119 | $ac_shift | |
5213506e RW |
26120 | case $ac_optarg in |
26121 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
26122 | esac | |
26123 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
ba479fd2 NN |
26124 | ac_need_defaults=false;; |
26125 | --header | --heade | --head | --hea ) | |
26126 | $ac_shift | |
5213506e RW |
26127 | case $ac_optarg in |
26128 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
26129 | esac | |
26130 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
ba479fd2 | 26131 | ac_need_defaults=false;; |
5213506e RW |
26132 | --he | --h) |
26133 | # Conflict between --help and --header | |
26134 | as_fn_error "ambiguous option: \`$1' | |
26135 | Try \`$0 --help' for more information.";; | |
26136 | --help | --hel | -h ) | |
26137 | $as_echo "$ac_cs_usage"; exit ;; | |
ba479fd2 NN |
26138 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
26139 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
26140 | ac_cs_silent=: ;; | |
26141 | ||
26142 | # This is an error. | |
5213506e RW |
26143 | -*) as_fn_error "unrecognized option: \`$1' |
26144 | Try \`$0 --help' for more information." ;; | |
ba479fd2 | 26145 | |
5213506e RW |
26146 | *) as_fn_append ac_config_targets " $1" |
26147 | ac_need_defaults=false ;; | |
ba479fd2 NN |
26148 | |
26149 | esac | |
26150 | shift | |
6e3f3080 | 26151 | done |
ba479fd2 NN |
26152 | |
26153 | ac_configure_extra_args= | |
26154 | ||
26155 | if $ac_cs_silent; then | |
26156 | exec 6>/dev/null | |
26157 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
26158 | fi |
26159 | ||
ba479fd2 | 26160 | _ACEOF |
5213506e | 26161 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
ba479fd2 | 26162 | if \$ac_cs_recheck; then |
5213506e RW |
26163 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
26164 | shift | |
26165 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
26166 | CONFIG_SHELL='$SHELL' | |
26167 | export CONFIG_SHELL | |
26168 | exec "\$@" | |
ba479fd2 | 26169 | fi |
861bb6c1 | 26170 | |
ba479fd2 | 26171 | _ACEOF |
5213506e RW |
26172 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26173 | exec 5>>config.log | |
26174 | { | |
26175 | echo | |
26176 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
26177 | ## Running $as_me. ## | |
26178 | _ASBOX | |
26179 | $as_echo "$ac_log" | |
26180 | } >&5 | |
ba479fd2 | 26181 | |
5213506e RW |
26182 | _ACEOF |
26183 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
ba479fd2 | 26184 | # |
5213506e | 26185 | # INIT-COMMANDS |
ba479fd2 | 26186 | # |
ba479fd2 | 26187 | subdirs='$subdirs' |
ba479fd2 NN |
26188 | |
26189 | _ACEOF | |
26190 | ||
5213506e | 26191 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
1a4b763e | 26192 | |
5213506e | 26193 | # Handling of arguments. |
ba479fd2 NN |
26194 | for ac_config_target in $ac_config_targets |
26195 | do | |
5213506e RW |
26196 | case $ac_config_target in |
26197 | "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
26198 | "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;; | |
26199 | "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;; | |
26200 | "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;; | |
26201 | "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
26202 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
26203 | ||
26204 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
861bb6c1 | 26205 | esac |
ba479fd2 NN |
26206 | done |
26207 | ||
5213506e | 26208 | |
ba479fd2 NN |
26209 | # If the user did not use the arguments to specify the items to instantiate, |
26210 | # then the envvar interface is used. Set only those that are not. | |
26211 | # We use the long form for the default assignment because of an extremely | |
26212 | # bizarre bug on SunOS 4.1.3. | |
26213 | if $ac_need_defaults; then | |
26214 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
26215 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
26216 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
26217 | fi | |
26218 | ||
26219 | # Have a temporary directory for convenience. Make it in the build tree | |
5213506e | 26220 | # simply because there is no reason against having it here, and in addition, |
ba479fd2 | 26221 | # creating and moving files from /tmp can sometimes cause problems. |
5213506e RW |
26222 | # Hook for its removal unless debugging. |
26223 | # Note that there is a small window in which the directory will not be cleaned: | |
26224 | # after its creation but before its name has been assigned to `$tmp'. | |
ba479fd2 NN |
26225 | $debug || |
26226 | { | |
5213506e RW |
26227 | tmp= |
26228 | trap 'exit_status=$? | |
26229 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
26230 | ' 0 | |
26231 | trap 'as_fn_exit 1' 1 2 13 15 | |
ba479fd2 | 26232 | } |
ba479fd2 | 26233 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 26234 | |
ba479fd2 | 26235 | { |
5213506e | 26236 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
ba479fd2 NN |
26237 | test -n "$tmp" && test -d "$tmp" |
26238 | } || | |
26239 | { | |
5213506e RW |
26240 | tmp=./conf$$-$RANDOM |
26241 | (umask 077 && mkdir "$tmp") | |
26242 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
26243 | ||
26244 | # Set up the scripts for CONFIG_FILES section. | |
26245 | # No need to generate them if there are no CONFIG_FILES. | |
26246 | # This happens for instance with `./config.status config.h'. | |
26247 | if test -n "$CONFIG_FILES"; then | |
26248 | ||
26249 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
26250 | ac_cs_awk_getline=: | |
26251 | ac_cs_awk_pipe_init= | |
26252 | ac_cs_awk_read_file=' | |
26253 | while ((getline aline < (F[key])) > 0) | |
26254 | print(aline) | |
26255 | close(F[key])' | |
26256 | ac_cs_awk_pipe_fini= | |
26257 | else | |
26258 | ac_cs_awk_getline=false | |
26259 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
26260 | ac_cs_awk_read_file=' | |
26261 | print "|#_!!_#|" | |
26262 | print "cat " F[key] " &&" | |
26263 | '$ac_cs_awk_pipe_init | |
26264 | # The final `:' finishes the AND list. | |
26265 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
26266 | fi | |
26267 | ac_cr=`echo X | tr X '\015'` | |
26268 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
26269 | # But we know of no other shell where ac_cr would be empty at this | |
26270 | # point, so we can use a bashism as a fallback. | |
26271 | if test "x$ac_cr" = x; then | |
26272 | eval ac_cr=\$\'\\r\' | |
26273 | fi | |
26274 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
26275 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
26276 | ac_cs_awk_cr='\r' | |
26277 | else | |
26278 | ac_cs_awk_cr=$ac_cr | |
26279 | fi | |
26280 | ||
26281 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
26282 | _ACEOF | |
26283 | ||
26284 | # Create commands to substitute file output variables. | |
ba479fd2 | 26285 | { |
5213506e RW |
26286 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && |
26287 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
26288 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
26289 | echo "_ACAWK" && | |
26290 | echo "_ACEOF" | |
26291 | } >conf$$files.sh && | |
26292 | . ./conf$$files.sh || | |
26293 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26294 | rm -f conf$$files.sh | |
ba479fd2 | 26295 | |
5213506e RW |
26296 | { |
26297 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
26298 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
26299 | echo "_ACEOF" | |
26300 | } >conf$$subs.sh || | |
26301 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26302 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
26303 | ac_delim='%!_!# ' | |
26304 | for ac_last_try in false false false false false :; do | |
26305 | . ./conf$$subs.sh || | |
26306 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26307 | ||
26308 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
26309 | if test $ac_delim_n = $ac_delim_num; then | |
26310 | break | |
26311 | elif $ac_last_try; then | |
26312 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26313 | else | |
26314 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
26315 | fi | |
26316 | done | |
26317 | rm -f conf$$subs.sh | |
26318 | ||
26319 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26320 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
26321 | _ACEOF | |
26322 | sed -n ' | |
26323 | h | |
26324 | s/^/S["/; s/!.*/"]=/ | |
26325 | p | |
26326 | g | |
26327 | s/^[^!]*!// | |
26328 | :repl | |
26329 | t repl | |
26330 | s/'"$ac_delim"'$// | |
26331 | t delim | |
26332 | :nl | |
26333 | h | |
26334 | s/\(.\{148\}\).*/\1/ | |
26335 | t more1 | |
26336 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
26337 | p | |
26338 | n | |
26339 | b repl | |
26340 | :more1 | |
26341 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
26342 | p | |
26343 | g | |
26344 | s/.\{148\}// | |
26345 | t nl | |
26346 | :delim | |
26347 | h | |
26348 | s/\(.\{148\}\).*/\1/ | |
26349 | t more2 | |
26350 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
26351 | p | |
26352 | b | |
26353 | :more2 | |
26354 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
26355 | p | |
26356 | g | |
26357 | s/.\{148\}// | |
26358 | t delim | |
26359 | ' <conf$$subs.awk | sed ' | |
26360 | /^[^""]/{ | |
26361 | N | |
26362 | s/\n// | |
26363 | } | |
26364 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
26365 | rm -f conf$$subs.awk | |
26366 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26367 | _ACAWK | |
26368 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
26369 | for (key in S) S_is_set[key] = 1 | |
26370 | FS = "\a" | |
26371 | \$ac_cs_awk_pipe_init | |
26372 | } | |
26373 | { | |
26374 | line = $ 0 | |
26375 | nfields = split(line, field, "@") | |
26376 | substed = 0 | |
26377 | len = length(field[1]) | |
26378 | for (i = 2; i < nfields; i++) { | |
26379 | key = field[i] | |
26380 | keylen = length(key) | |
26381 | if (S_is_set[key]) { | |
26382 | value = S[key] | |
26383 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
26384 | len += length(value) + length(field[++i]) | |
26385 | substed = 1 | |
26386 | } else | |
26387 | len += 1 + keylen | |
26388 | } | |
26389 | if (nfields == 3 && !substed) { | |
26390 | key = field[2] | |
26391 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
26392 | \$ac_cs_awk_read_file | |
26393 | next | |
26394 | } | |
26395 | } | |
26396 | print line | |
26397 | } | |
26398 | \$ac_cs_awk_pipe_fini | |
26399 | _ACAWK | |
26400 | _ACEOF | |
26401 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
26402 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
26403 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
26404 | else | |
26405 | cat | |
26406 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
26407 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
b61ff9c8 BS |
26408 | _ACEOF |
26409 | ||
5213506e RW |
26410 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
26411 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
26412 | # trailing colons and then remove the whole line if VPATH becomes empty | |
26413 | # (actually we leave an empty line to preserve line numbers). | |
26414 | if test "x$srcdir" = x.; then | |
26415 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
26416 | s/:*\$(srcdir):*/:/ | |
26417 | s/:*\${srcdir}:*/:/ | |
26418 | s/:*@srcdir@:*/:/ | |
26419 | s/^\([^=]*=[ ]*\):*/\1/ | |
26420 | s/:*$// | |
26421 | s/^[^=]*=[ ]*$// | |
26422 | }' | |
26423 | fi | |
ba479fd2 | 26424 | |
5213506e RW |
26425 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26426 | fi # test -n "$CONFIG_FILES" | |
b61ff9c8 | 26427 | |
5213506e RW |
26428 | # Set up the scripts for CONFIG_HEADERS section. |
26429 | # No need to generate them if there are no CONFIG_HEADERS. | |
26430 | # This happens for instance with `./config.status Makefile'. | |
26431 | if test -n "$CONFIG_HEADERS"; then | |
26432 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
26433 | BEGIN { | |
b61ff9c8 BS |
26434 | _ACEOF |
26435 | ||
5213506e RW |
26436 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
26437 | # here-document in config.status, that substitutes the proper values into | |
26438 | # config.h.in to produce config.h. | |
26439 | ||
26440 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
26441 | # handling of long lines. | |
26442 | ac_delim='%!_!# ' | |
26443 | for ac_last_try in false false :; do | |
26444 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
26445 | if test -z "$ac_t"; then | |
26446 | break | |
26447 | elif $ac_last_try; then | |
26448 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
26449 | else | |
26450 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
1a4b763e | 26451 | fi |
5213506e | 26452 | done |
1a4b763e | 26453 | |
5213506e RW |
26454 | # For the awk script, D is an array of macro values keyed by name, |
26455 | # likewise P contains macro parameters if any. Preserve backslash | |
26456 | # newline sequences. | |
26457 | ||
26458 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
26459 | sed -n ' | |
26460 | s/.\{148\}/&'"$ac_delim"'/g | |
26461 | t rset | |
26462 | :rset | |
26463 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
26464 | t def | |
26465 | d | |
26466 | :def | |
26467 | s/\\$// | |
26468 | t bsnl | |
26469 | s/["\\]/\\&/g | |
26470 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
26471 | D["\1"]=" \3"/p | |
26472 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
26473 | d | |
26474 | :bsnl | |
26475 | s/["\\]/\\&/g | |
26476 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
26477 | D["\1"]=" \3\\\\\\n"\\/p | |
26478 | t cont | |
26479 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
26480 | t cont | |
26481 | d | |
26482 | :cont | |
26483 | n | |
26484 | s/.\{148\}/&'"$ac_delim"'/g | |
26485 | t clear | |
26486 | :clear | |
26487 | s/\\$// | |
26488 | t bsnlc | |
26489 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
26490 | d | |
26491 | :bsnlc | |
26492 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
26493 | b cont | |
26494 | ' <confdefs.h | sed ' | |
26495 | s/'"$ac_delim"'/"\\\ | |
26496 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
26497 | ||
26498 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26499 | for (key in D) D_is_set[key] = 1 | |
26500 | FS = "\a" | |
26501 | } | |
26502 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
26503 | line = \$ 0 | |
26504 | split(line, arg, " ") | |
26505 | if (arg[1] == "#") { | |
26506 | defundef = arg[2] | |
26507 | mac1 = arg[3] | |
26508 | } else { | |
26509 | defundef = substr(arg[1], 2) | |
26510 | mac1 = arg[2] | |
26511 | } | |
26512 | split(mac1, mac2, "(") #) | |
26513 | macro = mac2[1] | |
26514 | prefix = substr(line, 1, index(line, defundef) - 1) | |
26515 | if (D_is_set[macro]) { | |
26516 | # Preserve the white space surrounding the "#". | |
26517 | print prefix "define", macro P[macro] D[macro] | |
26518 | next | |
26519 | } else { | |
26520 | # Replace #undef with comments. This is necessary, for example, | |
26521 | # in the case of _POSIX_SOURCE, which is predefined and required | |
26522 | # on some systems where configure will not decide to define it. | |
26523 | if (defundef == "undef") { | |
26524 | print "/*", prefix defundef, macro, "*/" | |
26525 | next | |
26526 | } | |
26527 | } | |
26528 | } | |
26529 | { print } | |
26530 | _ACAWK | |
1a4b763e | 26531 | _ACEOF |
5213506e RW |
26532 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26533 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
26534 | fi # test -n "$CONFIG_HEADERS" | |
26535 | ||
26536 | ||
26537 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
26538 | shift | |
26539 | for ac_tag | |
26540 | do | |
26541 | case $ac_tag in | |
26542 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
26543 | esac | |
26544 | case $ac_mode$ac_tag in | |
26545 | :[FHL]*:*);; | |
26546 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
26547 | :[FH]-) ac_tag=-:-;; | |
26548 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
26549 | esac | |
26550 | ac_save_IFS=$IFS | |
26551 | IFS=: | |
26552 | set x $ac_tag | |
26553 | IFS=$ac_save_IFS | |
26554 | shift | |
26555 | ac_file=$1 | |
26556 | shift | |
26557 | ||
26558 | case $ac_mode in | |
26559 | :L) ac_source=$1;; | |
26560 | :[FH]) | |
26561 | ac_file_inputs= | |
26562 | for ac_f | |
26563 | do | |
26564 | case $ac_f in | |
26565 | -) ac_f="$tmp/stdin";; | |
26566 | *) # Look for the file first in the build tree, then in the source tree | |
26567 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
26568 | # because $ac_f cannot contain `:'. | |
26569 | test -f "$ac_f" || | |
26570 | case $ac_f in | |
26571 | [\\/$]*) false;; | |
26572 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
26573 | esac || | |
26574 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
26575 | esac | |
26576 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
26577 | as_fn_append ac_file_inputs " '$ac_f'" | |
26578 | done | |
26579 | ||
26580 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
26581 | # use $as_me), people would be surprised to read: | |
26582 | # /* config.h. Generated by config.status. */ | |
26583 | configure_input='Generated from '` | |
26584 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
26585 | `' by configure.' | |
26586 | if test x"$ac_file" != x-; then | |
26587 | configure_input="$ac_file. $configure_input" | |
26588 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
26589 | $as_echo "$as_me: creating $ac_file" >&6;} | |
26590 | fi | |
26591 | # Neutralize special characters interpreted by sed in replacement strings. | |
26592 | case $configure_input in #( | |
26593 | *\&* | *\|* | *\\* ) | |
26594 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
26595 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
26596 | *) ac_sed_conf_input=$configure_input;; | |
26597 | esac | |
26598 | ||
26599 | case $ac_tag in | |
26600 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
26601 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
26602 | esac | |
26603 | ;; | |
703d89ab ZW |
26604 | esac |
26605 | ||
5213506e | 26606 | ac_dir=`$as_dirname -- "$ac_file" || |
ba479fd2 | 26607 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
26608 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
26609 | X"$ac_file" : 'X\(//\)$' \| \ | |
5213506e RW |
26610 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
26611 | $as_echo X"$ac_file" | | |
26612 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
26613 | s//\1/ | |
26614 | q | |
26615 | } | |
26616 | /^X\(\/\/\)[^/].*/{ | |
26617 | s//\1/ | |
26618 | q | |
26619 | } | |
26620 | /^X\(\/\/\)$/{ | |
26621 | s//\1/ | |
26622 | q | |
26623 | } | |
26624 | /^X\(\/\).*/{ | |
26625 | s//\1/ | |
26626 | q | |
26627 | } | |
26628 | s/.*/./; q'` | |
26629 | as_dir="$ac_dir"; as_fn_mkdir_p | |
ba479fd2 NN |
26630 | ac_builddir=. |
26631 | ||
5213506e RW |
26632 | case "$ac_dir" in |
26633 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
26634 | *) | |
26635 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
26636 | # A ".." for each directory in $ac_dir_suffix. | |
26637 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
26638 | case $ac_top_builddir_sub in | |
26639 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
26640 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
26641 | esac ;; | |
26642 | esac | |
26643 | ac_abs_top_builddir=$ac_pwd | |
26644 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
26645 | # for backward compatibility: | |
26646 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
26647 | |
26648 | case $srcdir in | |
5213506e | 26649 | .) # We are building in place. |
ba479fd2 | 26650 | ac_srcdir=. |
5213506e RW |
26651 | ac_top_srcdir=$ac_top_builddir_sub |
26652 | ac_abs_top_srcdir=$ac_pwd ;; | |
26653 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 26654 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
26655 | ac_top_srcdir=$srcdir |
26656 | ac_abs_top_srcdir=$srcdir ;; | |
26657 | *) # Relative name. | |
26658 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
26659 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
26660 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
ba479fd2 | 26661 | esac |
5213506e | 26662 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
ba479fd2 | 26663 | |
703d89ab | 26664 | |
5213506e RW |
26665 | case $ac_mode in |
26666 | :F) | |
26667 | # | |
26668 | # CONFIG_FILE | |
26669 | # | |
ab22c1fa | 26670 | |
5213506e | 26671 | _ACEOF |
1a4b763e | 26672 | |
5213506e RW |
26673 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26674 | # If the template does not know about datarootdir, expand it. | |
26675 | # FIXME: This hack should be removed a few years after 2.60. | |
26676 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
26677 | ac_sed_dataroot=' | |
26678 | /datarootdir/ { | |
26679 | p | |
26680 | q | |
26681 | } | |
26682 | /@datadir@/p | |
26683 | /@docdir@/p | |
26684 | /@infodir@/p | |
26685 | /@localedir@/p | |
26686 | /@mandir@/p' | |
26687 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
26688 | *datarootdir*) ac_datarootdir_seen=yes;; | |
26689 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
26690 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
26691 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
26692 | _ACEOF | |
26693 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26694 | ac_datarootdir_hack=' | |
26695 | s&@datadir@&$datadir&g | |
26696 | s&@docdir@&$docdir&g | |
26697 | s&@infodir@&$infodir&g | |
26698 | s&@localedir@&$localedir&g | |
26699 | s&@mandir@&$mandir&g | |
26700 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
26701 | esac | |
a6ccdbab | 26702 | _ACEOF |
5213506e RW |
26703 | |
26704 | # Neutralize VPATH when `$srcdir' = `.'. | |
26705 | # Shell code in configure.ac might set extrasub. | |
26706 | # FIXME: do we really want to maintain this feature? | |
26707 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26708 | ac_sed_extra="$ac_vpsub | |
ba479fd2 NN |
26709 | $extrasub |
26710 | _ACEOF | |
5213506e | 26711 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ba479fd2 NN |
26712 | :t |
26713 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
5213506e RW |
26714 | s|@configure_input@|$ac_sed_conf_input|;t t |
26715 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
26716 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
26717 | s&@srcdir@&$ac_srcdir&;t t | |
26718 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
26719 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
26720 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
26721 | s&@builddir@&$ac_builddir&;t t | |
26722 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
26723 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
26724 | $ac_datarootdir_hack | |
26725 | " | |
26726 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
26727 | if $ac_cs_awk_getline; then | |
26728 | $AWK -f "$tmp/subs.awk" | |
26729 | else | |
26730 | $AWK -f "$tmp/subs.awk" | $SHELL | |
26731 | fi >$tmp/out \ | |
26732 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
26733 | ||
26734 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
26735 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
26736 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
26737 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
26738 | which seems to be undefined. Please make sure it is defined." >&5 | |
26739 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
26740 | which seems to be undefined. Please make sure it is defined." >&2;} | |
26741 | ||
26742 | rm -f "$tmp/stdin" | |
b61ff9c8 | 26743 | case $ac_file in |
5213506e RW |
26744 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
26745 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
26746 | esac \ | |
26747 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
26748 | ;; | |
26749 | :H) | |
26750 | # | |
26751 | # CONFIG_HEADER | |
26752 | # | |
ba479fd2 | 26753 | if test x"$ac_file" != x-; then |
5213506e RW |
26754 | { |
26755 | $as_echo "/* $configure_input */" \ | |
26756 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
26757 | } >"$tmp/config.h" \ | |
26758 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
26759 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
26760 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
26761 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
ba479fd2 | 26762 | else |
5213506e RW |
26763 | rm -f "$ac_file" |
26764 | mv "$tmp/config.h" "$ac_file" \ | |
26765 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
ba479fd2 NN |
26766 | fi |
26767 | else | |
5213506e RW |
26768 | $as_echo "/* $configure_input */" \ |
26769 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
26770 | || as_fn_error "could not create -" "$LINENO" 5 | |
ba479fd2 | 26771 | fi |
5213506e | 26772 | ;; |
b61ff9c8 | 26773 | |
5213506e RW |
26774 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
26775 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
26776 | ;; | |
26777 | esac | |
b61ff9c8 BS |
26778 | |
26779 | ||
5213506e RW |
26780 | case $ac_file$ac_mode in |
26781 | "as":F) chmod +x as ;; | |
26782 | "collect-ld":F) chmod +x collect-ld ;; | |
26783 | "nm":F) chmod +x nm ;; | |
26784 | "default":C) | |
f1faaabd NN |
26785 | case ${CONFIG_HEADERS} in |
26786 | *auto-host.h:config.in*) | |
26787 | echo > cstamp-h ;; | |
861bb6c1 | 26788 | esac |
2ed26f6b | 26789 | # Make sure all the subdirs exist. |
3b620440 | 26790 | for d in $subdirs doc build |
2ed26f6b | 26791 | do |
2ed26f6b | 26792 | test -d $d || mkdir $d |
2ed26f6b | 26793 | done |
ba479fd2 | 26794 | ;; |
5213506e | 26795 | |
ba479fd2 | 26796 | esac |
5213506e | 26797 | done # for ac_tag |
cafe096b | 26798 | |
ba479fd2 | 26799 | |
5213506e | 26800 | as_fn_exit 0 |
ba479fd2 | 26801 | _ACEOF |
ba479fd2 NN |
26802 | ac_clean_files=$ac_clean_files_save |
26803 | ||
5213506e RW |
26804 | test $ac_write_fail = 0 || |
26805 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
26806 | ||
ba479fd2 NN |
26807 | |
26808 | # configure is writing to config.log, and then calls config.status. | |
26809 | # config.status does its own redirection, appending to config.log. | |
26810 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
26811 | # by configure, so config.status won't be able to write to it; its | |
26812 | # output is simply discarded. So we exec the FD to /dev/null, | |
26813 | # effectively closing config.log, so it can be properly (re)opened and | |
26814 | # appended to by config.status. When coming back to configure, we | |
26815 | # need to make the FD available again. | |
26816 | if test "$no_create" != yes; then | |
26817 | ac_cs_success=: | |
26818 | ac_config_status_args= | |
26819 | test "$silent" = yes && | |
26820 | ac_config_status_args="$ac_config_status_args --quiet" | |
26821 | exec 5>/dev/null | |
26822 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
26823 | exec 5>>config.log | |
26824 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
26825 | # would make configure fail if this is the last instruction. | |
5213506e RW |
26826 | $ac_cs_success || as_fn_exit $? |
26827 | fi | |
26828 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
26829 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
26830 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
ba479fd2 | 26831 | fi |
861bb6c1 | 26832 |