Commit | Line | Data |
---|---|---|
01027315 TT |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
3 | # Generated by GNU Autoconf 2.69 for gdbsupport 1.0. | |
4 | # | |
5 | # | |
6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
7 | # | |
8 | # | |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
11 | ## -------------------- ## | |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
14 | ||
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 : | |
18 | emulate sh | |
19 | NULLCMD=: | |
20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
21 | # is contrary to our usage. Disable this feature. | |
22 | alias -g '${1+"$@"}'='"$@"' | |
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 | |
31 | fi | |
32 | ||
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 | } | |
79 | fi | |
80 | ||
81 | ||
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 | as_myself= | |
91 | case $0 in #(( | |
92 | *[\\/]* ) as_myself=$0 ;; | |
93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
94 | for as_dir in $PATH | |
95 | do | |
96 | IFS=$as_save_IFS | |
97 | test -z "$as_dir" && as_dir=. | |
98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
99 | done | |
100 | IFS=$as_save_IFS | |
101 | ||
102 | ;; | |
103 | esac | |
104 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
105 | # in which case we are not to be found in the path. | |
106 | if test "x$as_myself" = x; then | |
107 | as_myself=$0 | |
108 | fi | |
109 | if test ! -f "$as_myself"; then | |
110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
111 | exit 1 | |
112 | fi | |
113 | ||
114 | # Unset variables that we do not need and which cause bugs (e.g. in | |
115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
116 | # suppresses any "Segmentation fault" message there. '((' could | |
117 | # trigger a bug in pdksh 5.2.14. | |
118 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
119 | do eval test x\${$as_var+set} = xset \ | |
120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
121 | done | |
122 | PS1='$ ' | |
123 | PS2='> ' | |
124 | PS4='+ ' | |
125 | ||
126 | # NLS nuisances. | |
127 | LC_ALL=C | |
128 | export LC_ALL | |
129 | LANGUAGE=C | |
130 | export LANGUAGE | |
131 | ||
132 | # CDPATH. | |
133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
134 | ||
135 | # Use a proper internal environment variable to ensure we don't fall | |
136 | # into an infinite loop, continuously re-executing ourselves. | |
137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
138 | _as_can_reexec=no; export _as_can_reexec; | |
139 | # We cannot yet assume a decent shell, so we have to provide a | |
140 | # neutralization value for shells without unset; and this also | |
141 | # works around shells that cannot unset nonexistent variables. | |
142 | # Preserve -v and -x to the replacement shell. | |
143 | BASH_ENV=/dev/null | |
144 | ENV=/dev/null | |
145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
146 | case $- in # (((( | |
147 | *v*x* | *x*v* ) as_opts=-vx ;; | |
148 | *v* ) as_opts=-v ;; | |
149 | *x* ) as_opts=-x ;; | |
150 | * ) as_opts= ;; | |
151 | esac | |
152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
153 | # Admittedly, this is quite paranoid, since all the known shells bail | |
154 | # out after a failed `exec'. | |
155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
156 | as_fn_exit 255 | |
157 | fi | |
158 | # We don't want this to propagate to other subprocesses. | |
159 | { _as_can_reexec=; unset _as_can_reexec;} | |
160 | if test "x$CONFIG_SHELL" = x; then | |
161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
162 | emulate sh | |
163 | NULLCMD=: | |
164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
165 | # is contrary to our usage. Disable this feature. | |
166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
167 | setopt NO_GLOB_SUBST | |
168 | else | |
169 | case \`(set -o) 2>/dev/null\` in #( | |
170 | *posix*) : | |
171 | set -o posix ;; #( | |
172 | *) : | |
173 | ;; | |
174 | esac | |
175 | fi | |
176 | " | |
177 | as_required="as_fn_return () { (exit \$1); } | |
178 | as_fn_success () { as_fn_return 0; } | |
179 | as_fn_failure () { as_fn_return 1; } | |
180 | as_fn_ret_success () { return 0; } | |
181 | as_fn_ret_failure () { return 1; } | |
182 | ||
183 | exitcode=0 | |
184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
189 | ||
190 | else | |
191 | exitcode=1; echo positional parameters were not saved. | |
192 | fi | |
193 | test x\$exitcode = x0 || exit 1 | |
194 | test -x / || exit 1" | |
195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
199 | test \$(( 1 + 1 )) = 2 || exit 1" | |
200 | if (eval "$as_required") 2>/dev/null; then : | |
201 | as_have_required=yes | |
202 | else | |
203 | as_have_required=no | |
204 | fi | |
205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
206 | ||
207 | else | |
208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
209 | as_found=false | |
210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
211 | do | |
212 | IFS=$as_save_IFS | |
213 | test -z "$as_dir" && as_dir=. | |
214 | as_found=: | |
215 | case $as_dir in #( | |
216 | /*) | |
217 | for as_base in sh bash ksh sh5; do | |
218 | # Try only shells that exist, to save several forks. | |
219 | as_shell=$as_dir/$as_base | |
220 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
221 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
222 | CONFIG_SHELL=$as_shell as_have_required=yes | |
223 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
224 | break 2 | |
225 | fi | |
226 | fi | |
227 | done;; | |
228 | esac | |
229 | as_found=false | |
230 | done | |
231 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
232 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
233 | CONFIG_SHELL=$SHELL as_have_required=yes | |
234 | fi; } | |
235 | IFS=$as_save_IFS | |
236 | ||
237 | ||
238 | if test "x$CONFIG_SHELL" != x; then : | |
239 | export CONFIG_SHELL | |
240 | # We cannot yet assume a decent shell, so we have to provide a | |
241 | # neutralization value for shells without unset; and this also | |
242 | # works around shells that cannot unset nonexistent variables. | |
243 | # Preserve -v and -x to the replacement shell. | |
244 | BASH_ENV=/dev/null | |
245 | ENV=/dev/null | |
246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
247 | case $- in # (((( | |
248 | *v*x* | *x*v* ) as_opts=-vx ;; | |
249 | *v* ) as_opts=-v ;; | |
250 | *x* ) as_opts=-x ;; | |
251 | * ) as_opts= ;; | |
252 | esac | |
253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
254 | # Admittedly, this is quite paranoid, since all the known shells bail | |
255 | # out after a failed `exec'. | |
256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
257 | exit 255 | |
258 | fi | |
259 | ||
260 | if test x$as_have_required = xno; then : | |
261 | $as_echo "$0: This script requires a shell more modern than all" | |
262 | $as_echo "$0: the shells that I found on your system." | |
263 | if test x${ZSH_VERSION+set} = xset ; then | |
264 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
265 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
266 | else | |
267 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, | |
268 | $0: including any error possibly output before this | |
269 | $0: message. Then install a modern shell, or manually run | |
270 | $0: the script under such a shell if you do have one." | |
271 | fi | |
272 | exit 1 | |
273 | fi | |
274 | fi | |
275 | fi | |
276 | SHELL=${CONFIG_SHELL-/bin/sh} | |
277 | export SHELL | |
278 | # Unset more variables known to interfere with behavior of common tools. | |
279 | CLICOLOR_FORCE= GREP_OPTIONS= | |
280 | unset CLICOLOR_FORCE GREP_OPTIONS | |
281 | ||
282 | ## --------------------- ## | |
283 | ## M4sh Shell Functions. ## | |
284 | ## --------------------- ## | |
285 | # as_fn_unset VAR | |
286 | # --------------- | |
287 | # Portably unset VAR. | |
288 | as_fn_unset () | |
289 | { | |
290 | { eval $1=; unset $1;} | |
291 | } | |
292 | as_unset=as_fn_unset | |
293 | ||
294 | # as_fn_set_status STATUS | |
295 | # ----------------------- | |
296 | # Set $? to STATUS, without forking. | |
297 | as_fn_set_status () | |
298 | { | |
299 | return $1 | |
300 | } # as_fn_set_status | |
301 | ||
302 | # as_fn_exit STATUS | |
303 | # ----------------- | |
304 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
305 | as_fn_exit () | |
306 | { | |
307 | set +e | |
308 | as_fn_set_status $1 | |
309 | exit $1 | |
310 | } # as_fn_exit | |
311 | ||
312 | # as_fn_mkdir_p | |
313 | # ------------- | |
314 | # Create "$as_dir" as a directory, including parents if necessary. | |
315 | as_fn_mkdir_p () | |
316 | { | |
317 | ||
318 | case $as_dir in #( | |
319 | -*) as_dir=./$as_dir;; | |
320 | esac | |
321 | test -d "$as_dir" || eval $as_mkdir_p || { | |
322 | as_dirs= | |
323 | while :; do | |
324 | case $as_dir in #( | |
325 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
326 | *) as_qdir=$as_dir;; | |
327 | esac | |
328 | as_dirs="'$as_qdir' $as_dirs" | |
329 | as_dir=`$as_dirname -- "$as_dir" || | |
330 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
331 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
332 | X"$as_dir" : 'X\(//\)$' \| \ | |
333 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
334 | $as_echo X"$as_dir" | | |
335 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
336 | s//\1/ | |
337 | q | |
338 | } | |
339 | /^X\(\/\/\)[^/].*/{ | |
340 | s//\1/ | |
341 | q | |
342 | } | |
343 | /^X\(\/\/\)$/{ | |
344 | s//\1/ | |
345 | q | |
346 | } | |
347 | /^X\(\/\).*/{ | |
348 | s//\1/ | |
349 | q | |
350 | } | |
351 | s/.*/./; q'` | |
352 | test -d "$as_dir" && break | |
353 | done | |
354 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
355 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
356 | ||
357 | ||
358 | } # as_fn_mkdir_p | |
359 | ||
360 | # as_fn_executable_p FILE | |
361 | # ----------------------- | |
362 | # Test if FILE is an executable regular file. | |
363 | as_fn_executable_p () | |
364 | { | |
365 | test -f "$1" && test -x "$1" | |
366 | } # as_fn_executable_p | |
367 | # as_fn_append VAR VALUE | |
368 | # ---------------------- | |
369 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
370 | # advantage of any shell optimizations that allow amortized linear growth over | |
371 | # repeated appends, instead of the typical quadratic growth present in naive | |
372 | # implementations. | |
373 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
374 | eval 'as_fn_append () | |
375 | { | |
376 | eval $1+=\$2 | |
377 | }' | |
378 | else | |
379 | as_fn_append () | |
380 | { | |
381 | eval $1=\$$1\$2 | |
382 | } | |
383 | fi # as_fn_append | |
384 | ||
385 | # as_fn_arith ARG... | |
386 | # ------------------ | |
387 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
388 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
389 | # must be portable across $(()) and expr. | |
390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
391 | eval 'as_fn_arith () | |
392 | { | |
393 | as_val=$(( $* )) | |
394 | }' | |
395 | else | |
396 | as_fn_arith () | |
397 | { | |
398 | as_val=`expr "$@" || test $? -eq 1` | |
399 | } | |
400 | fi # as_fn_arith | |
401 | ||
402 | ||
403 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
404 | # ---------------------------------------- | |
405 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
406 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
407 | # script with STATUS, using 1 if that was 0. | |
408 | as_fn_error () | |
409 | { | |
410 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
411 | if test "$4"; then | |
412 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
413 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
414 | fi | |
415 | $as_echo "$as_me: error: $2" >&2 | |
416 | as_fn_exit $as_status | |
417 | } # as_fn_error | |
418 | ||
419 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
421 | as_expr=expr | |
422 | else | |
423 | as_expr=false | |
424 | fi | |
425 | ||
426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
427 | as_basename=basename | |
428 | else | |
429 | as_basename=false | |
430 | fi | |
431 | ||
432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
433 | as_dirname=dirname | |
434 | else | |
435 | as_dirname=false | |
436 | fi | |
437 | ||
438 | as_me=`$as_basename -- "$0" || | |
439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
440 | X"$0" : 'X\(//\)$' \| \ | |
441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
442 | $as_echo X/"$0" | | |
443 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
444 | s//\1/ | |
445 | q | |
446 | } | |
447 | /^X\/\(\/\/\)$/{ | |
448 | s//\1/ | |
449 | q | |
450 | } | |
451 | /^X\/\(\/\).*/{ | |
452 | s//\1/ | |
453 | q | |
454 | } | |
455 | s/.*/./; q'` | |
456 | ||
457 | # Avoid depending upon Character Ranges. | |
458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
461 | as_cr_digits='0123456789' | |
462 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
463 | ||
464 | ||
465 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
466 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
467 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
468 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
469 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
470 | sed -n ' | |
471 | p | |
472 | /[$]LINENO/= | |
473 | ' <$as_myself | | |
474 | sed ' | |
475 | s/[$]LINENO.*/&-/ | |
476 | t lineno | |
477 | b | |
478 | :lineno | |
479 | N | |
480 | :loop | |
481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
482 | t loop | |
483 | s/-\n.*// | |
484 | ' >$as_me.lineno && | |
485 | chmod +x "$as_me.lineno" || | |
486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
487 | ||
488 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have | |
489 | # already done that, so ensure we don't try to do so again and fall | |
490 | # in an infinite loop. This has already happened in practice. | |
491 | _as_can_reexec=no; export _as_can_reexec | |
492 | # Don't try to exec as it changes $[0], causing all sort of problems | |
493 | # (the dirname of $[0] is not the place where we might find the | |
494 | # original and so on. Autoconf is especially sensitive to this). | |
495 | . "./$as_me.lineno" | |
496 | # Exit status is that of the last command. | |
497 | exit | |
498 | } | |
499 | ||
500 | ECHO_C= ECHO_N= ECHO_T= | |
501 | case `echo -n x` in #((((( | |
502 | -n*) | |
503 | case `echo 'xy\c'` in | |
504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
505 | xy) ECHO_C='\c';; | |
506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
507 | ECHO_T=' ';; | |
508 | esac;; | |
509 | *) | |
510 | ECHO_N='-n';; | |
511 | esac | |
512 | ||
513 | rm -f conf$$ conf$$.exe conf$$.file | |
514 | if test -d conf$$.dir; then | |
515 | rm -f conf$$.dir/conf$$.file | |
516 | else | |
517 | rm -f conf$$.dir | |
518 | mkdir conf$$.dir 2>/dev/null | |
519 | fi | |
520 | if (echo >conf$$.file) 2>/dev/null; then | |
521 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
522 | as_ln_s='ln -s' | |
523 | # ... but there are two gotchas: | |
524 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
525 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
526 | # In both cases, we have to default to `cp -pR'. | |
527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
528 | as_ln_s='cp -pR' | |
529 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
530 | as_ln_s=ln | |
531 | else | |
532 | as_ln_s='cp -pR' | |
533 | fi | |
534 | else | |
535 | as_ln_s='cp -pR' | |
536 | fi | |
537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
538 | rmdir conf$$.dir 2>/dev/null | |
539 | ||
540 | if mkdir -p . 2>/dev/null; then | |
541 | as_mkdir_p='mkdir -p "$as_dir"' | |
542 | else | |
543 | test -d ./-p && rmdir ./-p | |
544 | as_mkdir_p=false | |
545 | fi | |
546 | ||
547 | as_test_x='test -x' | |
548 | as_executable_p=as_fn_executable_p | |
549 | ||
550 | # Sed expression to map a string onto a valid CPP name. | |
551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
552 | ||
553 | # Sed expression to map a string onto a valid variable name. | |
554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
555 | ||
556 | ||
557 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
558 | exec 6>&1 | |
559 | ||
560 | # Name of the host. | |
561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, | |
562 | # so uname gets run too. | |
563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
564 | ||
565 | # | |
566 | # Initializations. | |
567 | # | |
568 | ac_default_prefix=/usr/local | |
569 | ac_clean_files= | |
570 | ac_config_libobj_dir=. | |
571 | LIBOBJS= | |
572 | cross_compiling=no | |
573 | subdirs= | |
574 | MFLAGS= | |
575 | MAKEFLAGS= | |
576 | ||
577 | # Identity of this package. | |
578 | PACKAGE_NAME='gdbsupport' | |
579 | PACKAGE_TARNAME='gdbsupport' | |
580 | PACKAGE_VERSION='1.0' | |
581 | PACKAGE_STRING='gdbsupport 1.0' | |
582 | PACKAGE_BUGREPORT='' | |
583 | PACKAGE_URL='' | |
584 | ||
585 | ac_unique_file="common-defs.h" | |
586 | # Factoring default headers for most tests. | |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
589 | #ifdef HAVE_SYS_TYPES_H | |
590 | # include <sys/types.h> | |
591 | #endif | |
592 | #ifdef HAVE_SYS_STAT_H | |
593 | # include <sys/stat.h> | |
594 | #endif | |
595 | #ifdef STDC_HEADERS | |
596 | # include <stdlib.h> | |
597 | # include <stddef.h> | |
598 | #else | |
599 | # ifdef HAVE_STDLIB_H | |
600 | # include <stdlib.h> | |
601 | # endif | |
602 | #endif | |
603 | #ifdef HAVE_STRING_H | |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
605 | # include <memory.h> | |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
609 | #ifdef HAVE_STRINGS_H | |
610 | # include <strings.h> | |
611 | #endif | |
612 | #ifdef HAVE_INTTYPES_H | |
613 | # include <inttypes.h> | |
614 | #endif | |
615 | #ifdef HAVE_STDINT_H | |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
619 | # include <unistd.h> | |
620 | #endif" | |
621 | ||
05ea2a05 | 622 | ac_header_list= |
01027315 TT |
623 | ac_subst_vars='am__EXEEXT_FALSE |
624 | am__EXEEXT_TRUE | |
625 | LTLIBOBJS | |
626 | LIBOBJS | |
629c2962 SM |
627 | WERROR_CFLAGS |
628 | WARN_CFLAGS | |
01027315 TT |
629 | SELFTEST_FALSE |
630 | SELFTEST_TRUE | |
05ea2a05 TT |
631 | LTLIBIPT |
632 | LIBIPT | |
633 | HAVE_LIBIPT | |
01027315 TT |
634 | PTHREAD_CFLAGS |
635 | PTHREAD_LIBS | |
636 | PTHREAD_CC | |
637 | ax_pthread_config | |
638 | SED | |
639 | ALLOCA | |
640 | CATOBJEXT | |
641 | GENCAT | |
642 | INSTOBJEXT | |
643 | DATADIRNAME | |
644 | CATALOGS | |
645 | POSUB | |
646 | GMSGFMT | |
647 | XGETTEXT | |
648 | INCINTL | |
649 | LIBINTL_DEP | |
650 | LIBINTL | |
651 | USE_NLS | |
652 | CXX_DIALECT | |
653 | HAVE_CXX11 | |
c8693053 | 654 | LARGEFILE_CPPFLAGS |
01027315 TT |
655 | EGREP |
656 | GREP | |
657 | CPP | |
658 | RANLIB | |
659 | am__fastdepCXX_FALSE | |
660 | am__fastdepCXX_TRUE | |
661 | CXXDEPMODE | |
662 | ac_ct_CXX | |
663 | CXXFLAGS | |
664 | CXX | |
665 | am__fastdepCC_FALSE | |
666 | am__fastdepCC_TRUE | |
667 | CCDEPMODE | |
668 | am__nodep | |
669 | AMDEPBACKSLASH | |
670 | AMDEP_FALSE | |
671 | AMDEP_TRUE | |
672 | am__quote | |
673 | am__include | |
674 | DEPDIR | |
675 | OBJEXT | |
676 | EXEEXT | |
677 | ac_ct_CC | |
678 | CPPFLAGS | |
679 | LDFLAGS | |
680 | CFLAGS | |
681 | CC | |
682 | AM_BACKSLASH | |
683 | AM_DEFAULT_VERBOSITY | |
684 | AM_DEFAULT_V | |
685 | AM_V | |
686 | am__untar | |
687 | am__tar | |
688 | AMTAR | |
689 | am__leading_dot | |
690 | SET_MAKE | |
691 | AWK | |
692 | mkdir_p | |
693 | MKDIR_P | |
694 | INSTALL_STRIP_PROGRAM | |
695 | STRIP | |
696 | install_sh | |
697 | MAKEINFO | |
698 | AUTOHEADER | |
699 | AUTOMAKE | |
700 | AUTOCONF | |
701 | ACLOCAL | |
702 | VERSION | |
703 | PACKAGE | |
704 | CYGPATH_W | |
705 | am__isrc | |
706 | INSTALL_DATA | |
707 | INSTALL_SCRIPT | |
708 | INSTALL_PROGRAM | |
709 | MAINT | |
710 | MAINTAINER_MODE_FALSE | |
711 | MAINTAINER_MODE_TRUE | |
712 | target_os | |
713 | target_vendor | |
714 | target_cpu | |
715 | target | |
716 | host_os | |
717 | host_vendor | |
718 | host_cpu | |
719 | host | |
720 | build_os | |
721 | build_vendor | |
722 | build_cpu | |
723 | build | |
724 | target_alias | |
725 | host_alias | |
726 | build_alias | |
727 | LIBS | |
728 | ECHO_T | |
729 | ECHO_N | |
730 | ECHO_C | |
731 | DEFS | |
732 | mandir | |
733 | localedir | |
734 | libdir | |
735 | psdir | |
736 | pdfdir | |
737 | dvidir | |
738 | htmldir | |
739 | infodir | |
740 | docdir | |
741 | oldincludedir | |
742 | includedir | |
743 | localstatedir | |
744 | sharedstatedir | |
745 | sysconfdir | |
746 | datadir | |
747 | datarootdir | |
748 | libexecdir | |
749 | sbindir | |
750 | bindir | |
751 | program_transform_name | |
752 | prefix | |
753 | exec_prefix | |
754 | PACKAGE_URL | |
755 | PACKAGE_BUGREPORT | |
756 | PACKAGE_STRING | |
757 | PACKAGE_VERSION | |
758 | PACKAGE_TARNAME | |
759 | PACKAGE_NAME | |
760 | PATH_SEPARATOR | |
761 | SHELL' | |
762 | ac_subst_files='' | |
763 | ac_user_opts=' | |
764 | enable_option_checking | |
765 | enable_maintainer_mode | |
766 | enable_silent_rules | |
767 | enable_dependency_tracking | |
768 | enable_plugins | |
769 | enable_largefile | |
05ea2a05 TT |
770 | with_intel_pt |
771 | with_gnu_ld | |
772 | enable_rpath | |
773 | with_libipt_prefix | |
9f1528a1 | 774 | with_libipt_type |
01027315 | 775 | enable_unit_tests |
629c2962 SM |
776 | enable_werror |
777 | enable_build_warnings | |
778 | enable_gdb_build_warnings | |
01027315 TT |
779 | ' |
780 | ac_precious_vars='build_alias | |
781 | host_alias | |
782 | target_alias | |
783 | CC | |
784 | CFLAGS | |
785 | LDFLAGS | |
786 | LIBS | |
787 | CPPFLAGS | |
788 | CXX | |
789 | CXXFLAGS | |
790 | CCC | |
791 | CPP' | |
792 | ||
793 | ||
794 | # Initialize some variables set by options. | |
795 | ac_init_help= | |
796 | ac_init_version=false | |
797 | ac_unrecognized_opts= | |
798 | ac_unrecognized_sep= | |
799 | # The variables have the same names as the options, with | |
800 | # dashes changed to underlines. | |
801 | cache_file=/dev/null | |
802 | exec_prefix=NONE | |
803 | no_create= | |
804 | no_recursion= | |
805 | prefix=NONE | |
806 | program_prefix=NONE | |
807 | program_suffix=NONE | |
808 | program_transform_name=s,x,x, | |
809 | silent= | |
810 | site= | |
811 | srcdir= | |
812 | verbose= | |
813 | x_includes=NONE | |
814 | x_libraries=NONE | |
815 | ||
816 | # Installation directory options. | |
817 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
818 | # and all the variables that are supposed to be based on exec_prefix | |
819 | # by default will actually change. | |
820 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
821 | # (The list follows the same order as the GNU Coding Standards.) | |
822 | bindir='${exec_prefix}/bin' | |
823 | sbindir='${exec_prefix}/sbin' | |
824 | libexecdir='${exec_prefix}/libexec' | |
825 | datarootdir='${prefix}/share' | |
826 | datadir='${datarootdir}' | |
827 | sysconfdir='${prefix}/etc' | |
828 | sharedstatedir='${prefix}/com' | |
829 | localstatedir='${prefix}/var' | |
830 | includedir='${prefix}/include' | |
831 | oldincludedir='/usr/include' | |
832 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
833 | infodir='${datarootdir}/info' | |
834 | htmldir='${docdir}' | |
835 | dvidir='${docdir}' | |
836 | pdfdir='${docdir}' | |
837 | psdir='${docdir}' | |
838 | libdir='${exec_prefix}/lib' | |
839 | localedir='${datarootdir}/locale' | |
840 | mandir='${datarootdir}/man' | |
841 | ||
842 | ac_prev= | |
843 | ac_dashdash= | |
844 | for ac_option | |
845 | do | |
846 | # If the previous option needs an argument, assign it. | |
847 | if test -n "$ac_prev"; then | |
848 | eval $ac_prev=\$ac_option | |
849 | ac_prev= | |
850 | continue | |
851 | fi | |
852 | ||
853 | case $ac_option in | |
854 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
855 | *=) ac_optarg= ;; | |
856 | *) ac_optarg=yes ;; | |
857 | esac | |
858 | ||
859 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
860 | ||
861 | case $ac_dashdash$ac_option in | |
862 | --) | |
863 | ac_dashdash=yes ;; | |
864 | ||
865 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
866 | ac_prev=bindir ;; | |
867 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
868 | bindir=$ac_optarg ;; | |
869 | ||
870 | -build | --build | --buil | --bui | --bu) | |
871 | ac_prev=build_alias ;; | |
872 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
873 | build_alias=$ac_optarg ;; | |
874 | ||
875 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
876 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
877 | ac_prev=cache_file ;; | |
878 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
879 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
880 | cache_file=$ac_optarg ;; | |
881 | ||
882 | --config-cache | -C) | |
883 | cache_file=config.cache ;; | |
884 | ||
885 | -datadir | --datadir | --datadi | --datad) | |
886 | ac_prev=datadir ;; | |
887 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
888 | datadir=$ac_optarg ;; | |
889 | ||
890 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
891 | | --dataroo | --dataro | --datar) | |
892 | ac_prev=datarootdir ;; | |
893 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
894 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
895 | datarootdir=$ac_optarg ;; | |
896 | ||
897 | -disable-* | --disable-*) | |
898 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
899 | # Reject names that are not valid shell variable names. | |
900 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
901 | as_fn_error $? "invalid feature name: $ac_useropt" | |
902 | ac_useropt_orig=$ac_useropt | |
903 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
904 | case $ac_user_opts in | |
905 | *" | |
906 | "enable_$ac_useropt" | |
907 | "*) ;; | |
908 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
909 | ac_unrecognized_sep=', ';; | |
910 | esac | |
911 | eval enable_$ac_useropt=no ;; | |
912 | ||
913 | -docdir | --docdir | --docdi | --doc | --do) | |
914 | ac_prev=docdir ;; | |
915 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
916 | docdir=$ac_optarg ;; | |
917 | ||
918 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
919 | ac_prev=dvidir ;; | |
920 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
921 | dvidir=$ac_optarg ;; | |
922 | ||
923 | -enable-* | --enable-*) | |
924 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
925 | # Reject names that are not valid shell variable names. | |
926 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
927 | as_fn_error $? "invalid feature name: $ac_useropt" | |
928 | ac_useropt_orig=$ac_useropt | |
929 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
930 | case $ac_user_opts in | |
931 | *" | |
932 | "enable_$ac_useropt" | |
933 | "*) ;; | |
934 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
935 | ac_unrecognized_sep=', ';; | |
936 | esac | |
937 | eval enable_$ac_useropt=\$ac_optarg ;; | |
938 | ||
939 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
940 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
941 | | --exec | --exe | --ex) | |
942 | ac_prev=exec_prefix ;; | |
943 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
944 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
945 | | --exec=* | --exe=* | --ex=*) | |
946 | exec_prefix=$ac_optarg ;; | |
947 | ||
948 | -gas | --gas | --ga | --g) | |
949 | # Obsolete; use --with-gas. | |
950 | with_gas=yes ;; | |
951 | ||
952 | -help | --help | --hel | --he | -h) | |
953 | ac_init_help=long ;; | |
954 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
955 | ac_init_help=recursive ;; | |
956 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
957 | ac_init_help=short ;; | |
958 | ||
959 | -host | --host | --hos | --ho) | |
960 | ac_prev=host_alias ;; | |
961 | -host=* | --host=* | --hos=* | --ho=*) | |
962 | host_alias=$ac_optarg ;; | |
963 | ||
964 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
965 | ac_prev=htmldir ;; | |
966 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
967 | | --ht=*) | |
968 | htmldir=$ac_optarg ;; | |
969 | ||
970 | -includedir | --includedir | --includedi | --included | --include \ | |
971 | | --includ | --inclu | --incl | --inc) | |
972 | ac_prev=includedir ;; | |
973 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
974 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
975 | includedir=$ac_optarg ;; | |
976 | ||
977 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
978 | ac_prev=infodir ;; | |
979 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
980 | infodir=$ac_optarg ;; | |
981 | ||
982 | -libdir | --libdir | --libdi | --libd) | |
983 | ac_prev=libdir ;; | |
984 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
985 | libdir=$ac_optarg ;; | |
986 | ||
987 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
988 | | --libexe | --libex | --libe) | |
989 | ac_prev=libexecdir ;; | |
990 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
991 | | --libexe=* | --libex=* | --libe=*) | |
992 | libexecdir=$ac_optarg ;; | |
993 | ||
994 | -localedir | --localedir | --localedi | --localed | --locale) | |
995 | ac_prev=localedir ;; | |
996 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
997 | localedir=$ac_optarg ;; | |
998 | ||
999 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1000 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1001 | ac_prev=localstatedir ;; | |
1002 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1003 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1004 | localstatedir=$ac_optarg ;; | |
1005 | ||
1006 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1007 | ac_prev=mandir ;; | |
1008 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1009 | mandir=$ac_optarg ;; | |
1010 | ||
1011 | -nfp | --nfp | --nf) | |
1012 | # Obsolete; use --without-fp. | |
1013 | with_fp=no ;; | |
1014 | ||
1015 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1016 | | --no-cr | --no-c | -n) | |
1017 | no_create=yes ;; | |
1018 | ||
1019 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1020 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1021 | no_recursion=yes ;; | |
1022 | ||
1023 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1024 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1025 | | --oldin | --oldi | --old | --ol | --o) | |
1026 | ac_prev=oldincludedir ;; | |
1027 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1028 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1029 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1030 | oldincludedir=$ac_optarg ;; | |
1031 | ||
1032 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1033 | ac_prev=prefix ;; | |
1034 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1035 | prefix=$ac_optarg ;; | |
1036 | ||
1037 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1038 | | --program-pre | --program-pr | --program-p) | |
1039 | ac_prev=program_prefix ;; | |
1040 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1041 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1042 | program_prefix=$ac_optarg ;; | |
1043 | ||
1044 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1045 | | --program-suf | --program-su | --program-s) | |
1046 | ac_prev=program_suffix ;; | |
1047 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1048 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1049 | program_suffix=$ac_optarg ;; | |
1050 | ||
1051 | -program-transform-name | --program-transform-name \ | |
1052 | | --program-transform-nam | --program-transform-na \ | |
1053 | | --program-transform-n | --program-transform- \ | |
1054 | | --program-transform | --program-transfor \ | |
1055 | | --program-transfo | --program-transf \ | |
1056 | | --program-trans | --program-tran \ | |
1057 | | --progr-tra | --program-tr | --program-t) | |
1058 | ac_prev=program_transform_name ;; | |
1059 | -program-transform-name=* | --program-transform-name=* \ | |
1060 | | --program-transform-nam=* | --program-transform-na=* \ | |
1061 | | --program-transform-n=* | --program-transform-=* \ | |
1062 | | --program-transform=* | --program-transfor=* \ | |
1063 | | --program-transfo=* | --program-transf=* \ | |
1064 | | --program-trans=* | --program-tran=* \ | |
1065 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1066 | program_transform_name=$ac_optarg ;; | |
1067 | ||
1068 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1069 | ac_prev=pdfdir ;; | |
1070 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1071 | pdfdir=$ac_optarg ;; | |
1072 | ||
1073 | -psdir | --psdir | --psdi | --psd | --ps) | |
1074 | ac_prev=psdir ;; | |
1075 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1076 | psdir=$ac_optarg ;; | |
1077 | ||
1078 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1079 | | -silent | --silent | --silen | --sile | --sil) | |
1080 | silent=yes ;; | |
1081 | ||
1082 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1083 | ac_prev=sbindir ;; | |
1084 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1085 | | --sbi=* | --sb=*) | |
1086 | sbindir=$ac_optarg ;; | |
1087 | ||
1088 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1089 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1090 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1091 | | --sha | --sh) | |
1092 | ac_prev=sharedstatedir ;; | |
1093 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1094 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1095 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1096 | | --sha=* | --sh=*) | |
1097 | sharedstatedir=$ac_optarg ;; | |
1098 | ||
1099 | -site | --site | --sit) | |
1100 | ac_prev=site ;; | |
1101 | -site=* | --site=* | --sit=*) | |
1102 | site=$ac_optarg ;; | |
1103 | ||
1104 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1105 | ac_prev=srcdir ;; | |
1106 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1107 | srcdir=$ac_optarg ;; | |
1108 | ||
1109 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1110 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1111 | ac_prev=sysconfdir ;; | |
1112 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1113 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1114 | sysconfdir=$ac_optarg ;; | |
1115 | ||
1116 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1117 | ac_prev=target_alias ;; | |
1118 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1119 | target_alias=$ac_optarg ;; | |
1120 | ||
1121 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1122 | verbose=yes ;; | |
1123 | ||
1124 | -version | --version | --versio | --versi | --vers | -V) | |
1125 | ac_init_version=: ;; | |
1126 | ||
1127 | -with-* | --with-*) | |
1128 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1129 | # Reject names that are not valid shell variable names. | |
1130 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1131 | as_fn_error $? "invalid package name: $ac_useropt" | |
1132 | ac_useropt_orig=$ac_useropt | |
1133 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1134 | case $ac_user_opts in | |
1135 | *" | |
1136 | "with_$ac_useropt" | |
1137 | "*) ;; | |
1138 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1139 | ac_unrecognized_sep=', ';; | |
1140 | esac | |
1141 | eval with_$ac_useropt=\$ac_optarg ;; | |
1142 | ||
1143 | -without-* | --without-*) | |
1144 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1145 | # Reject names that are not valid shell variable names. | |
1146 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1147 | as_fn_error $? "invalid package name: $ac_useropt" | |
1148 | ac_useropt_orig=$ac_useropt | |
1149 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1150 | case $ac_user_opts in | |
1151 | *" | |
1152 | "with_$ac_useropt" | |
1153 | "*) ;; | |
1154 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1155 | ac_unrecognized_sep=', ';; | |
1156 | esac | |
1157 | eval with_$ac_useropt=no ;; | |
1158 | ||
1159 | --x) | |
1160 | # Obsolete; use --with-x. | |
1161 | with_x=yes ;; | |
1162 | ||
1163 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1164 | | --x-incl | --x-inc | --x-in | --x-i) | |
1165 | ac_prev=x_includes ;; | |
1166 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1167 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1168 | x_includes=$ac_optarg ;; | |
1169 | ||
1170 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1171 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1172 | ac_prev=x_libraries ;; | |
1173 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1174 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1175 | x_libraries=$ac_optarg ;; | |
1176 | ||
1177 | -*) as_fn_error $? "unrecognized option: \`$ac_option' | |
1178 | Try \`$0 --help' for more information" | |
1179 | ;; | |
1180 | ||
1181 | *=*) | |
1182 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1183 | # Reject names that are not valid shell variable names. | |
1184 | case $ac_envvar in #( | |
1185 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1186 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; | |
1187 | esac | |
1188 | eval $ac_envvar=\$ac_optarg | |
1189 | export $ac_envvar ;; | |
1190 | ||
1191 | *) | |
1192 | # FIXME: should be removed in autoconf 3.0. | |
1193 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1194 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1195 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1196 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" | |
1197 | ;; | |
1198 | ||
1199 | esac | |
1200 | done | |
1201 | ||
1202 | if test -n "$ac_prev"; then | |
1203 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
1204 | as_fn_error $? "missing argument to $ac_option" | |
1205 | fi | |
1206 | ||
1207 | if test -n "$ac_unrecognized_opts"; then | |
1208 | case $enable_option_checking in | |
1209 | no) ;; | |
1210 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; | |
1211 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
1212 | esac | |
1213 | fi | |
1214 | ||
1215 | # Check all directory arguments for consistency. | |
1216 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1217 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1218 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1219 | libdir localedir mandir | |
1220 | do | |
1221 | eval ac_val=\$$ac_var | |
1222 | # Remove trailing slashes. | |
1223 | case $ac_val in | |
1224 | */ ) | |
1225 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1226 | eval $ac_var=\$ac_val;; | |
1227 | esac | |
1228 | # Be sure to have absolute directory names. | |
1229 | case $ac_val in | |
1230 | [\\/$]* | ?:[\\/]* ) continue;; | |
1231 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1232 | esac | |
1233 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" | |
1234 | done | |
1235 | ||
1236 | # There might be people who depend on the old broken behavior: `$host' | |
1237 | # used to hold the argument of --host etc. | |
1238 | # FIXME: To remove some day. | |
1239 | build=$build_alias | |
1240 | host=$host_alias | |
1241 | target=$target_alias | |
1242 | ||
1243 | # FIXME: To remove some day. | |
1244 | if test "x$host_alias" != x; then | |
1245 | if test "x$build_alias" = x; then | |
1246 | cross_compiling=maybe | |
1247 | elif test "x$build_alias" != "x$host_alias"; then | |
1248 | cross_compiling=yes | |
1249 | fi | |
1250 | fi | |
1251 | ||
1252 | ac_tool_prefix= | |
1253 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1254 | ||
1255 | test "$silent" = yes && exec 6>/dev/null | |
1256 | ||
1257 | ||
1258 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1259 | ac_ls_di=`ls -di .` && | |
1260 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1261 | as_fn_error $? "working directory cannot be determined" | |
1262 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1263 | as_fn_error $? "pwd does not report name of working directory" | |
1264 | ||
1265 | ||
1266 | # Find the source files, if location was not specified. | |
1267 | if test -z "$srcdir"; then | |
1268 | ac_srcdir_defaulted=yes | |
1269 | # Try the directory containing this script, then the parent directory. | |
1270 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1271 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1272 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1273 | X"$as_myself" : 'X\(//\)$' \| \ | |
1274 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1275 | $as_echo X"$as_myself" | | |
1276 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1277 | s//\1/ | |
1278 | q | |
1279 | } | |
1280 | /^X\(\/\/\)[^/].*/{ | |
1281 | s//\1/ | |
1282 | q | |
1283 | } | |
1284 | /^X\(\/\/\)$/{ | |
1285 | s//\1/ | |
1286 | q | |
1287 | } | |
1288 | /^X\(\/\).*/{ | |
1289 | s//\1/ | |
1290 | q | |
1291 | } | |
1292 | s/.*/./; q'` | |
1293 | srcdir=$ac_confdir | |
1294 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1295 | srcdir=.. | |
1296 | fi | |
1297 | else | |
1298 | ac_srcdir_defaulted=no | |
1299 | fi | |
1300 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1301 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1302 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" | |
1303 | fi | |
1304 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1305 | ac_abs_confdir=`( | |
1306 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" | |
1307 | pwd)` | |
1308 | # When building in place, set srcdir=. | |
1309 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1310 | srcdir=. | |
1311 | fi | |
1312 | # Remove unnecessary trailing slashes from srcdir. | |
1313 | # Double slashes in file names in object file debugging info | |
1314 | # mess up M-x gdb in Emacs. | |
1315 | case $srcdir in | |
1316 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1317 | esac | |
1318 | for ac_var in $ac_precious_vars; do | |
1319 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1320 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1321 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1322 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1323 | done | |
1324 | ||
1325 | # | |
1326 | # Report the --help message. | |
1327 | # | |
1328 | if test "$ac_init_help" = "long"; then | |
1329 | # Omit some internal or obsolete options to make the list less imposing. | |
1330 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1331 | cat <<_ACEOF | |
1332 | \`configure' configures gdbsupport 1.0 to adapt to many kinds of systems. | |
1333 | ||
1334 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1335 | ||
1336 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1337 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1338 | ||
1339 | Defaults for the options are specified in brackets. | |
1340 | ||
1341 | Configuration: | |
1342 | -h, --help display this help and exit | |
1343 | --help=short display options specific to this package | |
1344 | --help=recursive display the short help of all the included packages | |
1345 | -V, --version display version information and exit | |
1346 | -q, --quiet, --silent do not print \`checking ...' messages | |
1347 | --cache-file=FILE cache test results in FILE [disabled] | |
1348 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1349 | -n, --no-create do not create output files | |
1350 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1351 | ||
1352 | Installation directories: | |
1353 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1354 | [$ac_default_prefix] | |
1355 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1356 | [PREFIX] | |
1357 | ||
1358 | By default, \`make install' will install all the files in | |
1359 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1360 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1361 | for instance \`--prefix=\$HOME'. | |
1362 | ||
1363 | For better control, use the options below. | |
1364 | ||
1365 | Fine tuning of the installation directories: | |
1366 | --bindir=DIR user executables [EPREFIX/bin] | |
1367 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1368 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1369 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1370 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1371 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1372 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1373 | --includedir=DIR C header files [PREFIX/include] | |
1374 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1375 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1376 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1377 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1378 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1379 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1380 | --docdir=DIR documentation root [DATAROOTDIR/doc/gdbsupport] | |
1381 | --htmldir=DIR html documentation [DOCDIR] | |
1382 | --dvidir=DIR dvi documentation [DOCDIR] | |
1383 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1384 | --psdir=DIR ps documentation [DOCDIR] | |
1385 | _ACEOF | |
1386 | ||
1387 | cat <<\_ACEOF | |
1388 | ||
1389 | Program names: | |
1390 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1391 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1392 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1393 | ||
1394 | System types: | |
1395 | --build=BUILD configure for building on BUILD [guessed] | |
1396 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1397 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1398 | _ACEOF | |
1399 | fi | |
1400 | ||
1401 | if test -n "$ac_init_help"; then | |
1402 | case $ac_init_help in | |
1403 | short | recursive ) echo "Configuration of gdbsupport 1.0:";; | |
1404 | esac | |
1405 | cat <<\_ACEOF | |
1406 | ||
1407 | Optional Features: | |
1408 | --disable-option-checking ignore unrecognized --enable/--with options | |
1409 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1410 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1411 | --enable-maintainer-mode | |
1412 | enable make rules and dependencies not useful (and | |
1413 | sometimes confusing) to the casual installer | |
1414 | --enable-silent-rules less verbose build output (undo: "make V=1") | |
1415 | --disable-silent-rules verbose build output (undo: "make V=0") | |
1416 | --enable-dependency-tracking | |
1417 | do not reject slow dependency extractors | |
1418 | --disable-dependency-tracking | |
1419 | speeds up one-time build | |
1420 | --enable-plugins Enable support for plugins | |
1421 | --disable-largefile omit support for large files | |
05ea2a05 | 1422 | --disable-rpath do not hardcode runtime library paths |
01027315 TT |
1423 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1424 | GDB | |
629c2962 SM |
1425 | --enable-werror treat compile warnings as errors |
1426 | --enable-build-warnings enable build-time compiler warnings if gcc is used | |
1427 | --enable-gdb-build-warnings | |
1428 | enable GDB specific build-time compiler warnings if | |
1429 | gcc is used | |
01027315 | 1430 | |
05ea2a05 TT |
1431 | Optional Packages: |
1432 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1433 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1434 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) | |
1435 | --with-gnu-ld assume the C compiler uses GNU ld default=no | |
1436 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib | |
1437 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1438 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
05ea2a05 | 1439 | |
01027315 TT |
1440 | Some influential environment variables: |
1441 | CC C compiler command | |
1442 | CFLAGS C compiler flags | |
1443 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1444 | nonstandard directory <lib dir> | |
1445 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1446 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1447 | you have headers in a nonstandard directory <include dir> | |
1448 | CXX C++ compiler command | |
1449 | CXXFLAGS C++ compiler flags | |
1450 | CPP C preprocessor | |
1451 | ||
1452 | Use these variables to override the choices made by `configure' or to help | |
1453 | it to find libraries and programs with nonstandard names/locations. | |
1454 | ||
1455 | Report bugs to the package provider. | |
1456 | _ACEOF | |
1457 | ac_status=$? | |
1458 | fi | |
1459 | ||
1460 | if test "$ac_init_help" = "recursive"; then | |
1461 | # If there are subdirs, report their specific --help. | |
1462 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1463 | test -d "$ac_dir" || | |
1464 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1465 | continue | |
1466 | ac_builddir=. | |
1467 | ||
1468 | case "$ac_dir" in | |
1469 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1470 | *) | |
1471 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1472 | # A ".." for each directory in $ac_dir_suffix. | |
1473 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1474 | case $ac_top_builddir_sub in | |
1475 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1476 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1477 | esac ;; | |
1478 | esac | |
1479 | ac_abs_top_builddir=$ac_pwd | |
1480 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1481 | # for backward compatibility: | |
1482 | ac_top_builddir=$ac_top_build_prefix | |
1483 | ||
1484 | case $srcdir in | |
1485 | .) # We are building in place. | |
1486 | ac_srcdir=. | |
1487 | ac_top_srcdir=$ac_top_builddir_sub | |
1488 | ac_abs_top_srcdir=$ac_pwd ;; | |
1489 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1490 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1491 | ac_top_srcdir=$srcdir | |
1492 | ac_abs_top_srcdir=$srcdir ;; | |
1493 | *) # Relative name. | |
1494 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1495 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1496 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1497 | esac | |
1498 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1499 | ||
1500 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1501 | # Check for guested configure. | |
1502 | if test -f "$ac_srcdir/configure.gnu"; then | |
1503 | echo && | |
1504 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1505 | elif test -f "$ac_srcdir/configure"; then | |
1506 | echo && | |
1507 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1508 | else | |
1509 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1510 | fi || ac_status=$? | |
1511 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1512 | done | |
1513 | fi | |
1514 | ||
1515 | test -n "$ac_init_help" && exit $ac_status | |
1516 | if $ac_init_version; then | |
1517 | cat <<\_ACEOF | |
1518 | gdbsupport configure 1.0 | |
1519 | generated by GNU Autoconf 2.69 | |
1520 | ||
1521 | Copyright (C) 2012 Free Software Foundation, Inc. | |
1522 | This configure script is free software; the Free Software Foundation | |
1523 | gives unlimited permission to copy, distribute and modify it. | |
1524 | _ACEOF | |
1525 | exit | |
1526 | fi | |
1527 | ||
1528 | ## ------------------------ ## | |
1529 | ## Autoconf initialization. ## | |
1530 | ## ------------------------ ## | |
1531 | ||
1532 | # ac_fn_c_try_compile LINENO | |
1533 | # -------------------------- | |
1534 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1535 | ac_fn_c_try_compile () | |
1536 | { | |
1537 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1538 | rm -f conftest.$ac_objext | |
1539 | if { { ac_try="$ac_compile" | |
1540 | case "(($ac_try" in | |
1541 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1542 | *) ac_try_echo=$ac_try;; | |
1543 | esac | |
1544 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1545 | $as_echo "$ac_try_echo"; } >&5 | |
1546 | (eval "$ac_compile") 2>conftest.err | |
1547 | ac_status=$? | |
1548 | if test -s conftest.err; then | |
1549 | grep -v '^ *+' conftest.err >conftest.er1 | |
1550 | cat conftest.er1 >&5 | |
1551 | mv -f conftest.er1 conftest.err | |
1552 | fi | |
1553 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1554 | test $ac_status = 0; } && { | |
1555 | test -z "$ac_c_werror_flag" || | |
1556 | test ! -s conftest.err | |
1557 | } && test -s conftest.$ac_objext; then : | |
1558 | ac_retval=0 | |
1559 | else | |
1560 | $as_echo "$as_me: failed program was:" >&5 | |
1561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1562 | ||
1563 | ac_retval=1 | |
1564 | fi | |
1565 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1566 | as_fn_set_status $ac_retval | |
1567 | ||
1568 | } # ac_fn_c_try_compile | |
1569 | ||
1570 | # ac_fn_cxx_try_compile LINENO | |
1571 | # ---------------------------- | |
1572 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1573 | ac_fn_cxx_try_compile () | |
1574 | { | |
1575 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1576 | rm -f conftest.$ac_objext | |
1577 | if { { ac_try="$ac_compile" | |
1578 | case "(($ac_try" in | |
1579 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1580 | *) ac_try_echo=$ac_try;; | |
1581 | esac | |
1582 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1583 | $as_echo "$ac_try_echo"; } >&5 | |
1584 | (eval "$ac_compile") 2>conftest.err | |
1585 | ac_status=$? | |
1586 | if test -s conftest.err; then | |
1587 | grep -v '^ *+' conftest.err >conftest.er1 | |
1588 | cat conftest.er1 >&5 | |
1589 | mv -f conftest.er1 conftest.err | |
1590 | fi | |
1591 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1592 | test $ac_status = 0; } && { | |
1593 | test -z "$ac_cxx_werror_flag" || | |
1594 | test ! -s conftest.err | |
1595 | } && test -s conftest.$ac_objext; then : | |
1596 | ac_retval=0 | |
1597 | else | |
1598 | $as_echo "$as_me: failed program was:" >&5 | |
1599 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1600 | ||
1601 | ac_retval=1 | |
1602 | fi | |
1603 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1604 | as_fn_set_status $ac_retval | |
1605 | ||
1606 | } # ac_fn_cxx_try_compile | |
1607 | ||
1608 | # ac_fn_c_try_cpp LINENO | |
1609 | # ---------------------- | |
1610 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1611 | ac_fn_c_try_cpp () | |
1612 | { | |
1613 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1614 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1615 | case "(($ac_try" in | |
1616 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1617 | *) ac_try_echo=$ac_try;; | |
1618 | esac | |
1619 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1620 | $as_echo "$ac_try_echo"; } >&5 | |
1621 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1622 | ac_status=$? | |
1623 | if test -s conftest.err; then | |
1624 | grep -v '^ *+' conftest.err >conftest.er1 | |
1625 | cat conftest.er1 >&5 | |
1626 | mv -f conftest.er1 conftest.err | |
1627 | fi | |
1628 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1629 | test $ac_status = 0; } > conftest.i && { | |
1630 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1631 | test ! -s conftest.err | |
1632 | }; then : | |
1633 | ac_retval=0 | |
1634 | else | |
1635 | $as_echo "$as_me: failed program was:" >&5 | |
1636 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1637 | ||
1638 | ac_retval=1 | |
1639 | fi | |
1640 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1641 | as_fn_set_status $ac_retval | |
1642 | ||
1643 | } # ac_fn_c_try_cpp | |
1644 | ||
1645 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1646 | # ------------------------------------------------------- | |
1647 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1648 | # the include files in INCLUDES and setting the cache variable VAR | |
1649 | # accordingly. | |
1650 | ac_fn_c_check_header_mongrel () | |
1651 | { | |
1652 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1653 | if eval \${$3+:} false; then : | |
1654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1655 | $as_echo_n "checking for $2... " >&6; } | |
1656 | if eval \${$3+:} false; then : | |
1657 | $as_echo_n "(cached) " >&6 | |
1658 | fi | |
1659 | eval ac_res=\$$3 | |
1660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1661 | $as_echo "$ac_res" >&6; } | |
1662 | else | |
1663 | # Is the header compilable? | |
1664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1665 | $as_echo_n "checking $2 usability... " >&6; } | |
1666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1667 | /* end confdefs.h. */ | |
1668 | $4 | |
1669 | #include <$2> | |
1670 | _ACEOF | |
1671 | if ac_fn_c_try_compile "$LINENO"; then : | |
1672 | ac_header_compiler=yes | |
1673 | else | |
1674 | ac_header_compiler=no | |
1675 | fi | |
1676 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1678 | $as_echo "$ac_header_compiler" >&6; } | |
1679 | ||
1680 | # Is the header present? | |
1681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1682 | $as_echo_n "checking $2 presence... " >&6; } | |
1683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1684 | /* end confdefs.h. */ | |
1685 | #include <$2> | |
1686 | _ACEOF | |
1687 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1688 | ac_header_preproc=yes | |
1689 | else | |
1690 | ac_header_preproc=no | |
1691 | fi | |
1692 | rm -f conftest.err conftest.i conftest.$ac_ext | |
1693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1694 | $as_echo "$ac_header_preproc" >&6; } | |
1695 | ||
1696 | # So? What about this header? | |
1697 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1698 | yes:no: ) | |
1699 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1700 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1701 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1702 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1703 | ;; | |
1704 | no:yes:* ) | |
1705 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1706 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1707 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1708 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1709 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1710 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1711 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1712 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1713 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1714 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1715 | ;; | |
1716 | esac | |
1717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1718 | $as_echo_n "checking for $2... " >&6; } | |
1719 | if eval \${$3+:} false; then : | |
1720 | $as_echo_n "(cached) " >&6 | |
1721 | else | |
1722 | eval "$3=\$ac_header_compiler" | |
1723 | fi | |
1724 | eval ac_res=\$$3 | |
1725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1726 | $as_echo "$ac_res" >&6; } | |
1727 | fi | |
1728 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1729 | ||
1730 | } # ac_fn_c_check_header_mongrel | |
1731 | ||
1732 | # ac_fn_c_try_run LINENO | |
1733 | # ---------------------- | |
1734 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1735 | # that executables *can* be run. | |
1736 | ac_fn_c_try_run () | |
1737 | { | |
1738 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1739 | if { { ac_try="$ac_link" | |
1740 | case "(($ac_try" in | |
1741 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1742 | *) ac_try_echo=$ac_try;; | |
1743 | esac | |
1744 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1745 | $as_echo "$ac_try_echo"; } >&5 | |
1746 | (eval "$ac_link") 2>&5 | |
1747 | ac_status=$? | |
1748 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1749 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1750 | { { case "(($ac_try" in | |
1751 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1752 | *) ac_try_echo=$ac_try;; | |
1753 | esac | |
1754 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1755 | $as_echo "$ac_try_echo"; } >&5 | |
1756 | (eval "$ac_try") 2>&5 | |
1757 | ac_status=$? | |
1758 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1759 | test $ac_status = 0; }; }; then : | |
1760 | ac_retval=0 | |
1761 | else | |
1762 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1763 | $as_echo "$as_me: failed program was:" >&5 | |
1764 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1765 | ||
1766 | ac_retval=$ac_status | |
1767 | fi | |
1768 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1769 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1770 | as_fn_set_status $ac_retval | |
1771 | ||
1772 | } # ac_fn_c_try_run | |
1773 | ||
1774 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1775 | # ------------------------------------------------------- | |
1776 | # Tests whether HEADER exists and can be compiled using the include files in | |
1777 | # INCLUDES, setting the cache variable VAR accordingly. | |
1778 | ac_fn_c_check_header_compile () | |
1779 | { | |
1780 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1782 | $as_echo_n "checking for $2... " >&6; } | |
1783 | if eval \${$3+:} false; then : | |
1784 | $as_echo_n "(cached) " >&6 | |
1785 | else | |
1786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1787 | /* end confdefs.h. */ | |
1788 | $4 | |
1789 | #include <$2> | |
1790 | _ACEOF | |
1791 | if ac_fn_c_try_compile "$LINENO"; then : | |
1792 | eval "$3=yes" | |
1793 | else | |
1794 | eval "$3=no" | |
1795 | fi | |
1796 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1797 | fi | |
1798 | eval ac_res=\$$3 | |
1799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1800 | $as_echo "$ac_res" >&6; } | |
1801 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1802 | ||
1803 | } # ac_fn_c_check_header_compile | |
1804 | ||
1805 | # ac_fn_c_try_link LINENO | |
1806 | # ----------------------- | |
1807 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1808 | ac_fn_c_try_link () | |
1809 | { | |
1810 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1811 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1812 | if { { ac_try="$ac_link" | |
1813 | case "(($ac_try" in | |
1814 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1815 | *) ac_try_echo=$ac_try;; | |
1816 | esac | |
1817 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1818 | $as_echo "$ac_try_echo"; } >&5 | |
1819 | (eval "$ac_link") 2>conftest.err | |
1820 | ac_status=$? | |
1821 | if test -s conftest.err; then | |
1822 | grep -v '^ *+' conftest.err >conftest.er1 | |
1823 | cat conftest.er1 >&5 | |
1824 | mv -f conftest.er1 conftest.err | |
1825 | fi | |
1826 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1827 | test $ac_status = 0; } && { | |
1828 | test -z "$ac_c_werror_flag" || | |
1829 | test ! -s conftest.err | |
1830 | } && test -s conftest$ac_exeext && { | |
1831 | test "$cross_compiling" = yes || | |
1832 | test -x conftest$ac_exeext | |
1833 | }; then : | |
1834 | ac_retval=0 | |
1835 | else | |
1836 | $as_echo "$as_me: failed program was:" >&5 | |
1837 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1838 | ||
1839 | ac_retval=1 | |
1840 | fi | |
1841 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1842 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1843 | # interfere with the next link command; also delete a directory that is | |
1844 | # left behind by Apple's compiler. We do this before executing the actions. | |
1845 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1846 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1847 | as_fn_set_status $ac_retval | |
1848 | ||
1849 | } # ac_fn_c_try_link | |
1850 | ||
1851 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
1852 | # ------------------------------------------- | |
1853 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1854 | # variable VAR accordingly. | |
1855 | ac_fn_c_check_type () | |
1856 | { | |
1857 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1859 | $as_echo_n "checking for $2... " >&6; } | |
1860 | if eval \${$3+:} false; then : | |
1861 | $as_echo_n "(cached) " >&6 | |
1862 | else | |
1863 | eval "$3=no" | |
1864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1865 | /* end confdefs.h. */ | |
1866 | $4 | |
1867 | int | |
1868 | main () | |
1869 | { | |
1870 | if (sizeof ($2)) | |
1871 | return 0; | |
1872 | ; | |
1873 | return 0; | |
1874 | } | |
1875 | _ACEOF | |
1876 | if ac_fn_c_try_compile "$LINENO"; then : | |
1877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1878 | /* end confdefs.h. */ | |
1879 | $4 | |
1880 | int | |
1881 | main () | |
1882 | { | |
1883 | if (sizeof (($2))) | |
1884 | return 0; | |
1885 | ; | |
1886 | return 0; | |
1887 | } | |
1888 | _ACEOF | |
1889 | if ac_fn_c_try_compile "$LINENO"; then : | |
1890 | ||
1891 | else | |
1892 | eval "$3=yes" | |
1893 | fi | |
1894 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1895 | fi | |
1896 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1897 | fi | |
1898 | eval ac_res=\$$3 | |
1899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1900 | $as_echo "$ac_res" >&6; } | |
1901 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1902 | ||
1903 | } # ac_fn_c_check_type | |
1904 | ||
1905 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES | |
1906 | # -------------------------------------------- | |
1907 | # Tries to find the compile-time value of EXPR in a program that includes | |
1908 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1909 | # computed | |
1910 | ac_fn_c_compute_int () | |
1911 | { | |
1912 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1913 | if test "$cross_compiling" = yes; then | |
1914 | # Depending upon the size, compute the lo and hi bounds. | |
1915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1916 | /* end confdefs.h. */ | |
1917 | $4 | |
1918 | int | |
1919 | main () | |
1920 | { | |
1921 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1922 | test_array [0] = 0; | |
1923 | return test_array [0]; | |
1924 | ||
1925 | ; | |
1926 | return 0; | |
1927 | } | |
1928 | _ACEOF | |
1929 | if ac_fn_c_try_compile "$LINENO"; then : | |
1930 | ac_lo=0 ac_mid=0 | |
1931 | while :; do | |
1932 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1933 | /* end confdefs.h. */ | |
1934 | $4 | |
1935 | int | |
1936 | main () | |
1937 | { | |
1938 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1939 | test_array [0] = 0; | |
1940 | return test_array [0]; | |
1941 | ||
1942 | ; | |
1943 | return 0; | |
1944 | } | |
1945 | _ACEOF | |
1946 | if ac_fn_c_try_compile "$LINENO"; then : | |
1947 | ac_hi=$ac_mid; break | |
1948 | else | |
1949 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1950 | if test $ac_lo -le $ac_mid; then | |
1951 | ac_lo= ac_hi= | |
1952 | break | |
1953 | fi | |
1954 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
1955 | fi | |
1956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1957 | done | |
1958 | else | |
1959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1960 | /* end confdefs.h. */ | |
1961 | $4 | |
1962 | int | |
1963 | main () | |
1964 | { | |
1965 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1966 | test_array [0] = 0; | |
1967 | return test_array [0]; | |
1968 | ||
1969 | ; | |
1970 | return 0; | |
1971 | } | |
1972 | _ACEOF | |
1973 | if ac_fn_c_try_compile "$LINENO"; then : | |
1974 | ac_hi=-1 ac_mid=-1 | |
1975 | while :; do | |
1976 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1977 | /* end confdefs.h. */ | |
1978 | $4 | |
1979 | int | |
1980 | main () | |
1981 | { | |
1982 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1983 | test_array [0] = 0; | |
1984 | return test_array [0]; | |
1985 | ||
1986 | ; | |
1987 | return 0; | |
1988 | } | |
1989 | _ACEOF | |
1990 | if ac_fn_c_try_compile "$LINENO"; then : | |
1991 | ac_lo=$ac_mid; break | |
1992 | else | |
1993 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1994 | if test $ac_mid -le $ac_hi; then | |
1995 | ac_lo= ac_hi= | |
1996 | break | |
1997 | fi | |
1998 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1999 | fi | |
2000 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2001 | done | |
2002 | else | |
2003 | ac_lo= ac_hi= | |
2004 | fi | |
2005 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2006 | fi | |
2007 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2008 | # Binary search between lo and hi bounds. | |
2009 | while test "x$ac_lo" != "x$ac_hi"; do | |
2010 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2012 | /* end confdefs.h. */ | |
2013 | $4 | |
2014 | int | |
2015 | main () | |
2016 | { | |
2017 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2018 | test_array [0] = 0; | |
2019 | return test_array [0]; | |
2020 | ||
2021 | ; | |
2022 | return 0; | |
2023 | } | |
2024 | _ACEOF | |
2025 | if ac_fn_c_try_compile "$LINENO"; then : | |
2026 | ac_hi=$ac_mid | |
2027 | else | |
2028 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2029 | fi | |
2030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2031 | done | |
2032 | case $ac_lo in #(( | |
2033 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2034 | '') ac_retval=1 ;; | |
2035 | esac | |
2036 | else | |
2037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2038 | /* end confdefs.h. */ | |
2039 | $4 | |
2040 | static long int longval () { return $2; } | |
2041 | static unsigned long int ulongval () { return $2; } | |
2042 | #include <stdio.h> | |
2043 | #include <stdlib.h> | |
2044 | int | |
2045 | main () | |
2046 | { | |
2047 | ||
2048 | FILE *f = fopen ("conftest.val", "w"); | |
2049 | if (! f) | |
2050 | return 1; | |
2051 | if (($2) < 0) | |
2052 | { | |
2053 | long int i = longval (); | |
2054 | if (i != ($2)) | |
2055 | return 1; | |
2056 | fprintf (f, "%ld", i); | |
2057 | } | |
2058 | else | |
2059 | { | |
2060 | unsigned long int i = ulongval (); | |
2061 | if (i != ($2)) | |
2062 | return 1; | |
2063 | fprintf (f, "%lu", i); | |
2064 | } | |
2065 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2066 | on some platforms. */ | |
2067 | return ferror (f) || fclose (f) != 0; | |
2068 | ||
2069 | ; | |
2070 | return 0; | |
2071 | } | |
2072 | _ACEOF | |
2073 | if ac_fn_c_try_run "$LINENO"; then : | |
2074 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2075 | else | |
2076 | ac_retval=1 | |
2077 | fi | |
2078 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2079 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2080 | rm -f conftest.val | |
2081 | ||
2082 | fi | |
2083 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2084 | as_fn_set_status $ac_retval | |
2085 | ||
2086 | } # ac_fn_c_compute_int | |
2087 | ||
2088 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES | |
2089 | # --------------------------------------------- | |
2090 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2091 | # accordingly. | |
2092 | ac_fn_c_check_decl () | |
2093 | { | |
2094 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2095 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2096 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2098 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2099 | if eval \${$3+:} false; then : | |
2100 | $as_echo_n "(cached) " >&6 | |
2101 | else | |
2102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2103 | /* end confdefs.h. */ | |
2104 | $4 | |
2105 | int | |
2106 | main () | |
2107 | { | |
2108 | #ifndef $as_decl_name | |
2109 | #ifdef __cplusplus | |
2110 | (void) $as_decl_use; | |
2111 | #else | |
2112 | (void) $as_decl_name; | |
2113 | #endif | |
2114 | #endif | |
2115 | ||
2116 | ; | |
2117 | return 0; | |
2118 | } | |
2119 | _ACEOF | |
2120 | if ac_fn_c_try_compile "$LINENO"; then : | |
2121 | eval "$3=yes" | |
2122 | else | |
2123 | eval "$3=no" | |
2124 | fi | |
2125 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2126 | fi | |
2127 | eval ac_res=\$$3 | |
2128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2129 | $as_echo "$ac_res" >&6; } | |
2130 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2131 | ||
2132 | } # ac_fn_c_check_decl | |
2133 | ||
2134 | # ac_fn_c_check_func LINENO FUNC VAR | |
2135 | # ---------------------------------- | |
2136 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2137 | ac_fn_c_check_func () | |
2138 | { | |
2139 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2141 | $as_echo_n "checking for $2... " >&6; } | |
2142 | if eval \${$3+:} false; then : | |
2143 | $as_echo_n "(cached) " >&6 | |
2144 | else | |
2145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2146 | /* end confdefs.h. */ | |
2147 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2148 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2149 | #define $2 innocuous_$2 | |
2150 | ||
2151 | /* System header to define __stub macros and hopefully few prototypes, | |
2152 | which can conflict with char $2 (); below. | |
2153 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2154 | <limits.h> exists even on freestanding compilers. */ | |
2155 | ||
2156 | #ifdef __STDC__ | |
2157 | # include <limits.h> | |
2158 | #else | |
2159 | # include <assert.h> | |
2160 | #endif | |
2161 | ||
2162 | #undef $2 | |
2163 | ||
2164 | /* Override any GCC internal prototype to avoid an error. | |
2165 | Use char because int might match the return type of a GCC | |
2166 | builtin and then its argument prototype would still apply. */ | |
2167 | #ifdef __cplusplus | |
2168 | extern "C" | |
2169 | #endif | |
2170 | char $2 (); | |
2171 | /* The GNU C library defines this for functions which it implements | |
2172 | to always fail with ENOSYS. Some functions are actually named | |
2173 | something starting with __ and the normal name is an alias. */ | |
2174 | #if defined __stub_$2 || defined __stub___$2 | |
2175 | choke me | |
2176 | #endif | |
2177 | ||
2178 | int | |
2179 | main () | |
2180 | { | |
2181 | return $2 (); | |
2182 | ; | |
2183 | return 0; | |
2184 | } | |
2185 | _ACEOF | |
2186 | if ac_fn_c_try_link "$LINENO"; then : | |
2187 | eval "$3=yes" | |
2188 | else | |
2189 | eval "$3=no" | |
2190 | fi | |
2191 | rm -f core conftest.err conftest.$ac_objext \ | |
2192 | conftest$ac_exeext conftest.$ac_ext | |
2193 | fi | |
2194 | eval ac_res=\$$3 | |
2195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2196 | $as_echo "$ac_res" >&6; } | |
2197 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2198 | ||
2199 | } # ac_fn_c_check_func | |
2200 | ||
05ea2a05 TT |
2201 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2202 | # ---------------------------------------------------- | |
2203 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2204 | # INCLUDES, setting cache variable VAR accordingly. | |
2205 | ac_fn_c_check_member () | |
2206 | { | |
2207 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2209 | $as_echo_n "checking for $2.$3... " >&6; } | |
2210 | if eval \${$4+:} false; then : | |
2211 | $as_echo_n "(cached) " >&6 | |
2212 | else | |
2213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2214 | /* end confdefs.h. */ | |
2215 | $5 | |
2216 | int | |
2217 | main () | |
2218 | { | |
2219 | static $2 ac_aggr; | |
2220 | if (ac_aggr.$3) | |
2221 | return 0; | |
2222 | ; | |
2223 | return 0; | |
2224 | } | |
2225 | _ACEOF | |
2226 | if ac_fn_c_try_compile "$LINENO"; then : | |
2227 | eval "$4=yes" | |
2228 | else | |
2229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2230 | /* end confdefs.h. */ | |
2231 | $5 | |
2232 | int | |
2233 | main () | |
2234 | { | |
2235 | static $2 ac_aggr; | |
2236 | if (sizeof ac_aggr.$3) | |
2237 | return 0; | |
2238 | ; | |
2239 | return 0; | |
2240 | } | |
2241 | _ACEOF | |
2242 | if ac_fn_c_try_compile "$LINENO"; then : | |
2243 | eval "$4=yes" | |
2244 | else | |
2245 | eval "$4=no" | |
2246 | fi | |
2247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2248 | fi | |
2249 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2250 | fi | |
2251 | eval ac_res=\$$4 | |
2252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2253 | $as_echo "$ac_res" >&6; } | |
2254 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2255 | ||
2256 | } # ac_fn_c_check_member | |
2257 | ||
01027315 TT |
2258 | # ac_fn_cxx_try_link LINENO |
2259 | # ------------------------- | |
2260 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2261 | ac_fn_cxx_try_link () | |
2262 | { | |
2263 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2264 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2265 | if { { ac_try="$ac_link" | |
2266 | case "(($ac_try" in | |
2267 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2268 | *) ac_try_echo=$ac_try;; | |
2269 | esac | |
2270 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2271 | $as_echo "$ac_try_echo"; } >&5 | |
2272 | (eval "$ac_link") 2>conftest.err | |
2273 | ac_status=$? | |
2274 | if test -s conftest.err; then | |
2275 | grep -v '^ *+' conftest.err >conftest.er1 | |
2276 | cat conftest.er1 >&5 | |
2277 | mv -f conftest.er1 conftest.err | |
2278 | fi | |
2279 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2280 | test $ac_status = 0; } && { | |
2281 | test -z "$ac_cxx_werror_flag" || | |
2282 | test ! -s conftest.err | |
2283 | } && test -s conftest$ac_exeext && { | |
2284 | test "$cross_compiling" = yes || | |
2285 | test -x conftest$ac_exeext | |
2286 | }; then : | |
2287 | ac_retval=0 | |
2288 | else | |
2289 | $as_echo "$as_me: failed program was:" >&5 | |
2290 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2291 | ||
2292 | ac_retval=1 | |
2293 | fi | |
2294 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2295 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2296 | # interfere with the next link command; also delete a directory that is | |
2297 | # left behind by Apple's compiler. We do this before executing the actions. | |
2298 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2299 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2300 | as_fn_set_status $ac_retval | |
2301 | ||
2302 | } # ac_fn_cxx_try_link | |
2303 | ||
2304 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2305 | # ------------------------------------ | |
2306 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2307 | ac_fn_cxx_check_func () | |
2308 | { | |
2309 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2311 | $as_echo_n "checking for $2... " >&6; } | |
2312 | if eval \${$3+:} false; then : | |
2313 | $as_echo_n "(cached) " >&6 | |
2314 | else | |
2315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2316 | /* end confdefs.h. */ | |
2317 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2318 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2319 | #define $2 innocuous_$2 | |
2320 | ||
2321 | /* System header to define __stub macros and hopefully few prototypes, | |
2322 | which can conflict with char $2 (); below. | |
2323 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2324 | <limits.h> exists even on freestanding compilers. */ | |
2325 | ||
2326 | #ifdef __STDC__ | |
2327 | # include <limits.h> | |
2328 | #else | |
2329 | # include <assert.h> | |
2330 | #endif | |
2331 | ||
2332 | #undef $2 | |
2333 | ||
2334 | /* Override any GCC internal prototype to avoid an error. | |
2335 | Use char because int might match the return type of a GCC | |
2336 | builtin and then its argument prototype would still apply. */ | |
2337 | #ifdef __cplusplus | |
2338 | extern "C" | |
2339 | #endif | |
2340 | char $2 (); | |
2341 | /* The GNU C library defines this for functions which it implements | |
2342 | to always fail with ENOSYS. Some functions are actually named | |
2343 | something starting with __ and the normal name is an alias. */ | |
2344 | #if defined __stub_$2 || defined __stub___$2 | |
2345 | choke me | |
2346 | #endif | |
2347 | ||
2348 | int | |
2349 | main () | |
2350 | { | |
2351 | return $2 (); | |
2352 | ; | |
2353 | return 0; | |
2354 | } | |
2355 | _ACEOF | |
2356 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2357 | eval "$3=yes" | |
2358 | else | |
2359 | eval "$3=no" | |
2360 | fi | |
2361 | rm -f core conftest.err conftest.$ac_objext \ | |
2362 | conftest$ac_exeext conftest.$ac_ext | |
2363 | fi | |
2364 | eval ac_res=\$$3 | |
2365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2366 | $as_echo "$ac_res" >&6; } | |
2367 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2368 | ||
2369 | } # ac_fn_cxx_check_func | |
2370 | cat >config.log <<_ACEOF | |
2371 | This file contains any messages produced by compilers while | |
2372 | running configure, to aid debugging if configure makes a mistake. | |
2373 | ||
2374 | It was created by gdbsupport $as_me 1.0, which was | |
2375 | generated by GNU Autoconf 2.69. Invocation command line was | |
2376 | ||
2377 | $ $0 $@ | |
2378 | ||
2379 | _ACEOF | |
2380 | exec 5>>config.log | |
2381 | { | |
2382 | cat <<_ASUNAME | |
2383 | ## --------- ## | |
2384 | ## Platform. ## | |
2385 | ## --------- ## | |
2386 | ||
2387 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2388 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2389 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2390 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2391 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2392 | ||
2393 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2394 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2395 | ||
2396 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2397 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2398 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2399 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2400 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2401 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2402 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2403 | ||
2404 | _ASUNAME | |
2405 | ||
2406 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2407 | for as_dir in $PATH | |
2408 | do | |
2409 | IFS=$as_save_IFS | |
2410 | test -z "$as_dir" && as_dir=. | |
2411 | $as_echo "PATH: $as_dir" | |
2412 | done | |
2413 | IFS=$as_save_IFS | |
2414 | ||
2415 | } >&5 | |
2416 | ||
2417 | cat >&5 <<_ACEOF | |
2418 | ||
2419 | ||
2420 | ## ----------- ## | |
2421 | ## Core tests. ## | |
2422 | ## ----------- ## | |
2423 | ||
2424 | _ACEOF | |
2425 | ||
2426 | ||
2427 | # Keep a trace of the command line. | |
2428 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2429 | # Strip out --silent because we don't want to record it for future runs. | |
2430 | # Also quote any args containing shell meta-characters. | |
2431 | # Make two passes to allow for proper duplicate-argument suppression. | |
2432 | ac_configure_args= | |
2433 | ac_configure_args0= | |
2434 | ac_configure_args1= | |
2435 | ac_must_keep_next=false | |
2436 | for ac_pass in 1 2 | |
2437 | do | |
2438 | for ac_arg | |
2439 | do | |
2440 | case $ac_arg in | |
2441 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2442 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2443 | | -silent | --silent | --silen | --sile | --sil) | |
2444 | continue ;; | |
2445 | *\'*) | |
2446 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2447 | esac | |
2448 | case $ac_pass in | |
2449 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2450 | 2) | |
2451 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2452 | if test $ac_must_keep_next = true; then | |
2453 | ac_must_keep_next=false # Got value, back to normal. | |
2454 | else | |
2455 | case $ac_arg in | |
2456 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2457 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2458 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2459 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2460 | case "$ac_configure_args0 " in | |
2461 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2462 | esac | |
2463 | ;; | |
2464 | -* ) ac_must_keep_next=true ;; | |
2465 | esac | |
2466 | fi | |
2467 | as_fn_append ac_configure_args " '$ac_arg'" | |
2468 | ;; | |
2469 | esac | |
2470 | done | |
2471 | done | |
2472 | { ac_configure_args0=; unset ac_configure_args0;} | |
2473 | { ac_configure_args1=; unset ac_configure_args1;} | |
2474 | ||
2475 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2476 | # config.log. We remove comments because anyway the quotes in there | |
2477 | # would cause problems or look ugly. | |
2478 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2479 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2480 | trap 'exit_status=$? | |
2481 | # Save into config.log some information that might help in debugging. | |
2482 | { | |
2483 | echo | |
2484 | ||
2485 | $as_echo "## ---------------- ## | |
2486 | ## Cache variables. ## | |
2487 | ## ---------------- ##" | |
2488 | echo | |
2489 | # The following way of writing the cache mishandles newlines in values, | |
2490 | ( | |
2491 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2492 | eval ac_val=\$$ac_var | |
2493 | case $ac_val in #( | |
2494 | *${as_nl}*) | |
2495 | case $ac_var in #( | |
2496 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2497 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2498 | esac | |
2499 | case $ac_var in #( | |
2500 | _ | IFS | as_nl) ;; #( | |
2501 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2502 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2503 | esac ;; | |
2504 | esac | |
2505 | done | |
2506 | (set) 2>&1 | | |
2507 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2508 | *${as_nl}ac_space=\ *) | |
2509 | sed -n \ | |
2510 | "s/'\''/'\''\\\\'\'''\''/g; | |
2511 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2512 | ;; #( | |
2513 | *) | |
2514 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2515 | ;; | |
2516 | esac | | |
2517 | sort | |
2518 | ) | |
2519 | echo | |
2520 | ||
2521 | $as_echo "## ----------------- ## | |
2522 | ## Output variables. ## | |
2523 | ## ----------------- ##" | |
2524 | echo | |
2525 | for ac_var in $ac_subst_vars | |
2526 | do | |
2527 | eval ac_val=\$$ac_var | |
2528 | case $ac_val in | |
2529 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2530 | esac | |
2531 | $as_echo "$ac_var='\''$ac_val'\''" | |
2532 | done | sort | |
2533 | echo | |
2534 | ||
2535 | if test -n "$ac_subst_files"; then | |
2536 | $as_echo "## ------------------- ## | |
2537 | ## File substitutions. ## | |
2538 | ## ------------------- ##" | |
2539 | echo | |
2540 | for ac_var in $ac_subst_files | |
2541 | do | |
2542 | eval ac_val=\$$ac_var | |
2543 | case $ac_val in | |
2544 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2545 | esac | |
2546 | $as_echo "$ac_var='\''$ac_val'\''" | |
2547 | done | sort | |
2548 | echo | |
2549 | fi | |
2550 | ||
2551 | if test -s confdefs.h; then | |
2552 | $as_echo "## ----------- ## | |
2553 | ## confdefs.h. ## | |
2554 | ## ----------- ##" | |
2555 | echo | |
2556 | cat confdefs.h | |
2557 | echo | |
2558 | fi | |
2559 | test "$ac_signal" != 0 && | |
2560 | $as_echo "$as_me: caught signal $ac_signal" | |
2561 | $as_echo "$as_me: exit $exit_status" | |
2562 | } >&5 | |
2563 | rm -f core *.core core.conftest.* && | |
2564 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2565 | exit $exit_status | |
2566 | ' 0 | |
2567 | for ac_signal in 1 2 13 15; do | |
2568 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2569 | done | |
2570 | ac_signal=0 | |
2571 | ||
2572 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2573 | rm -f -r conftest* confdefs.h | |
2574 | ||
2575 | $as_echo "/* confdefs.h */" > confdefs.h | |
2576 | ||
2577 | # Predefined preprocessor variables. | |
2578 | ||
2579 | cat >>confdefs.h <<_ACEOF | |
2580 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2581 | _ACEOF | |
2582 | ||
2583 | cat >>confdefs.h <<_ACEOF | |
2584 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2585 | _ACEOF | |
2586 | ||
2587 | cat >>confdefs.h <<_ACEOF | |
2588 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2589 | _ACEOF | |
2590 | ||
2591 | cat >>confdefs.h <<_ACEOF | |
2592 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2593 | _ACEOF | |
2594 | ||
2595 | cat >>confdefs.h <<_ACEOF | |
2596 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2597 | _ACEOF | |
2598 | ||
2599 | cat >>confdefs.h <<_ACEOF | |
2600 | #define PACKAGE_URL "$PACKAGE_URL" | |
2601 | _ACEOF | |
2602 | ||
2603 | ||
2604 | # Let the site file select an alternate cache file if it wants to. | |
2605 | # Prefer an explicitly selected file to automatically selected ones. | |
2606 | ac_site_file1=NONE | |
2607 | ac_site_file2=NONE | |
2608 | if test -n "$CONFIG_SITE"; then | |
2609 | # We do not want a PATH search for config.site. | |
2610 | case $CONFIG_SITE in #(( | |
2611 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2612 | */*) ac_site_file1=$CONFIG_SITE;; | |
2613 | *) ac_site_file1=./$CONFIG_SITE;; | |
2614 | esac | |
2615 | elif test "x$prefix" != xNONE; then | |
2616 | ac_site_file1=$prefix/share/config.site | |
2617 | ac_site_file2=$prefix/etc/config.site | |
2618 | else | |
2619 | ac_site_file1=$ac_default_prefix/share/config.site | |
2620 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2621 | fi | |
2622 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2623 | do | |
2624 | test "x$ac_site_file" = xNONE && continue | |
2625 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2626 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2627 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2628 | sed 's/^/| /' "$ac_site_file" >&5 | |
2629 | . "$ac_site_file" \ | |
2630 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2631 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2632 | as_fn_error $? "failed to load site script $ac_site_file | |
2633 | See \`config.log' for more details" "$LINENO" 5; } | |
2634 | fi | |
2635 | done | |
2636 | ||
2637 | if test -r "$cache_file"; then | |
2638 | # Some versions of bash will fail to source /dev/null (special files | |
2639 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2640 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2641 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2642 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2643 | case $cache_file in | |
2644 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2645 | *) . "./$cache_file";; | |
2646 | esac | |
2647 | fi | |
2648 | else | |
2649 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2650 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2651 | >$cache_file | |
2652 | fi | |
2653 | ||
05ea2a05 TT |
2654 | as_fn_append ac_header_list " stdlib.h" |
2655 | as_fn_append ac_header_list " unistd.h" | |
2656 | as_fn_append ac_header_list " sys/param.h" | |
01027315 TT |
2657 | # Check that the precious variables saved in the cache have kept the same |
2658 | # value. | |
2659 | ac_cache_corrupted=false | |
2660 | for ac_var in $ac_precious_vars; do | |
2661 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2662 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2663 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2664 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2665 | case $ac_old_set,$ac_new_set in | |
2666 | set,) | |
2667 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2668 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2669 | ac_cache_corrupted=: ;; | |
2670 | ,set) | |
2671 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2672 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2673 | ac_cache_corrupted=: ;; | |
2674 | ,);; | |
2675 | *) | |
2676 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2677 | # differences in whitespace do not lead to failure. | |
2678 | ac_old_val_w=`echo x $ac_old_val` | |
2679 | ac_new_val_w=`echo x $ac_new_val` | |
2680 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2681 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2682 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2683 | ac_cache_corrupted=: | |
2684 | else | |
2685 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2686 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2687 | eval $ac_var=\$ac_old_val | |
2688 | fi | |
2689 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2690 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2691 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2692 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2693 | fi;; | |
2694 | esac | |
2695 | # Pass precious variables to config.status. | |
2696 | if test "$ac_new_set" = set; then | |
2697 | case $ac_new_val in | |
2698 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2699 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2700 | esac | |
2701 | case " $ac_configure_args " in | |
2702 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2703 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2704 | esac | |
2705 | fi | |
2706 | done | |
2707 | if $ac_cache_corrupted; then | |
2708 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2709 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2710 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2711 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2712 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2713 | fi | |
2714 | ## -------------------- ## | |
2715 | ## Main body of script. ## | |
2716 | ## -------------------- ## | |
2717 | ||
2718 | ac_ext=c | |
2719 | ac_cpp='$CPP $CPPFLAGS' | |
2720 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2721 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2722 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2723 | ||
2724 | ||
2725 | ||
2726 | ||
2727 | ||
2728 | ||
3684d331 | 2729 | ac_config_headers="$ac_config_headers config.h:config.in" |
01027315 | 2730 | |
91e1a0ed SM |
2731 | |
2732 | # Set build, build_cpu, build_vendor and build_os. | |
01027315 TT |
2733 | ac_aux_dir= |
2734 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2735 | if test -f "$ac_dir/install-sh"; then | |
2736 | ac_aux_dir=$ac_dir | |
2737 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2738 | break | |
2739 | elif test -f "$ac_dir/install.sh"; then | |
2740 | ac_aux_dir=$ac_dir | |
2741 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2742 | break | |
2743 | elif test -f "$ac_dir/shtool"; then | |
2744 | ac_aux_dir=$ac_dir | |
2745 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2746 | break | |
2747 | fi | |
2748 | done | |
2749 | if test -z "$ac_aux_dir"; then | |
2750 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
2751 | fi | |
2752 | ||
2753 | # These three variables are undocumented and unsupported, | |
2754 | # and are intended to be withdrawn in a future Autoconf release. | |
2755 | # They can cause serious problems if a builder's source tree is in a directory | |
2756 | # whose full name contains unusual characters. | |
2757 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2758 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2759 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2760 | ||
2761 | ||
2762 | # Make sure we can run config.sub. | |
2763 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2764 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
2765 | ||
2766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
2767 | $as_echo_n "checking build system type... " >&6; } | |
2768 | if ${ac_cv_build+:} false; then : | |
2769 | $as_echo_n "(cached) " >&6 | |
2770 | else | |
2771 | ac_build_alias=$build_alias | |
2772 | test "x$ac_build_alias" = x && | |
2773 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
2774 | test "x$ac_build_alias" = x && | |
2775 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
2776 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
2777 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
2778 | ||
2779 | fi | |
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
2781 | $as_echo "$ac_cv_build" >&6; } | |
2782 | case $ac_cv_build in | |
2783 | *-*-*) ;; | |
2784 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
2785 | esac | |
2786 | build=$ac_cv_build | |
2787 | ac_save_IFS=$IFS; IFS='-' | |
2788 | set x $ac_cv_build | |
2789 | shift | |
2790 | build_cpu=$1 | |
2791 | build_vendor=$2 | |
2792 | shift; shift | |
2793 | # Remember, the first character of IFS is used to create $*, | |
2794 | # except with old shells: | |
2795 | build_os=$* | |
2796 | IFS=$ac_save_IFS | |
2797 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2798 | ||
2799 | ||
91e1a0ed SM |
2800 | |
2801 | # Set host, host_cpu, host_vendor, and host_os. | |
01027315 TT |
2802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
2803 | $as_echo_n "checking host system type... " >&6; } | |
2804 | if ${ac_cv_host+:} false; then : | |
2805 | $as_echo_n "(cached) " >&6 | |
2806 | else | |
2807 | if test "x$host_alias" = x; then | |
2808 | ac_cv_host=$ac_cv_build | |
2809 | else | |
2810 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2811 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
2812 | fi | |
2813 | ||
2814 | fi | |
2815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
2816 | $as_echo "$ac_cv_host" >&6; } | |
2817 | case $ac_cv_host in | |
2818 | *-*-*) ;; | |
2819 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
2820 | esac | |
2821 | host=$ac_cv_host | |
2822 | ac_save_IFS=$IFS; IFS='-' | |
2823 | set x $ac_cv_host | |
2824 | shift | |
2825 | host_cpu=$1 | |
2826 | host_vendor=$2 | |
2827 | shift; shift | |
2828 | # Remember, the first character of IFS is used to create $*, | |
2829 | # except with old shells: | |
2830 | host_os=$* | |
2831 | IFS=$ac_save_IFS | |
2832 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2833 | ||
2834 | ||
91e1a0ed SM |
2835 | |
2836 | # Set target, target_cpu, target_vendor, and target_os. | |
01027315 TT |
2837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
2838 | $as_echo_n "checking target system type... " >&6; } | |
2839 | if ${ac_cv_target+:} false; then : | |
2840 | $as_echo_n "(cached) " >&6 | |
2841 | else | |
2842 | if test "x$target_alias" = x; then | |
2843 | ac_cv_target=$ac_cv_host | |
2844 | else | |
2845 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
2846 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
2847 | fi | |
2848 | ||
2849 | fi | |
2850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
2851 | $as_echo "$ac_cv_target" >&6; } | |
2852 | case $ac_cv_target in | |
2853 | *-*-*) ;; | |
2854 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; | |
2855 | esac | |
2856 | target=$ac_cv_target | |
2857 | ac_save_IFS=$IFS; IFS='-' | |
2858 | set x $ac_cv_target | |
2859 | shift | |
2860 | target_cpu=$1 | |
2861 | target_vendor=$2 | |
2862 | shift; shift | |
2863 | # Remember, the first character of IFS is used to create $*, | |
2864 | # except with old shells: | |
2865 | target_os=$* | |
2866 | IFS=$ac_save_IFS | |
2867 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
2868 | ||
2869 | ||
2870 | # The aliases save the names the user supplied, while $host etc. | |
2871 | # will get canonicalized. | |
2872 | test -n "$target_alias" && | |
2873 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
2874 | NONENONEs,x,x, && | |
2875 | program_prefix=${target_alias}- | |
2876 | ||
2877 | ||
2878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2879 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2880 | # Check whether --enable-maintainer-mode was given. | |
2881 | if test "${enable_maintainer_mode+set}" = set; then : | |
2882 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2883 | else | |
2884 | USE_MAINTAINER_MODE=no | |
2885 | fi | |
2886 | ||
2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2888 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2889 | if test $USE_MAINTAINER_MODE = yes; then | |
2890 | MAINTAINER_MODE_TRUE= | |
2891 | MAINTAINER_MODE_FALSE='#' | |
2892 | else | |
2893 | MAINTAINER_MODE_TRUE='#' | |
2894 | MAINTAINER_MODE_FALSE= | |
2895 | fi | |
2896 | ||
2897 | MAINT=$MAINTAINER_MODE_TRUE | |
2898 | ||
2899 | ||
2900 | ac_aux_dir= | |
2901 | for ac_dir in .. "$srcdir"/..; do | |
2902 | if test -f "$ac_dir/install-sh"; then | |
2903 | ac_aux_dir=$ac_dir | |
2904 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2905 | break | |
2906 | elif test -f "$ac_dir/install.sh"; then | |
2907 | ac_aux_dir=$ac_dir | |
2908 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2909 | break | |
2910 | elif test -f "$ac_dir/shtool"; then | |
2911 | ac_aux_dir=$ac_dir | |
2912 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2913 | break | |
2914 | fi | |
2915 | done | |
2916 | if test -z "$ac_aux_dir"; then | |
2917 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 | |
2918 | fi | |
2919 | ||
2920 | # These three variables are undocumented and unsupported, | |
2921 | # and are intended to be withdrawn in a future Autoconf release. | |
2922 | # They can cause serious problems if a builder's source tree is in a directory | |
2923 | # whose full name contains unusual characters. | |
2924 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2925 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2926 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2927 | ||
2928 | ||
2929 | am__api_version='1.15' | |
2930 | ||
2931 | # Find a good install program. We prefer a C program (faster), | |
2932 | # so one script is as good as another. But avoid the broken or | |
2933 | # incompatible versions: | |
2934 | # SysV /etc/install, /usr/sbin/install | |
2935 | # SunOS /usr/etc/install | |
2936 | # IRIX /sbin/install | |
2937 | # AIX /bin/install | |
2938 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
2939 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2940 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2941 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2942 | # OS/2's system install, which has a completely different semantic | |
2943 | # ./install, which can be erroneously created by make from ./install.sh. | |
2944 | # Reject install programs that cannot install multiple files. | |
2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
2946 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
2947 | if test -z "$INSTALL"; then | |
2948 | if ${ac_cv_path_install+:} false; then : | |
2949 | $as_echo_n "(cached) " >&6 | |
2950 | else | |
2951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2952 | for as_dir in $PATH | |
2953 | do | |
2954 | IFS=$as_save_IFS | |
2955 | test -z "$as_dir" && as_dir=. | |
2956 | # Account for people who put trailing slashes in PATH elements. | |
2957 | case $as_dir/ in #(( | |
2958 | ./ | .// | /[cC]/* | \ | |
2959 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
2960 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
2961 | /usr/ucb/* ) ;; | |
2962 | *) | |
2963 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2964 | # Don't use installbsd from OSF since it installs stuff as root | |
2965 | # by default. | |
2966 | for ac_prog in ginstall scoinst install; do | |
2967 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2968 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
2969 | if test $ac_prog = install && | |
2970 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2971 | # AIX install. It has an incompatible calling convention. | |
2972 | : | |
2973 | elif test $ac_prog = install && | |
2974 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2975 | # program-specific install script used by HP pwplus--don't use. | |
2976 | : | |
2977 | else | |
2978 | rm -rf conftest.one conftest.two conftest.dir | |
2979 | echo one > conftest.one | |
2980 | echo two > conftest.two | |
2981 | mkdir conftest.dir | |
2982 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
2983 | test -s conftest.one && test -s conftest.two && | |
2984 | test -s conftest.dir/conftest.one && | |
2985 | test -s conftest.dir/conftest.two | |
2986 | then | |
2987 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
2988 | break 3 | |
2989 | fi | |
2990 | fi | |
2991 | fi | |
2992 | done | |
2993 | done | |
2994 | ;; | |
2995 | esac | |
2996 | ||
2997 | done | |
2998 | IFS=$as_save_IFS | |
2999 | ||
3000 | rm -rf conftest.one conftest.two conftest.dir | |
3001 | ||
3002 | fi | |
3003 | if test "${ac_cv_path_install+set}" = set; then | |
3004 | INSTALL=$ac_cv_path_install | |
3005 | else | |
3006 | # As a last resort, use the slow shell script. Don't cache a | |
3007 | # value for INSTALL within a source directory, because that will | |
3008 | # break other packages using the cache if that directory is | |
3009 | # removed, or if the value is a relative name. | |
3010 | INSTALL=$ac_install_sh | |
3011 | fi | |
3012 | fi | |
3013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
3014 | $as_echo "$INSTALL" >&6; } | |
3015 | ||
3016 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3017 | # It thinks the first close brace ends the variable substitution. | |
3018 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3019 | ||
3020 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
3021 | ||
3022 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3023 | ||
3024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 | |
3025 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3026 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3027 | # name. Accept space and tab only in the latter. | |
3028 | am_lf=' | |
3029 | ' | |
3030 | case `pwd` in | |
3031 | *[\\\"\#\$\&\'\`$am_lf]*) | |
3032 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; | |
3033 | esac | |
3034 | case $srcdir in | |
3035 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
3036 | as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; | |
3037 | esac | |
3038 | ||
3039 | # Do 'set' in a subshell so we don't clobber the current shell's | |
3040 | # arguments. Must try -L first in case configure is actually a | |
3041 | # symlink; some systems play weird games with the mod time of symlinks | |
3042 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3043 | # directory). | |
3044 | if ( | |
3045 | am_has_slept=no | |
3046 | for am_try in 1 2; do | |
3047 | echo "timestamp, slept: $am_has_slept" > conftest.file | |
3048 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3049 | if test "$*" = "X"; then | |
3050 | # -L didn't work. | |
3051 | set X `ls -t "$srcdir/configure" conftest.file` | |
3052 | fi | |
3053 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3054 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3055 | ||
3056 | # If neither matched, then we have a broken ls. This can happen | |
3057 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3058 | # broken ls alias from the environment. This has actually | |
3059 | # happened. Such a system could not be considered "sane". | |
3060 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
3061 | alias in your environment" "$LINENO" 5 | |
3062 | fi | |
3063 | if test "$2" = conftest.file || test $am_try -eq 2; then | |
3064 | break | |
3065 | fi | |
3066 | # Just in case. | |
3067 | sleep 1 | |
3068 | am_has_slept=yes | |
3069 | done | |
3070 | test "$2" = conftest.file | |
3071 | ) | |
3072 | then | |
3073 | # Ok. | |
3074 | : | |
3075 | else | |
3076 | as_fn_error $? "newly created file is older than distributed files! | |
3077 | Check your system clock" "$LINENO" 5 | |
3078 | fi | |
3079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3080 | $as_echo "yes" >&6; } | |
3081 | # If we didn't sleep, we still need to ensure time stamps of config.status and | |
3082 | # generated files are strictly newer. | |
3083 | am_sleep_pid= | |
3084 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
3085 | ( sleep 1 ) & | |
3086 | am_sleep_pid=$! | |
3087 | fi | |
3088 | ||
3089 | rm -f conftest.file | |
3090 | ||
3091 | test "$program_prefix" != NONE && | |
3092 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3093 | # Use a double $ so make ignores it. | |
3094 | test "$program_suffix" != NONE && | |
3095 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3096 | # Double any \ or $. | |
3097 | # By default was `s,x,x', remove it if useless. | |
3098 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3099 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
3100 | ||
3101 | # Expand $ac_aux_dir to an absolute path. | |
3102 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
3103 | ||
3104 | if test x"${MISSING+set}" != xset; then | |
3105 | case $am_aux_dir in | |
3106 | *\ * | *\ *) | |
3107 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3108 | *) | |
3109 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3110 | esac | |
3111 | fi | |
3112 | # Use eval to expand $SHELL | |
3113 | if eval "$MISSING --is-lightweight"; then | |
3114 | am_missing_run="$MISSING " | |
3115 | else | |
3116 | am_missing_run= | |
3117 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 | |
3118 | $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} | |
3119 | fi | |
3120 | ||
3121 | if test x"${install_sh+set}" != xset; then | |
3122 | case $am_aux_dir in | |
3123 | *\ * | *\ *) | |
3124 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3125 | *) | |
3126 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3127 | esac | |
3128 | fi | |
3129 | ||
3130 | # Installed binaries are usually stripped using 'strip' when the user | |
3131 | # run "make install-strip". However 'strip' might not be the right | |
3132 | # tool to use in cross-compilation environments, therefore Automake | |
3133 | # will honor the 'STRIP' environment variable to overrule this program. | |
3134 | if test "$cross_compiling" != no; then | |
3135 | if test -n "$ac_tool_prefix"; then | |
3136 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3137 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3139 | $as_echo_n "checking for $ac_word... " >&6; } | |
3140 | if ${ac_cv_prog_STRIP+:} false; then : | |
3141 | $as_echo_n "(cached) " >&6 | |
3142 | else | |
3143 | if test -n "$STRIP"; then | |
3144 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3145 | else | |
3146 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3147 | for as_dir in $PATH | |
3148 | do | |
3149 | IFS=$as_save_IFS | |
3150 | test -z "$as_dir" && as_dir=. | |
3151 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3152 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3153 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3154 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3155 | break 2 | |
3156 | fi | |
3157 | done | |
3158 | done | |
3159 | IFS=$as_save_IFS | |
3160 | ||
3161 | fi | |
3162 | fi | |
3163 | STRIP=$ac_cv_prog_STRIP | |
3164 | if test -n "$STRIP"; then | |
3165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3166 | $as_echo "$STRIP" >&6; } | |
3167 | else | |
3168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3169 | $as_echo "no" >&6; } | |
3170 | fi | |
3171 | ||
3172 | ||
3173 | fi | |
3174 | if test -z "$ac_cv_prog_STRIP"; then | |
3175 | ac_ct_STRIP=$STRIP | |
3176 | # Extract the first word of "strip", so it can be a program name with args. | |
3177 | set dummy strip; ac_word=$2 | |
3178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3179 | $as_echo_n "checking for $ac_word... " >&6; } | |
3180 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
3181 | $as_echo_n "(cached) " >&6 | |
3182 | else | |
3183 | if test -n "$ac_ct_STRIP"; then | |
3184 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3185 | else | |
3186 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3187 | for as_dir in $PATH | |
3188 | do | |
3189 | IFS=$as_save_IFS | |
3190 | test -z "$as_dir" && as_dir=. | |
3191 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3192 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3193 | ac_cv_prog_ac_ct_STRIP="strip" | |
3194 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3195 | break 2 | |
3196 | fi | |
3197 | done | |
3198 | done | |
3199 | IFS=$as_save_IFS | |
3200 | ||
3201 | fi | |
3202 | fi | |
3203 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3204 | if test -n "$ac_ct_STRIP"; then | |
3205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3206 | $as_echo "$ac_ct_STRIP" >&6; } | |
3207 | else | |
3208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3209 | $as_echo "no" >&6; } | |
3210 | fi | |
3211 | ||
3212 | if test "x$ac_ct_STRIP" = x; then | |
3213 | STRIP=":" | |
3214 | else | |
3215 | case $cross_compiling:$ac_tool_warned in | |
3216 | yes:) | |
3217 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3218 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3219 | ac_tool_warned=yes ;; | |
3220 | esac | |
3221 | STRIP=$ac_ct_STRIP | |
3222 | fi | |
3223 | else | |
3224 | STRIP="$ac_cv_prog_STRIP" | |
3225 | fi | |
3226 | ||
3227 | fi | |
3228 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3229 | ||
3230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3231 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3232 | if test -z "$MKDIR_P"; then | |
3233 | if ${ac_cv_path_mkdir+:} false; then : | |
3234 | $as_echo_n "(cached) " >&6 | |
3235 | else | |
3236 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3237 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3238 | do | |
3239 | IFS=$as_save_IFS | |
3240 | test -z "$as_dir" && as_dir=. | |
3241 | for ac_prog in mkdir gmkdir; do | |
3242 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3243 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue | |
3244 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3245 | 'mkdir (GNU coreutils) '* | \ | |
3246 | 'mkdir (coreutils) '* | \ | |
3247 | 'mkdir (fileutils) '4.1*) | |
3248 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3249 | break 3;; | |
3250 | esac | |
3251 | done | |
3252 | done | |
3253 | done | |
3254 | IFS=$as_save_IFS | |
3255 | ||
3256 | fi | |
3257 | ||
3258 | test -d ./--version && rmdir ./--version | |
3259 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3260 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3261 | else | |
3262 | # As a last resort, use the slow shell script. Don't cache a | |
3263 | # value for MKDIR_P within a source directory, because that will | |
3264 | # break other packages using the cache if that directory is | |
3265 | # removed, or if the value is a relative name. | |
3266 | MKDIR_P="$ac_install_sh -d" | |
3267 | fi | |
3268 | fi | |
3269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3270 | $as_echo "$MKDIR_P" >&6; } | |
3271 | ||
3272 | for ac_prog in gawk mawk nawk awk | |
3273 | do | |
3274 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3275 | set dummy $ac_prog; ac_word=$2 | |
3276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3277 | $as_echo_n "checking for $ac_word... " >&6; } | |
3278 | if ${ac_cv_prog_AWK+:} false; then : | |
3279 | $as_echo_n "(cached) " >&6 | |
3280 | else | |
3281 | if test -n "$AWK"; then | |
3282 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3283 | else | |
3284 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3285 | for as_dir in $PATH | |
3286 | do | |
3287 | IFS=$as_save_IFS | |
3288 | test -z "$as_dir" && as_dir=. | |
3289 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3290 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3291 | ac_cv_prog_AWK="$ac_prog" | |
3292 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3293 | break 2 | |
3294 | fi | |
3295 | done | |
3296 | done | |
3297 | IFS=$as_save_IFS | |
3298 | ||
3299 | fi | |
3300 | fi | |
3301 | AWK=$ac_cv_prog_AWK | |
3302 | if test -n "$AWK"; then | |
3303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3304 | $as_echo "$AWK" >&6; } | |
3305 | else | |
3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3307 | $as_echo "no" >&6; } | |
3308 | fi | |
3309 | ||
3310 | ||
3311 | test -n "$AWK" && break | |
3312 | done | |
3313 | ||
3314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3315 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3316 | set x ${MAKE-make} | |
3317 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
3318 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : | |
3319 | $as_echo_n "(cached) " >&6 | |
3320 | else | |
3321 | cat >conftest.make <<\_ACEOF | |
3322 | SHELL = /bin/sh | |
3323 | all: | |
3324 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3325 | _ACEOF | |
3326 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
3327 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
3328 | *@@@%%%=?*=@@@%%%*) | |
3329 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3330 | *) | |
3331 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3332 | esac | |
3333 | rm -f conftest.make | |
3334 | fi | |
3335 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3337 | $as_echo "yes" >&6; } | |
3338 | SET_MAKE= | |
3339 | else | |
3340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3341 | $as_echo "no" >&6; } | |
3342 | SET_MAKE="MAKE=${MAKE-make}" | |
3343 | fi | |
3344 | ||
3345 | rm -rf .tst 2>/dev/null | |
3346 | mkdir .tst 2>/dev/null | |
3347 | if test -d .tst; then | |
3348 | am__leading_dot=. | |
3349 | else | |
3350 | am__leading_dot=_ | |
3351 | fi | |
3352 | rmdir .tst 2>/dev/null | |
3353 | ||
3354 | # Check whether --enable-silent-rules was given. | |
3355 | if test "${enable_silent_rules+set}" = set; then : | |
3356 | enableval=$enable_silent_rules; | |
3357 | fi | |
3358 | ||
3359 | case $enable_silent_rules in # ((( | |
3360 | yes) AM_DEFAULT_VERBOSITY=0;; | |
3361 | no) AM_DEFAULT_VERBOSITY=1;; | |
3362 | *) AM_DEFAULT_VERBOSITY=1;; | |
3363 | esac | |
3364 | am_make=${MAKE-make} | |
3365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
3366 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
3367 | if ${am_cv_make_support_nested_variables+:} false; then : | |
3368 | $as_echo_n "(cached) " >&6 | |
3369 | else | |
3370 | if $as_echo 'TRUE=$(BAR$(V)) | |
3371 | BAR0=false | |
3372 | BAR1=true | |
3373 | V=1 | |
3374 | am__doit: | |
3375 | @$(TRUE) | |
3376 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
3377 | am_cv_make_support_nested_variables=yes | |
3378 | else | |
3379 | am_cv_make_support_nested_variables=no | |
3380 | fi | |
3381 | fi | |
3382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
3383 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
3384 | if test $am_cv_make_support_nested_variables = yes; then | |
3385 | AM_V='$(V)' | |
3386 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
3387 | else | |
3388 | AM_V=$AM_DEFAULT_VERBOSITY | |
3389 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
3390 | fi | |
3391 | AM_BACKSLASH='\' | |
3392 | ||
3393 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3394 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3395 | # is not polluted with repeated "-I." | |
3396 | am__isrc=' -I$(srcdir)' | |
3397 | # test to see if srcdir already configured | |
3398 | if test -f $srcdir/config.status; then | |
3399 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
3400 | fi | |
3401 | fi | |
3402 | ||
3403 | # test whether we have cygpath | |
3404 | if test -z "$CYGPATH_W"; then | |
3405 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3406 | CYGPATH_W='cygpath -w' | |
3407 | else | |
3408 | CYGPATH_W=echo | |
3409 | fi | |
3410 | fi | |
3411 | ||
3412 | ||
3413 | # Define the identity of the package. | |
3414 | PACKAGE='gdbsupport' | |
3415 | VERSION='1.0' | |
3416 | ||
3417 | ||
3418 | cat >>confdefs.h <<_ACEOF | |
3419 | #define PACKAGE "$PACKAGE" | |
3420 | _ACEOF | |
3421 | ||
3422 | ||
3423 | cat >>confdefs.h <<_ACEOF | |
3424 | #define VERSION "$VERSION" | |
3425 | _ACEOF | |
3426 | ||
3427 | # Some tools Automake needs. | |
3428 | ||
3429 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3430 | ||
3431 | ||
3432 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3433 | ||
3434 | ||
3435 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3436 | ||
3437 | ||
3438 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3439 | ||
3440 | ||
3441 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3442 | ||
3443 | # For better backward compatibility. To be removed once Automake 1.9.x | |
3444 | # dies out for good. For more background, see: | |
3445 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
3446 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
3447 | mkdir_p='$(MKDIR_P)' | |
3448 | ||
3449 | # We need awk for the "check" target (and possibly the TAP driver). The | |
3450 | # system "awk" is bad on some platforms. | |
3451 | # Always define AMTAR for backward compatibility. Yes, it's still used | |
3452 | # in the wild :-( We should find a proper way to deprecate it ... | |
3453 | AMTAR='$${TAR-tar}' | |
3454 | ||
3455 | ||
3456 | # We'll loop over all known methods to create a tar archive until one works. | |
3457 | _am_tools='gnutar pax cpio none' | |
3458 | ||
3459 | am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' | |
3460 | ||
3461 | ||
3462 | ||
3463 | ||
3464 | ||
3465 | ||
3466 | # POSIX will say in a future version that running "rm -f" with no argument | |
3467 | # is OK; and we want to be able to make that assumption in our Makefile | |
3468 | # recipes. So use an aggressive probe to check that the usage we want is | |
3469 | # actually supported "in the wild" to an acceptable degree. | |
3470 | # See automake bug#10828. | |
3471 | # To make any issue more visible, cause the running configure to be aborted | |
3472 | # by default if the 'rm' program in use doesn't match our expectations; the | |
3473 | # user can still override this though. | |
3474 | if rm -f && rm -fr && rm -rf; then : OK; else | |
3475 | cat >&2 <<'END' | |
3476 | Oops! | |
3477 | ||
3478 | Your 'rm' program seems unable to run without file operands specified | |
3479 | on the command line, even when the '-f' option is present. This is contrary | |
3480 | to the behaviour of most rm programs out there, and not conforming with | |
3481 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
3482 | ||
3483 | Please tell bug-automake@gnu.org about your system, including the value | |
3484 | of your $PATH and any error possibly output before this message. This | |
3485 | can help us improve future automake versions. | |
3486 | ||
3487 | END | |
3488 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
3489 | echo 'Configuration will proceed anyway, since you have set the' >&2 | |
3490 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
3491 | echo >&2 | |
3492 | else | |
3493 | cat >&2 <<'END' | |
3494 | Aborting the configuration process, to ensure you take notice of the issue. | |
3495 | ||
3496 | You can download and install GNU coreutils to get an 'rm' implementation | |
3497 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
3498 | ||
3499 | If you want to complete the configuration process using your problematic | |
3500 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
3501 | to "yes", and re-run configure. | |
3502 | ||
3503 | END | |
3504 | as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 | |
3505 | fi | |
3506 | fi | |
3507 | ||
3508 | # Check whether --enable-silent-rules was given. | |
3509 | if test "${enable_silent_rules+set}" = set; then : | |
3510 | enableval=$enable_silent_rules; | |
3511 | fi | |
3512 | ||
3513 | case $enable_silent_rules in # ((( | |
3514 | yes) AM_DEFAULT_VERBOSITY=0;; | |
3515 | no) AM_DEFAULT_VERBOSITY=1;; | |
3516 | *) AM_DEFAULT_VERBOSITY=0;; | |
3517 | esac | |
3518 | am_make=${MAKE-make} | |
3519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
3520 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
3521 | if ${am_cv_make_support_nested_variables+:} false; then : | |
3522 | $as_echo_n "(cached) " >&6 | |
3523 | else | |
3524 | if $as_echo 'TRUE=$(BAR$(V)) | |
3525 | BAR0=false | |
3526 | BAR1=true | |
3527 | V=1 | |
3528 | am__doit: | |
3529 | @$(TRUE) | |
3530 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
3531 | am_cv_make_support_nested_variables=yes | |
3532 | else | |
3533 | am_cv_make_support_nested_variables=no | |
3534 | fi | |
3535 | fi | |
3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
3537 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
3538 | if test $am_cv_make_support_nested_variables = yes; then | |
3539 | AM_V='$(V)' | |
3540 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
3541 | else | |
3542 | AM_V=$AM_DEFAULT_VERBOSITY | |
3543 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
3544 | fi | |
3545 | AM_BACKSLASH='\' | |
3546 | ||
3547 | ||
3548 | ac_ext=c | |
3549 | ac_cpp='$CPP $CPPFLAGS' | |
3550 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3551 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3552 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3553 | if test -n "$ac_tool_prefix"; then | |
3554 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3555 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3557 | $as_echo_n "checking for $ac_word... " >&6; } | |
3558 | if ${ac_cv_prog_CC+:} false; then : | |
3559 | $as_echo_n "(cached) " >&6 | |
3560 | else | |
3561 | if test -n "$CC"; then | |
3562 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3563 | else | |
3564 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3565 | for as_dir in $PATH | |
3566 | do | |
3567 | IFS=$as_save_IFS | |
3568 | test -z "$as_dir" && as_dir=. | |
3569 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3570 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3571 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3572 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3573 | break 2 | |
3574 | fi | |
3575 | done | |
3576 | done | |
3577 | IFS=$as_save_IFS | |
3578 | ||
3579 | fi | |
3580 | fi | |
3581 | CC=$ac_cv_prog_CC | |
3582 | if test -n "$CC"; then | |
3583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3584 | $as_echo "$CC" >&6; } | |
3585 | else | |
3586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3587 | $as_echo "no" >&6; } | |
3588 | fi | |
3589 | ||
3590 | ||
3591 | fi | |
3592 | if test -z "$ac_cv_prog_CC"; then | |
3593 | ac_ct_CC=$CC | |
3594 | # Extract the first word of "gcc", so it can be a program name with args. | |
3595 | set dummy gcc; ac_word=$2 | |
3596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3597 | $as_echo_n "checking for $ac_word... " >&6; } | |
3598 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
3599 | $as_echo_n "(cached) " >&6 | |
3600 | else | |
3601 | if test -n "$ac_ct_CC"; then | |
3602 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3603 | else | |
3604 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3605 | for as_dir in $PATH | |
3606 | do | |
3607 | IFS=$as_save_IFS | |
3608 | test -z "$as_dir" && as_dir=. | |
3609 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3610 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3611 | ac_cv_prog_ac_ct_CC="gcc" | |
3612 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3613 | break 2 | |
3614 | fi | |
3615 | done | |
3616 | done | |
3617 | IFS=$as_save_IFS | |
3618 | ||
3619 | fi | |
3620 | fi | |
3621 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3622 | if test -n "$ac_ct_CC"; then | |
3623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3624 | $as_echo "$ac_ct_CC" >&6; } | |
3625 | else | |
3626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3627 | $as_echo "no" >&6; } | |
3628 | fi | |
3629 | ||
3630 | if test "x$ac_ct_CC" = x; then | |
3631 | CC="" | |
3632 | else | |
3633 | case $cross_compiling:$ac_tool_warned in | |
3634 | yes:) | |
3635 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3636 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3637 | ac_tool_warned=yes ;; | |
3638 | esac | |
3639 | CC=$ac_ct_CC | |
3640 | fi | |
3641 | else | |
3642 | CC="$ac_cv_prog_CC" | |
3643 | fi | |
3644 | ||
3645 | if test -z "$CC"; then | |
3646 | if test -n "$ac_tool_prefix"; then | |
3647 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3648 | set dummy ${ac_tool_prefix}cc; 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 ${ac_cv_prog_CC+:} false; then : | |
3652 | $as_echo_n "(cached) " >&6 | |
3653 | else | |
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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3664 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
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 | |
3671 | ||
3672 | fi | |
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 | fi | |
3685 | fi | |
3686 | if test -z "$CC"; then | |
3687 | # Extract the first word of "cc", so it can be a program name with args. | |
3688 | set dummy cc; ac_word=$2 | |
3689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3690 | $as_echo_n "checking for $ac_word... " >&6; } | |
3691 | if ${ac_cv_prog_CC+:} false; then : | |
3692 | $as_echo_n "(cached) " >&6 | |
3693 | else | |
3694 | if test -n "$CC"; then | |
3695 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3696 | else | |
3697 | ac_prog_rejected=no | |
3698 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3699 | for as_dir in $PATH | |
3700 | do | |
3701 | IFS=$as_save_IFS | |
3702 | test -z "$as_dir" && as_dir=. | |
3703 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3704 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3705 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3706 | ac_prog_rejected=yes | |
3707 | continue | |
3708 | fi | |
3709 | ac_cv_prog_CC="cc" | |
3710 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3711 | break 2 | |
3712 | fi | |
3713 | done | |
3714 | done | |
3715 | IFS=$as_save_IFS | |
3716 | ||
3717 | if test $ac_prog_rejected = yes; then | |
3718 | # We found a bogon in the path, so make sure we never use it. | |
3719 | set dummy $ac_cv_prog_CC | |
3720 | shift | |
3721 | if test $# != 0; then | |
3722 | # We chose a different compiler from the bogus one. | |
3723 | # However, it has the same basename, so the bogon will be chosen | |
3724 | # first if we set CC to just the basename; use the full file name. | |
3725 | shift | |
3726 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3727 | fi | |
3728 | fi | |
3729 | fi | |
3730 | fi | |
3731 | CC=$ac_cv_prog_CC | |
3732 | if test -n "$CC"; then | |
3733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3734 | $as_echo "$CC" >&6; } | |
3735 | else | |
3736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3737 | $as_echo "no" >&6; } | |
3738 | fi | |
3739 | ||
3740 | ||
3741 | fi | |
3742 | if test -z "$CC"; then | |
3743 | if test -n "$ac_tool_prefix"; then | |
3744 | for ac_prog in cl.exe | |
3745 | do | |
3746 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3747 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3749 | $as_echo_n "checking for $ac_word... " >&6; } | |
3750 | if ${ac_cv_prog_CC+:} false; then : | |
3751 | $as_echo_n "(cached) " >&6 | |
3752 | else | |
3753 | if test -n "$CC"; then | |
3754 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3755 | else | |
3756 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3757 | for as_dir in $PATH | |
3758 | do | |
3759 | IFS=$as_save_IFS | |
3760 | test -z "$as_dir" && as_dir=. | |
3761 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3762 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3763 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3764 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3765 | break 2 | |
3766 | fi | |
3767 | done | |
3768 | done | |
3769 | IFS=$as_save_IFS | |
3770 | ||
3771 | fi | |
3772 | fi | |
3773 | CC=$ac_cv_prog_CC | |
3774 | if test -n "$CC"; then | |
3775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3776 | $as_echo "$CC" >&6; } | |
3777 | else | |
3778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3779 | $as_echo "no" >&6; } | |
3780 | fi | |
3781 | ||
3782 | ||
3783 | test -n "$CC" && break | |
3784 | done | |
3785 | fi | |
3786 | if test -z "$CC"; then | |
3787 | ac_ct_CC=$CC | |
3788 | for ac_prog in cl.exe | |
3789 | do | |
3790 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3791 | set dummy $ac_prog; ac_word=$2 | |
3792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3793 | $as_echo_n "checking for $ac_word... " >&6; } | |
3794 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
3795 | $as_echo_n "(cached) " >&6 | |
3796 | else | |
3797 | if test -n "$ac_ct_CC"; then | |
3798 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3799 | else | |
3800 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3801 | for as_dir in $PATH | |
3802 | do | |
3803 | IFS=$as_save_IFS | |
3804 | test -z "$as_dir" && as_dir=. | |
3805 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3806 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3807 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3808 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3809 | break 2 | |
3810 | fi | |
3811 | done | |
3812 | done | |
3813 | IFS=$as_save_IFS | |
3814 | ||
3815 | fi | |
3816 | fi | |
3817 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3818 | if test -n "$ac_ct_CC"; then | |
3819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3820 | $as_echo "$ac_ct_CC" >&6; } | |
3821 | else | |
3822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3823 | $as_echo "no" >&6; } | |
3824 | fi | |
3825 | ||
3826 | ||
3827 | test -n "$ac_ct_CC" && break | |
3828 | done | |
3829 | ||
3830 | if test "x$ac_ct_CC" = x; then | |
3831 | CC="" | |
3832 | else | |
3833 | case $cross_compiling:$ac_tool_warned in | |
3834 | yes:) | |
3835 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3836 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3837 | ac_tool_warned=yes ;; | |
3838 | esac | |
3839 | CC=$ac_ct_CC | |
3840 | fi | |
3841 | fi | |
3842 | ||
3843 | fi | |
3844 | ||
3845 | ||
3846 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3847 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3848 | as_fn_error $? "no acceptable C compiler found in \$PATH | |
3849 | See \`config.log' for more details" "$LINENO" 5; } | |
3850 | ||
3851 | # Provide some information about the compiler. | |
3852 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3853 | set X $ac_compile | |
3854 | ac_compiler=$2 | |
3855 | for ac_option in --version -v -V -qversion; do | |
3856 | { { ac_try="$ac_compiler $ac_option >&5" | |
3857 | case "(($ac_try" in | |
3858 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3859 | *) ac_try_echo=$ac_try;; | |
3860 | esac | |
3861 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3862 | $as_echo "$ac_try_echo"; } >&5 | |
3863 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3864 | ac_status=$? | |
3865 | if test -s conftest.err; then | |
3866 | sed '10a\ | |
3867 | ... rest of stderr output deleted ... | |
3868 | 10q' conftest.err >conftest.er1 | |
3869 | cat conftest.er1 >&5 | |
3870 | fi | |
3871 | rm -f conftest.er1 conftest.err | |
3872 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3873 | test $ac_status = 0; } | |
3874 | done | |
3875 | ||
3876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3877 | /* end confdefs.h. */ | |
3878 | ||
3879 | int | |
3880 | main () | |
3881 | { | |
3882 | ||
3883 | ; | |
3884 | return 0; | |
3885 | } | |
3886 | _ACEOF | |
3887 | ac_clean_files_save=$ac_clean_files | |
3888 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
3889 | # Try to create an executable without -o first, disregard a.out. | |
3890 | # It will help us diagnose broken compilers, and finding out an intuition | |
3891 | # of exeext. | |
3892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3893 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3894 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3895 | ||
3896 | # The possible output files: | |
3897 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3898 | ||
3899 | ac_rmfiles= | |
3900 | for ac_file in $ac_files | |
3901 | do | |
3902 | case $ac_file in | |
3903 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3904 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3905 | esac | |
3906 | done | |
3907 | rm -f $ac_rmfiles | |
3908 | ||
3909 | if { { ac_try="$ac_link_default" | |
3910 | case "(($ac_try" in | |
3911 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3912 | *) ac_try_echo=$ac_try;; | |
3913 | esac | |
3914 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3915 | $as_echo "$ac_try_echo"; } >&5 | |
3916 | (eval "$ac_link_default") 2>&5 | |
3917 | ac_status=$? | |
3918 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3919 | test $ac_status = 0; }; then : | |
3920 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3921 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3922 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3923 | # so that the user can short-circuit this test for compilers unknown to | |
3924 | # Autoconf. | |
3925 | for ac_file in $ac_files '' | |
3926 | do | |
3927 | test -f "$ac_file" || continue | |
3928 | case $ac_file in | |
3929 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3930 | ;; | |
3931 | [ab].out ) | |
3932 | # We found the default executable, but exeext='' is most | |
3933 | # certainly right. | |
3934 | break;; | |
3935 | *.* ) | |
3936 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3937 | then :; else | |
3938 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3939 | fi | |
3940 | # We set ac_cv_exeext here because the later test for it is not | |
3941 | # safe: cross compilers may not add the suffix if given an `-o' | |
3942 | # argument, so we may need to know it at that point already. | |
3943 | # Even if this section looks crufty: it has the advantage of | |
3944 | # actually working. | |
3945 | break;; | |
3946 | * ) | |
3947 | break;; | |
3948 | esac | |
3949 | done | |
3950 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
3951 | ||
3952 | else | |
3953 | ac_file='' | |
3954 | fi | |
3955 | if test -z "$ac_file"; then : | |
3956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3957 | $as_echo "no" >&6; } | |
3958 | $as_echo "$as_me: failed program was:" >&5 | |
3959 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3960 | ||
3961 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3962 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3963 | as_fn_error 77 "C compiler cannot create executables | |
3964 | See \`config.log' for more details" "$LINENO" 5; } | |
3965 | else | |
3966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3967 | $as_echo "yes" >&6; } | |
3968 | fi | |
3969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3970 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3972 | $as_echo "$ac_file" >&6; } | |
3973 | ac_exeext=$ac_cv_exeext | |
3974 | ||
3975 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
3976 | ac_clean_files=$ac_clean_files_save | |
3977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3978 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3979 | if { { ac_try="$ac_link" | |
3980 | case "(($ac_try" in | |
3981 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3982 | *) ac_try_echo=$ac_try;; | |
3983 | esac | |
3984 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3985 | $as_echo "$ac_try_echo"; } >&5 | |
3986 | (eval "$ac_link") 2>&5 | |
3987 | ac_status=$? | |
3988 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3989 | test $ac_status = 0; }; then : | |
3990 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3991 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3992 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3993 | # `rm'. | |
3994 | for ac_file in conftest.exe conftest conftest.*; do | |
3995 | test -f "$ac_file" || continue | |
3996 | case $ac_file in | |
3997 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3998 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3999 | break;; | |
4000 | * ) break;; | |
4001 | esac | |
4002 | done | |
4003 | else | |
4004 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4005 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4006 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link | |
4007 | See \`config.log' for more details" "$LINENO" 5; } | |
4008 | fi | |
4009 | rm -f conftest conftest$ac_cv_exeext | |
4010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
4011 | $as_echo "$ac_cv_exeext" >&6; } | |
4012 | ||
4013 | rm -f conftest.$ac_ext | |
4014 | EXEEXT=$ac_cv_exeext | |
4015 | ac_exeext=$EXEEXT | |
4016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4017 | /* end confdefs.h. */ | |
4018 | #include <stdio.h> | |
4019 | int | |
4020 | main () | |
4021 | { | |
4022 | FILE *f = fopen ("conftest.out", "w"); | |
4023 | return ferror (f) || fclose (f) != 0; | |
4024 | ||
4025 | ; | |
4026 | return 0; | |
4027 | } | |
4028 | _ACEOF | |
4029 | ac_clean_files="$ac_clean_files conftest.out" | |
4030 | # Check that the compiler produces executables we can run. If not, either | |
4031 | # the compiler is broken, or we cross compile. | |
4032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4033 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4034 | if test "$cross_compiling" != yes; then | |
4035 | { { ac_try="$ac_link" | |
4036 | case "(($ac_try" in | |
4037 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4038 | *) ac_try_echo=$ac_try;; | |
4039 | esac | |
4040 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4041 | $as_echo "$ac_try_echo"; } >&5 | |
4042 | (eval "$ac_link") 2>&5 | |
4043 | ac_status=$? | |
4044 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4045 | test $ac_status = 0; } | |
4046 | if { ac_try='./conftest$ac_cv_exeext' | |
4047 | { { case "(($ac_try" in | |
4048 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4049 | *) ac_try_echo=$ac_try;; | |
4050 | esac | |
4051 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4052 | $as_echo "$ac_try_echo"; } >&5 | |
4053 | (eval "$ac_try") 2>&5 | |
4054 | ac_status=$? | |
4055 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4056 | test $ac_status = 0; }; }; then | |
4057 | cross_compiling=no | |
4058 | else | |
4059 | if test "$cross_compiling" = maybe; then | |
4060 | cross_compiling=yes | |
4061 | else | |
4062 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4063 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4064 | as_fn_error $? "cannot run C compiled programs. | |
4065 | If you meant to cross compile, use \`--host'. | |
4066 | See \`config.log' for more details" "$LINENO" 5; } | |
4067 | fi | |
4068 | fi | |
4069 | fi | |
4070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4071 | $as_echo "$cross_compiling" >&6; } | |
4072 | ||
4073 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4074 | ac_clean_files=$ac_clean_files_save | |
4075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
4076 | $as_echo_n "checking for suffix of object files... " >&6; } | |
4077 | if ${ac_cv_objext+:} false; then : | |
4078 | $as_echo_n "(cached) " >&6 | |
4079 | else | |
4080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4081 | /* end confdefs.h. */ | |
4082 | ||
4083 | int | |
4084 | main () | |
4085 | { | |
4086 | ||
4087 | ; | |
4088 | return 0; | |
4089 | } | |
4090 | _ACEOF | |
4091 | rm -f conftest.o conftest.obj | |
4092 | if { { ac_try="$ac_compile" | |
4093 | case "(($ac_try" in | |
4094 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4095 | *) ac_try_echo=$ac_try;; | |
4096 | esac | |
4097 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4098 | $as_echo "$ac_try_echo"; } >&5 | |
4099 | (eval "$ac_compile") 2>&5 | |
4100 | ac_status=$? | |
4101 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4102 | test $ac_status = 0; }; then : | |
4103 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4104 | test -f "$ac_file" || continue; | |
4105 | case $ac_file in | |
4106 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4107 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4108 | break;; | |
4109 | esac | |
4110 | done | |
4111 | else | |
4112 | $as_echo "$as_me: failed program was:" >&5 | |
4113 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4114 | ||
4115 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4116 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4117 | as_fn_error $? "cannot compute suffix of object files: cannot compile | |
4118 | See \`config.log' for more details" "$LINENO" 5; } | |
4119 | fi | |
4120 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4121 | fi | |
4122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4123 | $as_echo "$ac_cv_objext" >&6; } | |
4124 | OBJEXT=$ac_cv_objext | |
4125 | ac_objext=$OBJEXT | |
4126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4127 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
4128 | if ${ac_cv_c_compiler_gnu+:} false; then : | |
4129 | $as_echo_n "(cached) " >&6 | |
4130 | else | |
4131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4132 | /* end confdefs.h. */ | |
4133 | ||
4134 | int | |
4135 | main () | |
4136 | { | |
4137 | #ifndef __GNUC__ | |
4138 | choke me | |
4139 | #endif | |
4140 | ||
4141 | ; | |
4142 | return 0; | |
4143 | } | |
4144 | _ACEOF | |
4145 | if ac_fn_c_try_compile "$LINENO"; then : | |
4146 | ac_compiler_gnu=yes | |
4147 | else | |
4148 | ac_compiler_gnu=no | |
4149 | fi | |
4150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4151 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4152 | ||
4153 | fi | |
4154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4155 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4156 | if test $ac_compiler_gnu = yes; then | |
4157 | GCC=yes | |
4158 | else | |
4159 | GCC= | |
4160 | fi | |
4161 | ac_test_CFLAGS=${CFLAGS+set} | |
4162 | ac_save_CFLAGS=$CFLAGS | |
4163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4164 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
4165 | if ${ac_cv_prog_cc_g+:} false; then : | |
4166 | $as_echo_n "(cached) " >&6 | |
4167 | else | |
4168 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4169 | ac_c_werror_flag=yes | |
4170 | ac_cv_prog_cc_g=no | |
4171 | CFLAGS="-g" | |
4172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4173 | /* end confdefs.h. */ | |
4174 | ||
4175 | int | |
4176 | main () | |
4177 | { | |
4178 | ||
4179 | ; | |
4180 | return 0; | |
4181 | } | |
4182 | _ACEOF | |
4183 | if ac_fn_c_try_compile "$LINENO"; then : | |
4184 | ac_cv_prog_cc_g=yes | |
4185 | else | |
4186 | CFLAGS="" | |
4187 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4188 | /* end confdefs.h. */ | |
4189 | ||
4190 | int | |
4191 | main () | |
4192 | { | |
4193 | ||
4194 | ; | |
4195 | return 0; | |
4196 | } | |
4197 | _ACEOF | |
4198 | if ac_fn_c_try_compile "$LINENO"; then : | |
4199 | ||
4200 | else | |
4201 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4202 | CFLAGS="-g" | |
4203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4204 | /* end confdefs.h. */ | |
4205 | ||
4206 | int | |
4207 | main () | |
4208 | { | |
4209 | ||
4210 | ; | |
4211 | return 0; | |
4212 | } | |
4213 | _ACEOF | |
4214 | if ac_fn_c_try_compile "$LINENO"; then : | |
4215 | ac_cv_prog_cc_g=yes | |
4216 | fi | |
4217 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4218 | fi | |
4219 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4220 | fi | |
4221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4222 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4223 | fi | |
4224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4225 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4226 | if test "$ac_test_CFLAGS" = set; then | |
4227 | CFLAGS=$ac_save_CFLAGS | |
4228 | elif test $ac_cv_prog_cc_g = yes; then | |
4229 | if test "$GCC" = yes; then | |
4230 | CFLAGS="-g -O2" | |
4231 | else | |
4232 | CFLAGS="-g" | |
4233 | fi | |
4234 | else | |
4235 | if test "$GCC" = yes; then | |
4236 | CFLAGS="-O2" | |
4237 | else | |
4238 | CFLAGS= | |
4239 | fi | |
4240 | fi | |
4241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4242 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
4243 | if ${ac_cv_prog_cc_c89+:} false; then : | |
4244 | $as_echo_n "(cached) " >&6 | |
4245 | else | |
4246 | ac_cv_prog_cc_c89=no | |
4247 | ac_save_CC=$CC | |
4248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4249 | /* end confdefs.h. */ | |
4250 | #include <stdarg.h> | |
4251 | #include <stdio.h> | |
4252 | struct stat; | |
4253 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4254 | struct buf { int x; }; | |
4255 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4256 | static char *e (p, i) | |
4257 | char **p; | |
4258 | int i; | |
4259 | { | |
4260 | return p[i]; | |
4261 | } | |
4262 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4263 | { | |
4264 | char *s; | |
4265 | va_list v; | |
4266 | va_start (v,p); | |
4267 | s = g (p, va_arg (v,int)); | |
4268 | va_end (v); | |
4269 | return s; | |
4270 | } | |
4271 | ||
4272 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4273 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4274 | These don't provoke an error unfortunately, instead are silently treated | |
4275 | as 'x'. The following induces an error, until -std is added to get | |
4276 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4277 | array size at least. It's necessary to write '\x00'==0 to get something | |
4278 | that's true only with -std. */ | |
4279 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4280 | ||
4281 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4282 | inside strings and character constants. */ | |
4283 | #define FOO(x) 'x' | |
4284 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4285 | ||
4286 | int test (int i, double x); | |
4287 | struct s1 {int (*f) (int a);}; | |
4288 | struct s2 {int (*f) (double a);}; | |
4289 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4290 | int argc; | |
4291 | char **argv; | |
4292 | int | |
4293 | main () | |
4294 | { | |
4295 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4296 | ; | |
4297 | return 0; | |
4298 | } | |
4299 | _ACEOF | |
4300 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4301 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4302 | do | |
4303 | CC="$ac_save_CC $ac_arg" | |
4304 | if ac_fn_c_try_compile "$LINENO"; then : | |
4305 | ac_cv_prog_cc_c89=$ac_arg | |
4306 | fi | |
4307 | rm -f core conftest.err conftest.$ac_objext | |
4308 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4309 | done | |
4310 | rm -f conftest.$ac_ext | |
4311 | CC=$ac_save_CC | |
4312 | ||
4313 | fi | |
4314 | # AC_CACHE_VAL | |
4315 | case "x$ac_cv_prog_cc_c89" in | |
4316 | x) | |
4317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4318 | $as_echo "none needed" >&6; } ;; | |
4319 | xno) | |
4320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4321 | $as_echo "unsupported" >&6; } ;; | |
4322 | *) | |
4323 | CC="$CC $ac_cv_prog_cc_c89" | |
4324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4325 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4326 | esac | |
4327 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4328 | ||
4329 | fi | |
4330 | ||
4331 | ac_ext=c | |
4332 | ac_cpp='$CPP $CPPFLAGS' | |
4333 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4334 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4335 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4336 | ||
4337 | ac_ext=c | |
4338 | ac_cpp='$CPP $CPPFLAGS' | |
4339 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4340 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4341 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 | |
4343 | $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } | |
4344 | if ${am_cv_prog_cc_c_o+:} false; then : | |
4345 | $as_echo_n "(cached) " >&6 | |
4346 | else | |
4347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4348 | /* end confdefs.h. */ | |
4349 | ||
4350 | int | |
4351 | main () | |
4352 | { | |
4353 | ||
4354 | ; | |
4355 | return 0; | |
4356 | } | |
4357 | _ACEOF | |
4358 | # Make sure it works both with $CC and with simple cc. | |
4359 | # Following AC_PROG_CC_C_O, we do the test twice because some | |
4360 | # compilers refuse to overwrite an existing .o file with -o, | |
4361 | # though they will create one. | |
4362 | am_cv_prog_cc_c_o=yes | |
4363 | for am_i in 1 2; do | |
4364 | if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 | |
4365 | ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 | |
4366 | ac_status=$? | |
4367 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4368 | (exit $ac_status); } \ | |
4369 | && test -f conftest2.$ac_objext; then | |
4370 | : OK | |
4371 | else | |
4372 | am_cv_prog_cc_c_o=no | |
4373 | break | |
4374 | fi | |
4375 | done | |
4376 | rm -f core conftest* | |
4377 | unset am_i | |
4378 | fi | |
4379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 | |
4380 | $as_echo "$am_cv_prog_cc_c_o" >&6; } | |
4381 | if test "$am_cv_prog_cc_c_o" != yes; then | |
4382 | # Losing compiler, so override with the script. | |
4383 | # FIXME: It is wrong to rewrite CC. | |
4384 | # But if we don't then we get into trouble of one sort or another. | |
4385 | # A longer-term fix would be to have automake use am__CC in this case, | |
4386 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
4387 | CC="$am_aux_dir/compile $CC" | |
4388 | fi | |
4389 | ac_ext=c | |
4390 | ac_cpp='$CPP $CPPFLAGS' | |
4391 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4392 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4393 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4394 | ||
4395 | DEPDIR="${am__leading_dot}deps" | |
4396 | ||
4397 | ac_config_commands="$ac_config_commands depfiles" | |
4398 | ||
4399 | ||
4400 | am_make=${MAKE-make} | |
4401 | cat > confinc << 'END' | |
4402 | am__doit: | |
4403 | @echo this is the am__doit target | |
4404 | .PHONY: am__doit | |
4405 | END | |
4406 | # If we don't find an include directive, just comment out the code. | |
4407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
4408 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
4409 | am__include="#" | |
4410 | am__quote= | |
4411 | _am_result=none | |
4412 | # First try GNU make style include. | |
4413 | echo "include confinc" > confmf | |
4414 | # Ignore all kinds of additional output from 'make'. | |
4415 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4416 | *the\ am__doit\ target*) | |
4417 | am__include=include | |
4418 | am__quote= | |
4419 | _am_result=GNU | |
4420 | ;; | |
4421 | esac | |
4422 | # Now try BSD make style include. | |
4423 | if test "$am__include" = "#"; then | |
4424 | echo '.include "confinc"' > confmf | |
4425 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4426 | *the\ am__doit\ target*) | |
4427 | am__include=.include | |
4428 | am__quote="\"" | |
4429 | _am_result=BSD | |
4430 | ;; | |
4431 | esac | |
4432 | fi | |
4433 | ||
4434 | ||
4435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
4436 | $as_echo "$_am_result" >&6; } | |
4437 | rm -f confinc confmf | |
4438 | ||
4439 | # Check whether --enable-dependency-tracking was given. | |
4440 | if test "${enable_dependency_tracking+set}" = set; then : | |
4441 | enableval=$enable_dependency_tracking; | |
4442 | fi | |
4443 | ||
4444 | if test "x$enable_dependency_tracking" != xno; then | |
4445 | am_depcomp="$ac_aux_dir/depcomp" | |
4446 | AMDEPBACKSLASH='\' | |
4447 | am__nodep='_no' | |
4448 | fi | |
4449 | if test "x$enable_dependency_tracking" != xno; then | |
4450 | AMDEP_TRUE= | |
4451 | AMDEP_FALSE='#' | |
4452 | else | |
4453 | AMDEP_TRUE='#' | |
4454 | AMDEP_FALSE= | |
4455 | fi | |
4456 | ||
4457 | ||
4458 | ||
4459 | depcc="$CC" am_compiler_list= | |
4460 | ||
4461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4462 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4463 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
4464 | $as_echo_n "(cached) " >&6 | |
4465 | else | |
4466 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
4467 | # We make a subdir and do the tests there. Otherwise we can end up | |
4468 | # making bogus files that we don't know about and never remove. For | |
4469 | # instance it was reported that on HP-UX the gcc test will end up | |
4470 | # making a dummy file named 'D' -- because '-MD' means "put the output | |
4471 | # in D". | |
4472 | rm -rf conftest.dir | |
4473 | mkdir conftest.dir | |
4474 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4475 | # using a relative directory. | |
4476 | cp "$am_depcomp" conftest.dir | |
4477 | cd conftest.dir | |
4478 | # We will build objects and dependencies in a subdirectory because | |
4479 | # it helps to detect inapplicable dependency modes. For instance | |
4480 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4481 | # side effect of compilation, but ICC will put the dependencies in | |
4482 | # the current directory while Tru64 will put them in the object | |
4483 | # directory. | |
4484 | mkdir sub | |
4485 | ||
4486 | am_cv_CC_dependencies_compiler_type=none | |
4487 | if test "$am_compiler_list" = ""; then | |
4488 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4489 | fi | |
4490 | am__universal=false | |
4491 | case " $depcc " in #( | |
4492 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
4493 | esac | |
4494 | ||
4495 | for depmode in $am_compiler_list; do | |
4496 | # Setup a source with many dependencies, because some compilers | |
4497 | # like to wrap large dependency lists on column 80 (with \), and | |
4498 | # we should not choose a depcomp mode which is confused by this. | |
4499 | # | |
4500 | # We need to recreate these files for each test, as the compiler may | |
4501 | # overwrite some of them when testing with obscure command lines. | |
4502 | # This happens at least with the AIX C compiler. | |
4503 | : > sub/conftest.c | |
4504 | for i in 1 2 3 4 5 6; do | |
4505 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4506 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
4507 | # Solaris 10 /bin/sh. | |
4508 | echo '/* dummy */' > sub/conftst$i.h | |
4509 | done | |
4510 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
4511 | ||
4512 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
4513 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4514 | # handle '-M -o', and we need to detect this. Also, some Intel | |
4515 | # versions had trouble with output in subdirs. | |
4516 | am__obj=sub/conftest.${OBJEXT-o} | |
4517 | am__minus_obj="-o $am__obj" | |
4518 | case $depmode in | |
4519 | gcc) | |
4520 | # This depmode causes a compiler race in universal mode. | |
4521 | test "$am__universal" = false || continue | |
4522 | ;; | |
4523 | nosideeffect) | |
4524 | # After this tag, mechanisms are not by side-effect, so they'll | |
4525 | # only be used when explicitly requested. | |
4526 | if test "x$enable_dependency_tracking" = xyes; then | |
4527 | continue | |
4528 | else | |
4529 | break | |
4530 | fi | |
4531 | ;; | |
4532 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
4533 | # This compiler won't grok '-c -o', but also, the minuso test has | |
4534 | # not run yet. These depmodes are late enough in the game, and | |
4535 | # so weak that their functioning should not be impacted. | |
4536 | am__obj=conftest.${OBJEXT-o} | |
4537 | am__minus_obj= | |
4538 | ;; | |
4539 | none) break ;; | |
4540 | esac | |
4541 | if depmode=$depmode \ | |
4542 | source=sub/conftest.c object=$am__obj \ | |
4543 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4544 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
4545 | >/dev/null 2>conftest.err && | |
4546 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
4547 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
4548 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
4549 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
4550 | # icc doesn't choke on unknown options, it will just issue warnings | |
4551 | # or remarks (even with -Werror). So we grep stderr for any message | |
4552 | # that says an option was ignored or not supported. | |
4553 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4554 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4555 | # The diagnosis changed in icc 8.0: | |
4556 | # icc: Command line remark: option '-MP' not supported | |
4557 | if (grep 'ignoring option' conftest.err || | |
4558 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4559 | am_cv_CC_dependencies_compiler_type=$depmode | |
4560 | break | |
4561 | fi | |
4562 | fi | |
4563 | done | |
4564 | ||
4565 | cd .. | |
4566 | rm -rf conftest.dir | |
4567 | else | |
4568 | am_cv_CC_dependencies_compiler_type=none | |
4569 | fi | |
4570 | ||
4571 | fi | |
4572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
4573 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
4574 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
4575 | ||
4576 | if | |
4577 | test "x$enable_dependency_tracking" != xno \ | |
4578 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
4579 | am__fastdepCC_TRUE= | |
4580 | am__fastdepCC_FALSE='#' | |
4581 | else | |
4582 | am__fastdepCC_TRUE='#' | |
4583 | am__fastdepCC_FALSE= | |
4584 | fi | |
4585 | ||
4586 | ||
4587 | ac_ext=cpp | |
4588 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4589 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4590 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4591 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4592 | if test -z "$CXX"; then | |
4593 | if test -n "$CCC"; then | |
4594 | CXX=$CCC | |
4595 | else | |
4596 | if test -n "$ac_tool_prefix"; then | |
4597 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4598 | do | |
4599 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4600 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4602 | $as_echo_n "checking for $ac_word... " >&6; } | |
4603 | if ${ac_cv_prog_CXX+:} false; then : | |
4604 | $as_echo_n "(cached) " >&6 | |
4605 | else | |
4606 | if test -n "$CXX"; then | |
4607 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
4608 | else | |
4609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4610 | for as_dir in $PATH | |
4611 | do | |
4612 | IFS=$as_save_IFS | |
4613 | test -z "$as_dir" && as_dir=. | |
4614 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4615 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4616 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
4617 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4618 | break 2 | |
4619 | fi | |
4620 | done | |
4621 | done | |
4622 | IFS=$as_save_IFS | |
4623 | ||
4624 | fi | |
4625 | fi | |
4626 | CXX=$ac_cv_prog_CXX | |
4627 | if test -n "$CXX"; then | |
4628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
4629 | $as_echo "$CXX" >&6; } | |
4630 | else | |
4631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4632 | $as_echo "no" >&6; } | |
4633 | fi | |
4634 | ||
4635 | ||
4636 | test -n "$CXX" && break | |
4637 | done | |
4638 | fi | |
4639 | if test -z "$CXX"; then | |
4640 | ac_ct_CXX=$CXX | |
4641 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4642 | do | |
4643 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4644 | set dummy $ac_prog; ac_word=$2 | |
4645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4646 | $as_echo_n "checking for $ac_word... " >&6; } | |
4647 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : | |
4648 | $as_echo_n "(cached) " >&6 | |
4649 | else | |
4650 | if test -n "$ac_ct_CXX"; then | |
4651 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
4652 | else | |
4653 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4654 | for as_dir in $PATH | |
4655 | do | |
4656 | IFS=$as_save_IFS | |
4657 | test -z "$as_dir" && as_dir=. | |
4658 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4659 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4660 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
4661 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4662 | break 2 | |
4663 | fi | |
4664 | done | |
4665 | done | |
4666 | IFS=$as_save_IFS | |
4667 | ||
4668 | fi | |
4669 | fi | |
4670 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
4671 | if test -n "$ac_ct_CXX"; then | |
4672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
4673 | $as_echo "$ac_ct_CXX" >&6; } | |
4674 | else | |
4675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4676 | $as_echo "no" >&6; } | |
4677 | fi | |
4678 | ||
4679 | ||
4680 | test -n "$ac_ct_CXX" && break | |
4681 | done | |
4682 | ||
4683 | if test "x$ac_ct_CXX" = x; then | |
4684 | CXX="g++" | |
4685 | else | |
4686 | case $cross_compiling:$ac_tool_warned in | |
4687 | yes:) | |
4688 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4689 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4690 | ac_tool_warned=yes ;; | |
4691 | esac | |
4692 | CXX=$ac_ct_CXX | |
4693 | fi | |
4694 | fi | |
4695 | ||
4696 | fi | |
4697 | fi | |
4698 | # Provide some information about the compiler. | |
4699 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
4700 | set X $ac_compile | |
4701 | ac_compiler=$2 | |
4702 | for ac_option in --version -v -V -qversion; do | |
4703 | { { ac_try="$ac_compiler $ac_option >&5" | |
4704 | case "(($ac_try" in | |
4705 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4706 | *) ac_try_echo=$ac_try;; | |
4707 | esac | |
4708 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4709 | $as_echo "$ac_try_echo"; } >&5 | |
4710 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4711 | ac_status=$? | |
4712 | if test -s conftest.err; then | |
4713 | sed '10a\ | |
4714 | ... rest of stderr output deleted ... | |
4715 | 10q' conftest.err >conftest.er1 | |
4716 | cat conftest.er1 >&5 | |
4717 | fi | |
4718 | rm -f conftest.er1 conftest.err | |
4719 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4720 | test $ac_status = 0; } | |
4721 | done | |
4722 | ||
4723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
4724 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
4725 | if ${ac_cv_cxx_compiler_gnu+:} false; then : | |
4726 | $as_echo_n "(cached) " >&6 | |
4727 | else | |
4728 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4729 | /* end confdefs.h. */ | |
4730 | ||
4731 | int | |
4732 | main () | |
4733 | { | |
4734 | #ifndef __GNUC__ | |
4735 | choke me | |
4736 | #endif | |
4737 | ||
4738 | ; | |
4739 | return 0; | |
4740 | } | |
4741 | _ACEOF | |
4742 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4743 | ac_compiler_gnu=yes | |
4744 | else | |
4745 | ac_compiler_gnu=no | |
4746 | fi | |
4747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4748 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
4749 | ||
4750 | fi | |
4751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
4752 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
4753 | if test $ac_compiler_gnu = yes; then | |
4754 | GXX=yes | |
4755 | else | |
4756 | GXX= | |
4757 | fi | |
4758 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
4759 | ac_save_CXXFLAGS=$CXXFLAGS | |
4760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
4761 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
4762 | if ${ac_cv_prog_cxx_g+:} false; then : | |
4763 | $as_echo_n "(cached) " >&6 | |
4764 | else | |
4765 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
4766 | ac_cxx_werror_flag=yes | |
4767 | ac_cv_prog_cxx_g=no | |
4768 | CXXFLAGS="-g" | |
4769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4770 | /* end confdefs.h. */ | |
4771 | ||
4772 | int | |
4773 | main () | |
4774 | { | |
4775 | ||
4776 | ; | |
4777 | return 0; | |
4778 | } | |
4779 | _ACEOF | |
4780 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4781 | ac_cv_prog_cxx_g=yes | |
4782 | else | |
4783 | CXXFLAGS="" | |
4784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4785 | /* end confdefs.h. */ | |
4786 | ||
4787 | int | |
4788 | main () | |
4789 | { | |
4790 | ||
4791 | ; | |
4792 | return 0; | |
4793 | } | |
4794 | _ACEOF | |
4795 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4796 | ||
4797 | else | |
4798 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4799 | CXXFLAGS="-g" | |
4800 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4801 | /* end confdefs.h. */ | |
4802 | ||
4803 | int | |
4804 | main () | |
4805 | { | |
4806 | ||
4807 | ; | |
4808 | return 0; | |
4809 | } | |
4810 | _ACEOF | |
4811 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4812 | ac_cv_prog_cxx_g=yes | |
4813 | fi | |
4814 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4815 | fi | |
4816 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4817 | fi | |
4818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4819 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4820 | fi | |
4821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4822 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4823 | if test "$ac_test_CXXFLAGS" = set; then | |
4824 | CXXFLAGS=$ac_save_CXXFLAGS | |
4825 | elif test $ac_cv_prog_cxx_g = yes; then | |
4826 | if test "$GXX" = yes; then | |
4827 | CXXFLAGS="-g -O2" | |
4828 | else | |
4829 | CXXFLAGS="-g" | |
4830 | fi | |
4831 | else | |
4832 | if test "$GXX" = yes; then | |
4833 | CXXFLAGS="-O2" | |
4834 | else | |
4835 | CXXFLAGS= | |
4836 | fi | |
4837 | fi | |
4838 | ac_ext=c | |
4839 | ac_cpp='$CPP $CPPFLAGS' | |
4840 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4841 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4842 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4843 | ||
4844 | depcc="$CXX" am_compiler_list= | |
4845 | ||
4846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4847 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4848 | if ${am_cv_CXX_dependencies_compiler_type+:} false; then : | |
4849 | $as_echo_n "(cached) " >&6 | |
4850 | else | |
4851 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
4852 | # We make a subdir and do the tests there. Otherwise we can end up | |
4853 | # making bogus files that we don't know about and never remove. For | |
4854 | # instance it was reported that on HP-UX the gcc test will end up | |
4855 | # making a dummy file named 'D' -- because '-MD' means "put the output | |
4856 | # in D". | |
4857 | rm -rf conftest.dir | |
4858 | mkdir conftest.dir | |
4859 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4860 | # using a relative directory. | |
4861 | cp "$am_depcomp" conftest.dir | |
4862 | cd conftest.dir | |
4863 | # We will build objects and dependencies in a subdirectory because | |
4864 | # it helps to detect inapplicable dependency modes. For instance | |
4865 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4866 | # side effect of compilation, but ICC will put the dependencies in | |
4867 | # the current directory while Tru64 will put them in the object | |
4868 | # directory. | |
4869 | mkdir sub | |
4870 | ||
4871 | am_cv_CXX_dependencies_compiler_type=none | |
4872 | if test "$am_compiler_list" = ""; then | |
4873 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4874 | fi | |
4875 | am__universal=false | |
4876 | case " $depcc " in #( | |
4877 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
4878 | esac | |
4879 | ||
4880 | for depmode in $am_compiler_list; do | |
4881 | # Setup a source with many dependencies, because some compilers | |
4882 | # like to wrap large dependency lists on column 80 (with \), and | |
4883 | # we should not choose a depcomp mode which is confused by this. | |
4884 | # | |
4885 | # We need to recreate these files for each test, as the compiler may | |
4886 | # overwrite some of them when testing with obscure command lines. | |
4887 | # This happens at least with the AIX C compiler. | |
4888 | : > sub/conftest.c | |
4889 | for i in 1 2 3 4 5 6; do | |
4890 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4891 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
4892 | # Solaris 10 /bin/sh. | |
4893 | echo '/* dummy */' > sub/conftst$i.h | |
4894 | done | |
4895 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
4896 | ||
4897 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
4898 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4899 | # handle '-M -o', and we need to detect this. Also, some Intel | |
4900 | # versions had trouble with output in subdirs. | |
4901 | am__obj=sub/conftest.${OBJEXT-o} | |
4902 | am__minus_obj="-o $am__obj" | |
4903 | case $depmode in | |
4904 | gcc) | |
4905 | # This depmode causes a compiler race in universal mode. | |
4906 | test "$am__universal" = false || continue | |
4907 | ;; | |
4908 | nosideeffect) | |
4909 | # After this tag, mechanisms are not by side-effect, so they'll | |
4910 | # only be used when explicitly requested. | |
4911 | if test "x$enable_dependency_tracking" = xyes; then | |
4912 | continue | |
4913 | else | |
4914 | break | |
4915 | fi | |
4916 | ;; | |
4917 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
4918 | # This compiler won't grok '-c -o', but also, the minuso test has | |
4919 | # not run yet. These depmodes are late enough in the game, and | |
4920 | # so weak that their functioning should not be impacted. | |
4921 | am__obj=conftest.${OBJEXT-o} | |
4922 | am__minus_obj= | |
4923 | ;; | |
4924 | none) break ;; | |
4925 | esac | |
4926 | if depmode=$depmode \ | |
4927 | source=sub/conftest.c object=$am__obj \ | |
4928 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4929 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
4930 | >/dev/null 2>conftest.err && | |
4931 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
4932 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
4933 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
4934 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
4935 | # icc doesn't choke on unknown options, it will just issue warnings | |
4936 | # or remarks (even with -Werror). So we grep stderr for any message | |
4937 | # that says an option was ignored or not supported. | |
4938 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4939 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4940 | # The diagnosis changed in icc 8.0: | |
4941 | # icc: Command line remark: option '-MP' not supported | |
4942 | if (grep 'ignoring option' conftest.err || | |
4943 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4944 | am_cv_CXX_dependencies_compiler_type=$depmode | |
4945 | break | |
4946 | fi | |
4947 | fi | |
4948 | done | |
4949 | ||
4950 | cd .. | |
4951 | rm -rf conftest.dir | |
4952 | else | |
4953 | am_cv_CXX_dependencies_compiler_type=none | |
4954 | fi | |
4955 | ||
4956 | fi | |
4957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 | |
4958 | $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } | |
4959 | CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type | |
4960 | ||
4961 | if | |
4962 | test "x$enable_dependency_tracking" != xno \ | |
4963 | && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then | |
4964 | am__fastdepCXX_TRUE= | |
4965 | am__fastdepCXX_FALSE='#' | |
4966 | else | |
4967 | am__fastdepCXX_TRUE='#' | |
4968 | am__fastdepCXX_FALSE= | |
4969 | fi | |
4970 | ||
4971 | ||
4972 | if test -n "$ac_tool_prefix"; then | |
4973 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4974 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4976 | $as_echo_n "checking for $ac_word... " >&6; } | |
4977 | if ${ac_cv_prog_RANLIB+:} false; then : | |
4978 | $as_echo_n "(cached) " >&6 | |
4979 | else | |
4980 | if test -n "$RANLIB"; then | |
4981 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4982 | else | |
4983 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4984 | for as_dir in $PATH | |
4985 | do | |
4986 | IFS=$as_save_IFS | |
4987 | test -z "$as_dir" && as_dir=. | |
4988 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4989 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4990 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4991 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4992 | break 2 | |
4993 | fi | |
4994 | done | |
4995 | done | |
4996 | IFS=$as_save_IFS | |
4997 | ||
4998 | fi | |
4999 | fi | |
5000 | RANLIB=$ac_cv_prog_RANLIB | |
5001 | if test -n "$RANLIB"; then | |
5002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5003 | $as_echo "$RANLIB" >&6; } | |
5004 | else | |
5005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5006 | $as_echo "no" >&6; } | |
5007 | fi | |
5008 | ||
5009 | ||
5010 | fi | |
5011 | if test -z "$ac_cv_prog_RANLIB"; then | |
5012 | ac_ct_RANLIB=$RANLIB | |
5013 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5014 | set dummy ranlib; ac_word=$2 | |
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5016 | $as_echo_n "checking for $ac_word... " >&6; } | |
5017 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : | |
5018 | $as_echo_n "(cached) " >&6 | |
5019 | else | |
5020 | if test -n "$ac_ct_RANLIB"; then | |
5021 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5022 | else | |
5023 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5024 | for as_dir in $PATH | |
5025 | do | |
5026 | IFS=$as_save_IFS | |
5027 | test -z "$as_dir" && as_dir=. | |
5028 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5029 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5030 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5031 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5032 | break 2 | |
5033 | fi | |
5034 | done | |
5035 | done | |
5036 | IFS=$as_save_IFS | |
5037 | ||
5038 | fi | |
5039 | fi | |
5040 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5041 | if test -n "$ac_ct_RANLIB"; then | |
5042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5043 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5044 | else | |
5045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5046 | $as_echo "no" >&6; } | |
5047 | fi | |
5048 | ||
5049 | if test "x$ac_ct_RANLIB" = x; then | |
5050 | RANLIB=":" | |
5051 | else | |
5052 | case $cross_compiling:$ac_tool_warned in | |
5053 | yes:) | |
5054 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5055 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5056 | ac_tool_warned=yes ;; | |
5057 | esac | |
5058 | RANLIB=$ac_ct_RANLIB | |
5059 | fi | |
5060 | else | |
5061 | RANLIB="$ac_cv_prog_RANLIB" | |
5062 | fi | |
5063 | ||
5064 | ||
5065 | ||
5066 | ac_ext=c | |
5067 | ac_cpp='$CPP $CPPFLAGS' | |
5068 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5069 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5070 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5072 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5073 | # On Suns, sometimes $CPP names a directory. | |
5074 | if test -n "$CPP" && test -d "$CPP"; then | |
5075 | CPP= | |
5076 | fi | |
5077 | if test -z "$CPP"; then | |
5078 | if ${ac_cv_prog_CPP+:} false; then : | |
5079 | $as_echo_n "(cached) " >&6 | |
5080 | else | |
5081 | # Double quotes because CPP needs to be expanded | |
5082 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5083 | do | |
5084 | ac_preproc_ok=false | |
5085 | for ac_c_preproc_warn_flag in '' yes | |
5086 | do | |
5087 | # Use a header file that comes with gcc, so configuring glibc | |
5088 | # with a fresh cross-compiler works. | |
5089 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5090 | # <limits.h> exists even on freestanding compilers. | |
5091 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5092 | # not just through cpp. "Syntax error" is here to catch this case. | |
5093 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5094 | /* end confdefs.h. */ | |
5095 | #ifdef __STDC__ | |
5096 | # include <limits.h> | |
5097 | #else | |
5098 | # include <assert.h> | |
5099 | #endif | |
5100 | Syntax error | |
5101 | _ACEOF | |
5102 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5103 | ||
5104 | else | |
5105 | # Broken: fails on valid input. | |
5106 | continue | |
5107 | fi | |
5108 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5109 | ||
5110 | # OK, works on sane cases. Now check whether nonexistent headers | |
5111 | # can be detected and how. | |
5112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5113 | /* end confdefs.h. */ | |
5114 | #include <ac_nonexistent.h> | |
5115 | _ACEOF | |
5116 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5117 | # Broken: success on invalid input. | |
5118 | continue | |
5119 | else | |
5120 | # Passes both tests. | |
5121 | ac_preproc_ok=: | |
5122 | break | |
5123 | fi | |
5124 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5125 | ||
5126 | done | |
5127 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5128 | rm -f conftest.i conftest.err conftest.$ac_ext | |
5129 | if $ac_preproc_ok; then : | |
5130 | break | |
5131 | fi | |
5132 | ||
5133 | done | |
5134 | ac_cv_prog_CPP=$CPP | |
5135 | ||
5136 | fi | |
5137 | CPP=$ac_cv_prog_CPP | |
5138 | else | |
5139 | ac_cv_prog_CPP=$CPP | |
5140 | fi | |
5141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5142 | $as_echo "$CPP" >&6; } | |
5143 | ac_preproc_ok=false | |
5144 | for ac_c_preproc_warn_flag in '' yes | |
5145 | do | |
5146 | # Use a header file that comes with gcc, so configuring glibc | |
5147 | # with a fresh cross-compiler works. | |
5148 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5149 | # <limits.h> exists even on freestanding compilers. | |
5150 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5151 | # not just through cpp. "Syntax error" is here to catch this case. | |
5152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5153 | /* end confdefs.h. */ | |
5154 | #ifdef __STDC__ | |
5155 | # include <limits.h> | |
5156 | #else | |
5157 | # include <assert.h> | |
5158 | #endif | |
5159 | Syntax error | |
5160 | _ACEOF | |
5161 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5162 | ||
5163 | else | |
5164 | # Broken: fails on valid input. | |
5165 | continue | |
5166 | fi | |
5167 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5168 | ||
5169 | # OK, works on sane cases. Now check whether nonexistent headers | |
5170 | # can be detected and how. | |
5171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5172 | /* end confdefs.h. */ | |
5173 | #include <ac_nonexistent.h> | |
5174 | _ACEOF | |
5175 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5176 | # Broken: success on invalid input. | |
5177 | continue | |
5178 | else | |
5179 | # Passes both tests. | |
5180 | ac_preproc_ok=: | |
5181 | break | |
5182 | fi | |
5183 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5184 | ||
5185 | done | |
5186 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5187 | rm -f conftest.i conftest.err conftest.$ac_ext | |
5188 | if $ac_preproc_ok; then : | |
5189 | ||
5190 | else | |
5191 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5192 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5193 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
5194 | See \`config.log' for more details" "$LINENO" 5; } | |
5195 | fi | |
5196 | ||
5197 | ac_ext=c | |
5198 | ac_cpp='$CPP $CPPFLAGS' | |
5199 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5200 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5201 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5202 | ||
5203 | ||
5204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5205 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
5206 | if ${ac_cv_path_GREP+:} false; then : | |
5207 | $as_echo_n "(cached) " >&6 | |
5208 | else | |
5209 | if test -z "$GREP"; then | |
5210 | ac_path_GREP_found=false | |
5211 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5212 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5213 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5214 | do | |
5215 | IFS=$as_save_IFS | |
5216 | test -z "$as_dir" && as_dir=. | |
5217 | for ac_prog in grep ggrep; do | |
5218 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5219 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5220 | as_fn_executable_p "$ac_path_GREP" || continue | |
5221 | # Check for GNU ac_path_GREP and select it if it is found. | |
5222 | # Check for GNU $ac_path_GREP | |
5223 | case `"$ac_path_GREP" --version 2>&1` in | |
5224 | *GNU*) | |
5225 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5226 | *) | |
5227 | ac_count=0 | |
5228 | $as_echo_n 0123456789 >"conftest.in" | |
5229 | while : | |
5230 | do | |
5231 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5232 | mv "conftest.tmp" "conftest.in" | |
5233 | cp "conftest.in" "conftest.nl" | |
5234 | $as_echo 'GREP' >> "conftest.nl" | |
5235 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5236 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5237 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5238 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5239 | # Best one so far, save it but keep looking for a better one | |
5240 | ac_cv_path_GREP="$ac_path_GREP" | |
5241 | ac_path_GREP_max=$ac_count | |
5242 | fi | |
5243 | # 10*(2^10) chars as input seems more than enough | |
5244 | test $ac_count -gt 10 && break | |
5245 | done | |
5246 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5247 | esac | |
5248 | ||
5249 | $ac_path_GREP_found && break 3 | |
5250 | done | |
5251 | done | |
5252 | done | |
5253 | IFS=$as_save_IFS | |
5254 | if test -z "$ac_cv_path_GREP"; then | |
5255 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5256 | fi | |
5257 | else | |
5258 | ac_cv_path_GREP=$GREP | |
5259 | fi | |
5260 | ||
5261 | fi | |
5262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5263 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5264 | GREP="$ac_cv_path_GREP" | |
5265 | ||
5266 | ||
5267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5268 | $as_echo_n "checking for egrep... " >&6; } | |
5269 | if ${ac_cv_path_EGREP+:} false; then : | |
5270 | $as_echo_n "(cached) " >&6 | |
5271 | else | |
5272 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5273 | then ac_cv_path_EGREP="$GREP -E" | |
5274 | else | |
5275 | if test -z "$EGREP"; then | |
5276 | ac_path_EGREP_found=false | |
5277 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5278 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5279 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5280 | do | |
5281 | IFS=$as_save_IFS | |
5282 | test -z "$as_dir" && as_dir=. | |
5283 | for ac_prog in egrep; do | |
5284 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5285 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5286 | as_fn_executable_p "$ac_path_EGREP" || continue | |
5287 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5288 | # Check for GNU $ac_path_EGREP | |
5289 | case `"$ac_path_EGREP" --version 2>&1` in | |
5290 | *GNU*) | |
5291 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5292 | *) | |
5293 | ac_count=0 | |
5294 | $as_echo_n 0123456789 >"conftest.in" | |
5295 | while : | |
5296 | do | |
5297 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5298 | mv "conftest.tmp" "conftest.in" | |
5299 | cp "conftest.in" "conftest.nl" | |
5300 | $as_echo 'EGREP' >> "conftest.nl" | |
5301 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5302 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5303 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5304 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5305 | # Best one so far, save it but keep looking for a better one | |
5306 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5307 | ac_path_EGREP_max=$ac_count | |
5308 | fi | |
5309 | # 10*(2^10) chars as input seems more than enough | |
5310 | test $ac_count -gt 10 && break | |
5311 | done | |
5312 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5313 | esac | |
5314 | ||
5315 | $ac_path_EGREP_found && break 3 | |
5316 | done | |
5317 | done | |
5318 | done | |
5319 | IFS=$as_save_IFS | |
5320 | if test -z "$ac_cv_path_EGREP"; then | |
5321 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5322 | fi | |
5323 | else | |
5324 | ac_cv_path_EGREP=$EGREP | |
5325 | fi | |
5326 | ||
5327 | fi | |
5328 | fi | |
5329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5330 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5331 | EGREP="$ac_cv_path_EGREP" | |
5332 | ||
5333 | ||
5334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5335 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5336 | if ${ac_cv_header_stdc+:} false; then : | |
5337 | $as_echo_n "(cached) " >&6 | |
5338 | else | |
5339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5340 | /* end confdefs.h. */ | |
5341 | #include <stdlib.h> | |
5342 | #include <stdarg.h> | |
5343 | #include <string.h> | |
5344 | #include <float.h> | |
5345 | ||
5346 | int | |
5347 | main () | |
5348 | { | |
5349 | ||
5350 | ; | |
5351 | return 0; | |
5352 | } | |
5353 | _ACEOF | |
5354 | if ac_fn_c_try_compile "$LINENO"; then : | |
5355 | ac_cv_header_stdc=yes | |
5356 | else | |
5357 | ac_cv_header_stdc=no | |
5358 | fi | |
5359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5360 | ||
5361 | if test $ac_cv_header_stdc = yes; then | |
5362 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5364 | /* end confdefs.h. */ | |
5365 | #include <string.h> | |
5366 | ||
5367 | _ACEOF | |
5368 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5369 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5370 | ||
5371 | else | |
5372 | ac_cv_header_stdc=no | |
5373 | fi | |
5374 | rm -f conftest* | |
5375 | ||
5376 | fi | |
5377 | ||
5378 | if test $ac_cv_header_stdc = yes; then | |
5379 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5381 | /* end confdefs.h. */ | |
5382 | #include <stdlib.h> | |
5383 | ||
5384 | _ACEOF | |
5385 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5386 | $EGREP "free" >/dev/null 2>&1; then : | |
5387 | ||
5388 | else | |
5389 | ac_cv_header_stdc=no | |
5390 | fi | |
5391 | rm -f conftest* | |
5392 | ||
5393 | fi | |
5394 | ||
5395 | if test $ac_cv_header_stdc = yes; then | |
5396 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5397 | if test "$cross_compiling" = yes; then : | |
5398 | : | |
5399 | else | |
5400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5401 | /* end confdefs.h. */ | |
5402 | #include <ctype.h> | |
5403 | #include <stdlib.h> | |
5404 | #if ((' ' & 0x0FF) == 0x020) | |
5405 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5406 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5407 | #else | |
5408 | # define ISLOWER(c) \ | |
5409 | (('a' <= (c) && (c) <= 'i') \ | |
5410 | || ('j' <= (c) && (c) <= 'r') \ | |
5411 | || ('s' <= (c) && (c) <= 'z')) | |
5412 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5413 | #endif | |
5414 | ||
5415 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5416 | int | |
5417 | main () | |
5418 | { | |
5419 | int i; | |
5420 | for (i = 0; i < 256; i++) | |
5421 | if (XOR (islower (i), ISLOWER (i)) | |
5422 | || toupper (i) != TOUPPER (i)) | |
5423 | return 2; | |
5424 | return 0; | |
5425 | } | |
5426 | _ACEOF | |
5427 | if ac_fn_c_try_run "$LINENO"; then : | |
5428 | ||
5429 | else | |
5430 | ac_cv_header_stdc=no | |
5431 | fi | |
5432 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5433 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5434 | fi | |
5435 | ||
5436 | fi | |
5437 | fi | |
5438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5439 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5440 | if test $ac_cv_header_stdc = yes; then | |
5441 | ||
5442 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5443 | ||
5444 | fi | |
5445 | ||
5446 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5447 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5448 | inttypes.h stdint.h unistd.h | |
5449 | do : | |
5450 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5451 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5452 | " | |
5453 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
5454 | cat >>confdefs.h <<_ACEOF | |
5455 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5456 | _ACEOF | |
5457 | ||
5458 | fi | |
5459 | ||
5460 | done | |
5461 | ||
5462 | ||
5463 | ||
5464 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
5465 | if test "x$ac_cv_header_minix_config_h" = xyes; then : | |
5466 | MINIX=yes | |
5467 | else | |
5468 | MINIX= | |
5469 | fi | |
5470 | ||
5471 | ||
5472 | if test "$MINIX" = yes; then | |
5473 | ||
5474 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5475 | ||
5476 | ||
5477 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5478 | ||
5479 | ||
5480 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5481 | ||
5482 | fi | |
5483 | ||
5484 | ||
5485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5486 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5487 | if ${ac_cv_safe_to_define___extensions__+:} false; then : | |
5488 | $as_echo_n "(cached) " >&6 | |
5489 | else | |
5490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5491 | /* end confdefs.h. */ | |
5492 | ||
5493 | # define __EXTENSIONS__ 1 | |
5494 | $ac_includes_default | |
5495 | int | |
5496 | main () | |
5497 | { | |
5498 | ||
5499 | ; | |
5500 | return 0; | |
5501 | } | |
5502 | _ACEOF | |
5503 | if ac_fn_c_try_compile "$LINENO"; then : | |
5504 | ac_cv_safe_to_define___extensions__=yes | |
5505 | else | |
5506 | ac_cv_safe_to_define___extensions__=no | |
5507 | fi | |
5508 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5509 | fi | |
5510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5511 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5512 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5513 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5514 | ||
5515 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5516 | ||
5517 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
5518 | ||
5519 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
5520 | ||
5521 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5522 | ||
5523 | ||
5524 | ||
5525 | # The tests for host and target for $enable_largefile require | |
5526 | # canonical names. | |
5527 | ||
5528 | ||
5529 | ||
5530 | # As the $enable_largefile decision depends on --enable-plugins we must set it | |
5531 | # even in directories otherwise not depending on the $plugins option. | |
5532 | ||
5533 | ||
5534 | maybe_plugins=no | |
5535 | for ac_header in dlfcn.h | |
5536 | do : | |
5537 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
5538 | " | |
5539 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : | |
5540 | cat >>confdefs.h <<_ACEOF | |
5541 | #define HAVE_DLFCN_H 1 | |
5542 | _ACEOF | |
5543 | maybe_plugins=yes | |
5544 | fi | |
5545 | ||
5546 | done | |
5547 | ||
5548 | for ac_header in windows.h | |
5549 | do : | |
5550 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
5551 | " | |
5552 | if test "x$ac_cv_header_windows_h" = xyes; then : | |
5553 | cat >>confdefs.h <<_ACEOF | |
5554 | #define HAVE_WINDOWS_H 1 | |
5555 | _ACEOF | |
5556 | maybe_plugins=yes | |
5557 | fi | |
5558 | ||
5559 | done | |
5560 | ||
5561 | ||
5562 | # Check whether --enable-plugins was given. | |
5563 | if test "${enable_plugins+set}" = set; then : | |
5564 | enableval=$enable_plugins; case "${enableval}" in | |
5565 | no) plugins=no ;; | |
5566 | *) plugins=yes | |
5567 | if test "$maybe_plugins" != "yes" ; then | |
5568 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
5569 | fi ;; | |
5570 | esac | |
5571 | else | |
5572 | plugins=$maybe_plugins | |
5573 | ||
5574 | fi | |
5575 | ||
5576 | if test "$plugins" = "yes"; then | |
5577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 | |
5578 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
5579 | if ${ac_cv_search_dlsym+:} false; then : | |
5580 | $as_echo_n "(cached) " >&6 | |
5581 | else | |
5582 | ac_func_search_save_LIBS=$LIBS | |
5583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5584 | /* end confdefs.h. */ | |
5585 | ||
5586 | /* Override any GCC internal prototype to avoid an error. | |
5587 | Use char because int might match the return type of a GCC | |
5588 | builtin and then its argument prototype would still apply. */ | |
5589 | #ifdef __cplusplus | |
5590 | extern "C" | |
5591 | #endif | |
5592 | char dlsym (); | |
5593 | int | |
5594 | main () | |
5595 | { | |
5596 | return dlsym (); | |
5597 | ; | |
5598 | return 0; | |
5599 | } | |
5600 | _ACEOF | |
5601 | for ac_lib in '' dl; do | |
5602 | if test -z "$ac_lib"; then | |
5603 | ac_res="none required" | |
5604 | else | |
5605 | ac_res=-l$ac_lib | |
5606 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5607 | fi | |
5608 | if ac_fn_c_try_link "$LINENO"; then : | |
5609 | ac_cv_search_dlsym=$ac_res | |
5610 | fi | |
5611 | rm -f core conftest.err conftest.$ac_objext \ | |
5612 | conftest$ac_exeext | |
5613 | if ${ac_cv_search_dlsym+:} false; then : | |
5614 | break | |
5615 | fi | |
5616 | done | |
5617 | if ${ac_cv_search_dlsym+:} false; then : | |
5618 | ||
5619 | else | |
5620 | ac_cv_search_dlsym=no | |
5621 | fi | |
5622 | rm conftest.$ac_ext | |
5623 | LIBS=$ac_func_search_save_LIBS | |
5624 | fi | |
5625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 | |
5626 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
5627 | ac_res=$ac_cv_search_dlsym | |
5628 | if test "$ac_res" != no; then : | |
5629 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5630 | ||
5631 | fi | |
5632 | ||
5633 | fi | |
5634 | ||
5635 | ||
5636 | case "${host}" in | |
c8693053 RO |
5637 | sparc-*-solaris*|i?86-*-solaris*) |
5638 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
5639 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
5640 | # the bfd/ elf module cannot provide certain routines such as | |
5641 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
5642 | # explicitly requested large-file support through the | |
5643 | # --enable-largefile switch, disable large-file support in favor of | |
5644 | # procfs support. | |
5645 | # | |
5646 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
5647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5648 | /* end confdefs.h. */ | |
5649 | #define _FILE_OFFSET_BITS 64 | |
5650 | #define _STRUCTURED_PROC 1 | |
5651 | #include <sys/procfs.h> | |
5652 | int | |
5653 | main () | |
5654 | { | |
5655 | ||
5656 | ; | |
5657 | return 0; | |
5658 | } | |
5659 | _ACEOF | |
5660 | if ac_fn_c_try_compile "$LINENO"; then : | |
5661 | acx_cv_procfs_lfs=yes | |
5662 | else | |
5663 | acx_cv_procfs_lfs=no | |
5664 | fi | |
5665 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5666 | # | |
5667 | # Forcefully disable large-file support only if necessary, gdb is in | |
5668 | # tree and enabled. | |
5669 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
5670 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
5671 | : ${enable_largefile="no"} | |
5672 | if test "$plugins" = yes; then | |
5673 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
5674 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
5675 | $as_echo "$as_me: WARNING: | |
5676 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
5677 | plugins=no | |
5678 | fi | |
5679 | fi | |
5680 | # | |
5681 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
5682 | # benefit of g++ 9+ which predefines it on Solaris. | |
5683 | if test "$enable_largefile" = no; then | |
5684 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
5685 | ||
5686 | fi | |
01027315 TT |
5687 | ;; |
5688 | esac | |
5689 | ||
5690 | # Check whether --enable-largefile was given. | |
5691 | if test "${enable_largefile+set}" = set; then : | |
5692 | enableval=$enable_largefile; | |
5693 | fi | |
5694 | ||
5695 | if test "$enable_largefile" != no; then | |
5696 | ||
5697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
5698 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
5699 | if ${ac_cv_sys_largefile_CC+:} false; then : | |
5700 | $as_echo_n "(cached) " >&6 | |
5701 | else | |
5702 | ac_cv_sys_largefile_CC=no | |
5703 | if test "$GCC" != yes; then | |
5704 | ac_save_CC=$CC | |
5705 | while :; do | |
5706 | # IRIX 6.2 and later do not support large files by default, | |
5707 | # so use the C compiler's -n32 option if that helps. | |
5708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5709 | /* end confdefs.h. */ | |
5710 | #include <sys/types.h> | |
5711 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5712 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5713 | since some C++ compilers masquerading as C compilers | |
5714 | incorrectly reject 9223372036854775807. */ | |
5715 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5716 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5717 | && LARGE_OFF_T % 2147483647 == 1) | |
5718 | ? 1 : -1]; | |
5719 | int | |
5720 | main () | |
5721 | { | |
5722 | ||
5723 | ; | |
5724 | return 0; | |
5725 | } | |
5726 | _ACEOF | |
5727 | if ac_fn_c_try_compile "$LINENO"; then : | |
5728 | break | |
5729 | fi | |
5730 | rm -f core conftest.err conftest.$ac_objext | |
5731 | CC="$CC -n32" | |
5732 | if ac_fn_c_try_compile "$LINENO"; then : | |
5733 | ac_cv_sys_largefile_CC=' -n32'; break | |
5734 | fi | |
5735 | rm -f core conftest.err conftest.$ac_objext | |
5736 | break | |
5737 | done | |
5738 | CC=$ac_save_CC | |
5739 | rm -f conftest.$ac_ext | |
5740 | fi | |
5741 | fi | |
5742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
5743 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
5744 | if test "$ac_cv_sys_largefile_CC" != no; then | |
5745 | CC=$CC$ac_cv_sys_largefile_CC | |
5746 | fi | |
5747 | ||
5748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
5749 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
5750 | if ${ac_cv_sys_file_offset_bits+:} false; then : | |
5751 | $as_echo_n "(cached) " >&6 | |
5752 | else | |
5753 | while :; do | |
5754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5755 | /* end confdefs.h. */ | |
5756 | #include <sys/types.h> | |
5757 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5758 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5759 | since some C++ compilers masquerading as C compilers | |
5760 | incorrectly reject 9223372036854775807. */ | |
5761 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5762 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5763 | && LARGE_OFF_T % 2147483647 == 1) | |
5764 | ? 1 : -1]; | |
5765 | int | |
5766 | main () | |
5767 | { | |
5768 | ||
5769 | ; | |
5770 | return 0; | |
5771 | } | |
5772 | _ACEOF | |
5773 | if ac_fn_c_try_compile "$LINENO"; then : | |
5774 | ac_cv_sys_file_offset_bits=no; break | |
5775 | fi | |
5776 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5778 | /* end confdefs.h. */ | |
5779 | #define _FILE_OFFSET_BITS 64 | |
5780 | #include <sys/types.h> | |
5781 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5782 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5783 | since some C++ compilers masquerading as C compilers | |
5784 | incorrectly reject 9223372036854775807. */ | |
5785 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5786 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5787 | && LARGE_OFF_T % 2147483647 == 1) | |
5788 | ? 1 : -1]; | |
5789 | int | |
5790 | main () | |
5791 | { | |
5792 | ||
5793 | ; | |
5794 | return 0; | |
5795 | } | |
5796 | _ACEOF | |
5797 | if ac_fn_c_try_compile "$LINENO"; then : | |
5798 | ac_cv_sys_file_offset_bits=64; break | |
5799 | fi | |
5800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5801 | ac_cv_sys_file_offset_bits=unknown | |
5802 | break | |
5803 | done | |
5804 | fi | |
5805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
5806 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
5807 | case $ac_cv_sys_file_offset_bits in #( | |
5808 | no | unknown) ;; | |
5809 | *) | |
5810 | cat >>confdefs.h <<_ACEOF | |
5811 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
5812 | _ACEOF | |
5813 | ;; | |
5814 | esac | |
5815 | rm -rf conftest* | |
5816 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
5817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
5818 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
5819 | if ${ac_cv_sys_large_files+:} false; then : | |
5820 | $as_echo_n "(cached) " >&6 | |
5821 | else | |
5822 | while :; do | |
5823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5824 | /* end confdefs.h. */ | |
5825 | #include <sys/types.h> | |
5826 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5827 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5828 | since some C++ compilers masquerading as C compilers | |
5829 | incorrectly reject 9223372036854775807. */ | |
5830 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5831 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5832 | && LARGE_OFF_T % 2147483647 == 1) | |
5833 | ? 1 : -1]; | |
5834 | int | |
5835 | main () | |
5836 | { | |
5837 | ||
5838 | ; | |
5839 | return 0; | |
5840 | } | |
5841 | _ACEOF | |
5842 | if ac_fn_c_try_compile "$LINENO"; then : | |
5843 | ac_cv_sys_large_files=no; break | |
5844 | fi | |
5845 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5847 | /* end confdefs.h. */ | |
5848 | #define _LARGE_FILES 1 | |
5849 | #include <sys/types.h> | |
5850 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5851 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5852 | since some C++ compilers masquerading as C compilers | |
5853 | incorrectly reject 9223372036854775807. */ | |
5854 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5855 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5856 | && LARGE_OFF_T % 2147483647 == 1) | |
5857 | ? 1 : -1]; | |
5858 | int | |
5859 | main () | |
5860 | { | |
5861 | ||
5862 | ; | |
5863 | return 0; | |
5864 | } | |
5865 | _ACEOF | |
5866 | if ac_fn_c_try_compile "$LINENO"; then : | |
5867 | ac_cv_sys_large_files=1; break | |
5868 | fi | |
5869 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5870 | ac_cv_sys_large_files=unknown | |
5871 | break | |
5872 | done | |
5873 | fi | |
5874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5875 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5876 | case $ac_cv_sys_large_files in #( | |
5877 | no | unknown) ;; | |
5878 | *) | |
5879 | cat >>confdefs.h <<_ACEOF | |
5880 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5881 | _ACEOF | |
5882 | ;; | |
5883 | esac | |
5884 | rm -rf conftest* | |
5885 | fi | |
5886 | ||
5887 | ||
5888 | fi | |
5889 | ||
5890 | ||
01027315 TT |
5891 | |
5892 | # We require a C++11 compiler. Check if one is available, and if | |
5893 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5894 | ||
5895 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true | |
5896 | ac_ext=cpp | |
5897 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5898 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5899 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5900 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5901 | CXX_DIALECT="" | |
5902 | ac_success=no | |
5903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5904 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
5905 | if ${ax_cv_cxx_compile_cxx11+:} false; then : | |
5906 | $as_echo_n "(cached) " >&6 | |
5907 | else | |
5908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5909 | /* end confdefs.h. */ | |
5910 | ||
5911 | ||
5912 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5913 | // Hopefully, this will speed up the test. | |
5914 | ||
5915 | #ifndef __cplusplus | |
5916 | ||
5917 | #error "This is not a C++ compiler" | |
5918 | ||
5919 | #elif __cplusplus < 201103L | |
5920 | ||
5921 | #error "This is not a C++11 compiler" | |
5922 | ||
5923 | #else | |
5924 | ||
5925 | namespace cxx11 | |
5926 | { | |
5927 | ||
5928 | namespace test_static_assert | |
5929 | { | |
5930 | ||
5931 | template <typename T> | |
5932 | struct check | |
5933 | { | |
5934 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5935 | }; | |
5936 | ||
5937 | } | |
5938 | ||
5939 | namespace test_final_override | |
5940 | { | |
5941 | ||
5942 | struct Base | |
5943 | { | |
5944 | virtual void f() {} | |
5945 | }; | |
5946 | ||
5947 | struct Derived : public Base | |
5948 | { | |
5949 | virtual void f() override {} | |
5950 | }; | |
5951 | ||
5952 | } | |
5953 | ||
5954 | namespace test_double_right_angle_brackets | |
5955 | { | |
5956 | ||
5957 | template < typename T > | |
5958 | struct check {}; | |
5959 | ||
5960 | typedef check<void> single_type; | |
5961 | typedef check<check<void>> double_type; | |
5962 | typedef check<check<check<void>>> triple_type; | |
5963 | typedef check<check<check<check<void>>>> quadruple_type; | |
5964 | ||
5965 | } | |
5966 | ||
5967 | namespace test_decltype | |
5968 | { | |
5969 | ||
5970 | int | |
5971 | f() | |
5972 | { | |
5973 | int a = 1; | |
5974 | decltype(a) b = 2; | |
5975 | return a + b; | |
5976 | } | |
5977 | ||
5978 | } | |
5979 | ||
5980 | namespace test_type_deduction | |
5981 | { | |
5982 | ||
5983 | template < typename T1, typename T2 > | |
5984 | struct is_same | |
5985 | { | |
5986 | static const bool value = false; | |
5987 | }; | |
5988 | ||
5989 | template < typename T > | |
5990 | struct is_same<T, T> | |
5991 | { | |
5992 | static const bool value = true; | |
5993 | }; | |
5994 | ||
5995 | template < typename T1, typename T2 > | |
5996 | auto | |
5997 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5998 | { | |
5999 | return a1 + a2; | |
6000 | } | |
6001 | ||
6002 | int | |
6003 | test(const int c, volatile int v) | |
6004 | { | |
6005 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
6006 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
6007 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
6008 | auto ac = c; | |
6009 | auto av = v; | |
6010 | auto sumi = ac + av + 'x'; | |
6011 | auto sumf = ac + av + 1.0; | |
6012 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
6013 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
6014 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
6015 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
6016 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
6017 | return (sumf > 0.0) ? sumi : add(c, v); | |
6018 | } | |
6019 | ||
6020 | } | |
6021 | ||
6022 | namespace test_noexcept | |
6023 | { | |
6024 | ||
6025 | int f() { return 0; } | |
6026 | int g() noexcept { return 0; } | |
6027 | ||
6028 | static_assert(noexcept(f()) == false, ""); | |
6029 | static_assert(noexcept(g()) == true, ""); | |
6030 | ||
6031 | } | |
6032 | ||
6033 | namespace test_constexpr | |
6034 | { | |
6035 | ||
6036 | template < typename CharT > | |
6037 | unsigned long constexpr | |
6038 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
6039 | { | |
6040 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6041 | } | |
6042 | ||
6043 | template < typename CharT > | |
6044 | unsigned long constexpr | |
6045 | strlen_c(const CharT *const s) noexcept | |
6046 | { | |
6047 | return strlen_c_r(s, 0UL); | |
6048 | } | |
6049 | ||
6050 | static_assert(strlen_c("") == 0UL, ""); | |
6051 | static_assert(strlen_c("1") == 1UL, ""); | |
6052 | static_assert(strlen_c("example") == 7UL, ""); | |
6053 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6054 | ||
6055 | } | |
6056 | ||
6057 | namespace test_rvalue_references | |
6058 | { | |
6059 | ||
6060 | template < int N > | |
6061 | struct answer | |
6062 | { | |
6063 | static constexpr int value = N; | |
6064 | }; | |
6065 | ||
6066 | answer<1> f(int&) { return answer<1>(); } | |
6067 | answer<2> f(const int&) { return answer<2>(); } | |
6068 | answer<3> f(int&&) { return answer<3>(); } | |
6069 | ||
6070 | void | |
6071 | test() | |
6072 | { | |
6073 | int i = 0; | |
6074 | const int c = 0; | |
6075 | static_assert(decltype(f(i))::value == 1, ""); | |
6076 | static_assert(decltype(f(c))::value == 2, ""); | |
6077 | static_assert(decltype(f(0))::value == 3, ""); | |
6078 | } | |
6079 | ||
6080 | } | |
6081 | ||
6082 | namespace test_uniform_initialization | |
6083 | { | |
6084 | ||
6085 | struct test | |
6086 | { | |
6087 | static const int zero {}; | |
6088 | static const int one {1}; | |
6089 | }; | |
6090 | ||
6091 | static_assert(test::zero == 0, ""); | |
6092 | static_assert(test::one == 1, ""); | |
6093 | ||
6094 | } | |
6095 | ||
6096 | namespace test_lambdas | |
6097 | { | |
6098 | ||
6099 | void | |
6100 | test1() | |
6101 | { | |
6102 | auto lambda1 = [](){}; | |
6103 | auto lambda2 = lambda1; | |
6104 | lambda1(); | |
6105 | lambda2(); | |
6106 | } | |
6107 | ||
6108 | int | |
6109 | test2() | |
6110 | { | |
6111 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6112 | auto b = []() -> int { return '0'; }(); | |
6113 | auto c = [=](){ return a + b; }(); | |
6114 | auto d = [&](){ return c; }(); | |
6115 | auto e = [a, &b](int x) mutable { | |
6116 | const auto identity = [](int y){ return y; }; | |
6117 | for (auto i = 0; i < a; ++i) | |
6118 | a += b--; | |
6119 | return x + identity(a + b); | |
6120 | }(0); | |
6121 | return a + b + c + d + e; | |
6122 | } | |
6123 | ||
6124 | int | |
6125 | test3() | |
6126 | { | |
6127 | const auto nullary = [](){ return 0; }; | |
6128 | const auto unary = [](int x){ return x; }; | |
6129 | using nullary_t = decltype(nullary); | |
6130 | using unary_t = decltype(unary); | |
6131 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6132 | const auto higher2nd = [unary](nullary_t f1){ | |
6133 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6134 | }; | |
6135 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6136 | } | |
6137 | ||
6138 | } | |
6139 | ||
6140 | namespace test_variadic_templates | |
6141 | { | |
6142 | ||
6143 | template <int...> | |
6144 | struct sum; | |
6145 | ||
6146 | template <int N0, int... N1toN> | |
6147 | struct sum<N0, N1toN...> | |
6148 | { | |
6149 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6150 | }; | |
6151 | ||
6152 | template <> | |
6153 | struct sum<> | |
6154 | { | |
6155 | static constexpr auto value = 0; | |
6156 | }; | |
6157 | ||
6158 | static_assert(sum<>::value == 0, ""); | |
6159 | static_assert(sum<1>::value == 1, ""); | |
6160 | static_assert(sum<23>::value == 23, ""); | |
6161 | static_assert(sum<1, 2>::value == 3, ""); | |
6162 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6163 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6164 | ||
6165 | } | |
6166 | ||
6167 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6168 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6169 | // because of this. | |
6170 | namespace test_template_alias_sfinae | |
6171 | { | |
6172 | ||
6173 | struct foo {}; | |
6174 | ||
6175 | template<typename T> | |
6176 | using member = typename T::member_type; | |
6177 | ||
6178 | template<typename T> | |
6179 | void func(...) {} | |
6180 | ||
6181 | template<typename T> | |
6182 | void func(member<T>*) {} | |
6183 | ||
6184 | void test(); | |
6185 | ||
6186 | void test() { func<foo>(0); } | |
6187 | ||
6188 | } | |
6189 | ||
6190 | } // namespace cxx11 | |
6191 | ||
6192 | #endif // __cplusplus >= 201103L | |
6193 | ||
6194 | ||
6195 | ||
6196 | _ACEOF | |
6197 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6198 | ax_cv_cxx_compile_cxx11=yes | |
6199 | else | |
6200 | ax_cv_cxx_compile_cxx11=no | |
6201 | fi | |
6202 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6203 | fi | |
6204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
6205 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
6206 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
6207 | ac_success=yes | |
6208 | fi | |
6209 | ||
6210 | if test x$ac_success = xno; then | |
6211 | for alternative in ${ax_cxx_compile_alternatives}; do | |
6212 | switch="-std=gnu++${alternative}" | |
6213 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
6214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
6215 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
6216 | if eval \${$cachevar+:} false; then : | |
6217 | $as_echo_n "(cached) " >&6 | |
6218 | else | |
6219 | ac_save_CXX="$CXX" | |
6220 | CXX="$CXX $switch" | |
6221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6222 | /* end confdefs.h. */ | |
6223 | ||
6224 | ||
6225 | // If the compiler admits that it is not ready for C++11, why torture it? | |
6226 | // Hopefully, this will speed up the test. | |
6227 | ||
6228 | #ifndef __cplusplus | |
6229 | ||
6230 | #error "This is not a C++ compiler" | |
6231 | ||
6232 | #elif __cplusplus < 201103L | |
6233 | ||
6234 | #error "This is not a C++11 compiler" | |
6235 | ||
6236 | #else | |
6237 | ||
6238 | namespace cxx11 | |
6239 | { | |
6240 | ||
6241 | namespace test_static_assert | |
6242 | { | |
6243 | ||
6244 | template <typename T> | |
6245 | struct check | |
6246 | { | |
6247 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
6248 | }; | |
6249 | ||
6250 | } | |
6251 | ||
6252 | namespace test_final_override | |
6253 | { | |
6254 | ||
6255 | struct Base | |
6256 | { | |
6257 | virtual void f() {} | |
6258 | }; | |
6259 | ||
6260 | struct Derived : public Base | |
6261 | { | |
6262 | virtual void f() override {} | |
6263 | }; | |
6264 | ||
6265 | } | |
6266 | ||
6267 | namespace test_double_right_angle_brackets | |
6268 | { | |
6269 | ||
6270 | template < typename T > | |
6271 | struct check {}; | |
6272 | ||
6273 | typedef check<void> single_type; | |
6274 | typedef check<check<void>> double_type; | |
6275 | typedef check<check<check<void>>> triple_type; | |
6276 | typedef check<check<check<check<void>>>> quadruple_type; | |
6277 | ||
6278 | } | |
6279 | ||
6280 | namespace test_decltype | |
6281 | { | |
6282 | ||
6283 | int | |
6284 | f() | |
6285 | { | |
6286 | int a = 1; | |
6287 | decltype(a) b = 2; | |
6288 | return a + b; | |
6289 | } | |
6290 | ||
6291 | } | |
6292 | ||
6293 | namespace test_type_deduction | |
6294 | { | |
6295 | ||
6296 | template < typename T1, typename T2 > | |
6297 | struct is_same | |
6298 | { | |
6299 | static const bool value = false; | |
6300 | }; | |
6301 | ||
6302 | template < typename T > | |
6303 | struct is_same<T, T> | |
6304 | { | |
6305 | static const bool value = true; | |
6306 | }; | |
6307 | ||
6308 | template < typename T1, typename T2 > | |
6309 | auto | |
6310 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
6311 | { | |
6312 | return a1 + a2; | |
6313 | } | |
6314 | ||
6315 | int | |
6316 | test(const int c, volatile int v) | |
6317 | { | |
6318 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
6319 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
6320 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
6321 | auto ac = c; | |
6322 | auto av = v; | |
6323 | auto sumi = ac + av + 'x'; | |
6324 | auto sumf = ac + av + 1.0; | |
6325 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
6326 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
6327 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
6328 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
6329 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
6330 | return (sumf > 0.0) ? sumi : add(c, v); | |
6331 | } | |
6332 | ||
6333 | } | |
6334 | ||
6335 | namespace test_noexcept | |
6336 | { | |
6337 | ||
6338 | int f() { return 0; } | |
6339 | int g() noexcept { return 0; } | |
6340 | ||
6341 | static_assert(noexcept(f()) == false, ""); | |
6342 | static_assert(noexcept(g()) == true, ""); | |
6343 | ||
6344 | } | |
6345 | ||
6346 | namespace test_constexpr | |
6347 | { | |
6348 | ||
6349 | template < typename CharT > | |
6350 | unsigned long constexpr | |
6351 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
6352 | { | |
6353 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6354 | } | |
6355 | ||
6356 | template < typename CharT > | |
6357 | unsigned long constexpr | |
6358 | strlen_c(const CharT *const s) noexcept | |
6359 | { | |
6360 | return strlen_c_r(s, 0UL); | |
6361 | } | |
6362 | ||
6363 | static_assert(strlen_c("") == 0UL, ""); | |
6364 | static_assert(strlen_c("1") == 1UL, ""); | |
6365 | static_assert(strlen_c("example") == 7UL, ""); | |
6366 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6367 | ||
6368 | } | |
6369 | ||
6370 | namespace test_rvalue_references | |
6371 | { | |
6372 | ||
6373 | template < int N > | |
6374 | struct answer | |
6375 | { | |
6376 | static constexpr int value = N; | |
6377 | }; | |
6378 | ||
6379 | answer<1> f(int&) { return answer<1>(); } | |
6380 | answer<2> f(const int&) { return answer<2>(); } | |
6381 | answer<3> f(int&&) { return answer<3>(); } | |
6382 | ||
6383 | void | |
6384 | test() | |
6385 | { | |
6386 | int i = 0; | |
6387 | const int c = 0; | |
6388 | static_assert(decltype(f(i))::value == 1, ""); | |
6389 | static_assert(decltype(f(c))::value == 2, ""); | |
6390 | static_assert(decltype(f(0))::value == 3, ""); | |
6391 | } | |
6392 | ||
6393 | } | |
6394 | ||
6395 | namespace test_uniform_initialization | |
6396 | { | |
6397 | ||
6398 | struct test | |
6399 | { | |
6400 | static const int zero {}; | |
6401 | static const int one {1}; | |
6402 | }; | |
6403 | ||
6404 | static_assert(test::zero == 0, ""); | |
6405 | static_assert(test::one == 1, ""); | |
6406 | ||
6407 | } | |
6408 | ||
6409 | namespace test_lambdas | |
6410 | { | |
6411 | ||
6412 | void | |
6413 | test1() | |
6414 | { | |
6415 | auto lambda1 = [](){}; | |
6416 | auto lambda2 = lambda1; | |
6417 | lambda1(); | |
6418 | lambda2(); | |
6419 | } | |
6420 | ||
6421 | int | |
6422 | test2() | |
6423 | { | |
6424 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6425 | auto b = []() -> int { return '0'; }(); | |
6426 | auto c = [=](){ return a + b; }(); | |
6427 | auto d = [&](){ return c; }(); | |
6428 | auto e = [a, &b](int x) mutable { | |
6429 | const auto identity = [](int y){ return y; }; | |
6430 | for (auto i = 0; i < a; ++i) | |
6431 | a += b--; | |
6432 | return x + identity(a + b); | |
6433 | }(0); | |
6434 | return a + b + c + d + e; | |
6435 | } | |
6436 | ||
6437 | int | |
6438 | test3() | |
6439 | { | |
6440 | const auto nullary = [](){ return 0; }; | |
6441 | const auto unary = [](int x){ return x; }; | |
6442 | using nullary_t = decltype(nullary); | |
6443 | using unary_t = decltype(unary); | |
6444 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6445 | const auto higher2nd = [unary](nullary_t f1){ | |
6446 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6447 | }; | |
6448 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6449 | } | |
6450 | ||
6451 | } | |
6452 | ||
6453 | namespace test_variadic_templates | |
6454 | { | |
6455 | ||
6456 | template <int...> | |
6457 | struct sum; | |
6458 | ||
6459 | template <int N0, int... N1toN> | |
6460 | struct sum<N0, N1toN...> | |
6461 | { | |
6462 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6463 | }; | |
6464 | ||
6465 | template <> | |
6466 | struct sum<> | |
6467 | { | |
6468 | static constexpr auto value = 0; | |
6469 | }; | |
6470 | ||
6471 | static_assert(sum<>::value == 0, ""); | |
6472 | static_assert(sum<1>::value == 1, ""); | |
6473 | static_assert(sum<23>::value == 23, ""); | |
6474 | static_assert(sum<1, 2>::value == 3, ""); | |
6475 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6476 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6477 | ||
6478 | } | |
6479 | ||
6480 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6481 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6482 | // because of this. | |
6483 | namespace test_template_alias_sfinae | |
6484 | { | |
6485 | ||
6486 | struct foo {}; | |
6487 | ||
6488 | template<typename T> | |
6489 | using member = typename T::member_type; | |
6490 | ||
6491 | template<typename T> | |
6492 | void func(...) {} | |
6493 | ||
6494 | template<typename T> | |
6495 | void func(member<T>*) {} | |
6496 | ||
6497 | void test(); | |
6498 | ||
6499 | void test() { func<foo>(0); } | |
6500 | ||
6501 | } | |
6502 | ||
6503 | } // namespace cxx11 | |
6504 | ||
6505 | #endif // __cplusplus >= 201103L | |
6506 | ||
6507 | ||
6508 | ||
6509 | _ACEOF | |
6510 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6511 | eval $cachevar=yes | |
6512 | else | |
6513 | eval $cachevar=no | |
6514 | fi | |
6515 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6516 | CXX="$ac_save_CXX" | |
6517 | fi | |
6518 | eval ac_res=\$$cachevar | |
6519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6520 | $as_echo "$ac_res" >&6; } | |
6521 | if eval test x\$$cachevar = xyes; then | |
6522 | CXX_DIALECT="$switch" | |
6523 | ac_success=yes | |
6524 | break | |
6525 | fi | |
6526 | done | |
6527 | fi | |
6528 | ||
6529 | if test x$ac_success = xno; then | |
6530 | for alternative in ${ax_cxx_compile_alternatives}; do | |
6531 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
6532 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
6533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
6534 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
6535 | if eval \${$cachevar+:} false; then : | |
6536 | $as_echo_n "(cached) " >&6 | |
6537 | else | |
6538 | ac_save_CXX="$CXX" | |
6539 | CXX="$CXX $switch" | |
6540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6541 | /* end confdefs.h. */ | |
6542 | ||
6543 | ||
6544 | // If the compiler admits that it is not ready for C++11, why torture it? | |
6545 | // Hopefully, this will speed up the test. | |
6546 | ||
6547 | #ifndef __cplusplus | |
6548 | ||
6549 | #error "This is not a C++ compiler" | |
6550 | ||
6551 | #elif __cplusplus < 201103L | |
6552 | ||
6553 | #error "This is not a C++11 compiler" | |
6554 | ||
6555 | #else | |
6556 | ||
6557 | namespace cxx11 | |
6558 | { | |
6559 | ||
6560 | namespace test_static_assert | |
6561 | { | |
6562 | ||
6563 | template <typename T> | |
6564 | struct check | |
6565 | { | |
6566 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
6567 | }; | |
6568 | ||
6569 | } | |
6570 | ||
6571 | namespace test_final_override | |
6572 | { | |
6573 | ||
6574 | struct Base | |
6575 | { | |
6576 | virtual void f() {} | |
6577 | }; | |
6578 | ||
6579 | struct Derived : public Base | |
6580 | { | |
6581 | virtual void f() override {} | |
6582 | }; | |
6583 | ||
6584 | } | |
6585 | ||
6586 | namespace test_double_right_angle_brackets | |
6587 | { | |
6588 | ||
6589 | template < typename T > | |
6590 | struct check {}; | |
6591 | ||
6592 | typedef check<void> single_type; | |
6593 | typedef check<check<void>> double_type; | |
6594 | typedef check<check<check<void>>> triple_type; | |
6595 | typedef check<check<check<check<void>>>> quadruple_type; | |
6596 | ||
6597 | } | |
6598 | ||
6599 | namespace test_decltype | |
6600 | { | |
6601 | ||
6602 | int | |
6603 | f() | |
6604 | { | |
6605 | int a = 1; | |
6606 | decltype(a) b = 2; | |
6607 | return a + b; | |
6608 | } | |
6609 | ||
6610 | } | |
6611 | ||
6612 | namespace test_type_deduction | |
6613 | { | |
6614 | ||
6615 | template < typename T1, typename T2 > | |
6616 | struct is_same | |
6617 | { | |
6618 | static const bool value = false; | |
6619 | }; | |
6620 | ||
6621 | template < typename T > | |
6622 | struct is_same<T, T> | |
6623 | { | |
6624 | static const bool value = true; | |
6625 | }; | |
6626 | ||
6627 | template < typename T1, typename T2 > | |
6628 | auto | |
6629 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
6630 | { | |
6631 | return a1 + a2; | |
6632 | } | |
6633 | ||
6634 | int | |
6635 | test(const int c, volatile int v) | |
6636 | { | |
6637 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
6638 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
6639 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
6640 | auto ac = c; | |
6641 | auto av = v; | |
6642 | auto sumi = ac + av + 'x'; | |
6643 | auto sumf = ac + av + 1.0; | |
6644 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
6645 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
6646 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
6647 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
6648 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
6649 | return (sumf > 0.0) ? sumi : add(c, v); | |
6650 | } | |
6651 | ||
6652 | } | |
6653 | ||
6654 | namespace test_noexcept | |
6655 | { | |
6656 | ||
6657 | int f() { return 0; } | |
6658 | int g() noexcept { return 0; } | |
6659 | ||
6660 | static_assert(noexcept(f()) == false, ""); | |
6661 | static_assert(noexcept(g()) == true, ""); | |
6662 | ||
6663 | } | |
6664 | ||
6665 | namespace test_constexpr | |
6666 | { | |
6667 | ||
6668 | template < typename CharT > | |
6669 | unsigned long constexpr | |
6670 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
6671 | { | |
6672 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6673 | } | |
6674 | ||
6675 | template < typename CharT > | |
6676 | unsigned long constexpr | |
6677 | strlen_c(const CharT *const s) noexcept | |
6678 | { | |
6679 | return strlen_c_r(s, 0UL); | |
6680 | } | |
6681 | ||
6682 | static_assert(strlen_c("") == 0UL, ""); | |
6683 | static_assert(strlen_c("1") == 1UL, ""); | |
6684 | static_assert(strlen_c("example") == 7UL, ""); | |
6685 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6686 | ||
6687 | } | |
6688 | ||
6689 | namespace test_rvalue_references | |
6690 | { | |
6691 | ||
6692 | template < int N > | |
6693 | struct answer | |
6694 | { | |
6695 | static constexpr int value = N; | |
6696 | }; | |
6697 | ||
6698 | answer<1> f(int&) { return answer<1>(); } | |
6699 | answer<2> f(const int&) { return answer<2>(); } | |
6700 | answer<3> f(int&&) { return answer<3>(); } | |
6701 | ||
6702 | void | |
6703 | test() | |
6704 | { | |
6705 | int i = 0; | |
6706 | const int c = 0; | |
6707 | static_assert(decltype(f(i))::value == 1, ""); | |
6708 | static_assert(decltype(f(c))::value == 2, ""); | |
6709 | static_assert(decltype(f(0))::value == 3, ""); | |
6710 | } | |
6711 | ||
6712 | } | |
6713 | ||
6714 | namespace test_uniform_initialization | |
6715 | { | |
6716 | ||
6717 | struct test | |
6718 | { | |
6719 | static const int zero {}; | |
6720 | static const int one {1}; | |
6721 | }; | |
6722 | ||
6723 | static_assert(test::zero == 0, ""); | |
6724 | static_assert(test::one == 1, ""); | |
6725 | ||
6726 | } | |
6727 | ||
6728 | namespace test_lambdas | |
6729 | { | |
6730 | ||
6731 | void | |
6732 | test1() | |
6733 | { | |
6734 | auto lambda1 = [](){}; | |
6735 | auto lambda2 = lambda1; | |
6736 | lambda1(); | |
6737 | lambda2(); | |
6738 | } | |
6739 | ||
6740 | int | |
6741 | test2() | |
6742 | { | |
6743 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6744 | auto b = []() -> int { return '0'; }(); | |
6745 | auto c = [=](){ return a + b; }(); | |
6746 | auto d = [&](){ return c; }(); | |
6747 | auto e = [a, &b](int x) mutable { | |
6748 | const auto identity = [](int y){ return y; }; | |
6749 | for (auto i = 0; i < a; ++i) | |
6750 | a += b--; | |
6751 | return x + identity(a + b); | |
6752 | }(0); | |
6753 | return a + b + c + d + e; | |
6754 | } | |
6755 | ||
6756 | int | |
6757 | test3() | |
6758 | { | |
6759 | const auto nullary = [](){ return 0; }; | |
6760 | const auto unary = [](int x){ return x; }; | |
6761 | using nullary_t = decltype(nullary); | |
6762 | using unary_t = decltype(unary); | |
6763 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6764 | const auto higher2nd = [unary](nullary_t f1){ | |
6765 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6766 | }; | |
6767 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6768 | } | |
6769 | ||
6770 | } | |
6771 | ||
6772 | namespace test_variadic_templates | |
6773 | { | |
6774 | ||
6775 | template <int...> | |
6776 | struct sum; | |
6777 | ||
6778 | template <int N0, int... N1toN> | |
6779 | struct sum<N0, N1toN...> | |
6780 | { | |
6781 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6782 | }; | |
6783 | ||
6784 | template <> | |
6785 | struct sum<> | |
6786 | { | |
6787 | static constexpr auto value = 0; | |
6788 | }; | |
6789 | ||
6790 | static_assert(sum<>::value == 0, ""); | |
6791 | static_assert(sum<1>::value == 1, ""); | |
6792 | static_assert(sum<23>::value == 23, ""); | |
6793 | static_assert(sum<1, 2>::value == 3, ""); | |
6794 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6795 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6796 | ||
6797 | } | |
6798 | ||
6799 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6800 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6801 | // because of this. | |
6802 | namespace test_template_alias_sfinae | |
6803 | { | |
6804 | ||
6805 | struct foo {}; | |
6806 | ||
6807 | template<typename T> | |
6808 | using member = typename T::member_type; | |
6809 | ||
6810 | template<typename T> | |
6811 | void func(...) {} | |
6812 | ||
6813 | template<typename T> | |
6814 | void func(member<T>*) {} | |
6815 | ||
6816 | void test(); | |
6817 | ||
6818 | void test() { func<foo>(0); } | |
6819 | ||
6820 | } | |
6821 | ||
6822 | } // namespace cxx11 | |
6823 | ||
6824 | #endif // __cplusplus >= 201103L | |
6825 | ||
6826 | ||
6827 | ||
6828 | _ACEOF | |
6829 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6830 | eval $cachevar=yes | |
6831 | else | |
6832 | eval $cachevar=no | |
6833 | fi | |
6834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6835 | CXX="$ac_save_CXX" | |
6836 | fi | |
6837 | eval ac_res=\$$cachevar | |
6838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6839 | $as_echo "$ac_res" >&6; } | |
6840 | if eval test x\$$cachevar = xyes; then | |
6841 | CXX_DIALECT="$switch" | |
6842 | ac_success=yes | |
6843 | break | |
6844 | fi | |
6845 | done | |
6846 | if test x$ac_success = xyes; then | |
6847 | break | |
6848 | fi | |
6849 | done | |
6850 | fi | |
6851 | ac_ext=c | |
6852 | ac_cpp='$CPP $CPPFLAGS' | |
6853 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6854 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6855 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6856 | ||
6857 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6858 | if test x$ac_success = xno; then | |
6859 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 | |
6860 | fi | |
6861 | fi | |
6862 | if test x$ac_success = xno; then | |
6863 | HAVE_CXX11=0 | |
6864 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6865 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6866 | else | |
6867 | HAVE_CXX11=1 | |
6868 | ||
6869 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6870 | ||
6871 | fi | |
6872 | ||
6873 | ||
6874 | ||
6875 | ||
6876 | # If we haven't got the data from the intl directory, | |
6877 | # assume NLS is disabled. | |
6878 | USE_NLS=no | |
6879 | LIBINTL= | |
6880 | LIBINTL_DEP= | |
6881 | INCINTL= | |
6882 | XGETTEXT= | |
6883 | GMSGFMT= | |
6884 | POSUB= | |
6885 | ||
6886 | if test -f ../intl/config.intl; then | |
6887 | . ../intl/config.intl | |
6888 | fi | |
6889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 | |
6890 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
6891 | if test x"$USE_NLS" != xyes; then | |
6892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6893 | $as_echo "no" >&6; } | |
6894 | else | |
6895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6896 | $as_echo "yes" >&6; } | |
6897 | ||
6898 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h | |
6899 | ||
6900 | ||
6901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 | |
6902 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
6903 | # Look for .po and .gmo files in the source directory. | |
6904 | CATALOGS= | |
6905 | XLINGUAS= | |
6906 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6907 | # If there aren't any .gmo files the shell will give us the | |
6908 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6909 | # weeded out. | |
6910 | case "$cat" in *\**) | |
6911 | continue;; | |
6912 | esac | |
6913 | # The quadruple backslash is collapsed to a double backslash | |
6914 | # by the backticks, then collapsed again by the double quotes, | |
6915 | # leaving us with one backslash in the sed expression (right | |
6916 | # before the dot that mustn't act as a wildcard). | |
6917 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
6918 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6919 | # The user is allowed to set LINGUAS to a list of languages to | |
6920 | # install catalogs for. If it's empty that means "all of them." | |
6921 | if test "x$LINGUAS" = x; then | |
6922 | CATALOGS="$CATALOGS $cat" | |
6923 | XLINGUAS="$XLINGUAS $lang" | |
6924 | else | |
6925 | case "$LINGUAS" in *$lang*) | |
6926 | CATALOGS="$CATALOGS $cat" | |
6927 | XLINGUAS="$XLINGUAS $lang" | |
6928 | ;; | |
6929 | esac | |
6930 | fi | |
6931 | done | |
6932 | LINGUAS="$XLINGUAS" | |
6933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6934 | $as_echo "$LINGUAS" >&6; } | |
6935 | ||
6936 | ||
6937 | DATADIRNAME=share | |
6938 | ||
6939 | INSTOBJEXT=.mo | |
6940 | ||
6941 | GENCAT=gencat | |
6942 | ||
6943 | CATOBJEXT=.gmo | |
6944 | ||
6945 | fi | |
6946 | ||
6947 | ||
6948 | # Check for presence and size of long long. | |
6949 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
6950 | if test "x$ac_cv_type_long_long" = xyes; then : | |
6951 | ||
6952 | cat >>confdefs.h <<_ACEOF | |
6953 | #define HAVE_LONG_LONG 1 | |
6954 | _ACEOF | |
6955 | ||
6956 | # The cast to long int works around a bug in the HP C Compiler | |
6957 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6958 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6959 | # This bug is HP SR number 8606223364. | |
6960 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
6961 | $as_echo_n "checking size of long long... " >&6; } | |
6962 | if ${ac_cv_sizeof_long_long+:} false; then : | |
6963 | $as_echo_n "(cached) " >&6 | |
6964 | else | |
6965 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
6966 | ||
6967 | else | |
6968 | if test "$ac_cv_type_long_long" = yes; then | |
6969 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6970 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6971 | as_fn_error 77 "cannot compute sizeof (long long) | |
6972 | See \`config.log' for more details" "$LINENO" 5; } | |
6973 | else | |
6974 | ac_cv_sizeof_long_long=0 | |
6975 | fi | |
6976 | fi | |
6977 | ||
6978 | fi | |
6979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
6980 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
6981 | ||
6982 | ||
6983 | ||
6984 | cat >>confdefs.h <<_ACEOF | |
6985 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
6986 | _ACEOF | |
6987 | ||
6988 | ||
6989 | fi | |
6990 | ||
6991 | ||
6992 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` | |
6993 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
6994 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
6995 | ac_have_decl=1 | |
6996 | else | |
6997 | ac_have_decl=0 | |
6998 | fi | |
6999 | ||
7000 | cat >>confdefs.h <<_ACEOF | |
7001 | #define HAVE_DECL_BASENAME $ac_have_decl | |
7002 | _ACEOF | |
7003 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
7004 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
7005 | ac_have_decl=1 | |
7006 | else | |
7007 | ac_have_decl=0 | |
7008 | fi | |
7009 | ||
7010 | cat >>confdefs.h <<_ACEOF | |
7011 | #define HAVE_DECL_FFS $ac_have_decl | |
7012 | _ACEOF | |
7013 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
7014 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
7015 | ac_have_decl=1 | |
7016 | else | |
7017 | ac_have_decl=0 | |
7018 | fi | |
7019 | ||
7020 | cat >>confdefs.h <<_ACEOF | |
7021 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
7022 | _ACEOF | |
7023 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
7024 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
7025 | ac_have_decl=1 | |
7026 | else | |
7027 | ac_have_decl=0 | |
7028 | fi | |
7029 | ||
7030 | cat >>confdefs.h <<_ACEOF | |
7031 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
7032 | _ACEOF | |
7033 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
7034 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
7035 | ac_have_decl=1 | |
7036 | else | |
7037 | ac_have_decl=0 | |
7038 | fi | |
7039 | ||
7040 | cat >>confdefs.h <<_ACEOF | |
7041 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
7042 | _ACEOF | |
7043 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
7044 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
7045 | ac_have_decl=1 | |
7046 | else | |
7047 | ac_have_decl=0 | |
7048 | fi | |
7049 | ||
7050 | cat >>confdefs.h <<_ACEOF | |
7051 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
7052 | _ACEOF | |
7053 | ||
7054 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
7055 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
7056 | ac_have_decl=1 | |
7057 | else | |
7058 | ac_have_decl=0 | |
7059 | fi | |
7060 | ||
7061 | cat >>confdefs.h <<_ACEOF | |
7062 | #define HAVE_DECL_STRTOL $ac_have_decl | |
7063 | _ACEOF | |
7064 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
7065 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
7066 | ac_have_decl=1 | |
7067 | else | |
7068 | ac_have_decl=0 | |
7069 | fi | |
7070 | ||
7071 | cat >>confdefs.h <<_ACEOF | |
7072 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
7073 | _ACEOF | |
7074 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
7075 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
7076 | ac_have_decl=1 | |
7077 | else | |
7078 | ac_have_decl=0 | |
7079 | fi | |
7080 | ||
7081 | cat >>confdefs.h <<_ACEOF | |
7082 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
7083 | _ACEOF | |
7084 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
7085 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
7086 | ac_have_decl=1 | |
7087 | else | |
7088 | ac_have_decl=0 | |
7089 | fi | |
7090 | ||
7091 | cat >>confdefs.h <<_ACEOF | |
7092 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
7093 | _ACEOF | |
7094 | ||
7095 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
7096 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
7097 | ac_have_decl=1 | |
7098 | else | |
7099 | ac_have_decl=0 | |
7100 | fi | |
7101 | ||
7102 | cat >>confdefs.h <<_ACEOF | |
7103 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
7104 | _ACEOF | |
7105 | ||
7106 | ||
7107 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
7108 | if test "x$ac_cv_type_size_t" = xyes; then : | |
7109 | ||
7110 | else | |
7111 | ||
7112 | cat >>confdefs.h <<_ACEOF | |
7113 | #define size_t unsigned int | |
7114 | _ACEOF | |
7115 | ||
7116 | fi | |
7117 | ||
05ea2a05 TT |
7118 | |
7119 | ||
7120 | ||
7121 | for ac_header in $ac_header_list | |
7122 | do : | |
7123 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7124 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
7125 | " | |
7126 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7127 | cat >>confdefs.h <<_ACEOF | |
7128 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7129 | _ACEOF | |
7130 | ||
7131 | fi | |
7132 | ||
7133 | done | |
7134 | ||
7135 | ||
7136 | ||
7137 | ||
7138 | ||
7139 | ||
7140 | ||
7141 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
7142 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
7143 | ||
7144 | else | |
7145 | ||
7146 | cat >>confdefs.h <<_ACEOF | |
7147 | #define pid_t int | |
7148 | _ACEOF | |
7149 | ||
7150 | fi | |
7151 | ||
01027315 TT |
7152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
7153 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
7154 | if ${ac_cv_path_SED+:} false; then : | |
7155 | $as_echo_n "(cached) " >&6 | |
7156 | else | |
7157 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
7158 | for ac_i in 1 2 3 4 5 6 7; do | |
7159 | ac_script="$ac_script$as_nl$ac_script" | |
7160 | done | |
7161 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
7162 | { ac_script=; unset ac_script;} | |
7163 | if test -z "$SED"; then | |
7164 | ac_path_SED_found=false | |
7165 | # Loop through the user's path and test for each of PROGNAME-LIST | |
7166 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7167 | for as_dir in $PATH | |
7168 | do | |
7169 | IFS=$as_save_IFS | |
7170 | test -z "$as_dir" && as_dir=. | |
7171 | for ac_prog in sed gsed; do | |
7172 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7173 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
7174 | as_fn_executable_p "$ac_path_SED" || continue | |
7175 | # Check for GNU ac_path_SED and select it if it is found. | |
7176 | # Check for GNU $ac_path_SED | |
7177 | case `"$ac_path_SED" --version 2>&1` in | |
7178 | *GNU*) | |
7179 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
7180 | *) | |
7181 | ac_count=0 | |
7182 | $as_echo_n 0123456789 >"conftest.in" | |
7183 | while : | |
7184 | do | |
7185 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
7186 | mv "conftest.tmp" "conftest.in" | |
7187 | cp "conftest.in" "conftest.nl" | |
7188 | $as_echo '' >> "conftest.nl" | |
7189 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
7190 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
7191 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
7192 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
7193 | # Best one so far, save it but keep looking for a better one | |
7194 | ac_cv_path_SED="$ac_path_SED" | |
7195 | ac_path_SED_max=$ac_count | |
7196 | fi | |
7197 | # 10*(2^10) chars as input seems more than enough | |
7198 | test $ac_count -gt 10 && break | |
7199 | done | |
7200 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
7201 | esac | |
7202 | ||
7203 | $ac_path_SED_found && break 3 | |
7204 | done | |
7205 | done | |
7206 | done | |
7207 | IFS=$as_save_IFS | |
7208 | if test -z "$ac_cv_path_SED"; then | |
7209 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
7210 | fi | |
7211 | else | |
7212 | ac_cv_path_SED=$SED | |
7213 | fi | |
7214 | ||
7215 | fi | |
7216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
7217 | $as_echo "$ac_cv_path_SED" >&6; } | |
7218 | SED="$ac_cv_path_SED" | |
7219 | rm -f conftest.sed | |
7220 | ||
7221 | ||
05ea2a05 TT |
7222 | if test "X$prefix" = "XNONE"; then |
7223 | acl_final_prefix="$ac_default_prefix" | |
7224 | else | |
7225 | acl_final_prefix="$prefix" | |
7226 | fi | |
7227 | if test "X$exec_prefix" = "XNONE"; then | |
7228 | acl_final_exec_prefix='${prefix}' | |
7229 | else | |
7230 | acl_final_exec_prefix="$exec_prefix" | |
7231 | fi | |
7232 | acl_save_prefix="$prefix" | |
7233 | prefix="$acl_final_prefix" | |
7234 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7235 | prefix="$acl_save_prefix" | |
7236 | ||
7237 | ||
7238 | # Check whether --with-gnu-ld was given. | |
7239 | if test "${with_gnu_ld+set}" = set; then : | |
7240 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
7241 | else | |
7242 | with_gnu_ld=no | |
7243 | fi | |
7244 | ||
7245 | # Prepare PATH_SEPARATOR. | |
7246 | # The user is always right. | |
7247 | if test "${PATH_SEPARATOR+set}" != set; then | |
7248 | echo "#! /bin/sh" >conf$$.sh | |
7249 | echo "exit 0" >>conf$$.sh | |
7250 | chmod +x conf$$.sh | |
7251 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7252 | PATH_SEPARATOR=';' | |
7253 | else | |
7254 | PATH_SEPARATOR=: | |
7255 | fi | |
7256 | rm -f conf$$.sh | |
7257 | fi | |
7258 | ac_prog=ld | |
7259 | if test "$GCC" = yes; then | |
7260 | # Check if gcc -print-prog-name=ld gives a path. | |
7261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
7262 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
7263 | case $host in | |
7264 | *-*-mingw*) | |
7265 | # gcc leaves a trailing carriage return which upsets mingw | |
7266 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7267 | *) | |
7268 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7269 | esac | |
7270 | case $ac_prog in | |
7271 | # Accept absolute paths. | |
7272 | [\\/]* | [A-Za-z]:[\\/]*) | |
7273 | re_direlt='/[^/][^/]*/\.\./' | |
7274 | # Canonicalize the path of ld | |
7275 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7276 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7277 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7278 | done | |
7279 | test -z "$LD" && LD="$ac_prog" | |
7280 | ;; | |
7281 | "") | |
7282 | # If it fails, then pretend we aren't using GCC. | |
7283 | ac_prog=ld | |
7284 | ;; | |
7285 | *) | |
7286 | # If it is relative, then search for the first ld in PATH. | |
7287 | with_gnu_ld=unknown | |
7288 | ;; | |
7289 | esac | |
7290 | elif test "$with_gnu_ld" = yes; then | |
7291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
7292 | $as_echo_n "checking for GNU ld... " >&6; } | |
7293 | else | |
7294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
7295 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
7296 | fi | |
7297 | if ${acl_cv_path_LD+:} false; then : | |
7298 | $as_echo_n "(cached) " >&6 | |
7299 | else | |
7300 | if test -z "$LD"; then | |
7301 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7302 | for ac_dir in $PATH; do | |
7303 | test -z "$ac_dir" && ac_dir=. | |
7304 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7305 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7306 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7307 | # but apparently some GNU ld's only accept -v. | |
7308 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7309 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7310 | test "$with_gnu_ld" != no && break | |
7311 | else | |
7312 | test "$with_gnu_ld" != yes && break | |
7313 | fi | |
7314 | fi | |
7315 | done | |
7316 | IFS="$ac_save_ifs" | |
7317 | else | |
7318 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7319 | fi | |
7320 | fi | |
7321 | ||
7322 | LD="$acl_cv_path_LD" | |
7323 | if test -n "$LD"; then | |
7324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
7325 | $as_echo "$LD" >&6; } | |
7326 | else | |
7327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7328 | $as_echo "no" >&6; } | |
7329 | fi | |
7330 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
7331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7332 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7333 | if ${acl_cv_prog_gnu_ld+:} false; then : | |
7334 | $as_echo_n "(cached) " >&6 | |
7335 | else | |
7336 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7337 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7338 | acl_cv_prog_gnu_ld=yes | |
7339 | else | |
7340 | acl_cv_prog_gnu_ld=no | |
7341 | fi | |
7342 | fi | |
7343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
7344 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
7345 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
7346 | ||
7347 | ||
7348 | ||
7349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
7350 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7351 | if ${acl_cv_rpath+:} false; then : | |
7352 | $as_echo_n "(cached) " >&6 | |
7353 | else | |
7354 | ||
7355 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7356 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7357 | . ./conftest.sh | |
7358 | rm -f ./conftest.sh | |
7359 | acl_cv_rpath=done | |
7360 | ||
7361 | fi | |
7362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
7363 | $as_echo "$acl_cv_rpath" >&6; } | |
7364 | wl="$acl_cv_wl" | |
7365 | libext="$acl_cv_libext" | |
7366 | shlibext="$acl_cv_shlibext" | |
7367 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7368 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7369 | hardcode_direct="$acl_cv_hardcode_direct" | |
7370 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
7371 | # Check whether --enable-rpath was given. | |
7372 | if test "${enable_rpath+set}" = set; then : | |
7373 | enableval=$enable_rpath; : | |
7374 | else | |
7375 | enable_rpath=yes | |
7376 | fi | |
7377 | ||
7378 | ||
7379 | ||
db6878ac SM |
7380 | # Set the 'development' global. |
7381 | . $srcdir/../bfd/development.sh | |
7382 | ||
01027315 TT |
7383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
7384 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
7385 | if ${ac_cv_header_stdc+:} false; then : | |
7386 | $as_echo_n "(cached) " >&6 | |
7387 | else | |
7388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7389 | /* end confdefs.h. */ | |
7390 | #include <stdlib.h> | |
7391 | #include <stdarg.h> | |
7392 | #include <string.h> | |
7393 | #include <float.h> | |
7394 | ||
7395 | int | |
7396 | main () | |
7397 | { | |
7398 | ||
7399 | ; | |
7400 | return 0; | |
7401 | } | |
7402 | _ACEOF | |
7403 | if ac_fn_c_try_compile "$LINENO"; then : | |
7404 | ac_cv_header_stdc=yes | |
7405 | else | |
7406 | ac_cv_header_stdc=no | |
7407 | fi | |
7408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7409 | ||
7410 | if test $ac_cv_header_stdc = yes; then | |
7411 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
7412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7413 | /* end confdefs.h. */ | |
7414 | #include <string.h> | |
7415 | ||
7416 | _ACEOF | |
7417 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7418 | $EGREP "memchr" >/dev/null 2>&1; then : | |
7419 | ||
7420 | else | |
7421 | ac_cv_header_stdc=no | |
7422 | fi | |
7423 | rm -f conftest* | |
7424 | ||
7425 | fi | |
7426 | ||
7427 | if test $ac_cv_header_stdc = yes; then | |
7428 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
7429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7430 | /* end confdefs.h. */ | |
7431 | #include <stdlib.h> | |
7432 | ||
7433 | _ACEOF | |
7434 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7435 | $EGREP "free" >/dev/null 2>&1; then : | |
7436 | ||
7437 | else | |
7438 | ac_cv_header_stdc=no | |
7439 | fi | |
7440 | rm -f conftest* | |
7441 | ||
7442 | fi | |
7443 | ||
7444 | if test $ac_cv_header_stdc = yes; then | |
7445 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
7446 | if test "$cross_compiling" = yes; then : | |
7447 | : | |
7448 | else | |
7449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7450 | /* end confdefs.h. */ | |
7451 | #include <ctype.h> | |
7452 | #include <stdlib.h> | |
7453 | #if ((' ' & 0x0FF) == 0x020) | |
7454 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7455 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7456 | #else | |
7457 | # define ISLOWER(c) \ | |
7458 | (('a' <= (c) && (c) <= 'i') \ | |
7459 | || ('j' <= (c) && (c) <= 'r') \ | |
7460 | || ('s' <= (c) && (c) <= 'z')) | |
7461 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7462 | #endif | |
7463 | ||
7464 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7465 | int | |
7466 | main () | |
7467 | { | |
7468 | int i; | |
7469 | for (i = 0; i < 256; i++) | |
7470 | if (XOR (islower (i), ISLOWER (i)) | |
7471 | || toupper (i) != TOUPPER (i)) | |
7472 | return 2; | |
7473 | return 0; | |
7474 | } | |
7475 | _ACEOF | |
7476 | if ac_fn_c_try_run "$LINENO"; then : | |
7477 | ||
7478 | else | |
7479 | ac_cv_header_stdc=no | |
7480 | fi | |
7481 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7482 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7483 | fi | |
7484 | ||
7485 | fi | |
7486 | fi | |
7487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
7488 | $as_echo "$ac_cv_header_stdc" >&6; } | |
7489 | if test $ac_cv_header_stdc = yes; then | |
7490 | ||
7491 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
7492 | ||
7493 | fi | |
7494 | ||
7495 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
7496 | # for constant arguments. Useless! | |
7497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
7498 | $as_echo_n "checking for working alloca.h... " >&6; } | |
7499 | if ${ac_cv_working_alloca_h+:} false; then : | |
7500 | $as_echo_n "(cached) " >&6 | |
7501 | else | |
7502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7503 | /* end confdefs.h. */ | |
7504 | #include <alloca.h> | |
7505 | int | |
7506 | main () | |
7507 | { | |
7508 | char *p = (char *) alloca (2 * sizeof (int)); | |
7509 | if (p) return 0; | |
7510 | ; | |
7511 | return 0; | |
7512 | } | |
7513 | _ACEOF | |
7514 | if ac_fn_c_try_link "$LINENO"; then : | |
7515 | ac_cv_working_alloca_h=yes | |
7516 | else | |
7517 | ac_cv_working_alloca_h=no | |
7518 | fi | |
7519 | rm -f core conftest.err conftest.$ac_objext \ | |
7520 | conftest$ac_exeext conftest.$ac_ext | |
7521 | fi | |
7522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
7523 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
7524 | if test $ac_cv_working_alloca_h = yes; then | |
7525 | ||
7526 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7527 | ||
7528 | fi | |
7529 | ||
7530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
7531 | $as_echo_n "checking for alloca... " >&6; } | |
7532 | if ${ac_cv_func_alloca_works+:} false; then : | |
7533 | $as_echo_n "(cached) " >&6 | |
7534 | else | |
7535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7536 | /* end confdefs.h. */ | |
7537 | #ifdef __GNUC__ | |
7538 | # define alloca __builtin_alloca | |
7539 | #else | |
7540 | # ifdef _MSC_VER | |
7541 | # include <malloc.h> | |
7542 | # define alloca _alloca | |
7543 | # else | |
7544 | # ifdef HAVE_ALLOCA_H | |
7545 | # include <alloca.h> | |
7546 | # else | |
7547 | # ifdef _AIX | |
7548 | #pragma alloca | |
7549 | # else | |
7550 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
7551 | void *alloca (size_t); | |
7552 | # endif | |
7553 | # endif | |
7554 | # endif | |
7555 | # endif | |
7556 | #endif | |
7557 | ||
7558 | int | |
7559 | main () | |
7560 | { | |
7561 | char *p = (char *) alloca (1); | |
7562 | if (p) return 0; | |
7563 | ; | |
7564 | return 0; | |
7565 | } | |
7566 | _ACEOF | |
7567 | if ac_fn_c_try_link "$LINENO"; then : | |
7568 | ac_cv_func_alloca_works=yes | |
7569 | else | |
7570 | ac_cv_func_alloca_works=no | |
7571 | fi | |
7572 | rm -f core conftest.err conftest.$ac_objext \ | |
7573 | conftest$ac_exeext conftest.$ac_ext | |
7574 | fi | |
7575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
7576 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
7577 | ||
7578 | if test $ac_cv_func_alloca_works = yes; then | |
7579 | ||
7580 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
7581 | ||
7582 | else | |
7583 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
7584 | # that cause trouble. Some versions do not even contain alloca or | |
7585 | # contain a buggy version. If you still want to use their alloca, | |
7586 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
7587 | ||
7588 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
7589 | ||
7590 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
7591 | ||
7592 | ||
7593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
7594 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
7595 | if ${ac_cv_os_cray+:} false; then : | |
7596 | $as_echo_n "(cached) " >&6 | |
7597 | else | |
7598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7599 | /* end confdefs.h. */ | |
7600 | #if defined CRAY && ! defined CRAY2 | |
7601 | webecray | |
7602 | #else | |
7603 | wenotbecray | |
7604 | #endif | |
7605 | ||
7606 | _ACEOF | |
7607 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7608 | $EGREP "webecray" >/dev/null 2>&1; then : | |
7609 | ac_cv_os_cray=yes | |
7610 | else | |
7611 | ac_cv_os_cray=no | |
7612 | fi | |
7613 | rm -f conftest* | |
7614 | ||
7615 | fi | |
7616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
7617 | $as_echo "$ac_cv_os_cray" >&6; } | |
7618 | if test $ac_cv_os_cray = yes; then | |
7619 | for ac_func in _getb67 GETB67 getb67; do | |
7620 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7621 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7622 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7623 | ||
7624 | cat >>confdefs.h <<_ACEOF | |
7625 | #define CRAY_STACKSEG_END $ac_func | |
7626 | _ACEOF | |
7627 | ||
7628 | break | |
7629 | fi | |
7630 | ||
7631 | done | |
7632 | fi | |
7633 | ||
7634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
7635 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
7636 | if ${ac_cv_c_stack_direction+:} false; then : | |
7637 | $as_echo_n "(cached) " >&6 | |
7638 | else | |
7639 | if test "$cross_compiling" = yes; then : | |
7640 | ac_cv_c_stack_direction=0 | |
7641 | else | |
7642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7643 | /* end confdefs.h. */ | |
7644 | $ac_includes_default | |
7645 | int | |
7646 | find_stack_direction (int *addr, int depth) | |
7647 | { | |
7648 | int dir, dummy = 0; | |
7649 | if (! addr) | |
7650 | addr = &dummy; | |
7651 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
7652 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
7653 | return dir + dummy; | |
7654 | } | |
7655 | ||
7656 | int | |
7657 | main (int argc, char **argv) | |
7658 | { | |
7659 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
7660 | } | |
7661 | _ACEOF | |
7662 | if ac_fn_c_try_run "$LINENO"; then : | |
7663 | ac_cv_c_stack_direction=1 | |
7664 | else | |
7665 | ac_cv_c_stack_direction=-1 | |
7666 | fi | |
7667 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7668 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7669 | fi | |
7670 | ||
7671 | fi | |
7672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
7673 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
7674 | cat >>confdefs.h <<_ACEOF | |
7675 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
7676 | _ACEOF | |
7677 | ||
7678 | ||
7679 | fi | |
7680 | ||
7681 | ||
7682 | WIN32APILIBS= | |
7683 | case ${host} in | |
7684 | *mingw32*) | |
7685 | ||
7686 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
7687 | ||
7688 | WIN32APILIBS="-lws2_32" | |
7689 | ;; | |
7690 | esac | |
7691 | ||
7692 | ||
7693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
7694 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
7695 | if ${am_cv_langinfo_codeset+:} false; then : | |
7696 | $as_echo_n "(cached) " >&6 | |
7697 | else | |
7698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7699 | /* end confdefs.h. */ | |
7700 | #include <langinfo.h> | |
7701 | int | |
7702 | main () | |
7703 | { | |
7704 | char* cs = nl_langinfo(CODESET); | |
7705 | ; | |
7706 | return 0; | |
7707 | } | |
7708 | _ACEOF | |
7709 | if ac_fn_c_try_link "$LINENO"; then : | |
7710 | am_cv_langinfo_codeset=yes | |
7711 | else | |
7712 | am_cv_langinfo_codeset=no | |
7713 | fi | |
7714 | rm -f core conftest.err conftest.$ac_objext \ | |
7715 | conftest$ac_exeext conftest.$ac_ext | |
7716 | ||
7717 | fi | |
7718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
7719 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
7720 | if test $am_cv_langinfo_codeset = yes; then | |
7721 | ||
7722 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
7723 | ||
7724 | fi | |
7725 | ||
7726 | ||
c8693053 | 7727 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h |
01027315 TT |
7728 | do : |
7729 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7730 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
7731 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7732 | cat >>confdefs.h <<_ACEOF | |
7733 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7734 | _ACEOF | |
7735 | ||
7736 | fi | |
7737 | ||
7738 | done | |
7739 | ||
7740 | ||
05ea2a05 TT |
7741 | |
7742 | for ac_func in getpagesize | |
01027315 | 7743 | do : |
05ea2a05 TT |
7744 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
7745 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
01027315 | 7746 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 7747 | #define HAVE_GETPAGESIZE 1 |
01027315 TT |
7748 | _ACEOF |
7749 | ||
7750 | fi | |
7751 | done | |
7752 | ||
05ea2a05 TT |
7753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
7754 | $as_echo_n "checking for working mmap... " >&6; } | |
7755 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
7756 | $as_echo_n "(cached) " >&6 | |
01027315 | 7757 | else |
05ea2a05 TT |
7758 | if test "$cross_compiling" = yes; then : |
7759 | ac_cv_func_mmap_fixed_mapped=no | |
7760 | else | |
7761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7762 | /* end confdefs.h. */ | |
7763 | $ac_includes_default | |
7764 | /* malloc might have been renamed as rpl_malloc. */ | |
7765 | #undef malloc | |
7766 | ||
7767 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
7768 | Here is a matrix of mmap possibilities: | |
7769 | mmap private not fixed | |
7770 | mmap private fixed at somewhere currently unmapped | |
7771 | mmap private fixed at somewhere already mapped | |
7772 | mmap shared not fixed | |
7773 | mmap shared fixed at somewhere currently unmapped | |
7774 | mmap shared fixed at somewhere already mapped | |
7775 | For private mappings, we should verify that changes cannot be read() | |
7776 | back from the file, nor mmap's back from the file at a different | |
7777 | address. (There have been systems where private was not correctly | |
7778 | implemented like the infamous i386 svr4.0, and systems where the | |
7779 | VM page cache was not coherent with the file system buffer cache | |
7780 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7781 | For shared mappings, we should conversely verify that changes get | |
7782 | propagated back to all the places they're supposed to be. | |
7783 | ||
7784 | Grep wants private fixed already mapped. | |
7785 | The main things grep needs to know about mmap are: | |
7786 | * does it exist and is it safe to write into the mmap'd area | |
7787 | * how to use it (BSD variants) */ | |
7788 | ||
7789 | #include <fcntl.h> | |
7790 | #include <sys/mman.h> | |
7791 | ||
7792 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
7793 | char *malloc (); | |
7794 | #endif | |
01027315 | 7795 | |
05ea2a05 TT |
7796 | /* This mess was copied from the GNU getpagesize.h. */ |
7797 | #ifndef HAVE_GETPAGESIZE | |
7798 | # ifdef _SC_PAGESIZE | |
7799 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7800 | # else /* no _SC_PAGESIZE */ | |
7801 | # ifdef HAVE_SYS_PARAM_H | |
7802 | # include <sys/param.h> | |
7803 | # ifdef EXEC_PAGESIZE | |
7804 | # define getpagesize() EXEC_PAGESIZE | |
7805 | # else /* no EXEC_PAGESIZE */ | |
7806 | # ifdef NBPG | |
7807 | # define getpagesize() NBPG * CLSIZE | |
7808 | # ifndef CLSIZE | |
7809 | # define CLSIZE 1 | |
7810 | # endif /* no CLSIZE */ | |
7811 | # else /* no NBPG */ | |
7812 | # ifdef NBPC | |
7813 | # define getpagesize() NBPC | |
7814 | # else /* no NBPC */ | |
7815 | # ifdef PAGESIZE | |
7816 | # define getpagesize() PAGESIZE | |
7817 | # endif /* PAGESIZE */ | |
7818 | # endif /* no NBPC */ | |
7819 | # endif /* no NBPG */ | |
7820 | # endif /* no EXEC_PAGESIZE */ | |
7821 | # else /* no HAVE_SYS_PARAM_H */ | |
7822 | # define getpagesize() 8192 /* punt totally */ | |
7823 | # endif /* no HAVE_SYS_PARAM_H */ | |
7824 | # endif /* no _SC_PAGESIZE */ | |
7825 | ||
7826 | #endif /* no HAVE_GETPAGESIZE */ | |
01027315 | 7827 | |
05ea2a05 TT |
7828 | int |
7829 | main () | |
7830 | { | |
7831 | char *data, *data2, *data3; | |
7832 | const char *cdata2; | |
7833 | int i, pagesize; | |
7834 | int fd, fd2; | |
01027315 | 7835 | |
05ea2a05 | 7836 | pagesize = getpagesize (); |
01027315 | 7837 | |
05ea2a05 TT |
7838 | /* First, make a file with some known garbage in it. */ |
7839 | data = (char *) malloc (pagesize); | |
7840 | if (!data) | |
7841 | return 1; | |
7842 | for (i = 0; i < pagesize; ++i) | |
7843 | *(data + i) = rand (); | |
7844 | umask (0); | |
7845 | fd = creat ("conftest.mmap", 0600); | |
7846 | if (fd < 0) | |
7847 | return 2; | |
7848 | if (write (fd, data, pagesize) != pagesize) | |
7849 | return 3; | |
7850 | close (fd); | |
7851 | ||
7852 | /* Next, check that the tail of a page is zero-filled. File must have | |
7853 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7854 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7855 | if (fd2 < 0) | |
7856 | return 4; | |
7857 | cdata2 = ""; | |
7858 | if (write (fd2, cdata2, 1) != 1) | |
7859 | return 5; | |
7860 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
7861 | if (data2 == MAP_FAILED) | |
7862 | return 6; | |
7863 | for (i = 0; i < pagesize; ++i) | |
7864 | if (*(data2 + i)) | |
7865 | return 7; | |
7866 | close (fd2); | |
7867 | if (munmap (data2, pagesize)) | |
7868 | return 8; | |
7869 | ||
7870 | /* Next, try to mmap the file at a fixed address which already has | |
7871 | something else allocated at it. If we can, also make sure that | |
7872 | we see the same garbage. */ | |
7873 | fd = open ("conftest.mmap", O_RDWR); | |
7874 | if (fd < 0) | |
7875 | return 9; | |
7876 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
7877 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
7878 | return 10; | |
7879 | for (i = 0; i < pagesize; ++i) | |
7880 | if (*(data + i) != *(data2 + i)) | |
7881 | return 11; | |
7882 | ||
7883 | /* Finally, make sure that changes to the mapped area do not | |
7884 | percolate back to the file as seen by read(). (This is a bug on | |
7885 | some variants of i386 svr4.0.) */ | |
7886 | for (i = 0; i < pagesize; ++i) | |
7887 | *(data2 + i) = *(data2 + i) + 1; | |
7888 | data3 = (char *) malloc (pagesize); | |
7889 | if (!data3) | |
7890 | return 12; | |
7891 | if (read (fd, data3, pagesize) != pagesize) | |
7892 | return 13; | |
7893 | for (i = 0; i < pagesize; ++i) | |
7894 | if (*(data + i) != *(data3 + i)) | |
7895 | return 14; | |
7896 | close (fd); | |
7897 | return 0; | |
7898 | } | |
7899 | _ACEOF | |
7900 | if ac_fn_c_try_run "$LINENO"; then : | |
7901 | ac_cv_func_mmap_fixed_mapped=yes | |
7902 | else | |
7903 | ac_cv_func_mmap_fixed_mapped=no | |
7904 | fi | |
7905 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7906 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7907 | fi | |
01027315 | 7908 | |
05ea2a05 TT |
7909 | fi |
7910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
7911 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
7912 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
01027315 | 7913 | |
05ea2a05 | 7914 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
01027315 | 7915 | |
05ea2a05 TT |
7916 | fi |
7917 | rm -f conftest.mmap conftest.txt | |
01027315 | 7918 | |
05ea2a05 TT |
7919 | for ac_header in vfork.h |
7920 | do : | |
7921 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
7922 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
7923 | cat >>confdefs.h <<_ACEOF | |
7924 | #define HAVE_VFORK_H 1 | |
7925 | _ACEOF | |
01027315 | 7926 | |
05ea2a05 | 7927 | fi |
01027315 | 7928 | |
05ea2a05 TT |
7929 | done |
7930 | ||
7931 | for ac_func in fork vfork | |
7932 | do : | |
7933 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7934 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7935 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7936 | cat >>confdefs.h <<_ACEOF | |
7937 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7938 | _ACEOF | |
01027315 | 7939 | |
01027315 | 7940 | fi |
05ea2a05 | 7941 | done |
01027315 | 7942 | |
05ea2a05 TT |
7943 | if test "x$ac_cv_func_fork" = xyes; then |
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
7945 | $as_echo_n "checking for working fork... " >&6; } | |
7946 | if ${ac_cv_func_fork_works+:} false; then : | |
7947 | $as_echo_n "(cached) " >&6 | |
7948 | else | |
7949 | if test "$cross_compiling" = yes; then : | |
7950 | ac_cv_func_fork_works=cross | |
7951 | else | |
7952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7953 | /* end confdefs.h. */ | |
7954 | $ac_includes_default | |
01027315 TT |
7955 | int |
7956 | main () | |
7957 | { | |
05ea2a05 TT |
7958 | |
7959 | /* By Ruediger Kuhlmann. */ | |
7960 | return fork () < 0; | |
7961 | ||
01027315 TT |
7962 | ; |
7963 | return 0; | |
7964 | } | |
7965 | _ACEOF | |
05ea2a05 TT |
7966 | if ac_fn_c_try_run "$LINENO"; then : |
7967 | ac_cv_func_fork_works=yes | |
7968 | else | |
7969 | ac_cv_func_fork_works=no | |
01027315 | 7970 | fi |
05ea2a05 TT |
7971 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7972 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
01027315 TT |
7973 | fi |
7974 | ||
05ea2a05 TT |
7975 | fi |
7976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
7977 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
01027315 | 7978 | |
05ea2a05 TT |
7979 | else |
7980 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7981 | fi | |
7982 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7983 | case $host in | |
7984 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7985 | # Override, as these systems have only a dummy fork() stub | |
7986 | ac_cv_func_fork_works=no | |
7987 | ;; | |
7988 | *) | |
7989 | ac_cv_func_fork_works=yes | |
7990 | ;; | |
7991 | esac | |
7992 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7993 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
7994 | fi | |
7995 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7996 | if test "x$ac_cv_func_vfork" = xyes; then | |
7997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
7998 | $as_echo_n "checking for working vfork... " >&6; } | |
7999 | if ${ac_cv_func_vfork_works+:} false; then : | |
8000 | $as_echo_n "(cached) " >&6 | |
8001 | else | |
8002 | if test "$cross_compiling" = yes; then : | |
8003 | ac_cv_func_vfork_works=cross | |
8004 | else | |
8005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8006 | /* end confdefs.h. */ | |
8007 | /* Thanks to Paul Eggert for this test. */ | |
8008 | $ac_includes_default | |
8009 | #include <sys/wait.h> | |
8010 | #ifdef HAVE_VFORK_H | |
8011 | # include <vfork.h> | |
8012 | #endif | |
8013 | /* On some sparc systems, changes by the child to local and incoming | |
8014 | argument registers are propagated back to the parent. The compiler | |
8015 | is told about this with #include <vfork.h>, but some compilers | |
8016 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
8017 | static variable whose address is put into a register that is | |
8018 | clobbered by the vfork. */ | |
8019 | static void | |
8020 | #ifdef __cplusplus | |
8021 | sparc_address_test (int arg) | |
8022 | # else | |
8023 | sparc_address_test (arg) int arg; | |
8024 | #endif | |
8025 | { | |
8026 | static pid_t child; | |
8027 | if (!child) { | |
8028 | child = vfork (); | |
8029 | if (child < 0) { | |
8030 | perror ("vfork"); | |
8031 | _exit(2); | |
8032 | } | |
8033 | if (!child) { | |
8034 | arg = getpid(); | |
8035 | write(-1, "", 0); | |
8036 | _exit (arg); | |
8037 | } | |
8038 | } | |
8039 | } | |
01027315 | 8040 | |
05ea2a05 TT |
8041 | int |
8042 | main () | |
8043 | { | |
8044 | pid_t parent = getpid (); | |
8045 | pid_t child; | |
8046 | ||
8047 | sparc_address_test (0); | |
8048 | ||
8049 | child = vfork (); | |
8050 | ||
8051 | if (child == 0) { | |
8052 | /* Here is another test for sparc vfork register problems. This | |
8053 | test uses lots of local variables, at least as many local | |
8054 | variables as main has allocated so far including compiler | |
8055 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
8056 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
8057 | reuse the register of parent for one of the local variables, | |
8058 | since it will think that parent can't possibly be used any more | |
8059 | in this routine. Assigning to the local variable will thus | |
8060 | munge parent in the parent process. */ | |
8061 | pid_t | |
8062 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
8063 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
8064 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
8065 | use the same hardware register for all 8 local variables. */ | |
8066 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
8067 | || p != p5 || p != p6 || p != p7) | |
8068 | _exit(1); | |
8069 | ||
8070 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
8071 | from child file descriptors. If the child closes a descriptor | |
8072 | before it execs or exits, this munges the parent's descriptor | |
8073 | as well. Test for this by closing stdout in the child. */ | |
8074 | _exit(close(fileno(stdout)) != 0); | |
8075 | } else { | |
8076 | int status; | |
8077 | struct stat st; | |
8078 | ||
8079 | while (wait(&status) != child) | |
8080 | ; | |
8081 | return ( | |
8082 | /* Was there some problem with vforking? */ | |
8083 | child < 0 | |
8084 | ||
8085 | /* Did the child fail? (This shouldn't happen.) */ | |
8086 | || status | |
8087 | ||
8088 | /* Did the vfork/compiler bug occur? */ | |
8089 | || parent != getpid() | |
8090 | ||
8091 | /* Did the file descriptor bug occur? */ | |
8092 | || fstat(fileno(stdout), &st) != 0 | |
8093 | ); | |
8094 | } | |
8095 | } | |
8096 | _ACEOF | |
8097 | if ac_fn_c_try_run "$LINENO"; then : | |
8098 | ac_cv_func_vfork_works=yes | |
8099 | else | |
8100 | ac_cv_func_vfork_works=no | |
8101 | fi | |
8102 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8103 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8104 | fi | |
01027315 | 8105 | |
05ea2a05 TT |
8106 | fi |
8107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
8108 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
01027315 | 8109 | |
05ea2a05 TT |
8110 | fi; |
8111 | if test "x$ac_cv_func_fork_works" = xcross; then | |
8112 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
8113 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
8114 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
8115 | fi | |
01027315 | 8116 | |
05ea2a05 | 8117 | if test "x$ac_cv_func_vfork_works" = xyes; then |
01027315 | 8118 | |
05ea2a05 | 8119 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
01027315 | 8120 | |
05ea2a05 | 8121 | else |
01027315 | 8122 | |
05ea2a05 | 8123 | $as_echo "#define vfork fork" >>confdefs.h |
01027315 | 8124 | |
05ea2a05 TT |
8125 | fi |
8126 | if test "x$ac_cv_func_fork_works" = xyes; then | |
01027315 | 8127 | |
05ea2a05 | 8128 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
01027315 | 8129 | |
05ea2a05 | 8130 | fi |
01027315 | 8131 | |
8ae8e197 | 8132 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 TT |
8133 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
8134 | setpgid setpgrp getrusage getauxval | |
8135 | do : | |
8136 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8137 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8138 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
8139 | cat >>confdefs.h <<_ACEOF | |
8140 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
01027315 | 8141 | _ACEOF |
05ea2a05 | 8142 | |
01027315 | 8143 | fi |
05ea2a05 | 8144 | done |
01027315 | 8145 | |
01027315 | 8146 | |
05ea2a05 TT |
8147 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
8148 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
8149 | ac_have_decl=1 | |
01027315 | 8150 | else |
05ea2a05 | 8151 | ac_have_decl=0 |
01027315 TT |
8152 | fi |
8153 | ||
05ea2a05 TT |
8154 | cat >>confdefs.h <<_ACEOF |
8155 | #define HAVE_DECL_STRSTR $ac_have_decl | |
8156 | _ACEOF | |
01027315 | 8157 | |
05ea2a05 TT |
8158 | |
8159 | # ----------------------- # | |
8160 | # Checks for structures. # | |
8161 | # ----------------------- # | |
8162 | ||
8163 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
8164 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
8165 | ||
8166 | cat >>confdefs.h <<_ACEOF | |
8167 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
8168 | _ACEOF | |
8169 | ||
8170 | ||
8171 | fi | |
8172 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" | |
8173 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
8174 | ||
8175 | cat >>confdefs.h <<_ACEOF | |
8176 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
8177 | _ACEOF | |
8178 | ||
8179 | ||
8180 | fi | |
8181 | ||
8182 | ||
e911c666 JB |
8183 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
8184 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
8185 | # Figure out which one to use. | |
05ea2a05 TT |
8186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
8187 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
8188 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
01027315 TT |
8189 | $as_echo_n "(cached) " >&6 |
8190 | else | |
05ea2a05 TT |
8191 | ac_func_search_save_LIBS=$LIBS |
8192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
01027315 | 8193 | /* end confdefs.h. */ |
01027315 | 8194 | |
05ea2a05 TT |
8195 | /* Override any GCC internal prototype to avoid an error. |
8196 | Use char because int might match the return type of a GCC | |
8197 | builtin and then its argument prototype would still apply. */ | |
8198 | #ifdef __cplusplus | |
8199 | extern "C" | |
8200 | #endif | |
8201 | char kinfo_getfile (); | |
8202 | int | |
8203 | main () | |
8204 | { | |
8205 | return kinfo_getfile (); | |
8206 | ; | |
8207 | return 0; | |
8208 | } | |
01027315 | 8209 | _ACEOF |
05ea2a05 TT |
8210 | for ac_lib in '' util util-freebsd; do |
8211 | if test -z "$ac_lib"; then | |
8212 | ac_res="none required" | |
8213 | else | |
8214 | ac_res=-l$ac_lib | |
8215 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8216 | fi | |
8217 | if ac_fn_c_try_link "$LINENO"; then : | |
8218 | ac_cv_search_kinfo_getfile=$ac_res | |
01027315 | 8219 | fi |
05ea2a05 TT |
8220 | rm -f core conftest.err conftest.$ac_objext \ |
8221 | conftest$ac_exeext | |
8222 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
8223 | break | |
8224 | fi | |
8225 | done | |
8226 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
01027315 | 8227 | |
05ea2a05 TT |
8228 | else |
8229 | ac_cv_search_kinfo_getfile=no | |
8230 | fi | |
8231 | rm conftest.$ac_ext | |
8232 | LIBS=$ac_func_search_save_LIBS | |
8233 | fi | |
8234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
8235 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
8236 | ac_res=$ac_cv_search_kinfo_getfile | |
8237 | if test "$ac_res" != no; then : | |
8238 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8239 | ||
e911c666 JB |
8240 | fi |
8241 | ||
8242 | ||
8243 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
8244 | for ac_func in kinfo_getfile | |
8245 | do : | |
8246 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
8247 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
8248 | cat >>confdefs.h <<_ACEOF | |
8249 | #define HAVE_KINFO_GETFILE 1 | |
8250 | _ACEOF | |
01027315 TT |
8251 | |
8252 | fi | |
e911c666 | 8253 | done |
01027315 | 8254 | |
01027315 | 8255 | |
05ea2a05 TT |
8256 | # Check for std::thread. This does not work on some platforms, like |
8257 | # mingw and DJGPP. | |
8258 | ac_ext=cpp | |
8259 | ac_cpp='$CXXCPP $CPPFLAGS' | |
8260 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8261 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8262 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
01027315 | 8263 | |
01027315 | 8264 | |
01027315 | 8265 | |
01027315 | 8266 | |
05ea2a05 TT |
8267 | |
8268 | ac_ext=c | |
8269 | ac_cpp='$CPP $CPPFLAGS' | |
8270 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8271 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8272 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8273 | ||
8274 | ax_pthread_ok=no | |
8275 | ||
8276 | # We used to check for pthread.h first, but this fails if pthread.h | |
8277 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
8278 | # It gets checked for in the link test anyway. | |
8279 | ||
8280 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
8281 | # etcetera environment variables, and if threads linking works using | |
8282 | # them: | |
8283 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
8284 | ax_pthread_save_CC="$CC" | |
8285 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8286 | ax_pthread_save_LIBS="$LIBS" | |
8287 | if test "x$PTHREAD_CC" != "x"; then : | |
8288 | CC="$PTHREAD_CC" | |
8289 | fi | |
8290 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
8291 | LIBS="$PTHREAD_LIBS $LIBS" | |
8292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
8293 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
8294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8295 | /* end confdefs.h. */ | |
8296 | ||
8297 | /* Override any GCC internal prototype to avoid an error. | |
8298 | Use char because int might match the return type of a GCC | |
8299 | builtin and then its argument prototype would still apply. */ | |
8300 | #ifdef __cplusplus | |
8301 | extern "C" | |
8302 | #endif | |
8303 | char pthread_join (); | |
8304 | int | |
8305 | main () | |
8306 | { | |
8307 | return pthread_join (); | |
8308 | ; | |
8309 | return 0; | |
8310 | } | |
8311 | _ACEOF | |
8312 | if ac_fn_c_try_link "$LINENO"; then : | |
8313 | ax_pthread_ok=yes | |
8314 | fi | |
8315 | rm -f core conftest.err conftest.$ac_objext \ | |
8316 | conftest$ac_exeext conftest.$ac_ext | |
8317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
8318 | $as_echo "$ax_pthread_ok" >&6; } | |
8319 | if test "x$ax_pthread_ok" = "xno"; then | |
8320 | PTHREAD_LIBS="" | |
8321 | PTHREAD_CFLAGS="" | |
8322 | fi | |
8323 | CC="$ax_pthread_save_CC" | |
8324 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8325 | LIBS="$ax_pthread_save_LIBS" | |
8326 | fi | |
8327 | ||
8328 | # We must check for the threads library under a number of different | |
8329 | # names; the ordering is very important because some systems | |
8330 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
8331 | # libraries is broken (non-POSIX). | |
8332 | ||
8333 | # Create a list of thread flags to try. Items starting with a "-" are | |
8334 | # C compiler flags, and other items are library names, except for "none" | |
8335 | # which indicates that we try without any flags at all, and "pthread-config" | |
8336 | # which is a program returning the flags for the Pth emulation library. | |
8337 | ||
8338 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
8339 | ||
8340 | # The ordering *is* (sometimes) important. Some notes on the | |
8341 | # individual items follow: | |
8342 | ||
8343 | # pthreads: AIX (must check this before -lpthread) | |
8344 | # none: in case threads are in libc; should be tried before -Kthread and | |
8345 | # other compiler flags to prevent continual compiler warnings | |
8346 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
8347 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
8348 | # (Note: HP C rejects this with "bad form for `-t' option") | |
8349 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
8350 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
8351 | # doesn't hurt to check since this sometimes defines pthreads and | |
8352 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
8353 | # is present but should not be used directly; and before -mthreads, | |
8354 | # because the compiler interprets this as "-mt" + "-hreads") | |
8355 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
8356 | # pthread: Linux, etcetera | |
8357 | # --thread-safe: KAI C++ | |
8358 | # pthread-config: use pthread-config program (for GNU Pth library) | |
8359 | ||
8360 | case $host_os in | |
8361 | ||
8362 | freebsd*) | |
8363 | ||
8364 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
8365 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
8366 | ||
8367 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" | |
8368 | ;; | |
8369 | ||
8370 | hpux*) | |
8371 | ||
8372 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable | |
8373 | # multi-threading and also sets -lpthread." | |
8374 | ||
8375 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
8376 | ;; | |
8377 | ||
8378 | openedition*) | |
8379 | ||
8380 | # IBM z/OS requires a feature-test macro to be defined in order to | |
8381 | # enable POSIX threads at all, so give the user a hint if this is | |
8382 | # not set. (We don't define these ourselves, as they can affect | |
8383 | # other portions of the system API in unpredictable ways.) | |
8384 | ||
8385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8386 | /* end confdefs.h. */ | |
8387 | ||
8388 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
8389 | AX_PTHREAD_ZOS_MISSING | |
8390 | # endif | |
8391 | ||
8392 | _ACEOF | |
8393 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8394 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : | |
8395 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
8396 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
8397 | fi | |
8398 | rm -f conftest* | |
8399 | ||
8400 | ;; | |
8401 | ||
8402 | solaris*) | |
8403 | ||
8404 | # On Solaris (at least, for some versions), libc contains stubbed | |
8405 | # (non-functional) versions of the pthreads routines, so link-based | |
8406 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
8407 | # pthread_cleanup_push, or rather a function called by this macro, | |
8408 | # so we could check for that, but who knows whether they'll stub | |
8409 | # that too in a future libc.) So we'll check first for the | |
8410 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
8411 | ||
8412 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
8413 | ;; | |
8414 | esac | |
8415 | ||
8416 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
8417 | ||
8418 | if test "x$GCC" = "xyes"; then : | |
8419 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
8420 | fi | |
8421 | ||
8422 | # The presence of a feature test macro requesting re-entrant function | |
8423 | # definitions is, on some systems, a strong hint that pthreads support is | |
8424 | # correctly enabled | |
8425 | ||
8426 | case $host_os in | |
8427 | darwin* | hpux* | linux* | osf* | solaris*) | |
8428 | ax_pthread_check_macro="_REENTRANT" | |
8429 | ;; | |
8430 | ||
8431 | aix*) | |
8432 | ax_pthread_check_macro="_THREAD_SAFE" | |
8433 | ;; | |
8434 | ||
8435 | *) | |
8436 | ax_pthread_check_macro="--" | |
8437 | ;; | |
8438 | esac | |
8439 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
8440 | ax_pthread_check_cond=0 | |
8441 | else | |
8442 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
8443 | fi | |
8444 | ||
8445 | # Are we compiling with Clang? | |
8446 | ||
8447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
8448 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
8449 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
8450 | $as_echo_n "(cached) " >&6 | |
8451 | else | |
8452 | ax_cv_PTHREAD_CLANG=no | |
8453 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
8454 | if test "x$GCC" = "xyes"; then | |
8455 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8456 | /* end confdefs.h. */ | |
8457 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | |
8458 | # if defined(__clang__) && defined(__llvm__) | |
8459 | AX_PTHREAD_CC_IS_CLANG | |
8460 | # endif | |
8461 | ||
8462 | _ACEOF | |
8463 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8464 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
8465 | ax_cv_PTHREAD_CLANG=yes | |
8466 | fi | |
8467 | rm -f conftest* | |
8468 | ||
8469 | fi | |
8470 | ||
8471 | fi | |
8472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 | |
8473 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
8474 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
8475 | ||
8476 | ax_pthread_clang_warning=no | |
8477 | ||
8478 | # Clang needs special handling, because older versions handle the -pthread | |
8479 | # option in a rather... idiosyncratic way | |
8480 | ||
8481 | if test "x$ax_pthread_clang" = "xyes"; then | |
8482 | ||
8483 | # Clang takes -pthread; it has never supported any other flag | |
8484 | ||
8485 | # (Note 1: This will need to be revisited if a system that Clang | |
8486 | # supports has POSIX threads in a separate library. This tends not | |
8487 | # to be the way of modern systems, but it's conceivable.) | |
8488 | ||
8489 | # (Note 2: On some systems, notably Darwin, -pthread is not needed | |
8490 | # to get POSIX threads support; the API is always present and | |
8491 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
8492 | # -pthread does define _REENTRANT, and while the Darwin headers | |
8493 | # ignore this macro, third-party headers might not.) | |
01027315 TT |
8494 | |
8495 | PTHREAD_CFLAGS="-pthread" | |
8496 | PTHREAD_LIBS= | |
8497 | ||
8498 | ax_pthread_ok=yes | |
8499 | ||
8500 | # However, older versions of Clang make a point of warning the user | |
8501 | # that, in an invocation where only linking and no compilation is | |
8502 | # taking place, the -pthread option has no effect ("argument unused | |
8503 | # during compilation"). They expect -pthread to be passed in only | |
8504 | # when source code is being compiled. | |
8505 | # | |
8506 | # Problem is, this is at odds with the way Automake and most other | |
8507 | # C build frameworks function, which is that the same flags used in | |
8508 | # compilation (CFLAGS) are also used in linking. Many systems | |
8509 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
8510 | # support, and in fact it is often not straightforward to specify a | |
8511 | # flag that is used only in the compilation phase and not in | |
8512 | # linking. Such a scenario is extremely rare in practice. | |
8513 | # | |
8514 | # Even though use of the -pthread flag in linking would only print | |
8515 | # a warning, this can be a nuisance for well-run software projects | |
8516 | # that build with -Werror. So if the active version of Clang has | |
8517 | # this misfeature, we search for an option to squash it. | |
8518 | ||
8519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
8520 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
8521 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
8522 | $as_echo_n "(cached) " >&6 | |
8523 | else | |
8524 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
8525 | # Create an alternate version of $ac_link that compiles and | |
8526 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
8527 | # (.c -> exe), because the warning occurs only in the second | |
8528 | # step | |
8529 | ax_pthread_save_ac_link="$ac_link" | |
8530 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
8531 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
8532 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
8533 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8534 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
8535 | if test "x$ax_pthread_try" = "xunknown"; then : | |
8536 | break | |
8537 | fi | |
8538 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
8539 | ac_link="$ax_pthread_save_ac_link" | |
8540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8541 | /* end confdefs.h. */ | |
8542 | int main(void){return 0;} | |
8543 | _ACEOF | |
8544 | if ac_fn_c_try_link "$LINENO"; then : | |
8545 | ac_link="$ax_pthread_2step_ac_link" | |
8546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8547 | /* end confdefs.h. */ | |
8548 | int main(void){return 0;} | |
8549 | _ACEOF | |
8550 | if ac_fn_c_try_link "$LINENO"; then : | |
8551 | break | |
8552 | fi | |
8553 | rm -f core conftest.err conftest.$ac_objext \ | |
8554 | conftest$ac_exeext conftest.$ac_ext | |
8555 | ||
8556 | fi | |
8557 | rm -f core conftest.err conftest.$ac_objext \ | |
8558 | conftest$ac_exeext conftest.$ac_ext | |
8559 | done | |
8560 | ac_link="$ax_pthread_save_ac_link" | |
8561 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8562 | if test "x$ax_pthread_try" = "x"; then : | |
8563 | ax_pthread_try=no | |
8564 | fi | |
8565 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
8566 | ||
8567 | fi | |
8568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
8569 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
8570 | ||
8571 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | |
8572 | no | unknown) ;; | |
8573 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
8574 | esac | |
8575 | ||
8576 | fi # $ax_pthread_clang = yes | |
8577 | ||
8578 | if test "x$ax_pthread_ok" = "xno"; then | |
8579 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
8580 | ||
8581 | case $ax_pthread_try_flag in | |
8582 | none) | |
8583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
8584 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
8585 | ;; | |
8586 | ||
8587 | -mt,pthread) | |
8588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
8589 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
8590 | PTHREAD_CFLAGS="-mt" | |
8591 | PTHREAD_LIBS="-lpthread" | |
8592 | ;; | |
8593 | ||
8594 | -*) | |
8595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
8596 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
8597 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
8598 | ;; | |
8599 | ||
8600 | pthread-config) | |
8601 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
8602 | set dummy pthread-config; ac_word=$2 | |
8603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8604 | $as_echo_n "checking for $ac_word... " >&6; } | |
8605 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
8606 | $as_echo_n "(cached) " >&6 | |
8607 | else | |
8608 | if test -n "$ax_pthread_config"; then | |
8609 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
8610 | else | |
8611 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8612 | for as_dir in $PATH | |
8613 | do | |
8614 | IFS=$as_save_IFS | |
8615 | test -z "$as_dir" && as_dir=. | |
8616 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8617 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8618 | ac_cv_prog_ax_pthread_config="yes" | |
8619 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8620 | break 2 | |
8621 | fi | |
05ea2a05 TT |
8622 | done |
8623 | done | |
8624 | IFS=$as_save_IFS | |
8625 | ||
8626 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" | |
8627 | fi | |
8628 | fi | |
8629 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
8630 | if test -n "$ax_pthread_config"; then | |
8631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
8632 | $as_echo "$ax_pthread_config" >&6; } | |
8633 | else | |
8634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8635 | $as_echo "no" >&6; } | |
8636 | fi | |
8637 | ||
8638 | ||
8639 | if test "x$ax_pthread_config" = "xno"; then : | |
8640 | continue | |
8641 | fi | |
8642 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
8643 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
8644 | ;; | |
8645 | ||
8646 | *) | |
8647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
8648 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
8649 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
8650 | ;; | |
8651 | esac | |
8652 | ||
8653 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8654 | ax_pthread_save_LIBS="$LIBS" | |
8655 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
8656 | LIBS="$PTHREAD_LIBS $LIBS" | |
8657 | ||
8658 | # Check for various functions. We must include pthread.h, | |
8659 | # since some functions may be macros. (On the Sequent, we | |
8660 | # need a special flag -Kthread to make this header compile.) | |
8661 | # We check for pthread_join because it is in -lpthread on IRIX | |
8662 | # while pthread_create is in libc. We check for pthread_attr_init | |
8663 | # due to DEC craziness with -lpthreads. We check for | |
8664 | # pthread_cleanup_push because it is one of the few pthread | |
8665 | # functions on Solaris that doesn't have a non-functional libc stub. | |
8666 | # We try pthread_create on general principles. | |
8667 | ||
8668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8669 | /* end confdefs.h. */ | |
8670 | #include <pthread.h> | |
8671 | # if $ax_pthread_check_cond | |
8672 | # error "$ax_pthread_check_macro must be defined" | |
8673 | # endif | |
8674 | static void routine(void *a) { a = 0; } | |
8675 | static void *start_routine(void *a) { return a; } | |
8676 | int | |
8677 | main () | |
8678 | { | |
8679 | pthread_t th; pthread_attr_t attr; | |
8680 | pthread_create(&th, 0, start_routine, 0); | |
8681 | pthread_join(th, 0); | |
8682 | pthread_attr_init(&attr); | |
8683 | pthread_cleanup_push(routine, 0); | |
8684 | pthread_cleanup_pop(0) /* ; */ | |
8685 | ; | |
8686 | return 0; | |
8687 | } | |
8688 | _ACEOF | |
8689 | if ac_fn_c_try_link "$LINENO"; then : | |
8690 | ax_pthread_ok=yes | |
8691 | fi | |
8692 | rm -f core conftest.err conftest.$ac_objext \ | |
8693 | conftest$ac_exeext conftest.$ac_ext | |
8694 | ||
8695 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8696 | LIBS="$ax_pthread_save_LIBS" | |
8697 | ||
8698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
8699 | $as_echo "$ax_pthread_ok" >&6; } | |
8700 | if test "x$ax_pthread_ok" = "xyes"; then : | |
8701 | break | |
8702 | fi | |
8703 | ||
8704 | PTHREAD_LIBS="" | |
8705 | PTHREAD_CFLAGS="" | |
8706 | done | |
8707 | fi | |
8708 | ||
8709 | # Various other checks: | |
8710 | if test "x$ax_pthread_ok" = "xyes"; then | |
8711 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8712 | ax_pthread_save_LIBS="$LIBS" | |
8713 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
8714 | LIBS="$PTHREAD_LIBS $LIBS" | |
8715 | ||
8716 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | |
8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
8718 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
8719 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
8720 | $as_echo_n "(cached) " >&6 | |
8721 | else | |
8722 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
8723 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
8724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8725 | /* end confdefs.h. */ | |
8726 | #include <pthread.h> | |
8727 | int | |
8728 | main () | |
8729 | { | |
8730 | int attr = $ax_pthread_attr; return attr /* ; */ | |
8731 | ; | |
8732 | return 0; | |
8733 | } | |
8734 | _ACEOF | |
8735 | if ac_fn_c_try_link "$LINENO"; then : | |
8736 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
8737 | fi | |
8738 | rm -f core conftest.err conftest.$ac_objext \ | |
8739 | conftest$ac_exeext conftest.$ac_ext | |
8740 | done | |
8741 | ||
8742 | fi | |
8743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
8744 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
8745 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
8746 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
8747 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
8748 | ||
8749 | cat >>confdefs.h <<_ACEOF | |
8750 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
8751 | _ACEOF | |
8752 | ||
8753 | ax_pthread_joinable_attr_defined=yes | |
8754 | ||
8755 | fi | |
8756 | ||
8757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 | |
8758 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
8759 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
8760 | $as_echo_n "(cached) " >&6 | |
8761 | else | |
8762 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
8763 | case $host_os in | |
8764 | solaris*) | |
8765 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
8766 | ;; | |
8767 | esac | |
8768 | ||
8769 | fi | |
8770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
8771 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
8772 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
8773 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
8774 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
8775 | ax_pthread_special_flags_added=yes | |
8776 | fi | |
8777 | ||
8778 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 | |
8779 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
8780 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
8781 | $as_echo_n "(cached) " >&6 | |
8782 | else | |
8783 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8784 | /* end confdefs.h. */ | |
8785 | #include <pthread.h> | |
8786 | int | |
8787 | main () | |
8788 | { | |
8789 | int i = PTHREAD_PRIO_INHERIT; | |
8790 | ; | |
8791 | return 0; | |
8792 | } | |
8793 | _ACEOF | |
8794 | if ac_fn_c_try_link "$LINENO"; then : | |
8795 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
8796 | else | |
8797 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
8798 | fi | |
8799 | rm -f core conftest.err conftest.$ac_objext \ | |
8800 | conftest$ac_exeext conftest.$ac_ext | |
8801 | ||
8802 | fi | |
8803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
8804 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
8805 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
8806 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
8807 | ||
8808 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h | |
8809 | ||
8810 | ax_pthread_prio_inherit_defined=yes | |
8811 | ||
8812 | fi | |
8813 | ||
8814 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8815 | LIBS="$ax_pthread_save_LIBS" | |
8816 | ||
8817 | # More AIX lossage: compile with *_r variant | |
8818 | if test "x$GCC" != "xyes"; then | |
8819 | case $host_os in | |
8820 | aix*) | |
8821 | case "x/$CC" in #( | |
8822 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
8823 | #handle absolute path differently from PATH based program lookup | |
8824 | case "x$CC" in #( | |
8825 | x/*) : | |
8826 | if as_fn_executable_p ${CC}_r; then : | |
8827 | PTHREAD_CC="${CC}_r" | |
8828 | fi ;; #( | |
8829 | *) : | |
8830 | for ac_prog in ${CC}_r | |
8831 | do | |
8832 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8833 | set dummy $ac_prog; ac_word=$2 | |
8834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8835 | $as_echo_n "checking for $ac_word... " >&6; } | |
8836 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
8837 | $as_echo_n "(cached) " >&6 | |
8838 | else | |
8839 | if test -n "$PTHREAD_CC"; then | |
8840 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
8841 | else | |
8842 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8843 | for as_dir in $PATH | |
8844 | do | |
8845 | IFS=$as_save_IFS | |
8846 | test -z "$as_dir" && as_dir=. | |
8847 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8848 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8849 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
8850 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8851 | break 2 | |
8852 | fi | |
8853 | done | |
8854 | done | |
8855 | IFS=$as_save_IFS | |
8856 | ||
8857 | fi | |
8858 | fi | |
8859 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
8860 | if test -n "$PTHREAD_CC"; then | |
8861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
8862 | $as_echo "$PTHREAD_CC" >&6; } | |
8863 | else | |
8864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8865 | $as_echo "no" >&6; } | |
8866 | fi | |
8867 | ||
8868 | ||
8869 | test -n "$PTHREAD_CC" && break | |
8870 | done | |
8871 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8872 | ;; | |
8873 | esac ;; #( | |
8874 | *) : | |
8875 | ;; | |
8876 | esac | |
8877 | ;; | |
8878 | esac | |
8879 | fi | |
8880 | fi | |
8881 | ||
8882 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8883 | ||
8884 | ||
8885 | ||
8886 | ||
8887 | ||
8888 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
8889 | if test "x$ax_pthread_ok" = "xyes"; then | |
8890 | threads=yes | |
8891 | : | |
8892 | else | |
8893 | ax_pthread_ok=no | |
8894 | threads=no | |
8895 | fi | |
8896 | ac_ext=cpp | |
8897 | ac_cpp='$CXXCPP $CPPFLAGS' | |
8898 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8899 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8900 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
8901 | ||
8902 | ||
8903 | if test "$threads" = "yes"; then | |
8904 | save_LIBS="$LIBS" | |
8905 | LIBS="$PTHREAD_LIBS $LIBS" | |
8906 | save_CXXFLAGS="$CXXFLAGS" | |
8907 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
8909 | $as_echo_n "checking for std::thread... " >&6; } | |
8910 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
8911 | $as_echo_n "(cached) " >&6 | |
8912 | else | |
8913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8914 | /* end confdefs.h. */ | |
8915 | #include <thread> | |
8916 | void callback() { } | |
8917 | int | |
8918 | main () | |
8919 | { | |
8920 | std::thread t(callback); | |
8921 | ; | |
8922 | return 0; | |
8923 | } | |
8924 | _ACEOF | |
8925 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
8926 | gdb_cv_cxx_std_thread=yes | |
8927 | else | |
8928 | gdb_cv_cxx_std_thread=no | |
8929 | fi | |
8930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8931 | fi | |
8932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
8933 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
8934 | ||
8935 | # This check must be here, while LIBS includes any necessary | |
8936 | # threading library. | |
8937 | for ac_func in pthread_sigmask pthread_setname_np | |
8938 | do : | |
8939 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8940 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8941 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
8942 | cat >>confdefs.h <<_ACEOF | |
8943 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8944 | _ACEOF | |
8945 | ||
8946 | fi | |
8947 | done | |
8948 | ||
8949 | ||
8950 | LIBS="$save_LIBS" | |
8951 | CXXFLAGS="$save_CXXFLAGS" | |
8952 | fi | |
8953 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
8954 | ||
8955 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h | |
8956 | ||
8957 | fi | |
8958 | ac_ext=c | |
8959 | ac_cpp='$CPP $CPPFLAGS' | |
8960 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8961 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8962 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8963 | ||
8964 | ||
3684d331 | 8965 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
05ea2a05 TT |
8966 | $as_echo_n "checking for sigsetjmp... " >&6; } |
8967 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
8968 | $as_echo_n "(cached) " >&6 | |
8969 | else | |
8970 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8971 | /* end confdefs.h. */ | |
b9442ec1 | 8972 | #include <setjmp.h> |
05ea2a05 TT |
8973 | int |
8974 | main () | |
8975 | { | |
b9442ec1 SM |
8976 | sigjmp_buf env; |
8977 | while (! sigsetjmp (env, 1)) | |
8978 | siglongjmp (env, 1); | |
8979 | ||
05ea2a05 TT |
8980 | ; |
8981 | return 0; | |
8982 | } | |
8983 | _ACEOF | |
8984 | if ac_fn_c_try_compile "$LINENO"; then : | |
8985 | gdb_cv_func_sigsetjmp=yes | |
8986 | else | |
8987 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 8988 | |
05ea2a05 TT |
8989 | fi |
8990 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b9442ec1 | 8991 | |
05ea2a05 TT |
8992 | fi |
8993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
8994 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
3684d331 | 8995 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then |
05ea2a05 TT |
8996 | |
8997 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
8998 | ||
3684d331 | 8999 | fi |
05ea2a05 TT |
9000 | |
9001 | ||
9002 | # Check whether --with-intel_pt was given. | |
9003 | if test "${with_intel_pt+set}" = set; then : | |
9004 | withval=$with_intel_pt; | |
9005 | else | |
9006 | with_intel_pt=auto | |
9007 | fi | |
9008 | ||
3684d331 | 9009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
05ea2a05 | 9010 | $as_echo_n "checking whether to use intel pt... " >&6; } |
3684d331 | 9011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 |
05ea2a05 TT |
9012 | $as_echo "$with_intel_pt" >&6; } |
9013 | ||
3684d331 PA |
9014 | if test "${with_intel_pt}" = no; then |
9015 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
05ea2a05 | 9016 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} |
3684d331 PA |
9017 | HAVE_LIBIPT=no |
9018 | else | |
9019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
9020 | /* end confdefs.h. */ |
9021 | ||
3684d331 PA |
9022 | #include <linux/perf_event.h> |
9023 | #ifndef PERF_ATTR_SIZE_VER5 | |
9024 | # error | |
9025 | #endif | |
05ea2a05 TT |
9026 | |
9027 | _ACEOF | |
9028 | if ac_fn_c_try_cpp "$LINENO"; then : | |
9029 | perf_event=yes | |
9030 | else | |
9031 | perf_event=no | |
9032 | fi | |
9033 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3684d331 PA |
9034 | if test "$perf_event" != yes; then |
9035 | if test "$with_intel_pt" = yes; then | |
9036 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
9037 | else | |
9038 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
05ea2a05 | 9039 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} |
3684d331 | 9040 | fi |
05ea2a05 | 9041 | fi |
05ea2a05 TT |
9042 | |
9043 | ||
9044 | ||
9045 | ||
9046 | ||
9047 | ||
9048 | ||
9049 | ||
9050 | ||
9051 | use_additional=yes | |
9052 | ||
9053 | acl_save_prefix="$prefix" | |
9054 | prefix="$acl_final_prefix" | |
9055 | acl_save_exec_prefix="$exec_prefix" | |
9056 | exec_prefix="$acl_final_exec_prefix" | |
9057 | ||
9058 | eval additional_includedir=\"$includedir\" | |
9059 | eval additional_libdir=\"$libdir\" | |
9060 | ||
9061 | exec_prefix="$acl_save_exec_prefix" | |
9062 | prefix="$acl_save_prefix" | |
9063 | ||
9064 | ||
9065 | # Check whether --with-libipt-prefix was given. | |
9066 | if test "${with_libipt_prefix+set}" = set; then : | |
9067 | withval=$with_libipt_prefix; | |
9068 | if test "X$withval" = "Xno"; then | |
9069 | use_additional=no | |
9070 | else | |
9071 | if test "X$withval" = "X"; then | |
9072 | ||
9073 | acl_save_prefix="$prefix" | |
9074 | prefix="$acl_final_prefix" | |
9075 | acl_save_exec_prefix="$exec_prefix" | |
9076 | exec_prefix="$acl_final_exec_prefix" | |
9077 | ||
9078 | eval additional_includedir=\"$includedir\" | |
9079 | eval additional_libdir=\"$libdir\" | |
9080 | ||
9081 | exec_prefix="$acl_save_exec_prefix" | |
9082 | prefix="$acl_save_prefix" | |
9083 | ||
9084 | else | |
9085 | additional_includedir="$withval/include" | |
9086 | additional_libdir="$withval/lib" | |
9087 | fi | |
9088 | fi | |
9089 | ||
9090 | fi | |
9091 | ||
9f1528a1 AB |
9092 | |
9093 | # Check whether --with-libipt-type was given. | |
9094 | if test "${with_libipt_type+set}" = set; then : | |
9095 | withval=$with_libipt_type; with_libipt_type=$withval | |
9096 | else | |
9097 | with_libipt_type=auto | |
9098 | fi | |
9099 | ||
9100 | lib_type=`eval echo \$with_libipt_type` | |
9101 | ||
05ea2a05 TT |
9102 | LIBIPT= |
9103 | LTLIBIPT= | |
9104 | INCIPT= | |
9105 | rpathdirs= | |
9106 | ltrpathdirs= | |
9107 | names_already_handled= | |
9108 | names_next_round='ipt ' | |
9109 | while test -n "$names_next_round"; do | |
9110 | names_this_round="$names_next_round" | |
9111 | names_next_round= | |
9112 | for name in $names_this_round; do | |
9113 | already_handled= | |
9114 | for n in $names_already_handled; do | |
9115 | if test "$n" = "$name"; then | |
9116 | already_handled=yes | |
9117 | break | |
9118 | fi | |
9119 | done | |
9120 | if test -z "$already_handled"; then | |
9121 | names_already_handled="$names_already_handled $name" | |
9122 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9123 | eval value=\"\$HAVE_LIB$uppername\" | |
9124 | if test -n "$value"; then | |
9125 | if test "$value" = yes; then | |
9126 | eval value=\"\$LIB$uppername\" | |
9127 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
9128 | eval value=\"\$LTLIB$uppername\" | |
9129 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
9130 | else | |
9131 | : | |
9132 | fi | |
9133 | else | |
9134 | found_dir= | |
9135 | found_la= | |
9136 | found_so= | |
9137 | found_a= | |
9138 | if test $use_additional = yes; then | |
9f1528a1 | 9139 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
9140 | found_dir="$additional_libdir" |
9141 | found_so="$additional_libdir/lib$name.$shlibext" | |
9142 | if test -f "$additional_libdir/lib$name.la"; then | |
9143 | found_la="$additional_libdir/lib$name.la" | |
9144 | fi | |
9f1528a1 | 9145 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
9146 | if test -f "$additional_libdir/lib$name.$libext"; then |
9147 | found_dir="$additional_libdir" | |
9148 | found_a="$additional_libdir/lib$name.$libext" | |
9149 | if test -f "$additional_libdir/lib$name.la"; then | |
9150 | found_la="$additional_libdir/lib$name.la" | |
9151 | fi | |
9152 | fi | |
9153 | fi | |
9154 | fi | |
9155 | if test "X$found_dir" = "X"; then | |
9156 | for x in $LDFLAGS $LTLIBIPT; do | |
9157 | ||
9158 | acl_save_prefix="$prefix" | |
9159 | prefix="$acl_final_prefix" | |
9160 | acl_save_exec_prefix="$exec_prefix" | |
9161 | exec_prefix="$acl_final_exec_prefix" | |
9162 | eval x=\"$x\" | |
9163 | exec_prefix="$acl_save_exec_prefix" | |
9164 | prefix="$acl_save_prefix" | |
9165 | ||
9166 | case "$x" in | |
9167 | -L*) | |
9168 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9169 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
9170 | found_dir="$dir" |
9171 | found_so="$dir/lib$name.$shlibext" | |
9172 | if test -f "$dir/lib$name.la"; then | |
9173 | found_la="$dir/lib$name.la" | |
9174 | fi | |
9f1528a1 | 9175 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
9176 | if test -f "$dir/lib$name.$libext"; then |
9177 | found_dir="$dir" | |
9178 | found_a="$dir/lib$name.$libext" | |
9179 | if test -f "$dir/lib$name.la"; then | |
9180 | found_la="$dir/lib$name.la" | |
9181 | fi | |
9182 | fi | |
9183 | fi | |
9184 | ;; | |
9185 | esac | |
9186 | if test "X$found_dir" != "X"; then | |
9187 | break | |
9188 | fi | |
9189 | done | |
9190 | fi | |
9191 | if test "X$found_dir" != "X"; then | |
9192 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
9193 | if test "X$found_so" != "X"; then | |
9194 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9195 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9196 | else | |
9197 | haveit= | |
9198 | for x in $ltrpathdirs; do | |
9199 | if test "X$x" = "X$found_dir"; then | |
9200 | haveit=yes | |
9201 | break | |
9202 | fi | |
9203 | done | |
9204 | if test -z "$haveit"; then | |
9205 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9206 | fi | |
9207 | if test "$hardcode_direct" = yes; then | |
9208 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9209 | else | |
9210 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9211 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9212 | haveit= | |
9213 | for x in $rpathdirs; do | |
9214 | if test "X$x" = "X$found_dir"; then | |
9215 | haveit=yes | |
9216 | break | |
9217 | fi | |
9218 | done | |
9219 | if test -z "$haveit"; then | |
9220 | rpathdirs="$rpathdirs $found_dir" | |
9221 | fi | |
9222 | else | |
9223 | haveit= | |
9224 | for x in $LDFLAGS $LIBIPT; do | |
9225 | ||
9226 | acl_save_prefix="$prefix" | |
9227 | prefix="$acl_final_prefix" | |
9228 | acl_save_exec_prefix="$exec_prefix" | |
9229 | exec_prefix="$acl_final_exec_prefix" | |
9230 | eval x=\"$x\" | |
9231 | exec_prefix="$acl_save_exec_prefix" | |
9232 | prefix="$acl_save_prefix" | |
9233 | ||
9234 | if test "X$x" = "X-L$found_dir"; then | |
9235 | haveit=yes | |
9236 | break | |
9237 | fi | |
9238 | done | |
9239 | if test -z "$haveit"; then | |
9240 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
9241 | fi | |
9242 | if test "$hardcode_minus_L" != no; then | |
9243 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9244 | else | |
9245 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
9246 | fi | |
9247 | fi | |
9248 | fi | |
9249 | fi | |
9250 | else | |
9251 | if test "X$found_a" != "X"; then | |
9252 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
9253 | else | |
9254 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
9255 | fi | |
9256 | fi | |
9257 | additional_includedir= | |
9258 | case "$found_dir" in | |
9259 | */lib | */lib/) | |
9260 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9261 | additional_includedir="$basedir/include" | |
9262 | ;; | |
9263 | esac | |
9264 | if test "X$additional_includedir" != "X"; then | |
9265 | if test "X$additional_includedir" != "X/usr/include"; then | |
9266 | haveit= | |
9267 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9268 | if test -n "$GCC"; then | |
9269 | case $host_os in | |
9270 | linux*) haveit=yes;; | |
9271 | esac | |
9272 | fi | |
9273 | fi | |
9274 | if test -z "$haveit"; then | |
9275 | for x in $CPPFLAGS $INCIPT; do | |
9276 | ||
9277 | acl_save_prefix="$prefix" | |
9278 | prefix="$acl_final_prefix" | |
9279 | acl_save_exec_prefix="$exec_prefix" | |
9280 | exec_prefix="$acl_final_exec_prefix" | |
9281 | eval x=\"$x\" | |
9282 | exec_prefix="$acl_save_exec_prefix" | |
9283 | prefix="$acl_save_prefix" | |
9284 | ||
9285 | if test "X$x" = "X-I$additional_includedir"; then | |
9286 | haveit=yes | |
9287 | break | |
9288 | fi | |
9289 | done | |
9290 | if test -z "$haveit"; then | |
9291 | if test -d "$additional_includedir"; then | |
9292 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
9293 | fi | |
9294 | fi | |
9295 | fi | |
9296 | fi | |
9297 | fi | |
9298 | if test -n "$found_la"; then | |
9299 | save_libdir="$libdir" | |
9300 | case "$found_la" in | |
9301 | */* | *\\*) . "$found_la" ;; | |
9302 | *) . "./$found_la" ;; | |
9303 | esac | |
9304 | libdir="$save_libdir" | |
9305 | for dep in $dependency_libs; do | |
9306 | case "$dep" in | |
9307 | -L*) | |
9308 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9309 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9310 | haveit= | |
9311 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9312 | if test -n "$GCC"; then | |
9313 | case $host_os in | |
9314 | linux*) haveit=yes;; | |
9315 | esac | |
9316 | fi | |
9317 | fi | |
9318 | if test -z "$haveit"; then | |
9319 | haveit= | |
9320 | for x in $LDFLAGS $LIBIPT; do | |
9321 | ||
9322 | acl_save_prefix="$prefix" | |
9323 | prefix="$acl_final_prefix" | |
9324 | acl_save_exec_prefix="$exec_prefix" | |
9325 | exec_prefix="$acl_final_exec_prefix" | |
9326 | eval x=\"$x\" | |
9327 | exec_prefix="$acl_save_exec_prefix" | |
9328 | prefix="$acl_save_prefix" | |
9329 | ||
9330 | if test "X$x" = "X-L$additional_libdir"; then | |
9331 | haveit=yes | |
9332 | break | |
9333 | fi | |
9334 | done | |
9335 | if test -z "$haveit"; then | |
9336 | if test -d "$additional_libdir"; then | |
9337 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
9338 | fi | |
9339 | fi | |
9340 | haveit= | |
9341 | for x in $LDFLAGS $LTLIBIPT; do | |
9342 | ||
9343 | acl_save_prefix="$prefix" | |
9344 | prefix="$acl_final_prefix" | |
9345 | acl_save_exec_prefix="$exec_prefix" | |
9346 | exec_prefix="$acl_final_exec_prefix" | |
9347 | eval x=\"$x\" | |
9348 | exec_prefix="$acl_save_exec_prefix" | |
9349 | prefix="$acl_save_prefix" | |
9350 | ||
9351 | if test "X$x" = "X-L$additional_libdir"; then | |
9352 | haveit=yes | |
9353 | break | |
9354 | fi | |
9355 | done | |
9356 | if test -z "$haveit"; then | |
9357 | if test -d "$additional_libdir"; then | |
9358 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
9359 | fi | |
9360 | fi | |
9361 | fi | |
9362 | fi | |
9363 | ;; | |
9364 | -R*) | |
9365 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9366 | if test "$enable_rpath" != no; then | |
9367 | haveit= | |
9368 | for x in $rpathdirs; do | |
9369 | if test "X$x" = "X$dir"; then | |
9370 | haveit=yes | |
9371 | break | |
9372 | fi | |
9373 | done | |
9374 | if test -z "$haveit"; then | |
9375 | rpathdirs="$rpathdirs $dir" | |
9376 | fi | |
9377 | haveit= | |
9378 | for x in $ltrpathdirs; do | |
9379 | if test "X$x" = "X$dir"; then | |
9380 | haveit=yes | |
9381 | break | |
9382 | fi | |
9383 | done | |
9384 | if test -z "$haveit"; then | |
9385 | ltrpathdirs="$ltrpathdirs $dir" | |
9386 | fi | |
9387 | fi | |
9388 | ;; | |
9389 | -l*) | |
9390 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9391 | ;; | |
9392 | *.la) | |
9393 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9394 | ;; | |
9395 | *) | |
9396 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
9397 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
9398 | ;; | |
9399 | esac | |
9400 | done | |
9401 | fi | |
9402 | else | |
9f1528a1 AB |
9403 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9404 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
9405 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
9406 | else | |
9407 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
9408 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
9409 | fi | |
05ea2a05 TT |
9410 | fi |
9411 | fi | |
9412 | fi | |
9413 | done | |
9414 | done | |
9415 | if test "X$rpathdirs" != "X"; then | |
9416 | if test -n "$hardcode_libdir_separator"; then | |
9417 | alldirs= | |
9418 | for found_dir in $rpathdirs; do | |
9419 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9420 | done | |
9421 | acl_save_libdir="$libdir" | |
9422 | libdir="$alldirs" | |
9423 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9424 | libdir="$acl_save_libdir" | |
9425 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
9426 | else | |
9427 | for found_dir in $rpathdirs; do | |
9428 | acl_save_libdir="$libdir" | |
9429 | libdir="$found_dir" | |
9430 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9431 | libdir="$acl_save_libdir" | |
9432 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
9433 | done | |
9434 | fi | |
9435 | fi | |
9436 | if test "X$ltrpathdirs" != "X"; then | |
9437 | for found_dir in $ltrpathdirs; do | |
9438 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
9439 | done | |
9440 | fi | |
01027315 | 9441 | |
01027315 | 9442 | |
05ea2a05 | 9443 | ac_save_CPPFLAGS="$CPPFLAGS" |
01027315 | 9444 | |
05ea2a05 TT |
9445 | for element in $INCIPT; do |
9446 | haveit= | |
9447 | for x in $CPPFLAGS; do | |
01027315 | 9448 | |
05ea2a05 TT |
9449 | acl_save_prefix="$prefix" |
9450 | prefix="$acl_final_prefix" | |
9451 | acl_save_exec_prefix="$exec_prefix" | |
9452 | exec_prefix="$acl_final_exec_prefix" | |
9453 | eval x=\"$x\" | |
9454 | exec_prefix="$acl_save_exec_prefix" | |
9455 | prefix="$acl_save_prefix" | |
01027315 | 9456 | |
05ea2a05 TT |
9457 | if test "X$x" = "X$element"; then |
9458 | haveit=yes | |
9459 | break | |
9460 | fi | |
9461 | done | |
9462 | if test -z "$haveit"; then | |
9463 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9464 | fi | |
9465 | done | |
01027315 | 9466 | |
01027315 | 9467 | |
05ea2a05 TT |
9468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
9469 | $as_echo_n "checking for libipt... " >&6; } | |
9470 | if ${ac_cv_libipt+:} false; then : | |
9471 | $as_echo_n "(cached) " >&6 | |
9472 | else | |
9473 | ||
9474 | ac_save_LIBS="$LIBS" | |
9475 | LIBS="$LIBS $LIBIPT" | |
9476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
01027315 | 9477 | /* end confdefs.h. */ |
05ea2a05 | 9478 | #include "intel-pt.h" |
01027315 TT |
9479 | int |
9480 | main () | |
9481 | { | |
05ea2a05 | 9482 | pt_insn_alloc_decoder (0); |
01027315 TT |
9483 | ; |
9484 | return 0; | |
9485 | } | |
9486 | _ACEOF | |
9487 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
9488 | ac_cv_libipt=yes |
9489 | else | |
9490 | ac_cv_libipt=no | |
01027315 TT |
9491 | fi |
9492 | rm -f core conftest.err conftest.$ac_objext \ | |
9493 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 9494 | LIBS="$ac_save_LIBS" |
01027315 | 9495 | |
01027315 | 9496 | fi |
05ea2a05 TT |
9497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
9498 | $as_echo "$ac_cv_libipt" >&6; } | |
9499 | if test "$ac_cv_libipt" = yes; then | |
9500 | HAVE_LIBIPT=yes | |
01027315 | 9501 | |
05ea2a05 TT |
9502 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
9503 | ||
9504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
9505 | $as_echo_n "checking how to link with libipt... " >&6; } | |
9506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
9507 | $as_echo "$LIBIPT" >&6; } | |
9508 | else | |
9509 | HAVE_LIBIPT=no | |
9510 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9511 | LIBIPT= | |
9512 | LTLIBIPT= | |
9513 | fi | |
9514 | ||
9515 | ||
9516 | ||
9517 | ||
9518 | ||
9519 | ||
3684d331 PA |
9520 | if test "$HAVE_LIBIPT" != yes; then |
9521 | if test "$with_intel_pt" = yes; then | |
9522 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
9523 | else | |
9524 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
05ea2a05 | 9525 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} |
3684d331 PA |
9526 | fi |
9527 | else | |
9528 | save_LIBS=$LIBS | |
9529 | LIBS="$LIBS $LIBIPT" | |
9530 | for ac_func in pt_insn_event | |
05ea2a05 TT |
9531 | do : |
9532 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
9533 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
9534 | cat >>confdefs.h <<_ACEOF | |
9535 | #define HAVE_PT_INSN_EVENT 1 | |
9536 | _ACEOF | |
9537 | ||
9538 | fi | |
01027315 | 9539 | done |
05ea2a05 | 9540 | |
3684d331 | 9541 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
05ea2a05 TT |
9542 | " |
9543 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
9544 | ||
9545 | cat >>confdefs.h <<_ACEOF | |
9546 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
9547 | _ACEOF | |
9548 | ||
9549 | ||
01027315 | 9550 | fi |
05ea2a05 TT |
9551 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
9552 | " | |
9553 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
01027315 | 9554 | |
05ea2a05 TT |
9555 | cat >>confdefs.h <<_ACEOF |
9556 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
9557 | _ACEOF | |
01027315 | 9558 | |
05ea2a05 TT |
9559 | |
9560 | fi | |
9561 | ||
3684d331 PA |
9562 | LIBS=$save_LIBS |
9563 | fi | |
05ea2a05 | 9564 | fi |
05ea2a05 | 9565 | |
c8693053 RO |
9566 | |
9567 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
9568 | ||
9569 | for ac_header in sys/procfs.h | |
9570 | do : | |
9571 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
9572 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
9573 | cat >>confdefs.h <<_ACEOF | |
9574 | #define HAVE_SYS_PROCFS_H 1 | |
9575 | _ACEOF | |
9576 | ||
9577 | fi | |
9578 | ||
9579 | done | |
9580 | ||
3684d331 | 9581 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
9582 | |
9583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9584 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
9585 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
01027315 TT |
9586 | $as_echo_n "(cached) " >&6 |
9587 | else | |
05ea2a05 | 9588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
01027315 | 9589 | /* end confdefs.h. */ |
05ea2a05 TT |
9590 | |
9591 | #define _SYSCALL32 | |
05ea2a05 | 9592 | #include <sys/procfs.h> |
01027315 TT |
9593 | int |
9594 | main () | |
9595 | { | |
05ea2a05 | 9596 | gregset_t avar |
01027315 TT |
9597 | ; |
9598 | return 0; | |
9599 | } | |
9600 | _ACEOF | |
05ea2a05 TT |
9601 | if ac_fn_c_try_compile "$LINENO"; then : |
9602 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
9603 | else | |
9604 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
01027315 TT |
9605 | |
9606 | fi | |
05ea2a05 TT |
9607 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9608 | fi | |
01027315 | 9609 | |
05ea2a05 | 9610 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
01027315 | 9611 | |
05ea2a05 | 9612 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
01027315 | 9613 | |
05ea2a05 TT |
9614 | fi |
9615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
9616 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
01027315 | 9617 | |
c8693053 RO |
9618 | |
9619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9620 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
9621 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
01027315 TT |
9622 | $as_echo_n "(cached) " >&6 |
9623 | else | |
05ea2a05 TT |
9624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9625 | /* end confdefs.h. */ | |
9626 | ||
9627 | #define _SYSCALL32 | |
05ea2a05 TT |
9628 | #include <sys/procfs.h> |
9629 | int | |
9630 | main () | |
9631 | { | |
9632 | fpregset_t avar | |
9633 | ; | |
9634 | return 0; | |
9635 | } | |
9636 | _ACEOF | |
9637 | if ac_fn_c_try_compile "$LINENO"; then : | |
9638 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
9639 | else | |
9640 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
01027315 TT |
9641 | |
9642 | fi | |
05ea2a05 | 9643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
01027315 TT |
9644 | fi |
9645 | ||
05ea2a05 TT |
9646 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
9647 | ||
9648 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
9649 | ||
9650 | fi | |
9651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
9652 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
9653 | ||
c8693053 RO |
9654 | |
9655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9656 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
9657 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
01027315 TT |
9658 | $as_echo_n "(cached) " >&6 |
9659 | else | |
9660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9661 | /* end confdefs.h. */ | |
05ea2a05 TT |
9662 | |
9663 | #define _SYSCALL32 | |
05ea2a05 | 9664 | #include <sys/procfs.h> |
01027315 TT |
9665 | int |
9666 | main () | |
9667 | { | |
05ea2a05 | 9668 | prgregset_t avar |
01027315 TT |
9669 | ; |
9670 | return 0; | |
9671 | } | |
9672 | _ACEOF | |
05ea2a05 TT |
9673 | if ac_fn_c_try_compile "$LINENO"; then : |
9674 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
01027315 | 9675 | else |
05ea2a05 | 9676 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
01027315 TT |
9677 | |
9678 | fi | |
05ea2a05 TT |
9679 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9680 | fi | |
01027315 | 9681 | |
05ea2a05 | 9682 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
01027315 | 9683 | |
05ea2a05 | 9684 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
01027315 | 9685 | |
05ea2a05 TT |
9686 | fi |
9687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
9688 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
01027315 | 9689 | |
c8693053 RO |
9690 | |
9691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9692 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
9693 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
01027315 TT |
9694 | $as_echo_n "(cached) " >&6 |
9695 | else | |
05ea2a05 TT |
9696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9697 | /* end confdefs.h. */ | |
01027315 | 9698 | |
05ea2a05 | 9699 | #define _SYSCALL32 |
05ea2a05 TT |
9700 | #include <sys/procfs.h> |
9701 | int | |
9702 | main () | |
9703 | { | |
9704 | prfpregset_t avar | |
9705 | ; | |
9706 | return 0; | |
9707 | } | |
9708 | _ACEOF | |
9709 | if ac_fn_c_try_compile "$LINENO"; then : | |
9710 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
01027315 | 9711 | else |
05ea2a05 | 9712 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
01027315 | 9713 | |
05ea2a05 TT |
9714 | fi |
9715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
01027315 TT |
9716 | fi |
9717 | ||
05ea2a05 | 9718 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
01027315 | 9719 | |
05ea2a05 | 9720 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
01027315 | 9721 | |
05ea2a05 TT |
9722 | fi |
9723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
9724 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
01027315 | 9725 | |
c8693053 RO |
9726 | |
9727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9728 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
9729 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
9730 | $as_echo_n "(cached) " >&6 | |
9731 | else | |
9732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9733 | /* end confdefs.h. */ | |
01027315 | 9734 | |
05ea2a05 | 9735 | #define _SYSCALL32 |
05ea2a05 TT |
9736 | #include <sys/procfs.h> |
9737 | int | |
9738 | main () | |
9739 | { | |
9740 | prgregset32_t avar | |
9741 | ; | |
9742 | return 0; | |
9743 | } | |
9744 | _ACEOF | |
9745 | if ac_fn_c_try_compile "$LINENO"; then : | |
9746 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
01027315 | 9747 | else |
05ea2a05 TT |
9748 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
9749 | ||
9750 | fi | |
9751 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
01027315 | 9752 | fi |
01027315 | 9753 | |
05ea2a05 | 9754 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
01027315 | 9755 | |
05ea2a05 TT |
9756 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
9757 | ||
9758 | fi | |
9759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
9760 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
9761 | ||
c8693053 RO |
9762 | |
9763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9764 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
9765 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
01027315 TT |
9766 | $as_echo_n "(cached) " >&6 |
9767 | else | |
9768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9769 | /* end confdefs.h. */ | |
05ea2a05 TT |
9770 | |
9771 | #define _SYSCALL32 | |
05ea2a05 | 9772 | #include <sys/procfs.h> |
01027315 TT |
9773 | int |
9774 | main () | |
9775 | { | |
05ea2a05 | 9776 | lwpid_t avar |
01027315 TT |
9777 | ; |
9778 | return 0; | |
9779 | } | |
9780 | _ACEOF | |
05ea2a05 TT |
9781 | if ac_fn_c_try_compile "$LINENO"; then : |
9782 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
01027315 | 9783 | else |
05ea2a05 TT |
9784 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
9785 | ||
01027315 TT |
9786 | fi |
9787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9788 | fi | |
01027315 | 9789 | |
05ea2a05 | 9790 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
01027315 | 9791 | |
05ea2a05 | 9792 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
01027315 | 9793 | |
05ea2a05 TT |
9794 | fi |
9795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
9796 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
01027315 | 9797 | |
c8693053 RO |
9798 | |
9799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9800 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
9801 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
9802 | $as_echo_n "(cached) " >&6 | |
9803 | else | |
9804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9805 | /* end confdefs.h. */ | |
01027315 | 9806 | |
05ea2a05 | 9807 | #define _SYSCALL32 |
05ea2a05 TT |
9808 | #include <sys/procfs.h> |
9809 | int | |
9810 | main () | |
9811 | { | |
9812 | psaddr_t avar | |
9813 | ; | |
9814 | return 0; | |
9815 | } | |
9816 | _ACEOF | |
9817 | if ac_fn_c_try_compile "$LINENO"; then : | |
9818 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
9819 | else | |
9820 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
01027315 | 9821 | |
05ea2a05 TT |
9822 | fi |
9823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9824 | fi | |
01027315 | 9825 | |
05ea2a05 | 9826 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
01027315 | 9827 | |
05ea2a05 TT |
9828 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
9829 | ||
9830 | fi | |
9831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
9832 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
9833 | ||
c8693053 RO |
9834 | |
9835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
9836 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
9837 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
01027315 TT |
9838 | $as_echo_n "(cached) " >&6 |
9839 | else | |
9840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9841 | /* end confdefs.h. */ | |
9842 | ||
05ea2a05 | 9843 | #define _SYSCALL32 |
05ea2a05 | 9844 | #include <sys/procfs.h> |
01027315 TT |
9845 | int |
9846 | main () | |
9847 | { | |
05ea2a05 | 9848 | elf_fpregset_t avar |
01027315 TT |
9849 | ; |
9850 | return 0; | |
9851 | } | |
9852 | _ACEOF | |
9853 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 9854 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
01027315 | 9855 | else |
05ea2a05 TT |
9856 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
9857 | ||
01027315 TT |
9858 | fi |
9859 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9860 | fi | |
01027315 | 9861 | |
05ea2a05 TT |
9862 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
9863 | ||
9864 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h | |
9865 | ||
9866 | fi | |
9867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
9868 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
01027315 | 9869 | |
3684d331 | 9870 | fi |
01027315 TT |
9871 | |
9872 | ||
9873 | # Check whether we will enable the inclusion of unit tests when | |
9874 | # compiling GDB. | |
9875 | # | |
9876 | # The default value of this option changes depending whether we're on | |
9877 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
9878 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
9879 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
9880 | |
9881 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
9882 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
9883 | fi | |
9884 | ||
01027315 TT |
9885 | # Check whether --enable-unit-tests was given. |
9886 | if test "${enable_unit_tests+set}" = set; then : | |
9887 | enableval=$enable_unit_tests; case "${enableval}" in | |
9888 | yes) enable_unittests=true ;; | |
9889 | no) enable_unittests=false ;; | |
9890 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
9891 | esac | |
9892 | else | |
9893 | enable_unittests=$development | |
9894 | fi | |
9895 | ||
9896 | ||
9897 | if $enable_unittests; then | |
9898 | ||
9899 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
9900 | ||
9901 | ||
9902 | fi | |
9903 | ||
9904 | if $enable_unittests; then | |
9905 | SELFTEST_TRUE= | |
9906 | SELFTEST_FALSE='#' | |
9907 | else | |
9908 | SELFTEST_TRUE='#' | |
9909 | SELFTEST_FALSE= | |
9910 | fi | |
9911 | ||
9912 | ||
05ea2a05 TT |
9913 | # Check the return and argument types of ptrace. |
9914 | ||
9915 | ||
9916 | for ac_header in sys/ptrace.h ptrace.h | |
9917 | do : | |
9918 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9919 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9920 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9921 | cat >>confdefs.h <<_ACEOF | |
9922 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9923 | _ACEOF | |
9924 | ||
9925 | fi | |
9926 | ||
9927 | done | |
9928 | ||
9929 | ||
9930 | gdb_ptrace_headers=' | |
9931 | #include <sys/types.h> | |
9932 | #if HAVE_SYS_PTRACE_H | |
9933 | # include <sys/ptrace.h> | |
9934 | #endif | |
9935 | #if HAVE_UNISTD_H | |
9936 | # include <unistd.h> | |
9937 | #endif | |
9938 | ' | |
05ea2a05 TT |
9939 | |
9940 | # Check return type. Varargs (used on GNU/Linux) conflict with the | |
9941 | # empty argument list, so check for that explicitly. | |
9942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
9943 | $as_echo_n "checking return type of ptrace... " >&6; } | |
9944 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
9945 | $as_echo_n "(cached) " >&6 | |
9946 | else | |
9947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9948 | /* end confdefs.h. */ | |
5164c117 | 9949 | Â $gdb_ptrace_headers |
05ea2a05 TT |
9950 | int |
9951 | main () | |
9952 | { | |
9953 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 9954 | |
05ea2a05 TT |
9955 | ; |
9956 | return 0; | |
9957 | } | |
9958 | _ACEOF | |
9959 | if ac_fn_c_try_compile "$LINENO"; then : | |
9960 | gdb_cv_func_ptrace_ret='long' | |
9961 | else | |
9962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9963 | /* end confdefs.h. */ | |
9964 | $gdb_ptrace_headers | |
9965 | int | |
9966 | main () | |
9967 | { | |
9968 | extern int ptrace (); | |
5164c117 | 9969 | |
05ea2a05 TT |
9970 | ; |
9971 | return 0; | |
9972 | } | |
9973 | _ACEOF | |
9974 | if ac_fn_c_try_compile "$LINENO"; then : | |
9975 | gdb_cv_func_ptrace_ret='int' | |
9976 | else | |
9977 | gdb_cv_func_ptrace_ret='long' | |
b6fb30ed | 9978 | |
05ea2a05 TT |
9979 | fi |
9980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 9981 | |
05ea2a05 TT |
9982 | fi |
9983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 9984 | |
05ea2a05 TT |
9985 | fi |
9986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 | |
9987 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
9988 | ||
b6fb30ed | 9989 | |
05ea2a05 TT |
9990 | cat >>confdefs.h <<_ACEOF |
9991 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
9992 | _ACEOF | |
9993 | ||
b6fb30ed | 9994 | |
05ea2a05 TT |
9995 | # Check argument types. |
9996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
9997 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
9998 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
9999 | $as_echo_n "(cached) " >&6 | |
10000 | else | |
05ea2a05 TT |
10001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10002 | /* end confdefs.h. */ | |
10003 | $gdb_ptrace_headers | |
10004 | int | |
10005 | main () | |
10006 | { | |
10007 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 10008 | |
05ea2a05 TT |
10009 | ; |
10010 | return 0; | |
10011 | } | |
10012 | _ACEOF | |
10013 | if ac_fn_c_try_compile "$LINENO"; then : | |
10014 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
10015 | else | |
b6fb30ed SM |
10016 | for gdb_arg1 in 'int' 'long'; do |
10017 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
10018 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
10019 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
10020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
10021 | /* end confdefs.h. */ |
10022 | $gdb_ptrace_headers | |
10023 | int | |
10024 | main () | |
10025 | { | |
b6fb30ed | 10026 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 10027 | |
05ea2a05 TT |
10028 | ; |
10029 | return 0; | |
10030 | } | |
10031 | _ACEOF | |
10032 | if ac_fn_c_try_compile "$LINENO"; then : | |
10033 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
b6fb30ed SM |
10034 | break 4; |
10035 | ||
05ea2a05 TT |
10036 | fi |
10037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
10038 | |
10039 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
10040 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
10041 | /* end confdefs.h. */ |
10042 | $gdb_ptrace_headers | |
10043 | int | |
10044 | main () | |
10045 | { | |
b6fb30ed | 10046 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 10047 | |
05ea2a05 TT |
10048 | ; |
10049 | return 0; | |
10050 | } | |
10051 | _ACEOF | |
10052 | if ac_fn_c_try_compile "$LINENO"; then : | |
b6fb30ed SM |
10053 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
10054 | break 5; | |
05ea2a05 | 10055 | |
05ea2a05 TT |
10056 | fi |
10057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
10058 | done |
10059 | done | |
10060 | done | |
10061 | done | |
10062 | done | |
10063 | # Provide a safe default value. | |
10064 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
05ea2a05 TT |
10065 | |
10066 | fi | |
10067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 10068 | |
05ea2a05 TT |
10069 | fi |
10070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
10071 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 10072 | |
05ea2a05 TT |
10073 | ac_save_IFS=$IFS; IFS=',' |
10074 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10075 | IFS=$ac_save_IFS | |
10076 | shift | |
10077 | ||
10078 | cat >>confdefs.h <<_ACEOF | |
10079 | #define PTRACE_TYPE_ARG1 $1 | |
10080 | _ACEOF | |
10081 | ||
10082 | ||
10083 | cat >>confdefs.h <<_ACEOF | |
10084 | #define PTRACE_TYPE_ARG3 $3 | |
10085 | _ACEOF | |
10086 | ||
10087 | ||
10088 | cat >>confdefs.h <<_ACEOF | |
10089 | #define PTRACE_TYPE_ARG4 $4 | |
10090 | _ACEOF | |
10091 | ||
10092 | if test -n "$5"; then | |
10093 | ||
10094 | cat >>confdefs.h <<_ACEOF | |
10095 | #define PTRACE_TYPE_ARG5 $5 | |
10096 | _ACEOF | |
10097 | ||
10098 | fi | |
10099 | ||
10100 | ||
629c2962 SM |
10101 | # Detect support warning flags. |
10102 | ||
10103 | # Check whether --enable-werror was given. | |
10104 | if test "${enable_werror+set}" = set; then : | |
10105 | enableval=$enable_werror; case "${enableval}" in | |
10106 | yes | y) ERROR_ON_WARNING="yes" ;; | |
10107 | no | n) ERROR_ON_WARNING="no" ;; | |
10108 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; | |
10109 | esac | |
10110 | fi | |
10111 | ||
10112 | ||
10113 | # Enable -Werror by default when using gcc. Turn it off for releases. | |
10114 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
10115 | ERROR_ON_WARNING=yes | |
10116 | fi | |
10117 | ||
10118 | WERROR_CFLAGS="" | |
10119 | if test "${ERROR_ON_WARNING}" = yes ; then | |
10120 | WERROR_CFLAGS="-Werror" | |
10121 | fi | |
10122 | ||
10123 | # The options we'll try to enable. | |
10124 | build_warnings="-Wall -Wpointer-arith \ | |
10125 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ | |
10126 | -Wno-switch -Wno-char-subscripts \ | |
10127 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ | |
10128 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ | |
10129 | -Wno-mismatched-tags \ | |
10130 | -Wno-error=deprecated-register \ | |
10131 | -Wsuggest-override \ | |
10132 | -Wimplicit-fallthrough=3 \ | |
10133 | -Wduplicated-cond \ | |
10134 | -Wshadow=local \ | |
10135 | -Wdeprecated-copy \ | |
10136 | -Wdeprecated-copy-dtor \ | |
10137 | -Wredundant-move \ | |
8ddd8e0e | 10138 | -Wmissing-declarations \ |
a0761e34 | 10139 | -Wmissing-prototypes \ |
898e7f60 SM |
10140 | -Wstrict-null-sentinel \ |
10141 | " | |
629c2962 SM |
10142 | |
10143 | case "${host}" in | |
10144 | *-*-mingw32*) | |
10145 | # Enable -Wno-format by default when using gcc on mingw since many | |
10146 | # GCC versions complain about %I64. | |
10147 | build_warnings="$build_warnings -Wno-format" ;; | |
10148 | *-*-solaris*) | |
10149 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
10150 | # doesn't understand. | |
10151 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
10152 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
10153 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
10154 | *) | |
10155 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
10156 | # but there's a special case for this below. | |
10157 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
10158 | esac | |
10159 | ||
10160 | # Check whether --enable-build-warnings was given. | |
10161 | if test "${enable_build_warnings+set}" = set; then : | |
10162 | enableval=$enable_build_warnings; case "${enableval}" in | |
10163 | yes) ;; | |
10164 | no) build_warnings="-w";; | |
10165 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10166 | build_warnings="${build_warnings} ${t}";; | |
10167 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10168 | build_warnings="${t} ${build_warnings}";; | |
10169 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
10170 | esac | |
10171 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
10172 | echo "Setting compiler warning flags = $build_warnings" 6>&1 | |
10173 | fi | |
10174 | fi | |
10175 | # Check whether --enable-gdb-build-warnings was given. | |
10176 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
10177 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
10178 | yes) ;; | |
10179 | no) build_warnings="-w";; | |
10180 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10181 | build_warnings="${build_warnings} ${t}";; | |
10182 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10183 | build_warnings="${t} ${build_warnings}";; | |
10184 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
10185 | esac | |
10186 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
10187 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
10188 | fi | |
10189 | fi | |
10190 | ||
10191 | # The set of warnings supported by a C++ compiler is not the same as | |
10192 | # of the C compiler. | |
10193 | ac_ext=cpp | |
10194 | ac_cpp='$CXXCPP $CPPFLAGS' | |
10195 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
10196 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
10197 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
10198 | ||
10199 | ||
10200 | WARN_CFLAGS="" | |
10201 | if test "x${build_warnings}" != x -a "x$GCC" = xyes | |
10202 | then | |
10203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 | |
10204 | $as_echo_n "checking compiler warning flags... " >&6; } | |
10205 | # Separate out the -Werror flag as some files just cannot be | |
10206 | # compiled with it enabled. | |
10207 | for w in ${build_warnings}; do | |
10208 | # GCC does not complain about -Wno-unknown-warning. Invert | |
10209 | # and test -Wunknown-warning instead. | |
10210 | case $w in | |
10211 | -Wno-*) | |
10212 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
10213 | -Wformat-nonliteral) | |
10214 | # gcc requires -Wformat before -Wformat-nonliteral | |
10215 | # will work, so stick them together. | |
10216 | w="-Wformat $w" | |
10217 | wtest="$w" | |
10218 | ;; | |
10219 | *) | |
10220 | wtest=$w ;; | |
10221 | esac | |
10222 | ||
10223 | case $w in | |
10224 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
10225 | *) | |
10226 | # Check whether GCC accepts it. | |
10227 | saved_CFLAGS="$CFLAGS" | |
10228 | CFLAGS="$CFLAGS -Werror $wtest" | |
10229 | saved_CXXFLAGS="$CXXFLAGS" | |
10230 | CXXFLAGS="$CXXFLAGS -Werror $wtest" | |
10231 | if test "x$w" = "x-Wunused-variable"; then | |
10232 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
10233 | # fixed in GCC 4.9. This test is derived from the gdb | |
10234 | # source code that triggered this bug in GCC. | |
10235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10236 | /* end confdefs.h. */ | |
10237 | struct scoped_restore_base {}; | |
864ca435 SM |
10238 | struct scoped_restore_tmpl : public scoped_restore_base { |
10239 | ~scoped_restore_tmpl() {} | |
10240 | }; | |
629c2962 SM |
10241 | int |
10242 | main () | |
10243 | { | |
10244 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 10245 | |
629c2962 SM |
10246 | ; |
10247 | return 0; | |
10248 | } | |
10249 | _ACEOF | |
10250 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
10251 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
10252 | fi | |
10253 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10254 | else | |
10255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10256 | /* end confdefs.h. */ | |
10257 | ||
10258 | int | |
10259 | main () | |
10260 | { | |
10261 | ||
10262 | ; | |
10263 | return 0; | |
10264 | } | |
10265 | _ACEOF | |
10266 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
10267 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
10268 | fi | |
10269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10270 | fi | |
10271 | CFLAGS="$saved_CFLAGS" | |
10272 | CXXFLAGS="$saved_CXXFLAGS" | |
10273 | esac | |
10274 | done | |
10275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 | |
10276 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
10277 | fi | |
10278 | ||
10279 | ||
10280 | ||
10281 | ac_ext=c | |
10282 | ac_cpp='$CPP $CPPFLAGS' | |
10283 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
10284 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
10285 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
10286 | ||
10287 | ||
10288 | ||
01027315 TT |
10289 | TARGET_WORD_SIZE=`sed -n 's,#define BFD_ARCH_SIZE \(.*\)$,\1,p' ../bfd/bfd-in3.h` |
10290 | ||
10291 | cat >>confdefs.h <<_ACEOF | |
10292 | #define TARGET_WORD_SIZE $TARGET_WORD_SIZE | |
10293 | _ACEOF | |
10294 | ||
10295 | ||
10296 | case ${host} in | |
10297 | *mingw32*) | |
10298 | ||
10299 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
10300 | ||
10301 | ;; | |
10302 | esac | |
10303 | ||
10304 | ac_config_files="$ac_config_files Makefile" | |
10305 | ||
10306 | cat >confcache <<\_ACEOF | |
10307 | # This file is a shell script that caches the results of configure | |
10308 | # tests run on this system so they can be shared between configure | |
10309 | # scripts and configure runs, see configure's option --config-cache. | |
10310 | # It is not useful on other systems. If it contains results you don't | |
10311 | # want to keep, you may remove or edit it. | |
10312 | # | |
10313 | # config.status only pays attention to the cache file if you give it | |
10314 | # the --recheck option to rerun configure. | |
10315 | # | |
10316 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
10317 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
10318 | # following values. | |
10319 | ||
10320 | _ACEOF | |
10321 | ||
10322 | # The following way of writing the cache mishandles newlines in values, | |
10323 | # but we know of no workaround that is simple, portable, and efficient. | |
10324 | # So, we kill variables containing newlines. | |
10325 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10326 | # and sets the high bit in the cache file unless we assign to the vars. | |
10327 | ( | |
10328 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
10329 | eval ac_val=\$$ac_var | |
10330 | case $ac_val in #( | |
10331 | *${as_nl}*) | |
10332 | case $ac_var in #( | |
10333 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
10334 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
10335 | esac | |
10336 | case $ac_var in #( | |
10337 | _ | IFS | as_nl) ;; #( | |
10338 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
10339 | *) { eval $ac_var=; unset $ac_var;} ;; | |
10340 | esac ;; | |
10341 | esac | |
10342 | done | |
10343 | ||
10344 | (set) 2>&1 | | |
10345 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
10346 | *${as_nl}ac_space=\ *) | |
10347 | # `set' does not quote correctly, so add quotes: double-quote | |
10348 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
10349 | sed -n \ | |
10350 | "s/'/'\\\\''/g; | |
10351 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
10352 | ;; #( | |
10353 | *) | |
10354 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10355 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
10356 | ;; | |
10357 | esac | | |
10358 | sort | |
10359 | ) | | |
10360 | sed ' | |
10361 | /^ac_cv_env_/b end | |
10362 | t clear | |
10363 | :clear | |
10364 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
10365 | t end | |
10366 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
10367 | :end' >>confcache | |
10368 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
10369 | if test -w "$cache_file"; then | |
10370 | if test "x$cache_file" != "x/dev/null"; then | |
10371 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
10372 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
10373 | if test ! -f "$cache_file" || test -h "$cache_file"; then | |
10374 | cat confcache >"$cache_file" | |
10375 | else | |
10376 | case $cache_file in #( | |
10377 | */* | ?:*) | |
10378 | mv -f confcache "$cache_file"$$ && | |
10379 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
10380 | *) | |
10381 | mv -f confcache "$cache_file" ;; | |
10382 | esac | |
10383 | fi | |
10384 | fi | |
10385 | else | |
10386 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
10387 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
10388 | fi | |
10389 | fi | |
10390 | rm -f confcache | |
10391 | ||
10392 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10393 | # Let make expand exec_prefix. | |
10394 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10395 | ||
10396 | DEFS=-DHAVE_CONFIG_H | |
10397 | ||
10398 | ac_libobjs= | |
10399 | ac_ltlibobjs= | |
e41fda1d | 10400 | U= |
01027315 TT |
10401 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
10402 | # 1. Remove the extension, and $U if already installed. | |
10403 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
10404 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
10405 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
10406 | # will be set to the directory where LIBOBJS objects are built. | |
10407 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
10408 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
10409 | done | |
10410 | LIBOBJS=$ac_libobjs | |
10411 | ||
10412 | LTLIBOBJS=$ac_ltlibobjs | |
10413 | ||
10414 | ||
10415 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then | |
10416 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. | |
10417 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
10418 | fi | |
10419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 | |
10420 | $as_echo_n "checking that generated files are newer than configure... " >&6; } | |
10421 | if test -n "$am_sleep_pid"; then | |
10422 | # Hide warnings about reused PIDs. | |
10423 | wait $am_sleep_pid 2>/dev/null | |
10424 | fi | |
10425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 | |
10426 | $as_echo "done" >&6; } | |
10427 | if test -n "$EXEEXT"; then | |
10428 | am__EXEEXT_TRUE= | |
10429 | am__EXEEXT_FALSE='#' | |
10430 | else | |
10431 | am__EXEEXT_TRUE='#' | |
10432 | am__EXEEXT_FALSE= | |
10433 | fi | |
10434 | ||
10435 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
10436 | as_fn_error $? "conditional \"AMDEP\" was never defined. | |
10437 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
10438 | fi | |
10439 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
10440 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | |
10441 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
10442 | fi | |
10443 | if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then | |
10444 | as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. | |
10445 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
10446 | fi | |
01027315 TT |
10447 | if test -z "${SELFTEST_TRUE}" && test -z "${SELFTEST_FALSE}"; then |
10448 | as_fn_error $? "conditional \"SELFTEST\" was never defined. | |
10449 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
10450 | fi | |
10451 | ||
10452 | : "${CONFIG_STATUS=./config.status}" | |
10453 | ac_write_fail=0 | |
10454 | ac_clean_files_save=$ac_clean_files | |
10455 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
10456 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
10457 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
10458 | as_write_fail=0 | |
10459 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
10460 | #! $SHELL | |
10461 | # Generated by $as_me. | |
10462 | # Run this file to recreate the current configuration. | |
10463 | # Compiler output produced by configure, useful for debugging | |
10464 | # configure, is in config.log if it exists. | |
10465 | ||
10466 | debug=false | |
10467 | ac_cs_recheck=false | |
10468 | ac_cs_silent=false | |
10469 | ||
10470 | SHELL=\${CONFIG_SHELL-$SHELL} | |
10471 | export SHELL | |
10472 | _ASEOF | |
10473 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
10474 | ## -------------------- ## | |
10475 | ## M4sh Initialization. ## | |
10476 | ## -------------------- ## | |
10477 | ||
10478 | # Be more Bourne compatible | |
10479 | DUALCASE=1; export DUALCASE # for MKS sh | |
10480 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
10481 | emulate sh | |
10482 | NULLCMD=: | |
10483 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
10484 | # is contrary to our usage. Disable this feature. | |
10485 | alias -g '${1+"$@"}'='"$@"' | |
10486 | setopt NO_GLOB_SUBST | |
10487 | else | |
10488 | case `(set -o) 2>/dev/null` in #( | |
10489 | *posix*) : | |
10490 | set -o posix ;; #( | |
10491 | *) : | |
10492 | ;; | |
10493 | esac | |
10494 | fi | |
10495 | ||
10496 | ||
10497 | as_nl=' | |
10498 | ' | |
10499 | export as_nl | |
10500 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
10501 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
10502 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
10503 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
10504 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
10505 | # but without wasting forks for bash or zsh. | |
10506 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
10507 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10508 | as_echo='print -r --' | |
10509 | as_echo_n='print -rn --' | |
10510 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10511 | as_echo='printf %s\n' | |
10512 | as_echo_n='printf %s' | |
10513 | else | |
10514 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
10515 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
10516 | as_echo_n='/usr/ucb/echo -n' | |
10517 | else | |
10518 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
10519 | as_echo_n_body='eval | |
10520 | arg=$1; | |
10521 | case $arg in #( | |
10522 | *"$as_nl"*) | |
10523 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
10524 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
10525 | esac; | |
10526 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
10527 | ' | |
10528 | export as_echo_n_body | |
10529 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
10530 | fi | |
10531 | export as_echo_body | |
10532 | as_echo='sh -c $as_echo_body as_echo' | |
10533 | fi | |
10534 | ||
10535 | # The user is always right. | |
10536 | if test "${PATH_SEPARATOR+set}" != set; then | |
10537 | PATH_SEPARATOR=: | |
10538 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
10539 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
10540 | PATH_SEPARATOR=';' | |
10541 | } | |
10542 | fi | |
10543 | ||
10544 | ||
10545 | # IFS | |
10546 | # We need space, tab and new line, in precisely that order. Quoting is | |
10547 | # there to prevent editors from complaining about space-tab. | |
10548 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
10549 | # splitting by setting IFS to empty value.) | |
10550 | IFS=" "" $as_nl" | |
10551 | ||
10552 | # Find who we are. Look in the path if we contain no directory separator. | |
10553 | as_myself= | |
10554 | case $0 in #(( | |
10555 | *[\\/]* ) as_myself=$0 ;; | |
10556 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10557 | for as_dir in $PATH | |
10558 | do | |
10559 | IFS=$as_save_IFS | |
10560 | test -z "$as_dir" && as_dir=. | |
10561 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
10562 | done | |
10563 | IFS=$as_save_IFS | |
10564 | ||
10565 | ;; | |
10566 | esac | |
10567 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
10568 | # in which case we are not to be found in the path. | |
10569 | if test "x$as_myself" = x; then | |
10570 | as_myself=$0 | |
10571 | fi | |
10572 | if test ! -f "$as_myself"; then | |
10573 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
10574 | exit 1 | |
10575 | fi | |
10576 | ||
10577 | # Unset variables that we do not need and which cause bugs (e.g. in | |
10578 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
10579 | # suppresses any "Segmentation fault" message there. '((' could | |
10580 | # trigger a bug in pdksh 5.2.14. | |
10581 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
10582 | do eval test x\${$as_var+set} = xset \ | |
10583 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
10584 | done | |
10585 | PS1='$ ' | |
10586 | PS2='> ' | |
10587 | PS4='+ ' | |
10588 | ||
10589 | # NLS nuisances. | |
10590 | LC_ALL=C | |
10591 | export LC_ALL | |
10592 | LANGUAGE=C | |
10593 | export LANGUAGE | |
10594 | ||
10595 | # CDPATH. | |
10596 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
10597 | ||
10598 | ||
10599 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
10600 | # ---------------------------------------- | |
10601 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
10602 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
10603 | # script with STATUS, using 1 if that was 0. | |
10604 | as_fn_error () | |
10605 | { | |
10606 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
10607 | if test "$4"; then | |
10608 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
10609 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
10610 | fi | |
10611 | $as_echo "$as_me: error: $2" >&2 | |
10612 | as_fn_exit $as_status | |
10613 | } # as_fn_error | |
10614 | ||
10615 | ||
10616 | # as_fn_set_status STATUS | |
10617 | # ----------------------- | |
10618 | # Set $? to STATUS, without forking. | |
10619 | as_fn_set_status () | |
10620 | { | |
10621 | return $1 | |
10622 | } # as_fn_set_status | |
10623 | ||
10624 | # as_fn_exit STATUS | |
10625 | # ----------------- | |
10626 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
10627 | as_fn_exit () | |
10628 | { | |
10629 | set +e | |
10630 | as_fn_set_status $1 | |
10631 | exit $1 | |
10632 | } # as_fn_exit | |
10633 | ||
10634 | # as_fn_unset VAR | |
10635 | # --------------- | |
10636 | # Portably unset VAR. | |
10637 | as_fn_unset () | |
10638 | { | |
10639 | { eval $1=; unset $1;} | |
10640 | } | |
10641 | as_unset=as_fn_unset | |
10642 | # as_fn_append VAR VALUE | |
10643 | # ---------------------- | |
10644 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
10645 | # advantage of any shell optimizations that allow amortized linear growth over | |
10646 | # repeated appends, instead of the typical quadratic growth present in naive | |
10647 | # implementations. | |
10648 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
10649 | eval 'as_fn_append () | |
10650 | { | |
10651 | eval $1+=\$2 | |
10652 | }' | |
10653 | else | |
10654 | as_fn_append () | |
10655 | { | |
10656 | eval $1=\$$1\$2 | |
10657 | } | |
10658 | fi # as_fn_append | |
10659 | ||
10660 | # as_fn_arith ARG... | |
10661 | # ------------------ | |
10662 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
10663 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
10664 | # must be portable across $(()) and expr. | |
10665 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
10666 | eval 'as_fn_arith () | |
10667 | { | |
10668 | as_val=$(( $* )) | |
10669 | }' | |
10670 | else | |
10671 | as_fn_arith () | |
10672 | { | |
10673 | as_val=`expr "$@" || test $? -eq 1` | |
10674 | } | |
10675 | fi # as_fn_arith | |
10676 | ||
10677 | ||
10678 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
10679 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
10680 | as_expr=expr | |
10681 | else | |
10682 | as_expr=false | |
10683 | fi | |
10684 | ||
10685 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
10686 | as_basename=basename | |
10687 | else | |
10688 | as_basename=false | |
10689 | fi | |
10690 | ||
10691 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
10692 | as_dirname=dirname | |
10693 | else | |
10694 | as_dirname=false | |
10695 | fi | |
10696 | ||
10697 | as_me=`$as_basename -- "$0" || | |
10698 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
10699 | X"$0" : 'X\(//\)$' \| \ | |
10700 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
10701 | $as_echo X/"$0" | | |
10702 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
10703 | s//\1/ | |
10704 | q | |
10705 | } | |
10706 | /^X\/\(\/\/\)$/{ | |
10707 | s//\1/ | |
10708 | q | |
10709 | } | |
10710 | /^X\/\(\/\).*/{ | |
10711 | s//\1/ | |
10712 | q | |
10713 | } | |
10714 | s/.*/./; q'` | |
10715 | ||
10716 | # Avoid depending upon Character Ranges. | |
10717 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
10718 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
10719 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
10720 | as_cr_digits='0123456789' | |
10721 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
10722 | ||
10723 | ECHO_C= ECHO_N= ECHO_T= | |
10724 | case `echo -n x` in #((((( | |
10725 | -n*) | |
10726 | case `echo 'xy\c'` in | |
10727 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
10728 | xy) ECHO_C='\c';; | |
10729 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
10730 | ECHO_T=' ';; | |
10731 | esac;; | |
10732 | *) | |
10733 | ECHO_N='-n';; | |
10734 | esac | |
10735 | ||
10736 | rm -f conf$$ conf$$.exe conf$$.file | |
10737 | if test -d conf$$.dir; then | |
10738 | rm -f conf$$.dir/conf$$.file | |
10739 | else | |
10740 | rm -f conf$$.dir | |
10741 | mkdir conf$$.dir 2>/dev/null | |
10742 | fi | |
10743 | if (echo >conf$$.file) 2>/dev/null; then | |
10744 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
10745 | as_ln_s='ln -s' | |
10746 | # ... but there are two gotchas: | |
10747 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
10748 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
10749 | # In both cases, we have to default to `cp -pR'. | |
10750 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
10751 | as_ln_s='cp -pR' | |
10752 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
10753 | as_ln_s=ln | |
10754 | else | |
10755 | as_ln_s='cp -pR' | |
10756 | fi | |
10757 | else | |
10758 | as_ln_s='cp -pR' | |
10759 | fi | |
10760 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
10761 | rmdir conf$$.dir 2>/dev/null | |
10762 | ||
10763 | ||
10764 | # as_fn_mkdir_p | |
10765 | # ------------- | |
10766 | # Create "$as_dir" as a directory, including parents if necessary. | |
10767 | as_fn_mkdir_p () | |
10768 | { | |
10769 | ||
10770 | case $as_dir in #( | |
10771 | -*) as_dir=./$as_dir;; | |
10772 | esac | |
10773 | test -d "$as_dir" || eval $as_mkdir_p || { | |
10774 | as_dirs= | |
10775 | while :; do | |
10776 | case $as_dir in #( | |
10777 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
10778 | *) as_qdir=$as_dir;; | |
10779 | esac | |
10780 | as_dirs="'$as_qdir' $as_dirs" | |
10781 | as_dir=`$as_dirname -- "$as_dir" || | |
10782 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
10783 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
10784 | X"$as_dir" : 'X\(//\)$' \| \ | |
10785 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
10786 | $as_echo X"$as_dir" | | |
10787 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
10788 | s//\1/ | |
10789 | q | |
10790 | } | |
10791 | /^X\(\/\/\)[^/].*/{ | |
10792 | s//\1/ | |
10793 | q | |
10794 | } | |
10795 | /^X\(\/\/\)$/{ | |
10796 | s//\1/ | |
10797 | q | |
10798 | } | |
10799 | /^X\(\/\).*/{ | |
10800 | s//\1/ | |
10801 | q | |
10802 | } | |
10803 | s/.*/./; q'` | |
10804 | test -d "$as_dir" && break | |
10805 | done | |
10806 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
10807 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
10808 | ||
10809 | ||
10810 | } # as_fn_mkdir_p | |
10811 | if mkdir -p . 2>/dev/null; then | |
10812 | as_mkdir_p='mkdir -p "$as_dir"' | |
10813 | else | |
10814 | test -d ./-p && rmdir ./-p | |
10815 | as_mkdir_p=false | |
10816 | fi | |
10817 | ||
10818 | ||
10819 | # as_fn_executable_p FILE | |
10820 | # ----------------------- | |
10821 | # Test if FILE is an executable regular file. | |
10822 | as_fn_executable_p () | |
10823 | { | |
10824 | test -f "$1" && test -x "$1" | |
10825 | } # as_fn_executable_p | |
10826 | as_test_x='test -x' | |
10827 | as_executable_p=as_fn_executable_p | |
10828 | ||
10829 | # Sed expression to map a string onto a valid CPP name. | |
10830 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
10831 | ||
10832 | # Sed expression to map a string onto a valid variable name. | |
10833 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
10834 | ||
10835 | ||
10836 | exec 6>&1 | |
10837 | ## ----------------------------------- ## | |
10838 | ## Main body of $CONFIG_STATUS script. ## | |
10839 | ## ----------------------------------- ## | |
10840 | _ASEOF | |
10841 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
10842 | ||
10843 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
10844 | # Save the log message, to keep $0 and so on meaningful, and to | |
10845 | # report actual input values of CONFIG_FILES etc. instead of their | |
10846 | # values after options handling. | |
10847 | ac_log=" | |
10848 | This file was extended by gdbsupport $as_me 1.0, which was | |
10849 | generated by GNU Autoconf 2.69. Invocation command line was | |
10850 | ||
10851 | CONFIG_FILES = $CONFIG_FILES | |
10852 | CONFIG_HEADERS = $CONFIG_HEADERS | |
10853 | CONFIG_LINKS = $CONFIG_LINKS | |
10854 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
10855 | $ $0 $@ | |
10856 | ||
10857 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
10858 | " | |
10859 | ||
10860 | _ACEOF | |
10861 | ||
10862 | case $ac_config_files in *" | |
10863 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
10864 | esac | |
10865 | ||
10866 | case $ac_config_headers in *" | |
10867 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
10868 | esac | |
10869 | ||
10870 | ||
10871 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
10872 | # Files that config.status was made for. | |
10873 | config_files="$ac_config_files" | |
10874 | config_headers="$ac_config_headers" | |
10875 | config_commands="$ac_config_commands" | |
10876 | ||
10877 | _ACEOF | |
10878 | ||
10879 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
10880 | ac_cs_usage="\ | |
10881 | \`$as_me' instantiates files and other configuration actions | |
10882 | from templates according to the current configuration. Unless the files | |
10883 | and actions are specified as TAGs, all are instantiated by default. | |
10884 | ||
10885 | Usage: $0 [OPTION]... [TAG]... | |
10886 | ||
10887 | -h, --help print this help, then exit | |
10888 | -V, --version print version number and configuration settings, then exit | |
10889 | --config print configuration, then exit | |
10890 | -q, --quiet, --silent | |
10891 | do not print progress messages | |
10892 | -d, --debug don't remove temporary files | |
10893 | --recheck update $as_me by reconfiguring in the same conditions | |
10894 | --file=FILE[:TEMPLATE] | |
10895 | instantiate the configuration file FILE | |
10896 | --header=FILE[:TEMPLATE] | |
10897 | instantiate the configuration header FILE | |
10898 | ||
10899 | Configuration files: | |
10900 | $config_files | |
10901 | ||
10902 | Configuration headers: | |
10903 | $config_headers | |
10904 | ||
10905 | Configuration commands: | |
10906 | $config_commands | |
10907 | ||
10908 | Report bugs to the package provider." | |
10909 | ||
10910 | _ACEOF | |
10911 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
10912 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
10913 | ac_cs_version="\\ | |
10914 | gdbsupport config.status 1.0 | |
10915 | configured by $0, generated by GNU Autoconf 2.69, | |
10916 | with options \\"\$ac_cs_config\\" | |
10917 | ||
10918 | Copyright (C) 2012 Free Software Foundation, Inc. | |
10919 | This config.status script is free software; the Free Software Foundation | |
10920 | gives unlimited permission to copy, distribute and modify it." | |
10921 | ||
10922 | ac_pwd='$ac_pwd' | |
10923 | srcdir='$srcdir' | |
10924 | INSTALL='$INSTALL' | |
10925 | MKDIR_P='$MKDIR_P' | |
10926 | AWK='$AWK' | |
10927 | test -n "\$AWK" || AWK=awk | |
10928 | _ACEOF | |
10929 | ||
10930 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
10931 | # The default lists apply if the user does not specify any file. | |
10932 | ac_need_defaults=: | |
10933 | while test $# != 0 | |
10934 | do | |
10935 | case $1 in | |
10936 | --*=?*) | |
10937 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
10938 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
10939 | ac_shift=: | |
10940 | ;; | |
10941 | --*=) | |
10942 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
10943 | ac_optarg= | |
10944 | ac_shift=: | |
10945 | ;; | |
10946 | *) | |
10947 | ac_option=$1 | |
10948 | ac_optarg=$2 | |
10949 | ac_shift=shift | |
10950 | ;; | |
10951 | esac | |
10952 | ||
10953 | case $ac_option in | |
10954 | # Handling of the options. | |
10955 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10956 | ac_cs_recheck=: ;; | |
10957 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
10958 | $as_echo "$ac_cs_version"; exit ;; | |
10959 | --config | --confi | --conf | --con | --co | --c ) | |
10960 | $as_echo "$ac_cs_config"; exit ;; | |
10961 | --debug | --debu | --deb | --de | --d | -d ) | |
10962 | debug=: ;; | |
10963 | --file | --fil | --fi | --f ) | |
10964 | $ac_shift | |
10965 | case $ac_optarg in | |
10966 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
10967 | '') as_fn_error $? "missing file argument" ;; | |
10968 | esac | |
10969 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
10970 | ac_need_defaults=false;; | |
10971 | --header | --heade | --head | --hea ) | |
10972 | $ac_shift | |
10973 | case $ac_optarg in | |
10974 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
10975 | esac | |
10976 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
10977 | ac_need_defaults=false;; | |
10978 | --he | --h) | |
10979 | # Conflict between --help and --header | |
10980 | as_fn_error $? "ambiguous option: \`$1' | |
10981 | Try \`$0 --help' for more information.";; | |
10982 | --help | --hel | -h ) | |
10983 | $as_echo "$ac_cs_usage"; exit ;; | |
10984 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
10985 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
10986 | ac_cs_silent=: ;; | |
10987 | ||
10988 | # This is an error. | |
10989 | -*) as_fn_error $? "unrecognized option: \`$1' | |
10990 | Try \`$0 --help' for more information." ;; | |
10991 | ||
10992 | *) as_fn_append ac_config_targets " $1" | |
10993 | ac_need_defaults=false ;; | |
10994 | ||
10995 | esac | |
10996 | shift | |
10997 | done | |
10998 | ||
10999 | ac_configure_extra_args= | |
11000 | ||
11001 | if $ac_cs_silent; then | |
11002 | exec 6>/dev/null | |
11003 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
11004 | fi | |
11005 | ||
11006 | _ACEOF | |
11007 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11008 | if \$ac_cs_recheck; then | |
11009 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
11010 | shift | |
11011 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
11012 | CONFIG_SHELL='$SHELL' | |
11013 | export CONFIG_SHELL | |
11014 | exec "\$@" | |
11015 | fi | |
11016 | ||
11017 | _ACEOF | |
11018 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11019 | exec 5>>config.log | |
11020 | { | |
11021 | echo | |
11022 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
11023 | ## Running $as_me. ## | |
11024 | _ASBOX | |
11025 | $as_echo "$ac_log" | |
11026 | } >&5 | |
11027 | ||
11028 | _ACEOF | |
11029 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11030 | # | |
11031 | # INIT-COMMANDS | |
11032 | # | |
11033 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | |
11034 | ||
11035 | _ACEOF | |
11036 | ||
11037 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11038 | ||
11039 | # Handling of arguments. | |
11040 | for ac_config_target in $ac_config_targets | |
11041 | do | |
11042 | case $ac_config_target in | |
3684d331 | 11043 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; |
01027315 TT |
11044 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
11045 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
11046 | ||
11047 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
11048 | esac | |
11049 | done | |
11050 | ||
11051 | ||
11052 | # If the user did not use the arguments to specify the items to instantiate, | |
11053 | # then the envvar interface is used. Set only those that are not. | |
11054 | # We use the long form for the default assignment because of an extremely | |
11055 | # bizarre bug on SunOS 4.1.3. | |
11056 | if $ac_need_defaults; then | |
11057 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
11058 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
11059 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
11060 | fi | |
11061 | ||
11062 | # Have a temporary directory for convenience. Make it in the build tree | |
11063 | # simply because there is no reason against having it here, and in addition, | |
11064 | # creating and moving files from /tmp can sometimes cause problems. | |
11065 | # Hook for its removal unless debugging. | |
11066 | # Note that there is a small window in which the directory will not be cleaned: | |
11067 | # after its creation but before its name has been assigned to `$tmp'. | |
11068 | $debug || | |
11069 | { | |
11070 | tmp= ac_tmp= | |
11071 | trap 'exit_status=$? | |
11072 | : "${ac_tmp:=$tmp}" | |
11073 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
11074 | ' 0 | |
11075 | trap 'as_fn_exit 1' 1 2 13 15 | |
11076 | } | |
11077 | # Create a (secure) tmp directory for tmp files. | |
11078 | ||
11079 | { | |
11080 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
11081 | test -d "$tmp" | |
11082 | } || | |
11083 | { | |
11084 | tmp=./conf$$-$RANDOM | |
11085 | (umask 077 && mkdir "$tmp") | |
11086 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 | |
11087 | ac_tmp=$tmp | |
11088 | ||
11089 | # Set up the scripts for CONFIG_FILES section. | |
11090 | # No need to generate them if there are no CONFIG_FILES. | |
11091 | # This happens for instance with `./config.status config.h'. | |
11092 | if test -n "$CONFIG_FILES"; then | |
11093 | ||
11094 | ||
11095 | ac_cr=`echo X | tr X '\015'` | |
11096 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
11097 | # But we know of no other shell where ac_cr would be empty at this | |
11098 | # point, so we can use a bashism as a fallback. | |
11099 | if test "x$ac_cr" = x; then | |
11100 | eval ac_cr=\$\'\\r\' | |
11101 | fi | |
11102 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
11103 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
11104 | ac_cs_awk_cr='\\r' | |
11105 | else | |
11106 | ac_cs_awk_cr=$ac_cr | |
11107 | fi | |
11108 | ||
11109 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && | |
11110 | _ACEOF | |
11111 | ||
11112 | ||
11113 | { | |
11114 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
11115 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
11116 | echo "_ACEOF" | |
11117 | } >conf$$subs.sh || | |
11118 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
11119 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
11120 | ac_delim='%!_!# ' | |
11121 | for ac_last_try in false false false false false :; do | |
11122 | . ./conf$$subs.sh || | |
11123 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
11124 | ||
11125 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
11126 | if test $ac_delim_n = $ac_delim_num; then | |
11127 | break | |
11128 | elif $ac_last_try; then | |
11129 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
11130 | else | |
11131 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
11132 | fi | |
11133 | done | |
11134 | rm -f conf$$subs.sh | |
11135 | ||
11136 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11137 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && | |
11138 | _ACEOF | |
11139 | sed -n ' | |
11140 | h | |
11141 | s/^/S["/; s/!.*/"]=/ | |
11142 | p | |
11143 | g | |
11144 | s/^[^!]*!// | |
11145 | :repl | |
11146 | t repl | |
11147 | s/'"$ac_delim"'$// | |
11148 | t delim | |
11149 | :nl | |
11150 | h | |
11151 | s/\(.\{148\}\)..*/\1/ | |
11152 | t more1 | |
11153 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
11154 | p | |
11155 | n | |
11156 | b repl | |
11157 | :more1 | |
11158 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11159 | p | |
11160 | g | |
11161 | s/.\{148\}// | |
11162 | t nl | |
11163 | :delim | |
11164 | h | |
11165 | s/\(.\{148\}\)..*/\1/ | |
11166 | t more2 | |
11167 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
11168 | p | |
11169 | b | |
11170 | :more2 | |
11171 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11172 | p | |
11173 | g | |
11174 | s/.\{148\}// | |
11175 | t delim | |
11176 | ' <conf$$subs.awk | sed ' | |
11177 | /^[^""]/{ | |
11178 | N | |
11179 | s/\n// | |
11180 | } | |
11181 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
11182 | rm -f conf$$subs.awk | |
11183 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11184 | _ACAWK | |
11185 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && | |
11186 | for (key in S) S_is_set[key] = 1 | |
11187 | FS = "\a" | |
11188 | ||
11189 | } | |
11190 | { | |
11191 | line = $ 0 | |
11192 | nfields = split(line, field, "@") | |
11193 | substed = 0 | |
11194 | len = length(field[1]) | |
11195 | for (i = 2; i < nfields; i++) { | |
11196 | key = field[i] | |
11197 | keylen = length(key) | |
11198 | if (S_is_set[key]) { | |
11199 | value = S[key] | |
11200 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
11201 | len += length(value) + length(field[++i]) | |
11202 | substed = 1 | |
11203 | } else | |
11204 | len += 1 + keylen | |
11205 | } | |
11206 | ||
11207 | print line | |
11208 | } | |
11209 | ||
11210 | _ACAWK | |
11211 | _ACEOF | |
11212 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11213 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
11214 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
11215 | else | |
11216 | cat | |
11217 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ | |
11218 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
11219 | _ACEOF | |
11220 | ||
11221 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), | |
11222 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
11223 | # trailing colons and then remove the whole line if VPATH becomes empty | |
11224 | # (actually we leave an empty line to preserve line numbers). | |
11225 | if test "x$srcdir" = x.; then | |
11226 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ | |
11227 | h | |
11228 | s/// | |
11229 | s/^/:/ | |
11230 | s/[ ]*$/:/ | |
11231 | s/:\$(srcdir):/:/g | |
11232 | s/:\${srcdir}:/:/g | |
11233 | s/:@srcdir@:/:/g | |
11234 | s/^:*// | |
11235 | s/:*$// | |
11236 | x | |
11237 | s/\(=[ ]*\).*/\1/ | |
11238 | G | |
11239 | s/\n// | |
11240 | s/^[^=]*=[ ]*$// | |
11241 | }' | |
11242 | fi | |
11243 | ||
11244 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11245 | fi # test -n "$CONFIG_FILES" | |
11246 | ||
11247 | # Set up the scripts for CONFIG_HEADERS section. | |
11248 | # No need to generate them if there are no CONFIG_HEADERS. | |
11249 | # This happens for instance with `./config.status Makefile'. | |
11250 | if test -n "$CONFIG_HEADERS"; then | |
11251 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || | |
11252 | BEGIN { | |
11253 | _ACEOF | |
11254 | ||
11255 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
11256 | # here-document in config.status, that substitutes the proper values into | |
11257 | # config.h.in to produce config.h. | |
11258 | ||
11259 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
11260 | # handling of long lines. | |
11261 | ac_delim='%!_!# ' | |
11262 | for ac_last_try in false false :; do | |
11263 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` | |
11264 | if test -z "$ac_tt"; then | |
11265 | break | |
11266 | elif $ac_last_try; then | |
11267 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
11268 | else | |
11269 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
11270 | fi | |
11271 | done | |
11272 | ||
11273 | # For the awk script, D is an array of macro values keyed by name, | |
11274 | # likewise P contains macro parameters if any. Preserve backslash | |
11275 | # newline sequences. | |
11276 | ||
11277 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
11278 | sed -n ' | |
11279 | s/.\{148\}/&'"$ac_delim"'/g | |
11280 | t rset | |
11281 | :rset | |
11282 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
11283 | t def | |
11284 | d | |
11285 | :def | |
11286 | s/\\$// | |
11287 | t bsnl | |
11288 | s/["\\]/\\&/g | |
11289 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11290 | D["\1"]=" \3"/p | |
11291 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
11292 | d | |
11293 | :bsnl | |
11294 | s/["\\]/\\&/g | |
11295 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11296 | D["\1"]=" \3\\\\\\n"\\/p | |
11297 | t cont | |
11298 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
11299 | t cont | |
11300 | d | |
11301 | :cont | |
11302 | n | |
11303 | s/.\{148\}/&'"$ac_delim"'/g | |
11304 | t clear | |
11305 | :clear | |
11306 | s/\\$// | |
11307 | t bsnlc | |
11308 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
11309 | d | |
11310 | :bsnlc | |
11311 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
11312 | b cont | |
11313 | ' <confdefs.h | sed ' | |
11314 | s/'"$ac_delim"'/"\\\ | |
11315 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
11316 | ||
11317 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11318 | for (key in D) D_is_set[key] = 1 | |
11319 | FS = "\a" | |
11320 | } | |
11321 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
11322 | line = \$ 0 | |
11323 | split(line, arg, " ") | |
11324 | if (arg[1] == "#") { | |
11325 | defundef = arg[2] | |
11326 | mac1 = arg[3] | |
11327 | } else { | |
11328 | defundef = substr(arg[1], 2) | |
11329 | mac1 = arg[2] | |
11330 | } | |
11331 | split(mac1, mac2, "(") #) | |
11332 | macro = mac2[1] | |
11333 | prefix = substr(line, 1, index(line, defundef) - 1) | |
11334 | if (D_is_set[macro]) { | |
11335 | # Preserve the white space surrounding the "#". | |
11336 | print prefix "define", macro P[macro] D[macro] | |
11337 | next | |
11338 | } else { | |
11339 | # Replace #undef with comments. This is necessary, for example, | |
11340 | # in the case of _POSIX_SOURCE, which is predefined and required | |
11341 | # on some systems where configure will not decide to define it. | |
11342 | if (defundef == "undef") { | |
11343 | print "/*", prefix defundef, macro, "*/" | |
11344 | next | |
11345 | } | |
11346 | } | |
11347 | } | |
11348 | { print } | |
11349 | _ACAWK | |
11350 | _ACEOF | |
11351 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11352 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 | |
11353 | fi # test -n "$CONFIG_HEADERS" | |
11354 | ||
11355 | ||
11356 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
11357 | shift | |
11358 | for ac_tag | |
11359 | do | |
11360 | case $ac_tag in | |
11361 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
11362 | esac | |
11363 | case $ac_mode$ac_tag in | |
11364 | :[FHL]*:*);; | |
11365 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
11366 | :[FH]-) ac_tag=-:-;; | |
11367 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
11368 | esac | |
11369 | ac_save_IFS=$IFS | |
11370 | IFS=: | |
11371 | set x $ac_tag | |
11372 | IFS=$ac_save_IFS | |
11373 | shift | |
11374 | ac_file=$1 | |
11375 | shift | |
11376 | ||
11377 | case $ac_mode in | |
11378 | :L) ac_source=$1;; | |
11379 | :[FH]) | |
11380 | ac_file_inputs= | |
11381 | for ac_f | |
11382 | do | |
11383 | case $ac_f in | |
11384 | -) ac_f="$ac_tmp/stdin";; | |
11385 | *) # Look for the file first in the build tree, then in the source tree | |
11386 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
11387 | # because $ac_f cannot contain `:'. | |
11388 | test -f "$ac_f" || | |
11389 | case $ac_f in | |
11390 | [\\/$]*) false;; | |
11391 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
11392 | esac || | |
11393 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
11394 | esac | |
11395 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
11396 | as_fn_append ac_file_inputs " '$ac_f'" | |
11397 | done | |
11398 | ||
11399 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
11400 | # use $as_me), people would be surprised to read: | |
11401 | # /* config.h. Generated by config.status. */ | |
11402 | configure_input='Generated from '` | |
11403 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
11404 | `' by configure.' | |
11405 | if test x"$ac_file" != x-; then | |
11406 | configure_input="$ac_file. $configure_input" | |
11407 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
11408 | $as_echo "$as_me: creating $ac_file" >&6;} | |
11409 | fi | |
11410 | # Neutralize special characters interpreted by sed in replacement strings. | |
11411 | case $configure_input in #( | |
11412 | *\&* | *\|* | *\\* ) | |
11413 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
11414 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
11415 | *) ac_sed_conf_input=$configure_input;; | |
11416 | esac | |
11417 | ||
11418 | case $ac_tag in | |
11419 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ | |
11420 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
11421 | esac | |
11422 | ;; | |
11423 | esac | |
11424 | ||
11425 | ac_dir=`$as_dirname -- "$ac_file" || | |
11426 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11427 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
11428 | X"$ac_file" : 'X\(//\)$' \| \ | |
11429 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
11430 | $as_echo X"$ac_file" | | |
11431 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11432 | s//\1/ | |
11433 | q | |
11434 | } | |
11435 | /^X\(\/\/\)[^/].*/{ | |
11436 | s//\1/ | |
11437 | q | |
11438 | } | |
11439 | /^X\(\/\/\)$/{ | |
11440 | s//\1/ | |
11441 | q | |
11442 | } | |
11443 | /^X\(\/\).*/{ | |
11444 | s//\1/ | |
11445 | q | |
11446 | } | |
11447 | s/.*/./; q'` | |
11448 | as_dir="$ac_dir"; as_fn_mkdir_p | |
11449 | ac_builddir=. | |
11450 | ||
11451 | case "$ac_dir" in | |
11452 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11453 | *) | |
11454 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
11455 | # A ".." for each directory in $ac_dir_suffix. | |
11456 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
11457 | case $ac_top_builddir_sub in | |
11458 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11459 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
11460 | esac ;; | |
11461 | esac | |
11462 | ac_abs_top_builddir=$ac_pwd | |
11463 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
11464 | # for backward compatibility: | |
11465 | ac_top_builddir=$ac_top_build_prefix | |
11466 | ||
11467 | case $srcdir in | |
11468 | .) # We are building in place. | |
11469 | ac_srcdir=. | |
11470 | ac_top_srcdir=$ac_top_builddir_sub | |
11471 | ac_abs_top_srcdir=$ac_pwd ;; | |
11472 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
11473 | ac_srcdir=$srcdir$ac_dir_suffix; | |
11474 | ac_top_srcdir=$srcdir | |
11475 | ac_abs_top_srcdir=$srcdir ;; | |
11476 | *) # Relative name. | |
11477 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
11478 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
11479 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
11480 | esac | |
11481 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
11482 | ||
11483 | ||
11484 | case $ac_mode in | |
11485 | :F) | |
11486 | # | |
11487 | # CONFIG_FILE | |
11488 | # | |
11489 | ||
11490 | case $INSTALL in | |
11491 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
11492 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
11493 | esac | |
11494 | ac_MKDIR_P=$MKDIR_P | |
11495 | case $MKDIR_P in | |
11496 | [\\/$]* | ?:[\\/]* ) ;; | |
11497 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
11498 | esac | |
11499 | _ACEOF | |
11500 | ||
11501 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11502 | # If the template does not know about datarootdir, expand it. | |
11503 | # FIXME: This hack should be removed a few years after 2.60. | |
11504 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
11505 | ac_sed_dataroot=' | |
11506 | /datarootdir/ { | |
11507 | p | |
11508 | q | |
11509 | } | |
11510 | /@datadir@/p | |
11511 | /@docdir@/p | |
11512 | /@infodir@/p | |
11513 | /@localedir@/p | |
11514 | /@mandir@/p' | |
11515 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
11516 | *datarootdir*) ac_datarootdir_seen=yes;; | |
11517 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
11518 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
11519 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
11520 | _ACEOF | |
11521 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11522 | ac_datarootdir_hack=' | |
11523 | s&@datadir@&$datadir&g | |
11524 | s&@docdir@&$docdir&g | |
11525 | s&@infodir@&$infodir&g | |
11526 | s&@localedir@&$localedir&g | |
11527 | s&@mandir@&$mandir&g | |
11528 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
11529 | esac | |
11530 | _ACEOF | |
11531 | ||
11532 | # Neutralize VPATH when `$srcdir' = `.'. | |
11533 | # Shell code in configure.ac might set extrasub. | |
11534 | # FIXME: do we really want to maintain this feature? | |
11535 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11536 | ac_sed_extra="$ac_vpsub | |
11537 | $extrasub | |
11538 | _ACEOF | |
11539 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11540 | :t | |
11541 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
11542 | s|@configure_input@|$ac_sed_conf_input|;t t | |
11543 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
11544 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
11545 | s&@srcdir@&$ac_srcdir&;t t | |
11546 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
11547 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
11548 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
11549 | s&@builddir@&$ac_builddir&;t t | |
11550 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
11551 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
11552 | s&@INSTALL@&$ac_INSTALL&;t t | |
11553 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
11554 | $ac_datarootdir_hack | |
11555 | " | |
11556 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ | |
11557 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11558 | ||
11559 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
11560 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && | |
11561 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
11562 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
11563 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
11564 | which seems to be undefined. Please make sure it is defined" >&5 | |
11565 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
11566 | which seems to be undefined. Please make sure it is defined" >&2;} | |
11567 | ||
11568 | rm -f "$ac_tmp/stdin" | |
11569 | case $ac_file in | |
11570 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; | |
11571 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
11572 | esac \ | |
11573 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11574 | ;; | |
11575 | :H) | |
11576 | # | |
11577 | # CONFIG_HEADER | |
11578 | # | |
11579 | if test x"$ac_file" != x-; then | |
11580 | { | |
11581 | $as_echo "/* $configure_input */" \ | |
11582 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" | |
11583 | } >"$ac_tmp/config.h" \ | |
11584 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11585 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
11586 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
11587 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
11588 | else | |
11589 | rm -f "$ac_file" | |
11590 | mv "$ac_tmp/config.h" "$ac_file" \ | |
11591 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11592 | fi | |
11593 | else | |
11594 | $as_echo "/* $configure_input */" \ | |
11595 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ | |
11596 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
11597 | fi | |
11598 | # Compute "$ac_file"'s index in $config_headers. | |
11599 | _am_arg="$ac_file" | |
11600 | _am_stamp_count=1 | |
11601 | for _am_header in $config_headers :; do | |
11602 | case $_am_header in | |
11603 | $_am_arg | $_am_arg:* ) | |
11604 | break ;; | |
11605 | * ) | |
11606 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
11607 | esac | |
11608 | done | |
11609 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
11610 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11611 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
11612 | X"$_am_arg" : 'X\(//\)$' \| \ | |
11613 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
11614 | $as_echo X"$_am_arg" | | |
11615 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11616 | s//\1/ | |
11617 | q | |
11618 | } | |
11619 | /^X\(\/\/\)[^/].*/{ | |
11620 | s//\1/ | |
11621 | q | |
11622 | } | |
11623 | /^X\(\/\/\)$/{ | |
11624 | s//\1/ | |
11625 | q | |
11626 | } | |
11627 | /^X\(\/\).*/{ | |
11628 | s//\1/ | |
11629 | q | |
11630 | } | |
11631 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
11632 | ;; | |
11633 | ||
11634 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
11635 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
11636 | ;; | |
11637 | esac | |
11638 | ||
11639 | ||
11640 | case $ac_file$ac_mode in | |
11641 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
11642 | # Older Autoconf quotes --file arguments for eval, but not when files | |
11643 | # are listed without --file. Let's play safe and only enable the eval | |
11644 | # if we detect the quoting. | |
11645 | case $CONFIG_FILES in | |
11646 | *\'*) eval set x "$CONFIG_FILES" ;; | |
11647 | *) set x $CONFIG_FILES ;; | |
11648 | esac | |
11649 | shift | |
11650 | for mf | |
11651 | do | |
11652 | # Strip MF so we end up with the name of the file. | |
11653 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
11654 | # Check whether this is an Automake generated Makefile or not. | |
11655 | # We used to match only the files named 'Makefile.in', but | |
11656 | # some people rename them; so instead we look at the file content. | |
11657 | # Grep'ing the first line is not enough: some people post-process | |
11658 | # each Makefile.in and add a new line on top of each file to say so. | |
11659 | # Grep'ing the whole file is not good either: AIX grep has a line | |
11660 | # limit of 2048, but all sed's we know have understand at least 4000. | |
11661 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
11662 | dirpart=`$as_dirname -- "$mf" || | |
11663 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11664 | X"$mf" : 'X\(//\)[^/]' \| \ | |
11665 | X"$mf" : 'X\(//\)$' \| \ | |
11666 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
11667 | $as_echo X"$mf" | | |
11668 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11669 | s//\1/ | |
11670 | q | |
11671 | } | |
11672 | /^X\(\/\/\)[^/].*/{ | |
11673 | s//\1/ | |
11674 | q | |
11675 | } | |
11676 | /^X\(\/\/\)$/{ | |
11677 | s//\1/ | |
11678 | q | |
11679 | } | |
11680 | /^X\(\/\).*/{ | |
11681 | s//\1/ | |
11682 | q | |
11683 | } | |
11684 | s/.*/./; q'` | |
11685 | else | |
11686 | continue | |
11687 | fi | |
11688 | # Extract the definition of DEPDIR, am__include, and am__quote | |
11689 | # from the Makefile without running 'make'. | |
11690 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
11691 | test -z "$DEPDIR" && continue | |
11692 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
11693 | test -z "$am__include" && continue | |
11694 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
11695 | # Find all dependency output files, they are included files with | |
11696 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
11697 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
11698 | # expansion. | |
11699 | for file in `sed -n " | |
11700 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
11701 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | |
11702 | # Make sure the directory exists. | |
11703 | test -f "$dirpart/$file" && continue | |
11704 | fdir=`$as_dirname -- "$file" || | |
11705 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11706 | X"$file" : 'X\(//\)[^/]' \| \ | |
11707 | X"$file" : 'X\(//\)$' \| \ | |
11708 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
11709 | $as_echo X"$file" | | |
11710 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11711 | s//\1/ | |
11712 | q | |
11713 | } | |
11714 | /^X\(\/\/\)[^/].*/{ | |
11715 | s//\1/ | |
11716 | q | |
11717 | } | |
11718 | /^X\(\/\/\)$/{ | |
11719 | s//\1/ | |
11720 | q | |
11721 | } | |
11722 | /^X\(\/\).*/{ | |
11723 | s//\1/ | |
11724 | q | |
11725 | } | |
11726 | s/.*/./; q'` | |
11727 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
11728 | # echo "creating $dirpart/$file" | |
11729 | echo '# dummy' > "$dirpart/$file" | |
11730 | done | |
11731 | done | |
11732 | } | |
11733 | ;; | |
11734 | ||
11735 | esac | |
11736 | done # for ac_tag | |
11737 | ||
11738 | ||
11739 | as_fn_exit 0 | |
11740 | _ACEOF | |
11741 | ac_clean_files=$ac_clean_files_save | |
11742 | ||
11743 | test $ac_write_fail = 0 || | |
11744 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
11745 | ||
11746 | ||
11747 | # configure is writing to config.log, and then calls config.status. | |
11748 | # config.status does its own redirection, appending to config.log. | |
11749 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
11750 | # by configure, so config.status won't be able to write to it; its | |
11751 | # output is simply discarded. So we exec the FD to /dev/null, | |
11752 | # effectively closing config.log, so it can be properly (re)opened and | |
11753 | # appended to by config.status. When coming back to configure, we | |
11754 | # need to make the FD available again. | |
11755 | if test "$no_create" != yes; then | |
11756 | ac_cs_success=: | |
11757 | ac_config_status_args= | |
11758 | test "$silent" = yes && | |
11759 | ac_config_status_args="$ac_config_status_args --quiet" | |
11760 | exec 5>/dev/null | |
11761 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
11762 | exec 5>>config.log | |
11763 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
11764 | # would make configure fail if this is the last instruction. | |
11765 | $ac_cs_success || as_fn_exit 1 | |
11766 | fi | |
11767 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
11768 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
11769 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
11770 | fi | |
11771 |