Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 593 | LIBOBJS |
b292c783 JK |
594 | GCORE_TRANSFORM_NAME |
595 | GDB_TRANSFORM_NAME | |
e3487908 | 596 | XSLTPROC |
81ecdfbb | 597 | GDB_NM_FILE |
393fd4c3 YQ |
598 | LTLIBBABELTRACE |
599 | LIBBABELTRACE | |
600 | HAVE_LIBBABELTRACE | |
81ecdfbb RW |
601 | frags |
602 | target_subdir | |
603 | CONFIG_UNINSTALL | |
604 | CONFIG_INSTALL | |
605 | CONFIG_CLEAN | |
606 | CONFIG_ALL | |
607 | CONFIG_SRCS | |
608 | CONFIG_DEPS | |
609 | CONFIG_OBS | |
610 | PROFILE_CFLAGS | |
611 | ENABLE_CFLAGS | |
612 | SIM_OBS | |
613 | SIM | |
614 | XMKMF | |
615 | GDBTK_SRC_DIR | |
616 | GDBTK_CFLAGS | |
617 | GDBTKLIBS | |
618 | X_LIBS | |
619 | X_LDFLAGS | |
620 | X_CFLAGS | |
621 | TK_XINCLUDES | |
622 | TK_DEPS | |
623 | TK_LIBRARY | |
624 | TK_INCLUDE | |
625 | TK_STUB_LIB_SPEC | |
626 | TK_STUB_LIB_FLAG | |
627 | TK_STUB_LIB_FILE | |
628 | TK_LIB_SPEC | |
629 | TK_LIB_FLAG | |
630 | TK_LIB_FILE | |
631 | TK_SRC_DIR | |
632 | TK_BIN_DIR | |
633 | TK_VERSION | |
634 | TCL_DEPS | |
635 | TCL_LIBRARY | |
636 | TCL_INCLUDE | |
637 | TCL_STUB_LIB_SPEC | |
638 | TCL_STUB_LIB_FLAG | |
639 | TCL_STUB_LIB_FILE | |
640 | TCL_LIB_SPEC | |
641 | TCL_LIB_FLAG | |
642 | TCL_LIB_FILE | |
643 | TCL_SRC_DIR | |
644 | TCL_BIN_DIR | |
645 | TCL_PATCH_LEVEL | |
646 | TCL_VERSION | |
647 | WIN32LDAPP | |
648 | GUI_CFLAGS_X | |
649 | LIBGUI | |
608e2dbb TT |
650 | LTLIBLZMA |
651 | LIBLZMA | |
652 | HAVE_LIBLZMA | |
81ecdfbb RW |
653 | WIN32LIBS |
654 | SER_HARDWIRE | |
655 | WERROR_CFLAGS | |
656 | WARN_CFLAGS | |
657 | SYSTEM_GDBINIT | |
81ecdfbb RW |
658 | TARGET_SYSTEM_ROOT |
659 | CONFIG_LDFLAGS | |
f6528abd | 660 | RDYNAMIC |
81ecdfbb | 661 | ALLOCA |
58bfce93 MM |
662 | LTLIBIPT |
663 | LIBIPT | |
664 | HAVE_LIBIPT | |
4df42755 DE |
665 | HAVE_GUILE_FALSE |
666 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
667 | GUILE_LIBS |
668 | GUILE_CPPFLAGS | |
e76c5d17 DE |
669 | GUILD_TARGET_FLAG |
670 | GUILD | |
ed3ef339 | 671 | pkg_config_prog_path |
4df42755 DE |
672 | HAVE_PYTHON_FALSE |
673 | HAVE_PYTHON_TRUE | |
ac534cba JB |
674 | PYTHON_LIBS |
675 | PYTHON_CPPFLAGS | |
81ecdfbb | 676 | PYTHON_CFLAGS |
ec685c5e | 677 | python_prog_path |
81ecdfbb RW |
678 | LTLIBEXPAT |
679 | LIBEXPAT | |
680 | HAVE_LIBEXPAT | |
b8e0a31c | 681 | JIT_READER_DIR |
f997c383 | 682 | TARGET_PTR |
39037522 | 683 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
684 | READLINE_CFLAGS |
685 | READLINE_DEPS | |
686 | READLINE | |
016a3251 DD |
687 | LTLIBICONV |
688 | LIBICONV | |
711a72d3 L |
689 | zlibinc |
690 | zlibdir | |
81ecdfbb RW |
691 | MIG |
692 | WINDRES | |
693 | DLLTOOL | |
c971b7fa | 694 | AR |
81ecdfbb RW |
695 | YFLAGS |
696 | YACC | |
c971b7fa | 697 | RANLIB |
81ecdfbb | 698 | LN_S |
c971b7fa PA |
699 | INSTALL_DATA |
700 | INSTALL_SCRIPT | |
701 | INSTALL_PROGRAM | |
702 | AWK | |
81ecdfbb RW |
703 | REPORT_BUGS_TEXI |
704 | REPORT_BUGS_TO | |
705 | PKGVERSION | |
b292c783 | 706 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
707 | TARGET_OBS |
708 | subdirs | |
709 | GDB_DATADIR | |
710 | DEBUGDIR | |
5048e516 JK |
711 | MAKEINFO_EXTRA_FLAGS |
712 | MAKEINFOFLAGS | |
713 | MAKEINFO | |
81ecdfbb RW |
714 | PACKAGE |
715 | GNULIB_STDINT_H | |
81ecdfbb RW |
716 | CATOBJEXT |
717 | GENCAT | |
718 | INSTOBJEXT | |
719 | DATADIRNAME | |
720 | CATALOGS | |
721 | POSUB | |
722 | GMSGFMT | |
723 | XGETTEXT | |
724 | INCINTL | |
725 | LIBINTL_DEP | |
726 | LIBINTL | |
727 | USE_NLS | |
728 | SET_MAKE | |
729 | GMAKE_FALSE | |
730 | GMAKE_TRUE | |
731 | MAKE | |
732 | CCDEPMODE | |
733 | DEPDIR | |
734 | am__leading_dot | |
a994041d | 735 | COMPILER_CFLAGS |
3bc3d82a | 736 | COMPILER |
4869db5e RM |
737 | INSTALL_STRIP_PROGRAM |
738 | STRIP | |
739 | install_sh | |
81ecdfbb RW |
740 | target_os |
741 | target_vendor | |
742 | target_cpu | |
743 | target | |
744 | host_os | |
745 | host_vendor | |
746 | host_cpu | |
747 | host | |
748 | build_os | |
749 | build_vendor | |
750 | build_cpu | |
751 | build | |
c971b7fa PA |
752 | EGREP |
753 | GREP | |
754 | CPP | |
3bc3d82a PA |
755 | ac_ct_CXX |
756 | CXXFLAGS | |
757 | CXX | |
81ecdfbb RW |
758 | OBJEXT |
759 | EXEEXT | |
760 | ac_ct_CC | |
761 | CPPFLAGS | |
762 | LDFLAGS | |
763 | CFLAGS | |
764 | CC | |
765 | MAINT | |
766 | MAINTAINER_MODE_FALSE | |
767 | MAINTAINER_MODE_TRUE | |
768 | target_alias | |
769 | host_alias | |
770 | build_alias | |
771 | LIBS | |
772 | ECHO_T | |
773 | ECHO_N | |
774 | ECHO_C | |
775 | DEFS | |
776 | mandir | |
777 | localedir | |
778 | libdir | |
779 | psdir | |
780 | pdfdir | |
781 | dvidir | |
782 | htmldir | |
783 | infodir | |
784 | docdir | |
785 | oldincludedir | |
786 | includedir | |
787 | localstatedir | |
788 | sharedstatedir | |
789 | sysconfdir | |
790 | datadir | |
791 | datarootdir | |
792 | libexecdir | |
793 | sbindir | |
794 | bindir | |
795 | program_transform_name | |
796 | prefix | |
797 | exec_prefix | |
798 | PACKAGE_URL | |
799 | PACKAGE_BUGREPORT | |
800 | PACKAGE_STRING | |
801 | PACKAGE_VERSION | |
802 | PACKAGE_TARNAME | |
803 | PACKAGE_NAME | |
804 | PATH_SEPARATOR | |
805 | SHELL' | |
a4ce5b0d | 806 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
807 | ac_user_opts=' |
808 | enable_option_checking | |
809 | enable_maintainer_mode | |
da2f07f1 JK |
810 | enable_plugins |
811 | enable_largefile | |
3bc3d82a | 812 | enable_build_with_cxx |
81ecdfbb RW |
813 | with_separate_debug_dir |
814 | with_gdb_datadir | |
815 | with_relocated_sources | |
7349ff92 | 816 | with_auto_load_dir |
bccbefd2 | 817 | with_auto_load_safe_path |
81ecdfbb RW |
818 | enable_targets |
819 | enable_64_bit_bfd | |
820 | enable_gdbcli | |
821 | enable_gdbmi | |
822 | enable_tui | |
823 | enable_gdbtk | |
05e7c244 | 824 | with_libunwind_ia64 |
81ecdfbb RW |
825 | with_curses |
826 | enable_profiling | |
827 | with_pkgversion | |
828 | with_bugurl | |
711a72d3 | 829 | with_system_zlib |
016a3251 DD |
830 | with_gnu_ld |
831 | enable_rpath | |
81ecdfbb | 832 | with_libiconv_prefix |
478aac75 | 833 | with_iconv_bin |
81ecdfbb | 834 | with_system_readline |
b8e0a31c | 835 | with_jit_reader_dir |
81ecdfbb | 836 | with_expat |
81ecdfbb RW |
837 | with_libexpat_prefix |
838 | with_python | |
ed3ef339 | 839 | with_guile |
a8db4212 | 840 | enable_libmcheck |
58bfce93 MM |
841 | with_intel_pt |
842 | with_libipt_prefix | |
81ecdfbb RW |
843 | with_included_regex |
844 | with_sysroot | |
845 | with_system_gdbinit | |
846 | enable_werror | |
847 | enable_build_warnings | |
848 | enable_gdb_build_warnings | |
608e2dbb TT |
849 | with_lzma |
850 | with_liblzma_prefix | |
81ecdfbb RW |
851 | with_tcl |
852 | with_tk | |
853 | with_x | |
854 | enable_sim | |
855 | enable_multi_ice | |
496c0e1b | 856 | enable_gdbserver |
393fd4c3 YQ |
857 | with_babeltrace |
858 | with_libbabeltrace_prefix | |
81ecdfbb RW |
859 | ' |
860 | ac_precious_vars='build_alias | |
861 | host_alias | |
862 | target_alias | |
863 | CC | |
864 | CFLAGS | |
865 | LDFLAGS | |
866 | LIBS | |
867 | CPPFLAGS | |
3bc3d82a PA |
868 | CXX |
869 | CXXFLAGS | |
870 | CCC | |
81ecdfbb | 871 | CPP |
f06e05e0 JK |
872 | MAKEINFO |
873 | MAKEINFOFLAGS | |
81ecdfbb RW |
874 | YACC |
875 | YFLAGS | |
876 | XMKMF' | |
5ae98d25 | 877 | ac_subdirs_all='testsuite |
81ecdfbb RW |
878 | gdbtk |
879 | multi-ice | |
880 | gdbserver' | |
c906108c SS |
881 | |
882 | # Initialize some variables set by options. | |
bec39cab AC |
883 | ac_init_help= |
884 | ac_init_version=false | |
81ecdfbb RW |
885 | ac_unrecognized_opts= |
886 | ac_unrecognized_sep= | |
c906108c SS |
887 | # The variables have the same names as the options, with |
888 | # dashes changed to underlines. | |
bec39cab | 889 | cache_file=/dev/null |
c906108c | 890 | exec_prefix=NONE |
c906108c | 891 | no_create= |
c906108c SS |
892 | no_recursion= |
893 | prefix=NONE | |
894 | program_prefix=NONE | |
895 | program_suffix=NONE | |
896 | program_transform_name=s,x,x, | |
897 | silent= | |
898 | site= | |
899 | srcdir= | |
c906108c SS |
900 | verbose= |
901 | x_includes=NONE | |
902 | x_libraries=NONE | |
bec39cab AC |
903 | |
904 | # Installation directory options. | |
905 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
906 | # and all the variables that are supposed to be based on exec_prefix | |
907 | # by default will actually change. | |
908 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 909 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
910 | bindir='${exec_prefix}/bin' |
911 | sbindir='${exec_prefix}/sbin' | |
912 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
913 | datarootdir='${prefix}/share' |
914 | datadir='${datarootdir}' | |
c906108c SS |
915 | sysconfdir='${prefix}/etc' |
916 | sharedstatedir='${prefix}/com' | |
917 | localstatedir='${prefix}/var' | |
c906108c SS |
918 | includedir='${prefix}/include' |
919 | oldincludedir='/usr/include' | |
81ecdfbb RW |
920 | docdir='${datarootdir}/doc/${PACKAGE}' |
921 | infodir='${datarootdir}/info' | |
922 | htmldir='${docdir}' | |
923 | dvidir='${docdir}' | |
924 | pdfdir='${docdir}' | |
925 | psdir='${docdir}' | |
926 | libdir='${exec_prefix}/lib' | |
927 | localedir='${datarootdir}/locale' | |
928 | mandir='${datarootdir}/man' | |
c906108c | 929 | |
c906108c | 930 | ac_prev= |
81ecdfbb | 931 | ac_dashdash= |
c906108c SS |
932 | for ac_option |
933 | do | |
c906108c SS |
934 | # If the previous option needs an argument, assign it. |
935 | if test -n "$ac_prev"; then | |
81ecdfbb | 936 | eval $ac_prev=\$ac_option |
c906108c SS |
937 | ac_prev= |
938 | continue | |
939 | fi | |
940 | ||
81ecdfbb RW |
941 | case $ac_option in |
942 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
943 | *) ac_optarg=yes ;; | |
944 | esac | |
c906108c SS |
945 | |
946 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
947 | ||
81ecdfbb RW |
948 | case $ac_dashdash$ac_option in |
949 | --) | |
950 | ac_dashdash=yes ;; | |
c906108c SS |
951 | |
952 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
953 | ac_prev=bindir ;; | |
954 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 955 | bindir=$ac_optarg ;; |
c906108c SS |
956 | |
957 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 958 | ac_prev=build_alias ;; |
c906108c | 959 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 960 | build_alias=$ac_optarg ;; |
c906108c SS |
961 | |
962 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
963 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
964 | ac_prev=cache_file ;; | |
965 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
966 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
967 | cache_file=$ac_optarg ;; |
968 | ||
969 | --config-cache | -C) | |
970 | cache_file=config.cache ;; | |
c906108c | 971 | |
81ecdfbb | 972 | -datadir | --datadir | --datadi | --datad) |
c906108c | 973 | ac_prev=datadir ;; |
81ecdfbb | 974 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 975 | datadir=$ac_optarg ;; |
c906108c | 976 | |
81ecdfbb RW |
977 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
978 | | --dataroo | --dataro | --datar) | |
979 | ac_prev=datarootdir ;; | |
980 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
981 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
982 | datarootdir=$ac_optarg ;; | |
983 | ||
c906108c | 984 | -disable-* | --disable-*) |
81ecdfbb | 985 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 986 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
987 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
988 | as_fn_error "invalid feature name: $ac_useropt" | |
989 | ac_useropt_orig=$ac_useropt | |
990 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
991 | case $ac_user_opts in | |
992 | *" | |
993 | "enable_$ac_useropt" | |
994 | "*) ;; | |
995 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
996 | ac_unrecognized_sep=', ';; | |
997 | esac | |
998 | eval enable_$ac_useropt=no ;; | |
999 | ||
1000 | -docdir | --docdir | --docdi | --doc | --do) | |
1001 | ac_prev=docdir ;; | |
1002 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1003 | docdir=$ac_optarg ;; | |
1004 | ||
1005 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1006 | ac_prev=dvidir ;; | |
1007 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1008 | dvidir=$ac_optarg ;; | |
c906108c SS |
1009 | |
1010 | -enable-* | --enable-*) | |
81ecdfbb | 1011 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1012 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1013 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1014 | as_fn_error "invalid feature name: $ac_useropt" | |
1015 | ac_useropt_orig=$ac_useropt | |
1016 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1017 | case $ac_user_opts in | |
1018 | *" | |
1019 | "enable_$ac_useropt" | |
1020 | "*) ;; | |
1021 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1022 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1023 | esac |
81ecdfbb | 1024 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1025 | |
1026 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1027 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1028 | | --exec | --exe | --ex) | |
1029 | ac_prev=exec_prefix ;; | |
1030 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1031 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1032 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1033 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1034 | |
1035 | -gas | --gas | --ga | --g) | |
1036 | # Obsolete; use --with-gas. | |
1037 | with_gas=yes ;; | |
1038 | ||
bec39cab AC |
1039 | -help | --help | --hel | --he | -h) |
1040 | ac_init_help=long ;; | |
1041 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1042 | ac_init_help=recursive ;; | |
1043 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1044 | ac_init_help=short ;; | |
c906108c SS |
1045 | |
1046 | -host | --host | --hos | --ho) | |
bec39cab | 1047 | ac_prev=host_alias ;; |
c906108c | 1048 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1049 | host_alias=$ac_optarg ;; |
c906108c | 1050 | |
81ecdfbb RW |
1051 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1052 | ac_prev=htmldir ;; | |
1053 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1054 | | --ht=*) | |
1055 | htmldir=$ac_optarg ;; | |
1056 | ||
c906108c SS |
1057 | -includedir | --includedir | --includedi | --included | --include \ |
1058 | | --includ | --inclu | --incl | --inc) | |
1059 | ac_prev=includedir ;; | |
1060 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1061 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1062 | includedir=$ac_optarg ;; |
c906108c SS |
1063 | |
1064 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1065 | ac_prev=infodir ;; | |
1066 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1067 | infodir=$ac_optarg ;; |
c906108c SS |
1068 | |
1069 | -libdir | --libdir | --libdi | --libd) | |
1070 | ac_prev=libdir ;; | |
1071 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1072 | libdir=$ac_optarg ;; |
c906108c SS |
1073 | |
1074 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1075 | | --libexe | --libex | --libe) | |
1076 | ac_prev=libexecdir ;; | |
1077 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1078 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1079 | libexecdir=$ac_optarg ;; |
c906108c | 1080 | |
81ecdfbb RW |
1081 | -localedir | --localedir | --localedi | --localed | --locale) |
1082 | ac_prev=localedir ;; | |
1083 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1084 | localedir=$ac_optarg ;; | |
1085 | ||
c906108c | 1086 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1087 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1088 | ac_prev=localstatedir ;; |
1089 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1090 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1091 | localstatedir=$ac_optarg ;; |
c906108c SS |
1092 | |
1093 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1094 | ac_prev=mandir ;; | |
1095 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1096 | mandir=$ac_optarg ;; |
c906108c SS |
1097 | |
1098 | -nfp | --nfp | --nf) | |
1099 | # Obsolete; use --without-fp. | |
1100 | with_fp=no ;; | |
1101 | ||
1102 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1103 | | --no-cr | --no-c | -n) |
c906108c SS |
1104 | no_create=yes ;; |
1105 | ||
1106 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1107 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1108 | no_recursion=yes ;; | |
1109 | ||
1110 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1111 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1112 | | --oldin | --oldi | --old | --ol | --o) | |
1113 | ac_prev=oldincludedir ;; | |
1114 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1115 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1116 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1117 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1118 | |
1119 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1120 | ac_prev=prefix ;; | |
1121 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1122 | prefix=$ac_optarg ;; |
c906108c SS |
1123 | |
1124 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1125 | | --program-pre | --program-pr | --program-p) | |
1126 | ac_prev=program_prefix ;; | |
1127 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1128 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1129 | program_prefix=$ac_optarg ;; |
c906108c SS |
1130 | |
1131 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1132 | | --program-suf | --program-su | --program-s) | |
1133 | ac_prev=program_suffix ;; | |
1134 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1135 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1136 | program_suffix=$ac_optarg ;; |
c906108c SS |
1137 | |
1138 | -program-transform-name | --program-transform-name \ | |
1139 | | --program-transform-nam | --program-transform-na \ | |
1140 | | --program-transform-n | --program-transform- \ | |
1141 | | --program-transform | --program-transfor \ | |
1142 | | --program-transfo | --program-transf \ | |
1143 | | --program-trans | --program-tran \ | |
1144 | | --progr-tra | --program-tr | --program-t) | |
1145 | ac_prev=program_transform_name ;; | |
1146 | -program-transform-name=* | --program-transform-name=* \ | |
1147 | | --program-transform-nam=* | --program-transform-na=* \ | |
1148 | | --program-transform-n=* | --program-transform-=* \ | |
1149 | | --program-transform=* | --program-transfor=* \ | |
1150 | | --program-transfo=* | --program-transf=* \ | |
1151 | | --program-trans=* | --program-tran=* \ | |
1152 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1153 | program_transform_name=$ac_optarg ;; |
c906108c | 1154 | |
81ecdfbb RW |
1155 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1156 | ac_prev=pdfdir ;; | |
1157 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1158 | pdfdir=$ac_optarg ;; | |
1159 | ||
1160 | -psdir | --psdir | --psdi | --psd | --ps) | |
1161 | ac_prev=psdir ;; | |
1162 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1163 | psdir=$ac_optarg ;; | |
1164 | ||
c906108c SS |
1165 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1166 | | -silent | --silent | --silen | --sile | --sil) | |
1167 | silent=yes ;; | |
1168 | ||
1169 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1170 | ac_prev=sbindir ;; | |
1171 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1172 | | --sbi=* | --sb=*) | |
bec39cab | 1173 | sbindir=$ac_optarg ;; |
c906108c SS |
1174 | |
1175 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1176 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1177 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1178 | | --sha | --sh) | |
1179 | ac_prev=sharedstatedir ;; | |
1180 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1181 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1182 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1183 | | --sha=* | --sh=*) | |
bec39cab | 1184 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1185 | |
1186 | -site | --site | --sit) | |
1187 | ac_prev=site ;; | |
1188 | -site=* | --site=* | --sit=*) | |
bec39cab | 1189 | site=$ac_optarg ;; |
3ace7edb | 1190 | |
c906108c SS |
1191 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1192 | ac_prev=srcdir ;; | |
1193 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1194 | srcdir=$ac_optarg ;; |
c906108c SS |
1195 | |
1196 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1197 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1198 | ac_prev=sysconfdir ;; | |
1199 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1200 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1201 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1202 | |
1203 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1204 | ac_prev=target_alias ;; |
c906108c | 1205 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1206 | target_alias=$ac_optarg ;; |
c906108c SS |
1207 | |
1208 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1209 | verbose=yes ;; | |
1210 | ||
bec39cab AC |
1211 | -version | --version | --versio | --versi | --vers | -V) |
1212 | ac_init_version=: ;; | |
c906108c SS |
1213 | |
1214 | -with-* | --with-*) | |
81ecdfbb | 1215 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1216 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1217 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1218 | as_fn_error "invalid package name: $ac_useropt" | |
1219 | ac_useropt_orig=$ac_useropt | |
1220 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1221 | case $ac_user_opts in | |
1222 | *" | |
1223 | "with_$ac_useropt" | |
1224 | "*) ;; | |
1225 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1226 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1227 | esac |
81ecdfbb | 1228 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1229 | |
1230 | -without-* | --without-*) | |
81ecdfbb | 1231 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1232 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1233 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1234 | as_fn_error "invalid package name: $ac_useropt" | |
1235 | ac_useropt_orig=$ac_useropt | |
1236 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1237 | case $ac_user_opts in | |
1238 | *" | |
1239 | "with_$ac_useropt" | |
1240 | "*) ;; | |
1241 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1242 | ac_unrecognized_sep=', ';; | |
1243 | esac | |
1244 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1245 | |
1246 | --x) | |
1247 | # Obsolete; use --with-x. | |
1248 | with_x=yes ;; | |
1249 | ||
1250 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1251 | | --x-incl | --x-inc | --x-in | --x-i) | |
1252 | ac_prev=x_includes ;; | |
1253 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1254 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1255 | x_includes=$ac_optarg ;; |
c906108c SS |
1256 | |
1257 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1258 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1259 | ac_prev=x_libraries ;; | |
1260 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1261 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1262 | x_libraries=$ac_optarg ;; |
c906108c | 1263 | |
81ecdfbb RW |
1264 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1265 | Try \`$0 --help' for more information." | |
c906108c SS |
1266 | ;; |
1267 | ||
bec39cab AC |
1268 | *=*) |
1269 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1270 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1271 | case $ac_envvar in #( |
1272 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1273 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1274 | esac | |
1275 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1276 | export $ac_envvar ;; |
1277 | ||
c906108c | 1278 | *) |
bec39cab | 1279 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1280 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1281 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1282 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1283 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1284 | ;; |
1285 | ||
1286 | esac | |
1287 | done | |
1288 | ||
1289 | if test -n "$ac_prev"; then | |
bec39cab | 1290 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1291 | as_fn_error "missing argument to $ac_option" |
c906108c | 1292 | fi |
c906108c | 1293 | |
81ecdfbb RW |
1294 | if test -n "$ac_unrecognized_opts"; then |
1295 | case $enable_option_checking in | |
1296 | no) ;; | |
1297 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1298 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1299 | esac |
81ecdfbb | 1300 | fi |
b4e70030 | 1301 | |
81ecdfbb RW |
1302 | # Check all directory arguments for consistency. |
1303 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1304 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1305 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1306 | libdir localedir mandir | |
b4e70030 | 1307 | do |
81ecdfbb RW |
1308 | eval ac_val=\$$ac_var |
1309 | # Remove trailing slashes. | |
1310 | case $ac_val in | |
1311 | */ ) | |
1312 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1313 | eval $ac_var=\$ac_val;; | |
1314 | esac | |
1315 | # Be sure to have absolute directory names. | |
b4e70030 | 1316 | case $ac_val in |
81ecdfbb RW |
1317 | [\\/$]* | ?:[\\/]* ) continue;; |
1318 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1319 | esac |
81ecdfbb | 1320 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1321 | done |
1322 | ||
bec39cab AC |
1323 | # There might be people who depend on the old broken behavior: `$host' |
1324 | # used to hold the argument of --host etc. | |
1325 | # FIXME: To remove some day. | |
1326 | build=$build_alias | |
1327 | host=$host_alias | |
1328 | target=$target_alias | |
1329 | ||
1330 | # FIXME: To remove some day. | |
1331 | if test "x$host_alias" != x; then | |
1332 | if test "x$build_alias" = x; then | |
1333 | cross_compiling=maybe | |
81ecdfbb | 1334 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1335 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1336 | elif test "x$build_alias" != "x$host_alias"; then | |
1337 | cross_compiling=yes | |
1338 | fi | |
1339 | fi | |
c906108c | 1340 | |
bec39cab AC |
1341 | ac_tool_prefix= |
1342 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1343 | ||
1344 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1345 | |
c906108c | 1346 | |
81ecdfbb RW |
1347 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1348 | ac_ls_di=`ls -di .` && | |
1349 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1350 | as_fn_error "working directory cannot be determined" | |
1351 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1352 | as_fn_error "pwd does not report name of working directory" | |
1353 | ||
1354 | ||
c906108c SS |
1355 | # Find the source files, if location was not specified. |
1356 | if test -z "$srcdir"; then | |
1357 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1358 | # Try the directory containing this script, then the parent directory. |
1359 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1360 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1361 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1362 | X"$as_myself" : 'X\(//\)$' \| \ | |
1363 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1364 | $as_echo X"$as_myself" | | |
1365 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1366 | s//\1/ | |
1367 | q | |
1368 | } | |
1369 | /^X\(\/\/\)[^/].*/{ | |
1370 | s//\1/ | |
1371 | q | |
1372 | } | |
1373 | /^X\(\/\/\)$/{ | |
1374 | s//\1/ | |
1375 | q | |
1376 | } | |
1377 | /^X\(\/\).*/{ | |
1378 | s//\1/ | |
1379 | q | |
1380 | } | |
1381 | s/.*/./; q'` | |
c906108c | 1382 | srcdir=$ac_confdir |
81ecdfbb | 1383 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1384 | srcdir=.. |
1385 | fi | |
1386 | else | |
1387 | ac_srcdir_defaulted=no | |
1388 | fi | |
81ecdfbb RW |
1389 | if test ! -r "$srcdir/$ac_unique_file"; then |
1390 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1391 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1392 | fi | |
1393 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1394 | ac_abs_confdir=`( | |
1395 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1396 | pwd)` | |
1397 | # When building in place, set srcdir=. | |
1398 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1399 | srcdir=. | |
1400 | fi | |
1401 | # Remove unnecessary trailing slashes from srcdir. | |
1402 | # Double slashes in file names in object file debugging info | |
1403 | # mess up M-x gdb in Emacs. | |
1404 | case $srcdir in | |
1405 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1406 | esac | |
1407 | for ac_var in $ac_precious_vars; do | |
1408 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1409 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1410 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1411 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1412 | done | |
c906108c | 1413 | |
bec39cab AC |
1414 | # |
1415 | # Report the --help message. | |
1416 | # | |
1417 | if test "$ac_init_help" = "long"; then | |
1418 | # Omit some internal or obsolete options to make the list less imposing. | |
1419 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1420 | cat <<_ACEOF | |
1421 | \`configure' configures this package to adapt to many kinds of systems. | |
1422 | ||
1423 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1424 | ||
1425 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1426 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1427 | ||
1428 | Defaults for the options are specified in brackets. | |
1429 | ||
1430 | Configuration: | |
1431 | -h, --help display this help and exit | |
1432 | --help=short display options specific to this package | |
1433 | --help=recursive display the short help of all the included packages | |
1434 | -V, --version display version information and exit | |
1435 | -q, --quiet, --silent do not print \`checking...' messages | |
1436 | --cache-file=FILE cache test results in FILE [disabled] | |
1437 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1438 | -n, --no-create do not create output files | |
1439 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1440 | ||
bec39cab AC |
1441 | Installation directories: |
1442 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1443 | [$ac_default_prefix] |
bec39cab | 1444 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1445 | [PREFIX] |
bec39cab AC |
1446 | |
1447 | By default, \`make install' will install all the files in | |
1448 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1449 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1450 | for instance \`--prefix=\$HOME'. | |
1451 | ||
1452 | For better control, use the options below. | |
1453 | ||
1454 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1455 | --bindir=DIR user executables [EPREFIX/bin] |
1456 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1457 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1458 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1459 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1460 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1461 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1462 | --includedir=DIR C header files [PREFIX/include] | |
1463 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1464 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1465 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1466 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1467 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1468 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1469 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1470 | --htmldir=DIR html documentation [DOCDIR] | |
1471 | --dvidir=DIR dvi documentation [DOCDIR] | |
1472 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1473 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1474 | _ACEOF |
1475 | ||
1476 | cat <<\_ACEOF | |
1477 | ||
9009e1ae MR |
1478 | Program names: |
1479 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1480 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1481 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1482 | ||
bec39cab AC |
1483 | X features: |
1484 | --x-includes=DIR X include files are in DIR | |
1485 | --x-libraries=DIR X library files are in DIR | |
1486 | ||
1487 | System types: | |
1488 | --build=BUILD configure for building on BUILD [guessed] | |
1489 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1490 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1491 | _ACEOF | |
1492 | fi | |
1493 | ||
1494 | if test -n "$ac_init_help"; then | |
1495 | ||
1496 | cat <<\_ACEOF | |
1497 | ||
1498 | Optional Features: | |
81ecdfbb | 1499 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1500 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1501 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1502 | --enable-maintainer-mode enable make rules and dependencies not useful |
1503 | (and sometimes confusing) to the casual installer | |
2974be62 | 1504 | --enable-plugins Enable support for plugins |
da2f07f1 | 1505 | --disable-largefile omit support for large files |
3bc3d82a | 1506 | --enable-build-with-cxx build with C++ compiler instead of C compiler |
a1220294 TT |
1507 | --enable-targets=TARGETS |
1508 | alternative target configurations | |
c0993dbe | 1509 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1510 | --disable-gdbcli disable command-line interface (CLI) |
1511 | --disable-gdbmi disable machine-interface (MI) | |
1512 | --enable-tui enable full-screen terminal user interface (TUI) | |
1513 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1514 | --enable-profiling enable profiling of GDB | |
3841debe | 1515 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1516 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1517 | --enable-werror treat compile warnings as errors |
32c1c914 | 1518 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1519 | --enable-gdb-build-warnings |
32c1c914 | 1520 | enable GDB specific build-time compiler warnings if |
a1220294 | 1521 | gcc is used |
32c1c914 | 1522 | --enable-sim link gdb with simulator |
bec39cab | 1523 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1524 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1525 | is auto) | |
bec39cab AC |
1526 | |
1527 | Optional Packages: | |
1528 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1529 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1530 | --with-separate-debug-dir=PATH |
32c1c914 | 1531 | look for global separate debug info in this path |
62e4f60c | 1532 | [LIBDIR/debug] |
b14b1491 TT |
1533 | --with-gdb-datadir=PATH look for global separate data files in this path |
1534 | [DATADIR/gdb] | |
29b0e8a2 | 1535 | --with-relocated-sources=PATH |
32c1c914 | 1536 | automatically relocate this path for source files |
7349ff92 | 1537 | --with-auto-load-dir=PATH |
aff139ff | 1538 | directories from which to load auto-loaded scripts |
1564a261 | 1539 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1540 | --with-auto-load-safe-path=PATH |
aff139ff | 1541 | directories safe to hold auto-loaded files |
7349ff92 | 1542 | [--with-auto-load-dir] |
bccbefd2 JK |
1543 | --without-auto-load-safe-path |
1544 | do not restrict auto-loaded files locations | |
05e7c244 | 1545 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1546 | --with-curses use the curses library instead of the termcap |
1547 | library | |
c16158bc JM |
1548 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1549 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1550 | --with-system-zlib use installed libz |
016a3251 DD |
1551 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1552 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1553 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
478aac75 | 1554 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1555 | --with-system-readline use installed readline library |
b8e0a31c SD |
1556 | --with-jit-reader-dir=PATH |
1557 | directory to load the JIT readers from | |
5c39566f | 1558 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1559 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1560 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1561 | --with-python[=PYTHON] include python support |
1562 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1563 | --with-guile[=GUILE] include guile support |
1564 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1565 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1566 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1567 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1568 | --without-included-regex |
1569 | don't use included regex; this is the default on | |
1570 | systems with version 2 of the GNU C library (use | |
1571 | with caution on other system) | |
81ecdfbb | 1572 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1573 | --with-system-gdbinit=PATH |
32c1c914 | 1574 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1575 | --with-lzma support lzma compression (auto/yes/no) |
1576 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1577 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1578 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1579 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1580 | --with-x use the X Window System |
393fd4c3 YQ |
1581 | --with-babeltrace include babeltrace support (auto/yes/no) |
1582 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1583 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1584 | |
1585 | Some influential environment variables: | |
1586 | CC C compiler command | |
1587 | CFLAGS C compiler flags | |
1588 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1589 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1590 | LIBS libraries to pass to the linker, e.g. -l<library> |
1591 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1592 | you have headers in a nonstandard directory <include dir> | |
3bc3d82a PA |
1593 | CXX C++ compiler command |
1594 | CXXFLAGS C++ compiler flags | |
bec39cab | 1595 | CPP C preprocessor |
f06e05e0 JK |
1596 | MAKEINFO Parent configure detects if it is of sufficient version. |
1597 | MAKEINFOFLAGS | |
1598 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1599 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1600 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1601 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1602 | This script will default YFLAGS to the empty string to avoid a | |
1603 | default value of `-d' given by some make applications. | |
1604 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1605 | |
1606 | Use these variables to override the choices made by `configure' or to help | |
1607 | it to find libraries and programs with nonstandard names/locations. | |
1608 | ||
81ecdfbb | 1609 | Report bugs to the package provider. |
bec39cab | 1610 | _ACEOF |
81ecdfbb | 1611 | ac_status=$? |
bec39cab AC |
1612 | fi |
1613 | ||
1614 | if test "$ac_init_help" = "recursive"; then | |
1615 | # If there are subdirs, report their specific --help. | |
bec39cab | 1616 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1617 | test -d "$ac_dir" || |
1618 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1619 | continue | |
bec39cab AC |
1620 | ac_builddir=. |
1621 | ||
81ecdfbb RW |
1622 | case "$ac_dir" in |
1623 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1624 | *) | |
1625 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1626 | # A ".." for each directory in $ac_dir_suffix. | |
1627 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1628 | case $ac_top_builddir_sub in | |
1629 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1630 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1631 | esac ;; | |
1632 | esac | |
1633 | ac_abs_top_builddir=$ac_pwd | |
1634 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1635 | # for backward compatibility: | |
1636 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1637 | |
1638 | case $srcdir in | |
81ecdfbb | 1639 | .) # We are building in place. |
bec39cab | 1640 | ac_srcdir=. |
81ecdfbb RW |
1641 | ac_top_srcdir=$ac_top_builddir_sub |
1642 | ac_abs_top_srcdir=$ac_pwd ;; | |
1643 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1644 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1645 | ac_top_srcdir=$srcdir |
1646 | ac_abs_top_srcdir=$srcdir ;; | |
1647 | *) # Relative name. | |
1648 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1649 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1650 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1651 | esac |
81ecdfbb | 1652 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1653 | |
81ecdfbb RW |
1654 | cd "$ac_dir" || { ac_status=$?; continue; } |
1655 | # Check for guested configure. | |
1656 | if test -f "$ac_srcdir/configure.gnu"; then | |
1657 | echo && | |
1658 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1659 | elif test -f "$ac_srcdir/configure"; then | |
1660 | echo && | |
1661 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1662 | else |
81ecdfbb RW |
1663 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1664 | fi || ac_status=$? | |
1665 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1666 | done |
1667 | fi | |
1668 | ||
81ecdfbb | 1669 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1670 | if $ac_init_version; then |
1671 | cat <<\_ACEOF | |
81ecdfbb RW |
1672 | configure |
1673 | generated by GNU Autoconf 2.64 | |
bec39cab | 1674 | |
81ecdfbb | 1675 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1676 | This configure script is free software; the Free Software Foundation |
1677 | gives unlimited permission to copy, distribute and modify it. | |
1678 | _ACEOF | |
81ecdfbb | 1679 | exit |
bec39cab | 1680 | fi |
bec39cab | 1681 | |
81ecdfbb RW |
1682 | ## ------------------------ ## |
1683 | ## Autoconf initialization. ## | |
1684 | ## ------------------------ ## | |
bec39cab | 1685 | |
81ecdfbb RW |
1686 | # ac_fn_c_try_compile LINENO |
1687 | # -------------------------- | |
1688 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1689 | ac_fn_c_try_compile () | |
1690 | { | |
1691 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1692 | rm -f conftest.$ac_objext | |
1693 | if { { ac_try="$ac_compile" | |
1694 | case "(($ac_try" in | |
1695 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1696 | *) ac_try_echo=$ac_try;; | |
1697 | esac | |
1698 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1699 | $as_echo "$ac_try_echo"; } >&5 | |
1700 | (eval "$ac_compile") 2>conftest.err | |
1701 | ac_status=$? | |
1702 | if test -s conftest.err; then | |
1703 | grep -v '^ *+' conftest.err >conftest.er1 | |
1704 | cat conftest.er1 >&5 | |
1705 | mv -f conftest.er1 conftest.err | |
1706 | fi | |
1707 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1708 | test $ac_status = 0; } && { | |
1709 | test -z "$ac_c_werror_flag" || | |
1710 | test ! -s conftest.err | |
1711 | } && test -s conftest.$ac_objext; then : | |
1712 | ac_retval=0 | |
1713 | else | |
1714 | $as_echo "$as_me: failed program was:" >&5 | |
1715 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1716 | |
81ecdfbb RW |
1717 | ac_retval=1 |
1718 | fi | |
1719 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1720 | return $ac_retval | |
1721 | ||
1722 | } # ac_fn_c_try_compile | |
1723 | ||
3bc3d82a PA |
1724 | # ac_fn_cxx_try_compile LINENO |
1725 | # ---------------------------- | |
1726 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1727 | ac_fn_cxx_try_compile () | |
1728 | { | |
1729 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1730 | rm -f conftest.$ac_objext | |
1731 | if { { ac_try="$ac_compile" | |
1732 | case "(($ac_try" in | |
1733 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1734 | *) ac_try_echo=$ac_try;; | |
1735 | esac | |
1736 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1737 | $as_echo "$ac_try_echo"; } >&5 | |
1738 | (eval "$ac_compile") 2>conftest.err | |
1739 | ac_status=$? | |
1740 | if test -s conftest.err; then | |
1741 | grep -v '^ *+' conftest.err >conftest.er1 | |
1742 | cat conftest.er1 >&5 | |
1743 | mv -f conftest.er1 conftest.err | |
1744 | fi | |
1745 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1746 | test $ac_status = 0; } && { | |
1747 | test -z "$ac_cxx_werror_flag" || | |
1748 | test ! -s conftest.err | |
1749 | } && test -s conftest.$ac_objext; then : | |
1750 | ac_retval=0 | |
1751 | else | |
1752 | $as_echo "$as_me: failed program was:" >&5 | |
1753 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1754 | ||
1755 | ac_retval=1 | |
1756 | fi | |
1757 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1758 | return $ac_retval | |
1759 | ||
1760 | } # ac_fn_cxx_try_compile | |
1761 | ||
81ecdfbb RW |
1762 | # ac_fn_c_try_cpp LINENO |
1763 | # ---------------------- | |
1764 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1765 | ac_fn_c_try_cpp () | |
bec39cab | 1766 | { |
81ecdfbb RW |
1767 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1768 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1769 | case "(($ac_try" in | |
1770 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1771 | *) ac_try_echo=$ac_try;; | |
1772 | esac | |
1773 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1774 | $as_echo "$ac_try_echo"; } >&5 | |
1775 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1776 | ac_status=$? | |
1777 | if test -s conftest.err; then | |
1778 | grep -v '^ *+' conftest.err >conftest.er1 | |
1779 | cat conftest.er1 >&5 | |
1780 | mv -f conftest.er1 conftest.err | |
1781 | fi | |
1782 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1783 | test $ac_status = 0; } >/dev/null && { | |
1784 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1785 | test ! -s conftest.err | |
1786 | }; then : | |
1787 | ac_retval=0 | |
1788 | else | |
1789 | $as_echo "$as_me: failed program was:" >&5 | |
1790 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1791 | |
81ecdfbb RW |
1792 | ac_retval=1 |
1793 | fi | |
1794 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1795 | return $ac_retval | |
bec39cab | 1796 | |
81ecdfbb | 1797 | } # ac_fn_c_try_cpp |
bec39cab | 1798 | |
81ecdfbb RW |
1799 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1800 | # ------------------------------------------------------- | |
1801 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1802 | # the include files in INCLUDES and setting the cache variable VAR | |
1803 | # accordingly. | |
1804 | ac_fn_c_check_header_mongrel () | |
1805 | { | |
1806 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1807 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1809 | $as_echo_n "checking for $2... " >&6; } | |
1810 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1811 | $as_echo_n "(cached) " >&6 | |
1812 | fi | |
1813 | eval ac_res=\$$3 | |
1814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1815 | $as_echo "$ac_res" >&6; } | |
1816 | else | |
1817 | # Is the header compilable? | |
1818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1819 | $as_echo_n "checking $2 usability... " >&6; } | |
1820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1821 | /* end confdefs.h. */ | |
1822 | $4 | |
1823 | #include <$2> | |
1824 | _ACEOF | |
1825 | if ac_fn_c_try_compile "$LINENO"; then : | |
1826 | ac_header_compiler=yes | |
1827 | else | |
1828 | ac_header_compiler=no | |
1829 | fi | |
1830 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1832 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1833 | |
81ecdfbb RW |
1834 | # Is the header present? |
1835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1836 | $as_echo_n "checking $2 presence... " >&6; } | |
1837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1838 | /* end confdefs.h. */ | |
1839 | #include <$2> | |
1840 | _ACEOF | |
1841 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1842 | ac_header_preproc=yes | |
1843 | else | |
1844 | ac_header_preproc=no | |
1845 | fi | |
1846 | rm -f conftest.err conftest.$ac_ext | |
1847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1848 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1849 | |
81ecdfbb RW |
1850 | # So? What about this header? |
1851 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1852 | yes:no: ) | |
1853 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1854 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1855 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1856 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1857 | ;; | |
1858 | no:yes:* ) | |
1859 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1860 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1861 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1862 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1864 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1865 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1866 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1867 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1868 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1869 | ;; | |
1870 | esac | |
1871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1872 | $as_echo_n "checking for $2... " >&6; } | |
1873 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1874 | $as_echo_n "(cached) " >&6 | |
1875 | else | |
1876 | eval "$3=\$ac_header_compiler" | |
1877 | fi | |
1878 | eval ac_res=\$$3 | |
1879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1880 | $as_echo "$ac_res" >&6; } | |
1881 | fi | |
1882 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1883 | |
81ecdfbb | 1884 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1885 | |
81ecdfbb RW |
1886 | # ac_fn_c_try_run LINENO |
1887 | # ---------------------- | |
1888 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1889 | # that executables *can* be run. | |
1890 | ac_fn_c_try_run () | |
1891 | { | |
1892 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1893 | if { { ac_try="$ac_link" | |
1894 | case "(($ac_try" in | |
1895 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1896 | *) ac_try_echo=$ac_try;; | |
1897 | esac | |
1898 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1899 | $as_echo "$ac_try_echo"; } >&5 | |
1900 | (eval "$ac_link") 2>&5 | |
1901 | ac_status=$? | |
1902 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1903 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1904 | { { case "(($ac_try" in | |
1905 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1906 | *) ac_try_echo=$ac_try;; | |
1907 | esac | |
1908 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1909 | $as_echo "$ac_try_echo"; } >&5 | |
1910 | (eval "$ac_try") 2>&5 | |
1911 | ac_status=$? | |
1912 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1913 | test $ac_status = 0; }; }; then : | |
1914 | ac_retval=0 | |
1915 | else | |
1916 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1917 | $as_echo "$as_me: failed program was:" >&5 | |
1918 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1919 | |
81ecdfbb RW |
1920 | ac_retval=$ac_status |
1921 | fi | |
1922 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1923 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1924 | return $ac_retval | |
bec39cab | 1925 | |
81ecdfbb | 1926 | } # ac_fn_c_try_run |
bec39cab | 1927 | |
81ecdfbb RW |
1928 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1929 | # ------------------------------------------------------- | |
1930 | # Tests whether HEADER exists and can be compiled using the include files in | |
1931 | # INCLUDES, setting the cache variable VAR accordingly. | |
1932 | ac_fn_c_check_header_compile () | |
1933 | { | |
1934 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1936 | $as_echo_n "checking for $2... " >&6; } | |
1937 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1938 | $as_echo_n "(cached) " >&6 | |
1939 | else | |
1940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1941 | /* end confdefs.h. */ | |
1942 | $4 | |
1943 | #include <$2> | |
bec39cab | 1944 | _ACEOF |
81ecdfbb RW |
1945 | if ac_fn_c_try_compile "$LINENO"; then : |
1946 | eval "$3=yes" | |
1947 | else | |
1948 | eval "$3=no" | |
1949 | fi | |
1950 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1951 | fi | |
1952 | eval ac_res=\$$3 | |
1953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1954 | $as_echo "$ac_res" >&6; } | |
1955 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1956 | |
81ecdfbb | 1957 | } # ac_fn_c_check_header_compile |
bec39cab | 1958 | |
2974be62 AM |
1959 | # ac_fn_c_try_link LINENO |
1960 | # ----------------------- | |
1961 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1962 | ac_fn_c_try_link () | |
1963 | { | |
1964 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1965 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1966 | if { { ac_try="$ac_link" | |
1967 | case "(($ac_try" in | |
1968 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1969 | *) ac_try_echo=$ac_try;; | |
1970 | esac | |
1971 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1972 | $as_echo "$ac_try_echo"; } >&5 | |
1973 | (eval "$ac_link") 2>conftest.err | |
1974 | ac_status=$? | |
1975 | if test -s conftest.err; then | |
1976 | grep -v '^ *+' conftest.err >conftest.er1 | |
1977 | cat conftest.er1 >&5 | |
1978 | mv -f conftest.er1 conftest.err | |
1979 | fi | |
1980 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1981 | test $ac_status = 0; } && { | |
1982 | test -z "$ac_c_werror_flag" || | |
1983 | test ! -s conftest.err | |
1984 | } && test -s conftest$ac_exeext && { | |
1985 | test "$cross_compiling" = yes || | |
1986 | $as_test_x conftest$ac_exeext | |
1987 | }; then : | |
1988 | ac_retval=0 | |
1989 | else | |
1990 | $as_echo "$as_me: failed program was:" >&5 | |
1991 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1992 | ||
1993 | ac_retval=1 | |
1994 | fi | |
1995 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1996 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1997 | # interfere with the next link command; also delete a directory that is | |
1998 | # left behind by Apple's compiler. We do this before executing the actions. | |
1999 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2000 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2001 | return $ac_retval | |
2002 | ||
2003 | } # ac_fn_c_try_link | |
2004 | ||
81ecdfbb RW |
2005 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2006 | # -------------------------------------------- | |
2007 | # Tries to find the compile-time value of EXPR in a program that includes | |
2008 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2009 | # computed | |
2010 | ac_fn_c_compute_int () | |
2011 | { | |
2012 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2013 | if test "$cross_compiling" = yes; then | |
2014 | # Depending upon the size, compute the lo and hi bounds. | |
2015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2016 | /* end confdefs.h. */ | |
2017 | $4 | |
2018 | int | |
2019 | main () | |
2020 | { | |
2021 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2022 | test_array [0] = 0 | |
bec39cab | 2023 | |
81ecdfbb RW |
2024 | ; |
2025 | return 0; | |
2026 | } | |
2027 | _ACEOF | |
2028 | if ac_fn_c_try_compile "$LINENO"; then : | |
2029 | ac_lo=0 ac_mid=0 | |
2030 | while :; do | |
2031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2032 | /* end confdefs.h. */ | |
2033 | $4 | |
2034 | int | |
2035 | main () | |
2036 | { | |
2037 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2038 | test_array [0] = 0 | |
bec39cab | 2039 | |
81ecdfbb RW |
2040 | ; |
2041 | return 0; | |
2042 | } | |
2043 | _ACEOF | |
2044 | if ac_fn_c_try_compile "$LINENO"; then : | |
2045 | ac_hi=$ac_mid; break | |
2046 | else | |
2047 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2048 | if test $ac_lo -le $ac_mid; then | |
2049 | ac_lo= ac_hi= | |
2050 | break | |
2051 | fi | |
2052 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2053 | fi |
81ecdfbb RW |
2054 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2055 | done | |
c906108c | 2056 | else |
81ecdfbb RW |
2057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2058 | /* end confdefs.h. */ | |
2059 | $4 | |
2060 | int | |
2061 | main () | |
2062 | { | |
2063 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2064 | test_array [0] = 0 | |
bec39cab | 2065 | |
81ecdfbb RW |
2066 | ; |
2067 | return 0; | |
2068 | } | |
2069 | _ACEOF | |
2070 | if ac_fn_c_try_compile "$LINENO"; then : | |
2071 | ac_hi=-1 ac_mid=-1 | |
2072 | while :; do | |
2073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2074 | /* end confdefs.h. */ | |
2075 | $4 | |
2076 | int | |
2077 | main () | |
2078 | { | |
2079 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2080 | test_array [0] = 0 | |
bec39cab | 2081 | |
81ecdfbb RW |
2082 | ; |
2083 | return 0; | |
2084 | } | |
2085 | _ACEOF | |
2086 | if ac_fn_c_try_compile "$LINENO"; then : | |
2087 | ac_lo=$ac_mid; break | |
2088 | else | |
2089 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2090 | if test $ac_mid -le $ac_hi; then | |
2091 | ac_lo= ac_hi= | |
2092 | break | |
2093 | fi | |
2094 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2095 | fi | |
2096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2097 | done | |
2098 | else | |
2099 | ac_lo= ac_hi= | |
2100 | fi | |
2101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2102 | fi | |
2103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2104 | # Binary search between lo and hi bounds. | |
2105 | while test "x$ac_lo" != "x$ac_hi"; do | |
2106 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2108 | /* end confdefs.h. */ | |
2109 | $4 | |
2110 | int | |
2111 | main () | |
2112 | { | |
2113 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2114 | test_array [0] = 0 | |
bec39cab | 2115 | |
81ecdfbb RW |
2116 | ; |
2117 | return 0; | |
2118 | } | |
2119 | _ACEOF | |
2120 | if ac_fn_c_try_compile "$LINENO"; then : | |
2121 | ac_hi=$ac_mid | |
2122 | else | |
2123 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2124 | fi | |
2125 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2126 | done | |
2127 | case $ac_lo in #(( | |
2128 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2129 | '') ac_retval=1 ;; | |
2130 | esac | |
2131 | else | |
2132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2133 | /* end confdefs.h. */ | |
2134 | $4 | |
2135 | static long int longval () { return $2; } | |
2136 | static unsigned long int ulongval () { return $2; } | |
2137 | #include <stdio.h> | |
2138 | #include <stdlib.h> | |
2139 | int | |
2140 | main () | |
2141 | { | |
bec39cab | 2142 | |
81ecdfbb RW |
2143 | FILE *f = fopen ("conftest.val", "w"); |
2144 | if (! f) | |
2145 | return 1; | |
2146 | if (($2) < 0) | |
2147 | { | |
2148 | long int i = longval (); | |
2149 | if (i != ($2)) | |
2150 | return 1; | |
2151 | fprintf (f, "%ld", i); | |
2152 | } | |
2153 | else | |
2154 | { | |
2155 | unsigned long int i = ulongval (); | |
2156 | if (i != ($2)) | |
2157 | return 1; | |
2158 | fprintf (f, "%lu", i); | |
2159 | } | |
2160 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2161 | on some platforms. */ | |
2162 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2163 | |
81ecdfbb RW |
2164 | ; |
2165 | return 0; | |
2166 | } | |
2167 | _ACEOF | |
2168 | if ac_fn_c_try_run "$LINENO"; then : | |
2169 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2170 | else | |
2171 | ac_retval=1 | |
2172 | fi | |
2173 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2174 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2175 | rm -f conftest.val | |
bec39cab | 2176 | |
81ecdfbb RW |
2177 | fi |
2178 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2179 | return $ac_retval | |
bec39cab | 2180 | |
81ecdfbb | 2181 | } # ac_fn_c_compute_int |
bec39cab | 2182 | |
55a8c076 YQ |
2183 | # ac_fn_c_check_func LINENO FUNC VAR |
2184 | # ---------------------------------- | |
2185 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2186 | ac_fn_c_check_func () | |
81ecdfbb RW |
2187 | { |
2188 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2190 | $as_echo_n "checking for $2... " >&6; } | |
2191 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2192 | $as_echo_n "(cached) " >&6 | |
2193 | else | |
81ecdfbb RW |
2194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2195 | /* end confdefs.h. */ | |
55a8c076 YQ |
2196 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2197 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2198 | #define $2 innocuous_$2 | |
2199 | ||
2200 | /* System header to define __stub macros and hopefully few prototypes, | |
2201 | which can conflict with char $2 (); below. | |
2202 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2203 | <limits.h> exists even on freestanding compilers. */ | |
2204 | ||
2205 | #ifdef __STDC__ | |
2206 | # include <limits.h> | |
2207 | #else | |
2208 | # include <assert.h> | |
2209 | #endif | |
2210 | ||
2211 | #undef $2 | |
2212 | ||
2213 | /* Override any GCC internal prototype to avoid an error. | |
2214 | Use char because int might match the return type of a GCC | |
2215 | builtin and then its argument prototype would still apply. */ | |
2216 | #ifdef __cplusplus | |
2217 | extern "C" | |
2218 | #endif | |
2219 | char $2 (); | |
2220 | /* The GNU C library defines this for functions which it implements | |
2221 | to always fail with ENOSYS. Some functions are actually named | |
2222 | something starting with __ and the normal name is an alias. */ | |
2223 | #if defined __stub_$2 || defined __stub___$2 | |
2224 | choke me | |
2225 | #endif | |
2226 | ||
2227 | int | |
2228 | main () | |
2229 | { | |
2230 | return $2 (); | |
2231 | ; | |
2232 | return 0; | |
2233 | } | |
2234 | _ACEOF | |
2235 | if ac_fn_c_try_link "$LINENO"; then : | |
2236 | eval "$3=yes" | |
2237 | else | |
2238 | eval "$3=no" | |
2239 | fi | |
2240 | rm -f core conftest.err conftest.$ac_objext \ | |
2241 | conftest$ac_exeext conftest.$ac_ext | |
2242 | fi | |
2243 | eval ac_res=\$$3 | |
2244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2245 | $as_echo "$ac_res" >&6; } | |
2246 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2247 | ||
2248 | } # ac_fn_c_check_func | |
2249 | ||
07697489 PA |
2250 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2251 | # ------------------------------------------- | |
2252 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2253 | # variable VAR accordingly. | |
2254 | ac_fn_c_check_type () | |
2255 | { | |
2256 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2258 | $as_echo_n "checking for $2... " >&6; } | |
2259 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2260 | $as_echo_n "(cached) " >&6 | |
2261 | else | |
2262 | eval "$3=no" | |
2263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2264 | /* end confdefs.h. */ | |
2265 | $4 | |
2266 | int | |
2267 | main () | |
2268 | { | |
2269 | if (sizeof ($2)) | |
2270 | return 0; | |
2271 | ; | |
2272 | return 0; | |
2273 | } | |
2274 | _ACEOF | |
2275 | if ac_fn_c_try_compile "$LINENO"; then : | |
2276 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2277 | /* end confdefs.h. */ | |
2278 | $4 | |
2279 | int | |
2280 | main () | |
2281 | { | |
2282 | if (sizeof (($2))) | |
2283 | return 0; | |
2284 | ; | |
2285 | return 0; | |
2286 | } | |
2287 | _ACEOF | |
2288 | if ac_fn_c_try_compile "$LINENO"; then : | |
2289 | ||
2290 | else | |
2291 | eval "$3=yes" | |
2292 | fi | |
2293 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2294 | fi | |
2295 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2296 | fi | |
2297 | eval ac_res=\$$3 | |
2298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2299 | $as_echo "$ac_res" >&6; } | |
2300 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2301 | ||
2302 | } # ac_fn_c_check_type | |
2303 | ||
770d76d7 PA |
2304 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2305 | # ------------------------------------ | |
2306 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2307 | ac_fn_c_check_decl () | |
2308 | { | |
2309 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2310 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2311 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2313 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2314 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2315 | $as_echo_n "(cached) " >&6 | |
2316 | else | |
2317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2318 | /* end confdefs.h. */ | |
2319 | $4 | |
2320 | int | |
2321 | main () | |
2322 | { | |
2323 | #ifndef $as_decl_name | |
2324 | #ifdef __cplusplus | |
2325 | (void) $as_decl_use; | |
2326 | #else | |
2327 | (void) $as_decl_name; | |
2328 | #endif | |
2329 | #endif | |
2330 | ||
2331 | ; | |
2332 | return 0; | |
2333 | } | |
2334 | _ACEOF | |
2335 | if ac_fn_c_try_compile "$LINENO"; then : | |
2336 | eval "$3=yes" | |
2337 | else | |
2338 | eval "$3=no" | |
2339 | fi | |
2340 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2341 | fi | |
2342 | eval ac_res=\$$3 | |
2343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2344 | $as_echo "$ac_res" >&6; } | |
2345 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2346 | ||
2347 | } # ac_fn_c_check_decl | |
2348 | ||
55a8c076 YQ |
2349 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2350 | # ---------------------------------------------------- | |
2351 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2352 | # INCLUDES, setting cache variable VAR accordingly. | |
2353 | ac_fn_c_check_member () | |
2354 | { | |
2355 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2357 | $as_echo_n "checking for $2.$3... " >&6; } | |
2358 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2359 | $as_echo_n "(cached) " >&6 | |
2360 | else | |
2361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2362 | /* end confdefs.h. */ | |
2363 | $5 | |
2364 | int | |
2365 | main () | |
2366 | { | |
2367 | static $2 ac_aggr; | |
2368 | if (ac_aggr.$3) | |
2369 | return 0; | |
2370 | ; | |
2371 | return 0; | |
2372 | } | |
2373 | _ACEOF | |
2374 | if ac_fn_c_try_compile "$LINENO"; then : | |
2375 | eval "$4=yes" | |
2376 | else | |
2377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2378 | /* end confdefs.h. */ | |
2379 | $5 | |
2380 | int | |
2381 | main () | |
2382 | { | |
2383 | static $2 ac_aggr; | |
2384 | if (sizeof ac_aggr.$3) | |
2385 | return 0; | |
2386 | ; | |
2387 | return 0; | |
2388 | } | |
2389 | _ACEOF | |
2390 | if ac_fn_c_try_compile "$LINENO"; then : | |
2391 | eval "$4=yes" | |
2392 | else | |
2393 | eval "$4=no" | |
2394 | fi | |
2395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2396 | fi | |
2397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2398 | fi | |
2399 | eval ac_res=\$$4 | |
2400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2401 | $as_echo "$ac_res" >&6; } | |
2402 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2403 | ||
2404 | } # ac_fn_c_check_member | |
81ecdfbb RW |
2405 | cat >config.log <<_ACEOF |
2406 | This file contains any messages produced by compilers while | |
2407 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2408 | |
81ecdfbb RW |
2409 | It was created by $as_me, which was |
2410 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2411 | |
81ecdfbb | 2412 | $ $0 $@ |
413ccac7 | 2413 | |
81ecdfbb RW |
2414 | _ACEOF |
2415 | exec 5>>config.log | |
2416 | { | |
2417 | cat <<_ASUNAME | |
2418 | ## --------- ## | |
2419 | ## Platform. ## | |
2420 | ## --------- ## | |
413ccac7 | 2421 | |
81ecdfbb RW |
2422 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2423 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2424 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2425 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2426 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2427 | |
81ecdfbb RW |
2428 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2429 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2430 | |
81ecdfbb RW |
2431 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2432 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2433 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2434 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2435 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2436 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2437 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2438 | |
81ecdfbb | 2439 | _ASUNAME |
bec39cab | 2440 | |
bec39cab AC |
2441 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2442 | for as_dir in $PATH | |
2443 | do | |
2444 | IFS=$as_save_IFS | |
2445 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2446 | $as_echo "PATH: $as_dir" |
2447 | done | |
2448 | IFS=$as_save_IFS | |
bec39cab | 2449 | |
81ecdfbb | 2450 | } >&5 |
bec39cab | 2451 | |
81ecdfbb | 2452 | cat >&5 <<_ACEOF |
bec39cab | 2453 | |
bec39cab | 2454 | |
81ecdfbb RW |
2455 | ## ----------- ## |
2456 | ## Core tests. ## | |
2457 | ## ----------- ## | |
2458 | ||
2459 | _ACEOF | |
2460 | ||
2461 | ||
2462 | # Keep a trace of the command line. | |
2463 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2464 | # Strip out --silent because we don't want to record it for future runs. | |
2465 | # Also quote any args containing shell meta-characters. | |
2466 | # Make two passes to allow for proper duplicate-argument suppression. | |
2467 | ac_configure_args= | |
2468 | ac_configure_args0= | |
2469 | ac_configure_args1= | |
2470 | ac_must_keep_next=false | |
2471 | for ac_pass in 1 2 | |
2472 | do | |
2473 | for ac_arg | |
2474 | do | |
2475 | case $ac_arg in | |
2476 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2477 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2478 | | -silent | --silent | --silen | --sile | --sil) | |
2479 | continue ;; | |
2480 | *\'*) | |
2481 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2482 | esac | |
2483 | case $ac_pass in | |
2484 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2485 | 2) | |
2486 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2487 | if test $ac_must_keep_next = true; then | |
2488 | ac_must_keep_next=false # Got value, back to normal. | |
2489 | else | |
2490 | case $ac_arg in | |
2491 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2492 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2493 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2494 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2495 | case "$ac_configure_args0 " in | |
2496 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2497 | esac | |
2498 | ;; | |
2499 | -* ) ac_must_keep_next=true ;; | |
2500 | esac | |
2501 | fi | |
2502 | as_fn_append ac_configure_args " '$ac_arg'" | |
2503 | ;; | |
2504 | esac | |
2505 | done | |
2506 | done | |
2507 | { ac_configure_args0=; unset ac_configure_args0;} | |
2508 | { ac_configure_args1=; unset ac_configure_args1;} | |
2509 | ||
2510 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2511 | # config.log. We remove comments because anyway the quotes in there | |
2512 | # would cause problems or look ugly. | |
2513 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2514 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2515 | trap 'exit_status=$? | |
2516 | # Save into config.log some information that might help in debugging. | |
2517 | { | |
2518 | echo | |
2519 | ||
2520 | cat <<\_ASBOX | |
2521 | ## ---------------- ## | |
2522 | ## Cache variables. ## | |
2523 | ## ---------------- ## | |
2524 | _ASBOX | |
2525 | echo | |
2526 | # The following way of writing the cache mishandles newlines in values, | |
2527 | ( | |
2528 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2529 | eval ac_val=\$$ac_var | |
2530 | case $ac_val in #( | |
2531 | *${as_nl}*) | |
2532 | case $ac_var in #( | |
2533 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2534 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2535 | esac | |
2536 | case $ac_var in #( | |
2537 | _ | IFS | as_nl) ;; #( | |
2538 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2539 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2540 | esac ;; | |
2541 | esac | |
2542 | done | |
2543 | (set) 2>&1 | | |
2544 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2545 | *${as_nl}ac_space=\ *) | |
2546 | sed -n \ | |
2547 | "s/'\''/'\''\\\\'\'''\''/g; | |
2548 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2549 | ;; #( | |
2550 | *) | |
2551 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2552 | ;; | |
2553 | esac | | |
2554 | sort | |
2555 | ) | |
2556 | echo | |
2557 | ||
2558 | cat <<\_ASBOX | |
2559 | ## ----------------- ## | |
2560 | ## Output variables. ## | |
2561 | ## ----------------- ## | |
2562 | _ASBOX | |
2563 | echo | |
2564 | for ac_var in $ac_subst_vars | |
2565 | do | |
2566 | eval ac_val=\$$ac_var | |
2567 | case $ac_val in | |
2568 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2569 | esac | |
2570 | $as_echo "$ac_var='\''$ac_val'\''" | |
2571 | done | sort | |
2572 | echo | |
2573 | ||
2574 | if test -n "$ac_subst_files"; then | |
2575 | cat <<\_ASBOX | |
2576 | ## ------------------- ## | |
2577 | ## File substitutions. ## | |
2578 | ## ------------------- ## | |
2579 | _ASBOX | |
2580 | echo | |
2581 | for ac_var in $ac_subst_files | |
2582 | do | |
2583 | eval ac_val=\$$ac_var | |
2584 | case $ac_val in | |
2585 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2586 | esac | |
2587 | $as_echo "$ac_var='\''$ac_val'\''" | |
2588 | done | sort | |
2589 | echo | |
2590 | fi | |
2591 | ||
2592 | if test -s confdefs.h; then | |
2593 | cat <<\_ASBOX | |
2594 | ## ----------- ## | |
2595 | ## confdefs.h. ## | |
2596 | ## ----------- ## | |
2597 | _ASBOX | |
2598 | echo | |
2599 | cat confdefs.h | |
2600 | echo | |
2601 | fi | |
2602 | test "$ac_signal" != 0 && | |
2603 | $as_echo "$as_me: caught signal $ac_signal" | |
2604 | $as_echo "$as_me: exit $exit_status" | |
2605 | } >&5 | |
2606 | rm -f core *.core core.conftest.* && | |
2607 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2608 | exit $exit_status | |
2609 | ' 0 | |
2610 | for ac_signal in 1 2 13 15; do | |
2611 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2612 | done | |
2613 | ac_signal=0 | |
2614 | ||
2615 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2616 | rm -f -r conftest* confdefs.h | |
2617 | ||
2618 | $as_echo "/* confdefs.h */" > confdefs.h | |
2619 | ||
2620 | # Predefined preprocessor variables. | |
2621 | ||
2622 | cat >>confdefs.h <<_ACEOF | |
2623 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2624 | _ACEOF | |
2625 | ||
2626 | cat >>confdefs.h <<_ACEOF | |
2627 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2628 | _ACEOF | |
2629 | ||
2630 | cat >>confdefs.h <<_ACEOF | |
2631 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2632 | _ACEOF | |
2633 | ||
2634 | cat >>confdefs.h <<_ACEOF | |
2635 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2636 | _ACEOF | |
2637 | ||
2638 | cat >>confdefs.h <<_ACEOF | |
2639 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2640 | _ACEOF | |
2641 | ||
2642 | cat >>confdefs.h <<_ACEOF | |
2643 | #define PACKAGE_URL "$PACKAGE_URL" | |
2644 | _ACEOF | |
2645 | ||
2646 | ||
2647 | # Let the site file select an alternate cache file if it wants to. | |
2648 | # Prefer an explicitly selected file to automatically selected ones. | |
2649 | ac_site_file1=NONE | |
2650 | ac_site_file2=NONE | |
2651 | if test -n "$CONFIG_SITE"; then | |
2652 | ac_site_file1=$CONFIG_SITE | |
2653 | elif test "x$prefix" != xNONE; then | |
2654 | ac_site_file1=$prefix/share/config.site | |
2655 | ac_site_file2=$prefix/etc/config.site | |
2656 | else | |
2657 | ac_site_file1=$ac_default_prefix/share/config.site | |
2658 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2659 | fi | |
2660 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2661 | do | |
2662 | test "x$ac_site_file" = xNONE && continue | |
2663 | if test -r "$ac_site_file"; then | |
2664 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2665 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2666 | sed 's/^/| /' "$ac_site_file" >&5 | |
2667 | . "$ac_site_file" | |
2668 | fi | |
2669 | done | |
2670 | ||
2671 | if test -r "$cache_file"; then | |
2672 | # Some versions of bash will fail to source /dev/null (special | |
2673 | # files actually), so we avoid doing that. | |
2674 | if test -f "$cache_file"; then | |
2675 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2676 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2677 | case $cache_file in | |
2678 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2679 | *) . "./$cache_file";; | |
2680 | esac | |
2681 | fi | |
2682 | else | |
2683 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2684 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2685 | >$cache_file | |
bec39cab AC |
2686 | fi |
2687 | ||
81ecdfbb RW |
2688 | # Check that the precious variables saved in the cache have kept the same |
2689 | # value. | |
2690 | ac_cache_corrupted=false | |
2691 | for ac_var in $ac_precious_vars; do | |
2692 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2693 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2694 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2695 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2696 | case $ac_old_set,$ac_new_set in | |
2697 | set,) | |
2698 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2699 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2700 | ac_cache_corrupted=: ;; | |
2701 | ,set) | |
2702 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2703 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2704 | ac_cache_corrupted=: ;; | |
2705 | ,);; | |
2706 | *) | |
2707 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2708 | # differences in whitespace do not lead to failure. | |
2709 | ac_old_val_w=`echo x $ac_old_val` | |
2710 | ac_new_val_w=`echo x $ac_new_val` | |
2711 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2712 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2713 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2714 | ac_cache_corrupted=: | |
2715 | else | |
2716 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2717 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2718 | eval $ac_var=\$ac_old_val | |
2719 | fi | |
2720 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2721 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2722 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2723 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2724 | fi;; | |
2725 | esac | |
2726 | # Pass precious variables to config.status. | |
2727 | if test "$ac_new_set" = set; then | |
2728 | case $ac_new_val in | |
2729 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2730 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2731 | esac | |
2732 | case " $ac_configure_args " in | |
2733 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2734 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2735 | esac | |
2736 | fi | |
2737 | done | |
2738 | if $ac_cache_corrupted; then | |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2740 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2741 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2742 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2743 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2744 | fi | |
2745 | ## -------------------- ## | |
2746 | ## Main body of script. ## | |
2747 | ## -------------------- ## | |
2748 | ||
2749 | ac_ext=c | |
2750 | ac_cpp='$CPP $CPPFLAGS' | |
2751 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2752 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2753 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2754 | ||
2755 | ||
2756 | ||
2757 | ||
2758 | ||
2759 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2760 | ||
2761 | ||
2762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2763 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2764 | # Check whether --enable-maintainer-mode was given. | |
2765 | if test "${enable_maintainer_mode+set}" = set; then : | |
2766 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2767 | else | |
2768 | USE_MAINTAINER_MODE=no | |
2769 | fi | |
2770 | ||
2771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2772 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2773 | if test $USE_MAINTAINER_MODE = yes; then | |
2774 | MAINTAINER_MODE_TRUE= | |
2775 | MAINTAINER_MODE_FALSE='#' | |
2776 | else | |
2777 | MAINTAINER_MODE_TRUE='#' | |
2778 | MAINTAINER_MODE_FALSE= | |
2779 | fi | |
2780 | ||
2781 | MAINT=$MAINTAINER_MODE_TRUE | |
2782 | ||
2783 | ||
2784 | ||
17ef446e | 2785 | # Set the 'development' global. |
270c9937 | 2786 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2787 | |
81ecdfbb RW |
2788 | ac_ext=c |
2789 | ac_cpp='$CPP $CPPFLAGS' | |
2790 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2791 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2792 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2793 | if test -n "$ac_tool_prefix"; then | |
2794 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2795 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2797 | $as_echo_n "checking for $ac_word... " >&6; } | |
2798 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2799 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2800 | else |
2801 | if test -n "$CC"; then | |
2802 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2803 | else | |
bec39cab AC |
2804 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2805 | for as_dir in $PATH | |
2806 | do | |
2807 | IFS=$as_save_IFS | |
2808 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2809 | for ac_exec_ext in '' $ac_executable_extensions; do |
2810 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2811 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2812 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2813 | break 2 |
2814 | fi | |
2815 | done | |
81ecdfbb RW |
2816 | done |
2817 | IFS=$as_save_IFS | |
bec39cab | 2818 | |
c906108c SS |
2819 | fi |
2820 | fi | |
bec39cab | 2821 | CC=$ac_cv_prog_CC |
c906108c | 2822 | if test -n "$CC"; then |
81ecdfbb RW |
2823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2824 | $as_echo "$CC" >&6; } | |
c906108c | 2825 | else |
81ecdfbb RW |
2826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2827 | $as_echo "no" >&6; } | |
c906108c SS |
2828 | fi |
2829 | ||
81ecdfbb | 2830 | |
b4e70030 JB |
2831 | fi |
2832 | if test -z "$ac_cv_prog_CC"; then | |
2833 | ac_ct_CC=$CC | |
81ecdfbb RW |
2834 | # Extract the first word of "gcc", so it can be a program name with args. |
2835 | set dummy gcc; ac_word=$2 | |
2836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2837 | $as_echo_n "checking for $ac_word... " >&6; } | |
2838 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2839 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2840 | else |
2841 | if test -n "$ac_ct_CC"; then | |
2842 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2843 | else | |
2844 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2845 | for as_dir in $PATH | |
2846 | do | |
2847 | IFS=$as_save_IFS | |
2848 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2849 | for ac_exec_ext in '' $ac_executable_extensions; do |
2850 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2851 | ac_cv_prog_ac_ct_CC="gcc" | |
2852 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2853 | break 2 |
4e8d927d | 2854 | fi |
b4e70030 | 2855 | done |
81ecdfbb RW |
2856 | done |
2857 | IFS=$as_save_IFS | |
b4e70030 JB |
2858 | |
2859 | fi | |
2860 | fi | |
2861 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2862 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2864 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2865 | else |
81ecdfbb RW |
2866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2867 | $as_echo "no" >&6; } | |
b4e70030 JB |
2868 | fi |
2869 | ||
81ecdfbb RW |
2870 | if test "x$ac_ct_CC" = x; then |
2871 | CC="" | |
2872 | else | |
2873 | case $cross_compiling:$ac_tool_warned in | |
2874 | yes:) | |
2875 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2876 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2877 | ac_tool_warned=yes ;; | |
2878 | esac | |
2879 | CC=$ac_ct_CC | |
2880 | fi | |
b4e70030 JB |
2881 | else |
2882 | CC="$ac_cv_prog_CC" | |
2883 | fi | |
2884 | ||
c906108c | 2885 | if test -z "$CC"; then |
81ecdfbb RW |
2886 | if test -n "$ac_tool_prefix"; then |
2887 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2888 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2890 | $as_echo_n "checking for $ac_word... " >&6; } | |
2891 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2892 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2893 | else |
2894 | if test -n "$CC"; then | |
2895 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2896 | else | |
bec39cab AC |
2897 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2898 | for as_dir in $PATH | |
2899 | do | |
2900 | IFS=$as_save_IFS | |
2901 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2902 | for ac_exec_ext in '' $ac_executable_extensions; do |
2903 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2904 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2905 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2906 | break 2 |
2907 | fi | |
2908 | done | |
81ecdfbb RW |
2909 | done |
2910 | IFS=$as_save_IFS | |
2911 | ||
2912 | fi | |
2913 | fi | |
2914 | CC=$ac_cv_prog_CC | |
2915 | if test -n "$CC"; then | |
2916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2917 | $as_echo "$CC" >&6; } | |
2918 | else | |
2919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2920 | $as_echo "no" >&6; } | |
2921 | fi | |
2922 | ||
2923 | ||
2924 | fi | |
2925 | fi | |
2926 | if test -z "$CC"; then | |
2927 | # Extract the first word of "cc", so it can be a program name with args. | |
2928 | set dummy cc; ac_word=$2 | |
2929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2930 | $as_echo_n "checking for $ac_word... " >&6; } | |
2931 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2932 | $as_echo_n "(cached) " >&6 | |
2933 | else | |
2934 | if test -n "$CC"; then | |
2935 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2936 | else | |
2937 | ac_prog_rejected=no | |
2938 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2939 | for as_dir in $PATH | |
2940 | do | |
2941 | IFS=$as_save_IFS | |
2942 | test -z "$as_dir" && as_dir=. | |
2943 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2944 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2945 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2946 | ac_prog_rejected=yes | |
2947 | continue | |
2948 | fi | |
2949 | ac_cv_prog_CC="cc" | |
2950 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2951 | break 2 | |
2952 | fi | |
2953 | done | |
2954 | done | |
2955 | IFS=$as_save_IFS | |
bec39cab | 2956 | |
c906108c SS |
2957 | if test $ac_prog_rejected = yes; then |
2958 | # We found a bogon in the path, so make sure we never use it. | |
2959 | set dummy $ac_cv_prog_CC | |
2960 | shift | |
bec39cab | 2961 | if test $# != 0; then |
c906108c SS |
2962 | # We chose a different compiler from the bogus one. |
2963 | # However, it has the same basename, so the bogon will be chosen | |
2964 | # first if we set CC to just the basename; use the full file name. | |
2965 | shift | |
bec39cab | 2966 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2967 | fi |
2968 | fi | |
2969 | fi | |
2970 | fi | |
bec39cab | 2971 | CC=$ac_cv_prog_CC |
c906108c | 2972 | if test -n "$CC"; then |
81ecdfbb RW |
2973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2974 | $as_echo "$CC" >&6; } | |
c906108c | 2975 | else |
81ecdfbb RW |
2976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2977 | $as_echo "no" >&6; } | |
c906108c SS |
2978 | fi |
2979 | ||
81ecdfbb | 2980 | |
bec39cab AC |
2981 | fi |
2982 | if test -z "$CC"; then | |
2983 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2984 | for ac_prog in cl.exe |
bec39cab AC |
2985 | do |
2986 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2987 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2989 | $as_echo_n "checking for $ac_word... " >&6; } | |
2990 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2991 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2992 | else |
2993 | if test -n "$CC"; then | |
2994 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2995 | else | |
bec39cab AC |
2996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2997 | for as_dir in $PATH | |
2998 | do | |
2999 | IFS=$as_save_IFS | |
3000 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3001 | for ac_exec_ext in '' $ac_executable_extensions; do |
3002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3003 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3004 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3005 | break 2 |
3006 | fi | |
3007 | done | |
81ecdfbb RW |
3008 | done |
3009 | IFS=$as_save_IFS | |
bec39cab | 3010 | |
c906108c SS |
3011 | fi |
3012 | fi | |
bec39cab | 3013 | CC=$ac_cv_prog_CC |
c906108c | 3014 | if test -n "$CC"; then |
81ecdfbb RW |
3015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3016 | $as_echo "$CC" >&6; } | |
c906108c | 3017 | else |
81ecdfbb RW |
3018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3019 | $as_echo "no" >&6; } | |
c906108c | 3020 | fi |
bec39cab | 3021 | |
81ecdfbb | 3022 | |
bec39cab AC |
3023 | test -n "$CC" && break |
3024 | done | |
3025 | fi | |
3026 | if test -z "$CC"; then | |
3027 | ac_ct_CC=$CC | |
81ecdfbb | 3028 | for ac_prog in cl.exe |
bec39cab AC |
3029 | do |
3030 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3031 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3033 | $as_echo_n "checking for $ac_word... " >&6; } | |
3034 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3035 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3036 | else |
3037 | if test -n "$ac_ct_CC"; then | |
3038 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3039 | else | |
3040 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3041 | for as_dir in $PATH | |
3042 | do | |
3043 | IFS=$as_save_IFS | |
3044 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3045 | for ac_exec_ext in '' $ac_executable_extensions; do |
3046 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3047 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3048 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3049 | break 2 |
c906108c | 3050 | fi |
bec39cab | 3051 | done |
81ecdfbb RW |
3052 | done |
3053 | IFS=$as_save_IFS | |
bec39cab AC |
3054 | |
3055 | fi | |
3056 | fi | |
3057 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3058 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3060 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3061 | else |
81ecdfbb RW |
3062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3063 | $as_echo "no" >&6; } | |
c906108c SS |
3064 | fi |
3065 | ||
81ecdfbb | 3066 | |
bec39cab AC |
3067 | test -n "$ac_ct_CC" && break |
3068 | done | |
c906108c | 3069 | |
81ecdfbb RW |
3070 | if test "x$ac_ct_CC" = x; then |
3071 | CC="" | |
3072 | else | |
3073 | case $cross_compiling:$ac_tool_warned in | |
3074 | yes:) | |
3075 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3076 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3077 | ac_tool_warned=yes ;; | |
3078 | esac | |
3079 | CC=$ac_ct_CC | |
3080 | fi | |
bec39cab AC |
3081 | fi |
3082 | ||
3083 | fi | |
3084 | ||
3085 | ||
81ecdfbb RW |
3086 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3087 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3088 | as_fn_error "no acceptable C compiler found in \$PATH | |
3089 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3090 | |
3091 | # Provide some information about the compiler. | |
81ecdfbb RW |
3092 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3093 | set X $ac_compile | |
3094 | ac_compiler=$2 | |
3095 | for ac_option in --version -v -V -qversion; do | |
3096 | { { ac_try="$ac_compiler $ac_option >&5" | |
3097 | case "(($ac_try" in | |
3098 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3099 | *) ac_try_echo=$ac_try;; | |
3100 | esac | |
3101 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3102 | $as_echo "$ac_try_echo"; } >&5 | |
3103 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3104 | ac_status=$? |
81ecdfbb RW |
3105 | if test -s conftest.err; then |
3106 | sed '10a\ | |
3107 | ... rest of stderr output deleted ... | |
3108 | 10q' conftest.err >conftest.er1 | |
3109 | cat conftest.er1 >&5 | |
3110 | rm -f conftest.er1 conftest.err | |
3111 | fi | |
3112 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3113 | test $ac_status = 0; } | |
3114 | done | |
bec39cab | 3115 | |
81ecdfbb | 3116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3117 | /* end confdefs.h. */ |
3118 | ||
3119 | int | |
3120 | main () | |
3121 | { | |
3122 | ||
3123 | ; | |
3124 | return 0; | |
3125 | } | |
3126 | _ACEOF | |
3127 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3128 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3129 | # Try to create an executable without -o first, disregard a.out. |
3130 | # It will help us diagnose broken compilers, and finding out an intuition | |
3131 | # of exeext. | |
81ecdfbb RW |
3132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3133 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3134 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3135 | ||
3136 | # The possible output files: | |
3137 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3138 | ||
3139 | ac_rmfiles= | |
3140 | for ac_file in $ac_files | |
3141 | do | |
3142 | case $ac_file in | |
3143 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3144 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3145 | esac | |
3146 | done | |
3147 | rm -f $ac_rmfiles | |
3148 | ||
3149 | if { { ac_try="$ac_link_default" | |
3150 | case "(($ac_try" in | |
3151 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3152 | *) ac_try_echo=$ac_try;; | |
3153 | esac | |
3154 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3155 | $as_echo "$ac_try_echo"; } >&5 | |
3156 | (eval "$ac_link_default") 2>&5 | |
3157 | ac_status=$? | |
3158 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3159 | test $ac_status = 0; }; then : | |
3160 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3161 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3162 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3163 | # so that the user can short-circuit this test for compilers unknown to | |
3164 | # Autoconf. | |
3165 | for ac_file in $ac_files '' | |
bec39cab AC |
3166 | do |
3167 | test -f "$ac_file" || continue | |
3168 | case $ac_file in | |
81ecdfbb | 3169 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3170 | ;; |
3171 | [ab].out ) | |
3172 | # We found the default executable, but exeext='' is most | |
3173 | # certainly right. | |
3174 | break;; | |
3175 | *.* ) | |
81ecdfbb RW |
3176 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3177 | then :; else | |
3178 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3179 | fi | |
3180 | # We set ac_cv_exeext here because the later test for it is not | |
3181 | # safe: cross compilers may not add the suffix if given an `-o' | |
3182 | # argument, so we may need to know it at that point already. | |
3183 | # Even if this section looks crufty: it has the advantage of | |
3184 | # actually working. | |
b4e70030 JB |
3185 | break;; |
3186 | * ) | |
3187 | break;; | |
bec39cab AC |
3188 | esac |
3189 | done | |
81ecdfbb RW |
3190 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3191 | ||
bec39cab | 3192 | else |
81ecdfbb RW |
3193 | ac_file='' |
3194 | fi | |
3195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3196 | $as_echo "$ac_file" >&6; } | |
3197 | if test -z "$ac_file"; then : | |
3198 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3199 | sed 's/^/| /' conftest.$ac_ext >&5 |
3200 | ||
81ecdfbb RW |
3201 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3202 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3203 | { as_fn_set_status 77 | |
3204 | as_fn_error "C compiler cannot create executables | |
3205 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3206 | fi |
b4e70030 | 3207 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3208 | |
81ecdfbb | 3209 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3210 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3212 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3213 | # If not cross compiling, check that we can run a simple program. |
3214 | if test "$cross_compiling" != yes; then | |
3215 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3216 | { { case "(($ac_try" in |
3217 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3218 | *) ac_try_echo=$ac_try;; | |
3219 | esac | |
3220 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3221 | $as_echo "$ac_try_echo"; } >&5 | |
3222 | (eval "$ac_try") 2>&5 | |
bec39cab | 3223 | ac_status=$? |
81ecdfbb RW |
3224 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3225 | test $ac_status = 0; }; }; then | |
bec39cab | 3226 | cross_compiling=no |
c906108c | 3227 | else |
bec39cab AC |
3228 | if test "$cross_compiling" = maybe; then |
3229 | cross_compiling=yes | |
3230 | else | |
81ecdfbb RW |
3231 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3232 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3233 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3234 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3235 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3236 | fi |
c906108c | 3237 | fi |
bec39cab | 3238 | fi |
81ecdfbb RW |
3239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3240 | $as_echo "yes" >&6; } | |
bec39cab | 3241 | |
81ecdfbb | 3242 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3243 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3244 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3245 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3247 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3249 | $as_echo "$cross_compiling" >&6; } | |
3250 | ||
3251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3252 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3253 | if { { ac_try="$ac_link" | |
3254 | case "(($ac_try" in | |
3255 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3256 | *) ac_try_echo=$ac_try;; | |
3257 | esac | |
3258 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3259 | $as_echo "$ac_try_echo"; } >&5 | |
3260 | (eval "$ac_link") 2>&5 | |
bec39cab | 3261 | ac_status=$? |
81ecdfbb RW |
3262 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3263 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3264 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3265 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3266 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3267 | # `rm'. | |
3268 | for ac_file in conftest.exe conftest conftest.*; do | |
3269 | test -f "$ac_file" || continue | |
3270 | case $ac_file in | |
81ecdfbb | 3271 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3272 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3273 | break;; |
3274 | * ) break;; | |
3275 | esac | |
3276 | done | |
c906108c | 3277 | else |
81ecdfbb RW |
3278 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3279 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3280 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3281 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3282 | fi |
b4e70030 | 3283 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3285 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3286 | |
b4e70030 | 3287 | rm -f conftest.$ac_ext |
bec39cab AC |
3288 | EXEEXT=$ac_cv_exeext |
3289 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3291 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3292 | if test "${ac_cv_objext+set}" = set; then : | |
3293 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3294 | else |
81ecdfbb | 3295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3296 | /* end confdefs.h. */ |
3297 | ||
3298 | int | |
3299 | main () | |
3300 | { | |
3301 | ||
3302 | ; | |
3303 | return 0; | |
3304 | } | |
3305 | _ACEOF | |
3306 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3307 | if { { ac_try="$ac_compile" |
3308 | case "(($ac_try" in | |
3309 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3310 | *) ac_try_echo=$ac_try;; | |
3311 | esac | |
3312 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3313 | $as_echo "$ac_try_echo"; } >&5 | |
3314 | (eval "$ac_compile") 2>&5 | |
3315 | ac_status=$? | |
3316 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3317 | test $ac_status = 0; }; then : | |
3318 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3319 | test -f "$ac_file" || continue; | |
bec39cab | 3320 | case $ac_file in |
81ecdfbb | 3321 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3322 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3323 | break;; | |
3324 | esac | |
3325 | done | |
c906108c | 3326 | else |
81ecdfbb | 3327 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3328 | sed 's/^/| /' conftest.$ac_ext >&5 |
3329 | ||
81ecdfbb RW |
3330 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3331 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3332 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3333 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3334 | fi |
b4e70030 | 3335 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3336 | fi |
81ecdfbb RW |
3337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3338 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3339 | OBJEXT=$ac_cv_objext |
3340 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3342 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3343 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3344 | $as_echo_n "(cached) " >&6 | |
c906108c | 3345 | else |
81ecdfbb | 3346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3347 | /* end confdefs.h. */ |
3348 | ||
3349 | int | |
3350 | main () | |
3351 | { | |
3352 | #ifndef __GNUC__ | |
3353 | choke me | |
3354 | #endif | |
3355 | ||
3356 | ; | |
3357 | return 0; | |
3358 | } | |
3359 | _ACEOF | |
81ecdfbb | 3360 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3361 | ac_compiler_gnu=yes |
3362 | else | |
81ecdfbb | 3363 | ac_compiler_gnu=no |
bec39cab | 3364 | fi |
81ecdfbb | 3365 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3366 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3367 | ||
3368 | fi | |
81ecdfbb RW |
3369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3370 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3371 | if test $ac_compiler_gnu = yes; then | |
3372 | GCC=yes | |
3373 | else | |
3374 | GCC= | |
3375 | fi | |
bec39cab AC |
3376 | ac_test_CFLAGS=${CFLAGS+set} |
3377 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3379 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3380 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3381 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3382 | else |
81ecdfbb RW |
3383 | ac_save_c_werror_flag=$ac_c_werror_flag |
3384 | ac_c_werror_flag=yes | |
3385 | ac_cv_prog_cc_g=no | |
3386 | CFLAGS="-g" | |
3387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3388 | /* end confdefs.h. */ |
3389 | ||
3390 | int | |
3391 | main () | |
3392 | { | |
3393 | ||
3394 | ; | |
3395 | return 0; | |
3396 | } | |
3397 | _ACEOF | |
81ecdfbb | 3398 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3399 | ac_cv_prog_cc_g=yes |
3400 | else | |
81ecdfbb RW |
3401 | CFLAGS="" |
3402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3403 | /* end confdefs.h. */ | |
3404 | ||
3405 | int | |
3406 | main () | |
3407 | { | |
3408 | ||
3409 | ; | |
3410 | return 0; | |
3411 | } | |
3412 | _ACEOF | |
3413 | if ac_fn_c_try_compile "$LINENO"; then : | |
3414 | ||
3415 | else | |
3416 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3417 | CFLAGS="-g" | |
3418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3419 | /* end confdefs.h. */ | |
3420 | ||
3421 | int | |
3422 | main () | |
3423 | { | |
c906108c | 3424 | |
81ecdfbb RW |
3425 | ; |
3426 | return 0; | |
3427 | } | |
3428 | _ACEOF | |
3429 | if ac_fn_c_try_compile "$LINENO"; then : | |
3430 | ac_cv_prog_cc_g=yes | |
3431 | fi | |
3432 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3433 | fi | |
3434 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3435 | fi |
81ecdfbb RW |
3436 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3437 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3438 | fi |
81ecdfbb RW |
3439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3440 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3441 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3442 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3443 | elif test $ac_cv_prog_cc_g = yes; then |
3444 | if test "$GCC" = yes; then | |
3445 | CFLAGS="-g -O2" | |
3446 | else | |
3447 | CFLAGS="-g" | |
3448 | fi | |
3449 | else | |
3450 | if test "$GCC" = yes; then | |
3451 | CFLAGS="-O2" | |
3452 | else | |
3453 | CFLAGS= | |
3454 | fi | |
3455 | fi | |
81ecdfbb RW |
3456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3457 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3458 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3459 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3460 | else |
81ecdfbb | 3461 | ac_cv_prog_cc_c89=no |
bec39cab | 3462 | ac_save_CC=$CC |
81ecdfbb | 3463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3464 | /* end confdefs.h. */ |
c906108c SS |
3465 | #include <stdarg.h> |
3466 | #include <stdio.h> | |
3467 | #include <sys/types.h> | |
3468 | #include <sys/stat.h> | |
3469 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3470 | struct buf { int x; }; | |
3471 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3472 | static char *e (p, i) | |
3473 | char **p; | |
3474 | int i; | |
3475 | { | |
3476 | return p[i]; | |
3477 | } | |
3478 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3479 | { | |
3480 | char *s; | |
3481 | va_list v; | |
3482 | va_start (v,p); | |
3483 | s = g (p, va_arg (v,int)); | |
3484 | va_end (v); | |
3485 | return s; | |
3486 | } | |
bec39cab AC |
3487 | |
3488 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3489 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3490 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3491 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3492 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3493 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3494 | that's true only with -std. */ |
bec39cab AC |
3495 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3496 | ||
81ecdfbb RW |
3497 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3498 | inside strings and character constants. */ | |
3499 | #define FOO(x) 'x' | |
3500 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3501 | ||
c906108c SS |
3502 | int test (int i, double x); |
3503 | struct s1 {int (*f) (int a);}; | |
3504 | struct s2 {int (*f) (double a);}; | |
3505 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3506 | int argc; | |
3507 | char **argv; | |
bec39cab AC |
3508 | int |
3509 | main () | |
3510 | { | |
c906108c | 3511 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3512 | ; |
3513 | return 0; | |
3514 | } | |
3515 | _ACEOF | |
81ecdfbb RW |
3516 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3517 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3518 | do |
3519 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3520 | if ac_fn_c_try_compile "$LINENO"; then : |
3521 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3522 | fi |
81ecdfbb RW |
3523 | rm -f core conftest.err conftest.$ac_objext |
3524 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3525 | done |
81ecdfbb | 3526 | rm -f conftest.$ac_ext |
bec39cab | 3527 | CC=$ac_save_CC |
c906108c SS |
3528 | |
3529 | fi | |
81ecdfbb RW |
3530 | # AC_CACHE_VAL |
3531 | case "x$ac_cv_prog_cc_c89" in | |
3532 | x) | |
3533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3534 | $as_echo "none needed" >&6; } ;; | |
3535 | xno) | |
3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3537 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3538 | *) |
81ecdfbb RW |
3539 | CC="$CC $ac_cv_prog_cc_c89" |
3540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3541 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3542 | esac |
81ecdfbb | 3543 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3544 | |
b4e70030 JB |
3545 | fi |
3546 | ||
bec39cab AC |
3547 | ac_ext=c |
3548 | ac_cpp='$CPP $CPPFLAGS' | |
3549 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3550 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3551 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3552 | |
3bc3d82a PA |
3553 | ac_ext=cpp |
3554 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3555 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3556 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3557 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3558 | if test -z "$CXX"; then | |
3559 | if test -n "$CCC"; then | |
3560 | CXX=$CCC | |
3561 | else | |
3562 | if test -n "$ac_tool_prefix"; then | |
3563 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3564 | do | |
3565 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3566 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3568 | $as_echo_n "checking for $ac_word... " >&6; } | |
3569 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
3570 | $as_echo_n "(cached) " >&6 | |
3571 | else | |
3572 | if test -n "$CXX"; then | |
3573 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3574 | else | |
3575 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3576 | for as_dir in $PATH | |
3577 | do | |
3578 | IFS=$as_save_IFS | |
3579 | test -z "$as_dir" && as_dir=. | |
3580 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3581 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3582 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
3583 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3584 | break 2 | |
3585 | fi | |
3586 | done | |
3587 | done | |
3588 | IFS=$as_save_IFS | |
3589 | ||
3590 | fi | |
3591 | fi | |
3592 | CXX=$ac_cv_prog_CXX | |
3593 | if test -n "$CXX"; then | |
3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3595 | $as_echo "$CXX" >&6; } | |
3596 | else | |
3597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3598 | $as_echo "no" >&6; } | |
3599 | fi | |
3600 | ||
3601 | ||
3602 | test -n "$CXX" && break | |
3603 | done | |
3604 | fi | |
3605 | if test -z "$CXX"; then | |
3606 | ac_ct_CXX=$CXX | |
3607 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3608 | do | |
3609 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3610 | set dummy $ac_prog; ac_word=$2 | |
3611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3612 | $as_echo_n "checking for $ac_word... " >&6; } | |
3613 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
3614 | $as_echo_n "(cached) " >&6 | |
3615 | else | |
3616 | if test -n "$ac_ct_CXX"; then | |
3617 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3618 | else | |
3619 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3620 | for as_dir in $PATH | |
3621 | do | |
3622 | IFS=$as_save_IFS | |
3623 | test -z "$as_dir" && as_dir=. | |
3624 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3625 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3626 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
3627 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3628 | break 2 | |
3629 | fi | |
3630 | done | |
3631 | done | |
3632 | IFS=$as_save_IFS | |
3633 | ||
3634 | fi | |
3635 | fi | |
3636 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3637 | if test -n "$ac_ct_CXX"; then | |
3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3639 | $as_echo "$ac_ct_CXX" >&6; } | |
3640 | else | |
3641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3642 | $as_echo "no" >&6; } | |
3643 | fi | |
3644 | ||
3645 | ||
3646 | test -n "$ac_ct_CXX" && break | |
3647 | done | |
3648 | ||
3649 | if test "x$ac_ct_CXX" = x; then | |
3650 | CXX="g++" | |
3651 | else | |
3652 | case $cross_compiling:$ac_tool_warned in | |
3653 | yes:) | |
3654 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3655 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3656 | ac_tool_warned=yes ;; | |
3657 | esac | |
3658 | CXX=$ac_ct_CXX | |
3659 | fi | |
3660 | fi | |
3661 | ||
3662 | fi | |
3663 | fi | |
3664 | # Provide some information about the compiler. | |
3665 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3666 | set X $ac_compile | |
3667 | ac_compiler=$2 | |
3668 | for ac_option in --version -v -V -qversion; do | |
3669 | { { ac_try="$ac_compiler $ac_option >&5" | |
3670 | case "(($ac_try" in | |
3671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3672 | *) ac_try_echo=$ac_try;; | |
3673 | esac | |
3674 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3675 | $as_echo "$ac_try_echo"; } >&5 | |
3676 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3677 | ac_status=$? | |
3678 | if test -s conftest.err; then | |
3679 | sed '10a\ | |
3680 | ... rest of stderr output deleted ... | |
3681 | 10q' conftest.err >conftest.er1 | |
3682 | cat conftest.er1 >&5 | |
3683 | rm -f conftest.er1 conftest.err | |
3684 | fi | |
3685 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3686 | test $ac_status = 0; } | |
3687 | done | |
3688 | ||
3689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3690 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
3691 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
3692 | $as_echo_n "(cached) " >&6 | |
3693 | else | |
3694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3695 | /* end confdefs.h. */ | |
3696 | ||
3697 | int | |
3698 | main () | |
3699 | { | |
3700 | #ifndef __GNUC__ | |
3701 | choke me | |
3702 | #endif | |
3703 | ||
3704 | ; | |
3705 | return 0; | |
3706 | } | |
3707 | _ACEOF | |
3708 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3709 | ac_compiler_gnu=yes | |
3710 | else | |
3711 | ac_compiler_gnu=no | |
3712 | fi | |
3713 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3714 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3715 | ||
3716 | fi | |
3717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3718 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3719 | if test $ac_compiler_gnu = yes; then | |
3720 | GXX=yes | |
3721 | else | |
3722 | GXX= | |
3723 | fi | |
3724 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3725 | ac_save_CXXFLAGS=$CXXFLAGS | |
3726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3727 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
3728 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
3729 | $as_echo_n "(cached) " >&6 | |
3730 | else | |
3731 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3732 | ac_cxx_werror_flag=yes | |
3733 | ac_cv_prog_cxx_g=no | |
3734 | CXXFLAGS="-g" | |
3735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3736 | /* end confdefs.h. */ | |
3737 | ||
3738 | int | |
3739 | main () | |
3740 | { | |
3741 | ||
3742 | ; | |
3743 | return 0; | |
3744 | } | |
3745 | _ACEOF | |
3746 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3747 | ac_cv_prog_cxx_g=yes | |
3748 | else | |
3749 | CXXFLAGS="" | |
3750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3751 | /* end confdefs.h. */ | |
3752 | ||
3753 | int | |
3754 | main () | |
3755 | { | |
3756 | ||
3757 | ; | |
3758 | return 0; | |
3759 | } | |
3760 | _ACEOF | |
3761 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3762 | ||
3763 | else | |
3764 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3765 | CXXFLAGS="-g" | |
3766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3767 | /* end confdefs.h. */ | |
3768 | ||
3769 | int | |
3770 | main () | |
3771 | { | |
3772 | ||
3773 | ; | |
3774 | return 0; | |
3775 | } | |
3776 | _ACEOF | |
3777 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3778 | ac_cv_prog_cxx_g=yes | |
3779 | fi | |
3780 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3781 | fi | |
3782 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3783 | fi | |
3784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3785 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3786 | fi | |
3787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3788 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3789 | if test "$ac_test_CXXFLAGS" = set; then | |
3790 | CXXFLAGS=$ac_save_CXXFLAGS | |
3791 | elif test $ac_cv_prog_cxx_g = yes; then | |
3792 | if test "$GXX" = yes; then | |
3793 | CXXFLAGS="-g -O2" | |
3794 | else | |
3795 | CXXFLAGS="-g" | |
3796 | fi | |
3797 | else | |
3798 | if test "$GXX" = yes; then | |
3799 | CXXFLAGS="-O2" | |
3800 | else | |
3801 | CXXFLAGS= | |
3802 | fi | |
3803 | fi | |
3804 | ac_ext=c | |
3805 | ac_cpp='$CPP $CPPFLAGS' | |
3806 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3807 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3808 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3809 | ||
3810 | ||
60ca704f | 3811 | |
bec39cab AC |
3812 | ac_ext=c |
3813 | ac_cpp='$CPP $CPPFLAGS' | |
3814 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3815 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3816 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3818 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3819 | # On Suns, sometimes $CPP names a directory. |
3820 | if test -n "$CPP" && test -d "$CPP"; then | |
3821 | CPP= | |
8bb2c122 | 3822 | fi |
bec39cab | 3823 | if test -z "$CPP"; then |
81ecdfbb RW |
3824 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3825 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3826 | else |
3827 | # Double quotes because CPP needs to be expanded | |
3828 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3829 | do | |
3830 | ac_preproc_ok=false | |
3831 | for ac_c_preproc_warn_flag in '' yes | |
3832 | do | |
3833 | # Use a header file that comes with gcc, so configuring glibc | |
3834 | # with a fresh cross-compiler works. | |
3835 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3836 | # <limits.h> exists even on freestanding compilers. | |
3837 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3838 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3840 | /* end confdefs.h. */ |
3841 | #ifdef __STDC__ | |
3842 | # include <limits.h> | |
3843 | #else | |
3844 | # include <assert.h> | |
3845 | #endif | |
3846 | Syntax error | |
3847 | _ACEOF | |
81ecdfbb | 3848 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3849 | |
81ecdfbb | 3850 | else |
bec39cab AC |
3851 | # Broken: fails on valid input. |
3852 | continue | |
3853 | fi | |
3854 | rm -f conftest.err conftest.$ac_ext | |
3855 | ||
81ecdfbb | 3856 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3857 | # can be detected and how. |
81ecdfbb | 3858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3859 | /* end confdefs.h. */ |
3860 | #include <ac_nonexistent.h> | |
3861 | _ACEOF | |
81ecdfbb | 3862 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3863 | # Broken: success on invalid input. |
3864 | continue | |
8bb2c122 | 3865 | else |
bec39cab AC |
3866 | # Passes both tests. |
3867 | ac_preproc_ok=: | |
3868 | break | |
8bb2c122 | 3869 | fi |
bec39cab | 3870 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3871 | |
bec39cab AC |
3872 | done |
3873 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3874 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3875 | if $ac_preproc_ok; then : |
bec39cab AC |
3876 | break |
3877 | fi | |
8bb2c122 | 3878 | |
bec39cab AC |
3879 | done |
3880 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3881 | |
c906108c | 3882 | fi |
bec39cab AC |
3883 | CPP=$ac_cv_prog_CPP |
3884 | else | |
3885 | ac_cv_prog_CPP=$CPP | |
c906108c | 3886 | fi |
81ecdfbb RW |
3887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3888 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3889 | ac_preproc_ok=false |
3890 | for ac_c_preproc_warn_flag in '' yes | |
3891 | do | |
3892 | # Use a header file that comes with gcc, so configuring glibc | |
3893 | # with a fresh cross-compiler works. | |
3894 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3895 | # <limits.h> exists even on freestanding compilers. | |
3896 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3897 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3899 | /* end confdefs.h. */ |
3900 | #ifdef __STDC__ | |
3901 | # include <limits.h> | |
3902 | #else | |
3903 | # include <assert.h> | |
3904 | #endif | |
3905 | Syntax error | |
3906 | _ACEOF | |
81ecdfbb | 3907 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3908 | |
81ecdfbb | 3909 | else |
bec39cab AC |
3910 | # Broken: fails on valid input. |
3911 | continue | |
3912 | fi | |
3913 | rm -f conftest.err conftest.$ac_ext | |
3914 | ||
81ecdfbb | 3915 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3916 | # can be detected and how. |
81ecdfbb | 3917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3918 | /* end confdefs.h. */ |
3919 | #include <ac_nonexistent.h> | |
3920 | _ACEOF | |
81ecdfbb | 3921 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3922 | # Broken: success on invalid input. |
3923 | continue | |
c906108c | 3924 | else |
bec39cab AC |
3925 | # Passes both tests. |
3926 | ac_preproc_ok=: | |
3927 | break | |
c906108c | 3928 | fi |
bec39cab | 3929 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3930 | |
bec39cab AC |
3931 | done |
3932 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3933 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3934 | if $ac_preproc_ok; then : |
3935 | ||
c906108c | 3936 | else |
81ecdfbb RW |
3937 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3938 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3939 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3940 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3941 | fi |
c906108c | 3942 | |
bec39cab AC |
3943 | ac_ext=c |
3944 | ac_cpp='$CPP $CPPFLAGS' | |
3945 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3946 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3947 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3948 | ||
3949 | ||
81ecdfbb RW |
3950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3951 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3952 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3953 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3954 | else |
81ecdfbb RW |
3955 | if test -z "$GREP"; then |
3956 | ac_path_GREP_found=false | |
3957 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3958 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3959 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3960 | do | |
3961 | IFS=$as_save_IFS | |
3962 | test -z "$as_dir" && as_dir=. | |
3963 | for ac_prog in grep ggrep; do | |
3964 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3965 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3966 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3967 | # Check for GNU ac_path_GREP and select it if it is found. | |
3968 | # Check for GNU $ac_path_GREP | |
3969 | case `"$ac_path_GREP" --version 2>&1` in | |
3970 | *GNU*) | |
3971 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3972 | *) | |
3973 | ac_count=0 | |
3974 | $as_echo_n 0123456789 >"conftest.in" | |
3975 | while : | |
3976 | do | |
3977 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3978 | mv "conftest.tmp" "conftest.in" | |
3979 | cp "conftest.in" "conftest.nl" | |
3980 | $as_echo 'GREP' >> "conftest.nl" | |
3981 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3982 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3983 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3984 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3985 | # Best one so far, save it but keep looking for a better one | |
3986 | ac_cv_path_GREP="$ac_path_GREP" | |
3987 | ac_path_GREP_max=$ac_count | |
bec39cab | 3988 | fi |
81ecdfbb RW |
3989 | # 10*(2^10) chars as input seems more than enough |
3990 | test $ac_count -gt 10 && break | |
3991 | done | |
3992 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3993 | esac | |
bec39cab | 3994 | |
81ecdfbb RW |
3995 | $ac_path_GREP_found && break 3 |
3996 | done | |
3997 | done | |
3998 | done | |
3999 | IFS=$as_save_IFS | |
4000 | if test -z "$ac_cv_path_GREP"; then | |
4001 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4002 | fi | |
c906108c | 4003 | else |
81ecdfbb | 4004 | ac_cv_path_GREP=$GREP |
c906108c | 4005 | fi |
c906108c | 4006 | |
81ecdfbb RW |
4007 | fi |
4008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4009 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4010 | GREP="$ac_cv_path_GREP" | |
c906108c | 4011 | |
c906108c | 4012 | |
81ecdfbb RW |
4013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4014 | $as_echo_n "checking for egrep... " >&6; } | |
4015 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
4016 | $as_echo_n "(cached) " >&6 | |
783e057b | 4017 | else |
81ecdfbb RW |
4018 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4019 | then ac_cv_path_EGREP="$GREP -E" | |
4020 | else | |
4021 | if test -z "$EGREP"; then | |
4022 | ac_path_EGREP_found=false | |
4023 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4024 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4025 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4026 | do |
4027 | IFS=$as_save_IFS | |
4028 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4029 | for ac_prog in egrep; do |
4030 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4031 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4032 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4033 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4034 | # Check for GNU $ac_path_EGREP | |
4035 | case `"$ac_path_EGREP" --version 2>&1` in | |
4036 | *GNU*) | |
4037 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4038 | *) | |
4039 | ac_count=0 | |
4040 | $as_echo_n 0123456789 >"conftest.in" | |
4041 | while : | |
4042 | do | |
4043 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4044 | mv "conftest.tmp" "conftest.in" | |
4045 | cp "conftest.in" "conftest.nl" | |
4046 | $as_echo 'EGREP' >> "conftest.nl" | |
4047 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4048 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4049 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4050 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4051 | # Best one so far, save it but keep looking for a better one | |
4052 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4053 | ac_path_EGREP_max=$ac_count | |
4054 | fi | |
4055 | # 10*(2^10) chars as input seems more than enough | |
4056 | test $ac_count -gt 10 && break | |
4057 | done | |
4058 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4059 | esac | |
bec39cab | 4060 | |
81ecdfbb RW |
4061 | $ac_path_EGREP_found && break 3 |
4062 | done | |
4063 | done | |
4064 | done | |
4065 | IFS=$as_save_IFS | |
4066 | if test -z "$ac_cv_path_EGREP"; then | |
4067 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 4068 | fi |
783e057b | 4069 | else |
81ecdfbb | 4070 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4071 | fi |
4072 | ||
81ecdfbb | 4073 | fi |
783e057b | 4074 | fi |
81ecdfbb RW |
4075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4076 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4077 | EGREP="$ac_cv_path_EGREP" | |
4078 | ||
783e057b | 4079 | |
81ecdfbb RW |
4080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4081 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4082 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4083 | $as_echo_n "(cached) " >&6 | |
783e057b | 4084 | else |
81ecdfbb | 4085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4086 | /* end confdefs.h. */ |
783e057b | 4087 | #include <stdlib.h> |
bec39cab | 4088 | #include <stdarg.h> |
783e057b DJ |
4089 | #include <string.h> |
4090 | #include <float.h> | |
c906108c | 4091 | |
bec39cab AC |
4092 | int |
4093 | main () | |
4094 | { | |
c906108c | 4095 | |
bec39cab AC |
4096 | ; |
4097 | return 0; | |
4098 | } | |
4099 | _ACEOF | |
81ecdfbb | 4100 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4101 | ac_cv_header_stdc=yes |
c906108c | 4102 | else |
81ecdfbb | 4103 | ac_cv_header_stdc=no |
c906108c | 4104 | fi |
81ecdfbb | 4105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4106 | |
783e057b DJ |
4107 | if test $ac_cv_header_stdc = yes; then |
4108 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4110 | /* end confdefs.h. */ |
4111 | #include <string.h> | |
c906108c | 4112 | |
783e057b DJ |
4113 | _ACEOF |
4114 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4115 | $EGREP "memchr" >/dev/null 2>&1; then : |
4116 | ||
c906108c | 4117 | else |
783e057b | 4118 | ac_cv_header_stdc=no |
c906108c | 4119 | fi |
783e057b | 4120 | rm -f conftest* |
c906108c SS |
4121 | |
4122 | fi | |
4123 | ||
783e057b DJ |
4124 | if test $ac_cv_header_stdc = yes; then |
4125 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4127 | /* end confdefs.h. */ |
4128 | #include <stdlib.h> | |
bec39cab | 4129 | |
783e057b DJ |
4130 | _ACEOF |
4131 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4132 | $EGREP "free" >/dev/null 2>&1; then : |
4133 | ||
bec39cab | 4134 | else |
783e057b | 4135 | ac_cv_header_stdc=no |
bec39cab | 4136 | fi |
783e057b | 4137 | rm -f conftest* |
bec39cab AC |
4138 | |
4139 | fi | |
bec39cab | 4140 | |
783e057b DJ |
4141 | if test $ac_cv_header_stdc = yes; then |
4142 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4143 | if test "$cross_compiling" = yes; then : |
783e057b | 4144 | : |
bec39cab | 4145 | else |
81ecdfbb | 4146 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4147 | /* end confdefs.h. */ |
4148 | #include <ctype.h> | |
81ecdfbb | 4149 | #include <stdlib.h> |
783e057b DJ |
4150 | #if ((' ' & 0x0FF) == 0x020) |
4151 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4152 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4153 | #else | |
4154 | # define ISLOWER(c) \ | |
4155 | (('a' <= (c) && (c) <= 'i') \ | |
4156 | || ('j' <= (c) && (c) <= 'r') \ | |
4157 | || ('s' <= (c) && (c) <= 'z')) | |
4158 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4159 | #endif | |
4160 | ||
4161 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4162 | int | |
4163 | main () | |
4164 | { | |
4165 | int i; | |
4166 | for (i = 0; i < 256; i++) | |
4167 | if (XOR (islower (i), ISLOWER (i)) | |
4168 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4169 | return 2; |
4170 | return 0; | |
783e057b DJ |
4171 | } |
4172 | _ACEOF | |
81ecdfbb | 4173 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4174 | |
81ecdfbb RW |
4175 | else |
4176 | ac_cv_header_stdc=no | |
783e057b | 4177 | fi |
81ecdfbb RW |
4178 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4179 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4180 | fi |
81ecdfbb | 4181 | |
783e057b DJ |
4182 | fi |
4183 | fi | |
81ecdfbb RW |
4184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4185 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4186 | if test $ac_cv_header_stdc = yes; then |
4187 | ||
81ecdfbb | 4188 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4189 | |
4190 | fi | |
4191 | ||
4192 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4193 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4194 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4195 | do : |
4196 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4197 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4198 | " | |
4199 | eval as_val=\$$as_ac_Header | |
4200 | if test "x$as_val" = x""yes; then : | |
783e057b | 4201 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4202 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4203 | _ACEOF |
4204 | ||
4205 | fi | |
4206 | ||
4207 | done | |
4208 | ||
4209 | ||
4210 | ||
81ecdfbb RW |
4211 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4212 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4213 | MINIX=yes |
4214 | else | |
4215 | MINIX= | |
4216 | fi | |
4217 | ||
4218 | ||
4219 | if test "$MINIX" = yes; then | |
4220 | ||
81ecdfbb | 4221 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4222 | |
4223 | ||
81ecdfbb | 4224 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4225 | |
4226 | ||
81ecdfbb | 4227 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4228 | |
4229 | fi | |
4230 | ||
4231 | ||
81ecdfbb RW |
4232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4233 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4234 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4235 | $as_echo_n "(cached) " >&6 | |
783e057b | 4236 | else |
81ecdfbb | 4237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4238 | /* end confdefs.h. */ |
4239 | ||
c971b7fa PA |
4240 | # define __EXTENSIONS__ 1 |
4241 | $ac_includes_default | |
783e057b DJ |
4242 | int |
4243 | main () | |
4244 | { | |
4245 | ||
4246 | ; | |
4247 | return 0; | |
4248 | } | |
4249 | _ACEOF | |
81ecdfbb | 4250 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4251 | ac_cv_safe_to_define___extensions__=yes |
4252 | else | |
81ecdfbb | 4253 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4254 | fi |
81ecdfbb | 4255 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4256 | fi |
81ecdfbb RW |
4257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4258 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4259 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4260 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4261 | |
81ecdfbb | 4262 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4263 | |
81ecdfbb | 4264 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4265 | |
81ecdfbb | 4266 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4267 | |
81ecdfbb | 4268 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4269 | |
4270 | ||
c971b7fa PA |
4271 | ac_aux_dir= |
4272 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
4273 | for ac_t in install-sh install.sh shtool; do | |
4274 | if test -f "$ac_dir/$ac_t"; then | |
4275 | ac_aux_dir=$ac_dir | |
4276 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4277 | break 2 | |
4278 | fi | |
4279 | done | |
4280 | done | |
4281 | if test -z "$ac_aux_dir"; then | |
4282 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
4283 | fi | |
770d76d7 | 4284 | |
c971b7fa PA |
4285 | # These three variables are undocumented and unsupported, |
4286 | # and are intended to be withdrawn in a future Autoconf release. | |
4287 | # They can cause serious problems if a builder's source tree is in a directory | |
4288 | # whose full name contains unusual characters. | |
4289 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4290 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4291 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4292 | |
770d76d7 | 4293 | |
c971b7fa PA |
4294 | # Make sure we can run config.sub. |
4295 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4296 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 4297 | |
c971b7fa PA |
4298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4299 | $as_echo_n "checking build system type... " >&6; } | |
4300 | if test "${ac_cv_build+set}" = set; then : | |
4301 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 4302 | else |
c971b7fa PA |
4303 | ac_build_alias=$build_alias |
4304 | test "x$ac_build_alias" = x && | |
4305 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4306 | test "x$ac_build_alias" = x && | |
4307 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
4308 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4309 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4310 | ||
770d76d7 | 4311 | fi |
c971b7fa PA |
4312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4313 | $as_echo "$ac_cv_build" >&6; } | |
4314 | case $ac_cv_build in | |
4315 | *-*-*) ;; | |
4316 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 4317 | esac |
c971b7fa PA |
4318 | build=$ac_cv_build |
4319 | ac_save_IFS=$IFS; IFS='-' | |
4320 | set x $ac_cv_build | |
4321 | shift | |
4322 | build_cpu=$1 | |
4323 | build_vendor=$2 | |
4324 | shift; shift | |
4325 | # Remember, the first character of IFS is used to create $*, | |
4326 | # except with old shells: | |
4327 | build_os=$* | |
4328 | IFS=$ac_save_IFS | |
4329 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4330 | |
4331 | ||
c971b7fa PA |
4332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4333 | $as_echo_n "checking host system type... " >&6; } | |
4334 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4335 | $as_echo_n "(cached) " >&6 |
4336 | else | |
c971b7fa PA |
4337 | if test "x$host_alias" = x; then |
4338 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4339 | else |
c971b7fa PA |
4340 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4341 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4342 | fi |
81ecdfbb RW |
4343 | |
4344 | fi | |
c971b7fa PA |
4345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4346 | $as_echo "$ac_cv_host" >&6; } | |
4347 | case $ac_cv_host in | |
4348 | *-*-*) ;; | |
4349 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4350 | esac |
c971b7fa PA |
4351 | host=$ac_cv_host |
4352 | ac_save_IFS=$IFS; IFS='-' | |
4353 | set x $ac_cv_host | |
4354 | shift | |
4355 | host_cpu=$1 | |
4356 | host_vendor=$2 | |
4357 | shift; shift | |
4358 | # Remember, the first character of IFS is used to create $*, | |
4359 | # except with old shells: | |
4360 | host_os=$* | |
4361 | IFS=$ac_save_IFS | |
4362 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4363 | |
4364 | ||
4365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4366 | $as_echo_n "checking target system type... " >&6; } | |
4367 | if test "${ac_cv_target+set}" = set; then : | |
4368 | $as_echo_n "(cached) " >&6 | |
4369 | else | |
4370 | if test "x$target_alias" = x; then | |
4371 | ac_cv_target=$ac_cv_host | |
4372 | else | |
4373 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4374 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4375 | fi | |
4376 | ||
4377 | fi | |
4378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4379 | $as_echo "$ac_cv_target" >&6; } | |
4380 | case $ac_cv_target in | |
4381 | *-*-*) ;; | |
4382 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4383 | esac | |
4384 | target=$ac_cv_target | |
4385 | ac_save_IFS=$IFS; IFS='-' | |
4386 | set x $ac_cv_target | |
4387 | shift | |
4388 | target_cpu=$1 | |
4389 | target_vendor=$2 | |
4390 | shift; shift | |
4391 | # Remember, the first character of IFS is used to create $*, | |
4392 | # except with old shells: | |
4393 | target_os=$* | |
4394 | IFS=$ac_save_IFS | |
4395 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4396 | ||
4397 | ||
4398 | # The aliases save the names the user supplied, while $host etc. | |
4399 | # will get canonicalized. | |
4400 | test -n "$target_alias" && | |
4401 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4402 | NONENONEs,x,x, && | |
4403 | program_prefix=${target_alias}- | |
4404 | ||
4405 | # The tests for host and target for $enable_largefile require | |
4406 | # canonical names. | |
4407 | ||
4408 | ||
81ecdfbb | 4409 | |
da2f07f1 JK |
4410 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4411 | # even in directories otherwise not depending on the $plugins option. | |
4412 | ||
4413 | ||
2974be62 AM |
4414 | maybe_plugins=no |
4415 | for ac_header in dlfcn.h | |
4416 | do : | |
4417 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4418 | " | |
4419 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
4420 | cat >>confdefs.h <<_ACEOF | |
4421 | #define HAVE_DLFCN_H 1 | |
4422 | _ACEOF | |
4423 | maybe_plugins=yes | |
4424 | fi | |
4425 | ||
4426 | done | |
4427 | ||
4428 | for ac_header in windows.h | |
4429 | do : | |
4430 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4431 | " | |
4432 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
4433 | cat >>confdefs.h <<_ACEOF | |
4434 | #define HAVE_WINDOWS_H 1 | |
4435 | _ACEOF | |
4436 | maybe_plugins=yes | |
4437 | fi | |
4438 | ||
4439 | done | |
4440 | ||
4441 | ||
4442 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4443 | if test "${enable_plugins+set}" = set; then : |
4444 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4445 | no) plugins=no ;; |
4446 | *) plugins=yes | |
4447 | if test "$maybe_plugins" != "yes" ; then | |
4448 | as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
4449 | fi ;; | |
4450 | esac | |
da2f07f1 | 4451 | else |
2974be62 AM |
4452 | plugins=$maybe_plugins |
4453 | ||
da2f07f1 JK |
4454 | fi |
4455 | ||
2974be62 AM |
4456 | if test "$plugins" = "yes"; then |
4457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 | |
4458 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
4459 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4460 | $as_echo_n "(cached) " >&6 | |
4461 | else | |
4462 | ac_func_search_save_LIBS=$LIBS | |
4463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4464 | /* end confdefs.h. */ | |
4465 | ||
4466 | /* Override any GCC internal prototype to avoid an error. | |
4467 | Use char because int might match the return type of a GCC | |
4468 | builtin and then its argument prototype would still apply. */ | |
4469 | #ifdef __cplusplus | |
4470 | extern "C" | |
4471 | #endif | |
4472 | char dlopen (); | |
4473 | int | |
4474 | main () | |
4475 | { | |
4476 | return dlopen (); | |
4477 | ; | |
4478 | return 0; | |
4479 | } | |
4480 | _ACEOF | |
4481 | for ac_lib in '' dl; do | |
4482 | if test -z "$ac_lib"; then | |
4483 | ac_res="none required" | |
4484 | else | |
4485 | ac_res=-l$ac_lib | |
4486 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4487 | fi | |
4488 | if ac_fn_c_try_link "$LINENO"; then : | |
4489 | ac_cv_search_dlopen=$ac_res | |
4490 | fi | |
4491 | rm -f core conftest.err conftest.$ac_objext \ | |
4492 | conftest$ac_exeext | |
4493 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4494 | break | |
4495 | fi | |
4496 | done | |
4497 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4498 | ||
4499 | else | |
4500 | ac_cv_search_dlopen=no | |
4501 | fi | |
4502 | rm conftest.$ac_ext | |
4503 | LIBS=$ac_func_search_save_LIBS | |
4504 | fi | |
4505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
4506 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
4507 | ac_res=$ac_cv_search_dlopen | |
4508 | if test "$ac_res" != no; then : | |
4509 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4510 | ||
4511 | fi | |
4512 | ||
4513 | fi | |
da2f07f1 JK |
4514 | |
4515 | ||
4516 | case "${host}" in | |
4517 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4518 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4519 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4520 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4521 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4522 | # large-file support through the --enable-largefile switch, disable | |
4523 | # large-file support in favor of procfs support. | |
4524 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4525 | && : ${enable_largefile="no"} | |
4526 | ;; | |
4527 | esac | |
4528 | ||
4529 | # Check whether --enable-largefile was given. | |
4530 | if test "${enable_largefile+set}" = set; then : | |
4531 | enableval=$enable_largefile; | |
4532 | fi | |
4533 | ||
4534 | if test "$enable_largefile" != no; then | |
4535 | ||
4536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4537 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4538 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4539 | $as_echo_n "(cached) " >&6 | |
4540 | else | |
4541 | ac_cv_sys_largefile_CC=no | |
4542 | if test "$GCC" != yes; then | |
4543 | ac_save_CC=$CC | |
4544 | while :; do | |
4545 | # IRIX 6.2 and later do not support large files by default, | |
4546 | # so use the C compiler's -n32 option if that helps. | |
4547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4548 | /* end confdefs.h. */ | |
4549 | #include <sys/types.h> | |
4550 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4551 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4552 | since some C++ compilers masquerading as C compilers | |
4553 | incorrectly reject 9223372036854775807. */ | |
4554 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4555 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4556 | && LARGE_OFF_T % 2147483647 == 1) | |
4557 | ? 1 : -1]; | |
4558 | int | |
4559 | main () | |
4560 | { | |
4561 | ||
4562 | ; | |
4563 | return 0; | |
4564 | } | |
4565 | _ACEOF | |
4566 | if ac_fn_c_try_compile "$LINENO"; then : | |
4567 | break | |
4568 | fi | |
4569 | rm -f core conftest.err conftest.$ac_objext | |
4570 | CC="$CC -n32" | |
4571 | if ac_fn_c_try_compile "$LINENO"; then : | |
4572 | ac_cv_sys_largefile_CC=' -n32'; break | |
4573 | fi | |
4574 | rm -f core conftest.err conftest.$ac_objext | |
4575 | break | |
4576 | done | |
4577 | CC=$ac_save_CC | |
4578 | rm -f conftest.$ac_ext | |
4579 | fi | |
4580 | fi | |
4581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4582 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4583 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4584 | CC=$CC$ac_cv_sys_largefile_CC | |
4585 | fi | |
4586 | ||
4587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4588 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4589 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4590 | $as_echo_n "(cached) " >&6 | |
4591 | else | |
4592 | while :; do | |
4593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4594 | /* end confdefs.h. */ | |
4595 | #include <sys/types.h> | |
4596 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4597 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4598 | since some C++ compilers masquerading as C compilers | |
4599 | incorrectly reject 9223372036854775807. */ | |
4600 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4601 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4602 | && LARGE_OFF_T % 2147483647 == 1) | |
4603 | ? 1 : -1]; | |
4604 | int | |
4605 | main () | |
4606 | { | |
4607 | ||
4608 | ; | |
4609 | return 0; | |
4610 | } | |
4611 | _ACEOF | |
4612 | if ac_fn_c_try_compile "$LINENO"; then : | |
4613 | ac_cv_sys_file_offset_bits=no; break | |
4614 | fi | |
4615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4617 | /* end confdefs.h. */ | |
4618 | #define _FILE_OFFSET_BITS 64 | |
4619 | #include <sys/types.h> | |
4620 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4621 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4622 | since some C++ compilers masquerading as C compilers | |
4623 | incorrectly reject 9223372036854775807. */ | |
4624 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4625 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4626 | && LARGE_OFF_T % 2147483647 == 1) | |
4627 | ? 1 : -1]; | |
4628 | int | |
4629 | main () | |
4630 | { | |
4631 | ||
4632 | ; | |
4633 | return 0; | |
4634 | } | |
4635 | _ACEOF | |
4636 | if ac_fn_c_try_compile "$LINENO"; then : | |
4637 | ac_cv_sys_file_offset_bits=64; break | |
4638 | fi | |
4639 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4640 | ac_cv_sys_file_offset_bits=unknown | |
4641 | break | |
4642 | done | |
4643 | fi | |
4644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4645 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4646 | case $ac_cv_sys_file_offset_bits in #( | |
4647 | no | unknown) ;; | |
4648 | *) | |
4649 | cat >>confdefs.h <<_ACEOF | |
4650 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4651 | _ACEOF | |
4652 | ;; | |
4653 | esac | |
4654 | rm -rf conftest* | |
4655 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4657 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4658 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4659 | $as_echo_n "(cached) " >&6 | |
4660 | else | |
4661 | while :; do | |
4662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4663 | /* end confdefs.h. */ | |
4664 | #include <sys/types.h> | |
4665 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4666 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4667 | since some C++ compilers masquerading as C compilers | |
4668 | incorrectly reject 9223372036854775807. */ | |
4669 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4670 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4671 | && LARGE_OFF_T % 2147483647 == 1) | |
4672 | ? 1 : -1]; | |
4673 | int | |
4674 | main () | |
4675 | { | |
4676 | ||
4677 | ; | |
4678 | return 0; | |
4679 | } | |
4680 | _ACEOF | |
4681 | if ac_fn_c_try_compile "$LINENO"; then : | |
4682 | ac_cv_sys_large_files=no; break | |
4683 | fi | |
4684 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4686 | /* end confdefs.h. */ | |
4687 | #define _LARGE_FILES 1 | |
4688 | #include <sys/types.h> | |
4689 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4690 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4691 | since some C++ compilers masquerading as C compilers | |
4692 | incorrectly reject 9223372036854775807. */ | |
4693 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4694 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4695 | && LARGE_OFF_T % 2147483647 == 1) | |
4696 | ? 1 : -1]; | |
4697 | int | |
4698 | main () | |
4699 | { | |
4700 | ||
4701 | ; | |
4702 | return 0; | |
4703 | } | |
4704 | _ACEOF | |
4705 | if ac_fn_c_try_compile "$LINENO"; then : | |
4706 | ac_cv_sys_large_files=1; break | |
4707 | fi | |
4708 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4709 | ac_cv_sys_large_files=unknown | |
4710 | break | |
4711 | done | |
4712 | fi | |
4713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4714 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4715 | case $ac_cv_sys_large_files in #( | |
4716 | no | unknown) ;; | |
4717 | *) | |
4718 | cat >>confdefs.h <<_ACEOF | |
4719 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4720 | _ACEOF | |
4721 | ;; | |
4722 | esac | |
4723 | rm -rf conftest* | |
4724 | fi | |
4725 | fi | |
4726 | ||
4727 | ||
4728 | ||
81ecdfbb RW |
4729 | |
4730 | ||
4731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4732 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4733 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4734 | $as_echo_n "(cached) " >&6 | |
4735 | else | |
4736 | am_cv_prog_cc_stdc=no | |
4737 | ac_save_CC="$CC" | |
4738 | # Don't try gcc -ansi; that turns off useful extensions and | |
4739 | # breaks some systems' header files. | |
4740 | # AIX -qlanglvl=ansi | |
4741 | # Ultrix and OSF/1 -std1 | |
4742 | # HP-UX 10.20 and later -Ae | |
4743 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4744 | # SVR4 -Xc -D__EXTENSIONS__ | |
4745 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4746 | do | |
783e057b | 4747 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4749 | /* end confdefs.h. */ |
4750 | #include <stdarg.h> | |
4751 | #include <stdio.h> | |
4752 | #include <sys/types.h> | |
4753 | #include <sys/stat.h> | |
4754 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4755 | struct buf { int x; }; | |
4756 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4757 | static char *e (p, i) | |
4758 | char **p; | |
4759 | int i; | |
4760 | { | |
4761 | return p[i]; | |
4762 | } | |
4763 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4764 | { | |
4765 | char *s; | |
4766 | va_list v; | |
4767 | va_start (v,p); | |
4768 | s = g (p, va_arg (v,int)); | |
4769 | va_end (v); | |
4770 | return s; | |
4771 | } | |
4772 | int test (int i, double x); | |
4773 | struct s1 {int (*f) (int a);}; | |
4774 | struct s2 {int (*f) (double a);}; | |
4775 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4776 | int argc; | |
4777 | char **argv; | |
4778 | ||
4779 | int | |
4780 | main () | |
4781 | { | |
4782 | ||
4783 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4784 | ||
4785 | ; | |
4786 | return 0; | |
4787 | } | |
4788 | _ACEOF | |
81ecdfbb | 4789 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4790 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4791 | fi |
81ecdfbb | 4792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4793 | done |
4794 | CC="$ac_save_CC" | |
4795 | ||
4796 | fi | |
4797 | ||
4798 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4800 | $as_echo "none needed" >&6; } | |
783e057b | 4801 | else |
81ecdfbb RW |
4802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4803 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4804 | fi |
4805 | case "x$am_cv_prog_cc_stdc" in | |
4806 | x|xno) ;; | |
4807 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4808 | esac | |
4809 | ||
4869db5e RM |
4810 | # expand $ac_aux_dir to an absolute path |
4811 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4812 | ||
4813 | if test x"${install_sh}" != xset; then | |
4814 | case $am_aux_dir in | |
4815 | *\ * | *\ *) | |
4816 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4817 | *) | |
4818 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4819 | esac | |
4820 | fi | |
4821 | ||
4822 | # Installed binaries are usually stripped using `strip' when the user | |
4823 | # run `make install-strip'. However `strip' might not be the right | |
4824 | # tool to use in cross-compilation environments, therefore Automake | |
4825 | # will honor the `STRIP' environment variable to overrule this program. | |
4826 | if test "$cross_compiling" != no; then | |
4827 | if test -n "$ac_tool_prefix"; then | |
4828 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4829 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4831 | $as_echo_n "checking for $ac_word... " >&6; } | |
4832 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4833 | $as_echo_n "(cached) " >&6 | |
4834 | else | |
4835 | if test -n "$STRIP"; then | |
4836 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4837 | else | |
4838 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4839 | for as_dir in $PATH | |
4840 | do | |
4841 | IFS=$as_save_IFS | |
4842 | test -z "$as_dir" && as_dir=. | |
4843 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4844 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4845 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4846 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4847 | break 2 | |
4848 | fi | |
4849 | done | |
4850 | done | |
4851 | IFS=$as_save_IFS | |
4852 | ||
4853 | fi | |
4854 | fi | |
4855 | STRIP=$ac_cv_prog_STRIP | |
4856 | if test -n "$STRIP"; then | |
4857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4858 | $as_echo "$STRIP" >&6; } | |
4859 | else | |
4860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4861 | $as_echo "no" >&6; } | |
4862 | fi | |
4863 | ||
4864 | ||
4865 | fi | |
4866 | if test -z "$ac_cv_prog_STRIP"; then | |
4867 | ac_ct_STRIP=$STRIP | |
4868 | # Extract the first word of "strip", so it can be a program name with args. | |
4869 | set dummy strip; ac_word=$2 | |
4870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4871 | $as_echo_n "checking for $ac_word... " >&6; } | |
4872 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4873 | $as_echo_n "(cached) " >&6 | |
4874 | else | |
4875 | if test -n "$ac_ct_STRIP"; then | |
4876 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4877 | else | |
4878 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4879 | for as_dir in $PATH | |
4880 | do | |
4881 | IFS=$as_save_IFS | |
4882 | test -z "$as_dir" && as_dir=. | |
4883 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4884 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4885 | ac_cv_prog_ac_ct_STRIP="strip" | |
4886 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4887 | break 2 | |
4888 | fi | |
4889 | done | |
4890 | done | |
4891 | IFS=$as_save_IFS | |
4892 | ||
4893 | fi | |
4894 | fi | |
4895 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4896 | if test -n "$ac_ct_STRIP"; then | |
4897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4898 | $as_echo "$ac_ct_STRIP" >&6; } | |
4899 | else | |
4900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4901 | $as_echo "no" >&6; } | |
4902 | fi | |
4903 | ||
4904 | if test "x$ac_ct_STRIP" = x; then | |
4905 | STRIP=":" | |
4906 | else | |
4907 | case $cross_compiling:$ac_tool_warned in | |
4908 | yes:) | |
4909 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4910 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4911 | ac_tool_warned=yes ;; | |
4912 | esac | |
4913 | STRIP=$ac_ct_STRIP | |
4914 | fi | |
4915 | else | |
4916 | STRIP="$ac_cv_prog_STRIP" | |
4917 | fi | |
4918 | ||
4919 | fi | |
4920 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4921 | ||
783e057b DJ |
4922 | |
4923 | ac_aux_dir= | |
81ecdfbb RW |
4924 | for ac_dir in .. "$srcdir"/..; do |
4925 | for ac_t in install-sh install.sh shtool; do | |
4926 | if test -f "$ac_dir/$ac_t"; then | |
4927 | ac_aux_dir=$ac_dir | |
4928 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4929 | break 2 | |
4930 | fi | |
4931 | done | |
783e057b DJ |
4932 | done |
4933 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4934 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4935 | fi |
81ecdfbb RW |
4936 | |
4937 | # These three variables are undocumented and unsupported, | |
4938 | # and are intended to be withdrawn in a future Autoconf release. | |
4939 | # They can cause serious problems if a builder's source tree is in a directory | |
4940 | # whose full name contains unusual characters. | |
4941 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4942 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4943 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4944 | ||
783e057b | 4945 | |
783e057b | 4946 | |
9009e1ae MR |
4947 | test "$program_prefix" != NONE && |
4948 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4949 | # Use a double $ so make ignores it. | |
4950 | test "$program_suffix" != NONE && | |
4951 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4952 | # Double any \ or $. | |
4953 | # By default was `s,x,x', remove it if useless. | |
4954 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4955 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4956 | ||
81ecdfbb | 4957 | |
3bc3d82a PA |
4958 | # See if we are building with C++, and substitute COMPILER. |
4959 | ||
4960 | # Check whether --enable-build-with-cxx was given. | |
4961 | if test "${enable_build_with_cxx+set}" = set; then : | |
4962 | enableval=$enable_build_with_cxx; case $enableval in | |
4963 | yes | no) | |
4964 | ;; | |
4965 | *) | |
4966 | as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;; | |
4967 | esac | |
4968 | else | |
a2358508 | 4969 | enable_build_with_cxx=yes |
3bc3d82a PA |
4970 | fi |
4971 | ||
4972 | ||
4973 | if test "$enable_build_with_cxx" = "yes"; then | |
dad44a1f | 4974 | COMPILER='$(CXX)' |
a994041d | 4975 | COMPILER_CFLAGS='$(CXXFLAGS)' |
3bc3d82a PA |
4976 | else |
4977 | COMPILER='$(CC)' | |
a994041d | 4978 | COMPILER_CFLAGS='$(CFLAGS)' |
3bc3d82a PA |
4979 | fi |
4980 | ||
4981 | ||
4982 | ||
a994041d | 4983 | |
a417dc56 RW |
4984 | # Dependency checking. |
4985 | rm -rf .tst 2>/dev/null | |
4986 | mkdir .tst 2>/dev/null | |
4987 | if test -d .tst; then | |
4988 | am__leading_dot=. | |
4989 | else | |
4990 | am__leading_dot=_ | |
4991 | fi | |
4992 | rmdir .tst 2>/dev/null | |
4993 | ||
4994 | DEPDIR="${am__leading_dot}deps" | |
4995 | ||
81ecdfbb | 4996 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4997 | |
4998 | ||
4999 | depcc="$CC" am_compiler_list= | |
5000 | ||
5001 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
5002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
5003 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5004 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
5005 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5006 | else |
5007 | if test -f "$am_depcomp"; then | |
5008 | # We make a subdir and do the tests there. Otherwise we can end up | |
5009 | # making bogus files that we don't know about and never remove. For | |
5010 | # instance it was reported that on HP-UX the gcc test will end up | |
5011 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5012 | # in D'. | |
5013 | mkdir conftest.dir | |
5014 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5015 | # using a relative directory. | |
5016 | cp "$am_depcomp" conftest.dir | |
5017 | cd conftest.dir | |
5018 | # We will build objects and dependencies in a subdirectory because | |
5019 | # it helps to detect inapplicable dependency modes. For instance | |
5020 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5021 | # side effect of compilation, but ICC will put the dependencies in | |
5022 | # the current directory while Tru64 will put them in the object | |
5023 | # directory. | |
5024 | mkdir sub | |
5025 | ||
5026 | am_cv_CC_dependencies_compiler_type=none | |
5027 | if test "$am_compiler_list" = ""; then | |
5028 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5029 | fi | |
5030 | for depmode in $am_compiler_list; do | |
5031 | if test $depmode = none; then break; fi | |
5032 | ||
81ecdfbb | 5033 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
5034 | # Setup a source with many dependencies, because some compilers |
5035 | # like to wrap large dependency lists on column 80 (with \), and | |
5036 | # we should not choose a depcomp mode which is confused by this. | |
5037 | # | |
5038 | # We need to recreate these files for each test, as the compiler may | |
5039 | # overwrite some of them when testing with obscure command lines. | |
5040 | # This happens at least with the AIX C compiler. | |
5041 | : > sub/conftest.c | |
5042 | for i in 1 2 3 4 5 6; do | |
5043 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5044 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5045 | # Solaris 8's {/usr,}/bin/sh. | |
5046 | touch sub/conftst$i.h | |
5047 | done | |
5048 | echo "include sub/conftest.Po" > confmf | |
5049 | ||
5050 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5051 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5052 | # handle `-M -o', and we need to detect this. | |
5053 | depcmd="depmode=$depmode \ | |
5054 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
5055 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5056 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
5057 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
5058 | if env $depcmd > conftest.err 2>&1 && | |
5059 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
5060 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
5061 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
5062 | # icc doesn't choke on unknown options, it will just issue warnings | |
5063 | # or remarks (even with -Werror). So we grep stderr for any message | |
5064 | # that says an option was ignored or not supported. | |
5065 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5066 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5067 | # The diagnosis changed in icc 8.0: | |
5068 | # icc: Command line remark: option '-MP' not supported | |
5069 | if (grep 'ignoring option' conftest.err || | |
5070 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5071 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 5072 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
5073 | break |
5074 | fi | |
5075 | fi | |
81ecdfbb | 5076 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
5077 | sed -e 's/^/| /' < conftest.err >&5 |
5078 | done | |
5079 | ||
5080 | cd .. | |
5081 | rm -rf conftest.dir | |
5082 | else | |
5083 | am_cv_CC_dependencies_compiler_type=none | |
5084 | fi | |
5085 | ||
5086 | fi | |
81ecdfbb RW |
5087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
5088 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 5089 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 5090 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
5091 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
5092 | ||
5093 | fi | |
5094 | ||
5095 | ||
5096 | # Check for the 'make' the user wants to use. | |
5097 | for ac_prog in make | |
5098 | do | |
5099 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5100 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5101 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5102 | $as_echo_n "checking for $ac_word... " >&6; } | |
5103 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
5104 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5105 | else |
5106 | if test -n "$MAKE"; then | |
5107 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
5108 | else | |
5109 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5110 | for as_dir in $PATH | |
5111 | do | |
5112 | IFS=$as_save_IFS | |
5113 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5114 | for ac_exec_ext in '' $ac_executable_extensions; do |
5115 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 5116 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 5117 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
5118 | break 2 |
5119 | fi | |
5120 | done | |
81ecdfbb RW |
5121 | done |
5122 | IFS=$as_save_IFS | |
a417dc56 RW |
5123 | |
5124 | fi | |
5125 | fi | |
5126 | MAKE=$ac_cv_prog_MAKE | |
5127 | if test -n "$MAKE"; then | |
81ecdfbb RW |
5128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
5129 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 5130 | else |
81ecdfbb RW |
5131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5132 | $as_echo "no" >&6; } | |
a417dc56 RW |
5133 | fi |
5134 | ||
81ecdfbb | 5135 | |
a417dc56 RW |
5136 | test -n "$MAKE" && break |
5137 | done | |
5138 | ||
5139 | MAKE_IS_GNU= | |
5140 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
5141 | *GNU*) | |
5142 | MAKE_IS_GNU=yes | |
5143 | ;; | |
5144 | esac | |
81ecdfbb | 5145 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
5146 | GMAKE_TRUE= |
5147 | GMAKE_FALSE='#' | |
5148 | else | |
5149 | GMAKE_TRUE='#' | |
5150 | GMAKE_FALSE= | |
5151 | fi | |
5152 | ||
81ecdfbb RW |
5153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
5154 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
5155 | set x ${MAKE-make} | |
5156 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5157 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5158 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5159 | else |
5160 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 5161 | SHELL = /bin/sh |
a417dc56 | 5162 | all: |
81ecdfbb | 5163 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
5164 | _ACEOF |
5165 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
5166 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
5167 | *@@@%%%=?*=@@@%%%*) | |
5168 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
5169 | *) | |
5170 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
5171 | esac | |
a417dc56 RW |
5172 | rm -f conftest.make |
5173 | fi | |
81ecdfbb RW |
5174 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
5175 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5176 | $as_echo "yes" >&6; } | |
a417dc56 RW |
5177 | SET_MAKE= |
5178 | else | |
81ecdfbb RW |
5179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5180 | $as_echo "no" >&6; } | |
a417dc56 RW |
5181 | SET_MAKE="MAKE=${MAKE-make}" |
5182 | fi | |
5183 | ||
5184 | ||
648d586d JB |
5185 | gnulib_extra_configure_args= |
5186 | # If large-file support is disabled, make sure gnulib does the same. | |
5187 | if test "$enable_largefile" = no; then | |
5188 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
5189 | fi | |
5190 | ||
c971b7fa PA |
5191 | # Configure gnulib. We need to build gnulib under some other |
5192 | # directory not "gnulib", to avoid the problem of both GDB and | |
5193 | # GDBserver wanting to build it in the same directory, when building | |
5194 | # in the source dir. | |
783e057b | 5195 | |
c971b7fa PA |
5196 | in_src="gnulib" |
5197 | in_build="build-gnulib" | |
648d586d | 5198 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
5199 | |
5200 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
5201 | # so they do not pile up. | |
5202 | ac_sub_configure_args= | |
5203 | ac_prev= | |
5204 | eval "set x $ac_configure_args" | |
5205 | shift | |
5206 | for ac_arg | |
5207 | do | |
5208 | if test -n "$ac_prev"; then | |
5209 | ac_prev= | |
5210 | continue | |
5211 | fi | |
5212 | case $ac_arg in | |
5213 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
5214 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
5215 | ac_prev=cache_file ;; | |
5216 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
5217 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
5218 | | --c=*) | |
5219 | ;; | |
5220 | --config-cache | -C) | |
5221 | ;; | |
5222 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
5223 | ac_prev=srcdir ;; | |
5224 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
5225 | ;; | |
5226 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
5227 | ac_prev=prefix ;; | |
5228 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
5229 | ;; | |
5230 | --disable-option-checking) | |
5231 | ;; | |
5232 | *) | |
5233 | case $ac_arg in | |
5234 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5235 | esac | |
5236 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
5237 | esac | |
5238 | done | |
5239 | ||
5240 | # Always prepend --prefix to ensure using the same prefix | |
5241 | # in subdir configurations. | |
5242 | ac_arg="--prefix=$prefix" | |
5243 | case $ac_arg in | |
5244 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5245 | esac | |
5246 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
5247 | ||
5248 | # Pass --silent | |
5249 | if test "$silent" = yes; then | |
5250 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
5251 | fi | |
5252 | ||
5253 | # Always prepend --disable-option-checking to silence warnings, since | |
5254 | # different subdirs can have different --enable and --with options. | |
5255 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
5256 | ||
5257 | ac_popdir=`pwd` | |
5258 | ac_dir=$in_build | |
5259 | ||
5260 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
5261 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
5262 | $as_echo "$ac_msg" >&6 | |
5263 | as_dir="$ac_dir"; as_fn_mkdir_p | |
5264 | ||
38ea300a PA |
5265 | case $srcdir in |
5266 | [\\/]* | ?:[\\/]* ) | |
5267 | ac_srcdir=$srcdir/$in_src ;; | |
5268 | *) # Relative name. | |
5269 | ac_srcdir=../$srcdir/$in_src ;; | |
5270 | esac | |
c971b7fa PA |
5271 | |
5272 | cd "$ac_dir" | |
5273 | ||
5274 | ac_sub_configure=$ac_srcdir/configure | |
5275 | ||
5276 | # Make the cache file name correct relative to the subdirectory. | |
5277 | case $cache_file in | |
5278 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
5279 | *) # Relative name. | |
5280 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
5281 | esac | |
5282 | ||
648d586d JB |
5283 | if test -n "$in_extra_args"; then |
5284 | # Add the extra args at the end. | |
5285 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
5286 | fi | |
5287 | ||
c971b7fa PA |
5288 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
5289 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
5290 | # The eval makes quoting arguments work. | |
5291 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
5292 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
5293 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
5294 | ||
5295 | cd "$ac_popdir" | |
783e057b | 5296 | |
c971b7fa PA |
5297 | |
5298 | ||
5299 | CONFIG_OBS= | |
5300 | CONFIG_DEPS= | |
5301 | CONFIG_SRCS= | |
5302 | ENABLE_CFLAGS= | |
5303 | ||
5304 | CONFIG_ALL= | |
5305 | CONFIG_CLEAN= | |
5306 | CONFIG_INSTALL= | |
5307 | CONFIG_UNINSTALL= | |
5308 | ||
5309 | # If we haven't got the data from the intl directory, | |
5310 | # assume NLS is disabled. | |
5311 | USE_NLS=no | |
5312 | LIBINTL= | |
5313 | LIBINTL_DEP= | |
5314 | INCINTL= | |
5315 | XGETTEXT= | |
5316 | GMSGFMT= | |
5317 | POSUB= | |
783e057b DJ |
5318 | |
5319 | if test -f ../intl/config.intl; then | |
5320 | . ../intl/config.intl | |
5321 | fi | |
81ecdfbb RW |
5322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
5323 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 5324 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
5325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5326 | $as_echo "no" >&6; } | |
783e057b | 5327 | else |
81ecdfbb RW |
5328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5329 | $as_echo "yes" >&6; } | |
783e057b | 5330 | |
81ecdfbb | 5331 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
5332 | |
5333 | ||
81ecdfbb RW |
5334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
5335 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
5336 | # Look for .po and .gmo files in the source directory. |
5337 | CATALOGS= | |
5338 | XLINGUAS= | |
5339 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
5340 | # If there aren't any .gmo files the shell will give us the | |
5341 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
5342 | # weeded out. | |
5343 | case "$cat" in *\**) | |
5344 | continue;; | |
5345 | esac | |
5346 | # The quadruple backslash is collapsed to a double backslash | |
5347 | # by the backticks, then collapsed again by the double quotes, | |
5348 | # leaving us with one backslash in the sed expression (right | |
5349 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
5350 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
5351 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
5352 | # The user is allowed to set LINGUAS to a list of languages to | |
5353 | # install catalogs for. If it's empty that means "all of them." | |
5354 | if test "x$LINGUAS" = x; then | |
5355 | CATALOGS="$CATALOGS $cat" | |
5356 | XLINGUAS="$XLINGUAS $lang" | |
5357 | else | |
5358 | case "$LINGUAS" in *$lang*) | |
5359 | CATALOGS="$CATALOGS $cat" | |
5360 | XLINGUAS="$XLINGUAS $lang" | |
5361 | ;; | |
5362 | esac | |
e28b3332 DJ |
5363 | fi |
5364 | done | |
c971b7fa PA |
5365 | LINGUAS="$XLINGUAS" |
5366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
5367 | $as_echo "$LINGUAS" >&6; } | |
5368 | ||
5369 | ||
5370 | DATADIRNAME=share | |
5371 | ||
5372 | INSTOBJEXT=.mo | |
5373 | ||
5374 | GENCAT=gencat | |
5375 | ||
5376 | CATOBJEXT=.gmo | |
e28b3332 | 5377 | |
e28b3332 DJ |
5378 | fi |
5379 | ||
c971b7fa PA |
5380 | localedir='${datadir}/locale' |
5381 | ||
5382 | ||
5383 | if test x"$USE_NLS" = xyes; then | |
5384 | CONFIG_ALL="$CONFIG_ALL all-po" | |
5385 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
5386 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
5387 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 5388 | fi |
e28b3332 | 5389 | |
c971b7fa PA |
5390 | GNULIB=build-gnulib/import |
5391 | ||
5392 | # For Makefile dependencies. | |
5393 | GNULIB_STDINT_H= | |
5394 | if test x"$STDINT_H" != x; then | |
5395 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
5396 | fi |
5397 | ||
5398 | ||
c971b7fa PA |
5399 | PACKAGE=gdb |
5400 | ||
5401 | cat >>confdefs.h <<_ACEOF | |
5402 | #define PACKAGE "$PACKAGE" | |
5403 | _ACEOF | |
5404 | ||
5405 | ||
5406 | ||
5407 | # We never need to detect it in this sub-configure. | |
5408 | # But preserve it for config.status --recheck. | |
5409 | ||
5410 | ||
5411 | ||
5412 | MAKEINFO_EXTRA_FLAGS="" | |
5413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
5414 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
5415 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
5416 | $as_echo_n "(cached) " >&6 | |
5417 | else | |
5418 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
5419 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
5420 | gdb_cv_have_makeinfo_click=yes | |
5421 | else | |
5422 | gdb_cv_have_makeinfo_click=no | |
5423 | fi | |
5424 | fi | |
5425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
5426 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
5427 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
5428 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
5429 | fi | |
e28b3332 DJ |
5430 | |
5431 | ||
bec39cab AC |
5432 | |
5433 | ||
81ecdfbb RW |
5434 | # Check whether --with-separate-debug-dir was given. |
5435 | if test "${with_separate_debug_dir+set}" = set; then : | |
5436 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
5437 | DEBUGDIR=$withval |
5438 | else | |
5439 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
5440 | fi |
5441 | ||
20e95c23 | 5442 | |
783e057b DJ |
5443 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5444 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 5445 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 5446 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 5447 | |
783e057b DJ |
5448 | cat >>confdefs.h <<_ACEOF |
5449 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 5450 | _ACEOF |
20e95c23 | 5451 | |
20e95c23 | 5452 | |
20e95c23 | 5453 | |
0c4a4063 | 5454 | |
b14b1491 TT |
5455 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5456 | if test "x$prefix" = xNONE; then | |
5457 | test_prefix=/usr/local | |
5458 | else | |
5459 | test_prefix=$prefix | |
5460 | fi | |
783e057b | 5461 | else |
b14b1491 | 5462 | test_prefix=$exec_prefix |
783e057b | 5463 | fi |
b14b1491 TT |
5464 | value=0 |
5465 | case ${ac_define_dir} in | |
5466 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5467 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5468 | value=1 | |
5469 | ;; | |
5470 | esac | |
5471 | ||
5472 | cat >>confdefs.h <<_ACEOF | |
5473 | #define DEBUGDIR_RELOCATABLE $value | |
5474 | _ACEOF | |
5475 | ||
5476 | ||
5477 | ||
0c4a4063 | 5478 | |
f83d8a90 DE |
5479 | # We can't pass paths as command line arguments. |
5480 | # Mingw32 tries to be clever and will convert the paths for us. | |
5481 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
5482 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
5483 | # This breaks GDB's relocatable path conversions since paths passed in | |
5484 | # config.h would not get so translated, the path prefixes no longer match. | |
5485 | ||
5486 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5487 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5488 | ac_define_dir=`eval echo $bindir` | |
5489 | ac_define_dir=`eval echo $ac_define_dir` | |
5490 | ||
5491 | cat >>confdefs.h <<_ACEOF | |
5492 | #define BINDIR "$ac_define_dir" | |
5493 | _ACEOF | |
5494 | ||
5495 | ||
5496 | ||
b14b1491 TT |
5497 | # GDB's datadir relocation |
5498 | ||
5499 | ||
5500 | ||
81ecdfbb RW |
5501 | # Check whether --with-gdb-datadir was given. |
5502 | if test "${with_gdb_datadir+set}" = set; then : | |
5503 | withval=$with_gdb_datadir; | |
b14b1491 | 5504 | GDB_DATADIR=$withval |
20e95c23 | 5505 | else |
b14b1491 | 5506 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
5507 | fi |
5508 | ||
20e95c23 | 5509 | |
b14b1491 TT |
5510 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5511 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5512 | ac_define_dir=`eval echo $GDB_DATADIR` | |
5513 | ac_define_dir=`eval echo $ac_define_dir` | |
5514 | ||
5515 | cat >>confdefs.h <<_ACEOF | |
5516 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
5517 | _ACEOF |
5518 | ||
b14b1491 TT |
5519 | |
5520 | ||
0c4a4063 | 5521 | |
b14b1491 TT |
5522 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5523 | if test "x$prefix" = xNONE; then | |
5524 | test_prefix=/usr/local | |
5525 | else | |
5526 | test_prefix=$prefix | |
5527 | fi | |
5528 | else | |
5529 | test_prefix=$exec_prefix | |
5530 | fi | |
5531 | value=0 | |
5532 | case ${ac_define_dir} in | |
5533 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5534 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5535 | value=1 | |
5536 | ;; | |
5537 | esac | |
5538 | ||
5539 | cat >>confdefs.h <<_ACEOF | |
5540 | #define GDB_DATADIR_RELOCATABLE $value | |
5541 | _ACEOF | |
5542 | ||
5543 | ||
783e057b | 5544 | |
20e95c23 | 5545 | |
0c4a4063 | 5546 | |
81ecdfbb RW |
5547 | # Check whether --with-relocated-sources was given. |
5548 | if test "${with_relocated_sources+set}" = set; then : | |
5549 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
5550 | |
5551 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5552 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5553 | ac_define_dir=`eval echo $reloc_srcdir` | |
5554 | ac_define_dir=`eval echo $ac_define_dir` | |
5555 | ||
5556 | cat >>confdefs.h <<_ACEOF | |
5557 | #define RELOC_SRCDIR "$ac_define_dir" | |
5558 | _ACEOF | |
5559 | ||
5560 | ||
5561 | ||
81ecdfbb RW |
5562 | fi |
5563 | ||
29b0e8a2 | 5564 | |
7349ff92 JK |
5565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
5566 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
5567 | ||
5568 | # Check whether --with-auto-load-dir was given. | |
5569 | if test "${with_auto_load_dir+set}" = set; then : | |
5570 | withval=$with_auto_load_dir; | |
5571 | else | |
1564a261 | 5572 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
5573 | fi |
5574 | ||
1564a261 | 5575 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
5576 | |
5577 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5578 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5579 | ac_define_dir=`eval echo $escape_dir` | |
5580 | ac_define_dir=`eval echo $ac_define_dir` | |
5581 | ||
5582 | cat >>confdefs.h <<_ACEOF | |
5583 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5584 | _ACEOF | |
5585 | ||
5586 | ||
5587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5588 | $as_echo "$with_auto_load_dir" >&6; } | |
5589 | ||
bccbefd2 JK |
5590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5591 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5592 | ||
5593 | # Check whether --with-auto-load-safe-path was given. | |
5594 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5595 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5596 | with_auto_load_safe_path="/" |
5597 | fi | |
bccbefd2 | 5598 | else |
7349ff92 | 5599 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5600 | fi |
5601 | ||
1564a261 | 5602 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5603 | |
5604 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5605 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5606 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5607 | ac_define_dir=`eval echo $ac_define_dir` |
5608 | ||
5609 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5610 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5611 | _ACEOF |
5612 | ||
5613 | ||
5614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5615 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5616 | ||
29b0e8a2 | 5617 | |
20e95c23 | 5618 | |
5ae98d25 | 5619 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5620 | |
5621 | ||
783e057b | 5622 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5623 | # Check whether --enable-targets was given. |
5624 | if test "${enable_targets+set}" = set; then : | |
5625 | enableval=$enable_targets; case "${enableval}" in | |
5626 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5627 | ;; |
5628 | no) enable_targets= ;; | |
5629 | *) enable_targets=$enableval ;; | |
5630 | esac | |
81ecdfbb RW |
5631 | fi |
5632 | ||
20e95c23 | 5633 | |
783e057b | 5634 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5635 | # Check whether --enable-64-bit-bfd was given. |
5636 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5637 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5638 | yes) want64=true ;; |
5639 | no) want64=false ;; | |
81ecdfbb | 5640 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5641 | esac |
5642 | else | |
5643 | want64=false | |
81ecdfbb RW |
5644 | fi |
5645 | ||
783e057b DJ |
5646 | # Provide defaults for some variables set by the per-host and per-target |
5647 | # configuration. | |
5648 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5649 | |
783e057b DJ |
5650 | if test "${target}" = "${host}"; then |
5651 | gdb_native=yes | |
5652 | else | |
5653 | gdb_native=no | |
5654 | fi | |
20e95c23 | 5655 | |
783e057b | 5656 | . $srcdir/configure.host |
20e95c23 | 5657 | |
fb23d554 SDJ |
5658 | # Add in the common host objects. |
5659 | . $srcdir/common/common.host | |
5660 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
5661 | ||
783e057b | 5662 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5663 | |
783e057b DJ |
5664 | TARGET_OBS= |
5665 | all_targets= | |
b292c783 | 5666 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 5667 | |
783e057b | 5668 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5669 | do |
783e057b DJ |
5670 | if test "$targ_alias" = "all"; then |
5671 | all_targets=true | |
5672 | else | |
5673 | # Canonicalize the secondary target names. | |
5674 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5675 | if test -n "$result"; then | |
5676 | targ=$result | |
5677 | else | |
5678 | targ=$targ_alias | |
5679 | fi | |
20e95c23 | 5680 | |
783e057b | 5681 | . ${srcdir}/configure.tgt |
20e95c23 | 5682 | |
bf307134 JB |
5683 | if test -z "${gdb_target_obs}"; then : |
5684 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5685 | fi | |
5686 | ||
783e057b DJ |
5687 | # Target-specific object files |
5688 | for i in ${gdb_target_obs}; do | |
5689 | case " $TARGET_OBS " in | |
5690 | *" ${i} "*) ;; | |
5691 | *) | |
5692 | TARGET_OBS="$TARGET_OBS ${i}" | |
5693 | ;; | |
5694 | esac | |
5695 | done | |
20e95c23 | 5696 | |
783e057b DJ |
5697 | # Check whether this target needs 64-bit CORE_ADDR |
5698 | if test x${want64} = xfalse; then | |
5699 | . ${srcdir}/../bfd/config.bfd | |
5700 | fi | |
b292c783 JK |
5701 | |
5702 | # Check whether this target is native and supports gcore. | |
5703 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
5704 | && $gdb_have_gcore; then | |
5705 | HAVE_NATIVE_GCORE_TARGET=1 | |
5706 | fi | |
783e057b | 5707 | fi |
20e95c23 DJ |
5708 | done |
5709 | ||
783e057b DJ |
5710 | if test x${all_targets} = xtrue; then |
5711 | ||
5712 | # We want all 64-bit targets if we either: | |
5713 | # - run on a 64-bit host or | |
5714 | # - already require 64-bit support for some other target or | |
5715 | # - the --enable-64-bit-bfd option was supplied | |
5716 | # Otherwise we only support all 32-bit targets. | |
5717 | # | |
5718 | # NOTE: This test must be in sync with the corresponding | |
5719 | # tests in BFD! | |
20e95c23 | 5720 | |
783e057b | 5721 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5722 | # The cast to long int works around a bug in the HP C Compiler |
5723 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5724 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5725 | # This bug is HP SR number 8606223364. | |
5726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5727 | $as_echo_n "checking size of long... " >&6; } | |
5728 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5729 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5730 | else |
81ecdfbb | 5731 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5732 | |
81ecdfbb RW |
5733 | else |
5734 | if test "$ac_cv_type_long" = yes; then | |
5735 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5736 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5737 | { as_fn_set_status 77 | |
5738 | as_fn_error "cannot compute sizeof (long) | |
5739 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5740 | else | |
5741 | ac_cv_sizeof_long=0 | |
5742 | fi | |
c0993dbe | 5743 | fi |
81ecdfbb | 5744 | |
c0993dbe | 5745 | fi |
81ecdfbb RW |
5746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5747 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5748 | |
c0993dbe | 5749 | |
c0993dbe | 5750 | |
c0993dbe UW |
5751 | cat >>confdefs.h <<_ACEOF |
5752 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5753 | _ACEOF | |
5754 | ||
5755 | ||
5756 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5757 | want64=true | |
5758 | fi | |
5759 | fi | |
5760 | if test x${want64} = xtrue; then | |
5761 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5762 | else | |
5763 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5764 | fi | |
5765 | fi | |
5766 | ||
5767 | ||
5768 | ||
b292c783 | 5769 | |
c0993dbe UW |
5770 | # For other settings, only the main target counts. |
5771 | gdb_sim= | |
5772 | gdb_osabi= | |
5773 | build_gdbserver= | |
5774 | targ=$target; . ${srcdir}/configure.tgt | |
5775 | ||
5776 | # Fetch the default architecture and default target vector from BFD. | |
5777 | targ=$target; . $srcdir/../bfd/config.bfd | |
5778 | ||
5779 | # We only want the first architecture, so strip off the others if | |
5780 | # there is more than one. | |
5781 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5782 | ||
5783 | if test "x$targ_archs" != x; then | |
5784 | ||
5785 | cat >>confdefs.h <<_ACEOF | |
5786 | #define DEFAULT_BFD_ARCH $targ_archs | |
5787 | _ACEOF | |
5788 | ||
5789 | fi | |
5790 | if test "x$targ_defvec" != x; then | |
5791 | ||
5792 | cat >>confdefs.h <<_ACEOF | |
5793 | #define DEFAULT_BFD_VEC $targ_defvec | |
5794 | _ACEOF | |
5795 | ||
5796 | fi | |
5797 | ||
c0993dbe UW |
5798 | # The CLI cannot be disabled yet, but may be in the future. |
5799 | ||
5800 | # Enable CLI. | |
81ecdfbb RW |
5801 | # Check whether --enable-gdbcli was given. |
5802 | if test "${enable_gdbcli+set}" = set; then : | |
5803 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5804 | yes) |
5805 | ;; | |
5806 | no) | |
81ecdfbb | 5807 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5808 | *) |
81ecdfbb | 5809 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5810 | esac |
5811 | else | |
5812 | enable_gdbcli=yes | |
81ecdfbb RW |
5813 | fi |
5814 | ||
c0993dbe UW |
5815 | if test x"$enable_gdbcli" = xyes; then |
5816 | if test -d $srcdir/cli; then | |
5817 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5818 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5819 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5820 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5821 | fi | |
5822 | fi | |
5823 | ||
5824 | # Enable MI. | |
81ecdfbb RW |
5825 | # Check whether --enable-gdbmi was given. |
5826 | if test "${enable_gdbmi+set}" = set; then : | |
5827 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5828 | yes | no) |
5829 | ;; | |
5830 | *) | |
81ecdfbb | 5831 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5832 | esac |
5833 | else | |
5834 | enable_gdbmi=yes | |
81ecdfbb RW |
5835 | fi |
5836 | ||
c0993dbe UW |
5837 | if test x"$enable_gdbmi" = xyes; then |
5838 | if test -d $srcdir/mi; then | |
5839 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5840 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5841 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5842 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5843 | fi | |
5844 | fi | |
5845 | ||
5846 | # Enable TUI. | |
81ecdfbb RW |
5847 | # Check whether --enable-tui was given. |
5848 | if test "${enable_tui+set}" = set; then : | |
5849 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5850 | yes | no | auto) |
c0993dbe UW |
5851 | ;; |
5852 | *) | |
81ecdfbb | 5853 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5854 | esac |
5855 | else | |
3ca64bd3 | 5856 | enable_tui=auto |
81ecdfbb RW |
5857 | fi |
5858 | ||
c0993dbe UW |
5859 | |
5860 | # Enable gdbtk. | |
81ecdfbb RW |
5861 | # Check whether --enable-gdbtk was given. |
5862 | if test "${enable_gdbtk+set}" = set; then : | |
5863 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5864 | yes | no) |
5865 | ;; | |
5866 | *) | |
81ecdfbb | 5867 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5868 | esac |
5869 | else | |
5062cc19 | 5870 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5871 | enable_gdbtk=yes |
5872 | else | |
5873 | enable_gdbtk=no | |
5874 | fi | |
81ecdfbb RW |
5875 | fi |
5876 | ||
c0993dbe UW |
5877 | # We unconditionally disable gdbtk tests on selected platforms. |
5878 | case $host_os in | |
5879 | go32* | windows*) | |
81ecdfbb RW |
5880 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5881 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5882 | enable_gdbtk=no ;; |
5883 | esac | |
5884 | ||
05e7c244 | 5885 | # Libunwind support for ia64. |
bec39cab | 5886 | |
05e7c244 JK |
5887 | |
5888 | # Check whether --with-libunwind-ia64 was given. | |
5889 | if test "${with_libunwind_ia64+set}" = set; then : | |
5890 | withval=$with_libunwind_ia64; | |
bec39cab | 5891 | else |
05e7c244 JK |
5892 | with_libunwind_ia64=auto |
5893 | fi | |
bec39cab | 5894 | |
05e7c244 JK |
5895 | |
5896 | # Backward compatibility option. | |
5897 | if test "${with_libunwind+set}" = set; then | |
5898 | if test x"$with_libunwind_ia64" != xauto; then | |
5899 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5900 | fi | |
5901 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5902 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5903 | with_libunwind_ia64="$with_libunwind" | |
5904 | fi | |
5905 | ||
5906 | case "$with_libunwind_ia64" in | |
5907 | yes | no) | |
5908 | ;; | |
5909 | auto) | |
5910 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5911 | do : |
b54a8fd7 PA |
5912 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5913 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5914 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5915 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5916 | _ACEOF |
5917 | ||
5918 | fi | |
5919 | ||
5920 | done | |
5921 | ||
05e7c244 JK |
5922 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5923 | ;; | |
5924 | *) | |
5925 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5926 | ;; | |
5927 | esac | |
bec39cab | 5928 | |
05e7c244 | 5929 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5930 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5931 | do : |
b54a8fd7 PA |
5932 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5933 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5934 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5935 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5936 | _ACEOF |
5937 | ||
5938 | fi | |
5939 | ||
5940 | done | |
5941 | ||
05e7c244 JK |
5942 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5943 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5944 | fi | |
5945 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5946 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5947 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5948 | fi |
5949 | ||
cb01cfba JB |
5950 | opt_curses=no |
5951 | ||
81ecdfbb RW |
5952 | # Check whether --with-curses was given. |
5953 | if test "${with_curses+set}" = set; then : | |
5954 | withval=$with_curses; opt_curses=$withval | |
5955 | fi | |
5956 | ||
cb01cfba | 5957 | |
76a39ba7 | 5958 | prefer_curses=no |
cb01cfba | 5959 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5960 | prefer_curses=yes |
cb01cfba JB |
5961 | fi |
5962 | ||
a9322a30 | 5963 | # Profiling support. |
81ecdfbb RW |
5964 | # Check whether --enable-profiling was given. |
5965 | if test "${enable_profiling+set}" = set; then : | |
5966 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5967 | yes | no) |
5968 | ;; | |
5969 | *) | |
81ecdfbb | 5970 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5971 | esac |
5972 | else | |
5973 | enable_profiling=no | |
81ecdfbb | 5974 | fi |
bec39cab | 5975 | |
a9322a30 TT |
5976 | |
5977 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5978 | do : |
5979 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5980 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5981 | eval as_val=\$$as_ac_var | |
5982 | if test "x$as_val" = x""yes; then : | |
5983 | cat >>confdefs.h <<_ACEOF | |
5984 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5985 | _ACEOF |
a9322a30 | 5986 | |
81ecdfbb RW |
5987 | fi |
5988 | done | |
a9322a30 | 5989 | |
81ecdfbb RW |
5990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5991 | $as_echo_n "checking for _etext... " >&6; } | |
5992 | if test "${ac_cv_var__etext+set}" = set; then : | |
5993 | $as_echo_n "(cached) " >&6 | |
5994 | else | |
5995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5996 | /* end confdefs.h. */ | |
5997 | #include <stdlib.h> | |
5998 | extern char _etext; | |
a9322a30 TT |
5999 | |
6000 | int | |
6001 | main () | |
6002 | { | |
6003 | free (&_etext); | |
6004 | ; | |
6005 | return 0; | |
6006 | } | |
bec39cab | 6007 | _ACEOF |
81ecdfbb | 6008 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6009 | ac_cv_var__etext=yes |
bec39cab | 6010 | else |
81ecdfbb | 6011 | ac_cv_var__etext=no |
bec39cab | 6012 | fi |
81ecdfbb RW |
6013 | rm -f core conftest.err conftest.$ac_objext \ |
6014 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6015 | fi |
81ecdfbb RW |
6016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6017 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6018 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6019 | |
81ecdfbb | 6020 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6021 | |
bec39cab | 6022 | fi |
81ecdfbb RW |
6023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6024 | $as_echo_n "checking for etext... " >&6; } | |
6025 | if test "${ac_cv_var_etext+set}" = set; then : | |
6026 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6027 | else |
81ecdfbb | 6028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6029 | /* end confdefs.h. */ |
a9322a30 TT |
6030 | #include <stdlib.h> |
6031 | extern char etext; | |
bec39cab AC |
6032 | |
6033 | int | |
6034 | main () | |
6035 | { | |
a9322a30 | 6036 | free (&etext); |
bec39cab AC |
6037 | ; |
6038 | return 0; | |
6039 | } | |
6040 | _ACEOF | |
81ecdfbb | 6041 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6042 | ac_cv_var_etext=yes |
bec39cab | 6043 | else |
81ecdfbb | 6044 | ac_cv_var_etext=no |
bec39cab | 6045 | fi |
81ecdfbb RW |
6046 | rm -f core conftest.err conftest.$ac_objext \ |
6047 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6048 | fi |
81ecdfbb RW |
6049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6050 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
6051 | if test $ac_cv_var_etext = yes; then |
6052 | ||
81ecdfbb | 6053 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6054 | |
6055 | fi | |
a9322a30 TT |
6056 | if test "$enable_profiling" = yes ; then |
6057 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 6058 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6059 | fi |
6060 | PROFILE_CFLAGS=-pg | |
6061 | OLD_CFLAGS="$CFLAGS" | |
6062 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6063 | |
81ecdfbb RW |
6064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
6065 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
6066 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
6067 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6068 | else |
81ecdfbb | 6069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6070 | /* end confdefs.h. */ |
bec39cab AC |
6071 | |
6072 | int | |
6073 | main () | |
6074 | { | |
a9322a30 | 6075 | int x; |
bec39cab AC |
6076 | ; |
6077 | return 0; | |
6078 | } | |
6079 | _ACEOF | |
81ecdfbb | 6080 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 6081 | ac_cv_cc_supports_pg=yes |
bec39cab | 6082 | else |
81ecdfbb | 6083 | ac_cv_cc_supports_pg=no |
bec39cab | 6084 | fi |
81ecdfbb | 6085 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 6086 | fi |
81ecdfbb RW |
6087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
6088 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 6089 | |
a9322a30 | 6090 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 6091 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 6092 | fi |
bec39cab | 6093 | |
a9322a30 | 6094 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
6095 | fi |
6096 | ||
c16158bc JM |
6097 | |
6098 | ||
81ecdfbb RW |
6099 | # Check whether --with-pkgversion was given. |
6100 | if test "${with_pkgversion+set}" = set; then : | |
6101 | withval=$with_pkgversion; case "$withval" in | |
6102 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6103 | no) PKGVERSION= ;; |
6104 | *) PKGVERSION="($withval) " ;; | |
6105 | esac | |
6106 | else | |
6107 | PKGVERSION="(GDB) " | |
6108 | ||
81ecdfbb | 6109 | fi |
c16158bc JM |
6110 | |
6111 | ||
6112 | ||
6113 | ||
81ecdfbb RW |
6114 | |
6115 | # Check whether --with-bugurl was given. | |
6116 | if test "${with_bugurl+set}" = set; then : | |
6117 | withval=$with_bugurl; case "$withval" in | |
6118 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6119 | no) BUGURL= |
6120 | ;; | |
6121 | *) BUGURL="$withval" | |
6122 | ;; | |
6123 | esac | |
6124 | else | |
6125 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
6126 | ||
81ecdfbb RW |
6127 | fi |
6128 | ||
c16158bc JM |
6129 | case ${BUGURL} in |
6130 | "") | |
6131 | REPORT_BUGS_TO= | |
6132 | REPORT_BUGS_TEXI= | |
6133 | ;; | |
6134 | *) | |
6135 | REPORT_BUGS_TO="<$BUGURL>" | |
6136 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
6137 | ;; | |
6138 | esac; | |
6139 | ||
6140 | ||
6141 | ||
6142 | ||
6143 | cat >>confdefs.h <<_ACEOF | |
6144 | #define PKGVERSION "$PKGVERSION" | |
6145 | _ACEOF | |
6146 | ||
6147 | ||
6148 | cat >>confdefs.h <<_ACEOF | |
6149 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
6150 | _ACEOF | |
6151 | ||
6152 | ||
bec39cab AC |
6153 | # --------------------- # |
6154 | # Checks for programs. # | |
6155 | # --------------------- # | |
6156 | ||
6157 | for ac_prog in gawk mawk nawk awk | |
6158 | do | |
6159 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6160 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6162 | $as_echo_n "checking for $ac_word... " >&6; } | |
6163 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
6164 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6165 | else |
6166 | if test -n "$AWK"; then | |
6167 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
6168 | else | |
6169 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6170 | for as_dir in $PATH | |
6171 | do | |
6172 | IFS=$as_save_IFS | |
6173 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6174 | for ac_exec_ext in '' $ac_executable_extensions; do |
6175 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6176 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 6177 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6178 | break 2 |
6179 | fi | |
6180 | done | |
81ecdfbb RW |
6181 | done |
6182 | IFS=$as_save_IFS | |
bec39cab AC |
6183 | |
6184 | fi | |
6185 | fi | |
6186 | AWK=$ac_cv_prog_AWK | |
6187 | if test -n "$AWK"; then | |
81ecdfbb RW |
6188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
6189 | $as_echo "$AWK" >&6; } | |
bec39cab | 6190 | else |
81ecdfbb RW |
6191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6192 | $as_echo "no" >&6; } | |
bec39cab AC |
6193 | fi |
6194 | ||
bec39cab | 6195 | |
81ecdfbb | 6196 | test -n "$AWK" && break |
bec39cab AC |
6197 | done |
6198 | ||
c971b7fa PA |
6199 | # Find a good install program. We prefer a C program (faster), |
6200 | # so one script is as good as another. But avoid the broken or | |
6201 | # incompatible versions: | |
6202 | # SysV /etc/install, /usr/sbin/install | |
6203 | # SunOS /usr/etc/install | |
6204 | # IRIX /sbin/install | |
6205 | # AIX /bin/install | |
6206 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
6207 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
6208 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
6209 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
6210 | # OS/2's system install, which has a completely different semantic | |
6211 | # ./install, which can be erroneously created by make from ./install.sh. | |
6212 | # Reject install programs that cannot install multiple files. | |
6213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
6214 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
6215 | if test -z "$INSTALL"; then | |
6216 | if test "${ac_cv_path_install+set}" = set; then : | |
6217 | $as_echo_n "(cached) " >&6 | |
6218 | else | |
6219 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6220 | for as_dir in $PATH | |
6221 | do | |
6222 | IFS=$as_save_IFS | |
6223 | test -z "$as_dir" && as_dir=. | |
6224 | # Account for people who put trailing slashes in PATH elements. | |
6225 | case $as_dir/ in #(( | |
6226 | ./ | .// | /[cC]/* | \ | |
6227 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
6228 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
6229 | /usr/ucb/* ) ;; | |
6230 | *) | |
6231 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
6232 | # Don't use installbsd from OSF since it installs stuff as root | |
6233 | # by default. | |
6234 | for ac_prog in ginstall scoinst install; do | |
6235 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6236 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
6237 | if test $ac_prog = install && | |
6238 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6239 | # AIX install. It has an incompatible calling convention. | |
6240 | : | |
6241 | elif test $ac_prog = install && | |
6242 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6243 | # program-specific install script used by HP pwplus--don't use. | |
6244 | : | |
6245 | else | |
6246 | rm -rf conftest.one conftest.two conftest.dir | |
6247 | echo one > conftest.one | |
6248 | echo two > conftest.two | |
6249 | mkdir conftest.dir | |
6250 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
6251 | test -s conftest.one && test -s conftest.two && | |
6252 | test -s conftest.dir/conftest.one && | |
6253 | test -s conftest.dir/conftest.two | |
6254 | then | |
6255 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
6256 | break 3 | |
6257 | fi | |
6258 | fi | |
6259 | fi | |
6260 | done | |
6261 | done | |
6262 | ;; | |
6263 | esac | |
6264 | ||
6265 | done | |
6266 | IFS=$as_save_IFS | |
6267 | ||
6268 | rm -rf conftest.one conftest.two conftest.dir | |
6269 | ||
6270 | fi | |
6271 | if test "${ac_cv_path_install+set}" = set; then | |
6272 | INSTALL=$ac_cv_path_install | |
6273 | else | |
6274 | # As a last resort, use the slow shell script. Don't cache a | |
6275 | # value for INSTALL within a source directory, because that will | |
6276 | # break other packages using the cache if that directory is | |
6277 | # removed, or if the value is a relative name. | |
6278 | INSTALL=$ac_install_sh | |
6279 | fi | |
6280 | fi | |
6281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
6282 | $as_echo "$INSTALL" >&6; } | |
6283 | ||
6284 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
6285 | # It thinks the first close brace ends the variable substitution. | |
6286 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
6287 | ||
6288 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
6289 | ||
6290 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 6291 | |
81ecdfbb RW |
6292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
6293 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
6294 | LN_S=$as_ln_s |
6295 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
6296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6297 | $as_echo "yes" >&6; } | |
bec39cab | 6298 | else |
81ecdfbb RW |
6299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
6300 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
6301 | fi |
6302 | ||
6303 | if test -n "$ac_tool_prefix"; then | |
6304 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6305 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6307 | $as_echo_n "checking for $ac_word... " >&6; } | |
6308 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
6309 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6310 | else |
6311 | if test -n "$RANLIB"; then | |
6312 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6313 | else | |
6314 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6315 | for as_dir in $PATH | |
6316 | do | |
6317 | IFS=$as_save_IFS | |
6318 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6319 | for ac_exec_ext in '' $ac_executable_extensions; do |
6320 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6321 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 6322 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6323 | break 2 |
6324 | fi | |
6325 | done | |
81ecdfbb RW |
6326 | done |
6327 | IFS=$as_save_IFS | |
bec39cab AC |
6328 | |
6329 | fi | |
6330 | fi | |
6331 | RANLIB=$ac_cv_prog_RANLIB | |
6332 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
6333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
6334 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 6335 | else |
81ecdfbb RW |
6336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6337 | $as_echo "no" >&6; } | |
bec39cab AC |
6338 | fi |
6339 | ||
81ecdfbb | 6340 | |
bec39cab AC |
6341 | fi |
6342 | if test -z "$ac_cv_prog_RANLIB"; then | |
6343 | ac_ct_RANLIB=$RANLIB | |
6344 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6345 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
6346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6347 | $as_echo_n "checking for $ac_word... " >&6; } | |
6348 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
6349 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6350 | else |
6351 | if test -n "$ac_ct_RANLIB"; then | |
6352 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6353 | else | |
6354 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6355 | for as_dir in $PATH | |
6356 | do | |
6357 | IFS=$as_save_IFS | |
6358 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6359 | for ac_exec_ext in '' $ac_executable_extensions; do |
6360 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6361 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 6362 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6363 | break 2 |
6364 | fi | |
6365 | done | |
81ecdfbb RW |
6366 | done |
6367 | IFS=$as_save_IFS | |
bec39cab | 6368 | |
bec39cab AC |
6369 | fi |
6370 | fi | |
6371 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6372 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
6373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
6374 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 6375 | else |
81ecdfbb RW |
6376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6377 | $as_echo "no" >&6; } | |
bec39cab AC |
6378 | fi |
6379 | ||
81ecdfbb RW |
6380 | if test "x$ac_ct_RANLIB" = x; then |
6381 | RANLIB=":" | |
6382 | else | |
6383 | case $cross_compiling:$ac_tool_warned in | |
6384 | yes:) | |
6385 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6386 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6387 | ac_tool_warned=yes ;; | |
6388 | esac | |
6389 | RANLIB=$ac_ct_RANLIB | |
6390 | fi | |
bec39cab AC |
6391 | else |
6392 | RANLIB="$ac_cv_prog_RANLIB" | |
6393 | fi | |
6394 | ||
6395 | for ac_prog in 'bison -y' byacc | |
6396 | do | |
6397 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6398 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6400 | $as_echo_n "checking for $ac_word... " >&6; } | |
6401 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
6402 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6403 | else |
6404 | if test -n "$YACC"; then | |
6405 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
6406 | else | |
6407 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6408 | for as_dir in $PATH | |
6409 | do | |
6410 | IFS=$as_save_IFS | |
6411 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6412 | for ac_exec_ext in '' $ac_executable_extensions; do |
6413 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6414 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 6415 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6416 | break 2 |
6417 | fi | |
6418 | done | |
81ecdfbb RW |
6419 | done |
6420 | IFS=$as_save_IFS | |
bec39cab AC |
6421 | |
6422 | fi | |
6423 | fi | |
6424 | YACC=$ac_cv_prog_YACC | |
6425 | if test -n "$YACC"; then | |
81ecdfbb RW |
6426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
6427 | $as_echo "$YACC" >&6; } | |
bec39cab | 6428 | else |
81ecdfbb RW |
6429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6430 | $as_echo "no" >&6; } | |
bec39cab AC |
6431 | fi |
6432 | ||
81ecdfbb | 6433 | |
bec39cab AC |
6434 | test -n "$YACC" && break |
6435 | done | |
6436 | test -n "$YACC" || YACC="yacc" | |
6437 | ||
6438 | ||
6439 | if test -n "$ac_tool_prefix"; then | |
6440 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6441 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
6442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6443 | $as_echo_n "checking for $ac_word... " >&6; } | |
6444 | if test "${ac_cv_prog_AR+set}" = set; then : | |
6445 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6446 | else |
6447 | if test -n "$AR"; then | |
6448 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6449 | else | |
6450 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6451 | for as_dir in $PATH | |
6452 | do | |
6453 | IFS=$as_save_IFS | |
6454 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6455 | for ac_exec_ext in '' $ac_executable_extensions; do |
6456 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6457 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 6458 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6459 | break 2 |
6460 | fi | |
6461 | done | |
81ecdfbb RW |
6462 | done |
6463 | IFS=$as_save_IFS | |
bec39cab AC |
6464 | |
6465 | fi | |
6466 | fi | |
6467 | AR=$ac_cv_prog_AR | |
6468 | if test -n "$AR"; then | |
81ecdfbb RW |
6469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
6470 | $as_echo "$AR" >&6; } | |
bec39cab | 6471 | else |
81ecdfbb RW |
6472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6473 | $as_echo "no" >&6; } | |
bec39cab AC |
6474 | fi |
6475 | ||
81ecdfbb | 6476 | |
bec39cab AC |
6477 | fi |
6478 | if test -z "$ac_cv_prog_AR"; then | |
6479 | ac_ct_AR=$AR | |
6480 | # Extract the first word of "ar", so it can be a program name with args. | |
6481 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
6482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6483 | $as_echo_n "checking for $ac_word... " >&6; } | |
6484 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
6485 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6486 | else |
6487 | if test -n "$ac_ct_AR"; then | |
6488 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6489 | else | |
6490 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6491 | for as_dir in $PATH | |
6492 | do | |
6493 | IFS=$as_save_IFS | |
6494 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6495 | for ac_exec_ext in '' $ac_executable_extensions; do |
6496 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6497 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 6498 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6499 | break 2 |
6500 | fi | |
6501 | done | |
81ecdfbb RW |
6502 | done |
6503 | IFS=$as_save_IFS | |
bec39cab AC |
6504 | |
6505 | fi | |
6506 | fi | |
6507 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6508 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
6509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
6510 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 6511 | else |
81ecdfbb RW |
6512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6513 | $as_echo "no" >&6; } | |
bec39cab AC |
6514 | fi |
6515 | ||
81ecdfbb RW |
6516 | if test "x$ac_ct_AR" = x; then |
6517 | AR="" | |
6518 | else | |
6519 | case $cross_compiling:$ac_tool_warned in | |
6520 | yes:) | |
6521 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6522 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6523 | ac_tool_warned=yes ;; | |
6524 | esac | |
6525 | AR=$ac_ct_AR | |
6526 | fi | |
bec39cab AC |
6527 | else |
6528 | AR="$ac_cv_prog_AR" | |
6529 | fi | |
6530 | ||
6531 | if test -n "$ac_tool_prefix"; then | |
6532 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
6533 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
6534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6535 | $as_echo_n "checking for $ac_word... " >&6; } | |
6536 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
6537 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6538 | else |
6539 | if test -n "$DLLTOOL"; then | |
6540 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
6541 | else | |
6542 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6543 | for as_dir in $PATH | |
6544 | do | |
6545 | IFS=$as_save_IFS | |
6546 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6547 | for ac_exec_ext in '' $ac_executable_extensions; do |
6548 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6549 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 6550 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6551 | break 2 |
6552 | fi | |
6553 | done | |
81ecdfbb RW |
6554 | done |
6555 | IFS=$as_save_IFS | |
bec39cab AC |
6556 | |
6557 | fi | |
6558 | fi | |
6559 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
6560 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
6561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
6562 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 6563 | else |
81ecdfbb RW |
6564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6565 | $as_echo "no" >&6; } | |
bec39cab AC |
6566 | fi |
6567 | ||
81ecdfbb | 6568 | |
bec39cab AC |
6569 | fi |
6570 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
6571 | ac_ct_DLLTOOL=$DLLTOOL | |
6572 | # Extract the first word of "dlltool", so it can be a program name with args. | |
6573 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
6574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6575 | $as_echo_n "checking for $ac_word... " >&6; } | |
6576 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
6577 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6578 | else |
6579 | if test -n "$ac_ct_DLLTOOL"; then | |
6580 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
6581 | else | |
6582 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6583 | for as_dir in $PATH | |
6584 | do | |
6585 | IFS=$as_save_IFS | |
6586 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6587 | for ac_exec_ext in '' $ac_executable_extensions; do |
6588 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6589 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 6590 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6591 | break 2 |
6592 | fi | |
6593 | done | |
81ecdfbb RW |
6594 | done |
6595 | IFS=$as_save_IFS | |
bec39cab AC |
6596 | |
6597 | fi | |
6598 | fi | |
6599 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6600 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6602 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6603 | else |
81ecdfbb RW |
6604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6605 | $as_echo "no" >&6; } | |
bec39cab AC |
6606 | fi |
6607 | ||
81ecdfbb RW |
6608 | if test "x$ac_ct_DLLTOOL" = x; then |
6609 | DLLTOOL="" | |
6610 | else | |
6611 | case $cross_compiling:$ac_tool_warned in | |
6612 | yes:) | |
6613 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6614 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6615 | ac_tool_warned=yes ;; | |
6616 | esac | |
6617 | DLLTOOL=$ac_ct_DLLTOOL | |
6618 | fi | |
bec39cab AC |
6619 | else |
6620 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6621 | fi | |
6622 | ||
6623 | if test -n "$ac_tool_prefix"; then | |
6624 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6625 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6627 | $as_echo_n "checking for $ac_word... " >&6; } | |
6628 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6629 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6630 | else |
6631 | if test -n "$WINDRES"; then | |
6632 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6633 | else | |
6634 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6635 | for as_dir in $PATH | |
6636 | do | |
6637 | IFS=$as_save_IFS | |
6638 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6639 | for ac_exec_ext in '' $ac_executable_extensions; do |
6640 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6641 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6642 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6643 | break 2 |
6644 | fi | |
6645 | done | |
81ecdfbb RW |
6646 | done |
6647 | IFS=$as_save_IFS | |
bec39cab AC |
6648 | |
6649 | fi | |
6650 | fi | |
6651 | WINDRES=$ac_cv_prog_WINDRES | |
6652 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6654 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6655 | else |
81ecdfbb RW |
6656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6657 | $as_echo "no" >&6; } | |
bec39cab AC |
6658 | fi |
6659 | ||
81ecdfbb | 6660 | |
bec39cab AC |
6661 | fi |
6662 | if test -z "$ac_cv_prog_WINDRES"; then | |
6663 | ac_ct_WINDRES=$WINDRES | |
6664 | # Extract the first word of "windres", so it can be a program name with args. | |
6665 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6667 | $as_echo_n "checking for $ac_word... " >&6; } | |
6668 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6669 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6670 | else |
6671 | if test -n "$ac_ct_WINDRES"; then | |
6672 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6673 | else | |
6674 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6675 | for as_dir in $PATH | |
6676 | do | |
6677 | IFS=$as_save_IFS | |
6678 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6679 | for ac_exec_ext in '' $ac_executable_extensions; do |
6680 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6681 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6682 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6683 | break 2 |
6684 | fi | |
6685 | done | |
81ecdfbb RW |
6686 | done |
6687 | IFS=$as_save_IFS | |
bec39cab AC |
6688 | |
6689 | fi | |
6690 | fi | |
6691 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6692 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6694 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6695 | else |
81ecdfbb RW |
6696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6697 | $as_echo "no" >&6; } | |
c906108c | 6698 | fi |
bec39cab | 6699 | |
81ecdfbb RW |
6700 | if test "x$ac_ct_WINDRES" = x; then |
6701 | WINDRES="" | |
6702 | else | |
6703 | case $cross_compiling:$ac_tool_warned in | |
6704 | yes:) | |
6705 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6706 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6707 | ac_tool_warned=yes ;; | |
6708 | esac | |
6709 | WINDRES=$ac_ct_WINDRES | |
6710 | fi | |
c906108c | 6711 | else |
bec39cab | 6712 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6713 | fi |
6714 | ||
bec39cab | 6715 | |
036c3acb TS |
6716 | case $host_os in |
6717 | gnu*) | |
6718 | # Needed for GNU Hurd hosts. | |
6719 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
6720 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
6721 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6723 | $as_echo_n "checking for $ac_word... " >&6; } | |
6724 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6725 | $as_echo_n "(cached) " >&6 | |
c906108c | 6726 | else |
bec39cab AC |
6727 | if test -n "$MIG"; then |
6728 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6729 | else | |
6730 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6731 | for as_dir in $PATH | |
6732 | do | |
6733 | IFS=$as_save_IFS | |
6734 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6735 | for ac_exec_ext in '' $ac_executable_extensions; do |
6736 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6737 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6738 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6739 | break 2 |
6740 | fi | |
6741 | done | |
81ecdfbb RW |
6742 | done |
6743 | IFS=$as_save_IFS | |
bec39cab | 6744 | |
c906108c | 6745 | fi |
bec39cab AC |
6746 | fi |
6747 | MIG=$ac_cv_prog_MIG | |
6748 | if test -n "$MIG"; then | |
81ecdfbb RW |
6749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6750 | $as_echo "$MIG" >&6; } | |
c906108c | 6751 | else |
81ecdfbb RW |
6752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6753 | $as_echo "no" >&6; } | |
c906108c SS |
6754 | fi |
6755 | ||
81ecdfbb | 6756 | |
bec39cab AC |
6757 | fi |
6758 | if test -z "$ac_cv_prog_MIG"; then | |
6759 | ac_ct_MIG=$MIG | |
6760 | # Extract the first word of "mig", so it can be a program name with args. | |
6761 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6763 | $as_echo_n "checking for $ac_word... " >&6; } | |
6764 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6765 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6766 | else |
6767 | if test -n "$ac_ct_MIG"; then | |
6768 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6769 | else | |
6770 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6771 | for as_dir in $PATH | |
6772 | do | |
6773 | IFS=$as_save_IFS | |
6774 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6775 | for ac_exec_ext in '' $ac_executable_extensions; do |
6776 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6777 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6778 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6779 | break 2 |
6780 | fi | |
6781 | done | |
81ecdfbb RW |
6782 | done |
6783 | IFS=$as_save_IFS | |
c906108c | 6784 | |
bec39cab AC |
6785 | fi |
6786 | fi | |
6787 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6788 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6790 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6791 | else |
81ecdfbb RW |
6792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6793 | $as_echo "no" >&6; } | |
bec39cab | 6794 | fi |
c906108c | 6795 | |
81ecdfbb RW |
6796 | if test "x$ac_ct_MIG" = x; then |
6797 | MIG="" | |
6798 | else | |
6799 | case $cross_compiling:$ac_tool_warned in | |
6800 | yes:) | |
6801 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6802 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6803 | ac_tool_warned=yes ;; | |
6804 | esac | |
6805 | MIG=$ac_ct_MIG | |
6806 | fi | |
bec39cab AC |
6807 | else |
6808 | MIG="$ac_cv_prog_MIG" | |
6809 | fi | |
c906108c | 6810 | |
036c3acb TS |
6811 | if test x"$MIG" = x; then |
6812 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
6813 | fi | |
6814 | ;; | |
6815 | esac | |
c906108c | 6816 | |
bec39cab AC |
6817 | # ---------------------- # |
6818 | # Checks for libraries. # | |
6819 | # ---------------------- # | |
c906108c | 6820 | |
bec39cab | 6821 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6823 | $as_echo_n "checking for main in -lm... " >&6; } | |
6824 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6825 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6826 | else |
6827 | ac_check_lib_save_LIBS=$LIBS | |
6828 | LIBS="-lm $LIBS" | |
81ecdfbb | 6829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6830 | /* end confdefs.h. */ |
c906108c | 6831 | |
c906108c | 6832 | |
bec39cab AC |
6833 | int |
6834 | main () | |
6835 | { | |
81ecdfbb | 6836 | return main (); |
bec39cab AC |
6837 | ; |
6838 | return 0; | |
6839 | } | |
6840 | _ACEOF | |
81ecdfbb | 6841 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6842 | ac_cv_lib_m_main=yes |
6843 | else | |
81ecdfbb | 6844 | ac_cv_lib_m_main=no |
bec39cab | 6845 | fi |
81ecdfbb RW |
6846 | rm -f core conftest.err conftest.$ac_objext \ |
6847 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6848 | LIBS=$ac_check_lib_save_LIBS |
6849 | fi | |
81ecdfbb RW |
6850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6851 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6852 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6853 | cat >>confdefs.h <<_ACEOF |
6854 | #define HAVE_LIBM 1 | |
6855 | _ACEOF | |
6856 | ||
6857 | LIBS="-lm $LIBS" | |
c906108c | 6858 | |
c906108c | 6859 | fi |
bec39cab AC |
6860 | |
6861 | ||
6862 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6863 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6864 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6865 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6866 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6867 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6868 | |
c906108c | 6869 | else |
81ecdfbb RW |
6870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6871 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6872 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6873 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6874 | else |
6875 | ac_check_lib_save_LIBS=$LIBS | |
6876 | LIBS="-lw $LIBS" | |
81ecdfbb | 6877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6878 | /* end confdefs.h. */ |
c906108c | 6879 | |
81ecdfbb RW |
6880 | /* Override any GCC internal prototype to avoid an error. |
6881 | Use char because int might match the return type of a GCC | |
6882 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6883 | #ifdef __cplusplus |
6884 | extern "C" | |
6885 | #endif | |
bec39cab AC |
6886 | char wctype (); |
6887 | int | |
6888 | main () | |
6889 | { | |
81ecdfbb | 6890 | return wctype (); |
bec39cab AC |
6891 | ; |
6892 | return 0; | |
6893 | } | |
6894 | _ACEOF | |
81ecdfbb | 6895 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6896 | ac_cv_lib_w_wctype=yes |
6897 | else | |
81ecdfbb | 6898 | ac_cv_lib_w_wctype=no |
bec39cab | 6899 | fi |
81ecdfbb RW |
6900 | rm -f core conftest.err conftest.$ac_objext \ |
6901 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6902 | LIBS=$ac_check_lib_save_LIBS |
6903 | fi | |
81ecdfbb RW |
6904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6905 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6906 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6907 | cat >>confdefs.h <<_ACEOF |
6908 | #define HAVE_LIBW 1 | |
6909 | _ACEOF | |
c906108c | 6910 | |
bec39cab | 6911 | LIBS="-lw $LIBS" |
c906108c | 6912 | |
bec39cab | 6913 | fi |
c906108c | 6914 | |
bec39cab | 6915 | fi |
c906108c | 6916 | |
ddc9cd0f | 6917 | |
bec39cab | 6918 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6920 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6921 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6922 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6923 | else |
6924 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6926 | /* end confdefs.h. */ |
ddc9cd0f | 6927 | |
81ecdfbb RW |
6928 | /* Override any GCC internal prototype to avoid an error. |
6929 | Use char because int might match the return type of a GCC | |
6930 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6931 | #ifdef __cplusplus |
6932 | extern "C" | |
6933 | #endif | |
bec39cab AC |
6934 | char gethostbyname (); |
6935 | int | |
6936 | main () | |
6937 | { | |
81ecdfbb | 6938 | return gethostbyname (); |
bec39cab AC |
6939 | ; |
6940 | return 0; | |
6941 | } | |
6942 | _ACEOF | |
81ecdfbb RW |
6943 | for ac_lib in '' nsl; do |
6944 | if test -z "$ac_lib"; then | |
6945 | ac_res="none required" | |
6946 | else | |
6947 | ac_res=-l$ac_lib | |
b4e70030 | 6948 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6949 | fi |
6950 | if ac_fn_c_try_link "$LINENO"; then : | |
6951 | ac_cv_search_gethostbyname=$ac_res | |
6952 | fi | |
6953 | rm -f core conftest.err conftest.$ac_objext \ | |
6954 | conftest$ac_exeext | |
6955 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6956 | break | |
6957 | fi | |
6958 | done | |
6959 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6960 | |
bec39cab | 6961 | else |
81ecdfbb | 6962 | ac_cv_search_gethostbyname=no |
bec39cab | 6963 | fi |
81ecdfbb | 6964 | rm conftest.$ac_ext |
bec39cab AC |
6965 | LIBS=$ac_func_search_save_LIBS |
6966 | fi | |
81ecdfbb RW |
6967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6968 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6969 | ac_res=$ac_cv_search_gethostbyname | |
6970 | if test "$ac_res" != no; then : | |
6971 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6972 | |
bec39cab | 6973 | fi |
96baa820 | 6974 | |
c906108c | 6975 | |
b4e70030 | 6976 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6978 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6979 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6980 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6981 | else |
6982 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6984 | /* end confdefs.h. */ |
6985 | ||
81ecdfbb RW |
6986 | /* Override any GCC internal prototype to avoid an error. |
6987 | Use char because int might match the return type of a GCC | |
6988 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6989 | #ifdef __cplusplus |
6990 | extern "C" | |
6991 | #endif | |
b4e70030 JB |
6992 | char socketpair (); |
6993 | int | |
6994 | main () | |
6995 | { | |
81ecdfbb | 6996 | return socketpair (); |
b4e70030 JB |
6997 | ; |
6998 | return 0; | |
6999 | } | |
7000 | _ACEOF | |
81ecdfbb RW |
7001 | for ac_lib in '' socket; do |
7002 | if test -z "$ac_lib"; then | |
7003 | ac_res="none required" | |
7004 | else | |
7005 | ac_res=-l$ac_lib | |
b4e70030 | 7006 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7007 | fi |
7008 | if ac_fn_c_try_link "$LINENO"; then : | |
7009 | ac_cv_search_socketpair=$ac_res | |
7010 | fi | |
7011 | rm -f core conftest.err conftest.$ac_objext \ | |
7012 | conftest$ac_exeext | |
7013 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7014 | break | |
7015 | fi | |
7016 | done | |
7017 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7018 | |
b4e70030 | 7019 | else |
81ecdfbb | 7020 | ac_cv_search_socketpair=no |
b4e70030 | 7021 | fi |
81ecdfbb | 7022 | rm conftest.$ac_ext |
b4e70030 JB |
7023 | LIBS=$ac_func_search_save_LIBS |
7024 | fi | |
81ecdfbb RW |
7025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7026 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7027 | ac_res=$ac_cv_search_socketpair | |
7028 | if test "$ac_res" != no; then : | |
7029 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7030 | |
7031 | fi | |
7032 | ||
7033 | ||
233a11ab | 7034 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7035 | |
711a72d3 | 7036 | # Use the system's zlib library. |
39f3de7c L |
7037 | zlibdir="-L\$(top_builddir)/../zlib" |
7038 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7039 | |
711a72d3 L |
7040 | # Check whether --with-system-zlib was given. |
7041 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7042 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7043 | zlibdir= | |
7044 | zlibinc= | |
7045 | fi | |
b040ad30 | 7046 | |
233a11ab | 7047 | fi |
233a11ab | 7048 | |
233a11ab | 7049 | |
233a11ab | 7050 | |
b040ad30 | 7051 | |
233a11ab | 7052 | |
25268153 | 7053 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 7054 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
7055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
7056 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
7057 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7058 | $as_echo_n "(cached) " >&6 | |
7059 | else | |
7060 | ac_func_search_save_LIBS=$LIBS | |
7061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7062 | /* end confdefs.h. */ | |
7063 | ||
7064 | /* Override any GCC internal prototype to avoid an error. | |
7065 | Use char because int might match the return type of a GCC | |
7066 | builtin and then its argument prototype would still apply. */ | |
7067 | #ifdef __cplusplus | |
7068 | extern "C" | |
7069 | #endif | |
7070 | char kinfo_getvmmap (); | |
7071 | int | |
7072 | main () | |
7073 | { | |
7074 | return kinfo_getvmmap (); | |
7075 | ; | |
7076 | return 0; | |
7077 | } | |
7078 | _ACEOF | |
37773e78 | 7079 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
7080 | if test -z "$ac_lib"; then |
7081 | ac_res="none required" | |
7082 | else | |
7083 | ac_res=-l$ac_lib | |
7084 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7085 | fi | |
7086 | if ac_fn_c_try_link "$LINENO"; then : | |
7087 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7088 | fi | |
7089 | rm -f core conftest.err conftest.$ac_objext \ | |
7090 | conftest$ac_exeext | |
7091 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7092 | break | |
7093 | fi | |
7094 | done | |
7095 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7096 | ||
7097 | else | |
7098 | ac_cv_search_kinfo_getvmmap=no | |
7099 | fi | |
7100 | rm conftest.$ac_ext | |
7101 | LIBS=$ac_func_search_save_LIBS | |
7102 | fi | |
7103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7104 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7105 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7106 | if test "$ac_res" != no; then : | |
7107 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7108 | ||
7109 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7110 | ||
7111 | fi | |
7112 | ||
7113 | ||
77f120bf | 7114 | |
016a3251 DD |
7115 | if test "X$prefix" = "XNONE"; then |
7116 | acl_final_prefix="$ac_default_prefix" | |
7117 | else | |
7118 | acl_final_prefix="$prefix" | |
7119 | fi | |
7120 | if test "X$exec_prefix" = "XNONE"; then | |
7121 | acl_final_exec_prefix='${prefix}' | |
7122 | else | |
7123 | acl_final_exec_prefix="$exec_prefix" | |
7124 | fi | |
7125 | acl_save_prefix="$prefix" | |
7126 | prefix="$acl_final_prefix" | |
7127 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7128 | prefix="$acl_save_prefix" | |
7129 | ||
7130 | ||
7131 | # Check whether --with-gnu-ld was given. | |
7132 | if test "${with_gnu_ld+set}" = set; then : | |
7133 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
7134 | else | |
7135 | with_gnu_ld=no | |
7136 | fi | |
7137 | ||
7138 | # Prepare PATH_SEPARATOR. | |
7139 | # The user is always right. | |
7140 | if test "${PATH_SEPARATOR+set}" != set; then | |
7141 | echo "#! /bin/sh" >conf$$.sh | |
7142 | echo "exit 0" >>conf$$.sh | |
7143 | chmod +x conf$$.sh | |
7144 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7145 | PATH_SEPARATOR=';' | |
7146 | else | |
7147 | PATH_SEPARATOR=: | |
7148 | fi | |
7149 | rm -f conf$$.sh | |
7150 | fi | |
7151 | ac_prog=ld | |
7152 | if test "$GCC" = yes; then | |
7153 | # Check if gcc -print-prog-name=ld gives a path. | |
7154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
7155 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
7156 | case $host in | |
7157 | *-*-mingw*) | |
7158 | # gcc leaves a trailing carriage return which upsets mingw | |
7159 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7160 | *) | |
7161 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7162 | esac | |
7163 | case $ac_prog in | |
7164 | # Accept absolute paths. | |
7165 | [\\/]* | [A-Za-z]:[\\/]*) | |
7166 | re_direlt='/[^/][^/]*/\.\./' | |
7167 | # Canonicalize the path of ld | |
7168 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7169 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7170 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7171 | done | |
7172 | test -z "$LD" && LD="$ac_prog" | |
7173 | ;; | |
7174 | "") | |
7175 | # If it fails, then pretend we aren't using GCC. | |
7176 | ac_prog=ld | |
7177 | ;; | |
7178 | *) | |
7179 | # If it is relative, then search for the first ld in PATH. | |
7180 | with_gnu_ld=unknown | |
7181 | ;; | |
7182 | esac | |
7183 | elif test "$with_gnu_ld" = yes; then | |
7184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
7185 | $as_echo_n "checking for GNU ld... " >&6; } | |
7186 | else | |
7187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
7188 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
7189 | fi | |
7190 | if test "${acl_cv_path_LD+set}" = set; then : | |
7191 | $as_echo_n "(cached) " >&6 | |
7192 | else | |
7193 | if test -z "$LD"; then | |
7194 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7195 | for ac_dir in $PATH; do | |
7196 | test -z "$ac_dir" && ac_dir=. | |
7197 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7198 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7199 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7200 | # but apparently some GNU ld's only accept -v. | |
7201 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7202 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7203 | test "$with_gnu_ld" != no && break | |
7204 | else | |
7205 | test "$with_gnu_ld" != yes && break | |
7206 | fi | |
7207 | fi | |
7208 | done | |
7209 | IFS="$ac_save_ifs" | |
7210 | else | |
7211 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7212 | fi | |
7213 | fi | |
7214 | ||
7215 | LD="$acl_cv_path_LD" | |
7216 | if test -n "$LD"; then | |
7217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
7218 | $as_echo "$LD" >&6; } | |
7219 | else | |
7220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7221 | $as_echo "no" >&6; } | |
7222 | fi | |
7223 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 | |
7224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7225 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7226 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7227 | $as_echo_n "(cached) " >&6 | |
7228 | else | |
7229 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7230 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7231 | acl_cv_prog_gnu_ld=yes | |
7232 | else | |
7233 | acl_cv_prog_gnu_ld=no | |
7234 | fi | |
7235 | fi | |
7236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
7237 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
7238 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
7239 | ||
7240 | ||
7241 | ||
7242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
7243 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7244 | if test "${acl_cv_rpath+set}" = set; then : | |
7245 | $as_echo_n "(cached) " >&6 | |
7246 | else | |
7247 | ||
7248 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7249 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7250 | . ./conftest.sh | |
7251 | rm -f ./conftest.sh | |
7252 | acl_cv_rpath=done | |
7253 | ||
7254 | fi | |
7255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
7256 | $as_echo "$acl_cv_rpath" >&6; } | |
7257 | wl="$acl_cv_wl" | |
7258 | libext="$acl_cv_libext" | |
7259 | shlibext="$acl_cv_shlibext" | |
7260 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7261 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7262 | hardcode_direct="$acl_cv_hardcode_direct" | |
7263 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
7264 | # Check whether --enable-rpath was given. | |
7265 | if test "${enable_rpath+set}" = set; then : | |
7266 | enableval=$enable_rpath; : | |
7267 | else | |
7268 | enable_rpath=yes | |
7269 | fi | |
7270 | ||
7271 | ||
7272 | ||
7273 | ||
7274 | ||
7275 | ||
7276 | ||
7277 | ||
7278 | use_additional=yes | |
7279 | ||
7280 | acl_save_prefix="$prefix" | |
7281 | prefix="$acl_final_prefix" | |
7282 | acl_save_exec_prefix="$exec_prefix" | |
7283 | exec_prefix="$acl_final_exec_prefix" | |
7284 | ||
7285 | eval additional_includedir=\"$includedir\" | |
7286 | eval additional_libdir=\"$libdir\" | |
7287 | ||
7288 | exec_prefix="$acl_save_exec_prefix" | |
7289 | prefix="$acl_save_prefix" | |
77f120bf | 7290 | |
6c7a06a3 | 7291 | |
81ecdfbb RW |
7292 | # Check whether --with-libiconv-prefix was given. |
7293 | if test "${with_libiconv_prefix+set}" = set; then : | |
7294 | withval=$with_libiconv_prefix; | |
016a3251 DD |
7295 | if test "X$withval" = "Xno"; then |
7296 | use_additional=no | |
7297 | else | |
7298 | if test "X$withval" = "X"; then | |
7299 | ||
7300 | acl_save_prefix="$prefix" | |
7301 | prefix="$acl_final_prefix" | |
7302 | acl_save_exec_prefix="$exec_prefix" | |
7303 | exec_prefix="$acl_final_exec_prefix" | |
7304 | ||
7305 | eval additional_includedir=\"$includedir\" | |
7306 | eval additional_libdir=\"$libdir\" | |
7307 | ||
7308 | exec_prefix="$acl_save_exec_prefix" | |
7309 | prefix="$acl_save_prefix" | |
7310 | ||
7311 | else | |
7312 | additional_includedir="$withval/include" | |
7313 | additional_libdir="$withval/lib" | |
7314 | fi | |
7315 | fi | |
6c7a06a3 | 7316 | |
81ecdfbb RW |
7317 | fi |
7318 | ||
016a3251 DD |
7319 | LIBICONV= |
7320 | LTLIBICONV= | |
7321 | INCICONV= | |
7322 | rpathdirs= | |
7323 | ltrpathdirs= | |
7324 | names_already_handled= | |
7325 | names_next_round='iconv ' | |
7326 | while test -n "$names_next_round"; do | |
7327 | names_this_round="$names_next_round" | |
7328 | names_next_round= | |
7329 | for name in $names_this_round; do | |
7330 | already_handled= | |
7331 | for n in $names_already_handled; do | |
7332 | if test "$n" = "$name"; then | |
7333 | already_handled=yes | |
7334 | break | |
7335 | fi | |
7336 | done | |
7337 | if test -z "$already_handled"; then | |
7338 | names_already_handled="$names_already_handled $name" | |
7339 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7340 | eval value=\"\$HAVE_LIB$uppername\" | |
7341 | if test -n "$value"; then | |
7342 | if test "$value" = yes; then | |
7343 | eval value=\"\$LIB$uppername\" | |
7344 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
7345 | eval value=\"\$LTLIB$uppername\" | |
7346 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
7347 | else | |
7348 | : | |
7349 | fi | |
7350 | else | |
7351 | found_dir= | |
7352 | found_la= | |
7353 | found_so= | |
7354 | found_a= | |
7355 | if test $use_additional = yes; then | |
7356 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7357 | found_dir="$additional_libdir" | |
7358 | found_so="$additional_libdir/lib$name.$shlibext" | |
7359 | if test -f "$additional_libdir/lib$name.la"; then | |
7360 | found_la="$additional_libdir/lib$name.la" | |
7361 | fi | |
7362 | else | |
7363 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7364 | found_dir="$additional_libdir" | |
7365 | found_a="$additional_libdir/lib$name.$libext" | |
7366 | if test -f "$additional_libdir/lib$name.la"; then | |
7367 | found_la="$additional_libdir/lib$name.la" | |
7368 | fi | |
7369 | fi | |
7370 | fi | |
7371 | fi | |
7372 | if test "X$found_dir" = "X"; then | |
7373 | for x in $LDFLAGS $LTLIBICONV; do | |
7374 | ||
7375 | acl_save_prefix="$prefix" | |
7376 | prefix="$acl_final_prefix" | |
7377 | acl_save_exec_prefix="$exec_prefix" | |
7378 | exec_prefix="$acl_final_exec_prefix" | |
7379 | eval x=\"$x\" | |
7380 | exec_prefix="$acl_save_exec_prefix" | |
7381 | prefix="$acl_save_prefix" | |
7382 | ||
7383 | case "$x" in | |
7384 | -L*) | |
7385 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7386 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7387 | found_dir="$dir" | |
7388 | found_so="$dir/lib$name.$shlibext" | |
7389 | if test -f "$dir/lib$name.la"; then | |
7390 | found_la="$dir/lib$name.la" | |
7391 | fi | |
7392 | else | |
7393 | if test -f "$dir/lib$name.$libext"; then | |
7394 | found_dir="$dir" | |
7395 | found_a="$dir/lib$name.$libext" | |
7396 | if test -f "$dir/lib$name.la"; then | |
7397 | found_la="$dir/lib$name.la" | |
7398 | fi | |
7399 | fi | |
7400 | fi | |
7401 | ;; | |
7402 | esac | |
7403 | if test "X$found_dir" != "X"; then | |
7404 | break | |
7405 | fi | |
7406 | done | |
7407 | fi | |
7408 | if test "X$found_dir" != "X"; then | |
7409 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
7410 | if test "X$found_so" != "X"; then | |
7411 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7412 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7413 | else | |
7414 | haveit= | |
7415 | for x in $ltrpathdirs; do | |
7416 | if test "X$x" = "X$found_dir"; then | |
7417 | haveit=yes | |
7418 | break | |
7419 | fi | |
7420 | done | |
7421 | if test -z "$haveit"; then | |
7422 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7423 | fi | |
7424 | if test "$hardcode_direct" = yes; then | |
7425 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7426 | else | |
7427 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7428 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7429 | haveit= | |
7430 | for x in $rpathdirs; do | |
7431 | if test "X$x" = "X$found_dir"; then | |
7432 | haveit=yes | |
7433 | break | |
7434 | fi | |
7435 | done | |
7436 | if test -z "$haveit"; then | |
7437 | rpathdirs="$rpathdirs $found_dir" | |
7438 | fi | |
7439 | else | |
7440 | haveit= | |
7441 | for x in $LDFLAGS $LIBICONV; do | |
7442 | ||
7443 | acl_save_prefix="$prefix" | |
7444 | prefix="$acl_final_prefix" | |
7445 | acl_save_exec_prefix="$exec_prefix" | |
7446 | exec_prefix="$acl_final_exec_prefix" | |
7447 | eval x=\"$x\" | |
7448 | exec_prefix="$acl_save_exec_prefix" | |
7449 | prefix="$acl_save_prefix" | |
7450 | ||
7451 | if test "X$x" = "X-L$found_dir"; then | |
7452 | haveit=yes | |
7453 | break | |
7454 | fi | |
7455 | done | |
7456 | if test -z "$haveit"; then | |
7457 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
7458 | fi | |
7459 | if test "$hardcode_minus_L" != no; then | |
7460 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7461 | else | |
7462 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
7463 | fi | |
7464 | fi | |
7465 | fi | |
7466 | fi | |
7467 | else | |
7468 | if test "X$found_a" != "X"; then | |
7469 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
7470 | else | |
7471 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
7472 | fi | |
7473 | fi | |
7474 | additional_includedir= | |
7475 | case "$found_dir" in | |
7476 | */lib | */lib/) | |
7477 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7478 | additional_includedir="$basedir/include" | |
7479 | ;; | |
7480 | esac | |
7481 | if test "X$additional_includedir" != "X"; then | |
7482 | if test "X$additional_includedir" != "X/usr/include"; then | |
7483 | haveit= | |
7484 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7485 | if test -n "$GCC"; then | |
7486 | case $host_os in | |
7487 | linux*) haveit=yes;; | |
7488 | esac | |
7489 | fi | |
7490 | fi | |
7491 | if test -z "$haveit"; then | |
7492 | for x in $CPPFLAGS $INCICONV; do | |
7493 | ||
7494 | acl_save_prefix="$prefix" | |
7495 | prefix="$acl_final_prefix" | |
7496 | acl_save_exec_prefix="$exec_prefix" | |
7497 | exec_prefix="$acl_final_exec_prefix" | |
7498 | eval x=\"$x\" | |
7499 | exec_prefix="$acl_save_exec_prefix" | |
7500 | prefix="$acl_save_prefix" | |
7501 | ||
7502 | if test "X$x" = "X-I$additional_includedir"; then | |
7503 | haveit=yes | |
7504 | break | |
7505 | fi | |
7506 | done | |
7507 | if test -z "$haveit"; then | |
7508 | if test -d "$additional_includedir"; then | |
7509 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
7510 | fi | |
7511 | fi | |
7512 | fi | |
7513 | fi | |
7514 | fi | |
7515 | if test -n "$found_la"; then | |
7516 | save_libdir="$libdir" | |
7517 | case "$found_la" in | |
7518 | */* | *\\*) . "$found_la" ;; | |
7519 | *) . "./$found_la" ;; | |
7520 | esac | |
7521 | libdir="$save_libdir" | |
7522 | for dep in $dependency_libs; do | |
7523 | case "$dep" in | |
7524 | -L*) | |
7525 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7526 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7527 | haveit= | |
7528 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7529 | if test -n "$GCC"; then | |
7530 | case $host_os in | |
7531 | linux*) haveit=yes;; | |
7532 | esac | |
7533 | fi | |
7534 | fi | |
7535 | if test -z "$haveit"; then | |
7536 | haveit= | |
7537 | for x in $LDFLAGS $LIBICONV; do | |
7538 | ||
7539 | acl_save_prefix="$prefix" | |
7540 | prefix="$acl_final_prefix" | |
7541 | acl_save_exec_prefix="$exec_prefix" | |
7542 | exec_prefix="$acl_final_exec_prefix" | |
7543 | eval x=\"$x\" | |
7544 | exec_prefix="$acl_save_exec_prefix" | |
7545 | prefix="$acl_save_prefix" | |
7546 | ||
7547 | if test "X$x" = "X-L$additional_libdir"; then | |
7548 | haveit=yes | |
7549 | break | |
7550 | fi | |
7551 | done | |
7552 | if test -z "$haveit"; then | |
7553 | if test -d "$additional_libdir"; then | |
7554 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
7555 | fi | |
7556 | fi | |
7557 | haveit= | |
7558 | for x in $LDFLAGS $LTLIBICONV; do | |
7559 | ||
7560 | acl_save_prefix="$prefix" | |
7561 | prefix="$acl_final_prefix" | |
7562 | acl_save_exec_prefix="$exec_prefix" | |
7563 | exec_prefix="$acl_final_exec_prefix" | |
7564 | eval x=\"$x\" | |
7565 | exec_prefix="$acl_save_exec_prefix" | |
7566 | prefix="$acl_save_prefix" | |
7567 | ||
7568 | if test "X$x" = "X-L$additional_libdir"; then | |
7569 | haveit=yes | |
7570 | break | |
7571 | fi | |
7572 | done | |
7573 | if test -z "$haveit"; then | |
7574 | if test -d "$additional_libdir"; then | |
7575 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
7576 | fi | |
7577 | fi | |
7578 | fi | |
7579 | fi | |
7580 | ;; | |
7581 | -R*) | |
7582 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7583 | if test "$enable_rpath" != no; then | |
7584 | haveit= | |
7585 | for x in $rpathdirs; do | |
7586 | if test "X$x" = "X$dir"; then | |
7587 | haveit=yes | |
7588 | break | |
7589 | fi | |
7590 | done | |
7591 | if test -z "$haveit"; then | |
7592 | rpathdirs="$rpathdirs $dir" | |
7593 | fi | |
7594 | haveit= | |
7595 | for x in $ltrpathdirs; do | |
7596 | if test "X$x" = "X$dir"; then | |
7597 | haveit=yes | |
7598 | break | |
7599 | fi | |
7600 | done | |
7601 | if test -z "$haveit"; then | |
7602 | ltrpathdirs="$ltrpathdirs $dir" | |
7603 | fi | |
7604 | fi | |
7605 | ;; | |
7606 | -l*) | |
7607 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7608 | ;; | |
7609 | *.la) | |
7610 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7611 | ;; | |
7612 | *) | |
7613 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
7614 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
7615 | ;; | |
7616 | esac | |
7617 | done | |
7618 | fi | |
7619 | else | |
7620 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
7621 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
7622 | fi | |
7623 | fi | |
7624 | fi | |
7625 | done | |
7626 | done | |
7627 | if test "X$rpathdirs" != "X"; then | |
7628 | if test -n "$hardcode_libdir_separator"; then | |
7629 | alldirs= | |
7630 | for found_dir in $rpathdirs; do | |
7631 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7632 | done | |
7633 | acl_save_libdir="$libdir" | |
7634 | libdir="$alldirs" | |
7635 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7636 | libdir="$acl_save_libdir" | |
7637 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
7638 | else | |
7639 | for found_dir in $rpathdirs; do | |
7640 | acl_save_libdir="$libdir" | |
7641 | libdir="$found_dir" | |
7642 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7643 | libdir="$acl_save_libdir" | |
7644 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
7645 | done | |
7646 | fi | |
7647 | fi | |
7648 | if test "X$ltrpathdirs" != "X"; then | |
7649 | for found_dir in $ltrpathdirs; do | |
7650 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
7651 | done | |
7652 | fi | |
7653 | ||
7654 | ||
7655 | ||
7656 | ||
7657 | ||
6c7a06a3 | 7658 | |
6c7a06a3 | 7659 | |
81ecdfbb RW |
7660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
7661 | $as_echo_n "checking for iconv... " >&6; } | |
7662 | if test "${am_cv_func_iconv+set}" = set; then : | |
7663 | $as_echo_n "(cached) " >&6 | |
d542061a | 7664 | else |
6c7a06a3 TT |
7665 | |
7666 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
7667 | am_cv_lib_iconv=no | |
016a3251 DD |
7668 | am_save_CPPFLAGS="$CPPFLAGS" |
7669 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
7670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 7671 | /* end confdefs.h. */ |
6c7a06a3 TT |
7672 | #include <stdlib.h> |
7673 | #include <iconv.h> | |
d542061a UW |
7674 | int |
7675 | main () | |
7676 | { | |
6c7a06a3 | 7677 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
7678 | iconv(cd,NULL,NULL,NULL,NULL); |
7679 | iconv_close(cd); | |
d542061a UW |
7680 | ; |
7681 | return 0; | |
7682 | } | |
7683 | _ACEOF | |
81ecdfbb | 7684 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 7685 | am_cv_func_iconv=yes |
d542061a | 7686 | fi |
81ecdfbb RW |
7687 | rm -f core conftest.err conftest.$ac_objext \ |
7688 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 7689 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 7690 | |
016a3251 DD |
7691 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
7692 | for _libs in .libs _libs; do | |
7693 | am_save_CPPFLAGS="$CPPFLAGS" | |
7694 | am_save_LIBS="$LIBS" | |
7695 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
7696 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
7697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 7698 | /* end confdefs.h. */ |
6c7a06a3 TT |
7699 | #include <stdlib.h> |
7700 | #include <iconv.h> | |
d542061a UW |
7701 | int |
7702 | main () | |
7703 | { | |
6c7a06a3 | 7704 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
7705 | iconv(cd,NULL,NULL,NULL,NULL); |
7706 | iconv_close(cd); | |
d542061a UW |
7707 | ; |
7708 | return 0; | |
7709 | } | |
7710 | _ACEOF | |
81ecdfbb | 7711 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
7712 | INCICONV="-I../libiconv/include" |
7713 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
7714 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
7715 | am_cv_lib_iconv=yes | |
7716 | am_cv_func_iconv=yes | |
d542061a | 7717 | fi |
81ecdfbb RW |
7718 | rm -f core conftest.err conftest.$ac_objext \ |
7719 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
7720 | CPPFLAGS="$am_save_CPPFLAGS" |
7721 | LIBS="$am_save_LIBS" | |
7722 | if test "$am_cv_func_iconv" = "yes"; then | |
7723 | break | |
7724 | fi | |
7725 | done | |
77f120bf | 7726 | fi |
94ae1714 | 7727 | |
4edb1e84 | 7728 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 7729 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 7730 | am_save_LIBS="$LIBS" |
016a3251 DD |
7731 | CPPFLAGS="$LIBS $INCICONV" |
7732 | LIBS="$LIBS $LIBICONV" | |
81ecdfbb | 7733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7734 | /* end confdefs.h. */ |
6c7a06a3 TT |
7735 | #include <stdlib.h> |
7736 | #include <iconv.h> | |
bec39cab AC |
7737 | int |
7738 | main () | |
7739 | { | |
6c7a06a3 TT |
7740 | iconv_t cd = iconv_open("",""); |
7741 | iconv(cd,NULL,NULL,NULL,NULL); | |
7742 | iconv_close(cd); | |
bec39cab AC |
7743 | ; |
7744 | return 0; | |
7745 | } | |
7746 | _ACEOF | |
81ecdfbb | 7747 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 7748 | am_cv_lib_iconv=yes |
6c7a06a3 | 7749 | am_cv_func_iconv=yes |
627af7ea | 7750 | fi |
81ecdfbb RW |
7751 | rm -f core conftest.err conftest.$ac_objext \ |
7752 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 7753 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 7754 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
7755 | fi |
7756 | ||
7757 | fi | |
81ecdfbb RW |
7758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
7759 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
7760 | if test "$am_cv_func_iconv" = yes; then |
7761 | ||
7762 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 7763 | |
016a3251 | 7764 | fi |
fc3b640d | 7765 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
7766 | |
7767 | for element in $INCICONV; do | |
7768 | haveit= | |
7769 | for x in $CPPFLAGS; do | |
7770 | ||
7771 | acl_save_prefix="$prefix" | |
7772 | prefix="$acl_final_prefix" | |
7773 | acl_save_exec_prefix="$exec_prefix" | |
7774 | exec_prefix="$acl_final_exec_prefix" | |
7775 | eval x=\"$x\" | |
7776 | exec_prefix="$acl_save_exec_prefix" | |
7777 | prefix="$acl_save_prefix" | |
7778 | ||
7779 | if test "X$x" = "X$element"; then | |
7780 | haveit=yes | |
7781 | break | |
7782 | fi | |
7783 | done | |
7784 | if test -z "$haveit"; then | |
7785 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7786 | fi | |
7787 | done | |
7788 | ||
7789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
7790 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
7791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
7792 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 7793 | else |
016a3251 DD |
7794 | LIBICONV= |
7795 | LTLIBICONV= | |
fc3b640d | 7796 | fi |
94ae1714 | 7797 | |
6c7a06a3 | 7798 | |
6c7a06a3 | 7799 | |
016a3251 | 7800 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
7801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
7802 | $as_echo_n "checking for iconv declaration... " >&6; } | |
7803 | if test "${am_cv_proto_iconv+set}" = set; then : | |
7804 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7805 | else |
7806 | ||
81ecdfbb | 7807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7808 | /* end confdefs.h. */ |
7809 | ||
6c7a06a3 TT |
7810 | #include <stdlib.h> |
7811 | #include <iconv.h> | |
7812 | extern | |
b4e70030 | 7813 | #ifdef __cplusplus |
6c7a06a3 | 7814 | "C" |
b4e70030 | 7815 | #endif |
6c7a06a3 TT |
7816 | #if defined(__STDC__) || defined(__cplusplus) |
7817 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
7818 | #else | |
7819 | size_t iconv(); | |
7820 | #endif | |
7821 | ||
b4e70030 JB |
7822 | int |
7823 | main () | |
7824 | { | |
6c7a06a3 | 7825 | |
b4e70030 JB |
7826 | ; |
7827 | return 0; | |
7828 | } | |
7829 | _ACEOF | |
81ecdfbb | 7830 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 7831 | am_cv_proto_iconv_arg1="" |
4e8d927d | 7832 | else |
81ecdfbb | 7833 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 7834 | fi |
81ecdfbb | 7835 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
7836 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
7837 | fi | |
7838 | ||
7839 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 7840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 7841 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
7842 | $as_echo "${ac_t:- |
7843 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
7844 | |
7845 | cat >>confdefs.h <<_ACEOF | |
7846 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
7847 | _ACEOF | |
7848 | ||
7849 | fi | |
6c7a06a3 TT |
7850 | |
7851 | ||
478aac75 DE |
7852 | # GDB may fork/exec the iconv program to get the list of supported character |
7853 | # sets. Allow the user to specify where to find it. | |
7854 | # There are several factors affecting the choice of option name: | |
7855 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
7856 | # the build-time location of libiconv files. | |
7857 | # - The program we need to find is iconv, which comes with glibc. The user | |
7858 | # doesn't necessarily have libiconv installed. Therefore naming this | |
7859 | # --with-libiconv-foo feels wrong. | |
7860 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
7861 | # defined to work on directories not files (though it really doesn't know | |
7862 | # the difference). | |
7863 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
7864 | # with --with-libiconv-prefix. | |
7865 | # Putting these together is why the option name is --with-iconv-bin. | |
7866 | ||
7867 | ||
7868 | # Check whether --with-iconv-bin was given. | |
7869 | if test "${with_iconv_bin+set}" = set; then : | |
7870 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
7871 | ||
7872 | cat >>confdefs.h <<_ACEOF | |
7873 | #define ICONV_BIN "${iconv_bin}" | |
7874 | _ACEOF | |
7875 | ||
7876 | ||
7877 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7878 | if test "x$prefix" = xNONE; then | |
7879 | test_prefix=/usr/local | |
7880 | else | |
7881 | test_prefix=$prefix | |
7882 | fi | |
7883 | else | |
7884 | test_prefix=$exec_prefix | |
7885 | fi | |
7886 | value=0 | |
7887 | case ${iconv_bin} in | |
7888 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7889 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7890 | value=1 | |
7891 | ;; | |
7892 | esac | |
7893 | ||
7894 | cat >>confdefs.h <<_ACEOF | |
7895 | #define ICONV_BIN_RELOCATABLE $value | |
7896 | _ACEOF | |
7897 | ||
7898 | ||
7899 | ||
7900 | fi | |
7901 | ||
7902 | ||
cb01cfba | 7903 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 7904 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
7905 | prefer_curses=yes |
7906 | fi | |
7907 | ||
7908 | curses_found=no | |
7909 | if test x"$prefer_curses" = xyes; then | |
7910 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
7911 | # curses library because the latter might not provide all the | |
7912 | # functionality we need. However, this leads to problems on systems | |
7913 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
7914 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
7915 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
7916 | # a situation. | |
81ecdfbb RW |
7917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
7918 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
7919 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7920 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7921 | else |
7922 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7923 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7924 | /* end confdefs.h. */ |
7925 | ||
81ecdfbb RW |
7926 | /* Override any GCC internal prototype to avoid an error. |
7927 | Use char because int might match the return type of a GCC | |
7928 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7929 | #ifdef __cplusplus |
7930 | extern "C" | |
7931 | #endif | |
6c7a06a3 TT |
7932 | char waddstr (); |
7933 | int | |
7934 | main () | |
7935 | { | |
81ecdfbb | 7936 | return waddstr (); |
6c7a06a3 TT |
7937 | ; |
7938 | return 0; | |
7939 | } | |
7940 | _ACEOF | |
81ecdfbb RW |
7941 | for ac_lib in '' ncurses cursesX curses; do |
7942 | if test -z "$ac_lib"; then | |
7943 | ac_res="none required" | |
7944 | else | |
7945 | ac_res=-l$ac_lib | |
7946 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7947 | fi | |
7948 | if ac_fn_c_try_link "$LINENO"; then : | |
7949 | ac_cv_search_waddstr=$ac_res | |
7950 | fi | |
7951 | rm -f core conftest.err conftest.$ac_objext \ | |
7952 | conftest$ac_exeext | |
7953 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7954 | break | |
7955 | fi | |
7956 | done | |
7957 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7958 | ||
6c7a06a3 | 7959 | else |
81ecdfbb RW |
7960 | ac_cv_search_waddstr=no |
7961 | fi | |
7962 | rm conftest.$ac_ext | |
7963 | LIBS=$ac_func_search_save_LIBS | |
7964 | fi | |
7965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
7966 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
7967 | ac_res=$ac_cv_search_waddstr | |
7968 | if test "$ac_res" != no; then : | |
7969 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
7970 | |
7971 | fi | |
7972 | ||
7973 | ||
cb01cfba JB |
7974 | if test "$ac_cv_search_waddstr" != no; then |
7975 | curses_found=yes | |
7976 | fi | |
7977 | fi | |
7978 | ||
7979 | # Check whether we should enable the TUI, but only do so if we really | |
7980 | # can. | |
7981 | if test x"$enable_tui" != xno; then | |
7982 | if test -d $srcdir/tui; then | |
7983 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
7984 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
7985 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
7986 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
7987 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
7988 | else |
7989 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 7990 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 7991 | else |
81ecdfbb RW |
7992 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
7993 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
7994 | fi |
7995 | fi | |
7996 | fi | |
7997 | fi | |
7998 | ||
7999 | # Since GDB uses Readline, we need termcap functionality. In many | |
8000 | # cases this will be provided by the curses library, but some systems | |
8001 | # have a seperate termcap library, or no curses library at all. | |
8002 | ||
8003 | case $host_os in | |
8004 | cygwin*) | |
8005 | if test -d $srcdir/libtermcap; then | |
8006 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8007 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8008 | fi ;; | |
8009 | go32* | *djgpp*) | |
8010 | ac_cv_search_tgetent="none required" | |
8011 | ;; | |
6c7a06a3 TT |
8012 | esac |
8013 | ||
8014 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8016 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
8017 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8018 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8019 | else |
8020 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8022 | /* end confdefs.h. */ |
8023 | ||
81ecdfbb RW |
8024 | /* Override any GCC internal prototype to avoid an error. |
8025 | Use char because int might match the return type of a GCC | |
8026 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8027 | #ifdef __cplusplus |
8028 | extern "C" | |
8029 | #endif | |
6c7a06a3 TT |
8030 | char tgetent (); |
8031 | int | |
8032 | main () | |
8033 | { | |
81ecdfbb | 8034 | return tgetent (); |
6c7a06a3 TT |
8035 | ; |
8036 | return 0; | |
8037 | } | |
8038 | _ACEOF | |
81ecdfbb RW |
8039 | for ac_lib in '' termcap tinfo curses ncurses; do |
8040 | if test -z "$ac_lib"; then | |
8041 | ac_res="none required" | |
8042 | else | |
8043 | ac_res=-l$ac_lib | |
6c7a06a3 | 8044 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8045 | fi |
8046 | if ac_fn_c_try_link "$LINENO"; then : | |
8047 | ac_cv_search_tgetent=$ac_res | |
8048 | fi | |
8049 | rm -f core conftest.err conftest.$ac_objext \ | |
8050 | conftest$ac_exeext | |
8051 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8052 | break | |
8053 | fi | |
8054 | done | |
8055 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 8056 | |
6c7a06a3 | 8057 | else |
81ecdfbb | 8058 | ac_cv_search_tgetent=no |
6c7a06a3 | 8059 | fi |
81ecdfbb | 8060 | rm conftest.$ac_ext |
6c7a06a3 TT |
8061 | LIBS=$ac_func_search_save_LIBS |
8062 | fi | |
81ecdfbb RW |
8063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
8064 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
8065 | ac_res=$ac_cv_search_tgetent | |
8066 | if test "$ac_res" != no; then : | |
8067 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 8068 | |
06825bd1 MK |
8069 | fi |
8070 | ||
06825bd1 | 8071 | |
bec39cab | 8072 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 8073 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
8074 | fi |
8075 | ||
3841debe | 8076 | |
81ecdfbb RW |
8077 | # Check whether --with-system-readline was given. |
8078 | if test "${with_system_readline+set}" = set; then : | |
8079 | withval=$with_system_readline; | |
8080 | fi | |
6a30b0a5 | 8081 | |
6a30b0a5 AS |
8082 | |
8083 | if test "$with_system_readline" = yes; then | |
8084 | READLINE=-lreadline | |
8085 | READLINE_DEPS= | |
8086 | READLINE_CFLAGS= | |
39037522 | 8087 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
8088 | else |
8089 | READLINE='$(READLINE_DIR)/libreadline.a' | |
8090 | READLINE_DEPS='$(READLINE)' | |
8091 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 8092 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
8093 | fi |
8094 | ||
8095 | ||
8096 | ||
8097 | ||
8098 | ||
f997c383 SD |
8099 | # Generate jit-reader.h |
8100 | ||
8101 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
8102 | TARGET_PTR= | |
8103 | ||
8104 | # The cast to long int works around a bug in the HP C Compiler | |
8105 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8106 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8107 | # This bug is HP SR number 8606223364. | |
8108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
8109 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
8110 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
8111 | $as_echo_n "(cached) " >&6 | |
8112 | else | |
8113 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
8114 | ||
8115 | else | |
8116 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
8117 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8118 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8119 | { as_fn_set_status 77 | |
8120 | as_fn_error "cannot compute sizeof (unsigned long long) | |
8121 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8122 | else | |
8123 | ac_cv_sizeof_unsigned_long_long=0 | |
8124 | fi | |
8125 | fi | |
8126 | ||
8127 | fi | |
8128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
8129 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
8130 | ||
8131 | ||
8132 | ||
8133 | cat >>confdefs.h <<_ACEOF | |
8134 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
8135 | _ACEOF | |
8136 | ||
8137 | ||
8138 | # The cast to long int works around a bug in the HP C Compiler | |
8139 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8140 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8141 | # This bug is HP SR number 8606223364. | |
8142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
8143 | $as_echo_n "checking size of unsigned long... " >&6; } | |
8144 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
8145 | $as_echo_n "(cached) " >&6 | |
8146 | else | |
8147 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
8148 | ||
8149 | else | |
8150 | if test "$ac_cv_type_unsigned_long" = yes; then | |
8151 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8152 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8153 | { as_fn_set_status 77 | |
8154 | as_fn_error "cannot compute sizeof (unsigned long) | |
8155 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8156 | else | |
8157 | ac_cv_sizeof_unsigned_long=0 | |
8158 | fi | |
8159 | fi | |
8160 | ||
8161 | fi | |
8162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
8163 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
8164 | ||
8165 | ||
8166 | ||
8167 | cat >>confdefs.h <<_ACEOF | |
8168 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
8169 | _ACEOF | |
8170 | ||
8171 | ||
8172 | # The cast to long int works around a bug in the HP C Compiler | |
8173 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8174 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8175 | # This bug is HP SR number 8606223364. | |
8176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
8177 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
8178 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
8179 | $as_echo_n "(cached) " >&6 | |
8180 | else | |
8181 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
8182 | ||
8183 | else | |
8184 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
8185 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8186 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8187 | { as_fn_set_status 77 | |
8188 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
8189 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8190 | else | |
8191 | ac_cv_sizeof_unsigned___int128=0 | |
8192 | fi | |
8193 | fi | |
8194 | ||
8195 | fi | |
8196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
8197 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
8198 | ||
8199 | ||
8200 | ||
8201 | cat >>confdefs.h <<_ACEOF | |
8202 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
8203 | _ACEOF | |
8204 | ||
8205 | ||
8206 | ||
8207 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
8208 | TARGET_PTR="unsigned long" | |
8209 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
8210 | TARGET_PTR="unsigned long long" | |
8211 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
8212 | TARGET_PTR="unsigned __int128" | |
8213 | else | |
8214 | TARGET_PTR="unsigned long" | |
8215 | fi | |
8216 | ||
8217 | ||
8218 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
8219 | ||
8220 | ||
a2d08b9e SD |
8221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
8222 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
8223 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
8224 | $as_echo_n "(cached) " >&6 | |
8225 | else | |
8226 | ac_func_search_save_LIBS=$LIBS | |
8227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8228 | /* end confdefs.h. */ | |
8229 | ||
8230 | /* Override any GCC internal prototype to avoid an error. | |
8231 | Use char because int might match the return type of a GCC | |
8232 | builtin and then its argument prototype would still apply. */ | |
8233 | #ifdef __cplusplus | |
8234 | extern "C" | |
8235 | #endif | |
8236 | char dlopen (); | |
8237 | int | |
8238 | main () | |
8239 | { | |
8240 | return dlopen (); | |
8241 | ; | |
8242 | return 0; | |
8243 | } | |
8244 | _ACEOF | |
8245 | for ac_lib in '' dl; do | |
8246 | if test -z "$ac_lib"; then | |
8247 | ac_res="none required" | |
8248 | else | |
8249 | ac_res=-l$ac_lib | |
8250 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8251 | fi | |
8252 | if ac_fn_c_try_link "$LINENO"; then : | |
8253 | ac_cv_search_dlopen=$ac_res | |
8254 | fi | |
8255 | rm -f core conftest.err conftest.$ac_objext \ | |
8256 | conftest$ac_exeext | |
8257 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
8258 | break | |
8259 | fi | |
8260 | done | |
8261 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
8262 | ||
8263 | else | |
8264 | ac_cv_search_dlopen=no | |
8265 | fi | |
8266 | rm conftest.$ac_ext | |
8267 | LIBS=$ac_func_search_save_LIBS | |
8268 | fi | |
8269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
8270 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
8271 | ac_res=$ac_cv_search_dlopen | |
8272 | if test "$ac_res" != no; then : | |
8273 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8274 | ||
8275 | fi | |
8276 | ||
8277 | ||
39037522 | 8278 | |
b8e0a31c SD |
8279 | |
8280 | # Check whether --with-jit-reader-dir was given. | |
8281 | if test "${with_jit_reader_dir+set}" = set; then : | |
8282 | withval=$with_jit_reader_dir; | |
8283 | JIT_READER_DIR=$withval | |
8284 | else | |
8285 | JIT_READER_DIR=${libdir}/gdb | |
8286 | fi | |
8287 | ||
8288 | ||
8289 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
8290 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8291 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
8292 | ac_define_dir=`eval echo $ac_define_dir` | |
8293 | ||
8294 | cat >>confdefs.h <<_ACEOF | |
8295 | #define JIT_READER_DIR "$ac_define_dir" | |
8296 | _ACEOF | |
8297 | ||
8298 | ||
8299 | ||
8300 | ||
8301 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8302 | if test "x$prefix" = xNONE; then | |
8303 | test_prefix=/usr/local | |
8304 | else | |
8305 | test_prefix=$prefix | |
8306 | fi | |
8307 | else | |
8308 | test_prefix=$exec_prefix | |
8309 | fi | |
8310 | value=0 | |
8311 | case ${ac_define_dir} in | |
8312 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8313 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8314 | value=1 | |
8315 | ;; | |
8316 | esac | |
8317 | ||
8318 | cat >>confdefs.h <<_ACEOF | |
8319 | #define JIT_READER_DIR_RELOCATABLE $value | |
8320 | _ACEOF | |
8321 | ||
8322 | ||
8323 | ||
8324 | ||
8325 | ||
81ecdfbb RW |
8326 | # Check whether --with-expat was given. |
8327 | if test "${with_expat+set}" = set; then : | |
8328 | withval=$with_expat; | |
5c39566f DJ |
8329 | else |
8330 | with_expat=auto | |
81ecdfbb RW |
8331 | fi |
8332 | ||
8333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
8334 | $as_echo_n "checking whether to use expat... " >&6; } | |
8335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
8336 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
8337 | |
8338 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
8339 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
8340 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
8341 | HAVE_LIBEXPAT=no |
8342 | else | |
8343 | ||
3841debe DJ |
8344 | |
8345 | ||
8346 | ||
8347 | ||
8348 | ||
8349 | ||
8350 | ||
8351 | use_additional=yes | |
8352 | ||
8353 | acl_save_prefix="$prefix" | |
8354 | prefix="$acl_final_prefix" | |
8355 | acl_save_exec_prefix="$exec_prefix" | |
8356 | exec_prefix="$acl_final_exec_prefix" | |
8357 | ||
8358 | eval additional_includedir=\"$includedir\" | |
8359 | eval additional_libdir=\"$libdir\" | |
8360 | ||
8361 | exec_prefix="$acl_save_exec_prefix" | |
8362 | prefix="$acl_save_prefix" | |
8363 | ||
8364 | ||
81ecdfbb RW |
8365 | # Check whether --with-libexpat-prefix was given. |
8366 | if test "${with_libexpat_prefix+set}" = set; then : | |
8367 | withval=$with_libexpat_prefix; | |
3841debe DJ |
8368 | if test "X$withval" = "Xno"; then |
8369 | use_additional=no | |
8370 | else | |
8371 | if test "X$withval" = "X"; then | |
8372 | ||
8373 | acl_save_prefix="$prefix" | |
8374 | prefix="$acl_final_prefix" | |
8375 | acl_save_exec_prefix="$exec_prefix" | |
8376 | exec_prefix="$acl_final_exec_prefix" | |
8377 | ||
8378 | eval additional_includedir=\"$includedir\" | |
8379 | eval additional_libdir=\"$libdir\" | |
8380 | ||
8381 | exec_prefix="$acl_save_exec_prefix" | |
8382 | prefix="$acl_save_prefix" | |
8383 | ||
8384 | else | |
8385 | additional_includedir="$withval/include" | |
8386 | additional_libdir="$withval/lib" | |
8387 | fi | |
8388 | fi | |
8389 | ||
81ecdfbb RW |
8390 | fi |
8391 | ||
3841debe DJ |
8392 | LIBEXPAT= |
8393 | LTLIBEXPAT= | |
8394 | INCEXPAT= | |
8395 | rpathdirs= | |
8396 | ltrpathdirs= | |
8397 | names_already_handled= | |
8398 | names_next_round='expat ' | |
8399 | while test -n "$names_next_round"; do | |
8400 | names_this_round="$names_next_round" | |
8401 | names_next_round= | |
8402 | for name in $names_this_round; do | |
8403 | already_handled= | |
8404 | for n in $names_already_handled; do | |
8405 | if test "$n" = "$name"; then | |
8406 | already_handled=yes | |
8407 | break | |
8408 | fi | |
8409 | done | |
8410 | if test -z "$already_handled"; then | |
8411 | names_already_handled="$names_already_handled $name" | |
8412 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8413 | eval value=\"\$HAVE_LIB$uppername\" | |
8414 | if test -n "$value"; then | |
8415 | if test "$value" = yes; then | |
8416 | eval value=\"\$LIB$uppername\" | |
8417 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
8418 | eval value=\"\$LTLIB$uppername\" | |
8419 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
8420 | else | |
8421 | : | |
8422 | fi | |
8423 | else | |
8424 | found_dir= | |
8425 | found_la= | |
8426 | found_so= | |
8427 | found_a= | |
8428 | if test $use_additional = yes; then | |
8429 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8430 | found_dir="$additional_libdir" | |
8431 | found_so="$additional_libdir/lib$name.$shlibext" | |
8432 | if test -f "$additional_libdir/lib$name.la"; then | |
8433 | found_la="$additional_libdir/lib$name.la" | |
8434 | fi | |
8435 | else | |
8436 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8437 | found_dir="$additional_libdir" | |
8438 | found_a="$additional_libdir/lib$name.$libext" | |
8439 | if test -f "$additional_libdir/lib$name.la"; then | |
8440 | found_la="$additional_libdir/lib$name.la" | |
8441 | fi | |
8442 | fi | |
8443 | fi | |
8444 | fi | |
8445 | if test "X$found_dir" = "X"; then | |
8446 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8447 | ||
8448 | acl_save_prefix="$prefix" | |
8449 | prefix="$acl_final_prefix" | |
8450 | acl_save_exec_prefix="$exec_prefix" | |
8451 | exec_prefix="$acl_final_exec_prefix" | |
8452 | eval x=\"$x\" | |
8453 | exec_prefix="$acl_save_exec_prefix" | |
8454 | prefix="$acl_save_prefix" | |
8455 | ||
8456 | case "$x" in | |
8457 | -L*) | |
8458 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8459 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8460 | found_dir="$dir" | |
8461 | found_so="$dir/lib$name.$shlibext" | |
8462 | if test -f "$dir/lib$name.la"; then | |
8463 | found_la="$dir/lib$name.la" | |
8464 | fi | |
8465 | else | |
8466 | if test -f "$dir/lib$name.$libext"; then | |
8467 | found_dir="$dir" | |
8468 | found_a="$dir/lib$name.$libext" | |
8469 | if test -f "$dir/lib$name.la"; then | |
8470 | found_la="$dir/lib$name.la" | |
8471 | fi | |
8472 | fi | |
8473 | fi | |
8474 | ;; | |
8475 | esac | |
8476 | if test "X$found_dir" != "X"; then | |
8477 | break | |
8478 | fi | |
8479 | done | |
8480 | fi | |
8481 | if test "X$found_dir" != "X"; then | |
8482 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
8483 | if test "X$found_so" != "X"; then | |
8484 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8485 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8486 | else | |
8487 | haveit= | |
8488 | for x in $ltrpathdirs; do | |
8489 | if test "X$x" = "X$found_dir"; then | |
8490 | haveit=yes | |
8491 | break | |
8492 | fi | |
8493 | done | |
8494 | if test -z "$haveit"; then | |
8495 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8496 | fi | |
8497 | if test "$hardcode_direct" = yes; then | |
8498 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8499 | else | |
8500 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8501 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8502 | haveit= | |
8503 | for x in $rpathdirs; do | |
8504 | if test "X$x" = "X$found_dir"; then | |
8505 | haveit=yes | |
8506 | break | |
8507 | fi | |
8508 | done | |
8509 | if test -z "$haveit"; then | |
8510 | rpathdirs="$rpathdirs $found_dir" | |
8511 | fi | |
8512 | else | |
8513 | haveit= | |
8514 | for x in $LDFLAGS $LIBEXPAT; do | |
8515 | ||
8516 | acl_save_prefix="$prefix" | |
8517 | prefix="$acl_final_prefix" | |
8518 | acl_save_exec_prefix="$exec_prefix" | |
8519 | exec_prefix="$acl_final_exec_prefix" | |
8520 | eval x=\"$x\" | |
8521 | exec_prefix="$acl_save_exec_prefix" | |
8522 | prefix="$acl_save_prefix" | |
8523 | ||
8524 | if test "X$x" = "X-L$found_dir"; then | |
8525 | haveit=yes | |
8526 | break | |
8527 | fi | |
8528 | done | |
8529 | if test -z "$haveit"; then | |
8530 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
8531 | fi | |
8532 | if test "$hardcode_minus_L" != no; then | |
8533 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8534 | else | |
8535 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8536 | fi | |
8537 | fi | |
8538 | fi | |
8539 | fi | |
8540 | else | |
8541 | if test "X$found_a" != "X"; then | |
8542 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
8543 | else | |
8544 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
8545 | fi | |
8546 | fi | |
8547 | additional_includedir= | |
8548 | case "$found_dir" in | |
8549 | */lib | */lib/) | |
8550 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8551 | additional_includedir="$basedir/include" | |
8552 | ;; | |
8553 | esac | |
8554 | if test "X$additional_includedir" != "X"; then | |
8555 | if test "X$additional_includedir" != "X/usr/include"; then | |
8556 | haveit= | |
8557 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8558 | if test -n "$GCC"; then | |
8559 | case $host_os in | |
8560 | linux*) haveit=yes;; | |
8561 | esac | |
8562 | fi | |
8563 | fi | |
8564 | if test -z "$haveit"; then | |
8565 | for x in $CPPFLAGS $INCEXPAT; do | |
8566 | ||
8567 | acl_save_prefix="$prefix" | |
8568 | prefix="$acl_final_prefix" | |
8569 | acl_save_exec_prefix="$exec_prefix" | |
8570 | exec_prefix="$acl_final_exec_prefix" | |
8571 | eval x=\"$x\" | |
8572 | exec_prefix="$acl_save_exec_prefix" | |
8573 | prefix="$acl_save_prefix" | |
8574 | ||
8575 | if test "X$x" = "X-I$additional_includedir"; then | |
8576 | haveit=yes | |
8577 | break | |
8578 | fi | |
8579 | done | |
8580 | if test -z "$haveit"; then | |
8581 | if test -d "$additional_includedir"; then | |
8582 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
8583 | fi | |
8584 | fi | |
8585 | fi | |
8586 | fi | |
8587 | fi | |
8588 | if test -n "$found_la"; then | |
8589 | save_libdir="$libdir" | |
8590 | case "$found_la" in | |
8591 | */* | *\\*) . "$found_la" ;; | |
8592 | *) . "./$found_la" ;; | |
8593 | esac | |
8594 | libdir="$save_libdir" | |
8595 | for dep in $dependency_libs; do | |
8596 | case "$dep" in | |
8597 | -L*) | |
8598 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8599 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8600 | haveit= | |
8601 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8602 | if test -n "$GCC"; then | |
8603 | case $host_os in | |
8604 | linux*) haveit=yes;; | |
8605 | esac | |
8606 | fi | |
8607 | fi | |
8608 | if test -z "$haveit"; then | |
8609 | haveit= | |
8610 | for x in $LDFLAGS $LIBEXPAT; do | |
8611 | ||
8612 | acl_save_prefix="$prefix" | |
8613 | prefix="$acl_final_prefix" | |
8614 | acl_save_exec_prefix="$exec_prefix" | |
8615 | exec_prefix="$acl_final_exec_prefix" | |
8616 | eval x=\"$x\" | |
8617 | exec_prefix="$acl_save_exec_prefix" | |
8618 | prefix="$acl_save_prefix" | |
8619 | ||
8620 | if test "X$x" = "X-L$additional_libdir"; then | |
8621 | haveit=yes | |
8622 | break | |
8623 | fi | |
8624 | done | |
8625 | if test -z "$haveit"; then | |
8626 | if test -d "$additional_libdir"; then | |
8627 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
8628 | fi | |
8629 | fi | |
8630 | haveit= | |
8631 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8632 | ||
8633 | acl_save_prefix="$prefix" | |
8634 | prefix="$acl_final_prefix" | |
8635 | acl_save_exec_prefix="$exec_prefix" | |
8636 | exec_prefix="$acl_final_exec_prefix" | |
8637 | eval x=\"$x\" | |
8638 | exec_prefix="$acl_save_exec_prefix" | |
8639 | prefix="$acl_save_prefix" | |
8640 | ||
8641 | if test "X$x" = "X-L$additional_libdir"; then | |
8642 | haveit=yes | |
8643 | break | |
8644 | fi | |
8645 | done | |
8646 | if test -z "$haveit"; then | |
8647 | if test -d "$additional_libdir"; then | |
8648 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
8649 | fi | |
8650 | fi | |
8651 | fi | |
8652 | fi | |
8653 | ;; | |
8654 | -R*) | |
8655 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8656 | if test "$enable_rpath" != no; then | |
8657 | haveit= | |
8658 | for x in $rpathdirs; do | |
8659 | if test "X$x" = "X$dir"; then | |
8660 | haveit=yes | |
8661 | break | |
8662 | fi | |
8663 | done | |
8664 | if test -z "$haveit"; then | |
8665 | rpathdirs="$rpathdirs $dir" | |
8666 | fi | |
8667 | haveit= | |
8668 | for x in $ltrpathdirs; do | |
8669 | if test "X$x" = "X$dir"; then | |
8670 | haveit=yes | |
8671 | break | |
8672 | fi | |
8673 | done | |
8674 | if test -z "$haveit"; then | |
8675 | ltrpathdirs="$ltrpathdirs $dir" | |
8676 | fi | |
8677 | fi | |
8678 | ;; | |
8679 | -l*) | |
8680 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8681 | ;; | |
8682 | *.la) | |
8683 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8684 | ;; | |
8685 | *) | |
8686 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
8687 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
8688 | ;; | |
81ecdfbb RW |
8689 | esac |
8690 | done | |
8691 | fi | |
8692 | else | |
8693 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8694 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
8695 | fi | |
8696 | fi | |
8697 | fi | |
8698 | done | |
8699 | done | |
8700 | if test "X$rpathdirs" != "X"; then | |
8701 | if test -n "$hardcode_libdir_separator"; then | |
8702 | alldirs= | |
8703 | for found_dir in $rpathdirs; do | |
8704 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8705 | done | |
8706 | acl_save_libdir="$libdir" | |
8707 | libdir="$alldirs" | |
8708 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8709 | libdir="$acl_save_libdir" | |
8710 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8711 | else | |
8712 | for found_dir in $rpathdirs; do | |
8713 | acl_save_libdir="$libdir" | |
8714 | libdir="$found_dir" | |
8715 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8716 | libdir="$acl_save_libdir" | |
8717 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8718 | done | |
8719 | fi | |
8720 | fi | |
8721 | if test "X$ltrpathdirs" != "X"; then | |
8722 | for found_dir in $ltrpathdirs; do | |
8723 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
8724 | done | |
8725 | fi | |
a9322a30 TT |
8726 | |
8727 | ||
81ecdfbb | 8728 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 8729 | |
81ecdfbb RW |
8730 | for element in $INCEXPAT; do |
8731 | haveit= | |
8732 | for x in $CPPFLAGS; do | |
a9322a30 | 8733 | |
81ecdfbb RW |
8734 | acl_save_prefix="$prefix" |
8735 | prefix="$acl_final_prefix" | |
8736 | acl_save_exec_prefix="$exec_prefix" | |
8737 | exec_prefix="$acl_final_exec_prefix" | |
8738 | eval x=\"$x\" | |
8739 | exec_prefix="$acl_save_exec_prefix" | |
8740 | prefix="$acl_save_prefix" | |
a8111142 | 8741 | |
81ecdfbb RW |
8742 | if test "X$x" = "X$element"; then |
8743 | haveit=yes | |
8744 | break | |
8745 | fi | |
8746 | done | |
8747 | if test -z "$haveit"; then | |
8748 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8749 | fi | |
8750 | done | |
a9322a30 TT |
8751 | |
8752 | ||
81ecdfbb RW |
8753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
8754 | $as_echo_n "checking for libexpat... " >&6; } | |
8755 | if test "${ac_cv_libexpat+set}" = set; then : | |
8756 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8757 | else |
bec39cab | 8758 | |
81ecdfbb RW |
8759 | ac_save_LIBS="$LIBS" |
8760 | LIBS="$LIBS $LIBEXPAT" | |
8761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8762 | /* end confdefs.h. */ |
81ecdfbb RW |
8763 | #include "expat.h" |
8764 | int | |
8765 | main () | |
8766 | { | |
8767 | XML_Parser p = XML_ParserCreate (0); | |
8768 | ; | |
8769 | return 0; | |
8770 | } | |
bec39cab | 8771 | _ACEOF |
81ecdfbb RW |
8772 | if ac_fn_c_try_link "$LINENO"; then : |
8773 | ac_cv_libexpat=yes | |
c906108c | 8774 | else |
81ecdfbb | 8775 | ac_cv_libexpat=no |
bec39cab | 8776 | fi |
81ecdfbb RW |
8777 | rm -f core conftest.err conftest.$ac_objext \ |
8778 | conftest$ac_exeext conftest.$ac_ext | |
8779 | LIBS="$ac_save_LIBS" | |
c906108c | 8780 | |
95ca63c4 | 8781 | fi |
81ecdfbb RW |
8782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
8783 | $as_echo "$ac_cv_libexpat" >&6; } | |
8784 | if test "$ac_cv_libexpat" = yes; then | |
8785 | HAVE_LIBEXPAT=yes | |
bec39cab | 8786 | |
81ecdfbb | 8787 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 8788 | |
81ecdfbb RW |
8789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
8790 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
8792 | $as_echo "$LIBEXPAT" >&6; } | |
8793 | else | |
8794 | HAVE_LIBEXPAT=no | |
8795 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8796 | LIBEXPAT= | |
8797 | LTLIBEXPAT= | |
8798 | fi | |
95ca63c4 CF |
8799 | |
8800 | ||
8801 | ||
7cb9022a MK |
8802 | |
8803 | ||
bec39cab | 8804 | |
81ecdfbb RW |
8805 | if test "$HAVE_LIBEXPAT" != yes; then |
8806 | if test "$with_expat" = yes; then | |
8807 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
8808 | else | |
8809 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
8810 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
8811 | fi | |
8812 | else | |
8813 | save_LIBS=$LIBS | |
8814 | LIBS="$LIBS $LIBEXPAT" | |
8815 | for ac_func in XML_StopParser | |
8816 | do : | |
8817 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
8818 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 8819 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8820 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 8821 | _ACEOF |
95ca63c4 | 8822 | |
bec39cab | 8823 | fi |
bec39cab | 8824 | done |
95ca63c4 | 8825 | |
81ecdfbb RW |
8826 | LIBS=$save_LIBS |
8827 | fi | |
a9322a30 TT |
8828 | fi |
8829 | ||
d344e670 DE |
8830 | # --------------------- # |
8831 | # Check for libpython. # | |
8832 | # --------------------- # | |
8833 | ||
a9322a30 | 8834 | |
a9322a30 TT |
8835 | |
8836 | ||
ec685c5e | 8837 | |
0c4a4063 | 8838 | |
81ecdfbb RW |
8839 | # Check whether --with-python was given. |
8840 | if test "${with_python+set}" = set; then : | |
8841 | withval=$with_python; | |
bec39cab | 8842 | else |
81ecdfbb | 8843 | with_python=auto |
bec39cab | 8844 | fi |
bec39cab | 8845 | |
81ecdfbb RW |
8846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
8847 | $as_echo_n "checking whether to use python... " >&6; } | |
8848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
8849 | $as_echo "$with_python" >&6; } | |
9a156167 | 8850 | |
81ecdfbb RW |
8851 | if test "${with_python}" = no; then |
8852 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
8853 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
8854 | have_libpython=no | |
bec39cab | 8855 | else |
81ecdfbb | 8856 | case "${with_python}" in |
8c85a4e2 | 8857 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
8858 | if test -d ${with_python}; then |
8859 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 8860 | python_prog="${with_python}/bin/python" |
0c4a4063 | 8861 | python_prefix= |
9c4ea6c5 JB |
8862 | # If python does not exit ${with_python}/bin, then try in |
8863 | # ${with_python}. On Windows/MinGW, this is where the Python | |
8864 | # executable is. | |
8865 | if test ! -x "${python_prog}"; then | |
8866 | python_prog="${with_python}/python" | |
8867 | python_prefix= | |
8868 | fi | |
e7a30f46 | 8869 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8870 | # Fall back to gdb 7.0/7.1 behaviour. |
8871 | python_prog=missing | |
0c4a4063 | 8872 | python_prefix=${with_python} |
ec685c5e | 8873 | fi |
e7a30f46 | 8874 | elif test -x "${with_python}"; then |
ec685c5e DE |
8875 | # While we can't run python compiled for $host (unless host == build), |
8876 | # the user could write a script that provides the needed information, | |
8877 | # so we support that. | |
ec685c5e | 8878 | python_prog=${with_python} |
0c4a4063 | 8879 | python_prefix= |
ec685c5e DE |
8880 | else |
8881 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8882 | fi | |
81ecdfbb | 8883 | ;; |
ec685c5e DE |
8884 | */*) |
8885 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8886 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8887 | ;; | |
ec685c5e DE |
8888 | *) |
8889 | # The user has either specified auto, yes, or the name of the python | |
8890 | # program assumed to be in $PATH. | |
8891 | python_prefix= | |
8892 | case "${with_python}" in | |
8893 | yes | auto) | |
8894 | if test ${build} = ${host}; then | |
8895 | # Extract the first word of "python", so it can be a program name with args. | |
8896 | set dummy python; ac_word=$2 | |
8897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8898 | $as_echo_n "checking for $ac_word... " >&6; } | |
8899 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8900 | $as_echo_n "(cached) " >&6 | |
8901 | else | |
8902 | case $python_prog_path in | |
8903 | [\\/]* | ?:[\\/]*) | |
8904 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8905 | ;; | |
8906 | *) | |
8907 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8908 | for as_dir in $PATH | |
8909 | do | |
8910 | IFS=$as_save_IFS | |
8911 | test -z "$as_dir" && as_dir=. | |
8912 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8913 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8914 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8915 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8916 | break 2 | |
8917 | fi | |
8918 | done | |
8919 | done | |
8920 | IFS=$as_save_IFS | |
8921 | ||
8922 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8923 | ;; | |
8924 | esac | |
8925 | fi | |
8926 | python_prog_path=$ac_cv_path_python_prog_path | |
8927 | if test -n "$python_prog_path"; then | |
8928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8929 | $as_echo "$python_prog_path" >&6; } | |
8930 | else | |
8931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8932 | $as_echo "no" >&6; } | |
8933 | fi | |
8934 | ||
8935 | ||
8936 | if test "${python_prog_path}" = missing; then | |
8937 | python_prog=missing | |
8938 | else | |
8939 | python_prog=${python_prog_path} | |
8940 | fi | |
8941 | else | |
8942 | # Not much we can do except assume the cross-compiler will find the | |
8943 | # right files. | |
8944 | python_prog=missing | |
8945 | fi | |
8946 | ;; | |
8947 | *) | |
8948 | # While we can't run python compiled for $host (unless host == build), | |
8949 | # the user could write a script that provides the needed information, | |
8950 | # so we support that. | |
8951 | python_prog="${with_python}" | |
8952 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8953 | set dummy ${python_prog}; ac_word=$2 | |
8954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8955 | $as_echo_n "checking for $ac_word... " >&6; } | |
8956 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8957 | $as_echo_n "(cached) " >&6 | |
8958 | else | |
8959 | case $python_prog_path in | |
8960 | [\\/]* | ?:[\\/]*) | |
8961 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8962 | ;; | |
8963 | *) | |
8964 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8965 | for as_dir in $PATH | |
8966 | do | |
8967 | IFS=$as_save_IFS | |
8968 | test -z "$as_dir" && as_dir=. | |
8969 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8970 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8971 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8972 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8973 | break 2 | |
8974 | fi | |
8975 | done | |
8976 | done | |
8977 | IFS=$as_save_IFS | |
8978 | ||
8979 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8980 | ;; | |
8981 | esac | |
8982 | fi | |
8983 | python_prog_path=$ac_cv_path_python_prog_path | |
8984 | if test -n "$python_prog_path"; then | |
8985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8986 | $as_echo "$python_prog_path" >&6; } | |
8987 | else | |
8988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8989 | $as_echo "no" >&6; } | |
8990 | fi | |
8991 | ||
8992 | ||
8993 | if test "${python_prog_path}" = missing; then | |
8994 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8995 | fi | |
8996 | ;; | |
8997 | esac | |
81ecdfbb RW |
8998 | esac |
8999 | ||
ec685c5e | 9000 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
9001 | # We have a python program to use, but it may be too old. |
9002 | # Don't flag an error for --with-python=auto (the default). | |
9003 | have_python_config=yes | |
ec685c5e DE |
9004 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
9005 | if test $? != 0; then | |
e7a30f46 DE |
9006 | have_python_config=failed |
9007 | if test "${with_python}" != auto; then | |
9008 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
9009 | fi | |
ec685c5e DE |
9010 | fi |
9011 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
9012 | if test $? != 0; then | |
e7a30f46 DE |
9013 | have_python_config=failed |
9014 | if test "${with_python}" != auto; then | |
9015 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
9016 | fi | |
ec685c5e | 9017 | fi |
0c4a4063 DE |
9018 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
9019 | if test $? != 0; then | |
e7a30f46 DE |
9020 | have_python_config=failed |
9021 | if test "${with_python}" != auto; then | |
9022 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
9023 | fi | |
0c4a4063 | 9024 | fi |
ec685c5e | 9025 | else |
ac534cba JB |
9026 | # We do not have a python executable we can use to determine where |
9027 | # to find the Python headers and libs. We cannot guess the include | |
9028 | # path from the python_prefix either, because that include path | |
9029 | # depends on the Python version. So, there is nothing much we can | |
9030 | # do except assume that the compiler will be able to find those files. | |
9031 | python_includes= | |
9032 | python_libs= | |
0c4a4063 | 9033 | have_python_config=no |
ec685c5e | 9034 | fi |
bec39cab | 9035 | |
ec685c5e DE |
9036 | # If we have python-config, only try the configuration it provides. |
9037 | # Otherwise fallback on the old way of trying different versions of | |
9038 | # python in turn. | |
81ecdfbb | 9039 | |
ec685c5e DE |
9040 | have_libpython=no |
9041 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
9042 | # Determine the Python version by extracting "-lpython<version>" |
9043 | # part of the python_libs. <version> is usually X.Y with X and Y | |
9044 | # being decimal numbers, but can also be XY (seen on Windows). | |
9045 | # | |
9046 | # The extraction is performed using sed with a regular expression. | |
9047 | # Initially, the regexp used was using the '?' quantifier to make | |
9048 | # the dot in the version number optional. Unfortunately, this | |
9049 | # does not work with non-GNU versions of sed because, because of | |
9050 | # what looks like a limitation (the '?' quantifier does not work | |
9051 | # with back-references). We work around this limitation by using | |
9052 | # the '*' quantifier instead. It means that, in theory, we might | |
9053 | # match unexpected version strings such as "-lpython2..7", but | |
9054 | # this seems unlikely in practice. And even if that happens, | |
9055 | # an error will be triggered later on, when checking that version | |
9056 | # number. | |
ec685c5e | 9057 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 9058 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
9059 | case "${python_version}" in |
9060 | python*) | |
ec685c5e DE |
9061 | |
9062 | version=${python_version} | |
9063 | ||
9064 | new_CPPFLAGS=${python_includes} | |
9065 | new_LIBS=${python_libs} | |
81ecdfbb RW |
9066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
9067 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 9068 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 9069 | save_LIBS=$LIBS |
ec685c5e DE |
9070 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
9071 | LIBS="$LIBS $new_LIBS" | |
9072 | found_usable_python=no | |
81ecdfbb | 9073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9074 | /* end confdefs.h. */ |
ac534cba | 9075 | #include "Python.h" |
81ecdfbb RW |
9076 | int |
9077 | main () | |
9078 | { | |
9079 | Py_Initialize (); | |
9080 | ; | |
9081 | return 0; | |
9082 | } | |
bec39cab | 9083 | _ACEOF |
81ecdfbb | 9084 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
9085 | have_libpython=${version} |
9086 | found_usable_python=yes | |
ac534cba JB |
9087 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
9088 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 9089 | fi |
81ecdfbb RW |
9090 | rm -f core conftest.err conftest.$ac_objext \ |
9091 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
9092 | CPPFLAGS=$save_CPPFLAGS |
9093 | LIBS=$save_LIBS | |
ec685c5e DE |
9094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
9095 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 9096 | |
0c4a4063 DE |
9097 | ;; |
9098 | *) | |
ec685c5e | 9099 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
9100 | ;; |
9101 | esac | |
e7a30f46 | 9102 | elif test "${have_python_config}" != failed; then |
ec685c5e | 9103 | if test "${have_libpython}" = no; then |
9a156167 | 9104 | |
420697bb TT |
9105 | version=python2.7 |
9106 | ||
9107 | new_CPPFLAGS=${python_includes} | |
9108 | new_LIBS="${python_libs} -lpython2.7" | |
9109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
9110 | $as_echo_n "checking for ${version}... " >&6; } | |
9111 | save_CPPFLAGS=$CPPFLAGS | |
9112 | save_LIBS=$LIBS | |
9113 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9114 | LIBS="$LIBS $new_LIBS" | |
9115 | found_usable_python=no | |
9116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9117 | /* end confdefs.h. */ | |
ac534cba | 9118 | #include "Python.h" |
420697bb TT |
9119 | int |
9120 | main () | |
9121 | { | |
9122 | Py_Initialize (); | |
9123 | ; | |
9124 | return 0; | |
9125 | } | |
9126 | _ACEOF | |
9127 | if ac_fn_c_try_link "$LINENO"; then : | |
9128 | have_libpython=${version} | |
9129 | found_usable_python=yes | |
ac534cba JB |
9130 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
9131 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
9132 | fi |
9133 | rm -f core conftest.err conftest.$ac_objext \ | |
9134 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
9135 | CPPFLAGS=$save_CPPFLAGS |
9136 | LIBS=$save_LIBS | |
420697bb TT |
9137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
9138 | $as_echo "${found_usable_python}" >&6; } | |
9139 | ||
9140 | fi | |
9141 | if test "${have_libpython}" = no; then | |
9142 | ||
ec685c5e DE |
9143 | version=python2.6 |
9144 | ||
9145 | new_CPPFLAGS=${python_includes} | |
9146 | new_LIBS="${python_libs} -lpython2.6" | |
9147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
9148 | $as_echo_n "checking for ${version}... " >&6; } | |
9149 | save_CPPFLAGS=$CPPFLAGS | |
9150 | save_LIBS=$LIBS | |
9151 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9152 | LIBS="$LIBS $new_LIBS" | |
9153 | found_usable_python=no | |
9154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9155 | /* end confdefs.h. */ | |
ac534cba | 9156 | #include "Python.h" |
ec685c5e DE |
9157 | int |
9158 | main () | |
9159 | { | |
9160 | Py_Initialize (); | |
9161 | ; | |
9162 | return 0; | |
9163 | } | |
9164 | _ACEOF | |
9165 | if ac_fn_c_try_link "$LINENO"; then : | |
9166 | have_libpython=${version} | |
9167 | found_usable_python=yes | |
ac534cba JB |
9168 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
9169 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
9170 | fi |
9171 | rm -f core conftest.err conftest.$ac_objext \ | |
9172 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
9173 | CPPFLAGS=$save_CPPFLAGS |
9174 | LIBS=$save_LIBS | |
ec685c5e DE |
9175 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
9176 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 9177 | |
81ecdfbb | 9178 | fi |
ec685c5e | 9179 | if test ${have_libpython} = no; then |
9a156167 | 9180 | |
81ecdfbb | 9181 | version=python2.5 |
9a156167 | 9182 | |
ec685c5e DE |
9183 | new_CPPFLAGS=${python_includes} |
9184 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
9185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
9186 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 9187 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 9188 | save_LIBS=$LIBS |
ec685c5e DE |
9189 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
9190 | LIBS="$LIBS $new_LIBS" | |
9191 | found_usable_python=no | |
81ecdfbb | 9192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 9193 | /* end confdefs.h. */ |
ac534cba | 9194 | #include "Python.h" |
81ecdfbb RW |
9195 | int |
9196 | main () | |
9197 | { | |
9198 | Py_Initialize (); | |
9199 | ; | |
9200 | return 0; | |
9201 | } | |
436868fb | 9202 | _ACEOF |
81ecdfbb | 9203 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
9204 | have_libpython=${version} |
9205 | found_usable_python=yes | |
ac534cba JB |
9206 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
9207 | PYTHON_LIBS=$new_LIBS | |
436868fb | 9208 | fi |
81ecdfbb RW |
9209 | rm -f core conftest.err conftest.$ac_objext \ |
9210 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
9211 | CPPFLAGS=$save_CPPFLAGS |
9212 | LIBS=$save_LIBS | |
ec685c5e DE |
9213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
9214 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 9215 | |
81ecdfbb | 9216 | fi |
ec685c5e | 9217 | if test ${have_libpython} = no; then |
a9322a30 | 9218 | |
81ecdfbb | 9219 | version=python2.4 |
a9322a30 | 9220 | |
ec685c5e DE |
9221 | new_CPPFLAGS=${python_includes} |
9222 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
9223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
9224 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 9225 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 9226 | save_LIBS=$LIBS |
ec685c5e DE |
9227 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
9228 | LIBS="$LIBS $new_LIBS" | |
9229 | found_usable_python=no | |
81ecdfbb | 9230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 9231 | /* end confdefs.h. */ |
ac534cba | 9232 | #include "Python.h" |
a9322a30 TT |
9233 | int |
9234 | main () | |
9235 | { | |
81ecdfbb | 9236 | Py_Initialize (); |
a9322a30 TT |
9237 | ; |
9238 | return 0; | |
9239 | } | |
436868fb | 9240 | _ACEOF |
81ecdfbb | 9241 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
9242 | have_libpython=${version} |
9243 | found_usable_python=yes | |
ac534cba JB |
9244 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
9245 | PYTHON_LIBS=$new_LIBS | |
436868fb | 9246 | fi |
81ecdfbb RW |
9247 | rm -f core conftest.err conftest.$ac_objext \ |
9248 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
9249 | CPPFLAGS=$save_CPPFLAGS |
9250 | LIBS=$save_LIBS | |
ec685c5e DE |
9251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
9252 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 9253 | |
ec685c5e DE |
9254 | fi |
9255 | fi | |
9c4ea6c5 | 9256 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
9257 | |
9258 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
9259 | ||
9c4ea6c5 | 9260 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
9261 | |
9262 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
9263 | ||
9c4ea6c5 | 9264 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
9265 | |
9266 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
9267 | ||
9c4ea6c5 | 9268 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
9269 | |
9270 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
9271 | ||
81ecdfbb | 9272 | fi |
ec685c5e DE |
9273 | |
9274 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
9275 | case "${with_python}" in |
9276 | yes) | |
9277 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
9278 | ;; | |
9279 | auto) | |
9280 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
9281 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
9282 | ;; | |
9283 | *) | |
9284 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
9285 | ;; | |
9286 | esac | |
0c4a4063 DE |
9287 | else |
9288 | if test -n "${python_prefix}"; then | |
9289 | ||
9290 | cat >>confdefs.h <<_ACEOF | |
9291 | #define WITH_PYTHON_PATH "${python_prefix}" | |
9292 | _ACEOF | |
9293 | ||
9294 | ||
9295 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9296 | if test "x$prefix" = xNONE; then | |
9297 | test_prefix=/usr/local | |
9298 | else | |
9299 | test_prefix=$prefix | |
9300 | fi | |
9301 | else | |
9302 | test_prefix=$exec_prefix | |
9303 | fi | |
9304 | value=0 | |
9305 | case ${python_prefix} in | |
9306 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9307 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9308 | value=1 | |
9309 | ;; | |
9310 | esac | |
9311 | ||
9312 | cat >>confdefs.h <<_ACEOF | |
9313 | #define PYTHON_PATH_RELOCATABLE $value | |
9314 | _ACEOF | |
9315 | ||
9316 | ||
9317 | fi | |
81ecdfbb | 9318 | fi |
436868fb | 9319 | fi |
436868fb | 9320 | |
ec685c5e | 9321 | if test "${have_libpython}" != no; then |
436868fb | 9322 | |
81ecdfbb | 9323 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 9324 | |
81ecdfbb RW |
9325 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
9326 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
9327 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 9328 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 9329 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 9330 | |
81ecdfbb RW |
9331 | # Flags needed to compile Python code (taken from python-config --cflags). |
9332 | # We cannot call python-config directly because it will output whatever was | |
9333 | # used when compiling the Python interpreter itself, including flags which | |
9334 | # would make the python-related objects be compiled differently from the | |
9335 | # rest of GDB (e.g., -O2 and -fPIC). | |
9336 | if test "${GCC}" = yes; then | |
9337 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
9338 | fi | |
436868fb | 9339 | |
81ecdfbb RW |
9340 | if test "x${tentative_python_cflags}" != x; then |
9341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
9342 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
9343 | for flag in ${tentative_python_cflags}; do | |
9344 | # Check that the compiler accepts it | |
9345 | saved_CFLAGS="$CFLAGS" | |
9346 | CFLAGS="$CFLAGS $flag" | |
9347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9348 | /* end confdefs.h. */ |
81ecdfbb | 9349 | |
a9322a30 TT |
9350 | int |
9351 | main () | |
9352 | { | |
a9322a30 TT |
9353 | |
9354 | ; | |
9355 | return 0; | |
9356 | } | |
bec39cab | 9357 | _ACEOF |
81ecdfbb RW |
9358 | if ac_fn_c_try_compile "$LINENO"; then : |
9359 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 9360 | fi |
81ecdfbb RW |
9361 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9362 | CFLAGS="$saved_CFLAGS" | |
9363 | done | |
9364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
9365 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
9366 | fi | |
043b6510 | 9367 | |
c83393b9 JB |
9368 | # On x64 Windows, Python's include headers, and pyconfig.h in |
9369 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
9370 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
9371 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
9372 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
9373 | # The issue was reported to the Python community, but still isn't | |
9374 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
9375 | ||
043b6510 | 9376 | case "$gdb_host" in |
c83393b9 JB |
9377 | mingw64) |
9378 | if test "${GCC}" = yes; then | |
9379 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
9380 | fi | |
9381 | ;; | |
043b6510 | 9382 | esac |
a8db4212 YPK |
9383 | |
9384 | # Note that "python -m threading" cannot be used to check for | |
9385 | # threading support due to a bug in Python 2.7.3 | |
9386 | # (http://bugs.python.org/issue15567). | |
9387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
9388 | $as_echo_n "checking whether python supports threads... " >&6; } | |
9389 | saved_CPPFLAGS="${CPPFLAGS}" | |
9390 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
9391 | # Note that the test is reversed so that python_has_threads=yes on | |
9392 | # unexpected failures. | |
9393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9394 | /* end confdefs.h. */ | |
9395 | ||
9396 | #include <Python.h> | |
9397 | #ifdef WITH_THREAD | |
9398 | # error | |
9399 | #endif | |
9400 | ||
9401 | _ACEOF | |
9402 | if ac_fn_c_try_cpp "$LINENO"; then : | |
9403 | python_has_threads=no | |
9404 | else | |
9405 | python_has_threads=yes | |
9406 | fi | |
9407 | rm -f conftest.err conftest.$ac_ext | |
9408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
9409 | $as_echo "${python_has_threads}" >&6; } | |
9410 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 9411 | else |
6dddc817 DE |
9412 | # Even if Python support is not compiled in, we need to have this file |
9413 | # included so that the "python" command, et.al., still exists. | |
9414 | CONFIG_OBS="$CONFIG_OBS python.o" | |
9415 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 9416 | fi |
9a156167 | 9417 | |
a4a1c157 PA |
9418 | # Work around Python http://bugs.python.org/issue10112. See also |
9419 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
9420 | # no effect. Note that the only test after this that uses Python is | |
9421 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
9422 | # run without -export-dynamic too. | |
9423 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
9424 | ||
9425 | ||
ed3ef339 DE |
9426 | |
9427 | ||
4df42755 DE |
9428 | if test "${have_libpython}" != no; then |
9429 | HAVE_PYTHON_TRUE= | |
9430 | HAVE_PYTHON_FALSE='#' | |
9431 | else | |
9432 | HAVE_PYTHON_TRUE='#' | |
9433 | HAVE_PYTHON_FALSE= | |
9434 | fi | |
9435 | ||
ed3ef339 DE |
9436 | |
9437 | # -------------------- # | |
9438 | # Check for libguile. # | |
9439 | # -------------------- # | |
9440 | ||
9441 | ||
e1402065 DE |
9442 | |
9443 | ||
9444 | ||
9445 | ||
9446 | # Check whether --with-guile was given. | |
9447 | if test "${with_guile+set}" = set; then : | |
9448 | withval=$with_guile; | |
9449 | else | |
9450 | with_guile=auto | |
9451 | fi | |
9452 | ||
9453 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
9454 | $as_echo_n "checking whether to use guile... " >&6; } | |
9455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
9456 | $as_echo "$with_guile" >&6; } | |
9457 | ||
ed3ef339 DE |
9458 | # Extract the first word of "pkg-config", so it can be a program name with args. |
9459 | set dummy pkg-config; ac_word=$2 | |
9460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9461 | $as_echo_n "checking for $ac_word... " >&6; } | |
9462 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
9463 | $as_echo_n "(cached) " >&6 | |
9464 | else | |
9465 | case $pkg_config_prog_path in | |
9466 | [\\/]* | ?:[\\/]*) | |
9467 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
9468 | ;; | |
9469 | *) | |
9470 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9471 | for as_dir in $PATH | |
9472 | do | |
9473 | IFS=$as_save_IFS | |
9474 | test -z "$as_dir" && as_dir=. | |
9475 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9476 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9477 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
9478 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9479 | break 2 | |
9480 | fi | |
9481 | done | |
9482 | done | |
9483 | IFS=$as_save_IFS | |
9484 | ||
9485 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
9486 | ;; | |
9487 | esac | |
9488 | fi | |
9489 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
9490 | if test -n "$pkg_config_prog_path"; then | |
9491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
9492 | $as_echo "$pkg_config_prog_path" >&6; } | |
9493 | else | |
9494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9495 | $as_echo "no" >&6; } | |
9496 | fi | |
9497 | ||
9498 | ||
9499 | ||
214ab2da | 9500 | try_guile_versions="guile-2.2 guile-2.0" |
ed3ef339 DE |
9501 | have_libguile=no |
9502 | case "${with_guile}" in | |
9503 | no) | |
9504 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
9505 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
9506 | ;; | |
9507 | auto) | |
e1402065 DE |
9508 | if test "${pkg_config_prog_path}" = "missing"; then |
9509 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
9510 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
9511 | else | |
ed3ef339 DE |
9512 | |
9513 | pkg_config=${pkg_config_prog_path} | |
9514 | guile_version_list=${try_guile_versions} | |
9515 | flag_errors=no | |
9516 | ||
ed3ef339 DE |
9517 | found_usable_guile=checking |
9518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9519 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9520 | for guile_version in ${guile_version_list}; do | |
9521 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9522 | if test $? != 0; then | |
9523 | continue | |
9524 | fi | |
9525 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9526 | if test $? != 0; then | |
9527 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9528 | fi | |
9529 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9530 | if test $? != 0; then | |
9531 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9532 | fi | |
9533 | found_usable_guile=${guile_version} | |
9534 | break | |
9535 | done | |
9536 | if test "${found_usable_guile}" = "checking"; then | |
9537 | if test "${flag_errors}" = "yes"; then | |
9538 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9539 | else | |
9540 | found_usable_guile=no | |
9541 | fi | |
9542 | fi | |
9543 | if test "${found_usable_guile}" != no; then | |
9544 | save_CPPFLAGS=$CPPFLAGS | |
9545 | save_LIBS=$LIBS | |
9546 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9547 | LIBS="$LIBS $new_LIBS" | |
9548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9549 | /* end confdefs.h. */ | |
9550 | #include "libguile.h" | |
9551 | int | |
9552 | main () | |
9553 | { | |
9554 | scm_init_guile (); | |
9555 | ; | |
9556 | return 0; | |
9557 | } | |
9558 | _ACEOF | |
9559 | if ac_fn_c_try_link "$LINENO"; then : | |
9560 | have_libguile=yes | |
9561 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9562 | GUILE_LIBS=$new_LIBS | |
9563 | else | |
9564 | found_usable_guile=no | |
9565 | fi | |
9566 | rm -f core conftest.err conftest.$ac_objext \ | |
9567 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9568 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9569 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9570 | ||
9571 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9572 | ||
9573 | ||
9574 | fi | |
9575 | ||
ed3ef339 DE |
9576 | CPPFLAGS=$save_CPPFLAGS |
9577 | LIBS=$save_LIBS | |
9578 | if test "${found_usable_guile}" = no; then | |
9579 | if test "${flag_errors}" = yes; then | |
9580 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9581 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9582 | as_fn_error "linking guile version ${guile_version} test program failed | |
9583 | See \`config.log' for more details." "$LINENO" 5; } | |
9584 | fi | |
9585 | fi | |
9586 | fi | |
9587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9588 | $as_echo "${found_usable_guile}" >&6; } | |
9589 | ||
e1402065 | 9590 | fi |
ed3ef339 DE |
9591 | ;; |
9592 | yes) | |
e1402065 DE |
9593 | if test "${pkg_config_prog_path}" = "missing"; then |
9594 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9595 | fi | |
ed3ef339 DE |
9596 | |
9597 | pkg_config=${pkg_config_prog_path} | |
9598 | guile_version_list=${try_guile_versions} | |
9599 | flag_errors=yes | |
9600 | ||
ed3ef339 DE |
9601 | found_usable_guile=checking |
9602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9603 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9604 | for guile_version in ${guile_version_list}; do | |
9605 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9606 | if test $? != 0; then | |
9607 | continue | |
9608 | fi | |
9609 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9610 | if test $? != 0; then | |
9611 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9612 | fi | |
9613 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9614 | if test $? != 0; then | |
9615 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9616 | fi | |
9617 | found_usable_guile=${guile_version} | |
9618 | break | |
9619 | done | |
9620 | if test "${found_usable_guile}" = "checking"; then | |
9621 | if test "${flag_errors}" = "yes"; then | |
9622 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9623 | else | |
9624 | found_usable_guile=no | |
9625 | fi | |
9626 | fi | |
9627 | if test "${found_usable_guile}" != no; then | |
9628 | save_CPPFLAGS=$CPPFLAGS | |
9629 | save_LIBS=$LIBS | |
9630 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9631 | LIBS="$LIBS $new_LIBS" | |
9632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9633 | /* end confdefs.h. */ | |
9634 | #include "libguile.h" | |
9635 | int | |
9636 | main () | |
9637 | { | |
9638 | scm_init_guile (); | |
9639 | ; | |
9640 | return 0; | |
9641 | } | |
9642 | _ACEOF | |
9643 | if ac_fn_c_try_link "$LINENO"; then : | |
9644 | have_libguile=yes | |
9645 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9646 | GUILE_LIBS=$new_LIBS | |
9647 | else | |
9648 | found_usable_guile=no | |
9649 | fi | |
9650 | rm -f core conftest.err conftest.$ac_objext \ | |
9651 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9652 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9653 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9654 | ||
9655 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9656 | ||
9657 | ||
9658 | fi | |
9659 | ||
ed3ef339 DE |
9660 | CPPFLAGS=$save_CPPFLAGS |
9661 | LIBS=$save_LIBS | |
9662 | if test "${found_usable_guile}" = no; then | |
9663 | if test "${flag_errors}" = yes; then | |
9664 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9665 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9666 | as_fn_error "linking guile version ${guile_version} test program failed | |
9667 | See \`config.log' for more details." "$LINENO" 5; } | |
9668 | fi | |
9669 | fi | |
9670 | fi | |
9671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9672 | $as_echo "${found_usable_guile}" >&6; } | |
9673 | ||
9674 | ;; | |
9675 | [\\/]* | ?:[\\/]*) | |
e1402065 | 9676 | if test -x "${with_guile}"; then |
ed3ef339 DE |
9677 | |
9678 | pkg_config=${with_guile} | |
9679 | guile_version_list=${try_guile_versions} | |
9680 | flag_errors=yes | |
9681 | ||
ed3ef339 DE |
9682 | found_usable_guile=checking |
9683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9684 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9685 | for guile_version in ${guile_version_list}; do | |
9686 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9687 | if test $? != 0; then | |
9688 | continue | |
9689 | fi | |
9690 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9691 | if test $? != 0; then | |
9692 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9693 | fi | |
9694 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9695 | if test $? != 0; then | |
9696 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9697 | fi | |
9698 | found_usable_guile=${guile_version} | |
9699 | break | |
9700 | done | |
9701 | if test "${found_usable_guile}" = "checking"; then | |
9702 | if test "${flag_errors}" = "yes"; then | |
9703 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9704 | else | |
9705 | found_usable_guile=no | |
9706 | fi | |
9707 | fi | |
9708 | if test "${found_usable_guile}" != no; then | |
9709 | save_CPPFLAGS=$CPPFLAGS | |
9710 | save_LIBS=$LIBS | |
9711 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9712 | LIBS="$LIBS $new_LIBS" | |
9713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9714 | /* end confdefs.h. */ | |
9715 | #include "libguile.h" | |
9716 | int | |
9717 | main () | |
9718 | { | |
9719 | scm_init_guile (); | |
9720 | ; | |
9721 | return 0; | |
9722 | } | |
9723 | _ACEOF | |
9724 | if ac_fn_c_try_link "$LINENO"; then : | |
9725 | have_libguile=yes | |
9726 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9727 | GUILE_LIBS=$new_LIBS | |
9728 | else | |
9729 | found_usable_guile=no | |
9730 | fi | |
9731 | rm -f core conftest.err conftest.$ac_objext \ | |
9732 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9733 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9734 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9735 | ||
9736 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9737 | ||
9738 | ||
9739 | fi | |
9740 | ||
ed3ef339 DE |
9741 | CPPFLAGS=$save_CPPFLAGS |
9742 | LIBS=$save_LIBS | |
9743 | if test "${found_usable_guile}" = no; then | |
9744 | if test "${flag_errors}" = yes; then | |
9745 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9746 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9747 | as_fn_error "linking guile version ${guile_version} test program failed | |
9748 | See \`config.log' for more details." "$LINENO" 5; } | |
9749 | fi | |
9750 | fi | |
9751 | fi | |
9752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9753 | $as_echo "${found_usable_guile}" >&6; } | |
9754 | ||
e1402065 DE |
9755 | else |
9756 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
9757 | fi | |
ed3ef339 DE |
9758 | ;; |
9759 | "" | */*) | |
9760 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
9761 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
9762 | ;; | |
9763 | *) | |
9764 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
9765 | if test "${pkg_config_prog_path}" = "missing"; then |
9766 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9767 | fi | |
ed3ef339 DE |
9768 | |
9769 | pkg_config=${pkg_config_prog_path} | |
9770 | guile_version_list=${with_guile} | |
9771 | flag_errors=yes | |
9772 | ||
ed3ef339 DE |
9773 | found_usable_guile=checking |
9774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9775 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9776 | for guile_version in ${guile_version_list}; do | |
9777 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9778 | if test $? != 0; then | |
9779 | continue | |
9780 | fi | |
9781 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9782 | if test $? != 0; then | |
9783 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9784 | fi | |
9785 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9786 | if test $? != 0; then | |
9787 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9788 | fi | |
9789 | found_usable_guile=${guile_version} | |
9790 | break | |
9791 | done | |
9792 | if test "${found_usable_guile}" = "checking"; then | |
9793 | if test "${flag_errors}" = "yes"; then | |
9794 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9795 | else | |
9796 | found_usable_guile=no | |
9797 | fi | |
9798 | fi | |
9799 | if test "${found_usable_guile}" != no; then | |
9800 | save_CPPFLAGS=$CPPFLAGS | |
9801 | save_LIBS=$LIBS | |
9802 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9803 | LIBS="$LIBS $new_LIBS" | |
9804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9805 | /* end confdefs.h. */ | |
9806 | #include "libguile.h" | |
9807 | int | |
9808 | main () | |
9809 | { | |
9810 | scm_init_guile (); | |
9811 | ; | |
9812 | return 0; | |
9813 | } | |
9814 | _ACEOF | |
9815 | if ac_fn_c_try_link "$LINENO"; then : | |
9816 | have_libguile=yes | |
9817 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9818 | GUILE_LIBS=$new_LIBS | |
9819 | else | |
9820 | found_usable_guile=no | |
9821 | fi | |
9822 | rm -f core conftest.err conftest.$ac_objext \ | |
9823 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9824 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9825 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9826 | ||
9827 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9828 | ||
9829 | ||
9830 | fi | |
9831 | ||
ed3ef339 DE |
9832 | CPPFLAGS=$save_CPPFLAGS |
9833 | LIBS=$save_LIBS | |
9834 | if test "${found_usable_guile}" = no; then | |
9835 | if test "${flag_errors}" = yes; then | |
9836 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9837 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9838 | as_fn_error "linking guile version ${guile_version} test program failed | |
9839 | See \`config.log' for more details." "$LINENO" 5; } | |
9840 | fi | |
9841 | fi | |
9842 | fi | |
9843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9844 | $as_echo "${found_usable_guile}" >&6; } | |
9845 | ||
9846 | ;; | |
9847 | esac | |
9848 | ||
e76c5d17 | 9849 | if test "${have_libguile}" != no; then |
d342a0da DE |
9850 | case "${with_guile}" in |
9851 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
9852 | |
9853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9854 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9855 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9856 | $as_echo_n "(cached) " >&6 | |
9857 | else | |
d342a0da | 9858 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
9859 | |
9860 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9861 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9862 | # what the program name is, at the risk of getting it wrong if | |
9863 | # Guile was configured with '--program-suffix' or similar. | |
9864 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 9865 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
9866 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
9867 | fi | |
9868 | ||
9869 | fi | |
9870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9871 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9872 | ||
9873 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9874 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9875 | fi | |
9876 | ||
9877 | GUILD="$ac_cv_guild_program_name" | |
9878 | ||
9879 | ||
d342a0da DE |
9880 | ;; |
9881 | *) | |
9882 | ||
9883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9884 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9885 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9886 | $as_echo_n "(cached) " >&6 | |
9887 | else | |
9888 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
9889 | ||
9890 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9891 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9892 | # what the program name is, at the risk of getting it wrong if | |
9893 | # Guile was configured with '--program-suffix' or similar. | |
9894 | if test "x$ac_cv_guild_program_name" = "x"; then | |
9895 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
9896 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
9897 | fi | |
9898 | ||
9899 | fi | |
9900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9901 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9902 | ||
9903 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9904 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9905 | fi | |
9906 | ||
9907 | GUILD="$ac_cv_guild_program_name" | |
9908 | ||
9909 | ||
9910 | ;; | |
9911 | esac | |
e76c5d17 DE |
9912 | |
9913 | ||
9914 | if test "$cross_compiling" = no; then | |
9915 | GUILD_TARGET_FLAG= | |
9916 | else | |
9917 | GUILD_TARGET_FLAG="--target=$host" | |
9918 | fi | |
9919 | ||
9920 | ||
9921 | ||
9922 | ||
9923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
9924 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
9925 | if test "${ac_cv_guild_ok+set}" = set; then : | |
9926 | $as_echo_n "(cached) " >&6 | |
9927 | else | |
9928 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
9929 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
9930 | ac_cv_guild_ok=yes | |
9931 | else | |
9932 | ac_cv_guild_ok=no | |
9933 | fi | |
9934 | fi | |
9935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
9936 | $as_echo "$ac_cv_guild_ok" >&6; } | |
9937 | ||
9938 | if test "$ac_cv_guild_ok" = no; then | |
9939 | have_libguile=no | |
9940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
9941 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
9942 | fi | |
9943 | fi | |
9944 | ||
ed3ef339 DE |
9945 | if test "${have_libguile}" != no; then |
9946 | ||
9947 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
9948 | ||
9949 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
9950 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
9951 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
9952 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
9953 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
9954 | |
9955 | save_LIBS="$LIBS" | |
9956 | save_CPPFLAGS="$CPPFLAGS" | |
9957 | LIBS="$GUILE_LIBS" | |
9958 | CPPFLAGS="$GUILE_CPPFLAGS" | |
9959 | for ac_func in scm_new_smob | |
9960 | do : | |
9961 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
9962 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
9963 | cat >>confdefs.h <<_ACEOF | |
9964 | #define HAVE_SCM_NEW_SMOB 1 | |
9965 | _ACEOF | |
9966 | ||
9967 | fi | |
9968 | done | |
9969 | ||
9970 | LIBS="$save_LIBS" | |
9971 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
9972 | else |
9973 | # Even if Guile support is not compiled in, we need to have these files | |
9974 | # included. | |
9975 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
9976 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
9977 | fi | |
9a156167 | 9978 | |
ac534cba | 9979 | |
4df42755 DE |
9980 | if test "${have_libguile}" != no; then |
9981 | HAVE_GUILE_TRUE= | |
9982 | HAVE_GUILE_FALSE='#' | |
9983 | else | |
9984 | HAVE_GUILE_TRUE='#' | |
9985 | HAVE_GUILE_FALSE= | |
9986 | fi | |
9987 | ||
ac534cba | 9988 | |
d344e670 DE |
9989 | # --------------------- # |
9990 | # Check for libmcheck. # | |
9991 | # --------------------- # | |
9992 | ||
a8db4212 YPK |
9993 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
9994 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
9995 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
9996 | # and for releases. | |
17ef446e PA |
9997 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
9998 | && $development; then | |
9999 | libmcheck_default=yes | |
10000 | else | |
10001 | libmcheck_default=no | |
a8db4212 YPK |
10002 | fi |
10003 | ||
17ef446e PA |
10004 | # Check whether --enable-libmcheck was given. |
10005 | if test "${enable_libmcheck+set}" = set; then : | |
10006 | enableval=$enable_libmcheck; case "${enableval}" in | |
10007 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
10008 | no | n) ENABLE_LIBMCHECK="no" ;; | |
10009 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
10010 | esac | |
10011 | fi | |
10012 | ||
10013 | ||
10014 | if test -z "${ENABLE_LIBMCHECK}"; then | |
10015 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 10016 | fi |
17ef446e PA |
10017 | |
10018 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
10019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
10020 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
10021 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
10022 | $as_echo_n "(cached) " >&6 | |
10023 | else | |
10024 | ac_check_lib_save_LIBS=$LIBS | |
10025 | LIBS="-lmcheck $LIBS" | |
10026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10027 | /* end confdefs.h. */ | |
10028 | ||
10029 | ||
10030 | int | |
10031 | main () | |
10032 | { | |
10033 | return main (); | |
10034 | ; | |
10035 | return 0; | |
10036 | } | |
10037 | _ACEOF | |
10038 | if ac_fn_c_try_link "$LINENO"; then : | |
10039 | ac_cv_lib_mcheck_main=yes | |
10040 | else | |
10041 | ac_cv_lib_mcheck_main=no | |
10042 | fi | |
10043 | rm -f core conftest.err conftest.$ac_objext \ | |
10044 | conftest$ac_exeext conftest.$ac_ext | |
10045 | LIBS=$ac_check_lib_save_LIBS | |
10046 | fi | |
10047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
10048 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
10049 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
10050 | cat >>confdefs.h <<_ACEOF | |
10051 | #define HAVE_LIBMCHECK 1 | |
10052 | _ACEOF | |
10053 | ||
10054 | LIBS="-lmcheck $LIBS" | |
10055 | ||
10056 | fi | |
10057 | ||
17ef446e PA |
10058 | fi |
10059 | ||
10060 | ||
10061 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
10062 | -a "${have_libpython}" != "no" \ | |
10063 | -a "${python_has_threads}" = "yes" ; then | |
10064 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
10065 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
10066 | fi |
10067 | ||
58bfce93 MM |
10068 | |
10069 | # Check whether --with-intel_pt was given. | |
10070 | if test "${with_intel_pt+set}" = set; then : | |
10071 | withval=$with_intel_pt; | |
10072 | else | |
10073 | with_intel_pt=auto | |
10074 | fi | |
10075 | ||
10076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
10077 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
10078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
10079 | $as_echo "$with_intel_pt" >&6; } | |
10080 | ||
10081 | if test "${with_intel_pt}" = no; then | |
bc504a31 PA |
10082 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
10083 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
58bfce93 MM |
10084 | HAVE_LIBIPT=no |
10085 | else | |
5599c404 MM |
10086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10087 | /* end confdefs.h. */ | |
10088 | ||
10089 | #include <linux/perf_event.h> | |
10090 | #ifndef PERF_ATTR_SIZE_VER5 | |
10091 | # error | |
10092 | #endif | |
10093 | ||
10094 | _ACEOF | |
10095 | if ac_fn_c_try_cpp "$LINENO"; then : | |
10096 | perf_event=yes | |
10097 | else | |
10098 | perf_event=no | |
10099 | fi | |
10100 | rm -f conftest.err conftest.$ac_ext | |
10101 | if test "$perf_event" != yes; then | |
10102 | if test "$with_intel_pt" = yes; then | |
10103 | as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5 | |
10104 | else | |
10105 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
10106 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
10107 | fi | |
10108 | fi | |
10109 | ||
58bfce93 MM |
10110 | |
10111 | ||
10112 | ||
10113 | ||
10114 | ||
10115 | ||
10116 | ||
10117 | ||
10118 | use_additional=yes | |
10119 | ||
10120 | acl_save_prefix="$prefix" | |
10121 | prefix="$acl_final_prefix" | |
10122 | acl_save_exec_prefix="$exec_prefix" | |
10123 | exec_prefix="$acl_final_exec_prefix" | |
10124 | ||
10125 | eval additional_includedir=\"$includedir\" | |
10126 | eval additional_libdir=\"$libdir\" | |
10127 | ||
10128 | exec_prefix="$acl_save_exec_prefix" | |
10129 | prefix="$acl_save_prefix" | |
10130 | ||
10131 | ||
10132 | # Check whether --with-libipt-prefix was given. | |
10133 | if test "${with_libipt_prefix+set}" = set; then : | |
10134 | withval=$with_libipt_prefix; | |
10135 | if test "X$withval" = "Xno"; then | |
10136 | use_additional=no | |
10137 | else | |
10138 | if test "X$withval" = "X"; then | |
10139 | ||
10140 | acl_save_prefix="$prefix" | |
10141 | prefix="$acl_final_prefix" | |
10142 | acl_save_exec_prefix="$exec_prefix" | |
10143 | exec_prefix="$acl_final_exec_prefix" | |
10144 | ||
10145 | eval additional_includedir=\"$includedir\" | |
10146 | eval additional_libdir=\"$libdir\" | |
10147 | ||
10148 | exec_prefix="$acl_save_exec_prefix" | |
10149 | prefix="$acl_save_prefix" | |
10150 | ||
10151 | else | |
10152 | additional_includedir="$withval/include" | |
10153 | additional_libdir="$withval/lib" | |
10154 | fi | |
10155 | fi | |
10156 | ||
10157 | fi | |
10158 | ||
10159 | LIBIPT= | |
10160 | LTLIBIPT= | |
10161 | INCIPT= | |
10162 | rpathdirs= | |
10163 | ltrpathdirs= | |
10164 | names_already_handled= | |
10165 | names_next_round='ipt ' | |
10166 | while test -n "$names_next_round"; do | |
10167 | names_this_round="$names_next_round" | |
10168 | names_next_round= | |
10169 | for name in $names_this_round; do | |
10170 | already_handled= | |
10171 | for n in $names_already_handled; do | |
10172 | if test "$n" = "$name"; then | |
10173 | already_handled=yes | |
10174 | break | |
10175 | fi | |
10176 | done | |
10177 | if test -z "$already_handled"; then | |
10178 | names_already_handled="$names_already_handled $name" | |
10179 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10180 | eval value=\"\$HAVE_LIB$uppername\" | |
10181 | if test -n "$value"; then | |
10182 | if test "$value" = yes; then | |
10183 | eval value=\"\$LIB$uppername\" | |
10184 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
10185 | eval value=\"\$LTLIB$uppername\" | |
10186 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
10187 | else | |
10188 | : | |
10189 | fi | |
10190 | else | |
10191 | found_dir= | |
10192 | found_la= | |
10193 | found_so= | |
10194 | found_a= | |
10195 | if test $use_additional = yes; then | |
10196 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10197 | found_dir="$additional_libdir" | |
10198 | found_so="$additional_libdir/lib$name.$shlibext" | |
10199 | if test -f "$additional_libdir/lib$name.la"; then | |
10200 | found_la="$additional_libdir/lib$name.la" | |
10201 | fi | |
10202 | else | |
10203 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10204 | found_dir="$additional_libdir" | |
10205 | found_a="$additional_libdir/lib$name.$libext" | |
10206 | if test -f "$additional_libdir/lib$name.la"; then | |
10207 | found_la="$additional_libdir/lib$name.la" | |
10208 | fi | |
10209 | fi | |
10210 | fi | |
10211 | fi | |
10212 | if test "X$found_dir" = "X"; then | |
10213 | for x in $LDFLAGS $LTLIBIPT; do | |
10214 | ||
10215 | acl_save_prefix="$prefix" | |
10216 | prefix="$acl_final_prefix" | |
10217 | acl_save_exec_prefix="$exec_prefix" | |
10218 | exec_prefix="$acl_final_exec_prefix" | |
10219 | eval x=\"$x\" | |
10220 | exec_prefix="$acl_save_exec_prefix" | |
10221 | prefix="$acl_save_prefix" | |
10222 | ||
10223 | case "$x" in | |
10224 | -L*) | |
10225 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10226 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10227 | found_dir="$dir" | |
10228 | found_so="$dir/lib$name.$shlibext" | |
10229 | if test -f "$dir/lib$name.la"; then | |
10230 | found_la="$dir/lib$name.la" | |
10231 | fi | |
10232 | else | |
10233 | if test -f "$dir/lib$name.$libext"; then | |
10234 | found_dir="$dir" | |
10235 | found_a="$dir/lib$name.$libext" | |
10236 | if test -f "$dir/lib$name.la"; then | |
10237 | found_la="$dir/lib$name.la" | |
10238 | fi | |
10239 | fi | |
10240 | fi | |
10241 | ;; | |
10242 | esac | |
10243 | if test "X$found_dir" != "X"; then | |
10244 | break | |
10245 | fi | |
10246 | done | |
10247 | fi | |
10248 | if test "X$found_dir" != "X"; then | |
10249 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
10250 | if test "X$found_so" != "X"; then | |
10251 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10252 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
10253 | else | |
10254 | haveit= | |
10255 | for x in $ltrpathdirs; do | |
10256 | if test "X$x" = "X$found_dir"; then | |
10257 | haveit=yes | |
10258 | break | |
10259 | fi | |
10260 | done | |
10261 | if test -z "$haveit"; then | |
10262 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10263 | fi | |
10264 | if test "$hardcode_direct" = yes; then | |
10265 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
10266 | else | |
10267 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10268 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
10269 | haveit= | |
10270 | for x in $rpathdirs; do | |
10271 | if test "X$x" = "X$found_dir"; then | |
10272 | haveit=yes | |
10273 | break | |
10274 | fi | |
10275 | done | |
10276 | if test -z "$haveit"; then | |
10277 | rpathdirs="$rpathdirs $found_dir" | |
10278 | fi | |
10279 | else | |
10280 | haveit= | |
10281 | for x in $LDFLAGS $LIBIPT; do | |
10282 | ||
10283 | acl_save_prefix="$prefix" | |
10284 | prefix="$acl_final_prefix" | |
10285 | acl_save_exec_prefix="$exec_prefix" | |
10286 | exec_prefix="$acl_final_exec_prefix" | |
10287 | eval x=\"$x\" | |
10288 | exec_prefix="$acl_save_exec_prefix" | |
10289 | prefix="$acl_save_prefix" | |
10290 | ||
10291 | if test "X$x" = "X-L$found_dir"; then | |
10292 | haveit=yes | |
10293 | break | |
10294 | fi | |
10295 | done | |
10296 | if test -z "$haveit"; then | |
10297 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
10298 | fi | |
10299 | if test "$hardcode_minus_L" != no; then | |
10300 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
10301 | else | |
10302 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
10303 | fi | |
10304 | fi | |
10305 | fi | |
10306 | fi | |
10307 | else | |
10308 | if test "X$found_a" != "X"; then | |
10309 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
10310 | else | |
10311 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
10312 | fi | |
10313 | fi | |
10314 | additional_includedir= | |
10315 | case "$found_dir" in | |
10316 | */lib | */lib/) | |
10317 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10318 | additional_includedir="$basedir/include" | |
10319 | ;; | |
10320 | esac | |
10321 | if test "X$additional_includedir" != "X"; then | |
10322 | if test "X$additional_includedir" != "X/usr/include"; then | |
10323 | haveit= | |
10324 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10325 | if test -n "$GCC"; then | |
10326 | case $host_os in | |
10327 | linux*) haveit=yes;; | |
10328 | esac | |
10329 | fi | |
10330 | fi | |
10331 | if test -z "$haveit"; then | |
10332 | for x in $CPPFLAGS $INCIPT; do | |
10333 | ||
10334 | acl_save_prefix="$prefix" | |
10335 | prefix="$acl_final_prefix" | |
10336 | acl_save_exec_prefix="$exec_prefix" | |
10337 | exec_prefix="$acl_final_exec_prefix" | |
10338 | eval x=\"$x\" | |
10339 | exec_prefix="$acl_save_exec_prefix" | |
10340 | prefix="$acl_save_prefix" | |
10341 | ||
10342 | if test "X$x" = "X-I$additional_includedir"; then | |
10343 | haveit=yes | |
10344 | break | |
10345 | fi | |
10346 | done | |
10347 | if test -z "$haveit"; then | |
10348 | if test -d "$additional_includedir"; then | |
10349 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
10350 | fi | |
10351 | fi | |
10352 | fi | |
10353 | fi | |
10354 | fi | |
10355 | if test -n "$found_la"; then | |
10356 | save_libdir="$libdir" | |
10357 | case "$found_la" in | |
10358 | */* | *\\*) . "$found_la" ;; | |
10359 | *) . "./$found_la" ;; | |
10360 | esac | |
10361 | libdir="$save_libdir" | |
10362 | for dep in $dependency_libs; do | |
10363 | case "$dep" in | |
10364 | -L*) | |
10365 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10366 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10367 | haveit= | |
10368 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10369 | if test -n "$GCC"; then | |
10370 | case $host_os in | |
10371 | linux*) haveit=yes;; | |
10372 | esac | |
10373 | fi | |
10374 | fi | |
10375 | if test -z "$haveit"; then | |
10376 | haveit= | |
10377 | for x in $LDFLAGS $LIBIPT; do | |
10378 | ||
10379 | acl_save_prefix="$prefix" | |
10380 | prefix="$acl_final_prefix" | |
10381 | acl_save_exec_prefix="$exec_prefix" | |
10382 | exec_prefix="$acl_final_exec_prefix" | |
10383 | eval x=\"$x\" | |
10384 | exec_prefix="$acl_save_exec_prefix" | |
10385 | prefix="$acl_save_prefix" | |
10386 | ||
10387 | if test "X$x" = "X-L$additional_libdir"; then | |
10388 | haveit=yes | |
10389 | break | |
10390 | fi | |
10391 | done | |
10392 | if test -z "$haveit"; then | |
10393 | if test -d "$additional_libdir"; then | |
10394 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
10395 | fi | |
10396 | fi | |
10397 | haveit= | |
10398 | for x in $LDFLAGS $LTLIBIPT; do | |
10399 | ||
10400 | acl_save_prefix="$prefix" | |
10401 | prefix="$acl_final_prefix" | |
10402 | acl_save_exec_prefix="$exec_prefix" | |
10403 | exec_prefix="$acl_final_exec_prefix" | |
10404 | eval x=\"$x\" | |
10405 | exec_prefix="$acl_save_exec_prefix" | |
10406 | prefix="$acl_save_prefix" | |
10407 | ||
10408 | if test "X$x" = "X-L$additional_libdir"; then | |
10409 | haveit=yes | |
10410 | break | |
10411 | fi | |
10412 | done | |
10413 | if test -z "$haveit"; then | |
10414 | if test -d "$additional_libdir"; then | |
10415 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
10416 | fi | |
10417 | fi | |
10418 | fi | |
10419 | fi | |
10420 | ;; | |
10421 | -R*) | |
10422 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10423 | if test "$enable_rpath" != no; then | |
10424 | haveit= | |
10425 | for x in $rpathdirs; do | |
10426 | if test "X$x" = "X$dir"; then | |
10427 | haveit=yes | |
10428 | break | |
10429 | fi | |
10430 | done | |
10431 | if test -z "$haveit"; then | |
10432 | rpathdirs="$rpathdirs $dir" | |
10433 | fi | |
10434 | haveit= | |
10435 | for x in $ltrpathdirs; do | |
10436 | if test "X$x" = "X$dir"; then | |
10437 | haveit=yes | |
10438 | break | |
10439 | fi | |
10440 | done | |
10441 | if test -z "$haveit"; then | |
10442 | ltrpathdirs="$ltrpathdirs $dir" | |
10443 | fi | |
10444 | fi | |
10445 | ;; | |
10446 | -l*) | |
10447 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10448 | ;; | |
10449 | *.la) | |
10450 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10451 | ;; | |
10452 | *) | |
10453 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
10454 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
10455 | ;; | |
10456 | esac | |
10457 | done | |
10458 | fi | |
10459 | else | |
10460 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
10461 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
10462 | fi | |
10463 | fi | |
10464 | fi | |
10465 | done | |
10466 | done | |
10467 | if test "X$rpathdirs" != "X"; then | |
10468 | if test -n "$hardcode_libdir_separator"; then | |
10469 | alldirs= | |
10470 | for found_dir in $rpathdirs; do | |
10471 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10472 | done | |
10473 | acl_save_libdir="$libdir" | |
10474 | libdir="$alldirs" | |
10475 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10476 | libdir="$acl_save_libdir" | |
10477 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
10478 | else | |
10479 | for found_dir in $rpathdirs; do | |
10480 | acl_save_libdir="$libdir" | |
10481 | libdir="$found_dir" | |
10482 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10483 | libdir="$acl_save_libdir" | |
10484 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
10485 | done | |
10486 | fi | |
10487 | fi | |
10488 | if test "X$ltrpathdirs" != "X"; then | |
10489 | for found_dir in $ltrpathdirs; do | |
10490 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
10491 | done | |
10492 | fi | |
10493 | ||
10494 | ||
10495 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10496 | ||
10497 | for element in $INCIPT; do | |
10498 | haveit= | |
10499 | for x in $CPPFLAGS; do | |
10500 | ||
10501 | acl_save_prefix="$prefix" | |
10502 | prefix="$acl_final_prefix" | |
10503 | acl_save_exec_prefix="$exec_prefix" | |
10504 | exec_prefix="$acl_final_exec_prefix" | |
10505 | eval x=\"$x\" | |
10506 | exec_prefix="$acl_save_exec_prefix" | |
10507 | prefix="$acl_save_prefix" | |
10508 | ||
10509 | if test "X$x" = "X$element"; then | |
10510 | haveit=yes | |
10511 | break | |
10512 | fi | |
10513 | done | |
10514 | if test -z "$haveit"; then | |
10515 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10516 | fi | |
10517 | done | |
10518 | ||
10519 | ||
10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
10521 | $as_echo_n "checking for libipt... " >&6; } | |
10522 | if test "${ac_cv_libipt+set}" = set; then : | |
10523 | $as_echo_n "(cached) " >&6 | |
10524 | else | |
10525 | ||
10526 | ac_save_LIBS="$LIBS" | |
10527 | LIBS="$LIBS $LIBIPT" | |
10528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10529 | /* end confdefs.h. */ | |
10530 | #include "intel-pt.h" | |
10531 | int | |
10532 | main () | |
10533 | { | |
10534 | pt_insn_alloc_decoder (0); | |
10535 | ; | |
10536 | return 0; | |
10537 | } | |
10538 | _ACEOF | |
10539 | if ac_fn_c_try_link "$LINENO"; then : | |
10540 | ac_cv_libipt=yes | |
10541 | else | |
10542 | ac_cv_libipt=no | |
10543 | fi | |
10544 | rm -f core conftest.err conftest.$ac_objext \ | |
10545 | conftest$ac_exeext conftest.$ac_ext | |
10546 | LIBS="$ac_save_LIBS" | |
10547 | ||
10548 | fi | |
10549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
10550 | $as_echo "$ac_cv_libipt" >&6; } | |
10551 | if test "$ac_cv_libipt" = yes; then | |
10552 | HAVE_LIBIPT=yes | |
10553 | ||
10554 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
10555 | ||
10556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
10557 | $as_echo_n "checking how to link with libipt... " >&6; } | |
10558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
10559 | $as_echo "$LIBIPT" >&6; } | |
10560 | else | |
10561 | HAVE_LIBIPT=no | |
10562 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10563 | LIBIPT= | |
10564 | LTLIBIPT= | |
10565 | fi | |
10566 | ||
10567 | ||
10568 | ||
10569 | ||
10570 | ||
10571 | ||
10572 | if test "$HAVE_LIBIPT" != yes; then | |
10573 | if test "$with_intel_pt" = yes; then | |
10574 | as_fn_error "libipt is missing or unusable" "$LINENO" 5 | |
10575 | else | |
10576 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
10577 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
10578 | fi | |
10579 | fi | |
10580 | fi | |
10581 | ||
81ecdfbb RW |
10582 | # ------------------------- # |
10583 | # Checks for header files. # | |
10584 | # ------------------------- # | |
c890192f | 10585 | |
81ecdfbb RW |
10586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
10587 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
10588 | if test "${ac_cv_header_stdc+set}" = set; then : | |
10589 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10590 | else |
81ecdfbb | 10591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10592 | /* end confdefs.h. */ |
81ecdfbb RW |
10593 | #include <stdlib.h> |
10594 | #include <stdarg.h> | |
10595 | #include <string.h> | |
10596 | #include <float.h> | |
10597 | ||
a9322a30 TT |
10598 | int |
10599 | main () | |
10600 | { | |
a9322a30 TT |
10601 | |
10602 | ; | |
10603 | return 0; | |
10604 | } | |
bec39cab | 10605 | _ACEOF |
81ecdfbb RW |
10606 | if ac_fn_c_try_compile "$LINENO"; then : |
10607 | ac_cv_header_stdc=yes | |
bec39cab | 10608 | else |
81ecdfbb | 10609 | ac_cv_header_stdc=no |
a9322a30 | 10610 | fi |
81ecdfbb | 10611 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 10612 | |
81ecdfbb RW |
10613 | if test $ac_cv_header_stdc = yes; then |
10614 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
10615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10616 | /* end confdefs.h. */ | |
10617 | #include <string.h> | |
bec39cab | 10618 | |
81ecdfbb RW |
10619 | _ACEOF |
10620 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10621 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 10622 | |
bec39cab | 10623 | else |
81ecdfbb RW |
10624 | ac_cv_header_stdc=no |
10625 | fi | |
10626 | rm -f conftest* | |
10627 | ||
10628 | fi | |
10629 | ||
10630 | if test $ac_cv_header_stdc = yes; then | |
10631 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
10632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10633 | /* end confdefs.h. */ | |
10634 | #include <stdlib.h> | |
10635 | ||
bec39cab | 10636 | _ACEOF |
81ecdfbb RW |
10637 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
10638 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 10639 | |
81ecdfbb RW |
10640 | else |
10641 | ac_cv_header_stdc=no | |
10642 | fi | |
10643 | rm -f conftest* | |
bec39cab | 10644 | |
bec39cab | 10645 | fi |
81ecdfbb RW |
10646 | |
10647 | if test $ac_cv_header_stdc = yes; then | |
10648 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
10649 | if test "$cross_compiling" = yes; then : | |
10650 | : | |
bec39cab | 10651 | else |
81ecdfbb | 10652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10653 | /* end confdefs.h. */ |
81ecdfbb RW |
10654 | #include <ctype.h> |
10655 | #include <stdlib.h> | |
10656 | #if ((' ' & 0x0FF) == 0x020) | |
10657 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
10658 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
10659 | #else | |
10660 | # define ISLOWER(c) \ | |
10661 | (('a' <= (c) && (c) <= 'i') \ | |
10662 | || ('j' <= (c) && (c) <= 'r') \ | |
10663 | || ('s' <= (c) && (c) <= 'z')) | |
10664 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
10665 | #endif | |
10666 | ||
10667 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
10668 | int |
10669 | main () | |
10670 | { | |
81ecdfbb RW |
10671 | int i; |
10672 | for (i = 0; i < 256; i++) | |
10673 | if (XOR (islower (i), ISLOWER (i)) | |
10674 | || toupper (i) != TOUPPER (i)) | |
10675 | return 2; | |
a9322a30 TT |
10676 | return 0; |
10677 | } | |
bec39cab | 10678 | _ACEOF |
81ecdfbb RW |
10679 | if ac_fn_c_try_run "$LINENO"; then : |
10680 | ||
bec39cab | 10681 | else |
81ecdfbb RW |
10682 | ac_cv_header_stdc=no |
10683 | fi | |
10684 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10685 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10686 | fi | |
bec39cab | 10687 | |
bec39cab | 10688 | fi |
a9322a30 | 10689 | fi |
81ecdfbb RW |
10690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
10691 | $as_echo "$ac_cv_header_stdc" >&6; } | |
10692 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 10693 | |
81ecdfbb | 10694 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 10695 | |
81ecdfbb | 10696 | fi |
bec39cab | 10697 | |
81ecdfbb | 10698 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 10699 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 10700 | thread_db.h \ |
0080a2f6 | 10701 | sys/fault.h \ |
81ecdfbb RW |
10702 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
10703 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
10704 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9467110b | 10705 | termios.h termio.h \ |
3447c057 | 10706 | sgtty.h elf_hp.h \ |
9467110b | 10707 | dlfcn.h |
81ecdfbb RW |
10708 | do : |
10709 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10710 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10711 | eval as_val=\$$as_ac_Header | |
10712 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10713 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10714 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10715 | _ACEOF |
c906108c | 10716 | |
bec39cab | 10717 | fi |
81ecdfbb RW |
10718 | |
10719 | done | |
10720 | ||
81ecdfbb RW |
10721 | for ac_header in sys/proc.h |
10722 | do : | |
10723 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
10724 | # include <sys/param.h> | |
10725 | #endif | |
c906108c | 10726 | |
81ecdfbb RW |
10727 | " |
10728 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 10729 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10730 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 10731 | _ACEOF |
5ee754fc | 10732 | |
bec39cab | 10733 | fi |
81ecdfbb RW |
10734 | |
10735 | done | |
10736 | ||
10737 | for ac_header in sys/user.h | |
10738 | do : | |
10739 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
10740 | # include <sys/param.h> | |
a9322a30 TT |
10741 | #endif |
10742 | ||
81ecdfbb RW |
10743 | " |
10744 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
10745 | cat >>confdefs.h <<_ACEOF | |
10746 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 10747 | _ACEOF |
bec39cab | 10748 | |
a9322a30 | 10749 | fi |
bec39cab | 10750 | |
81ecdfbb | 10751 | done |
5ee754fc | 10752 | |
5ee754fc | 10753 | |
81ecdfbb RW |
10754 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
10755 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
10756 | # think that we don't have <curses.h> if we're using GCC. | |
10757 | case $host_os in | |
10758 | solaris2.[789]) | |
10759 | if test "$GCC" = yes; then | |
10760 | ||
10761 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
10762 | ||
10763 | fi ;; | |
10764 | esac | |
10765 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
10766 | do : | |
10767 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10768 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10769 | eval as_val=\$$as_ac_Header | |
10770 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10771 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10772 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10773 | _ACEOF |
5ee754fc MK |
10774 | |
10775 | fi | |
10776 | ||
81ecdfbb | 10777 | done |
bec39cab | 10778 | |
81ecdfbb RW |
10779 | for ac_header in term.h |
10780 | do : | |
10781 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
10782 | # include <curses.h> | |
10783 | #endif | |
bec39cab | 10784 | |
81ecdfbb RW |
10785 | " |
10786 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
10787 | cat >>confdefs.h <<_ACEOF | |
10788 | #define HAVE_TERM_H 1 | |
a8111142 | 10789 | _ACEOF |
a8111142 | 10790 | |
a8111142 | 10791 | fi |
a8111142 | 10792 | |
81ecdfbb | 10793 | done |
a8111142 TT |
10794 | |
10795 | ||
81ecdfbb RW |
10796 | # ------------------------- # |
10797 | # Checks for declarations. # | |
10798 | # ------------------------- # | |
a9322a30 | 10799 | |
07697489 PA |
10800 | |
10801 | # Check for presence and size of long long. | |
10802 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
10803 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
10804 | ||
10805 | cat >>confdefs.h <<_ACEOF | |
10806 | #define HAVE_LONG_LONG 1 | |
10807 | _ACEOF | |
10808 | ||
10809 | # The cast to long int works around a bug in the HP C Compiler | |
10810 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
10811 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
10812 | # This bug is HP SR number 8606223364. | |
10813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
10814 | $as_echo_n "checking size of long long... " >&6; } | |
10815 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
10816 | $as_echo_n "(cached) " >&6 | |
10817 | else | |
10818 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
10819 | ||
10820 | else | |
10821 | if test "$ac_cv_type_long_long" = yes; then | |
10822 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10823 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10824 | { as_fn_set_status 77 | |
10825 | as_fn_error "cannot compute sizeof (long long) | |
10826 | See \`config.log' for more details." "$LINENO" 5; }; } | |
10827 | else | |
10828 | ac_cv_sizeof_long_long=0 | |
10829 | fi | |
10830 | fi | |
10831 | ||
10832 | fi | |
10833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
10834 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
10835 | ||
10836 | ||
10837 | ||
10838 | cat >>confdefs.h <<_ACEOF | |
10839 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
10840 | _ACEOF | |
10841 | ||
10842 | ||
10843 | fi | |
10844 | ||
10845 | ||
10846 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" | |
10847 | if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : | |
10848 | ac_have_decl=1 | |
10849 | else | |
10850 | ac_have_decl=0 | |
10851 | fi | |
10852 | ||
10853 | cat >>confdefs.h <<_ACEOF | |
10854 | #define HAVE_DECL_BASENAME $ac_have_decl | |
10855 | _ACEOF | |
10856 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
10857 | if test "x$ac_cv_have_decl_ffs" = x""yes; then : | |
10858 | ac_have_decl=1 | |
10859 | else | |
10860 | ac_have_decl=0 | |
10861 | fi | |
10862 | ||
10863 | cat >>confdefs.h <<_ACEOF | |
10864 | #define HAVE_DECL_FFS $ac_have_decl | |
10865 | _ACEOF | |
10866 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
10867 | if test "x$ac_cv_have_decl_asprintf" = x""yes; then : | |
10868 | ac_have_decl=1 | |
10869 | else | |
10870 | ac_have_decl=0 | |
10871 | fi | |
10872 | ||
10873 | cat >>confdefs.h <<_ACEOF | |
10874 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
10875 | _ACEOF | |
10876 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
10877 | if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : | |
10878 | ac_have_decl=1 | |
10879 | else | |
10880 | ac_have_decl=0 | |
10881 | fi | |
10882 | ||
10883 | cat >>confdefs.h <<_ACEOF | |
10884 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10885 | _ACEOF | |
10886 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
10887 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
10888 | ac_have_decl=1 | |
10889 | else | |
10890 | ac_have_decl=0 | |
10891 | fi | |
10892 | ||
10893 | cat >>confdefs.h <<_ACEOF | |
10894 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
10895 | _ACEOF | |
10896 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
10897 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
10898 | ac_have_decl=1 | |
10899 | else | |
10900 | ac_have_decl=0 | |
10901 | fi | |
10902 | ||
10903 | cat >>confdefs.h <<_ACEOF | |
10904 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10905 | _ACEOF | |
10906 | ||
10907 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
10908 | if test "x$ac_cv_have_decl_strtol" = x""yes; then : | |
10909 | ac_have_decl=1 | |
10910 | else | |
10911 | ac_have_decl=0 | |
10912 | fi | |
10913 | ||
10914 | cat >>confdefs.h <<_ACEOF | |
10915 | #define HAVE_DECL_STRTOL $ac_have_decl | |
10916 | _ACEOF | |
10917 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
10918 | if test "x$ac_cv_have_decl_strtoul" = x""yes; then : | |
10919 | ac_have_decl=1 | |
10920 | else | |
10921 | ac_have_decl=0 | |
10922 | fi | |
10923 | ||
10924 | cat >>confdefs.h <<_ACEOF | |
10925 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
10926 | _ACEOF | |
10927 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
10928 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
10929 | ac_have_decl=1 | |
10930 | else | |
10931 | ac_have_decl=0 | |
10932 | fi | |
10933 | ||
10934 | cat >>confdefs.h <<_ACEOF | |
10935 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
10936 | _ACEOF | |
10937 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
10938 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
10939 | ac_have_decl=1 | |
10940 | else | |
10941 | ac_have_decl=0 | |
10942 | fi | |
10943 | ||
10944 | cat >>confdefs.h <<_ACEOF | |
10945 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
10946 | _ACEOF | |
10947 | ||
10948 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
10949 | if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : | |
10950 | ac_have_decl=1 | |
10951 | else | |
10952 | ac_have_decl=0 | |
10953 | fi | |
10954 | ||
10955 | cat >>confdefs.h <<_ACEOF | |
10956 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
10957 | _ACEOF | |
10958 | ||
10959 | ||
10960 | ||
81ecdfbb RW |
10961 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
10962 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
10963 | ac_have_decl=1 | |
bec39cab | 10964 | else |
81ecdfbb RW |
10965 | ac_have_decl=0 |
10966 | fi | |
10967 | ||
10968 | cat >>confdefs.h <<_ACEOF | |
10969 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 10970 | _ACEOF |
81ecdfbb RW |
10971 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
10972 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
10973 | ac_have_decl=1 | |
10974 | else | |
10975 | ac_have_decl=0 | |
10976 | fi | |
10977 | ||
10978 | cat >>confdefs.h <<_ACEOF | |
10979 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 10980 | _ACEOF |
81ecdfbb RW |
10981 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
10982 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
10983 | ac_have_decl=1 | |
bec39cab | 10984 | else |
81ecdfbb RW |
10985 | ac_have_decl=0 |
10986 | fi | |
bec39cab | 10987 | |
81ecdfbb RW |
10988 | cat >>confdefs.h <<_ACEOF |
10989 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 10990 | _ACEOF |
81ecdfbb RW |
10991 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
10992 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
10993 | ac_have_decl=1 | |
10994 | else | |
10995 | ac_have_decl=0 | |
5ee754fc | 10996 | fi |
81ecdfbb RW |
10997 | |
10998 | cat >>confdefs.h <<_ACEOF | |
10999 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 11000 | _ACEOF |
5ee754fc | 11001 | |
5ee754fc | 11002 | |
81ecdfbb RW |
11003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11004 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11005 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11006 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11007 | else |
81ecdfbb | 11008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11009 | /* end confdefs.h. */ |
81ecdfbb | 11010 | #include <locale.h> |
a9322a30 TT |
11011 | int |
11012 | main () | |
11013 | { | |
81ecdfbb | 11014 | return LC_MESSAGES |
a9322a30 TT |
11015 | ; |
11016 | return 0; | |
11017 | } | |
bec39cab | 11018 | _ACEOF |
81ecdfbb RW |
11019 | if ac_fn_c_try_link "$LINENO"; then : |
11020 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11021 | else |
81ecdfbb RW |
11022 | am_cv_val_LC_MESSAGES=no |
11023 | fi | |
11024 | rm -f core conftest.err conftest.$ac_objext \ | |
11025 | conftest$ac_exeext conftest.$ac_ext | |
11026 | fi | |
11027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11028 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11029 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11030 | |
81ecdfbb RW |
11031 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11032 | ||
11033 | fi | |
11034 | ||
11035 | ||
11036 | # ----------------------- # | |
11037 | # Checks for structures. # | |
11038 | # ----------------------- # | |
11039 | ||
11040 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11041 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11042 | ||
11043 | cat >>confdefs.h <<_ACEOF | |
11044 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11045 | _ACEOF |
7eb368b3 | 11046 | |
81ecdfbb | 11047 | |
7eb368b3 | 11048 | fi |
81ecdfbb RW |
11049 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
11050 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 11051 | |
a9322a30 TT |
11052 | cat >>confdefs.h <<_ACEOF |
11053 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
11054 | _ACEOF |
11055 | ||
a9322a30 | 11056 | |
7eb368b3 NR |
11057 | fi |
11058 | ||
7eb368b3 | 11059 | |
a9322a30 TT |
11060 | # ------------------ # |
11061 | # Checks for types. # | |
11062 | # ------------------ # | |
7eb368b3 | 11063 | |
81ecdfbb | 11064 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
11065 | #include <sys/socket.h> |
11066 | ||
81ecdfbb RW |
11067 | " |
11068 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 11069 | |
a9322a30 TT |
11070 | cat >>confdefs.h <<_ACEOF |
11071 | #define HAVE_SOCKLEN_T 1 | |
11072 | _ACEOF | |
11073 | ||
11074 | ||
11075 | fi | |
11076 | ||
11077 | ||
11078 | # ------------------------------------- # | |
11079 | # Checks for compiler characteristics. # | |
11080 | # ------------------------------------- # | |
11081 | ||
81ecdfbb RW |
11082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11083 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11084 | if test "${ac_cv_c_const+set}" = set; then : | |
11085 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11086 | else |
81ecdfbb | 11087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11088 | /* end confdefs.h. */ |
a9322a30 TT |
11089 | |
11090 | int | |
11091 | main () | |
11092 | { | |
11093 | /* FIXME: Include the comments suggested by Paul. */ | |
11094 | #ifndef __cplusplus | |
11095 | /* Ultrix mips cc rejects this. */ | |
11096 | typedef int charset[2]; | |
81ecdfbb | 11097 | const charset cs; |
a9322a30 | 11098 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
11099 | char const *const *pcpcc; |
11100 | char **ppc; | |
a9322a30 TT |
11101 | /* NEC SVR4.0.2 mips cc rejects this. */ |
11102 | struct point {int x, y;}; | |
11103 | static struct point const zero = {0,0}; | |
11104 | /* AIX XL C 1.02.0.0 rejects this. | |
11105 | It does not let you subtract one const X* pointer from another in | |
11106 | an arm of an if-expression whose if-part is not a constant | |
11107 | expression */ | |
11108 | const char *g = "string"; | |
81ecdfbb | 11109 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 11110 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
11111 | ++pcpcc; |
11112 | ppc = (char**) pcpcc; | |
11113 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
11114 | { /* SCO 3.2v4 cc rejects this. */ |
11115 | char *t; | |
11116 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
11117 | ||
11118 | *t++ = 0; | |
81ecdfbb | 11119 | if (s) return 0; |
a9322a30 TT |
11120 | } |
11121 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
11122 | int x[] = {25, 17}; | |
11123 | const int *foo = &x[0]; | |
11124 | ++foo; | |
11125 | } | |
11126 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
11127 | typedef const int *iptr; | |
11128 | iptr p = 0; | |
11129 | ++p; | |
11130 | } | |
11131 | { /* AIX XL C 1.02.0.0 rejects this saying | |
11132 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
11133 | struct s { int j; const int *ap[3]; }; | |
11134 | struct s *b; b->j = 5; | |
11135 | } | |
11136 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
11137 | const int foo = 10; | |
81ecdfbb | 11138 | if (!foo) return 0; |
a9322a30 | 11139 | } |
81ecdfbb | 11140 | return !cs[0] && !zero.x; |
a9322a30 TT |
11141 | #endif |
11142 | ||
11143 | ; | |
11144 | return 0; | |
11145 | } | |
bec39cab | 11146 | _ACEOF |
81ecdfbb | 11147 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11148 | ac_cv_c_const=yes |
5ee754fc | 11149 | else |
81ecdfbb | 11150 | ac_cv_c_const=no |
5ee754fc | 11151 | fi |
81ecdfbb | 11152 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11153 | fi |
81ecdfbb RW |
11154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
11155 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 11156 | if test $ac_cv_c_const = no; then |
bec39cab | 11157 | |
81ecdfbb | 11158 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 11159 | |
5ee754fc | 11160 | fi |
bec39cab | 11161 | |
81ecdfbb RW |
11162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
11163 | $as_echo_n "checking for inline... " >&6; } | |
11164 | if test "${ac_cv_c_inline+set}" = set; then : | |
11165 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11166 | else |
a9322a30 TT |
11167 | ac_cv_c_inline=no |
11168 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 11169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11170 | /* end confdefs.h. */ |
a9322a30 TT |
11171 | #ifndef __cplusplus |
11172 | typedef int foo_t; | |
11173 | static $ac_kw foo_t static_foo () {return 0; } | |
11174 | $ac_kw foo_t foo () {return 0; } | |
11175 | #endif | |
11176 | ||
bec39cab | 11177 | _ACEOF |
81ecdfbb RW |
11178 | if ac_fn_c_try_compile "$LINENO"; then : |
11179 | ac_cv_c_inline=$ac_kw | |
bec39cab | 11180 | fi |
81ecdfbb RW |
11181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11182 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 11183 | done |
bec39cab | 11184 | |
5ee754fc | 11185 | fi |
81ecdfbb RW |
11186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
11187 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 11188 | |
a9322a30 TT |
11189 | case $ac_cv_c_inline in |
11190 | inline | yes) ;; | |
11191 | *) | |
11192 | case $ac_cv_c_inline in | |
11193 | no) ac_val=;; | |
11194 | *) ac_val=$ac_cv_c_inline;; | |
11195 | esac | |
11196 | cat >>confdefs.h <<_ACEOF | |
11197 | #ifndef __cplusplus | |
11198 | #define inline $ac_val | |
11199 | #endif | |
11200 | _ACEOF | |
bec39cab AC |
11201 | ;; |
11202 | esac | |
bec39cab | 11203 | |
81ecdfbb RW |
11204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
11205 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
11206 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
11207 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11208 | else |
81ecdfbb RW |
11209 | ac_cv_c_bigendian=unknown |
11210 | # See if we're dealing with a universal compiler. | |
11211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11212 | /* end confdefs.h. */ | |
11213 | #ifndef __APPLE_CC__ | |
11214 | not a universal capable compiler | |
11215 | #endif | |
11216 | typedef int dummy; | |
11217 | ||
11218 | _ACEOF | |
11219 | if ac_fn_c_try_compile "$LINENO"; then : | |
11220 | ||
11221 | # Check for potential -arch flags. It is not universal unless | |
11222 | # there are at least two -arch flags with different values. | |
11223 | ac_arch= | |
11224 | ac_prev= | |
11225 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
11226 | if test -n "$ac_prev"; then | |
11227 | case $ac_word in | |
11228 | i?86 | x86_64 | ppc | ppc64) | |
11229 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
11230 | ac_arch=$ac_word | |
11231 | else | |
11232 | ac_cv_c_bigendian=universal | |
11233 | break | |
11234 | fi | |
11235 | ;; | |
11236 | esac | |
11237 | ac_prev= | |
11238 | elif test "x$ac_word" = "x-arch"; then | |
11239 | ac_prev=arch | |
11240 | fi | |
11241 | done | |
11242 | fi | |
11243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11244 | if test $ac_cv_c_bigendian = unknown; then | |
11245 | # See if sys/param.h defines the BYTE_ORDER macro. | |
11246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11247 | /* end confdefs.h. */ |
a9322a30 | 11248 | #include <sys/types.h> |
81ecdfbb | 11249 | #include <sys/param.h> |
a9322a30 TT |
11250 | |
11251 | int | |
11252 | main () | |
11253 | { | |
81ecdfbb RW |
11254 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
11255 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
11256 | && LITTLE_ENDIAN) | |
11257 | bogus endian macros | |
11258 | #endif | |
a9322a30 TT |
11259 | |
11260 | ; | |
11261 | return 0; | |
11262 | } | |
bec39cab | 11263 | _ACEOF |
81ecdfbb | 11264 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11265 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 11266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11267 | /* end confdefs.h. */ |
a9322a30 | 11268 | #include <sys/types.h> |
81ecdfbb | 11269 | #include <sys/param.h> |
a9322a30 TT |
11270 | |
11271 | int | |
11272 | main () | |
11273 | { | |
11274 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
11275 | not big endian |
11276 | #endif | |
a9322a30 TT |
11277 | |
11278 | ; | |
11279 | return 0; | |
11280 | } | |
bec39cab | 11281 | _ACEOF |
81ecdfbb | 11282 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11283 | ac_cv_c_bigendian=yes |
5ee754fc | 11284 | else |
81ecdfbb | 11285 | ac_cv_c_bigendian=no |
5ee754fc | 11286 | fi |
81ecdfbb RW |
11287 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11288 | fi | |
11289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11290 | fi | |
11291 | if test $ac_cv_c_bigendian = unknown; then | |
11292 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
11293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11294 | /* end confdefs.h. */ | |
11295 | #include <limits.h> | |
bec39cab | 11296 | |
81ecdfbb RW |
11297 | int |
11298 | main () | |
11299 | { | |
11300 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
11301 | bogus endian macros | |
11302 | #endif | |
11303 | ||
11304 | ; | |
11305 | return 0; | |
11306 | } | |
7eb368b3 | 11307 | _ACEOF |
81ecdfbb RW |
11308 | if ac_fn_c_try_compile "$LINENO"; then : |
11309 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
11310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 11311 | /* end confdefs.h. */ |
81ecdfbb RW |
11312 | #include <limits.h> |
11313 | ||
7eb368b3 NR |
11314 | int |
11315 | main () | |
11316 | { | |
81ecdfbb RW |
11317 | #ifndef _BIG_ENDIAN |
11318 | not big endian | |
11319 | #endif | |
11320 | ||
7eb368b3 NR |
11321 | ; |
11322 | return 0; | |
11323 | } | |
11324 | _ACEOF | |
81ecdfbb | 11325 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11326 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
11327 | else |
11328 | ac_cv_c_bigendian=no | |
a9322a30 | 11329 | fi |
81ecdfbb | 11330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11331 | fi |
81ecdfbb RW |
11332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11333 | fi | |
11334 | if test $ac_cv_c_bigendian = unknown; then | |
11335 | # Compile a test program. | |
11336 | if test "$cross_compiling" = yes; then : | |
11337 | # Try to guess by grepping values from an object file. | |
11338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11339 | /* end confdefs.h. */ | |
11340 | short int ascii_mm[] = | |
11341 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11342 | short int ascii_ii[] = | |
11343 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11344 | int use_ascii (int i) { | |
11345 | return ascii_mm[i] + ascii_ii[i]; | |
11346 | } | |
11347 | short int ebcdic_ii[] = | |
11348 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11349 | short int ebcdic_mm[] = | |
11350 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11351 | int use_ebcdic (int i) { | |
11352 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11353 | } | |
11354 | extern int foo; | |
7eb368b3 | 11355 | |
81ecdfbb RW |
11356 | int |
11357 | main () | |
11358 | { | |
11359 | return use_ascii (foo) == use_ebcdic (foo); | |
11360 | ; | |
11361 | return 0; | |
11362 | } | |
11363 | _ACEOF | |
11364 | if ac_fn_c_try_compile "$LINENO"; then : | |
11365 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
11366 | ac_cv_c_bigendian=yes | |
11367 | fi | |
11368 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
11369 | if test "$ac_cv_c_bigendian" = unknown; then | |
11370 | ac_cv_c_bigendian=no | |
11371 | else | |
11372 | # finding both strings is unlikely to happen, but who knows? | |
11373 | ac_cv_c_bigendian=unknown | |
11374 | fi | |
11375 | fi | |
7eb368b3 | 11376 | fi |
81ecdfbb | 11377 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11378 | else |
81ecdfbb | 11379 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11380 | /* end confdefs.h. */ |
81ecdfbb | 11381 | $ac_includes_default |
d3ea6809 MM |
11382 | int |
11383 | main () | |
11384 | { | |
81ecdfbb RW |
11385 | |
11386 | /* Are we little or big endian? From Harbison&Steele. */ | |
11387 | union | |
11388 | { | |
11389 | long int l; | |
11390 | char c[sizeof (long int)]; | |
11391 | } u; | |
11392 | u.l = 1; | |
11393 | return u.c[sizeof (long int) - 1] == 1; | |
11394 | ||
11395 | ; | |
11396 | return 0; | |
d3ea6809 MM |
11397 | } |
11398 | _ACEOF | |
81ecdfbb | 11399 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11400 | ac_cv_c_bigendian=no |
d3ea6809 | 11401 | else |
81ecdfbb | 11402 | ac_cv_c_bigendian=yes |
d3ea6809 | 11403 | fi |
81ecdfbb RW |
11404 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11405 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11406 | fi |
a9322a30 | 11407 | |
81ecdfbb RW |
11408 | fi |
11409 | fi | |
11410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
11411 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
11412 | case $ac_cv_c_bigendian in #( | |
11413 | yes) | |
11414 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
11415 | ;; #( | |
11416 | no) | |
11417 | ;; #( | |
11418 | universal) | |
11419 | ||
11420 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
11421 | ||
11422 | ;; #( | |
11423 | *) | |
11424 | as_fn_error "unknown endianness | |
11425 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
11426 | esac | |
d3ea6809 MM |
11427 | |
11428 | ||
a9322a30 TT |
11429 | # ------------------------------ # |
11430 | # Checks for library functions. # | |
11431 | # ------------------------------ # | |
d3ea6809 | 11432 | |
a9322a30 | 11433 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
11434 | do : |
11435 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11436 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11437 | eval as_val=\$$as_ac_Header | |
11438 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11439 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11440 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11441 | _ACEOF |
b757528f | 11442 | |
b757528f | 11443 | fi |
bec39cab | 11444 | |
a9322a30 | 11445 | done |
a3828db0 | 11446 | |
a9322a30 | 11447 | for ac_func in getpagesize |
81ecdfbb RW |
11448 | do : |
11449 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
11450 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 11451 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11452 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 11453 | _ACEOF |
bcb3dc3d | 11454 | |
bcb3dc3d MK |
11455 | fi |
11456 | done | |
11457 | ||
81ecdfbb RW |
11458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
11459 | $as_echo_n "checking for working mmap... " >&6; } | |
11460 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
11461 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11462 | else |
81ecdfbb | 11463 | if test "$cross_compiling" = yes; then : |
a9322a30 | 11464 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 11465 | else |
81ecdfbb | 11466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11467 | /* end confdefs.h. */ |
a9322a30 TT |
11468 | $ac_includes_default |
11469 | /* malloc might have been renamed as rpl_malloc. */ | |
11470 | #undef malloc | |
bec39cab | 11471 | |
a9322a30 TT |
11472 | /* Thanks to Mike Haertel and Jim Avera for this test. |
11473 | Here is a matrix of mmap possibilities: | |
11474 | mmap private not fixed | |
11475 | mmap private fixed at somewhere currently unmapped | |
11476 | mmap private fixed at somewhere already mapped | |
11477 | mmap shared not fixed | |
11478 | mmap shared fixed at somewhere currently unmapped | |
11479 | mmap shared fixed at somewhere already mapped | |
11480 | For private mappings, we should verify that changes cannot be read() | |
11481 | back from the file, nor mmap's back from the file at a different | |
11482 | address. (There have been systems where private was not correctly | |
11483 | implemented like the infamous i386 svr4.0, and systems where the | |
11484 | VM page cache was not coherent with the file system buffer cache | |
11485 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
11486 | For shared mappings, we should conversely verify that changes get | |
11487 | propagated back to all the places they're supposed to be. | |
bec39cab | 11488 | |
a9322a30 TT |
11489 | Grep wants private fixed already mapped. |
11490 | The main things grep needs to know about mmap are: | |
11491 | * does it exist and is it safe to write into the mmap'd area | |
11492 | * how to use it (BSD variants) */ | |
8b9cf735 | 11493 | |
a9322a30 TT |
11494 | #include <fcntl.h> |
11495 | #include <sys/mman.h> | |
8b9cf735 | 11496 | |
81ecdfbb | 11497 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 11498 | char *malloc (); |
a3828db0 MK |
11499 | #endif |
11500 | ||
a9322a30 | 11501 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 11502 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 11503 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 11504 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
11505 | # define HAVE_SYS_PARAM_H 1 |
11506 | # endif | |
11507 | ||
11508 | # ifdef _SC_PAGESIZE | |
11509 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
11510 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 11511 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
11512 | # include <sys/param.h> |
11513 | # ifdef EXEC_PAGESIZE | |
11514 | # define getpagesize() EXEC_PAGESIZE | |
11515 | # else /* no EXEC_PAGESIZE */ | |
11516 | # ifdef NBPG | |
11517 | # define getpagesize() NBPG * CLSIZE | |
11518 | # ifndef CLSIZE | |
11519 | # define CLSIZE 1 | |
11520 | # endif /* no CLSIZE */ | |
11521 | # else /* no NBPG */ | |
11522 | # ifdef NBPC | |
11523 | # define getpagesize() NBPC | |
11524 | # else /* no NBPC */ | |
11525 | # ifdef PAGESIZE | |
11526 | # define getpagesize() PAGESIZE | |
11527 | # endif /* PAGESIZE */ | |
11528 | # endif /* no NBPC */ | |
11529 | # endif /* no NBPG */ | |
11530 | # endif /* no EXEC_PAGESIZE */ | |
11531 | # else /* no HAVE_SYS_PARAM_H */ | |
11532 | # define getpagesize() 8192 /* punt totally */ | |
11533 | # endif /* no HAVE_SYS_PARAM_H */ | |
11534 | # endif /* no _SC_PAGESIZE */ | |
11535 | ||
11536 | #endif /* no HAVE_GETPAGESIZE */ | |
11537 | ||
bec39cab AC |
11538 | int |
11539 | main () | |
11540 | { | |
a9322a30 TT |
11541 | char *data, *data2, *data3; |
11542 | int i, pagesize; | |
11543 | int fd; | |
11544 | ||
11545 | pagesize = getpagesize (); | |
11546 | ||
11547 | /* First, make a file with some known garbage in it. */ | |
11548 | data = (char *) malloc (pagesize); | |
11549 | if (!data) | |
81ecdfbb | 11550 | return 1; |
a9322a30 TT |
11551 | for (i = 0; i < pagesize; ++i) |
11552 | *(data + i) = rand (); | |
11553 | umask (0); | |
11554 | fd = creat ("conftest.mmap", 0600); | |
11555 | if (fd < 0) | |
81ecdfbb | 11556 | return 1; |
a9322a30 | 11557 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 11558 | return 1; |
a9322a30 TT |
11559 | close (fd); |
11560 | ||
11561 | /* Next, try to mmap the file at a fixed address which already has | |
11562 | something else allocated at it. If we can, also make sure that | |
11563 | we see the same garbage. */ | |
11564 | fd = open ("conftest.mmap", O_RDWR); | |
11565 | if (fd < 0) | |
81ecdfbb | 11566 | return 1; |
a9322a30 TT |
11567 | data2 = (char *) malloc (2 * pagesize); |
11568 | if (!data2) | |
81ecdfbb RW |
11569 | return 1; |
11570 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
11571 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
11572 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 11573 | return 1; |
a9322a30 TT |
11574 | for (i = 0; i < pagesize; ++i) |
11575 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 11576 | return 1; |
a9322a30 TT |
11577 | |
11578 | /* Finally, make sure that changes to the mapped area do not | |
11579 | percolate back to the file as seen by read(). (This is a bug on | |
11580 | some variants of i386 svr4.0.) */ | |
11581 | for (i = 0; i < pagesize; ++i) | |
11582 | *(data2 + i) = *(data2 + i) + 1; | |
11583 | data3 = (char *) malloc (pagesize); | |
11584 | if (!data3) | |
81ecdfbb | 11585 | return 1; |
a9322a30 | 11586 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 11587 | return 1; |
a9322a30 TT |
11588 | for (i = 0; i < pagesize; ++i) |
11589 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 11590 | return 1; |
a9322a30 | 11591 | close (fd); |
81ecdfbb | 11592 | return 0; |
bec39cab AC |
11593 | } |
11594 | _ACEOF | |
81ecdfbb | 11595 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11596 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 11597 | else |
81ecdfbb | 11598 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 11599 | fi |
81ecdfbb RW |
11600 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11601 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 11602 | fi |
81ecdfbb | 11603 | |
a9322a30 | 11604 | fi |
81ecdfbb RW |
11605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
11606 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
11607 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
11608 | ||
81ecdfbb | 11609 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 11610 | |
086ec9eb | 11611 | fi |
a9322a30 | 11612 | rm -f conftest.mmap |
a3828db0 | 11613 | |
81ecdfbb RW |
11614 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
11615 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 11616 | |
a9322a30 TT |
11617 | else |
11618 | ||
11619 | cat >>confdefs.h <<_ACEOF | |
11620 | #define pid_t int | |
bec39cab | 11621 | _ACEOF |
086ec9eb MK |
11622 | |
11623 | fi | |
11624 | ||
81ecdfbb RW |
11625 | for ac_header in vfork.h |
11626 | do : | |
11627 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
11628 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 11629 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11630 | #define HAVE_VFORK_H 1 |
bec39cab | 11631 | _ACEOF |
c906108c SS |
11632 | |
11633 | fi | |
a9322a30 | 11634 | |
a3828db0 | 11635 | done |
c906108c | 11636 | |
a9322a30 | 11637 | for ac_func in fork vfork |
81ecdfbb RW |
11638 | do : |
11639 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11640 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11641 | eval as_val=\$$as_ac_var | |
11642 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 11643 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11644 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 11645 | _ACEOF |
b83266a0 | 11646 | |
97bf5e38 | 11647 | fi |
a3828db0 | 11648 | done |
b83266a0 | 11649 | |
a9322a30 | 11650 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
11651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
11652 | $as_echo_n "checking for working fork... " >&6; } | |
11653 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
11654 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11655 | else |
81ecdfbb | 11656 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
11657 | ac_cv_func_fork_works=cross |
11658 | else | |
81ecdfbb RW |
11659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11660 | /* end confdefs.h. */ | |
11661 | $ac_includes_default | |
11662 | int | |
11663 | main () | |
11664 | { | |
11665 | ||
11666 | /* By Ruediger Kuhlmann. */ | |
11667 | return fork () < 0; | |
11668 | ||
11669 | ; | |
11670 | return 0; | |
11671 | } | |
a9322a30 | 11672 | _ACEOF |
81ecdfbb | 11673 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
11674 | ac_cv_func_fork_works=yes |
11675 | else | |
81ecdfbb | 11676 | ac_cv_func_fork_works=no |
a9322a30 | 11677 | fi |
81ecdfbb RW |
11678 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11679 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11680 | fi |
81ecdfbb | 11681 | |
a9322a30 | 11682 | fi |
81ecdfbb RW |
11683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
11684 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
11685 | |
11686 | else | |
11687 | ac_cv_func_fork_works=$ac_cv_func_fork | |
11688 | fi | |
11689 | if test "x$ac_cv_func_fork_works" = xcross; then | |
11690 | case $host in | |
11691 | *-*-amigaos* | *-*-msdosdjgpp*) | |
11692 | # Override, as these systems have only a dummy fork() stub | |
11693 | ac_cv_func_fork_works=no | |
11694 | ;; | |
11695 | *) | |
11696 | ac_cv_func_fork_works=yes | |
11697 | ;; | |
11698 | esac | |
81ecdfbb RW |
11699 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
11700 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
11701 | fi |
11702 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
11703 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
11704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
11705 | $as_echo_n "checking for working vfork... " >&6; } | |
11706 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
11707 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11708 | else |
81ecdfbb | 11709 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
11710 | ac_cv_func_vfork_works=cross |
11711 | else | |
81ecdfbb | 11712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
11713 | /* end confdefs.h. */ |
11714 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 11715 | $ac_includes_default |
a9322a30 | 11716 | #include <sys/wait.h> |
81ecdfbb | 11717 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
11718 | # include <vfork.h> |
11719 | #endif | |
11720 | /* On some sparc systems, changes by the child to local and incoming | |
11721 | argument registers are propagated back to the parent. The compiler | |
11722 | is told about this with #include <vfork.h>, but some compilers | |
11723 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
11724 | static variable whose address is put into a register that is | |
11725 | clobbered by the vfork. */ | |
11726 | static void | |
11727 | #ifdef __cplusplus | |
11728 | sparc_address_test (int arg) | |
11729 | # else | |
11730 | sparc_address_test (arg) int arg; | |
11731 | #endif | |
11732 | { | |
11733 | static pid_t child; | |
11734 | if (!child) { | |
11735 | child = vfork (); | |
11736 | if (child < 0) { | |
11737 | perror ("vfork"); | |
11738 | _exit(2); | |
11739 | } | |
11740 | if (!child) { | |
11741 | arg = getpid(); | |
11742 | write(-1, "", 0); | |
11743 | _exit (arg); | |
11744 | } | |
11745 | } | |
11746 | } | |
11747 | ||
11748 | int | |
11749 | main () | |
11750 | { | |
11751 | pid_t parent = getpid (); | |
11752 | pid_t child; | |
11753 | ||
11754 | sparc_address_test (0); | |
11755 | ||
11756 | child = vfork (); | |
11757 | ||
11758 | if (child == 0) { | |
11759 | /* Here is another test for sparc vfork register problems. This | |
11760 | test uses lots of local variables, at least as many local | |
11761 | variables as main has allocated so far including compiler | |
11762 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
11763 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
11764 | reuse the register of parent for one of the local variables, | |
11765 | since it will think that parent can't possibly be used any more | |
11766 | in this routine. Assigning to the local variable will thus | |
11767 | munge parent in the parent process. */ | |
11768 | pid_t | |
11769 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
11770 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
11771 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
11772 | use the same hardware register for all 8 local variables. */ | |
11773 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
11774 | || p != p5 || p != p6 || p != p7) | |
11775 | _exit(1); | |
11776 | ||
11777 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
11778 | from child file descriptors. If the child closes a descriptor | |
11779 | before it execs or exits, this munges the parent's descriptor | |
11780 | as well. Test for this by closing stdout in the child. */ | |
11781 | _exit(close(fileno(stdout)) != 0); | |
11782 | } else { | |
11783 | int status; | |
11784 | struct stat st; | |
11785 | ||
11786 | while (wait(&status) != child) | |
11787 | ; | |
81ecdfbb | 11788 | return ( |
a9322a30 TT |
11789 | /* Was there some problem with vforking? */ |
11790 | child < 0 | |
11791 | ||
11792 | /* Did the child fail? (This shouldn't happen.) */ | |
11793 | || status | |
11794 | ||
11795 | /* Did the vfork/compiler bug occur? */ | |
11796 | || parent != getpid() | |
11797 | ||
11798 | /* Did the file descriptor bug occur? */ | |
11799 | || fstat(fileno(stdout), &st) != 0 | |
11800 | ); | |
11801 | } | |
11802 | } | |
11803 | _ACEOF | |
81ecdfbb | 11804 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
11805 | ac_cv_func_vfork_works=yes |
11806 | else | |
81ecdfbb | 11807 | ac_cv_func_vfork_works=no |
a9322a30 | 11808 | fi |
81ecdfbb RW |
11809 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11810 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11811 | fi |
81ecdfbb | 11812 | |
a9322a30 | 11813 | fi |
81ecdfbb RW |
11814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
11815 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
11816 | |
11817 | fi; | |
11818 | if test "x$ac_cv_func_fork_works" = xcross; then | |
11819 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
11820 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
11821 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
11822 | fi |
11823 | ||
11824 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
11825 | ||
81ecdfbb | 11826 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
11827 | |
11828 | else | |
11829 | ||
81ecdfbb | 11830 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
11831 | |
11832 | fi | |
11833 | if test "x$ac_cv_func_fork_works" = xyes; then | |
11834 | ||
81ecdfbb | 11835 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
11836 | |
11837 | fi | |
11838 | ||
cdf43629 | 11839 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 11840 | pipe poll pread pread64 pwrite resize_term \ |
7313baad | 11841 | sbrk setpgid setpgrp setsid \ |
9467110b | 11842 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 11843 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 11844 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 11845 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
11846 | do : |
11847 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11848 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11849 | eval as_val=\$$as_ac_var | |
11850 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 11851 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11852 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
11853 | _ACEOF |
11854 | ||
11855 | fi | |
11856 | done | |
11857 | ||
11858 | ||
81ecdfbb RW |
11859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
11860 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
11861 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
11862 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 11863 | else |
81ecdfbb | 11864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
11865 | /* end confdefs.h. */ |
11866 | #include <langinfo.h> | |
11867 | int | |
11868 | main () | |
11869 | { | |
11870 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
11871 | ; |
11872 | return 0; | |
11873 | } | |
11874 | _ACEOF | |
81ecdfbb | 11875 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 11876 | am_cv_langinfo_codeset=yes |
a4db0f07 | 11877 | else |
81ecdfbb | 11878 | am_cv_langinfo_codeset=no |
a4db0f07 | 11879 | fi |
81ecdfbb RW |
11880 | rm -f core conftest.err conftest.$ac_objext \ |
11881 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 11882 | |
a4db0f07 | 11883 | fi |
81ecdfbb RW |
11884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
11885 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
11886 | if test $am_cv_langinfo_codeset = yes; then |
11887 | ||
81ecdfbb | 11888 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 11889 | |
6c7a06a3 | 11890 | fi |
c906108c | 11891 | |
06825bd1 | 11892 | |
3266f10b TT |
11893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11894 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11895 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11896 | $as_echo_n "(cached) " >&6 | |
11897 | else | |
11898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11899 | /* end confdefs.h. */ | |
11900 | #include <stdlib.h> | |
11901 | #include <stdarg.h> | |
11902 | #include <string.h> | |
11903 | #include <float.h> | |
11904 | ||
11905 | int | |
11906 | main () | |
11907 | { | |
11908 | ||
11909 | ; | |
11910 | return 0; | |
11911 | } | |
11912 | _ACEOF | |
11913 | if ac_fn_c_try_compile "$LINENO"; then : | |
11914 | ac_cv_header_stdc=yes | |
11915 | else | |
11916 | ac_cv_header_stdc=no | |
11917 | fi | |
11918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11919 | ||
11920 | if test $ac_cv_header_stdc = yes; then | |
11921 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11923 | /* end confdefs.h. */ | |
11924 | #include <string.h> | |
11925 | ||
11926 | _ACEOF | |
11927 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11928 | $EGREP "memchr" >/dev/null 2>&1; then : | |
11929 | ||
11930 | else | |
11931 | ac_cv_header_stdc=no | |
11932 | fi | |
11933 | rm -f conftest* | |
11934 | ||
11935 | fi | |
11936 | ||
11937 | if test $ac_cv_header_stdc = yes; then | |
11938 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11940 | /* end confdefs.h. */ | |
11941 | #include <stdlib.h> | |
11942 | ||
11943 | _ACEOF | |
11944 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11945 | $EGREP "free" >/dev/null 2>&1; then : | |
11946 | ||
11947 | else | |
11948 | ac_cv_header_stdc=no | |
11949 | fi | |
11950 | rm -f conftest* | |
11951 | ||
11952 | fi | |
11953 | ||
11954 | if test $ac_cv_header_stdc = yes; then | |
11955 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11956 | if test "$cross_compiling" = yes; then : | |
11957 | : | |
11958 | else | |
11959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11960 | /* end confdefs.h. */ | |
11961 | #include <ctype.h> | |
11962 | #include <stdlib.h> | |
11963 | #if ((' ' & 0x0FF) == 0x020) | |
11964 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11965 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11966 | #else | |
11967 | # define ISLOWER(c) \ | |
11968 | (('a' <= (c) && (c) <= 'i') \ | |
11969 | || ('j' <= (c) && (c) <= 'r') \ | |
11970 | || ('s' <= (c) && (c) <= 'z')) | |
11971 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11972 | #endif | |
11973 | ||
11974 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
11975 | int | |
11976 | main () | |
11977 | { | |
11978 | int i; | |
11979 | for (i = 0; i < 256; i++) | |
11980 | if (XOR (islower (i), ISLOWER (i)) | |
11981 | || toupper (i) != TOUPPER (i)) | |
11982 | return 2; | |
11983 | return 0; | |
11984 | } | |
11985 | _ACEOF | |
11986 | if ac_fn_c_try_run "$LINENO"; then : | |
11987 | ||
11988 | else | |
11989 | ac_cv_header_stdc=no | |
11990 | fi | |
11991 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11992 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11993 | fi | |
11994 | ||
11995 | fi | |
11996 | fi | |
11997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
11998 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11999 | if test $ac_cv_header_stdc = yes; then | |
12000 | ||
12001 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
12002 | ||
3266f10b TT |
12003 | fi |
12004 | ||
12005 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
12006 | # for constant arguments. Useless! | |
12007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12008 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12009 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
12010 | $as_echo_n "(cached) " >&6 | |
12011 | else | |
12012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12013 | /* end confdefs.h. */ | |
12014 | #include <alloca.h> | |
12015 | int | |
12016 | main () | |
12017 | { | |
12018 | char *p = (char *) alloca (2 * sizeof (int)); | |
12019 | if (p) return 0; | |
12020 | ; | |
12021 | return 0; | |
12022 | } | |
12023 | _ACEOF | |
12024 | if ac_fn_c_try_link "$LINENO"; then : | |
12025 | ac_cv_working_alloca_h=yes | |
12026 | else | |
12027 | ac_cv_working_alloca_h=no | |
12028 | fi | |
12029 | rm -f core conftest.err conftest.$ac_objext \ | |
12030 | conftest$ac_exeext conftest.$ac_ext | |
12031 | fi | |
12032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
12033 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12034 | if test $ac_cv_working_alloca_h = yes; then | |
12035 | ||
12036 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
12037 | ||
12038 | fi | |
12039 | ||
12040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12041 | $as_echo_n "checking for alloca... " >&6; } | |
12042 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
12043 | $as_echo_n "(cached) " >&6 | |
12044 | else | |
12045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12046 | /* end confdefs.h. */ | |
12047 | #ifdef __GNUC__ | |
12048 | # define alloca __builtin_alloca | |
12049 | #else | |
12050 | # ifdef _MSC_VER | |
12051 | # include <malloc.h> | |
12052 | # define alloca _alloca | |
12053 | # else | |
12054 | # ifdef HAVE_ALLOCA_H | |
12055 | # include <alloca.h> | |
12056 | # else | |
12057 | # ifdef _AIX | |
12058 | #pragma alloca | |
12059 | # else | |
12060 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
12061 | char *alloca (); | |
12062 | # endif | |
12063 | # endif | |
12064 | # endif | |
12065 | # endif | |
12066 | #endif | |
12067 | ||
12068 | int | |
12069 | main () | |
12070 | { | |
12071 | char *p = (char *) alloca (1); | |
12072 | if (p) return 0; | |
12073 | ; | |
12074 | return 0; | |
12075 | } | |
12076 | _ACEOF | |
12077 | if ac_fn_c_try_link "$LINENO"; then : | |
12078 | ac_cv_func_alloca_works=yes | |
12079 | else | |
12080 | ac_cv_func_alloca_works=no | |
12081 | fi | |
12082 | rm -f core conftest.err conftest.$ac_objext \ | |
12083 | conftest$ac_exeext conftest.$ac_ext | |
12084 | fi | |
12085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
12086 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
12087 | ||
12088 | if test $ac_cv_func_alloca_works = yes; then | |
12089 | ||
12090 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
12091 | ||
12092 | else | |
12093 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12094 | # that cause trouble. Some versions do not even contain alloca or | |
12095 | # contain a buggy version. If you still want to use their alloca, | |
12096 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
12097 | ||
12098 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
12099 | ||
12100 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
12101 | ||
12102 | ||
12103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
12104 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
12105 | if test "${ac_cv_os_cray+set}" = set; then : | |
12106 | $as_echo_n "(cached) " >&6 | |
12107 | else | |
12108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12109 | /* end confdefs.h. */ | |
12110 | #if defined CRAY && ! defined CRAY2 | |
12111 | webecray | |
12112 | #else | |
12113 | wenotbecray | |
12114 | #endif | |
12115 | ||
12116 | _ACEOF | |
12117 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12118 | $EGREP "webecray" >/dev/null 2>&1; then : | |
12119 | ac_cv_os_cray=yes | |
12120 | else | |
12121 | ac_cv_os_cray=no | |
12122 | fi | |
12123 | rm -f conftest* | |
12124 | ||
12125 | fi | |
12126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
12127 | $as_echo "$ac_cv_os_cray" >&6; } | |
12128 | if test $ac_cv_os_cray = yes; then | |
12129 | for ac_func in _getb67 GETB67 getb67; do | |
12130 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12131 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12132 | eval as_val=\$$as_ac_var | |
12133 | if test "x$as_val" = x""yes; then : | |
12134 | ||
12135 | cat >>confdefs.h <<_ACEOF | |
12136 | #define CRAY_STACKSEG_END $ac_func | |
12137 | _ACEOF | |
12138 | ||
12139 | break | |
12140 | fi | |
12141 | ||
12142 | done | |
12143 | fi | |
12144 | ||
12145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
12146 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12147 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
12148 | $as_echo_n "(cached) " >&6 | |
12149 | else | |
12150 | if test "$cross_compiling" = yes; then : | |
12151 | ac_cv_c_stack_direction=0 | |
12152 | else | |
12153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12154 | /* end confdefs.h. */ | |
12155 | $ac_includes_default | |
12156 | int | |
12157 | find_stack_direction () | |
12158 | { | |
12159 | static char *addr = 0; | |
12160 | auto char dummy; | |
12161 | if (addr == 0) | |
12162 | { | |
12163 | addr = &dummy; | |
12164 | return find_stack_direction (); | |
12165 | } | |
12166 | else | |
12167 | return (&dummy > addr) ? 1 : -1; | |
12168 | } | |
12169 | ||
12170 | int | |
12171 | main () | |
12172 | { | |
12173 | return find_stack_direction () < 0; | |
12174 | } | |
12175 | _ACEOF | |
12176 | if ac_fn_c_try_run "$LINENO"; then : | |
12177 | ac_cv_c_stack_direction=1 | |
12178 | else | |
12179 | ac_cv_c_stack_direction=-1 | |
12180 | fi | |
12181 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12182 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12183 | fi | |
12184 | ||
12185 | fi | |
12186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12187 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
12188 | cat >>confdefs.h <<_ACEOF | |
12189 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12190 | _ACEOF | |
12191 | ||
12192 | ||
12193 | fi | |
12194 | ||
12195 | ||
12196 | ||
12197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12198 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12199 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12200 | $as_echo_n "(cached) " >&6 | |
12201 | else | |
12202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12203 | /* end confdefs.h. */ | |
12204 | #include <langinfo.h> | |
12205 | int | |
12206 | main () | |
12207 | { | |
12208 | char* cs = nl_langinfo(CODESET); | |
12209 | ; | |
12210 | return 0; | |
12211 | } | |
12212 | _ACEOF | |
12213 | if ac_fn_c_try_link "$LINENO"; then : | |
12214 | am_cv_langinfo_codeset=yes | |
12215 | else | |
12216 | am_cv_langinfo_codeset=no | |
12217 | fi | |
12218 | rm -f core conftest.err conftest.$ac_objext \ | |
12219 | conftest$ac_exeext conftest.$ac_ext | |
12220 | ||
12221 | fi | |
12222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
12223 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12224 | if test $am_cv_langinfo_codeset = yes; then | |
12225 | ||
12226 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
12227 | ||
12228 | fi | |
12229 | ||
12230 | ||
a3d08894 | 12231 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h |
3266f10b TT |
12232 | do : |
12233 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12234 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12235 | eval as_val=\$$as_ac_Header | |
12236 | if test "x$as_val" = x""yes; then : | |
12237 | cat >>confdefs.h <<_ACEOF | |
12238 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12239 | _ACEOF | |
12240 | ||
12241 | fi | |
12242 | ||
12243 | done | |
12244 | ||
12245 | ||
12246 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair | |
12247 | do : | |
12248 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12249 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12250 | eval as_val=\$$as_ac_var | |
12251 | if test "x$as_val" = x""yes; then : | |
12252 | cat >>confdefs.h <<_ACEOF | |
12253 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
12254 | _ACEOF | |
12255 | ||
12256 | fi | |
12257 | done | |
12258 | ||
12259 | ||
12260 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
12261 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
12262 | ac_have_decl=1 | |
12263 | else | |
12264 | ac_have_decl=0 | |
12265 | fi | |
12266 | ||
12267 | cat >>confdefs.h <<_ACEOF | |
12268 | #define HAVE_DECL_STRERROR $ac_have_decl | |
12269 | _ACEOF | |
12270 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
12271 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
12272 | ac_have_decl=1 | |
12273 | else | |
12274 | ac_have_decl=0 | |
12275 | fi | |
12276 | ||
12277 | cat >>confdefs.h <<_ACEOF | |
12278 | #define HAVE_DECL_STRSTR $ac_have_decl | |
12279 | _ACEOF | |
12280 | ||
12281 | ||
e9bcb658 GB |
12282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
12283 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
12284 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
12285 | $as_echo_n "(cached) " >&6 | |
12286 | else | |
12287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12288 | /* end confdefs.h. */ | |
12289 | ||
12290 | #include <setjmp.h> | |
12291 | ||
12292 | int | |
12293 | main () | |
12294 | { | |
12295 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
12296 | ; | |
12297 | return 0; | |
12298 | } | |
12299 | _ACEOF | |
12300 | if ac_fn_c_try_compile "$LINENO"; then : | |
12301 | gdb_cv_func_sigsetjmp=yes | |
12302 | else | |
12303 | gdb_cv_func_sigsetjmp=no | |
12304 | fi | |
12305 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12306 | fi | |
12307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
12308 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
12309 | if test $gdb_cv_func_sigsetjmp = yes; then | |
12310 | ||
12311 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
12312 | ||
12313 | fi | |
12314 | ||
3266f10b | 12315 | |
54019719 PA |
12316 | # Check the return and argument types of ptrace. |
12317 | ||
12318 | ||
54019719 PA |
12319 | for ac_header in sys/ptrace.h ptrace.h |
12320 | do : | |
12321 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12322 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12323 | eval as_val=\$$as_ac_Header | |
12324 | if test "x$as_val" = x""yes; then : | |
12325 | cat >>confdefs.h <<_ACEOF | |
12326 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12327 | _ACEOF | |
12328 | ||
12329 | fi | |
12330 | ||
12331 | done | |
12332 | ||
12333 | ||
a3828db0 | 12334 | gdb_ptrace_headers=' |
4ff70b84 | 12335 | #include <sys/types.h> |
a3828db0 MK |
12336 | #if HAVE_SYS_PTRACE_H |
12337 | # include <sys/ptrace.h> | |
12338 | #endif | |
12339 | #if HAVE_UNISTD_H | |
12340 | # include <unistd.h> | |
12341 | #endif | |
12342 | ' | |
12343 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 12344 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb RW |
12345 | " |
12346 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12347 | ac_have_decl=1 | |
06825bd1 | 12348 | else |
81ecdfbb | 12349 | ac_have_decl=0 |
06825bd1 | 12350 | fi |
06825bd1 | 12351 | |
a3828db0 | 12352 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12353 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12354 | _ACEOF |
81ecdfbb | 12355 | if test $ac_have_decl = 1; then : |
bec39cab | 12356 | |
a3828db0 | 12357 | else |
a3828db0 MK |
12358 | |
12359 | : ${gdb_cv_func_ptrace_ret='int'} | |
12360 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12361 | ||
06825bd1 MK |
12362 | fi |
12363 | ||
064ef605 DJ |
12364 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
12365 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
12366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
12367 | $as_echo_n "checking return type of ptrace... " >&6; } | |
12368 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
12369 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12370 | else |
81ecdfbb | 12371 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12372 | /* end confdefs.h. */ |
a3828db0 | 12373 | $gdb_ptrace_headers |
bec39cab AC |
12374 | int |
12375 | main () | |
12376 | { | |
064ef605 DJ |
12377 | extern long ptrace (enum __ptrace_request, ...); |
12378 | ; | |
12379 | return 0; | |
12380 | } | |
12381 | _ACEOF | |
9b30624b | 12382 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12383 | gdb_cv_func_ptrace_ret='long' |
12384 | else | |
81ecdfbb | 12385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12386 | /* end confdefs.h. */ |
12387 | $gdb_ptrace_headers | |
12388 | int | |
12389 | main () | |
12390 | { | |
a3828db0 | 12391 | extern int ptrace (); |
bec39cab AC |
12392 | ; |
12393 | return 0; | |
12394 | } | |
12395 | _ACEOF | |
9b30624b | 12396 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12397 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 12398 | else |
81ecdfbb | 12399 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 12400 | fi |
81ecdfbb | 12401 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 12402 | fi |
81ecdfbb | 12403 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 12404 | fi |
81ecdfbb RW |
12405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
12406 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 12407 | |
a3828db0 MK |
12408 | cat >>confdefs.h <<_ACEOF |
12409 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 12410 | _ACEOF |
70f9f479 | 12411 | |
a3828db0 | 12412 | # Check argument types. |
81ecdfbb RW |
12413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
12414 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
12415 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
12416 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12417 | else |
a3828db0 | 12418 | |
81ecdfbb | 12419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12420 | /* end confdefs.h. */ |
12421 | $gdb_ptrace_headers | |
12422 | int | |
12423 | main () | |
12424 | { | |
12425 | extern long ptrace (enum __ptrace_request, ...); | |
12426 | ; | |
12427 | return 0; | |
12428 | } | |
12429 | _ACEOF | |
9b30624b | 12430 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 12431 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
064ef605 | 12432 | else |
064ef605 | 12433 | |
a3828db0 MK |
12434 | for gdb_arg1 in 'int' 'long'; do |
12435 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 12436 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 12437 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 12438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12439 | /* end confdefs.h. */ |
a3828db0 | 12440 | $gdb_ptrace_headers |
bec39cab AC |
12441 | int |
12442 | main () | |
12443 | { | |
a3828db0 MK |
12444 | |
12445 | extern $gdb_cv_func_ptrace_ret | |
12446 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
12447 | ||
bec39cab AC |
12448 | ; |
12449 | return 0; | |
12450 | } | |
12451 | _ACEOF | |
9b30624b | 12452 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12453 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
12454 | break 4; | |
5c7f2947 | 12455 | fi |
81ecdfbb | 12456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 12457 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 12458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12459 | /* end confdefs.h. */ |
a3828db0 | 12460 | $gdb_ptrace_headers |
bec39cab AC |
12461 | int |
12462 | main () | |
12463 | { | |
a3828db0 MK |
12464 | |
12465 | extern $gdb_cv_func_ptrace_ret | |
12466 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
12467 | ||
bec39cab AC |
12468 | ; |
12469 | return 0; | |
12470 | } | |
12471 | _ACEOF | |
9b30624b | 12472 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12473 | |
12474 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
12475 | break 5; | |
78434e59 | 12476 | fi |
81ecdfbb | 12477 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
12478 | done |
12479 | done | |
12480 | done | |
12481 | done | |
12482 | done | |
12483 | # Provide a safe default value. | |
12484 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12485 | ||
064ef605 | 12486 | fi |
81ecdfbb | 12487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 12488 | fi |
81ecdfbb RW |
12489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
12490 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
12491 | ac_save_IFS=$IFS; IFS=',' |
12492 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
12493 | IFS=$ac_save_IFS | |
12494 | shift | |
bec39cab | 12495 | |
54019719 PA |
12496 | cat >>confdefs.h <<_ACEOF |
12497 | #define PTRACE_TYPE_ARG1 $1 | |
12498 | _ACEOF | |
12499 | ||
12500 | ||
a3828db0 MK |
12501 | cat >>confdefs.h <<_ACEOF |
12502 | #define PTRACE_TYPE_ARG3 $3 | |
12503 | _ACEOF | |
12504 | ||
96d7229d LM |
12505 | |
12506 | cat >>confdefs.h <<_ACEOF | |
12507 | #define PTRACE_TYPE_ARG4 $4 | |
12508 | _ACEOF | |
12509 | ||
a3828db0 MK |
12510 | if test -n "$5"; then |
12511 | ||
12512 | cat >>confdefs.h <<_ACEOF | |
12513 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 12514 | _ACEOF |
78434e59 MK |
12515 | |
12516 | fi | |
12517 | ||
54019719 | 12518 | |
a3828db0 | 12519 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
12520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12521 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12522 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12523 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 12524 | else |
81ecdfbb RW |
12525 | if test "$cross_compiling" = yes; then : |
12526 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 12527 | else |
81ecdfbb | 12528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12529 | /* end confdefs.h. */ |
81ecdfbb | 12530 | $ac_includes_default |
bec39cab AC |
12531 | int |
12532 | main () | |
12533 | { | |
a3828db0 MK |
12534 | /* If this system has a BSD-style setpgrp which takes arguments, |
12535 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
12536 | exit successfully. */ | |
81ecdfbb | 12537 | return setpgrp (1,1) != -1; |
bec39cab AC |
12538 | ; |
12539 | return 0; | |
12540 | } | |
12541 | _ACEOF | |
81ecdfbb | 12542 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 12543 | ac_cv_func_setpgrp_void=no |
c906108c | 12544 | else |
81ecdfbb | 12545 | ac_cv_func_setpgrp_void=yes |
c906108c | 12546 | fi |
81ecdfbb RW |
12547 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12548 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12549 | fi |
81ecdfbb | 12550 | |
a3828db0 | 12551 | fi |
81ecdfbb RW |
12552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12553 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
12554 | if test $ac_cv_func_setpgrp_void = yes; then |
12555 | ||
81ecdfbb | 12556 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
12557 | |
12558 | fi | |
a3828db0 MK |
12559 | |
12560 | else | |
81ecdfbb RW |
12561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12562 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12563 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12564 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12565 | else |
81ecdfbb | 12566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12567 | /* end confdefs.h. */ |
a3828db0 MK |
12568 | |
12569 | #include <unistd.h> | |
12570 | ||
bec39cab AC |
12571 | int |
12572 | main () | |
12573 | { | |
a3828db0 MK |
12574 | |
12575 | if (setpgrp(1,1) == -1) | |
12576 | exit (0); | |
12577 | else | |
12578 | exit (1); | |
12579 | ||
bec39cab AC |
12580 | ; |
12581 | return 0; | |
12582 | } | |
12583 | _ACEOF | |
81ecdfbb | 12584 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12585 | ac_cv_func_setpgrp_void=no |
c906108c | 12586 | else |
81ecdfbb | 12587 | ac_cv_func_setpgrp_void=yes |
c906108c | 12588 | fi |
81ecdfbb | 12589 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12590 | fi |
81ecdfbb RW |
12591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12592 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 12593 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 12594 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 12595 | |
a3828db0 | 12596 | fi |
c906108c SS |
12597 | fi |
12598 | ||
db1ff28b JK |
12599 | # Assume we'll default to using the included libiberty regex. |
12600 | gdb_use_included_regex=yes | |
12601 | ||
12602 | # However, if the system regex is GNU regex, then default to *not* | |
12603 | # using the included regex. | |
12604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
12605 | $as_echo_n "checking for GNU regex... " >&6; } | |
12606 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
12607 | $as_echo_n "(cached) " >&6 | |
12608 | else | |
12609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12610 | /* end confdefs.h. */ | |
12611 | #include <gnu-versions.h> | |
12612 | int | |
12613 | main () | |
12614 | { | |
12615 | #define REGEX_INTERFACE_VERSION 1 | |
12616 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
12617 | # error "Version mismatch" | |
12618 | #endif | |
12619 | ; | |
12620 | return 0; | |
12621 | } | |
12622 | _ACEOF | |
12623 | if ac_fn_c_try_compile "$LINENO"; then : | |
12624 | gdb_cv_have_gnu_regex=yes | |
12625 | else | |
12626 | gdb_cv_have_gnu_regex=no | |
12627 | fi | |
12628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12629 | fi | |
12630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
12631 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
12632 | if test $gdb_cv_have_gnu_regex = yes; then | |
12633 | gdb_use_included_regex=no | |
12634 | fi | |
12635 | ||
12636 | ||
12637 | # Check whether --with-included-regex was given. | |
12638 | if test "${with_included_regex+set}" = set; then : | |
12639 | withval=$with_included_regex; gdb_with_regex=$withval | |
12640 | else | |
12641 | gdb_with_regex=$gdb_use_included_regex | |
12642 | fi | |
12643 | ||
12644 | if test "$gdb_with_regex" = yes; then | |
12645 | ||
12646 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
12647 | ||
12648 | fi | |
12649 | ||
81ecdfbb RW |
12650 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
12651 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
12652 | #include <sys/proc.h> | |
12653 | ||
12654 | " | |
12655 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 12656 | |
5c45e068 | 12657 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 12658 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 12659 | _ACEOF |
c906108c | 12660 | |
5c45e068 | 12661 | |
97bf5e38 | 12662 | fi |
c906108c | 12663 | |
5c45e068 | 12664 | |
a3828db0 | 12665 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
12666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
12667 | $as_echo_n "checking for struct lwp... " >&6; } | |
12668 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
12669 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12670 | else |
81ecdfbb | 12671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12672 | /* end confdefs.h. */ |
a3828db0 MK |
12673 | #include <sys/param.h> |
12674 | #include <sys/lwp.h> | |
bec39cab AC |
12675 | int |
12676 | main () | |
12677 | { | |
a3828db0 | 12678 | struct lwp l; |
bec39cab AC |
12679 | ; |
12680 | return 0; | |
12681 | } | |
12682 | _ACEOF | |
81ecdfbb | 12683 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12684 | gdb_cv_struct_lwp=yes |
c906108c | 12685 | else |
81ecdfbb | 12686 | gdb_cv_struct_lwp=no |
c906108c | 12687 | fi |
81ecdfbb | 12688 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12689 | fi |
81ecdfbb RW |
12690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
12691 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 12692 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 12693 | |
81ecdfbb | 12694 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 12695 | |
97bf5e38 | 12696 | fi |
c906108c | 12697 | |
a3828db0 | 12698 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
12699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
12700 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
12701 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
12702 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12703 | else |
81ecdfbb | 12704 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12705 | /* end confdefs.h. */ |
a3828db0 MK |
12706 | #include <sys/types.h> |
12707 | #include <machine/reg.h> | |
bec39cab AC |
12708 | int |
12709 | main () | |
12710 | { | |
a3828db0 | 12711 | struct reg r; |
bec39cab AC |
12712 | ; |
12713 | return 0; | |
12714 | } | |
12715 | _ACEOF | |
81ecdfbb | 12716 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12717 | gdb_cv_struct_reg=yes |
27ca5dad | 12718 | else |
81ecdfbb | 12719 | gdb_cv_struct_reg=no |
27ca5dad | 12720 | fi |
81ecdfbb | 12721 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 12722 | fi |
81ecdfbb RW |
12723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
12724 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 12725 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 12726 | |
81ecdfbb | 12727 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
12728 | |
12729 | fi | |
97bf5e38 | 12730 | |
a3828db0 MK |
12731 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
12732 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
a6e69c1f JB |
12733 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
12734 | #include <machine/reg.h> | |
81ecdfbb RW |
12735 | " |
12736 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
12737 | |
12738 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12739 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 12740 | _ACEOF |
3862412b | 12741 | |
5c45e068 | 12742 | |
97bf5e38 | 12743 | fi |
a6e69c1f JB |
12744 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
12745 | #include <machine/reg.h> | |
81ecdfbb RW |
12746 | " |
12747 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
12748 | |
12749 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12750 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 12751 | _ACEOF |
3862412b | 12752 | |
5c45e068 | 12753 | |
97bf5e38 | 12754 | fi |
3862412b | 12755 | |
5c45e068 | 12756 | |
6fea9e18 L |
12757 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
12758 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
12759 | # `struct user_regs_struct'. | |
12760 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h> | |
12761 | " | |
12762 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
12763 | ||
12764 | cat >>confdefs.h <<_ACEOF | |
12765 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
12766 | _ACEOF | |
12767 | ||
12768 | ||
12769 | fi | |
12770 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h> | |
12771 | " | |
12772 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
12773 | ||
12774 | cat >>confdefs.h <<_ACEOF | |
12775 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
12776 | _ACEOF | |
12777 | ||
12778 | ||
12779 | fi | |
12780 | ||
12781 | ||
a3828db0 | 12782 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
12783 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
12784 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
12785 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
12786 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12787 | else |
81ecdfbb | 12788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12789 | /* end confdefs.h. */ |
a3828db0 | 12790 | #include <sys/ptrace.h> |
bec39cab AC |
12791 | int |
12792 | main () | |
12793 | { | |
a3828db0 | 12794 | PTRACE_GETREGS; |
bec39cab AC |
12795 | ; |
12796 | return 0; | |
12797 | } | |
12798 | _ACEOF | |
81ecdfbb | 12799 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12800 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 12801 | else |
81ecdfbb | 12802 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 12803 | fi |
81ecdfbb | 12804 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
12805 | fi |
12806 | ||
81ecdfbb RW |
12807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
12808 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 12809 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 12810 | |
81ecdfbb | 12811 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 12812 | |
97bf5e38 | 12813 | fi |
451928c5 | 12814 | |
a3828db0 | 12815 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
12816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
12817 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
12818 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
12819 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12820 | else |
81ecdfbb | 12821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12822 | /* end confdefs.h. */ |
a3828db0 | 12823 | #include <sys/ptrace.h> |
bec39cab AC |
12824 | int |
12825 | main () | |
12826 | { | |
a3828db0 | 12827 | PTRACE_GETFPXREGS; |
bec39cab AC |
12828 | ; |
12829 | return 0; | |
12830 | } | |
12831 | _ACEOF | |
81ecdfbb | 12832 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12833 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 12834 | else |
81ecdfbb | 12835 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 12836 | fi |
81ecdfbb | 12837 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
12838 | fi |
12839 | ||
81ecdfbb RW |
12840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
12841 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 12842 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 12843 | |
81ecdfbb | 12844 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 12845 | |
97bf5e38 | 12846 | fi |
451928c5 | 12847 | |
a3828db0 | 12848 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
12849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
12850 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
12851 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
12852 | $as_echo_n "(cached) " >&6 | |
3862412b | 12853 | else |
81ecdfbb | 12854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12855 | /* end confdefs.h. */ |
a3828db0 MK |
12856 | #include <sys/types.h> |
12857 | #include <sys/ptrace.h> | |
bec39cab AC |
12858 | int |
12859 | main () | |
12860 | { | |
a3828db0 | 12861 | PT_GETDBREGS; |
bec39cab AC |
12862 | ; |
12863 | return 0; | |
12864 | } | |
12865 | _ACEOF | |
81ecdfbb | 12866 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12867 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 12868 | else |
81ecdfbb | 12869 | gdb_cv_have_pt_getdbregs=no |
3862412b | 12870 | fi |
81ecdfbb | 12871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
12872 | fi |
12873 | ||
81ecdfbb RW |
12874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
12875 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 12876 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 12877 | |
81ecdfbb | 12878 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 12879 | |
97bf5e38 | 12880 | fi |
3862412b | 12881 | |
a3828db0 | 12882 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
12883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
12884 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
12885 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
12886 | $as_echo_n "(cached) " >&6 | |
3862412b | 12887 | else |
81ecdfbb | 12888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12889 | /* end confdefs.h. */ |
a3828db0 MK |
12890 | #include <sys/types.h> |
12891 | #include <sys/ptrace.h> | |
bec39cab AC |
12892 | int |
12893 | main () | |
12894 | { | |
a3828db0 | 12895 | PT_GETXMMREGS; |
bec39cab AC |
12896 | ; |
12897 | return 0; | |
12898 | } | |
12899 | _ACEOF | |
81ecdfbb | 12900 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12901 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 12902 | else |
81ecdfbb | 12903 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 12904 | fi |
81ecdfbb | 12905 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
12906 | fi |
12907 | ||
81ecdfbb RW |
12908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
12909 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 12910 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 12911 | |
81ecdfbb | 12912 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 12913 | |
97bf5e38 | 12914 | fi |
3862412b | 12915 | |
6e9567fe JB |
12916 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
12917 | # Older FreeBSD versions don't have the pl_tdname member of | |
12918 | # `struct ptrace_lwpinfo'. | |
12919 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
12920 | " | |
12921 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then : | |
12922 | ||
12923 | cat >>confdefs.h <<_ACEOF | |
12924 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
12925 | _ACEOF | |
12926 | ||
12927 | ||
12928 | fi | |
12929 | ||
12930 | ||
e6cdd38e JB |
12931 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
12932 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
12933 | # FreeBSD 10.3. | |
12934 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h> | |
12935 | " | |
12936 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then : | |
12937 | ||
12938 | cat >>confdefs.h <<_ACEOF | |
12939 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
12940 | _ACEOF | |
12941 | ||
12942 | ||
12943 | fi | |
12944 | ||
6e9567fe | 12945 | |
05b4bd79 | 12946 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
12947 | |
12948 | if test "${target}" = "${host}"; then | |
12949 | case "${host}" in | |
7b00db47 | 12950 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 12951 | |
81ecdfbb | 12952 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
12953 | |
12954 | ;; | |
c162e8c9 | 12955 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 12956 | |
81ecdfbb | 12957 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
12958 | |
12959 | ;; | |
12960 | mips-sgi-irix5*) | |
12961 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 12962 | |
81ecdfbb | 12963 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
12964 | |
12965 | ;; | |
12966 | esac | |
12967 | fi | |
12968 | ||
12969 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
12970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
12971 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
12972 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
12973 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 12974 | else |
81ecdfbb | 12975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12976 | /* end confdefs.h. */ |
596c9d4b KB |
12977 | |
12978 | #define _SYSCALL32 | |
d30c5336 JK |
12979 | /* Needed for new procfs interface on sparc-solaris. */ |
12980 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 12981 | #include <sys/procfs.h> |
bec39cab AC |
12982 | int |
12983 | main () | |
12984 | { | |
97bf5e38 | 12985 | gregset_t avar |
bec39cab AC |
12986 | ; |
12987 | return 0; | |
12988 | } | |
12989 | _ACEOF | |
81ecdfbb | 12990 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12991 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 12992 | else |
81ecdfbb | 12993 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 12994 | |
596c9d4b | 12995 | fi |
81ecdfbb | 12996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
12997 | fi |
12998 | ||
97bf5e38 | 12999 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13000 | |
81ecdfbb | 13001 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13002 | |
13003 | fi | |
81ecdfbb RW |
13004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13005 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13006 | |
81ecdfbb RW |
13007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13008 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13009 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13010 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13011 | else |
81ecdfbb | 13012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13013 | /* end confdefs.h. */ |
97bf5e38 MK |
13014 | |
13015 | #define _SYSCALL32 | |
d30c5336 JK |
13016 | /* Needed for new procfs interface on sparc-solaris. */ |
13017 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13018 | #include <sys/procfs.h> |
bec39cab AC |
13019 | int |
13020 | main () | |
13021 | { | |
97bf5e38 | 13022 | fpregset_t avar |
bec39cab AC |
13023 | ; |
13024 | return 0; | |
13025 | } | |
13026 | _ACEOF | |
81ecdfbb | 13027 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13028 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13029 | else |
81ecdfbb | 13030 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13031 | |
d84dd0c5 | 13032 | fi |
81ecdfbb | 13033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13034 | fi |
13035 | ||
97bf5e38 | 13036 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13037 | |
81ecdfbb | 13038 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13039 | |
97bf5e38 | 13040 | fi |
81ecdfbb RW |
13041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13042 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13043 | |
81ecdfbb RW |
13044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13045 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13046 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13047 | $as_echo_n "(cached) " >&6 | |
c906108c | 13048 | else |
81ecdfbb | 13049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13050 | /* end confdefs.h. */ |
c906108c | 13051 | |
97bf5e38 | 13052 | #define _SYSCALL32 |
d30c5336 JK |
13053 | /* Needed for new procfs interface on sparc-solaris. */ |
13054 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13055 | #include <sys/procfs.h> |
bec39cab AC |
13056 | int |
13057 | main () | |
13058 | { | |
97bf5e38 | 13059 | prgregset_t avar |
bec39cab AC |
13060 | ; |
13061 | return 0; | |
13062 | } | |
13063 | _ACEOF | |
81ecdfbb | 13064 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13065 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 13066 | else |
81ecdfbb | 13067 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 13068 | |
c906108c | 13069 | fi |
81ecdfbb | 13070 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13071 | fi |
13072 | ||
97bf5e38 | 13073 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 13074 | |
81ecdfbb | 13075 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 13076 | |
97bf5e38 | 13077 | fi |
81ecdfbb RW |
13078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
13079 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 13080 | |
81ecdfbb RW |
13081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
13082 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
13083 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
13084 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13085 | else |
81ecdfbb | 13086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13087 | /* end confdefs.h. */ |
97bf5e38 MK |
13088 | |
13089 | #define _SYSCALL32 | |
d30c5336 JK |
13090 | /* Needed for new procfs interface on sparc-solaris. */ |
13091 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13092 | #include <sys/procfs.h> |
bec39cab AC |
13093 | int |
13094 | main () | |
13095 | { | |
97bf5e38 | 13096 | prfpregset_t avar |
bec39cab AC |
13097 | ; |
13098 | return 0; | |
13099 | } | |
13100 | _ACEOF | |
81ecdfbb | 13101 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13102 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 13103 | else |
81ecdfbb | 13104 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 13105 | |
d45fe813 | 13106 | fi |
81ecdfbb | 13107 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13108 | fi |
13109 | ||
97bf5e38 | 13110 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 13111 | |
81ecdfbb | 13112 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 13113 | |
97bf5e38 | 13114 | fi |
81ecdfbb RW |
13115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
13116 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 13117 | |
81ecdfbb RW |
13118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
13119 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
13120 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
13121 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13122 | else |
81ecdfbb | 13123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13124 | /* end confdefs.h. */ |
97bf5e38 MK |
13125 | |
13126 | #define _SYSCALL32 | |
d30c5336 JK |
13127 | /* Needed for new procfs interface on sparc-solaris. */ |
13128 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13129 | #include <sys/procfs.h> |
bec39cab AC |
13130 | int |
13131 | main () | |
13132 | { | |
97bf5e38 | 13133 | prgregset32_t avar |
bec39cab AC |
13134 | ; |
13135 | return 0; | |
13136 | } | |
13137 | _ACEOF | |
81ecdfbb | 13138 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13139 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 13140 | else |
81ecdfbb | 13141 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 13142 | |
d45fe813 | 13143 | fi |
81ecdfbb | 13144 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13145 | fi |
13146 | ||
97bf5e38 | 13147 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 13148 | |
81ecdfbb | 13149 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 13150 | |
97bf5e38 | 13151 | fi |
81ecdfbb RW |
13152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
13153 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 13154 | |
81ecdfbb RW |
13155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
13156 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
13157 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
13158 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13159 | else |
81ecdfbb | 13160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13161 | /* end confdefs.h. */ |
97bf5e38 | 13162 | |
d45fe813 | 13163 | #define _SYSCALL32 |
d30c5336 JK |
13164 | /* Needed for new procfs interface on sparc-solaris. */ |
13165 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13166 | #include <sys/procfs.h> |
bec39cab AC |
13167 | int |
13168 | main () | |
13169 | { | |
97bf5e38 | 13170 | lwpid_t avar |
bec39cab AC |
13171 | ; |
13172 | return 0; | |
13173 | } | |
13174 | _ACEOF | |
81ecdfbb | 13175 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13176 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 13177 | else |
81ecdfbb | 13178 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 13179 | |
d45fe813 | 13180 | fi |
81ecdfbb | 13181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13182 | fi |
13183 | ||
97bf5e38 | 13184 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 13185 | |
81ecdfbb | 13186 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 13187 | |
97bf5e38 | 13188 | fi |
81ecdfbb RW |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
13190 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 13191 | |
81ecdfbb RW |
13192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
13193 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
13194 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
13195 | $as_echo_n "(cached) " >&6 | |
c906108c | 13196 | else |
81ecdfbb | 13197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13198 | /* end confdefs.h. */ |
c906108c | 13199 | |
97bf5e38 | 13200 | #define _SYSCALL32 |
d30c5336 JK |
13201 | /* Needed for new procfs interface on sparc-solaris. */ |
13202 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13203 | #include <sys/procfs.h> |
bec39cab AC |
13204 | int |
13205 | main () | |
13206 | { | |
97bf5e38 | 13207 | psaddr_t avar |
bec39cab AC |
13208 | ; |
13209 | return 0; | |
13210 | } | |
13211 | _ACEOF | |
81ecdfbb | 13212 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13213 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 13214 | else |
81ecdfbb | 13215 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 13216 | |
c906108c | 13217 | fi |
81ecdfbb | 13218 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13219 | fi |
13220 | ||
97bf5e38 | 13221 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 13222 | |
81ecdfbb | 13223 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 13224 | |
97bf5e38 | 13225 | fi |
81ecdfbb RW |
13226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
13227 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 13228 | |
81ecdfbb RW |
13229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
13230 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
13231 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
13232 | $as_echo_n "(cached) " >&6 | |
c906108c | 13233 | else |
81ecdfbb | 13234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13235 | /* end confdefs.h. */ |
c906108c | 13236 | |
97bf5e38 | 13237 | #define _SYSCALL32 |
d30c5336 JK |
13238 | /* Needed for new procfs interface on sparc-solaris. */ |
13239 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13240 | #include <sys/procfs.h> |
bec39cab AC |
13241 | int |
13242 | main () | |
13243 | { | |
97bf5e38 | 13244 | prsysent_t avar |
bec39cab AC |
13245 | ; |
13246 | return 0; | |
13247 | } | |
13248 | _ACEOF | |
81ecdfbb | 13249 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13250 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 13251 | else |
81ecdfbb | 13252 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 13253 | |
c906108c | 13254 | fi |
81ecdfbb | 13255 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13256 | fi |
13257 | ||
97bf5e38 | 13258 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 13259 | |
81ecdfbb | 13260 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 13261 | |
97bf5e38 | 13262 | fi |
81ecdfbb RW |
13263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
13264 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 13265 | |
81ecdfbb RW |
13266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
13267 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
13268 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
13269 | $as_echo_n "(cached) " >&6 | |
c906108c | 13270 | else |
81ecdfbb | 13271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13272 | /* end confdefs.h. */ |
c906108c | 13273 | |
97bf5e38 | 13274 | #define _SYSCALL32 |
d30c5336 JK |
13275 | /* Needed for new procfs interface on sparc-solaris. */ |
13276 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13277 | #include <sys/procfs.h> |
bec39cab AC |
13278 | int |
13279 | main () | |
13280 | { | |
97bf5e38 | 13281 | pr_sigset_t avar |
bec39cab AC |
13282 | ; |
13283 | return 0; | |
13284 | } | |
13285 | _ACEOF | |
81ecdfbb | 13286 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13287 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 13288 | else |
81ecdfbb | 13289 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 13290 | |
c906108c | 13291 | fi |
81ecdfbb | 13292 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13293 | fi |
13294 | ||
97bf5e38 | 13295 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 13296 | |
81ecdfbb | 13297 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 13298 | |
97bf5e38 | 13299 | fi |
81ecdfbb RW |
13300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
13301 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 13302 | |
81ecdfbb RW |
13303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
13304 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
13305 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
13306 | $as_echo_n "(cached) " >&6 | |
c906108c | 13307 | else |
81ecdfbb | 13308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13309 | /* end confdefs.h. */ |
c906108c | 13310 | |
97bf5e38 | 13311 | #define _SYSCALL32 |
d30c5336 JK |
13312 | /* Needed for new procfs interface on sparc-solaris. */ |
13313 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13314 | #include <sys/procfs.h> |
bec39cab AC |
13315 | int |
13316 | main () | |
13317 | { | |
97bf5e38 | 13318 | pr_sigaction64_t avar |
bec39cab AC |
13319 | ; |
13320 | return 0; | |
13321 | } | |
13322 | _ACEOF | |
81ecdfbb | 13323 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13324 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 13325 | else |
81ecdfbb | 13326 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 13327 | |
c906108c | 13328 | fi |
81ecdfbb | 13329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13330 | fi |
13331 | ||
97bf5e38 | 13332 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 13333 | |
81ecdfbb | 13334 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 13335 | |
97bf5e38 | 13336 | fi |
81ecdfbb RW |
13337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
13338 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 13339 | |
81ecdfbb RW |
13340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
13341 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
13342 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
13343 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13344 | else |
81ecdfbb | 13345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13346 | /* end confdefs.h. */ |
97bf5e38 MK |
13347 | |
13348 | #define _SYSCALL32 | |
d30c5336 JK |
13349 | /* Needed for new procfs interface on sparc-solaris. */ |
13350 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13351 | #include <sys/procfs.h> |
bec39cab AC |
13352 | int |
13353 | main () | |
13354 | { | |
97bf5e38 | 13355 | pr_siginfo64_t avar |
bec39cab AC |
13356 | ; |
13357 | return 0; | |
13358 | } | |
13359 | _ACEOF | |
81ecdfbb | 13360 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13361 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
13362 | else | |
81ecdfbb | 13363 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 13364 | |
97bf5e38 | 13365 | fi |
81ecdfbb | 13366 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13367 | fi |
c906108c | 13368 | |
97bf5e38 | 13369 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 13370 | |
81ecdfbb | 13371 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 13372 | |
97bf5e38 | 13373 | fi |
81ecdfbb RW |
13374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
13375 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
13376 | |
13377 | ||
97bf5e38 MK |
13378 | |
13379 | ||
13380 | ||
97bf5e38 | 13381 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
13382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
13383 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
13384 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
13385 | $as_echo_n "(cached) " >&6 | |
c906108c | 13386 | else |
81ecdfbb | 13387 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 13388 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 13389 | else |
81ecdfbb | 13390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13391 | /* end confdefs.h. */ |
97bf5e38 MK |
13392 | #include <sys/procfs.h> |
13393 | int main () | |
13394 | { | |
13395 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
13396 | return 1; | |
13397 | return 0; | |
13398 | } | |
bec39cab | 13399 | _ACEOF |
81ecdfbb | 13400 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13401 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
13402 | else |
13403 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 13404 | fi |
81ecdfbb RW |
13405 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13406 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13407 | fi |
81ecdfbb | 13408 | |
c906108c SS |
13409 | fi |
13410 | ||
81ecdfbb RW |
13411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
13412 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 13413 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 13414 | |
81ecdfbb | 13415 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 13416 | |
97bf5e38 MK |
13417 | fi |
13418 | fi | |
c906108c | 13419 | fi |
c906108c | 13420 | |
bc8bcb4b | 13421 | # Check if the compiler supports the `long long' type. |
c906108c | 13422 | |
81ecdfbb RW |
13423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
13424 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
13425 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
13426 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13427 | else |
81ecdfbb | 13428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13429 | /* end confdefs.h. */ |
bc8bcb4b | 13430 | extern long long foo; |
bec39cab AC |
13431 | int |
13432 | main () | |
13433 | { | |
bc8bcb4b | 13434 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
13435 | ; |
13436 | return 0; | |
13437 | } | |
13438 | _ACEOF | |
81ecdfbb | 13439 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13440 | gdb_cv_c_long_long=yes |
13441 | else | |
81ecdfbb | 13442 | gdb_cv_c_long_long=no |
97bf5e38 | 13443 | fi |
81ecdfbb | 13444 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13445 | fi |
81ecdfbb RW |
13446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
13447 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
13448 | if test $gdb_cv_c_long_long != yes; then |
13449 | # libdecnumber requires long long. | |
13450 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
13451 | fi |
13452 | ||
bc8bcb4b | 13453 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 13454 | |
81ecdfbb RW |
13455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
13456 | $as_echo_n "checking for long long support in printf... " >&6; } | |
13457 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
13458 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13459 | else |
81ecdfbb | 13460 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13461 | gdb_cv_printf_has_long_long=no |
13462 | else | |
81ecdfbb | 13463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13464 | /* end confdefs.h. */ |
bc8bcb4b MK |
13465 | $ac_includes_default |
13466 | int | |
13467 | main () | |
13468 | { | |
13469 | char buf[32]; | |
97bf5e38 MK |
13470 | long long l = 0; |
13471 | l = (l << 16) + 0x0123; | |
13472 | l = (l << 16) + 0x4567; | |
13473 | l = (l << 16) + 0x89ab; | |
13474 | l = (l << 16) + 0xcdef; | |
13475 | sprintf (buf, "0x%016llx", l); | |
13476 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
13477 | ; |
13478 | return 0; | |
c906108c | 13479 | } |
bec39cab | 13480 | _ACEOF |
81ecdfbb | 13481 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13482 | gdb_cv_printf_has_long_long=yes |
13483 | else | |
81ecdfbb | 13484 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 13485 | fi |
81ecdfbb RW |
13486 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13487 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13488 | fi |
81ecdfbb | 13489 | |
97bf5e38 | 13490 | fi |
81ecdfbb RW |
13491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
13492 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 13493 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 13494 | |
81ecdfbb | 13495 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13496 | |
13497 | fi | |
97bf5e38 | 13498 | |
1a619819 LM |
13499 | # Check if the compiler and runtime support printing decfloats. |
13500 | ||
81ecdfbb RW |
13501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
13502 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
13503 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
13504 | $as_echo_n "(cached) " >&6 | |
1a619819 | 13505 | else |
81ecdfbb | 13506 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
13507 | gdb_cv_printf_has_decfloat=no |
13508 | else | |
81ecdfbb | 13509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
13510 | /* end confdefs.h. */ |
13511 | $ac_includes_default | |
13512 | int | |
13513 | main () | |
13514 | { | |
13515 | char buf[64]; | |
13516 | _Decimal32 d32 = 1.2345df; | |
13517 | _Decimal64 d64 = 1.2345dd; | |
13518 | _Decimal128 d128 = 1.2345dl; | |
13519 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
13520 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
13521 | ; | |
13522 | return 0; | |
13523 | } | |
13524 | _ACEOF | |
81ecdfbb | 13525 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
13526 | gdb_cv_printf_has_decfloat=yes |
13527 | else | |
81ecdfbb | 13528 | gdb_cv_printf_has_decfloat=no |
1a619819 | 13529 | fi |
81ecdfbb RW |
13530 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13531 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 13532 | fi |
81ecdfbb | 13533 | |
1a619819 | 13534 | fi |
81ecdfbb RW |
13535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
13536 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
13537 | if test $gdb_cv_printf_has_decfloat = yes; then |
13538 | ||
81ecdfbb | 13539 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
13540 | |
13541 | fi | |
13542 | ||
bc8bcb4b MK |
13543 | # Check if the compiler supports the `long double' type. We can't use |
13544 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
13545 | # constants defined in <float.h> that fail on some systems, | |
13546 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 13547 | |
81ecdfbb RW |
13548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
13549 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
13550 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
13551 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13552 | else |
81ecdfbb | 13553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13554 | /* end confdefs.h. */ |
97bf5e38 | 13555 | long double foo; |
bec39cab | 13556 | _ACEOF |
81ecdfbb | 13557 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 13558 | gdb_cv_c_long_double=yes |
97bf5e38 | 13559 | else |
81ecdfbb | 13560 | gdb_cv_c_long_double=no |
97bf5e38 | 13561 | fi |
81ecdfbb | 13562 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13563 | fi |
81ecdfbb RW |
13564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
13565 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 13566 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 13567 | |
81ecdfbb | 13568 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13569 | |
13570 | fi | |
13571 | ||
bc8bcb4b | 13572 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 13573 | |
81ecdfbb RW |
13574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
13575 | $as_echo_n "checking for long double support in printf... " >&6; } | |
13576 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
13577 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13578 | else |
81ecdfbb | 13579 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13580 | gdb_cv_printf_has_long_double=no |
13581 | else | |
81ecdfbb | 13582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13583 | /* end confdefs.h. */ |
bc8bcb4b MK |
13584 | $ac_includes_default |
13585 | int | |
13586 | main () | |
13587 | { | |
13588 | char buf[16]; | |
97bf5e38 MK |
13589 | long double f = 3.141592653; |
13590 | sprintf (buf, "%Lg", f); | |
13591 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
13592 | ; |
13593 | return 0; | |
97bf5e38 | 13594 | } |
bec39cab | 13595 | _ACEOF |
81ecdfbb | 13596 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13597 | gdb_cv_printf_has_long_double=yes |
c906108c | 13598 | else |
81ecdfbb | 13599 | gdb_cv_printf_has_long_double=no |
c906108c | 13600 | fi |
81ecdfbb RW |
13601 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13602 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13603 | fi |
81ecdfbb | 13604 | |
c906108c | 13605 | fi |
81ecdfbb RW |
13606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
13607 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 13608 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 13609 | |
81ecdfbb | 13610 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13611 | |
13612 | fi | |
97bf5e38 | 13613 | |
bc8bcb4b | 13614 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 13615 | |
81ecdfbb RW |
13616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
13617 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
13618 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
13619 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13620 | else |
81ecdfbb | 13621 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13622 | gdb_cv_scanf_has_long_double=no |
13623 | else | |
81ecdfbb | 13624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13625 | /* end confdefs.h. */ |
bc8bcb4b MK |
13626 | #include <stdio.h> |
13627 | int | |
13628 | main () | |
13629 | { | |
13630 | char *buf = "3.141592653"; | |
97bf5e38 MK |
13631 | long double f = 0; |
13632 | sscanf (buf, "%Lg", &f); | |
13633 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
13634 | ; |
13635 | return 0; | |
97bf5e38 | 13636 | } |
bec39cab | 13637 | _ACEOF |
81ecdfbb | 13638 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13639 | gdb_cv_scanf_has_long_double=yes |
13640 | else | |
81ecdfbb | 13641 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 13642 | fi |
81ecdfbb RW |
13643 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13644 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13645 | fi |
81ecdfbb | 13646 | |
c906108c | 13647 | fi |
81ecdfbb RW |
13648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
13649 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 13650 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 13651 | |
81ecdfbb | 13652 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13653 | |
13654 | fi | |
c906108c | 13655 | |
438013df AO |
13656 | case ${host_os} in |
13657 | aix*) | |
81ecdfbb RW |
13658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
13659 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
13660 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
13661 | $as_echo_n "(cached) " >&6 | |
438013df | 13662 | else |
bec39cab | 13663 | |
438013df AO |
13664 | SAVE_LDFLAGS=$LDFLAGS |
13665 | ||
13666 | case $GCC in | |
13667 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
13668 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
13669 | esac | |
13670 | ||
13671 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 13672 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13673 | /* end confdefs.h. */ |
438013df | 13674 | |
bec39cab AC |
13675 | int |
13676 | main () | |
13677 | { | |
438013df | 13678 | int i; |
bec39cab AC |
13679 | ; |
13680 | return 0; | |
13681 | } | |
13682 | _ACEOF | |
81ecdfbb | 13683 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13684 | |
81ecdfbb RW |
13685 | else |
13686 | gdb_cv_bigtoc= | |
438013df | 13687 | fi |
81ecdfbb RW |
13688 | rm -f core conftest.err conftest.$ac_objext \ |
13689 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 13690 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 13691 | |
bec39cab | 13692 | fi |
81ecdfbb RW |
13693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
13694 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
13695 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
13696 | ;; | |
13697 | esac | |
13698 | ||
38f6b338 | 13699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 13700 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
13701 | dynamic_list=false |
13702 | if test "${gdb_native}" = yes; then | |
13703 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
13704 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
13705 | # may not be supported there. | |
13706 | old_LDFLAGS="$LDFLAGS" | |
13707 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
13708 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
13709 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
13710 | if test "${have_libpython}" = no; then | |
13711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
13712 | /* end confdefs.h. */ |
13713 | ||
13714 | int | |
13715 | main () | |
13716 | { | |
13717 | ||
13718 | ; | |
13719 | return 0; | |
13720 | } | |
13721 | _ACEOF | |
13722 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
13723 | dynamic_list=true |
13724 | fi | |
13725 | rm -f core conftest.err conftest.$ac_objext \ | |
13726 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
13727 | else |
13728 | # Workaround http://bugs.python.org/issue4434 where static | |
13729 | # libpythonX.Y.a would get its symbols required for | |
13730 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
13731 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
13732 | |
13733 | # Note the workaround for Python | |
13734 | # http://bugs.python.org/issue10112 earlier has removed | |
13735 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
13736 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
13737 | # always pass. | |
38f6b338 JK |
13738 | old_CFLAGS="$CFLAGS" |
13739 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
13740 | old_LIBS="$LIBS" |
13741 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
13742 | old_CPPFLAGS="$CPPFLAGS" |
13743 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 13744 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 13745 | true |
f6528abd | 13746 | else |
3bebe2f2 JK |
13747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13748 | /* end confdefs.h. */ | |
1b4f615e | 13749 | #include "Python.h" |
3bebe2f2 JK |
13750 | int |
13751 | main () | |
13752 | { | |
13753 | int err; | |
38f6b338 JK |
13754 | Py_Initialize (); |
13755 | err = PyRun_SimpleString ("import itertools\n"); | |
13756 | Py_Finalize (); | |
13757 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
13758 | ; |
13759 | return 0; | |
13760 | } | |
13761 | _ACEOF | |
13762 | if ac_fn_c_try_run "$LINENO"; then : | |
13763 | dynamic_list=true | |
13764 | fi | |
13765 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13766 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13767 | fi | |
13768 | ||
8c1fb155 | 13769 | LIBS="$old_LIBS" |
38f6b338 | 13770 | CFLAGS="$old_CFLAGS" |
1b4f615e | 13771 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
13772 | fi |
13773 | LDFLAGS="$old_LDFLAGS" | |
13774 | fi | |
13775 | if $dynamic_list; then | |
13776 | found="-Wl,--dynamic-list" | |
13777 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 13778 | else |
38f6b338 JK |
13779 | found="-rdynamic" |
13780 | RDYNAMIC="-rdynamic" | |
f6528abd | 13781 | fi |
f6528abd | 13782 | |
38f6b338 | 13783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 13784 | $as_echo "$found" >&6; } |
0407b3f1 | 13785 | |
f6528abd | 13786 | |
0407b3f1 | 13787 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 13788 | case ${host_os} in |
c906108c | 13789 | solaris*) |
d92419e5 JB |
13790 | # See if thread_db library is around for Solaris thread debugging. |
13791 | # Note that we must explicitly test for version 1 of the library | |
13792 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
13793 | # the same API. | |
81ecdfbb RW |
13794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
13795 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 13796 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
13797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13798 | $as_echo "yes" >&6; } | |
60ca704f | 13799 | |
81ecdfbb | 13800 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 13801 | |
3483b318 | 13802 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 13803 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
13804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
13805 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
13806 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
13807 | $as_echo_n "(cached) " >&6 | |
c906108c | 13808 | else |
bec39cab | 13809 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 13810 | LIBS="-ldl $LIBS" |
81ecdfbb | 13811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
13812 | /* end confdefs.h. */ |
13813 | ||
81ecdfbb RW |
13814 | /* Override any GCC internal prototype to avoid an error. |
13815 | Use char because int might match the return type of a GCC | |
13816 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
13817 | #ifdef __cplusplus |
13818 | extern "C" | |
13819 | #endif | |
bec39cab AC |
13820 | char dlopen (); |
13821 | int | |
13822 | main () | |
13823 | { | |
81ecdfbb | 13824 | return dlopen (); |
bec39cab AC |
13825 | ; |
13826 | return 0; | |
13827 | } | |
13828 | _ACEOF | |
81ecdfbb | 13829 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
13830 | ac_cv_lib_dl_dlopen=yes |
13831 | else | |
81ecdfbb | 13832 | ac_cv_lib_dl_dlopen=no |
bec39cab | 13833 | fi |
81ecdfbb RW |
13834 | rm -f core conftest.err conftest.$ac_objext \ |
13835 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
13836 | LIBS=$ac_check_lib_save_LIBS |
13837 | fi | |
81ecdfbb RW |
13838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
13839 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
13840 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
13841 | cat >>confdefs.h <<_ACEOF |
13842 | #define HAVE_LIBDL 1 | |
13843 | _ACEOF | |
c906108c SS |
13844 | |
13845 | LIBS="-ldl $LIBS" | |
13846 | ||
c906108c SS |
13847 | fi |
13848 | ||
f6528abd | 13849 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
13850 | # Sun randomly tweaked the prototypes in <proc_service.h> |
13851 | # at one point. | |
81ecdfbb RW |
13852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
13853 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
13854 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
13855 | $as_echo_n "(cached) " >&6 | |
c906108c | 13856 | else |
bec39cab | 13857 | |
81ecdfbb | 13858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13859 | /* end confdefs.h. */ |
c906108c SS |
13860 | |
13861 | #include <proc_service.h> | |
13862 | ps_err_e ps_pdwrite | |
13863 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 13864 | |
bec39cab AC |
13865 | int |
13866 | main () | |
13867 | { | |
13868 | ||
13869 | ; | |
13870 | return 0; | |
13871 | } | |
13872 | _ACEOF | |
81ecdfbb | 13873 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
13874 | gdb_cv_proc_service_is_old=no |
13875 | else | |
81ecdfbb | 13876 | gdb_cv_proc_service_is_old=yes |
c906108c | 13877 | fi |
81ecdfbb | 13878 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13879 | |
c906108c SS |
13880 | fi |
13881 | ||
81ecdfbb RW |
13882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
13883 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 13884 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 13885 | |
81ecdfbb | 13886 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
13887 | |
13888 | fi | |
13889 | else | |
81ecdfbb RW |
13890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13891 | $as_echo "no" >&6; } | |
c906108c SS |
13892 | fi |
13893 | ;; | |
d92419e5 | 13894 | aix*) |
81ecdfbb RW |
13895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
13896 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
13897 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
13898 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13899 | else |
81ecdfbb | 13900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13901 | /* end confdefs.h. */ |
d92419e5 | 13902 | #include <sys/pthdebug.h> |
bec39cab AC |
13903 | int |
13904 | main () | |
13905 | { | |
d92419e5 JB |
13906 | #ifndef PTHDB_VERSION_3 |
13907 | #error | |
13908 | #endif | |
bec39cab AC |
13909 | ; |
13910 | return 0; | |
13911 | } | |
13912 | _ACEOF | |
81ecdfbb | 13913 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
13914 | gdb_cv_have_aix_thread_debug=yes |
13915 | else | |
81ecdfbb | 13916 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 13917 | fi |
81ecdfbb | 13918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
13919 | fi |
13920 | ||
81ecdfbb RW |
13921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
13922 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
13923 | if test $gdb_cv_have_aix_thread_debug = yes; then |
13924 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 13925 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 13926 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
13927 | |
13928 | # Older versions of AIX do not provide the declaration for | |
13929 | # the getthrds function (it appears that it was introduced | |
13930 | # with AIX 6.x). | |
13931 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
13932 | " | |
13933 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
13934 | ac_have_decl=1 | |
13935 | else | |
13936 | ac_have_decl=0 | |
13937 | fi | |
13938 | ||
13939 | cat >>confdefs.h <<_ACEOF | |
13940 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
13941 | _ACEOF | |
13942 | ||
d92419e5 JB |
13943 | fi |
13944 | ;; | |
c906108c | 13945 | esac |
bec39cab | 13946 | |
c906108c SS |
13947 | fi |
13948 | ||
3f47be5c | 13949 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
13950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
13951 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
13952 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
13953 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13954 | else |
81ecdfbb | 13955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13956 | /* end confdefs.h. */ |
3f47be5c | 13957 | #include <thread_db.h> |
bec39cab AC |
13958 | int |
13959 | main () | |
13960 | { | |
3f47be5c | 13961 | int i = TD_NOTALLOC; |
bec39cab AC |
13962 | ; |
13963 | return 0; | |
13964 | } | |
13965 | _ACEOF | |
81ecdfbb | 13966 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
13967 | gdb_cv_thread_db_h_has_td_notalloc=yes |
13968 | else | |
81ecdfbb | 13969 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 13970 | |
3f47be5c | 13971 | fi |
81ecdfbb | 13972 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 13973 | |
bec39cab | 13974 | fi |
81ecdfbb RW |
13975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
13976 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
13977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
13978 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
13979 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
13980 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 13981 | else |
81ecdfbb | 13982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
13983 | /* end confdefs.h. */ |
13984 | #include <thread_db.h> | |
13985 | int | |
13986 | main () | |
13987 | { | |
13988 | int i = TD_VERSION; | |
13989 | ; | |
13990 | return 0; | |
13991 | } | |
13992 | _ACEOF | |
81ecdfbb | 13993 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
13994 | gdb_cv_thread_db_h_has_td_version=yes |
13995 | else | |
81ecdfbb | 13996 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
13997 | |
13998 | fi | |
81ecdfbb | 13999 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14000 | |
14001 | fi | |
81ecdfbb RW |
14002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14003 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14005 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14006 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14007 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14008 | else |
81ecdfbb | 14009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14010 | /* end confdefs.h. */ |
14011 | #include <thread_db.h> | |
14012 | int | |
14013 | main () | |
14014 | { | |
14015 | int i = TD_NOTLS; | |
14016 | ; | |
14017 | return 0; | |
14018 | } | |
14019 | _ACEOF | |
81ecdfbb | 14020 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14021 | gdb_cv_thread_db_h_has_td_notls=yes |
14022 | else | |
81ecdfbb | 14023 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14024 | |
14025 | fi | |
81ecdfbb | 14026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14027 | |
14028 | fi | |
81ecdfbb RW |
14029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14030 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14031 | fi |
14032 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14033 | |
81ecdfbb | 14034 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14035 | |
59f80f10 DJ |
14036 | fi |
14037 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14038 | ||
81ecdfbb | 14039 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14040 | |
14041 | fi | |
14042 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14043 | ||
81ecdfbb | 14044 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14045 | |
3f47be5c EZ |
14046 | fi |
14047 | ||
81ecdfbb RW |
14048 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14049 | " | |
14050 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
14051 | ac_have_decl=1 | |
10568435 | 14052 | else |
81ecdfbb | 14053 | ac_have_decl=0 |
10568435 | 14054 | fi |
10568435 JK |
14055 | |
14056 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 14057 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
14058 | _ACEOF |
14059 | ||
14060 | ||
81ecdfbb RW |
14061 | if test "$cross_compiling" = yes; then : |
14062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
14063 | /* end confdefs.h. */ |
14064 | #include <sys/personality.h> | |
14065 | int | |
14066 | main () | |
14067 | { | |
14068 | ||
14069 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14070 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14071 | # endif | |
14072 | /* Test the flag could be set and stays set. */ | |
14073 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14074 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14075 | return 1 | |
14076 | ; | |
14077 | return 0; | |
14078 | } | |
14079 | _ACEOF | |
81ecdfbb | 14080 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
14081 | have_personality=true |
14082 | else | |
81ecdfbb | 14083 | have_personality=false |
10568435 | 14084 | fi |
81ecdfbb RW |
14085 | rm -f core conftest.err conftest.$ac_objext \ |
14086 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 14087 | else |
81ecdfbb | 14088 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
14089 | /* end confdefs.h. */ |
14090 | #include <sys/personality.h> | |
14091 | int | |
14092 | main () | |
14093 | { | |
14094 | ||
14095 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14096 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14097 | # endif | |
14098 | /* Test the flag could be set and stays set. */ | |
14099 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14100 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14101 | return 1 | |
14102 | ; | |
14103 | return 0; | |
14104 | } | |
14105 | _ACEOF | |
81ecdfbb | 14106 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
14107 | have_personality=true |
14108 | else | |
81ecdfbb | 14109 | have_personality=false |
10568435 | 14110 | fi |
81ecdfbb RW |
14111 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14112 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 14113 | fi |
81ecdfbb | 14114 | |
10568435 JK |
14115 | if $have_personality |
14116 | then | |
14117 | ||
81ecdfbb | 14118 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
14119 | |
14120 | fi | |
14121 | ||
e655c1a2 PA |
14122 | case $host_os in |
14123 | go32* | *djgpp*) | |
14124 | gdbinit=gdb.ini | |
14125 | ;; | |
14126 | *) | |
14127 | gdbinit=.gdbinit | |
14128 | ;; | |
14129 | esac | |
14130 | ||
14131 | cat >>confdefs.h <<_ACEOF | |
14132 | #define GDBINIT "$gdbinit" | |
14133 | _ACEOF | |
14134 | ||
14135 | ||
fb40c209 | 14136 | |
f83d8a90 DE |
14137 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
14138 | # except that the argument to --with-sysroot is optional. | |
14139 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
14140 | if test "x$with_sysroot" = xyes; then | |
14141 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
14142 | fi | |
bec39cab | 14143 | |
81ecdfbb RW |
14144 | # Check whether --with-sysroot was given. |
14145 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
14146 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
14147 | else | |
14148 | TARGET_SYSTEM_ROOT= | |
14149 | fi | |
030292b7 | 14150 | |
030292b7 | 14151 | |
f83d8a90 DE |
14152 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
14153 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
14154 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
14155 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 14156 | |
f83d8a90 DE |
14157 | cat >>confdefs.h <<_ACEOF |
14158 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
14159 | _ACEOF | |
bec39cab | 14160 | |
030292b7 | 14161 | |
b14b1491 | 14162 | |
f83d8a90 DE |
14163 | |
14164 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
14165 | if test "x$prefix" = xNONE; then | |
14166 | test_prefix=/usr/local | |
14167 | else | |
14168 | test_prefix=$prefix | |
14169 | fi | |
14170 | else | |
14171 | test_prefix=$exec_prefix | |
14172 | fi | |
14173 | value=0 | |
14174 | case ${ac_define_dir} in | |
14175 | "${test_prefix}"|"${test_prefix}/"*|\ | |
14176 | '${exec_prefix}'|'${exec_prefix}/'*) | |
14177 | value=1 | |
14178 | ;; | |
14179 | esac | |
14180 | ||
14181 | cat >>confdefs.h <<_ACEOF | |
14182 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
14183 | _ACEOF | |
030292b7 DJ |
14184 | |
14185 | ||
14186 | ||
16e7150e | 14187 | |
16e7150e | 14188 | |
81ecdfbb RW |
14189 | # Check whether --with-system-gdbinit was given. |
14190 | if test "${with_system_gdbinit+set}" = set; then : | |
14191 | withval=$with_system_gdbinit; | |
b14b1491 TT |
14192 | SYSTEM_GDBINIT=$withval |
14193 | else | |
14194 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
14195 | fi |
14196 | ||
16e7150e JG |
14197 | |
14198 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
14199 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 14200 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
14201 | ac_define_dir=`eval echo $ac_define_dir` |
14202 | ||
14203 | cat >>confdefs.h <<_ACEOF | |
14204 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
14205 | _ACEOF | |
14206 | ||
14207 | ||
14208 | ||
0c4a4063 | 14209 | |
b14b1491 TT |
14210 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
14211 | if test "x$prefix" = xNONE; then | |
14212 | test_prefix=/usr/local | |
14213 | else | |
14214 | test_prefix=$prefix | |
14215 | fi | |
14216 | else | |
14217 | test_prefix=$exec_prefix | |
14218 | fi | |
14219 | value=0 | |
14220 | case ${ac_define_dir} in | |
14221 | "${test_prefix}"|"${test_prefix}/"*|\ | |
14222 | '${exec_prefix}'|'${exec_prefix}/'*) | |
14223 | value=1 | |
14224 | ;; | |
14225 | esac | |
16e7150e | 14226 | |
b14b1491 TT |
14227 | cat >>confdefs.h <<_ACEOF |
14228 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
14229 | _ACEOF |
14230 | ||
b14b1491 | 14231 | |
16e7150e | 14232 | |
0c4a4063 | 14233 | |
b835bb52 | 14234 | |
9b30624b | 14235 | |
81ecdfbb RW |
14236 | # Check whether --enable-werror was given. |
14237 | if test "${enable_werror+set}" = set; then : | |
14238 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
14239 | yes | y) ERROR_ON_WARNING="yes" ;; |
14240 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 14241 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 14242 | esac |
81ecdfbb RW |
14243 | fi |
14244 | ||
094a342e | 14245 | |
9a084706 PA |
14246 | # Enable -Werror by default when using gcc. Turn it off for releases. |
14247 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
14248 | ERROR_ON_WARNING=yes |
14249 | fi | |
14250 | ||
14251 | WERROR_CFLAGS="" | |
14252 | if test "${ERROR_ON_WARNING}" = yes ; then | |
14253 | WERROR_CFLAGS="-Werror" | |
14254 | fi | |
14255 | ||
3bc3d82a | 14256 | # These options work in either C or C++ modes. |
aac331e4 | 14257 | build_warnings="-Wall -Wpointer-arith \ |
1cb5e2a4 | 14258 | -Wno-unused -Wunused-value -Wunused-function \ |
aac331e4 | 14259 | -Wno-switch -Wno-char-subscripts \ |
305450ed | 14260 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable" |
a3b362c4 | 14261 | |
3bc3d82a PA |
14262 | # Now add in C and C++ specific options, depending on mode. |
14263 | if test "$enable_build_with_cxx" = "yes"; then | |
14264 | build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \ | |
14265 | -Wno-narrowing" | |
14266 | else | |
aac331e4 PA |
14267 | build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \ |
14268 | -Wdeclaration-after-statement -Wmissing-parameter-type \ | |
14269 | -Wold-style-declaration -Wold-style-definition" | |
3bc3d82a PA |
14270 | fi |
14271 | ||
3526781e DJ |
14272 | # Enable -Wno-format by default when using gcc on mingw since many |
14273 | # GCC versions complain about %I64. | |
14274 | case "${host}" in | |
14275 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 14276 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
14277 | esac |
14278 | ||
81ecdfbb RW |
14279 | # Check whether --enable-build-warnings was given. |
14280 | if test "${enable_build_warnings+set}" = set; then : | |
14281 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
14282 | yes) ;; |
14283 | no) build_warnings="-w";; | |
14284 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14285 | build_warnings="${build_warnings} ${t}";; | |
14286 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14287 | build_warnings="${t} ${build_warnings}";; | |
14288 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14289 | esac | |
d4f3574e | 14290 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 14291 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 14292 | fi |
81ecdfbb RW |
14293 | fi |
14294 | # Check whether --enable-gdb-build-warnings was given. | |
14295 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
14296 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
14297 | yes) ;; |
14298 | no) build_warnings="-w";; | |
14299 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14300 | build_warnings="${build_warnings} ${t}";; | |
14301 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14302 | build_warnings="${t} ${build_warnings}";; | |
14303 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14304 | esac | |
14305 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
14306 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
14307 | fi | |
81ecdfbb | 14308 | fi |
3bc3d82a PA |
14309 | |
14310 | # The set of warnings supported by a C++ compiler is not the same as | |
14311 | # of the C compiler. | |
14312 | if test "$enable_build_with_cxx" = "yes"; then | |
14313 | ac_ext=cpp | |
14314 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14315 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14316 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14317 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
14318 | ||
14319 | fi | |
14320 | ||
81ecdfbb | 14321 | WARN_CFLAGS="" |
c906108c SS |
14322 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
14323 | then | |
81ecdfbb RW |
14324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
14325 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
14326 | # Separate out the -Werror flag as some files just cannot be |
14327 | # compiled with it enabled. | |
14328 | for w in ${build_warnings}; do | |
7544db95 PA |
14329 | # GCC does not complain about -Wno-unknown-warning. Invert |
14330 | # and test -Wunknown-warning instead. | |
14331 | case $w in | |
14332 | -Wno-*) | |
14333 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
14334 | *) | |
14335 | wtest=$w ;; | |
14336 | esac | |
14337 | ||
746a987d AC |
14338 | case $w in |
14339 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
14340 | *) |
14341 | # Check whether GCC accepts it. | |
4536bbc6 | 14342 | saved_CFLAGS="$CFLAGS" |
7544db95 | 14343 | CFLAGS="$CFLAGS $wtest" |
3bc3d82a | 14344 | saved_CXXFLAGS="$CXXFLAGS" |
7544db95 | 14345 | CXXFLAGS="$CXXFLAGS $wtest" |
54019719 | 14346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14347 | /* end confdefs.h. */ |
4536bbc6 | 14348 | |
bec39cab AC |
14349 | int |
14350 | main () | |
14351 | { | |
4536bbc6 | 14352 | |
bec39cab AC |
14353 | ; |
14354 | return 0; | |
14355 | } | |
14356 | _ACEOF | |
3bc3d82a | 14357 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 14358 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 14359 | fi |
81ecdfbb | 14360 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 14361 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 14362 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
14363 | esac |
14364 | done | |
81ecdfbb RW |
14365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
14366 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
14367 | fi |
14368 | ||
14369 | ||
104c1213 | 14370 | |
3bc3d82a PA |
14371 | if test "$enable_build_with_cxx" = "yes"; then |
14372 | ac_ext=c | |
14373 | ac_cpp='$CPP $CPPFLAGS' | |
14374 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14375 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14376 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
14377 | ||
14378 | fi | |
14379 | ||
b835bb52 | 14380 | |
7a292a7a | 14381 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
14382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
14383 | $as_echo_n "checking for cygwin... " >&6; } | |
14384 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
14385 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14386 | else |
81ecdfbb | 14387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14388 | /* end confdefs.h. */ |
7a292a7a SS |
14389 | |
14390 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
14391 | lose | |
14392 | #endif | |
bec39cab | 14393 | _ACEOF |
7a292a7a | 14394 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 14395 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
14396 | gdb_cv_os_cygwin=yes |
14397 | else | |
7a292a7a SS |
14398 | gdb_cv_os_cygwin=no |
14399 | fi | |
14400 | rm -f conftest* | |
14401 | ||
14402 | fi | |
81ecdfbb RW |
14403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
14404 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 14405 | |
aff38e61 | 14406 | |
3eb25fda | 14407 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 14408 | case ${host} in |
95cbc983 AC |
14409 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
14410 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 14411 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
14412 | esac |
14413 | ||
14414 | ||
cd0fc7c3 SS |
14415 | # libreadline needs libuser32.a in a cygwin environment |
14416 | WIN32LIBS= | |
14417 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
14418 | WIN32LIBS="-luser32" |
14419 | case "${target}" in | |
14420 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
14421 | ;; | |
14422 | esac | |
cd0fc7c3 | 14423 | fi |
c906108c | 14424 | |
b4505029 MM |
14425 | # The ser-tcp.c module requires sockets. |
14426 | case ${host} in | |
14427 | *mingw32*) | |
14428 | ||
81ecdfbb | 14429 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
14430 | |
14431 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
14432 | ;; | |
14433 | esac | |
14434 | ||
7a292a7a | 14435 | |
31d99776 | 14436 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
14437 | |
14438 | OLD_CFLAGS=$CFLAGS | |
14439 | OLD_LDFLAGS=$LDFLAGS | |
14440 | OLD_LIBS=$LIBS | |
14441 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
14442 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
14443 | # always want our bfd. | |
14444 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
14445 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
14446 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 14447 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 14448 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 14449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb RW |
14450 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
14451 | if test "${gdb_cv_var_elf+set}" = set; then : | |
14452 | $as_echo_n "(cached) " >&6 | |
31d99776 | 14453 | else |
81ecdfbb | 14454 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
14455 | /* end confdefs.h. */ |
14456 | #include <stdlib.h> | |
def63ff0 TT |
14457 | #include "bfd.h" |
14458 | #include "elf-bfd.h" | |
31d99776 DJ |
14459 | |
14460 | int | |
14461 | main () | |
14462 | { | |
def63ff0 | 14463 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
14464 | ; |
14465 | return 0; | |
14466 | } | |
14467 | _ACEOF | |
81ecdfbb | 14468 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
14469 | gdb_cv_var_elf=yes |
14470 | else | |
81ecdfbb | 14471 | gdb_cv_var_elf=no |
31d99776 | 14472 | fi |
81ecdfbb RW |
14473 | rm -f core conftest.err conftest.$ac_objext \ |
14474 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 14475 | fi |
81ecdfbb RW |
14476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
14477 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
14478 | CFLAGS=$OLD_CFLAGS |
14479 | LDFLAGS=$OLD_LDFLAGS | |
14480 | LIBS=$OLD_LIBS | |
31d99776 | 14481 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 14482 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 14483 | |
81ecdfbb | 14484 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 14485 | |
075ff26d JK |
14486 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
14487 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
14488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
14489 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
14490 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14491 | $as_echo_n "(cached) " >&6 | |
14492 | else | |
14493 | ac_func_search_save_LIBS=$LIBS | |
14494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14495 | /* end confdefs.h. */ | |
14496 | ||
14497 | /* Override any GCC internal prototype to avoid an error. | |
14498 | Use char because int might match the return type of a GCC | |
14499 | builtin and then its argument prototype would still apply. */ | |
14500 | #ifdef __cplusplus | |
14501 | extern "C" | |
14502 | #endif | |
14503 | char dlopen (); | |
14504 | int | |
14505 | main () | |
14506 | { | |
14507 | return dlopen (); | |
14508 | ; | |
14509 | return 0; | |
14510 | } | |
14511 | _ACEOF | |
14512 | for ac_lib in '' dl; do | |
14513 | if test -z "$ac_lib"; then | |
14514 | ac_res="none required" | |
14515 | else | |
14516 | ac_res=-l$ac_lib | |
14517 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
14518 | fi | |
14519 | if ac_fn_c_try_link "$LINENO"; then : | |
14520 | ac_cv_search_dlopen=$ac_res | |
14521 | fi | |
14522 | rm -f core conftest.err conftest.$ac_objext \ | |
14523 | conftest$ac_exeext | |
14524 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14525 | break | |
14526 | fi | |
14527 | done | |
14528 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14529 | ||
14530 | else | |
14531 | ac_cv_search_dlopen=no | |
14532 | fi | |
14533 | rm conftest.$ac_ext | |
14534 | LIBS=$ac_func_search_save_LIBS | |
14535 | fi | |
14536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
14537 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
14538 | ac_res=$ac_cv_search_dlopen | |
14539 | if test "$ac_res" != no; then : | |
14540 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
14541 | ||
14542 | fi | |
14543 | ||
075ff26d | 14544 | fi |
31d99776 | 14545 | fi |
31d99776 | 14546 | |
4f05add4 TT |
14547 | # Add macho support to GDB, but only if BFD includes it. |
14548 | ||
14549 | OLD_CFLAGS=$CFLAGS | |
14550 | OLD_LDFLAGS=$LDFLAGS | |
14551 | OLD_LIBS=$LIBS | |
14552 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
14553 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
14554 | # always want our bfd. | |
14555 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
14556 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
14557 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 14558 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 14559 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
14560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
14561 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
14562 | if test "${gdb_cv_var_macho+set}" = set; then : | |
14563 | $as_echo_n "(cached) " >&6 | |
14564 | else | |
14565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14566 | /* end confdefs.h. */ | |
14567 | #include <stdlib.h> | |
14568 | #include "bfd.h" | |
14569 | #include "mach-o.h" | |
14570 | ||
14571 | int | |
14572 | main () | |
14573 | { | |
14574 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
14575 | ; | |
14576 | return 0; | |
14577 | } | |
14578 | _ACEOF | |
14579 | if ac_fn_c_try_link "$LINENO"; then : | |
14580 | gdb_cv_var_macho=yes | |
14581 | else | |
14582 | gdb_cv_var_macho=no | |
14583 | fi | |
14584 | rm -f core conftest.err conftest.$ac_objext \ | |
14585 | conftest$ac_exeext conftest.$ac_ext | |
14586 | fi | |
14587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
14588 | $as_echo "$gdb_cv_var_macho" >&6; } | |
14589 | CFLAGS=$OLD_CFLAGS | |
14590 | LDFLAGS=$OLD_LDFLAGS | |
14591 | LIBS=$OLD_LIBS | |
14592 | if test $gdb_cv_var_macho = yes; then | |
14593 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
14594 | fi | |
14595 | ||
121ce6e5 DJ |
14596 | # Add any host-specific objects to GDB. |
14597 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
14598 | ||
608e2dbb TT |
14599 | # If building on ELF, look for lzma support for embedded compressed debug info. |
14600 | if test $gdb_cv_var_elf = yes; then | |
14601 | ||
14602 | # Check whether --with-lzma was given. | |
14603 | if test "${with_lzma+set}" = set; then : | |
14604 | withval=$with_lzma; | |
14605 | else | |
14606 | with_lzma=auto | |
14607 | fi | |
14608 | ||
14609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
14610 | $as_echo_n "checking whether to use lzma... " >&6; } | |
14611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
14612 | $as_echo "$with_lzma" >&6; } | |
14613 | ||
14614 | if test "${with_lzma}" != no; then | |
14615 | ||
14616 | ||
14617 | ||
14618 | ||
14619 | ||
14620 | ||
14621 | ||
14622 | ||
14623 | use_additional=yes | |
14624 | ||
14625 | acl_save_prefix="$prefix" | |
14626 | prefix="$acl_final_prefix" | |
14627 | acl_save_exec_prefix="$exec_prefix" | |
14628 | exec_prefix="$acl_final_exec_prefix" | |
14629 | ||
14630 | eval additional_includedir=\"$includedir\" | |
14631 | eval additional_libdir=\"$libdir\" | |
14632 | ||
14633 | exec_prefix="$acl_save_exec_prefix" | |
14634 | prefix="$acl_save_prefix" | |
14635 | ||
14636 | ||
14637 | # Check whether --with-liblzma-prefix was given. | |
14638 | if test "${with_liblzma_prefix+set}" = set; then : | |
14639 | withval=$with_liblzma_prefix; | |
14640 | if test "X$withval" = "Xno"; then | |
14641 | use_additional=no | |
14642 | else | |
14643 | if test "X$withval" = "X"; then | |
14644 | ||
14645 | acl_save_prefix="$prefix" | |
14646 | prefix="$acl_final_prefix" | |
14647 | acl_save_exec_prefix="$exec_prefix" | |
14648 | exec_prefix="$acl_final_exec_prefix" | |
14649 | ||
14650 | eval additional_includedir=\"$includedir\" | |
14651 | eval additional_libdir=\"$libdir\" | |
14652 | ||
14653 | exec_prefix="$acl_save_exec_prefix" | |
14654 | prefix="$acl_save_prefix" | |
14655 | ||
14656 | else | |
14657 | additional_includedir="$withval/include" | |
14658 | additional_libdir="$withval/lib" | |
14659 | fi | |
14660 | fi | |
14661 | ||
14662 | fi | |
14663 | ||
14664 | LIBLZMA= | |
14665 | LTLIBLZMA= | |
14666 | INCLZMA= | |
14667 | rpathdirs= | |
14668 | ltrpathdirs= | |
14669 | names_already_handled= | |
14670 | names_next_round='lzma ' | |
14671 | while test -n "$names_next_round"; do | |
14672 | names_this_round="$names_next_round" | |
14673 | names_next_round= | |
14674 | for name in $names_this_round; do | |
14675 | already_handled= | |
14676 | for n in $names_already_handled; do | |
14677 | if test "$n" = "$name"; then | |
14678 | already_handled=yes | |
14679 | break | |
14680 | fi | |
14681 | done | |
14682 | if test -z "$already_handled"; then | |
14683 | names_already_handled="$names_already_handled $name" | |
14684 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14685 | eval value=\"\$HAVE_LIB$uppername\" | |
14686 | if test -n "$value"; then | |
14687 | if test "$value" = yes; then | |
14688 | eval value=\"\$LIB$uppername\" | |
14689 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
14690 | eval value=\"\$LTLIB$uppername\" | |
14691 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
14692 | else | |
14693 | : | |
14694 | fi | |
14695 | else | |
14696 | found_dir= | |
14697 | found_la= | |
14698 | found_so= | |
14699 | found_a= | |
14700 | if test $use_additional = yes; then | |
14701 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14702 | found_dir="$additional_libdir" | |
14703 | found_so="$additional_libdir/lib$name.$shlibext" | |
14704 | if test -f "$additional_libdir/lib$name.la"; then | |
14705 | found_la="$additional_libdir/lib$name.la" | |
14706 | fi | |
14707 | else | |
14708 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14709 | found_dir="$additional_libdir" | |
14710 | found_a="$additional_libdir/lib$name.$libext" | |
14711 | if test -f "$additional_libdir/lib$name.la"; then | |
14712 | found_la="$additional_libdir/lib$name.la" | |
14713 | fi | |
14714 | fi | |
14715 | fi | |
14716 | fi | |
14717 | if test "X$found_dir" = "X"; then | |
14718 | for x in $LDFLAGS $LTLIBLZMA; do | |
14719 | ||
14720 | acl_save_prefix="$prefix" | |
14721 | prefix="$acl_final_prefix" | |
14722 | acl_save_exec_prefix="$exec_prefix" | |
14723 | exec_prefix="$acl_final_exec_prefix" | |
14724 | eval x=\"$x\" | |
14725 | exec_prefix="$acl_save_exec_prefix" | |
14726 | prefix="$acl_save_prefix" | |
14727 | ||
14728 | case "$x" in | |
14729 | -L*) | |
14730 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14731 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14732 | found_dir="$dir" | |
14733 | found_so="$dir/lib$name.$shlibext" | |
14734 | if test -f "$dir/lib$name.la"; then | |
14735 | found_la="$dir/lib$name.la" | |
14736 | fi | |
14737 | else | |
14738 | if test -f "$dir/lib$name.$libext"; then | |
14739 | found_dir="$dir" | |
14740 | found_a="$dir/lib$name.$libext" | |
14741 | if test -f "$dir/lib$name.la"; then | |
14742 | found_la="$dir/lib$name.la" | |
14743 | fi | |
14744 | fi | |
14745 | fi | |
14746 | ;; | |
14747 | esac | |
14748 | if test "X$found_dir" != "X"; then | |
14749 | break | |
14750 | fi | |
14751 | done | |
14752 | fi | |
14753 | if test "X$found_dir" != "X"; then | |
14754 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
14755 | if test "X$found_so" != "X"; then | |
14756 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14757 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14758 | else | |
14759 | haveit= | |
14760 | for x in $ltrpathdirs; do | |
14761 | if test "X$x" = "X$found_dir"; then | |
14762 | haveit=yes | |
14763 | break | |
14764 | fi | |
14765 | done | |
14766 | if test -z "$haveit"; then | |
14767 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14768 | fi | |
14769 | if test "$hardcode_direct" = yes; then | |
14770 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14771 | else | |
14772 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14773 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14774 | haveit= | |
14775 | for x in $rpathdirs; do | |
14776 | if test "X$x" = "X$found_dir"; then | |
14777 | haveit=yes | |
14778 | break | |
14779 | fi | |
14780 | done | |
14781 | if test -z "$haveit"; then | |
14782 | rpathdirs="$rpathdirs $found_dir" | |
14783 | fi | |
14784 | else | |
14785 | haveit= | |
14786 | for x in $LDFLAGS $LIBLZMA; do | |
14787 | ||
14788 | acl_save_prefix="$prefix" | |
14789 | prefix="$acl_final_prefix" | |
14790 | acl_save_exec_prefix="$exec_prefix" | |
14791 | exec_prefix="$acl_final_exec_prefix" | |
14792 | eval x=\"$x\" | |
14793 | exec_prefix="$acl_save_exec_prefix" | |
14794 | prefix="$acl_save_prefix" | |
14795 | ||
14796 | if test "X$x" = "X-L$found_dir"; then | |
14797 | haveit=yes | |
14798 | break | |
14799 | fi | |
14800 | done | |
14801 | if test -z "$haveit"; then | |
14802 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
14803 | fi | |
14804 | if test "$hardcode_minus_L" != no; then | |
14805 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14806 | else | |
14807 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
14808 | fi | |
14809 | fi | |
14810 | fi | |
14811 | fi | |
14812 | else | |
14813 | if test "X$found_a" != "X"; then | |
14814 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
14815 | else | |
14816 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
14817 | fi | |
14818 | fi | |
14819 | additional_includedir= | |
14820 | case "$found_dir" in | |
14821 | */lib | */lib/) | |
14822 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14823 | additional_includedir="$basedir/include" | |
14824 | ;; | |
14825 | esac | |
14826 | if test "X$additional_includedir" != "X"; then | |
14827 | if test "X$additional_includedir" != "X/usr/include"; then | |
14828 | haveit= | |
14829 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14830 | if test -n "$GCC"; then | |
14831 | case $host_os in | |
14832 | linux*) haveit=yes;; | |
14833 | esac | |
14834 | fi | |
14835 | fi | |
14836 | if test -z "$haveit"; then | |
14837 | for x in $CPPFLAGS $INCLZMA; do | |
14838 | ||
14839 | acl_save_prefix="$prefix" | |
14840 | prefix="$acl_final_prefix" | |
14841 | acl_save_exec_prefix="$exec_prefix" | |
14842 | exec_prefix="$acl_final_exec_prefix" | |
14843 | eval x=\"$x\" | |
14844 | exec_prefix="$acl_save_exec_prefix" | |
14845 | prefix="$acl_save_prefix" | |
14846 | ||
14847 | if test "X$x" = "X-I$additional_includedir"; then | |
14848 | haveit=yes | |
14849 | break | |
14850 | fi | |
14851 | done | |
14852 | if test -z "$haveit"; then | |
14853 | if test -d "$additional_includedir"; then | |
14854 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
14855 | fi | |
14856 | fi | |
14857 | fi | |
14858 | fi | |
14859 | fi | |
14860 | if test -n "$found_la"; then | |
14861 | save_libdir="$libdir" | |
14862 | case "$found_la" in | |
14863 | */* | *\\*) . "$found_la" ;; | |
14864 | *) . "./$found_la" ;; | |
14865 | esac | |
14866 | libdir="$save_libdir" | |
14867 | for dep in $dependency_libs; do | |
14868 | case "$dep" in | |
14869 | -L*) | |
14870 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14871 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14872 | haveit= | |
14873 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14874 | if test -n "$GCC"; then | |
14875 | case $host_os in | |
14876 | linux*) haveit=yes;; | |
14877 | esac | |
14878 | fi | |
14879 | fi | |
14880 | if test -z "$haveit"; then | |
14881 | haveit= | |
14882 | for x in $LDFLAGS $LIBLZMA; do | |
14883 | ||
14884 | acl_save_prefix="$prefix" | |
14885 | prefix="$acl_final_prefix" | |
14886 | acl_save_exec_prefix="$exec_prefix" | |
14887 | exec_prefix="$acl_final_exec_prefix" | |
14888 | eval x=\"$x\" | |
14889 | exec_prefix="$acl_save_exec_prefix" | |
14890 | prefix="$acl_save_prefix" | |
14891 | ||
14892 | if test "X$x" = "X-L$additional_libdir"; then | |
14893 | haveit=yes | |
14894 | break | |
14895 | fi | |
14896 | done | |
14897 | if test -z "$haveit"; then | |
14898 | if test -d "$additional_libdir"; then | |
14899 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
14900 | fi | |
14901 | fi | |
14902 | haveit= | |
14903 | for x in $LDFLAGS $LTLIBLZMA; do | |
14904 | ||
14905 | acl_save_prefix="$prefix" | |
14906 | prefix="$acl_final_prefix" | |
14907 | acl_save_exec_prefix="$exec_prefix" | |
14908 | exec_prefix="$acl_final_exec_prefix" | |
14909 | eval x=\"$x\" | |
14910 | exec_prefix="$acl_save_exec_prefix" | |
14911 | prefix="$acl_save_prefix" | |
14912 | ||
14913 | if test "X$x" = "X-L$additional_libdir"; then | |
14914 | haveit=yes | |
14915 | break | |
14916 | fi | |
14917 | done | |
14918 | if test -z "$haveit"; then | |
14919 | if test -d "$additional_libdir"; then | |
14920 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
14921 | fi | |
14922 | fi | |
14923 | fi | |
14924 | fi | |
14925 | ;; | |
14926 | -R*) | |
14927 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14928 | if test "$enable_rpath" != no; then | |
14929 | haveit= | |
14930 | for x in $rpathdirs; do | |
14931 | if test "X$x" = "X$dir"; then | |
14932 | haveit=yes | |
14933 | break | |
14934 | fi | |
14935 | done | |
14936 | if test -z "$haveit"; then | |
14937 | rpathdirs="$rpathdirs $dir" | |
14938 | fi | |
14939 | haveit= | |
14940 | for x in $ltrpathdirs; do | |
14941 | if test "X$x" = "X$dir"; then | |
14942 | haveit=yes | |
14943 | break | |
14944 | fi | |
14945 | done | |
14946 | if test -z "$haveit"; then | |
14947 | ltrpathdirs="$ltrpathdirs $dir" | |
14948 | fi | |
14949 | fi | |
14950 | ;; | |
14951 | -l*) | |
14952 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14953 | ;; | |
14954 | *.la) | |
14955 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14956 | ;; | |
14957 | *) | |
14958 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
14959 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
14960 | ;; | |
14961 | esac | |
14962 | done | |
14963 | fi | |
14964 | else | |
14965 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
14966 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
14967 | fi | |
14968 | fi | |
14969 | fi | |
14970 | done | |
14971 | done | |
14972 | if test "X$rpathdirs" != "X"; then | |
14973 | if test -n "$hardcode_libdir_separator"; then | |
14974 | alldirs= | |
14975 | for found_dir in $rpathdirs; do | |
14976 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14977 | done | |
14978 | acl_save_libdir="$libdir" | |
14979 | libdir="$alldirs" | |
14980 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14981 | libdir="$acl_save_libdir" | |
14982 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
14983 | else | |
14984 | for found_dir in $rpathdirs; do | |
14985 | acl_save_libdir="$libdir" | |
14986 | libdir="$found_dir" | |
14987 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14988 | libdir="$acl_save_libdir" | |
14989 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
14990 | done | |
14991 | fi | |
14992 | fi | |
14993 | if test "X$ltrpathdirs" != "X"; then | |
14994 | for found_dir in $ltrpathdirs; do | |
14995 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
14996 | done | |
14997 | fi | |
14998 | ||
14999 | ||
15000 | ac_save_CPPFLAGS="$CPPFLAGS" | |
15001 | ||
15002 | for element in $INCLZMA; do | |
15003 | haveit= | |
15004 | for x in $CPPFLAGS; do | |
15005 | ||
15006 | acl_save_prefix="$prefix" | |
15007 | prefix="$acl_final_prefix" | |
15008 | acl_save_exec_prefix="$exec_prefix" | |
15009 | exec_prefix="$acl_final_exec_prefix" | |
15010 | eval x=\"$x\" | |
15011 | exec_prefix="$acl_save_exec_prefix" | |
15012 | prefix="$acl_save_prefix" | |
15013 | ||
15014 | if test "X$x" = "X$element"; then | |
15015 | haveit=yes | |
15016 | break | |
15017 | fi | |
15018 | done | |
15019 | if test -z "$haveit"; then | |
15020 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15021 | fi | |
15022 | done | |
15023 | ||
15024 | ||
15025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
15026 | $as_echo_n "checking for liblzma... " >&6; } | |
15027 | if test "${ac_cv_liblzma+set}" = set; then : | |
15028 | $as_echo_n "(cached) " >&6 | |
15029 | else | |
15030 | ||
15031 | ac_save_LIBS="$LIBS" | |
15032 | LIBS="$LIBS $LIBLZMA" | |
15033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15034 | /* end confdefs.h. */ | |
15035 | #include "lzma.h" | |
15036 | int | |
15037 | main () | |
15038 | { | |
15039 | lzma_index_iter iter; | |
15040 | lzma_index_iter_init (&iter, 0); | |
15041 | lzma_mf_is_supported (LZMA_MF_HC3); | |
15042 | ; | |
15043 | return 0; | |
15044 | } | |
15045 | _ACEOF | |
15046 | if ac_fn_c_try_link "$LINENO"; then : | |
15047 | ac_cv_liblzma=yes | |
15048 | else | |
15049 | ac_cv_liblzma=no | |
15050 | fi | |
15051 | rm -f core conftest.err conftest.$ac_objext \ | |
15052 | conftest$ac_exeext conftest.$ac_ext | |
15053 | LIBS="$ac_save_LIBS" | |
15054 | ||
15055 | fi | |
15056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
15057 | $as_echo "$ac_cv_liblzma" >&6; } | |
15058 | if test "$ac_cv_liblzma" = yes; then | |
15059 | HAVE_LIBLZMA=yes | |
15060 | ||
15061 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
15062 | ||
15063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
15064 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
15065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
15066 | $as_echo "$LIBLZMA" >&6; } | |
15067 | else | |
15068 | HAVE_LIBLZMA=no | |
15069 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15070 | LIBLZMA= | |
15071 | LTLIBLZMA= | |
15072 | fi | |
15073 | ||
15074 | ||
15075 | ||
15076 | ||
15077 | ||
15078 | ||
15079 | if test "$HAVE_LIBLZMA" != yes; then | |
15080 | if test "$with_lzma" = yes; then | |
15081 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
15082 | fi | |
15083 | fi | |
15084 | fi | |
15085 | fi | |
15086 | ||
3fc11d3e JM |
15087 | LIBGUI="../libgui/src/libgui.a" |
15088 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
15089 | ||
15090 | ||
7a292a7a | 15091 | |
3fc11d3e JM |
15092 | WIN32LDAPP= |
15093 | ||
15094 | ||
15095 | ||
d91670b9 | 15096 | case "${host}" in |
686a5eed | 15097 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
15098 | configdir="win" |
15099 | ;; | |
15100 | *) | |
15101 | configdir="unix" | |
15102 | ;; | |
15103 | esac | |
3fc11d3e JM |
15104 | |
15105 | GDBTKLIBS= | |
15106 | if test "${enable_gdbtk}" = "yes"; then | |
15107 | ||
d1c3b63a KS |
15108 | # Gdbtk must have an absolute path to srcdir in order to run |
15109 | # properly when not installed. | |
15110 | here=`pwd` | |
15111 | cd ${srcdir} | |
15112 | GDBTK_SRC_DIR=`pwd` | |
15113 | cd $here | |
15114 | ||
bec39cab | 15115 | |
5062cc19 KS |
15116 | # |
15117 | # Ok, lets find the tcl configuration | |
15118 | # First, look for one uninstalled. | |
15119 | # the alternative search directory is invoked by --with-tcl | |
15120 | # | |
3fc11d3e | 15121 | |
5062cc19 KS |
15122 | if test x"${no_tcl}" = x ; then |
15123 | # we reset no_tcl in case something fails here | |
15124 | no_tcl=true | |
bec39cab | 15125 | |
81ecdfbb RW |
15126 | # Check whether --with-tcl was given. |
15127 | if test "${with_tcl+set}" = set; then : | |
15128 | withval=$with_tcl; with_tclconfig=${withval} | |
15129 | fi | |
15130 | ||
15131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
15132 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
15133 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
15134 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 15135 | else |
bec39cab | 15136 | |
3fc11d3e | 15137 | |
5062cc19 KS |
15138 | # First check to see if --with-tcl was specified. |
15139 | case "${host}" in | |
15140 | *-*-cygwin*) platDir="win" ;; | |
15141 | *) platDir="unix" ;; | |
15142 | esac | |
15143 | if test x"${with_tclconfig}" != x ; then | |
15144 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
15145 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
15146 | else | |
81ecdfbb | 15147 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15148 | fi |
15149 | fi | |
15150 | ||
15151 | # then check for a private Tcl installation | |
15152 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15153 | for i in \ | |
15154 | ../tcl \ | |
15155 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15156 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
15157 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15158 | ../../tcl \ | |
15159 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15160 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15161 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15162 | ../../../tcl \ | |
15163 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15164 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15165 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15166 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15167 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15168 | break | |
15169 | fi | |
15170 | done | |
15171 | fi | |
15172 | ||
15173 | # on Darwin, check in Framework installation locations | |
15174 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
15175 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15176 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15177 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15178 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15179 | ; do | |
15180 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
15181 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
15182 | break | |
15183 | fi | |
15184 | done | |
15185 | fi | |
15186 | ||
15187 | # check in a few common install locations | |
15188 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15189 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15190 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15191 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15192 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15193 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15194 | `ls -d /usr/lib 2>/dev/null` \ | |
15195 | ; do | |
15196 | if test -f "$i/tclConfig.sh" ; then | |
15197 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
15198 | break | |
15199 | fi | |
15200 | done | |
15201 | fi | |
3fc11d3e | 15202 | |
5062cc19 KS |
15203 | # check in a few other private locations |
15204 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15205 | for i in \ | |
15206 | ${srcdir}/../tcl \ | |
15207 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15208 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
15209 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15210 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15211 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15212 | break | |
15213 | fi | |
15214 | done | |
15215 | fi | |
bec39cab | 15216 | |
3fc11d3e JM |
15217 | fi |
15218 | ||
5062cc19 KS |
15219 | |
15220 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15221 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
15222 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
15223 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
15224 | else |
15225 | no_tcl= | |
15226 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
15227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15228 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
15229 | fi |
15230 | fi | |
3fc11d3e | 15231 | |
bec39cab | 15232 | |
85541719 DE |
15233 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
15234 | # point to doing Tcl. | |
bec39cab | 15235 | |
5062cc19 KS |
15236 | # |
15237 | # Ok, lets find the tk configuration | |
15238 | # First, look for one uninstalled. | |
15239 | # the alternative search directory is invoked by --with-tk | |
15240 | # | |
3fc11d3e | 15241 | |
5062cc19 KS |
15242 | if test x"${no_tk}" = x ; then |
15243 | # we reset no_tk in case something fails here | |
15244 | no_tk=true | |
bec39cab | 15245 | |
81ecdfbb RW |
15246 | # Check whether --with-tk was given. |
15247 | if test "${with_tk+set}" = set; then : | |
15248 | withval=$with_tk; with_tkconfig=${withval} | |
15249 | fi | |
15250 | ||
15251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
15252 | $as_echo_n "checking for Tk configuration... " >&6; } | |
15253 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
15254 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15255 | else |
3fc11d3e JM |
15256 | |
15257 | ||
5062cc19 KS |
15258 | # First check to see if --with-tkconfig was specified. |
15259 | if test x"${with_tkconfig}" != x ; then | |
15260 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
15261 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
15262 | else | |
81ecdfbb | 15263 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15264 | fi |
15265 | fi | |
3fc11d3e | 15266 | |
5062cc19 KS |
15267 | # then check for a private Tk library |
15268 | case "${host}" in | |
15269 | *-*-cygwin*) platDir="win" ;; | |
15270 | *) platDir="unix" ;; | |
15271 | esac | |
15272 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15273 | for i in \ | |
15274 | ../tk \ | |
15275 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15276 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
15277 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
15278 | ../../tk \ | |
15279 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15280 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
15281 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
15282 | ../../../tk \ | |
15283 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15284 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
15285 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15286 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15287 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15288 | break | |
15289 | fi | |
15290 | done | |
15291 | fi | |
15292 | ||
15293 | # on Darwin, check in Framework installation locations | |
15294 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
15295 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15296 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15297 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15298 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15299 | ; do | |
15300 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
15301 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
15302 | break | |
15303 | fi | |
15304 | done | |
15305 | fi | |
15306 | ||
15307 | # check in a few common install locations | |
15308 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15309 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15310 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15311 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15312 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15313 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15314 | `ls -d /usr/lib 2>/dev/null` \ | |
15315 | ; do | |
15316 | if test -f "$i/tkConfig.sh" ; then | |
15317 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
15318 | break | |
15319 | fi | |
15320 | done | |
15321 | fi | |
15322 | # check in a few other private locations | |
15323 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15324 | for i in \ | |
15325 | ${srcdir}/../tk \ | |
15326 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15327 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
15328 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15329 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15330 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15331 | break | |
15332 | fi | |
15333 | done | |
15334 | fi | |
3fc11d3e | 15335 | |
3fc11d3e JM |
15336 | fi |
15337 | ||
15338 | ||
5062cc19 KS |
15339 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15340 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15341 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15342 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15343 | else |
15344 | no_tk= | |
15345 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15347 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15348 | fi |
3fc11d3e | 15349 | fi |
dd2504ab | 15350 | |
dd2504ab | 15351 | |
85541719 DE |
15352 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15353 | ||
81ecdfbb RW |
15354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15355 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15356 | |
15357 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15359 | $as_echo "loading" >&6; } | |
85541719 DE |
15360 | . ${TCL_BIN_DIR}/tclConfig.sh |
15361 | else | |
81ecdfbb RW |
15362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15363 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15364 | fi |
15365 | ||
15366 | # eval is required to do the TCL_DBGX substitution | |
15367 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15368 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15369 | ||
15370 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15371 | # then set the common variable name to the value of the build variables. | |
15372 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15373 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15374 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15375 | # installed and uninstalled version of Tcl. | |
15376 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15377 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15378 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15379 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15380 | elif test "`uname -s`" = "Darwin"; then | |
15381 | # If Tcl was built as a framework, attempt to use the libraries | |
15382 | # from the framework at the given location so that linking works | |
a68ffae9 | 15383 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
15384 | case ${TCL_DEFS} in |
15385 | *TCL_FRAMEWORK*) | |
15386 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15387 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15388 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15389 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15390 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15391 | break | |
15392 | fi | |
15393 | done | |
15394 | fi | |
15395 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15396 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15397 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15398 | fi | |
15399 | ;; | |
15400 | esac | |
15401 | fi | |
15402 | ||
15403 | # eval is required to do the TCL_DBGX substitution | |
15404 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15405 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15406 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15407 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15408 | ||
15409 | ||
15410 | ||
15411 | ||
15412 | ||
15413 | ||
15414 | ||
15415 | ||
15416 | ||
15417 | ||
15418 | ||
15419 | ||
15420 | ||
15421 | ||
15422 | ||
15423 | # Check for in-tree tcl | |
15424 | here=`pwd` | |
15425 | cd ${srcdir}/.. | |
15426 | topdir=`pwd` | |
15427 | cd ${here} | |
15428 | ||
15429 | intree="no" | |
15430 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15431 | intree="yes" | |
15432 | fi | |
15433 | ||
15434 | # Find Tcl private headers | |
15435 | if test x"${intree}" = xno; then | |
15436 | ||
81ecdfbb RW |
15437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15438 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15439 | private_dir="" |
15440 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15441 | if test -f ${dir}/tclInt.h ; then | |
15442 | private_dir=${dir} | |
15443 | fi | |
15444 | ||
15445 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15446 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15447 | else |
15448 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15450 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15451 | fi |
15452 | ||
15453 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15454 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15455 | TCL_DEPS="" | |
15456 | else | |
15457 | # If building tcl in the same src tree, private headers | |
15458 | # are not needed, but we need to be sure to use the right | |
15459 | # headers library | |
15460 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15461 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15462 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15463 | fi | |
15464 | ||
15465 | ||
15466 | ||
15467 | ||
15468 | ||
81ecdfbb RW |
15469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15470 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15471 | |
5062cc19 | 15472 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15474 | $as_echo "loading" >&6; } | |
5062cc19 | 15475 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15476 | else |
81ecdfbb RW |
15477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15478 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15479 | fi |
bec39cab | 15480 | |
5062cc19 KS |
15481 | # eval is required to do the TK_DBGX substitution |
15482 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15483 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15484 | ||
15485 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15486 | # then set the common variable name to the value of the build variables. | |
15487 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15488 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15489 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15490 | # installed and uninstalled version of Tcl. | |
85541719 | 15491 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15492 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15493 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15494 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15495 | elif test "`uname -s`" = "Darwin"; then | |
15496 | # If Tk was built as a framework, attempt to use the libraries | |
15497 | # from the framework at the given location so that linking works | |
a68ffae9 | 15498 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
15499 | case ${TK_DEFS} in |
15500 | *TK_FRAMEWORK*) | |
85541719 | 15501 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15502 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15503 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15504 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15505 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15506 | break | |
15507 | fi | |
15508 | done | |
15509 | fi | |
85541719 | 15510 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15511 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15512 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15513 | fi | |
15514 | ;; | |
15515 | esac | |
3fc11d3e JM |
15516 | fi |
15517 | ||
5062cc19 KS |
15518 | # eval is required to do the TK_DBGX substitution |
15519 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15520 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15521 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15522 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15523 | |
3fc11d3e JM |
15524 | |
15525 | ||
bec39cab AC |
15526 | |
15527 | ||
15528 | ||
15529 | ||
15530 | ||
15531 | ||
15532 | ||
3fc11d3e | 15533 | |
3fc11d3e | 15534 | |
bec39cab | 15535 | |
bec39cab | 15536 | |
85541719 DE |
15537 | # Check for in-tree Tk |
15538 | intree="no" | |
15539 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15540 | intree="yes" | |
15541 | fi | |
3fc11d3e | 15542 | |
85541719 DE |
15543 | # Find Tk private headers |
15544 | if test x"${intree}" = xno; then | |
3fc11d3e | 15545 | |
81ecdfbb RW |
15546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15547 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15548 | private_dir="" |
15549 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15550 | if test -f ${dir}/tkInt.h; then | |
15551 | private_dir=${dir} | |
3fc11d3e | 15552 | fi |
bec39cab | 15553 | |
5062cc19 | 15554 | if test x"${private_dir}" = x; then |
81ecdfbb | 15555 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15556 | else |
5062cc19 | 15557 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15559 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15560 | fi |
3fc11d3e | 15561 | |
85541719 DE |
15562 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15563 | TK_LIBRARY=${TK_LIB_SPEC} | |
15564 | TK_DEPS="" | |
15565 | else | |
15566 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15567 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15568 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15569 | fi | |
3fc11d3e JM |
15570 | |
15571 | ||
3fc11d3e JM |
15572 | |
15573 | ||
3fc11d3e | 15574 | |
85541719 | 15575 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15576 | |
85541719 DE |
15577 | # Include some libraries that Tcl and Tk want. |
15578 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15579 | # Yes, the ordering seems wrong here. But it isn't. | |
15580 | # TK_LIBS is the list of libraries that need to be linked | |
15581 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15582 | # were in LIBS then any link tests after this point would | |
15583 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15584 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15585 | |
85541719 DE |
15586 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15587 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15588 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15589 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15590 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15591 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15592 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15593 | |
85541719 DE |
15594 | if test x$gdb_cv_os_cygwin = xyes; then |
15595 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15596 | WIN32LDAPP="-Wl,--subsystem,console" | |
15597 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15598 | fi |
ffc6a242 | 15599 | |
81ecdfbb | 15600 | subdirs="$subdirs gdbtk" |
3ace7edb | 15601 | |
85541719 | 15602 | fi |
3fc11d3e JM |
15603 | fi |
15604 | ||
15605 | ||
15606 | ||
15607 | ||
15608 | ||
15609 | ||
15610 | ||
15611 | ||
81ecdfbb RW |
15612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15613 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15614 | |
c906108c | 15615 | |
81ecdfbb RW |
15616 | # Check whether --with-x was given. |
15617 | if test "${with_x+set}" = set; then : | |
15618 | withval=$with_x; | |
15619 | fi | |
c906108c SS |
15620 | |
15621 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15622 | if test "x$with_x" = xno; then | |
15623 | # The user explicitly disabled X. | |
15624 | have_x=disabled | |
15625 | else | |
81ecdfbb RW |
15626 | case $x_includes,$x_libraries in #( |
15627 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15628 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15629 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15630 | else |
15631 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15632 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15633 | rm -f -r conftest.dir |
bec39cab AC |
15634 | if mkdir conftest.dir; then |
15635 | cd conftest.dir | |
bec39cab | 15636 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15637 | incroot: |
15638 | @echo incroot='${INCROOT}' | |
15639 | usrlibdir: | |
15640 | @echo usrlibdir='${USRLIBDIR}' | |
15641 | libdir: | |
15642 | @echo libdir='${LIBDIR}' | |
15643 | _ACEOF | |
15644 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15645 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15646 | for ac_var in incroot usrlibdir libdir; do |
15647 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15648 | done | |
c906108c | 15649 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15650 | for ac_extension in a so sl dylib la dll; do |
15651 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15652 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15653 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15654 | fi |
15655 | done | |
15656 | # Screen out bogus values from the imake configuration. They are | |
15657 | # bogus both because they are the default anyway, and because | |
15658 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15659 | case $ac_im_incroot in |
81ecdfbb | 15660 | /usr/include) ac_x_includes= ;; |
bec39cab | 15661 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15662 | esac |
bec39cab | 15663 | case $ac_im_usrlibdir in |
81ecdfbb | 15664 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15665 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15666 | esac |
15667 | fi | |
15668 | cd .. | |
81ecdfbb | 15669 | rm -f -r conftest.dir |
c906108c SS |
15670 | fi |
15671 | ||
bec39cab AC |
15672 | # Standard set of common directories for X headers. |
15673 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15674 | ac_x_header_dirs=' | |
15675 | /usr/X11/include | |
81ecdfbb | 15676 | /usr/X11R7/include |
bec39cab AC |
15677 | /usr/X11R6/include |
15678 | /usr/X11R5/include | |
15679 | /usr/X11R4/include | |
15680 | ||
15681 | /usr/include/X11 | |
81ecdfbb | 15682 | /usr/include/X11R7 |
bec39cab AC |
15683 | /usr/include/X11R6 |
15684 | /usr/include/X11R5 | |
15685 | /usr/include/X11R4 | |
15686 | ||
15687 | /usr/local/X11/include | |
81ecdfbb | 15688 | /usr/local/X11R7/include |
bec39cab AC |
15689 | /usr/local/X11R6/include |
15690 | /usr/local/X11R5/include | |
15691 | /usr/local/X11R4/include | |
15692 | ||
15693 | /usr/local/include/X11 | |
81ecdfbb | 15694 | /usr/local/include/X11R7 |
bec39cab AC |
15695 | /usr/local/include/X11R6 |
15696 | /usr/local/include/X11R5 | |
15697 | /usr/local/include/X11R4 | |
15698 | ||
15699 | /usr/X386/include | |
15700 | /usr/x386/include | |
15701 | /usr/XFree86/include/X11 | |
15702 | ||
15703 | /usr/include | |
15704 | /usr/local/include | |
15705 | /usr/unsupported/include | |
15706 | /usr/athena/include | |
15707 | /usr/local/x11r5/include | |
15708 | /usr/lpp/Xamples/include | |
15709 | ||
15710 | /usr/openwin/include | |
15711 | /usr/openwin/share/include' | |
15712 | ||
15713 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15714 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15715 | # First, try using that file with no special directory specified. |
81ecdfbb | 15716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15717 | /* end confdefs.h. */ |
81ecdfbb | 15718 | #include <X11/Xlib.h> |
bec39cab | 15719 | _ACEOF |
81ecdfbb | 15720 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15721 | # We can compile using X headers with no special include directory. |
15722 | ac_x_includes= | |
15723 | else | |
bec39cab | 15724 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15725 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15726 | ac_x_includes=$ac_dir |
15727 | break | |
15728 | fi | |
15729 | done | |
c906108c | 15730 | fi |
bec39cab AC |
15731 | rm -f conftest.err conftest.$ac_ext |
15732 | fi # $ac_x_includes = no | |
c906108c | 15733 | |
bec39cab | 15734 | if test "$ac_x_libraries" = no; then |
c906108c | 15735 | # Check for the libraries. |
c906108c SS |
15736 | # See if we find them without any special options. |
15737 | # Don't add to $LIBS permanently. | |
bec39cab | 15738 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
15739 | LIBS="-lX11 $LIBS" |
15740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15741 | /* end confdefs.h. */ |
81ecdfbb | 15742 | #include <X11/Xlib.h> |
bec39cab AC |
15743 | int |
15744 | main () | |
15745 | { | |
81ecdfbb | 15746 | XrmInitialize () |
bec39cab AC |
15747 | ; |
15748 | return 0; | |
15749 | } | |
15750 | _ACEOF | |
81ecdfbb | 15751 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15752 | LIBS=$ac_save_LIBS |
c906108c SS |
15753 | # We can link X programs with no special library path. |
15754 | ac_x_libraries= | |
15755 | else | |
81ecdfbb RW |
15756 | LIBS=$ac_save_LIBS |
15757 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 15758 | do |
bec39cab | 15759 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
15760 | for ac_extension in a so sl dylib la dll; do |
15761 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
15762 | ac_x_libraries=$ac_dir |
15763 | break 2 | |
15764 | fi | |
15765 | done | |
15766 | done | |
15767 | fi | |
81ecdfbb RW |
15768 | rm -f core conftest.err conftest.$ac_objext \ |
15769 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 15770 | fi # $ac_x_libraries = no |
c906108c | 15771 | |
81ecdfbb RW |
15772 | case $ac_x_includes,$ac_x_libraries in #( |
15773 | no,* | *,no | *\'*) | |
15774 | # Didn't find X, or a directory has "'" in its name. | |
15775 | ac_cv_have_x="have_x=no";; #( | |
15776 | *) | |
15777 | # Record where we found X for the cache. | |
15778 | ac_cv_have_x="have_x=yes\ | |
15779 | ac_x_includes='$ac_x_includes'\ | |
15780 | ac_x_libraries='$ac_x_libraries'" | |
15781 | esac | |
c906108c | 15782 | fi |
81ecdfbb RW |
15783 | ;; #( |
15784 | *) have_x=yes;; | |
15785 | esac | |
c906108c SS |
15786 | eval "$ac_cv_have_x" |
15787 | fi # $with_x != no | |
15788 | ||
15789 | if test "$have_x" != yes; then | |
81ecdfbb RW |
15790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
15791 | $as_echo "$have_x" >&6; } | |
c906108c SS |
15792 | no_x=yes |
15793 | else | |
15794 | # If each of the values was on the command line, it overrides each guess. | |
15795 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
15796 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
15797 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
15798 | ac_cv_have_x="have_x=yes\ |
15799 | ac_x_includes='$x_includes'\ | |
15800 | ac_x_libraries='$x_libraries'" | |
15801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
15802 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
15803 | fi |
15804 | ||
15805 | ||
bec39cab | 15806 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 15807 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
15808 | # This code just checks for a few cases where we'd like to ignore those |
15809 | # definitions, even when they're present in the '.mt' file. These cases | |
15810 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 15811 | # not part of the source tree. |
7a292a7a | 15812 | # |
81ecdfbb RW |
15813 | # Check whether --enable-sim was given. |
15814 | if test "${enable_sim+set}" = set; then : | |
15815 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
15816 | echo "enableval = ${enableval}"; |
15817 | case "${enableval}" in | |
15818 | yes) ignore_sim=false ;; | |
15819 | no) ignore_sim=true ;; | |
15820 | *) ignore_sim=false ;; | |
15821 | esac | |
15822 | else | |
15823 | ignore_sim=false | |
81ecdfbb RW |
15824 | fi |
15825 | ||
7a292a7a SS |
15826 | |
15827 | if test ! -d "${srcdir}/../sim"; then | |
15828 | ignore_sim=true | |
15829 | fi | |
15830 | ||
9b624dbe UW |
15831 | SIM= |
15832 | SIM_OBS= | |
15833 | if test "${ignore_sim}" = "false"; then | |
15834 | if test x"${gdb_sim}" != x ; then | |
15835 | SIM="${gdb_sim}" | |
15836 | SIM_OBS="remote-sim.o" | |
60ca704f | 15837 | |
81ecdfbb | 15838 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 15839 | |
976102cd PA |
15840 | |
15841 | # Some tdep code should only be compiled in when the ppc sim is | |
15842 | # built. PR sim/13418. | |
15843 | case $target in | |
15844 | powerpc*-*-*) | |
15845 | ||
15846 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
15847 | ||
15848 | ;; | |
15849 | esac | |
9b624dbe | 15850 | fi |
7a292a7a SS |
15851 | fi |
15852 | ||
15853 | ||
15854 | ||
c906108c SS |
15855 | |
15856 | ||
15857 | ||
15858 | ||
15859 | ||
15860 | ||
dfcd3bfb | 15861 | |
e56ac5c3 AC |
15862 | |
15863 | ||
b3a90332 AC |
15864 | |
15865 | ||
c35f4ffc | 15866 | # List of host floatformats. |
bec39cab AC |
15867 | |
15868 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15869 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 15870 | _ACEOF |
c35f4ffc | 15871 | |
bec39cab AC |
15872 | |
15873 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15874 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
15875 | _ACEOF |
15876 | ||
c35f4ffc | 15877 | |
bec39cab | 15878 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 15879 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 15880 | _ACEOF |
c35f4ffc AC |
15881 | |
15882 | ||
c906108c SS |
15883 | # target_subdir is used by the testsuite to find the target libraries. |
15884 | target_subdir= | |
15885 | if test "${host}" != "${target}"; then | |
15886 | target_subdir="${target_alias}/" | |
15887 | fi | |
15888 | ||
15889 | ||
15890 | frags= | |
771b4502 | 15891 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
15892 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
15893 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 15894 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
15895 | fi |
15896 | frags="$frags $host_makefile_frag" | |
15897 | else | |
15898 | host_makefile_frag=/dev/null | |
c906108c | 15899 | fi |
c906108c | 15900 | |
c906108c SS |
15901 | |
15902 | ||
15903 | ||
771b4502 | 15904 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
15905 | # We pick this up from the host configuration file (.mh) because we |
15906 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
15907 | nativefile=`sed -n ' |
15908 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
15909 | ' ${host_makefile_frag}` | |
c906108c SS |
15910 | fi |
15911 | ||
15912 | ||
b00a8037 | 15913 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
15914 | |
15915 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 15916 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 15917 | _ACEOF |
b00a8037 DJ |
15918 | |
15919 | fi | |
15920 | ||
8dcde887 | 15921 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
15922 | # Check whether --enable-multi-ice was given. |
15923 | if test "${enable_multi_ice+set}" = set; then : | |
15924 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
15925 | yes | no) |
15926 | ;; | |
81ecdfbb | 15927 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 15928 | esac |
81ecdfbb | 15929 | fi |
b4e70030 | 15930 | |
81ecdfbb RW |
15931 | if test "x$enable_multi_ice" = xyes; then |
15932 | subdirs="$subdirs multi-ice" | |
3ace7edb | 15933 | |
a85f51e7 DJ |
15934 | fi |
15935 | ||
496c0e1b JB |
15936 | # Check whether --enable-gdbserver was given. |
15937 | if test "${enable_gdbserver+set}" = set; then : | |
15938 | enableval=$enable_gdbserver; case "${enableval}" in | |
15939 | yes| no|auto) ;; | |
15940 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
15941 | esac | |
15942 | else | |
15943 | enable_gdbserver=auto | |
15944 | fi | |
15945 | ||
15946 | ||
15947 | # We only build gdbserver automatically in a native configuration, and | |
15948 | # only if the user did not explicitly disable its build. | |
15949 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
15950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
15951 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 15952 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
15953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
15954 | $as_echo "yes" >&6; } | |
15955 | subdirs="$subdirs gdbserver" | |
3ace7edb | 15956 | |
496c0e1b | 15957 | gdbserver_build_enabled=yes |
8dcde887 | 15958 | else |
81ecdfbb RW |
15959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15960 | $as_echo "no" >&6; } | |
8dcde887 MK |
15961 | fi |
15962 | fi | |
15963 | ||
496c0e1b JB |
15964 | # If the user explicitly request the gdbserver to be built, verify that |
15965 | # we were in fact able to enable it. | |
15966 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
15967 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
15968 | fi | |
15969 | ||
393fd4c3 YQ |
15970 | # Check for babeltrace and babeltrace-ctf |
15971 | ||
15972 | # Check whether --with-babeltrace was given. | |
15973 | if test "${with_babeltrace+set}" = set; then : | |
15974 | withval=$with_babeltrace; | |
15975 | else | |
15976 | with_babeltrace=auto | |
15977 | fi | |
15978 | ||
15979 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
15980 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
15981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
15982 | $as_echo "$with_babeltrace" >&6; } | |
15983 | ||
15984 | if test "x$with_babeltrace" = "xno"; then | |
15985 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
15986 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
15987 | else | |
15988 | # Append -Werror to CFLAGS so that configure can catch the warning | |
15989 | # "assignment from incompatible pointer type", which is related to | |
15990 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
15991 | # in GDB, while babeltrace 1.0.3 is broken. | |
15992 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
15993 | # safe to save and restore CFLAGS here. | |
15994 | saved_CFLAGS=$CFLAGS | |
15995 | CFLAGS="$CFLAGS -Werror" | |
15996 | ||
15997 | ||
15998 | ||
15999 | ||
16000 | ||
16001 | ||
16002 | ||
16003 | ||
16004 | use_additional=yes | |
16005 | ||
16006 | acl_save_prefix="$prefix" | |
16007 | prefix="$acl_final_prefix" | |
16008 | acl_save_exec_prefix="$exec_prefix" | |
16009 | exec_prefix="$acl_final_exec_prefix" | |
16010 | ||
16011 | eval additional_includedir=\"$includedir\" | |
16012 | eval additional_libdir=\"$libdir\" | |
16013 | ||
16014 | exec_prefix="$acl_save_exec_prefix" | |
16015 | prefix="$acl_save_prefix" | |
16016 | ||
16017 | ||
16018 | # Check whether --with-libbabeltrace-prefix was given. | |
16019 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
16020 | withval=$with_libbabeltrace_prefix; | |
16021 | if test "X$withval" = "Xno"; then | |
16022 | use_additional=no | |
16023 | else | |
16024 | if test "X$withval" = "X"; then | |
16025 | ||
16026 | acl_save_prefix="$prefix" | |
16027 | prefix="$acl_final_prefix" | |
16028 | acl_save_exec_prefix="$exec_prefix" | |
16029 | exec_prefix="$acl_final_exec_prefix" | |
16030 | ||
16031 | eval additional_includedir=\"$includedir\" | |
16032 | eval additional_libdir=\"$libdir\" | |
16033 | ||
16034 | exec_prefix="$acl_save_exec_prefix" | |
16035 | prefix="$acl_save_prefix" | |
16036 | ||
16037 | else | |
16038 | additional_includedir="$withval/include" | |
16039 | additional_libdir="$withval/lib" | |
16040 | fi | |
16041 | fi | |
16042 | ||
16043 | fi | |
16044 | ||
16045 | LIBBABELTRACE= | |
16046 | LTLIBBABELTRACE= | |
16047 | INCBABELTRACE= | |
16048 | rpathdirs= | |
16049 | ltrpathdirs= | |
16050 | names_already_handled= | |
16051 | names_next_round='babeltrace babeltrace-ctf' | |
16052 | while test -n "$names_next_round"; do | |
16053 | names_this_round="$names_next_round" | |
16054 | names_next_round= | |
16055 | for name in $names_this_round; do | |
16056 | already_handled= | |
16057 | for n in $names_already_handled; do | |
16058 | if test "$n" = "$name"; then | |
16059 | already_handled=yes | |
16060 | break | |
16061 | fi | |
16062 | done | |
16063 | if test -z "$already_handled"; then | |
16064 | names_already_handled="$names_already_handled $name" | |
16065 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
16066 | eval value=\"\$HAVE_LIB$uppername\" | |
16067 | if test -n "$value"; then | |
16068 | if test "$value" = yes; then | |
16069 | eval value=\"\$LIB$uppername\" | |
16070 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
16071 | eval value=\"\$LTLIB$uppername\" | |
16072 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
16073 | else | |
16074 | : | |
16075 | fi | |
16076 | else | |
16077 | found_dir= | |
16078 | found_la= | |
16079 | found_so= | |
16080 | found_a= | |
16081 | if test $use_additional = yes; then | |
16082 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
16083 | found_dir="$additional_libdir" | |
16084 | found_so="$additional_libdir/lib$name.$shlibext" | |
16085 | if test -f "$additional_libdir/lib$name.la"; then | |
16086 | found_la="$additional_libdir/lib$name.la" | |
16087 | fi | |
16088 | else | |
16089 | if test -f "$additional_libdir/lib$name.$libext"; then | |
16090 | found_dir="$additional_libdir" | |
16091 | found_a="$additional_libdir/lib$name.$libext" | |
16092 | if test -f "$additional_libdir/lib$name.la"; then | |
16093 | found_la="$additional_libdir/lib$name.la" | |
16094 | fi | |
16095 | fi | |
16096 | fi | |
16097 | fi | |
16098 | if test "X$found_dir" = "X"; then | |
16099 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
16100 | ||
16101 | acl_save_prefix="$prefix" | |
16102 | prefix="$acl_final_prefix" | |
16103 | acl_save_exec_prefix="$exec_prefix" | |
16104 | exec_prefix="$acl_final_exec_prefix" | |
16105 | eval x=\"$x\" | |
16106 | exec_prefix="$acl_save_exec_prefix" | |
16107 | prefix="$acl_save_prefix" | |
16108 | ||
16109 | case "$x" in | |
16110 | -L*) | |
16111 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
16112 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
16113 | found_dir="$dir" | |
16114 | found_so="$dir/lib$name.$shlibext" | |
16115 | if test -f "$dir/lib$name.la"; then | |
16116 | found_la="$dir/lib$name.la" | |
16117 | fi | |
16118 | else | |
16119 | if test -f "$dir/lib$name.$libext"; then | |
16120 | found_dir="$dir" | |
16121 | found_a="$dir/lib$name.$libext" | |
16122 | if test -f "$dir/lib$name.la"; then | |
16123 | found_la="$dir/lib$name.la" | |
16124 | fi | |
16125 | fi | |
16126 | fi | |
16127 | ;; | |
16128 | esac | |
16129 | if test "X$found_dir" != "X"; then | |
16130 | break | |
16131 | fi | |
16132 | done | |
16133 | fi | |
16134 | if test "X$found_dir" != "X"; then | |
16135 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
16136 | if test "X$found_so" != "X"; then | |
16137 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
16138 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
16139 | else | |
16140 | haveit= | |
16141 | for x in $ltrpathdirs; do | |
16142 | if test "X$x" = "X$found_dir"; then | |
16143 | haveit=yes | |
16144 | break | |
16145 | fi | |
16146 | done | |
16147 | if test -z "$haveit"; then | |
16148 | ltrpathdirs="$ltrpathdirs $found_dir" | |
16149 | fi | |
16150 | if test "$hardcode_direct" = yes; then | |
16151 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
16152 | else | |
16153 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
16154 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
16155 | haveit= | |
16156 | for x in $rpathdirs; do | |
16157 | if test "X$x" = "X$found_dir"; then | |
16158 | haveit=yes | |
16159 | break | |
16160 | fi | |
16161 | done | |
16162 | if test -z "$haveit"; then | |
16163 | rpathdirs="$rpathdirs $found_dir" | |
16164 | fi | |
16165 | else | |
16166 | haveit= | |
16167 | for x in $LDFLAGS $LIBBABELTRACE; do | |
16168 | ||
16169 | acl_save_prefix="$prefix" | |
16170 | prefix="$acl_final_prefix" | |
16171 | acl_save_exec_prefix="$exec_prefix" | |
16172 | exec_prefix="$acl_final_exec_prefix" | |
16173 | eval x=\"$x\" | |
16174 | exec_prefix="$acl_save_exec_prefix" | |
16175 | prefix="$acl_save_prefix" | |
16176 | ||
16177 | if test "X$x" = "X-L$found_dir"; then | |
16178 | haveit=yes | |
16179 | break | |
16180 | fi | |
16181 | done | |
16182 | if test -z "$haveit"; then | |
16183 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
16184 | fi | |
16185 | if test "$hardcode_minus_L" != no; then | |
16186 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
16187 | else | |
16188 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
16189 | fi | |
16190 | fi | |
16191 | fi | |
16192 | fi | |
16193 | else | |
16194 | if test "X$found_a" != "X"; then | |
16195 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
16196 | else | |
16197 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
16198 | fi | |
16199 | fi | |
16200 | additional_includedir= | |
16201 | case "$found_dir" in | |
16202 | */lib | */lib/) | |
16203 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
16204 | additional_includedir="$basedir/include" | |
16205 | ;; | |
16206 | esac | |
16207 | if test "X$additional_includedir" != "X"; then | |
16208 | if test "X$additional_includedir" != "X/usr/include"; then | |
16209 | haveit= | |
16210 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
16211 | if test -n "$GCC"; then | |
16212 | case $host_os in | |
16213 | linux*) haveit=yes;; | |
16214 | esac | |
16215 | fi | |
16216 | fi | |
16217 | if test -z "$haveit"; then | |
16218 | for x in $CPPFLAGS $INCBABELTRACE; do | |
16219 | ||
16220 | acl_save_prefix="$prefix" | |
16221 | prefix="$acl_final_prefix" | |
16222 | acl_save_exec_prefix="$exec_prefix" | |
16223 | exec_prefix="$acl_final_exec_prefix" | |
16224 | eval x=\"$x\" | |
16225 | exec_prefix="$acl_save_exec_prefix" | |
16226 | prefix="$acl_save_prefix" | |
16227 | ||
16228 | if test "X$x" = "X-I$additional_includedir"; then | |
16229 | haveit=yes | |
16230 | break | |
16231 | fi | |
16232 | done | |
16233 | if test -z "$haveit"; then | |
16234 | if test -d "$additional_includedir"; then | |
16235 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
16236 | fi | |
16237 | fi | |
16238 | fi | |
16239 | fi | |
16240 | fi | |
16241 | if test -n "$found_la"; then | |
16242 | save_libdir="$libdir" | |
16243 | case "$found_la" in | |
16244 | */* | *\\*) . "$found_la" ;; | |
16245 | *) . "./$found_la" ;; | |
16246 | esac | |
16247 | libdir="$save_libdir" | |
16248 | for dep in $dependency_libs; do | |
16249 | case "$dep" in | |
16250 | -L*) | |
16251 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
16252 | if test "X$additional_libdir" != "X/usr/lib"; then | |
16253 | haveit= | |
16254 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
16255 | if test -n "$GCC"; then | |
16256 | case $host_os in | |
16257 | linux*) haveit=yes;; | |
16258 | esac | |
16259 | fi | |
16260 | fi | |
16261 | if test -z "$haveit"; then | |
16262 | haveit= | |
16263 | for x in $LDFLAGS $LIBBABELTRACE; do | |
16264 | ||
16265 | acl_save_prefix="$prefix" | |
16266 | prefix="$acl_final_prefix" | |
16267 | acl_save_exec_prefix="$exec_prefix" | |
16268 | exec_prefix="$acl_final_exec_prefix" | |
16269 | eval x=\"$x\" | |
16270 | exec_prefix="$acl_save_exec_prefix" | |
16271 | prefix="$acl_save_prefix" | |
16272 | ||
16273 | if test "X$x" = "X-L$additional_libdir"; then | |
16274 | haveit=yes | |
16275 | break | |
16276 | fi | |
16277 | done | |
16278 | if test -z "$haveit"; then | |
16279 | if test -d "$additional_libdir"; then | |
16280 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
16281 | fi | |
16282 | fi | |
16283 | haveit= | |
16284 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
16285 | ||
16286 | acl_save_prefix="$prefix" | |
16287 | prefix="$acl_final_prefix" | |
16288 | acl_save_exec_prefix="$exec_prefix" | |
16289 | exec_prefix="$acl_final_exec_prefix" | |
16290 | eval x=\"$x\" | |
16291 | exec_prefix="$acl_save_exec_prefix" | |
16292 | prefix="$acl_save_prefix" | |
16293 | ||
16294 | if test "X$x" = "X-L$additional_libdir"; then | |
16295 | haveit=yes | |
16296 | break | |
16297 | fi | |
16298 | done | |
16299 | if test -z "$haveit"; then | |
16300 | if test -d "$additional_libdir"; then | |
16301 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
16302 | fi | |
16303 | fi | |
16304 | fi | |
16305 | fi | |
16306 | ;; | |
16307 | -R*) | |
16308 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
16309 | if test "$enable_rpath" != no; then | |
16310 | haveit= | |
16311 | for x in $rpathdirs; do | |
16312 | if test "X$x" = "X$dir"; then | |
16313 | haveit=yes | |
16314 | break | |
16315 | fi | |
16316 | done | |
16317 | if test -z "$haveit"; then | |
16318 | rpathdirs="$rpathdirs $dir" | |
16319 | fi | |
16320 | haveit= | |
16321 | for x in $ltrpathdirs; do | |
16322 | if test "X$x" = "X$dir"; then | |
16323 | haveit=yes | |
16324 | break | |
16325 | fi | |
16326 | done | |
16327 | if test -z "$haveit"; then | |
16328 | ltrpathdirs="$ltrpathdirs $dir" | |
16329 | fi | |
16330 | fi | |
16331 | ;; | |
16332 | -l*) | |
16333 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
16334 | ;; | |
16335 | *.la) | |
16336 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
16337 | ;; | |
16338 | *) | |
16339 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
16340 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
16341 | ;; | |
16342 | esac | |
16343 | done | |
16344 | fi | |
16345 | else | |
16346 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
16347 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
16348 | fi | |
16349 | fi | |
16350 | fi | |
16351 | done | |
16352 | done | |
16353 | if test "X$rpathdirs" != "X"; then | |
16354 | if test -n "$hardcode_libdir_separator"; then | |
16355 | alldirs= | |
16356 | for found_dir in $rpathdirs; do | |
16357 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16358 | done | |
16359 | acl_save_libdir="$libdir" | |
16360 | libdir="$alldirs" | |
16361 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16362 | libdir="$acl_save_libdir" | |
16363 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
16364 | else | |
16365 | for found_dir in $rpathdirs; do | |
16366 | acl_save_libdir="$libdir" | |
16367 | libdir="$found_dir" | |
16368 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16369 | libdir="$acl_save_libdir" | |
16370 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
16371 | done | |
16372 | fi | |
16373 | fi | |
16374 | if test "X$ltrpathdirs" != "X"; then | |
16375 | for found_dir in $ltrpathdirs; do | |
16376 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
16377 | done | |
16378 | fi | |
16379 | ||
16380 | ||
16381 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16382 | ||
16383 | for element in $INCBABELTRACE; do | |
16384 | haveit= | |
16385 | for x in $CPPFLAGS; do | |
16386 | ||
16387 | acl_save_prefix="$prefix" | |
16388 | prefix="$acl_final_prefix" | |
16389 | acl_save_exec_prefix="$exec_prefix" | |
16390 | exec_prefix="$acl_final_exec_prefix" | |
16391 | eval x=\"$x\" | |
16392 | exec_prefix="$acl_save_exec_prefix" | |
16393 | prefix="$acl_save_prefix" | |
16394 | ||
16395 | if test "X$x" = "X$element"; then | |
16396 | haveit=yes | |
16397 | break | |
16398 | fi | |
16399 | done | |
16400 | if test -z "$haveit"; then | |
16401 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16402 | fi | |
16403 | done | |
16404 | ||
16405 | ||
16406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
16407 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
16408 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
16409 | $as_echo_n "(cached) " >&6 | |
16410 | else | |
16411 | ||
16412 | ac_save_LIBS="$LIBS" | |
16413 | LIBS="$LIBS $LIBBABELTRACE" | |
16414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16415 | /* end confdefs.h. */ | |
16416 | #include <babeltrace/babeltrace.h> | |
16417 | #include <babeltrace/ctf/events.h> | |
16418 | #include <babeltrace/ctf/iterator.h> | |
16419 | int | |
16420 | main () | |
16421 | { | |
16422 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
16423 | struct bt_ctf_event *event = NULL; | |
16424 | const struct bt_definition *scope; | |
16425 | ||
13cdc2af | 16426 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 16427 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
16428 | scope = bt_ctf_get_top_level_scope (event, |
16429 | BT_STREAM_EVENT_HEADER); | |
16430 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
16431 | ||
16432 | ; | |
16433 | return 0; | |
16434 | } | |
16435 | _ACEOF | |
16436 | if ac_fn_c_try_link "$LINENO"; then : | |
16437 | ac_cv_libbabeltrace=yes | |
16438 | else | |
16439 | ac_cv_libbabeltrace=no | |
16440 | fi | |
16441 | rm -f core conftest.err conftest.$ac_objext \ | |
16442 | conftest$ac_exeext conftest.$ac_ext | |
16443 | LIBS="$ac_save_LIBS" | |
16444 | ||
16445 | fi | |
16446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
16447 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
16448 | if test "$ac_cv_libbabeltrace" = yes; then | |
16449 | HAVE_LIBBABELTRACE=yes | |
16450 | ||
16451 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
16452 | ||
16453 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
16454 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
16455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
16456 | $as_echo "$LIBBABELTRACE" >&6; } | |
16457 | else | |
16458 | HAVE_LIBBABELTRACE=no | |
16459 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16460 | LIBBABELTRACE= | |
16461 | LTLIBBABELTRACE= | |
16462 | fi | |
16463 | ||
16464 | ||
16465 | ||
16466 | ||
16467 | ||
16468 | ||
16469 | CFLAGS=$saved_CFLAGS | |
16470 | ||
16471 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
16472 | if test "$with_babeltrace" = yes; then | |
16473 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
16474 | else | |
16475 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
16476 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
16477 | fi | |
16478 | fi | |
16479 | fi | |
16480 | ||
db985757 | 16481 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 16482 | # to an empty version. |
c906108c SS |
16483 | |
16484 | files= | |
16485 | links= | |
5a2402b8 | 16486 | |
c906108c SS |
16487 | rm -f nm.h |
16488 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
16489 | case "${nativefile}" in |
16490 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
16491 | * ) GDB_NM_FILE="${nativefile}" | |
16492 | esac | |
5a2402b8 AC |
16493 | files="${files} ${GDB_NM_FILE}" |
16494 | links="${links} nm.h" | |
60ca704f SE |
16495 | |
16496 | cat >>confdefs.h <<_ACEOF | |
b78960be | 16497 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 16498 | _ACEOF |
5a2402b8 | 16499 | |
c906108c | 16500 | fi |
5a2402b8 AC |
16501 | |
16502 | ||
e3487908 GKB |
16503 | for ac_prog in xsltproc |
16504 | do | |
16505 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
16506 | set dummy $ac_prog; ac_word=$2 | |
16507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
16508 | $as_echo_n "checking for $ac_word... " >&6; } | |
16509 | if test "${ac_cv_path_XSLTPROC+set}" = set; then : | |
16510 | $as_echo_n "(cached) " >&6 | |
16511 | else | |
16512 | case $XSLTPROC in | |
16513 | [\\/]* | ?:[\\/]*) | |
16514 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
16515 | ;; | |
16516 | *) | |
16517 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16518 | for as_dir in $PATH | |
16519 | do | |
16520 | IFS=$as_save_IFS | |
16521 | test -z "$as_dir" && as_dir=. | |
16522 | for ac_exec_ext in '' $ac_executable_extensions; do | |
16523 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
16524 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" | |
16525 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
16526 | break 2 | |
16527 | fi | |
16528 | done | |
16529 | done | |
16530 | IFS=$as_save_IFS | |
16531 | ||
16532 | ;; | |
16533 | esac | |
16534 | fi | |
16535 | XSLTPROC=$ac_cv_path_XSLTPROC | |
16536 | if test -n "$XSLTPROC"; then | |
16537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
16538 | $as_echo "$XSLTPROC" >&6; } | |
16539 | else | |
16540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
16541 | $as_echo "no" >&6; } | |
16542 | fi | |
16543 | ||
16544 | ||
16545 | test -n "$XSLTPROC" && break | |
16546 | done | |
16547 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
16548 | ||
16549 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
16550 | if test "${XSLTPROC}" = missing; then | |
16551 | as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 | |
16552 | fi | |
16553 | fi | |
16554 | ||
16555 | ||
bec39cab AC |
16556 | ac_sources="$files" |
16557 | ac_dests="$links" | |
16558 | while test -n "$ac_sources"; do | |
16559 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
16560 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
16561 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
16562 | done | |
81ecdfbb | 16563 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
16564 | |
16565 | ||
c906108c SS |
16566 | |
16567 | ||
c906108c | 16568 | |
81ecdfbb | 16569 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 16570 | |
bec39cab | 16571 | |
dcd1f979 TT |
16572 | if $development; then |
16573 | ||
16574 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
16575 | ||
16576 | fi | |
16577 | ||
b292c783 | 16578 | |
f6a88844 JM |
16579 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
16580 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
16581 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
16582 | GDB_TRANSFORM_NAME=gdb | |
16583 | fi | |
16584 | ||
16585 | ||
16586 | ||
16587 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
16588 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
16589 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
16590 | GCORE_TRANSFORM_NAME=gcore | |
16591 | fi | |
16592 | ||
b292c783 JK |
16593 | |
16594 | ac_config_files="$ac_config_files gcore" | |
16595 | ||
c971b7fa | 16596 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb | 16597 | |
89a34d1b | 16598 | |
bec39cab AC |
16599 | cat >confcache <<\_ACEOF |
16600 | # This file is a shell script that caches the results of configure | |
16601 | # tests run on this system so they can be shared between configure | |
16602 | # scripts and configure runs, see configure's option --config-cache. | |
16603 | # It is not useful on other systems. If it contains results you don't | |
16604 | # want to keep, you may remove or edit it. | |
16605 | # | |
16606 | # config.status only pays attention to the cache file if you give it | |
16607 | # the --recheck option to rerun configure. | |
16608 | # | |
16609 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
16610 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16611 | # following values. | |
16612 | ||
16613 | _ACEOF | |
16614 | ||
16615 | # The following way of writing the cache mishandles newlines in values, | |
16616 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 16617 | # So, we kill variables containing newlines. |
bec39cab AC |
16618 | # Ultrix sh set writes to stderr and can't be redirected directly, |
16619 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
16620 | ( |
16621 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
16622 | eval ac_val=\$$ac_var | |
16623 | case $ac_val in #( | |
16624 | *${as_nl}*) | |
16625 | case $ac_var in #( | |
16626 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
16627 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
16628 | esac | |
16629 | case $ac_var in #( | |
16630 | _ | IFS | as_nl) ;; #( | |
16631 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
16632 | *) { eval $ac_var=; unset $ac_var;} ;; | |
16633 | esac ;; | |
16634 | esac | |
16635 | done | |
16636 | ||
bec39cab | 16637 | (set) 2>&1 | |
81ecdfbb RW |
16638 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
16639 | *${as_nl}ac_space=\ *) | |
16640 | # `set' does not quote correctly, so add quotes: double-quote | |
16641 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
16642 | sed -n \ |
16643 | "s/'/'\\\\''/g; | |
16644 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 16645 | ;; #( |
bec39cab AC |
16646 | *) |
16647 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 16648 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 16649 | ;; |
81ecdfbb RW |
16650 | esac | |
16651 | sort | |
16652 | ) | | |
bec39cab | 16653 | sed ' |
81ecdfbb | 16654 | /^ac_cv_env_/b end |
bec39cab | 16655 | t clear |
81ecdfbb | 16656 | :clear |
bec39cab AC |
16657 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
16658 | t end | |
81ecdfbb RW |
16659 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
16660 | :end' >>confcache | |
16661 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
16662 | if test -w "$cache_file"; then | |
16663 | test "x$cache_file" != "x/dev/null" && | |
16664 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
16665 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
16666 | cat confcache >$cache_file |
16667 | else | |
81ecdfbb RW |
16668 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
16669 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
16670 | fi |
16671 | fi | |
16672 | rm -f confcache | |
16673 | ||
16674 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16675 | # Let make expand exec_prefix. | |
16676 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16677 | ||
bec39cab AC |
16678 | DEFS=-DHAVE_CONFIG_H |
16679 | ||
16680 | ac_libobjs= | |
16681 | ac_ltlibobjs= | |
16682 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16683 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
16684 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
16685 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
16686 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
16687 | # will be set to the directory where LIBOBJS objects are built. | |
16688 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
16689 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
16690 | done |
16691 | LIBOBJS=$ac_libobjs | |
16692 | ||
16693 | LTLIBOBJS=$ac_ltlibobjs | |
16694 | ||
16695 | ||
85981d60 | 16696 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
16697 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
16698 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 16699 | fi |
a417dc56 | 16700 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
16701 | as_fn_error "conditional \"GMAKE\" was never defined. |
16702 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 16703 | fi |
4df42755 DE |
16704 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
16705 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
16706 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16707 | fi | |
16708 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
16709 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
16710 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16711 | fi | |
81ecdfbb RW |
16712 | |
16713 | ||
bec39cab | 16714 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 16715 | ac_write_fail=0 |
bec39cab AC |
16716 | ac_clean_files_save=$ac_clean_files |
16717 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
16718 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
16719 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16720 | as_write_fail=0 | |
16721 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
16722 | #! $SHELL |
16723 | # Generated by $as_me. | |
16724 | # Run this file to recreate the current configuration. | |
16725 | # Compiler output produced by configure, useful for debugging | |
16726 | # configure, is in config.log if it exists. | |
16727 | ||
16728 | debug=false | |
16729 | ac_cs_recheck=false | |
16730 | ac_cs_silent=false | |
bec39cab | 16731 | |
81ecdfbb RW |
16732 | SHELL=\${CONFIG_SHELL-$SHELL} |
16733 | export SHELL | |
16734 | _ASEOF | |
16735 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
16736 | ## -------------------- ## | |
16737 | ## M4sh Initialization. ## | |
16738 | ## -------------------- ## | |
16739 | ||
16740 | # Be more Bourne compatible | |
16741 | DUALCASE=1; export DUALCASE # for MKS sh | |
16742 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
16743 | emulate sh |
16744 | NULLCMD=: | |
81ecdfbb | 16745 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
16746 | # is contrary to our usage. Disable this feature. |
16747 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
16748 | setopt NO_GLOB_SUBST |
16749 | else | |
16750 | case `(set -o) 2>/dev/null` in #( | |
16751 | *posix*) : | |
16752 | set -o posix ;; #( | |
16753 | *) : | |
16754 | ;; | |
16755 | esac | |
bec39cab | 16756 | fi |
bec39cab | 16757 | |
81ecdfbb RW |
16758 | |
16759 | as_nl=' | |
16760 | ' | |
16761 | export as_nl | |
16762 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
16763 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
16764 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
16765 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
16766 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
16767 | # but without wasting forks for bash or zsh. | |
16768 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
16769 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16770 | as_echo='print -r --' | |
16771 | as_echo_n='print -rn --' | |
16772 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16773 | as_echo='printf %s\n' | |
16774 | as_echo_n='printf %s' | |
16775 | else | |
16776 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
16777 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
16778 | as_echo_n='/usr/ucb/echo -n' | |
16779 | else | |
16780 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
16781 | as_echo_n_body='eval | |
16782 | arg=$1; | |
16783 | case $arg in #( | |
16784 | *"$as_nl"*) | |
16785 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16786 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16787 | esac; | |
16788 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16789 | ' | |
16790 | export as_echo_n_body | |
16791 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
16792 | fi | |
16793 | export as_echo_body | |
16794 | as_echo='sh -c $as_echo_body as_echo' | |
16795 | fi | |
16796 | ||
16797 | # The user is always right. | |
16798 | if test "${PATH_SEPARATOR+set}" != set; then | |
16799 | PATH_SEPARATOR=: | |
16800 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16801 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16802 | PATH_SEPARATOR=';' | |
16803 | } | |
bec39cab AC |
16804 | fi |
16805 | ||
16806 | ||
81ecdfbb RW |
16807 | # IFS |
16808 | # We need space, tab and new line, in precisely that order. Quoting is | |
16809 | # there to prevent editors from complaining about space-tab. | |
16810 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16811 | # splitting by setting IFS to empty value.) | |
16812 | IFS=" "" $as_nl" | |
16813 | ||
16814 | # Find who we are. Look in the path if we contain no directory separator. | |
16815 | case $0 in #(( | |
16816 | *[\\/]* ) as_myself=$0 ;; | |
16817 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16818 | for as_dir in $PATH | |
16819 | do | |
16820 | IFS=$as_save_IFS | |
16821 | test -z "$as_dir" && as_dir=. | |
16822 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16823 | done | |
16824 | IFS=$as_save_IFS | |
16825 | ||
16826 | ;; | |
16827 | esac | |
16828 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16829 | # in which case we are not to be found in the path. | |
16830 | if test "x$as_myself" = x; then | |
16831 | as_myself=$0 | |
16832 | fi | |
16833 | if test ! -f "$as_myself"; then | |
16834 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16835 | exit 1 | |
16836 | fi | |
16837 | ||
16838 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16839 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16840 | # suppresses any "Segmentation fault" message there. '((' could | |
16841 | # trigger a bug in pdksh 5.2.14. | |
16842 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16843 | do eval test x\${$as_var+set} = xset \ | |
16844 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16845 | done | |
bec39cab AC |
16846 | PS1='$ ' |
16847 | PS2='> ' | |
16848 | PS4='+ ' | |
16849 | ||
16850 | # NLS nuisances. | |
81ecdfbb RW |
16851 | LC_ALL=C |
16852 | export LC_ALL | |
16853 | LANGUAGE=C | |
16854 | export LANGUAGE | |
16855 | ||
16856 | # CDPATH. | |
16857 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16858 | ||
16859 | ||
16860 | # as_fn_error ERROR [LINENO LOG_FD] | |
16861 | # --------------------------------- | |
16862 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16863 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16864 | # script with status $?, using 1 if that was 0. | |
16865 | as_fn_error () | |
16866 | { | |
16867 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16868 | if test "$3"; then | |
16869 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16870 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16871 | fi | |
16872 | $as_echo "$as_me: error: $1" >&2 | |
16873 | as_fn_exit $as_status | |
16874 | } # as_fn_error | |
16875 | ||
16876 | ||
16877 | # as_fn_set_status STATUS | |
16878 | # ----------------------- | |
16879 | # Set $? to STATUS, without forking. | |
16880 | as_fn_set_status () | |
16881 | { | |
16882 | return $1 | |
16883 | } # as_fn_set_status | |
16884 | ||
16885 | # as_fn_exit STATUS | |
16886 | # ----------------- | |
16887 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16888 | as_fn_exit () | |
16889 | { | |
16890 | set +e | |
16891 | as_fn_set_status $1 | |
16892 | exit $1 | |
16893 | } # as_fn_exit | |
16894 | ||
16895 | # as_fn_unset VAR | |
16896 | # --------------- | |
16897 | # Portably unset VAR. | |
16898 | as_fn_unset () | |
16899 | { | |
16900 | { eval $1=; unset $1;} | |
16901 | } | |
16902 | as_unset=as_fn_unset | |
16903 | # as_fn_append VAR VALUE | |
16904 | # ---------------------- | |
16905 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16906 | # advantage of any shell optimizations that allow amortized linear growth over | |
16907 | # repeated appends, instead of the typical quadratic growth present in naive | |
16908 | # implementations. | |
16909 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16910 | eval 'as_fn_append () | |
16911 | { | |
16912 | eval $1+=\$2 | |
16913 | }' | |
16914 | else | |
16915 | as_fn_append () | |
16916 | { | |
16917 | eval $1=\$$1\$2 | |
16918 | } | |
16919 | fi # as_fn_append | |
16920 | ||
16921 | # as_fn_arith ARG... | |
16922 | # ------------------ | |
16923 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16924 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16925 | # must be portable across $(()) and expr. | |
16926 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16927 | eval 'as_fn_arith () | |
16928 | { | |
16929 | as_val=$(( $* )) | |
16930 | }' | |
16931 | else | |
16932 | as_fn_arith () | |
16933 | { | |
16934 | as_val=`expr "$@" || test $? -eq 1` | |
16935 | } | |
16936 | fi # as_fn_arith | |
bec39cab | 16937 | |
81ecdfbb RW |
16938 | |
16939 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16940 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16941 | as_expr=expr |
16942 | else | |
16943 | as_expr=false | |
16944 | fi | |
16945 | ||
81ecdfbb | 16946 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16947 | as_basename=basename |
16948 | else | |
16949 | as_basename=false | |
16950 | fi | |
16951 | ||
81ecdfbb RW |
16952 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16953 | as_dirname=dirname | |
16954 | else | |
16955 | as_dirname=false | |
16956 | fi | |
bec39cab | 16957 | |
81ecdfbb | 16958 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16959 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16960 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16961 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16962 | $as_echo X/"$0" | | |
16963 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16964 | s//\1/ | |
16965 | q | |
16966 | } | |
16967 | /^X\/\(\/\/\)$/{ | |
16968 | s//\1/ | |
16969 | q | |
16970 | } | |
16971 | /^X\/\(\/\).*/{ | |
16972 | s//\1/ | |
16973 | q | |
16974 | } | |
16975 | s/.*/./; q'` | |
b4e70030 | 16976 | |
b4e70030 JB |
16977 | # Avoid depending upon Character Ranges. |
16978 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16979 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16980 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16981 | as_cr_digits='0123456789' | |
16982 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16983 | ||
81ecdfbb RW |
16984 | ECHO_C= ECHO_N= ECHO_T= |
16985 | case `echo -n x` in #((((( | |
16986 | -n*) | |
16987 | case `echo 'xy\c'` in | |
16988 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16989 | xy) ECHO_C='\c';; | |
16990 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16991 | ECHO_T=' ';; | |
16992 | esac;; | |
16993 | *) | |
16994 | ECHO_N='-n';; | |
bec39cab AC |
16995 | esac |
16996 | ||
81ecdfbb RW |
16997 | rm -f conf$$ conf$$.exe conf$$.file |
16998 | if test -d conf$$.dir; then | |
16999 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 17000 | else |
81ecdfbb RW |
17001 | rm -f conf$$.dir |
17002 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 17003 | fi |
81ecdfbb RW |
17004 | if (echo >conf$$.file) 2>/dev/null; then |
17005 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 17006 | as_ln_s='ln -s' |
81ecdfbb RW |
17007 | # ... but there are two gotchas: |
17008 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17009 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17010 | # In both cases, we have to default to `cp -p'. | |
17011 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
17012 | as_ln_s='cp -p' | |
17013 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
17014 | as_ln_s=ln | |
17015 | else | |
17016 | as_ln_s='cp -p' | |
b4e70030 | 17017 | fi |
bec39cab AC |
17018 | else |
17019 | as_ln_s='cp -p' | |
17020 | fi | |
81ecdfbb RW |
17021 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
17022 | rmdir conf$$.dir 2>/dev/null | |
17023 | ||
17024 | ||
17025 | # as_fn_mkdir_p | |
17026 | # ------------- | |
17027 | # Create "$as_dir" as a directory, including parents if necessary. | |
17028 | as_fn_mkdir_p () | |
17029 | { | |
17030 | ||
17031 | case $as_dir in #( | |
17032 | -*) as_dir=./$as_dir;; | |
17033 | esac | |
17034 | test -d "$as_dir" || eval $as_mkdir_p || { | |
17035 | as_dirs= | |
17036 | while :; do | |
17037 | case $as_dir in #( | |
17038 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
17039 | *) as_qdir=$as_dir;; | |
17040 | esac | |
17041 | as_dirs="'$as_qdir' $as_dirs" | |
17042 | as_dir=`$as_dirname -- "$as_dir" || | |
17043 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17044 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17045 | X"$as_dir" : 'X\(//\)$' \| \ | |
17046 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
17047 | $as_echo X"$as_dir" | | |
17048 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17049 | s//\1/ | |
17050 | q | |
17051 | } | |
17052 | /^X\(\/\/\)[^/].*/{ | |
17053 | s//\1/ | |
17054 | q | |
17055 | } | |
17056 | /^X\(\/\/\)$/{ | |
17057 | s//\1/ | |
17058 | q | |
17059 | } | |
17060 | /^X\(\/\).*/{ | |
17061 | s//\1/ | |
17062 | q | |
17063 | } | |
17064 | s/.*/./; q'` | |
17065 | test -d "$as_dir" && break | |
17066 | done | |
17067 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
17068 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
17069 | ||
bec39cab | 17070 | |
81ecdfbb | 17071 | } # as_fn_mkdir_p |
bec39cab | 17072 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 17073 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
17074 | else |
17075 | test -d ./-p && rmdir ./-p | |
17076 | as_mkdir_p=false | |
17077 | fi | |
17078 | ||
81ecdfbb RW |
17079 | if test -x / >/dev/null 2>&1; then |
17080 | as_test_x='test -x' | |
17081 | else | |
17082 | if ls -dL / >/dev/null 2>&1; then | |
17083 | as_ls_L_option=L | |
17084 | else | |
17085 | as_ls_L_option= | |
17086 | fi | |
17087 | as_test_x=' | |
17088 | eval sh -c '\'' | |
17089 | if test -d "$1"; then | |
17090 | test -d "$1/."; | |
17091 | else | |
17092 | case $1 in #( | |
17093 | -*)set "./$1";; | |
17094 | esac; | |
17095 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
17096 | ???[sx]*):;;*)false;;esac;fi | |
17097 | '\'' sh | |
17098 | ' | |
17099 | fi | |
17100 | as_executable_p=$as_test_x | |
bec39cab AC |
17101 | |
17102 | # Sed expression to map a string onto a valid CPP name. | |
17103 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
17104 | ||
17105 | # Sed expression to map a string onto a valid variable name. | |
17106 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
17107 | ||
17108 | ||
bec39cab | 17109 | exec 6>&1 |
81ecdfbb RW |
17110 | ## ----------------------------------- ## |
17111 | ## Main body of $CONFIG_STATUS script. ## | |
17112 | ## ----------------------------------- ## | |
17113 | _ASEOF | |
17114 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
17115 | ||
17116 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17117 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 17118 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
17119 | # values after options handling. |
17120 | ac_log=" | |
bec39cab | 17121 | This file was extended by $as_me, which was |
81ecdfbb | 17122 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
17123 | |
17124 | CONFIG_FILES = $CONFIG_FILES | |
17125 | CONFIG_HEADERS = $CONFIG_HEADERS | |
17126 | CONFIG_LINKS = $CONFIG_LINKS | |
17127 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
17128 | $ $0 $@ | |
17129 | ||
81ecdfbb RW |
17130 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
17131 | " | |
17132 | ||
bec39cab AC |
17133 | _ACEOF |
17134 | ||
81ecdfbb RW |
17135 | case $ac_config_files in *" |
17136 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
17137 | esac | |
234b45d4 | 17138 | |
81ecdfbb RW |
17139 | case $ac_config_headers in *" |
17140 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
17141 | esac | |
b4e70030 | 17142 | |
b4e70030 | 17143 | |
81ecdfbb RW |
17144 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
17145 | # Files that config.status was made for. | |
17146 | config_files="$ac_config_files" | |
17147 | config_headers="$ac_config_headers" | |
17148 | config_links="$ac_config_links" | |
17149 | config_commands="$ac_config_commands" | |
234b45d4 | 17150 | |
81ecdfbb | 17151 | _ACEOF |
b4e70030 | 17152 | |
81ecdfbb | 17153 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 17154 | ac_cs_usage="\ |
81ecdfbb RW |
17155 | \`$as_me' instantiates files and other configuration actions |
17156 | from templates according to the current configuration. Unless the files | |
17157 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 17158 | |
81ecdfbb | 17159 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 17160 | |
bec39cab | 17161 | -h, --help print this help, then exit |
81ecdfbb RW |
17162 | -V, --version print version number and configuration settings, then exit |
17163 | -q, --quiet, --silent | |
17164 | do not print progress messages | |
bec39cab AC |
17165 | -d, --debug don't remove temporary files |
17166 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
17167 | --file=FILE[:TEMPLATE] |
17168 | instantiate the configuration file FILE | |
17169 | --header=FILE[:TEMPLATE] | |
17170 | instantiate the configuration header FILE | |
234b45d4 | 17171 | |
bec39cab AC |
17172 | Configuration files: |
17173 | $config_files | |
234b45d4 | 17174 | |
bec39cab AC |
17175 | Configuration headers: |
17176 | $config_headers | |
234b45d4 | 17177 | |
bec39cab AC |
17178 | Configuration links: |
17179 | $config_links | |
234b45d4 | 17180 | |
bec39cab AC |
17181 | Configuration commands: |
17182 | $config_commands | |
17183 | ||
81ecdfbb | 17184 | Report bugs to the package provider." |
b4e70030 | 17185 | |
81ecdfbb RW |
17186 | _ACEOF |
17187 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
17188 | ac_cs_version="\\ |
17189 | config.status | |
81ecdfbb RW |
17190 | configured by $0, generated by GNU Autoconf 2.64, |
17191 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 17192 | |
81ecdfbb | 17193 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
17194 | This config.status script is free software; the Free Software Foundation |
17195 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
17196 | |
17197 | ac_pwd='$ac_pwd' | |
17198 | srcdir='$srcdir' | |
17199 | INSTALL='$INSTALL' | |
81ecdfbb RW |
17200 | AWK='$AWK' |
17201 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
17202 | _ACEOF |
17203 | ||
81ecdfbb RW |
17204 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17205 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
17206 | ac_need_defaults=: |
17207 | while test $# != 0 | |
17208 | do | |
17209 | case $1 in | |
17210 | --*=*) | |
81ecdfbb RW |
17211 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
17212 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 17213 | ac_shift=: |
c906108c | 17214 | ;; |
81ecdfbb | 17215 | *) |
bec39cab AC |
17216 | ac_option=$1 |
17217 | ac_optarg=$2 | |
17218 | ac_shift=shift | |
c906108c | 17219 | ;; |
bec39cab | 17220 | esac |
c906108c | 17221 | |
bec39cab AC |
17222 | case $ac_option in |
17223 | # Handling of the options. | |
bec39cab AC |
17224 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
17225 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
17226 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
17227 | $as_echo "$ac_cs_version"; exit ;; | |
17228 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
17229 | debug=: ;; |
17230 | --file | --fil | --fi | --f ) | |
17231 | $ac_shift | |
81ecdfbb RW |
17232 | case $ac_optarg in |
17233 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
17234 | esac | |
17235 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
17236 | ac_need_defaults=false;; |
17237 | --header | --heade | --head | --hea ) | |
17238 | $ac_shift | |
81ecdfbb RW |
17239 | case $ac_optarg in |
17240 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
17241 | esac | |
17242 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 17243 | ac_need_defaults=false;; |
81ecdfbb RW |
17244 | --he | --h) |
17245 | # Conflict between --help and --header | |
17246 | as_fn_error "ambiguous option: \`$1' | |
17247 | Try \`$0 --help' for more information.";; | |
17248 | --help | --hel | -h ) | |
17249 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
17250 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
17251 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
17252 | ac_cs_silent=: ;; | |
c906108c | 17253 | |
bec39cab | 17254 | # This is an error. |
81ecdfbb RW |
17255 | -*) as_fn_error "unrecognized option: \`$1' |
17256 | Try \`$0 --help' for more information." ;; | |
c906108c | 17257 | |
81ecdfbb RW |
17258 | *) as_fn_append ac_config_targets " $1" |
17259 | ac_need_defaults=false ;; | |
c906108c | 17260 | |
bec39cab AC |
17261 | esac |
17262 | shift | |
17263 | done | |
c906108c | 17264 | |
bec39cab | 17265 | ac_configure_extra_args= |
c906108c | 17266 | |
bec39cab AC |
17267 | if $ac_cs_silent; then |
17268 | exec 6>/dev/null | |
17269 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
17270 | fi | |
c906108c | 17271 | |
bec39cab | 17272 | _ACEOF |
81ecdfbb | 17273 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 17274 | if \$ac_cs_recheck; then |
81ecdfbb RW |
17275 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
17276 | shift | |
17277 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
17278 | CONFIG_SHELL='$SHELL' | |
17279 | export CONFIG_SHELL | |
17280 | exec "\$@" | |
bec39cab AC |
17281 | fi |
17282 | ||
17283 | _ACEOF | |
81ecdfbb RW |
17284 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17285 | exec 5>>config.log | |
17286 | { | |
17287 | echo | |
17288 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
17289 | ## Running $as_me. ## | |
17290 | _ASBOX | |
17291 | $as_echo "$ac_log" | |
17292 | } >&5 | |
bec39cab | 17293 | |
81ecdfbb RW |
17294 | _ACEOF |
17295 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 17296 | # |
81ecdfbb | 17297 | # INIT-COMMANDS |
c906108c | 17298 | # |
a417dc56 | 17299 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 17300 | |
bec39cab AC |
17301 | _ACEOF |
17302 | ||
81ecdfbb | 17303 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 17304 | |
81ecdfbb | 17305 | # Handling of arguments. |
bec39cab | 17306 | for ac_config_target in $ac_config_targets |
c906108c | 17307 | do |
81ecdfbb RW |
17308 | case $ac_config_target in |
17309 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
17310 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 17311 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 17312 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 17313 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 17314 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 17315 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 17316 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 17317 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
17318 | |
17319 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
17320 | esac |
17321 | done | |
17322 | ||
81ecdfbb | 17323 | |
bec39cab AC |
17324 | # If the user did not use the arguments to specify the items to instantiate, |
17325 | # then the envvar interface is used. Set only those that are not. | |
17326 | # We use the long form for the default assignment because of an extremely | |
17327 | # bizarre bug on SunOS 4.1.3. | |
17328 | if $ac_need_defaults; then | |
17329 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17330 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17331 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
17332 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17333 | fi | |
17334 | ||
b4e70030 | 17335 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 17336 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 17337 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
17338 | # Hook for its removal unless debugging. |
17339 | # Note that there is a small window in which the directory will not be cleaned: | |
17340 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
17341 | $debug || |
17342 | { | |
81ecdfbb RW |
17343 | tmp= |
17344 | trap 'exit_status=$? | |
17345 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
17346 | ' 0 | |
17347 | trap 'as_fn_exit 1' 1 2 13 15 | |
17348 | } | |
17349 | # Create a (secure) tmp directory for tmp files. | |
17350 | ||
17351 | { | |
17352 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
17353 | test -n "$tmp" && test -d "$tmp" | |
17354 | } || | |
17355 | { | |
17356 | tmp=./conf$$-$RANDOM | |
17357 | (umask 077 && mkdir "$tmp") | |
17358 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
17359 | ||
17360 | # Set up the scripts for CONFIG_FILES section. | |
17361 | # No need to generate them if there are no CONFIG_FILES. | |
17362 | # This happens for instance with `./config.status config.h'. | |
17363 | if test -n "$CONFIG_FILES"; then | |
17364 | ||
17365 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
17366 | ac_cs_awk_getline=: | |
17367 | ac_cs_awk_pipe_init= | |
17368 | ac_cs_awk_read_file=' | |
17369 | while ((getline aline < (F[key])) > 0) | |
17370 | print(aline) | |
17371 | close(F[key])' | |
17372 | ac_cs_awk_pipe_fini= | |
17373 | else | |
17374 | ac_cs_awk_getline=false | |
17375 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
17376 | ac_cs_awk_read_file=' | |
17377 | print "|#_!!_#|" | |
17378 | print "cat " F[key] " &&" | |
17379 | '$ac_cs_awk_pipe_init | |
17380 | # The final `:' finishes the AND list. | |
17381 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
17382 | fi | |
17383 | ac_cr=`echo X | tr X '\015'` | |
17384 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
17385 | # But we know of no other shell where ac_cr would be empty at this | |
17386 | # point, so we can use a bashism as a fallback. | |
17387 | if test "x$ac_cr" = x; then | |
17388 | eval ac_cr=\$\'\\r\' | |
17389 | fi | |
17390 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
17391 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
17392 | ac_cs_awk_cr='\r' | |
17393 | else | |
17394 | ac_cs_awk_cr=$ac_cr | |
17395 | fi | |
17396 | ||
17397 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
17398 | _ACEOF | |
17399 | ||
17400 | # Create commands to substitute file output variables. | |
17401 | { | |
17402 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
17403 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
17404 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
17405 | echo "_ACAWK" && | |
17406 | echo "_ACEOF" | |
17407 | } >conf$$files.sh && | |
17408 | . ./conf$$files.sh || | |
17409 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17410 | rm -f conf$$files.sh | |
17411 | ||
17412 | { | |
17413 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
17414 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
17415 | echo "_ACEOF" | |
17416 | } >conf$$subs.sh || | |
17417 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17418 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
17419 | ac_delim='%!_!# ' | |
17420 | for ac_last_try in false false false false false :; do | |
17421 | . ./conf$$subs.sh || | |
17422 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17423 | ||
17424 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
17425 | if test $ac_delim_n = $ac_delim_num; then | |
17426 | break | |
17427 | elif $ac_last_try; then | |
17428 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17429 | else | |
17430 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17431 | fi | |
17432 | done | |
17433 | rm -f conf$$subs.sh | |
17434 | ||
17435 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17436 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
17437 | _ACEOF | |
17438 | sed -n ' | |
17439 | h | |
17440 | s/^/S["/; s/!.*/"]=/ | |
17441 | p | |
17442 | g | |
17443 | s/^[^!]*!// | |
17444 | :repl | |
17445 | t repl | |
17446 | s/'"$ac_delim"'$// | |
17447 | t delim | |
17448 | :nl | |
17449 | h | |
17450 | s/\(.\{148\}\).*/\1/ | |
17451 | t more1 | |
17452 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
17453 | p | |
17454 | n | |
17455 | b repl | |
17456 | :more1 | |
17457 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17458 | p | |
17459 | g | |
17460 | s/.\{148\}// | |
17461 | t nl | |
17462 | :delim | |
17463 | h | |
17464 | s/\(.\{148\}\).*/\1/ | |
17465 | t more2 | |
17466 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
17467 | p | |
17468 | b | |
17469 | :more2 | |
17470 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17471 | p | |
17472 | g | |
17473 | s/.\{148\}// | |
17474 | t delim | |
17475 | ' <conf$$subs.awk | sed ' | |
17476 | /^[^""]/{ | |
17477 | N | |
17478 | s/\n// | |
17479 | } | |
17480 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
17481 | rm -f conf$$subs.awk | |
17482 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17483 | _ACAWK | |
17484 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
17485 | for (key in S) S_is_set[key] = 1 | |
17486 | FS = "\a" | |
17487 | \$ac_cs_awk_pipe_init | |
17488 | } | |
17489 | { | |
17490 | line = $ 0 | |
17491 | nfields = split(line, field, "@") | |
17492 | substed = 0 | |
17493 | len = length(field[1]) | |
17494 | for (i = 2; i < nfields; i++) { | |
17495 | key = field[i] | |
17496 | keylen = length(key) | |
17497 | if (S_is_set[key]) { | |
17498 | value = S[key] | |
17499 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
17500 | len += length(value) + length(field[++i]) | |
17501 | substed = 1 | |
17502 | } else | |
17503 | len += 1 + keylen | |
17504 | } | |
17505 | if (nfields == 3 && !substed) { | |
17506 | key = field[2] | |
17507 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
17508 | \$ac_cs_awk_read_file | |
17509 | next | |
17510 | } | |
17511 | } | |
17512 | print line | |
b4e70030 | 17513 | } |
81ecdfbb RW |
17514 | \$ac_cs_awk_pipe_fini |
17515 | _ACAWK | |
17516 | _ACEOF | |
17517 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17518 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
17519 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
17520 | else | |
17521 | cat | |
17522 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
17523 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
17524 | _ACEOF | |
17525 | ||
17526 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
17527 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
17528 | # trailing colons and then remove the whole line if VPATH becomes empty | |
17529 | # (actually we leave an empty line to preserve line numbers). | |
17530 | if test "x$srcdir" = x.; then | |
17531 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
17532 | s/:*\$(srcdir):*/:/ | |
17533 | s/:*\${srcdir}:*/:/ | |
17534 | s/:*@srcdir@:*/:/ | |
17535 | s/^\([^=]*=[ ]*\):*/\1/ | |
17536 | s/:*$// | |
17537 | s/^[^=]*=[ ]*$// | |
17538 | }' | |
17539 | fi | |
17540 | ||
17541 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17542 | fi # test -n "$CONFIG_FILES" | |
17543 | ||
17544 | # Set up the scripts for CONFIG_HEADERS section. | |
17545 | # No need to generate them if there are no CONFIG_HEADERS. | |
17546 | # This happens for instance with `./config.status Makefile'. | |
17547 | if test -n "$CONFIG_HEADERS"; then | |
17548 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
17549 | BEGIN { | |
17550 | _ACEOF | |
17551 | ||
17552 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
17553 | # here-document in config.status, that substitutes the proper values into | |
17554 | # config.h.in to produce config.h. | |
4e8d927d | 17555 | |
81ecdfbb RW |
17556 | # Create a delimiter string that does not exist in confdefs.h, to ease |
17557 | # handling of long lines. | |
17558 | ac_delim='%!_!# ' | |
17559 | for ac_last_try in false false :; do | |
17560 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
17561 | if test -z "$ac_t"; then | |
17562 | break | |
17563 | elif $ac_last_try; then | |
17564 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
17565 | else | |
17566 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17567 | fi | |
17568 | done | |
4e8d927d | 17569 | |
81ecdfbb RW |
17570 | # For the awk script, D is an array of macro values keyed by name, |
17571 | # likewise P contains macro parameters if any. Preserve backslash | |
17572 | # newline sequences. | |
17573 | ||
17574 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
17575 | sed -n ' | |
17576 | s/.\{148\}/&'"$ac_delim"'/g | |
17577 | t rset | |
17578 | :rset | |
17579 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
17580 | t def | |
17581 | d | |
17582 | :def | |
17583 | s/\\$// | |
17584 | t bsnl | |
17585 | s/["\\]/\\&/g | |
17586 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17587 | D["\1"]=" \3"/p | |
17588 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
17589 | d | |
17590 | :bsnl | |
17591 | s/["\\]/\\&/g | |
17592 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17593 | D["\1"]=" \3\\\\\\n"\\/p | |
17594 | t cont | |
17595 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
17596 | t cont | |
17597 | d | |
17598 | :cont | |
17599 | n | |
17600 | s/.\{148\}/&'"$ac_delim"'/g | |
17601 | t clear | |
17602 | :clear | |
17603 | s/\\$// | |
17604 | t bsnlc | |
17605 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
17606 | d | |
17607 | :bsnlc | |
17608 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
17609 | b cont | |
17610 | ' <confdefs.h | sed ' | |
17611 | s/'"$ac_delim"'/"\\\ | |
17612 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
17613 | ||
17614 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17615 | for (key in D) D_is_set[key] = 1 | |
17616 | FS = "\a" | |
17617 | } | |
17618 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
17619 | line = \$ 0 | |
17620 | split(line, arg, " ") | |
17621 | if (arg[1] == "#") { | |
17622 | defundef = arg[2] | |
17623 | mac1 = arg[3] | |
17624 | } else { | |
17625 | defundef = substr(arg[1], 2) | |
17626 | mac1 = arg[2] | |
17627 | } | |
17628 | split(mac1, mac2, "(") #) | |
17629 | macro = mac2[1] | |
17630 | prefix = substr(line, 1, index(line, defundef) - 1) | |
17631 | if (D_is_set[macro]) { | |
17632 | # Preserve the white space surrounding the "#". | |
17633 | print prefix "define", macro P[macro] D[macro] | |
17634 | next | |
17635 | } else { | |
17636 | # Replace #undef with comments. This is necessary, for example, | |
17637 | # in the case of _POSIX_SOURCE, which is predefined and required | |
17638 | # on some systems where configure will not decide to define it. | |
17639 | if (defundef == "undef") { | |
17640 | print "/*", prefix defundef, macro, "*/" | |
17641 | next | |
17642 | } | |
17643 | } | |
b4e70030 | 17644 | } |
81ecdfbb RW |
17645 | { print } |
17646 | _ACAWK | |
b4e70030 | 17647 | _ACEOF |
81ecdfbb RW |
17648 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17649 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
17650 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 17651 | |
4e8d927d | 17652 | |
81ecdfbb RW |
17653 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
17654 | shift | |
17655 | for ac_tag | |
17656 | do | |
17657 | case $ac_tag in | |
17658 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
17659 | esac | |
17660 | case $ac_mode$ac_tag in | |
17661 | :[FHL]*:*);; | |
17662 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
17663 | :[FH]-) ac_tag=-:-;; | |
17664 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
17665 | esac | |
17666 | ac_save_IFS=$IFS | |
17667 | IFS=: | |
17668 | set x $ac_tag | |
17669 | IFS=$ac_save_IFS | |
17670 | shift | |
17671 | ac_file=$1 | |
17672 | shift | |
4e8d927d | 17673 | |
81ecdfbb RW |
17674 | case $ac_mode in |
17675 | :L) ac_source=$1;; | |
17676 | :[FH]) | |
17677 | ac_file_inputs= | |
17678 | for ac_f | |
17679 | do | |
17680 | case $ac_f in | |
17681 | -) ac_f="$tmp/stdin";; | |
17682 | *) # Look for the file first in the build tree, then in the source tree | |
17683 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
17684 | # because $ac_f cannot contain `:'. | |
17685 | test -f "$ac_f" || | |
17686 | case $ac_f in | |
17687 | [\\/$]*) false;; | |
17688 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
17689 | esac || | |
17690 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
17691 | esac | |
17692 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
17693 | as_fn_append ac_file_inputs " '$ac_f'" | |
17694 | done | |
17695 | ||
17696 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17697 | # use $as_me), people would be surprised to read: | |
17698 | # /* config.h. Generated by config.status. */ | |
17699 | configure_input='Generated from '` | |
17700 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
17701 | `' by configure.' | |
17702 | if test x"$ac_file" != x-; then | |
17703 | configure_input="$ac_file. $configure_input" | |
17704 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
17705 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 17706 | fi |
81ecdfbb RW |
17707 | # Neutralize special characters interpreted by sed in replacement strings. |
17708 | case $configure_input in #( | |
17709 | *\&* | *\|* | *\\* ) | |
17710 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
17711 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
17712 | *) ac_sed_conf_input=$configure_input;; | |
17713 | esac | |
4e8d927d | 17714 | |
81ecdfbb RW |
17715 | case $ac_tag in |
17716 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
17717 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
17718 | esac | |
17719 | ;; | |
c906108c SS |
17720 | esac |
17721 | ||
81ecdfbb | 17722 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
17723 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17724 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
17725 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17726 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
17727 | $as_echo X"$ac_file" | | |
17728 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17729 | s//\1/ | |
17730 | q | |
17731 | } | |
17732 | /^X\(\/\/\)[^/].*/{ | |
17733 | s//\1/ | |
17734 | q | |
17735 | } | |
17736 | /^X\(\/\/\)$/{ | |
17737 | s//\1/ | |
17738 | q | |
17739 | } | |
17740 | /^X\(\/\).*/{ | |
17741 | s//\1/ | |
17742 | q | |
17743 | } | |
17744 | s/.*/./; q'` | |
17745 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17746 | ac_builddir=. |
17747 | ||
81ecdfbb RW |
17748 | case "$ac_dir" in |
17749 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17750 | *) | |
17751 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17752 | # A ".." for each directory in $ac_dir_suffix. | |
17753 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17754 | case $ac_top_builddir_sub in | |
17755 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17756 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17757 | esac ;; | |
17758 | esac | |
17759 | ac_abs_top_builddir=$ac_pwd | |
17760 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17761 | # for backward compatibility: | |
17762 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17763 | |
17764 | case $srcdir in | |
81ecdfbb | 17765 | .) # We are building in place. |
bec39cab | 17766 | ac_srcdir=. |
81ecdfbb RW |
17767 | ac_top_srcdir=$ac_top_builddir_sub |
17768 | ac_abs_top_srcdir=$ac_pwd ;; | |
17769 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17770 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17771 | ac_top_srcdir=$srcdir |
17772 | ac_abs_top_srcdir=$srcdir ;; | |
17773 | *) # Relative name. | |
17774 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17775 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17776 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17777 | esac |
81ecdfbb | 17778 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 17779 | |
c906108c | 17780 | |
81ecdfbb RW |
17781 | case $ac_mode in |
17782 | :F) | |
17783 | # | |
17784 | # CONFIG_FILE | |
17785 | # | |
c906108c | 17786 | |
bec39cab AC |
17787 | case $INSTALL in |
17788 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 17789 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 17790 | esac |
81ecdfbb | 17791 | _ACEOF |
121ce6e5 | 17792 | |
81ecdfbb RW |
17793 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17794 | # If the template does not know about datarootdir, expand it. | |
17795 | # FIXME: This hack should be removed a few years after 2.60. | |
17796 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
17797 | ac_sed_dataroot=' | |
17798 | /datarootdir/ { | |
17799 | p | |
17800 | q | |
17801 | } | |
17802 | /@datadir@/p | |
17803 | /@docdir@/p | |
17804 | /@infodir@/p | |
17805 | /@localedir@/p | |
17806 | /@mandir@/p' | |
17807 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
17808 | *datarootdir*) ac_datarootdir_seen=yes;; | |
17809 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
17810 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
17811 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
17812 | _ACEOF | |
17813 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17814 | ac_datarootdir_hack=' | |
17815 | s&@datadir@&$datadir&g | |
17816 | s&@docdir@&$docdir&g | |
17817 | s&@infodir@&$infodir&g | |
17818 | s&@localedir@&$localedir&g | |
17819 | s&@mandir@&$mandir&g | |
17820 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
17821 | esac | |
4e8d927d | 17822 | _ACEOF |
81ecdfbb RW |
17823 | |
17824 | # Neutralize VPATH when `$srcdir' = `.'. | |
17825 | # Shell code in configure.ac might set extrasub. | |
17826 | # FIXME: do we really want to maintain this feature? | |
17827 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17828 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17829 | $extrasub |
17830 | _ACEOF | |
81ecdfbb | 17831 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17832 | :t |
17833 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17834 | s|@configure_input@|$ac_sed_conf_input|;t t |
17835 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17836 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17837 | s&@srcdir@&$ac_srcdir&;t t | |
17838 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17839 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17840 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17841 | s&@builddir@&$ac_builddir&;t t | |
17842 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17843 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17844 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
17845 | $ac_datarootdir_hack |
17846 | " | |
17847 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17848 | if $ac_cs_awk_getline; then | |
17849 | $AWK -f "$tmp/subs.awk" | |
17850 | else | |
17851 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17852 | fi >$tmp/out \ | |
17853 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17854 | ||
17855 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17856 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17857 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17859 | which seems to be undefined. Please make sure it is defined." >&5 | |
17860 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17861 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17862 | ||
17863 | rm -f "$tmp/stdin" | |
bec39cab | 17864 | case $ac_file in |
81ecdfbb RW |
17865 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17866 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17867 | esac \ | |
17868 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17869 | ;; | |
17870 | :H) | |
17871 | # | |
17872 | # CONFIG_HEADER | |
17873 | # | |
bec39cab | 17874 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17875 | { |
17876 | $as_echo "/* $configure_input */" \ | |
17877 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17878 | } >"$tmp/config.h" \ | |
17879 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17880 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17881 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17882 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17883 | else |
81ecdfbb RW |
17884 | rm -f "$ac_file" |
17885 | mv "$tmp/config.h" "$ac_file" \ | |
17886 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17887 | fi |
17888 | else | |
81ecdfbb RW |
17889 | $as_echo "/* $configure_input */" \ |
17890 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17891 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17892 | fi |
81ecdfbb RW |
17893 | ;; |
17894 | :L) | |
17895 | # | |
17896 | # CONFIG_LINK | |
17897 | # | |
c906108c | 17898 | |
81ecdfbb RW |
17899 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17900 | : | |
b4e70030 | 17901 | else |
81ecdfbb RW |
17902 | # Prefer the file from the source tree if names are identical. |
17903 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17904 | ac_source=$srcdir/$ac_source | |
17905 | fi | |
b4e70030 | 17906 | |
81ecdfbb RW |
17907 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17908 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17909 | |
81ecdfbb RW |
17910 | if test ! -r "$ac_source"; then |
17911 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17912 | fi | |
17913 | rm -f "$ac_file" | |
bec39cab | 17914 | |
81ecdfbb RW |
17915 | # Try a relative symlink, then a hard link, then a copy. |
17916 | case $srcdir in | |
17917 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17918 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17919 | esac | |
17920 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17921 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17922 | cp -p "$ac_source" "$ac_file" || | |
17923 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17924 | fi | |
17925 | ;; | |
17926 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17927 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17928 | ;; | |
c906108c | 17929 | esac |
b4e70030 | 17930 | |
bec39cab | 17931 | |
81ecdfbb RW |
17932 | case $ac_file$ac_mode in |
17933 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 17934 | "gcore":F) chmod +x gcore ;; |
1e94266c SM |
17935 | "Makefile":F) |
17936 | case x$CONFIG_HEADERS in | |
17937 | xconfig.h:config.in) | |
17938 | echo > stamp-h ;; | |
17939 | esac | |
17940 | ;; | |
17941 | "gdb-gdb.gdb":F) | |
17942 | case x$CONFIG_HEADERS in | |
17943 | xconfig.h:config.in) | |
17944 | echo > stamp-h ;; | |
17945 | esac | |
17946 | ;; | |
17947 | "doc/Makefile":F) | |
17948 | case x$CONFIG_HEADERS in | |
17949 | xconfig.h:config.in) | |
17950 | echo > stamp-h ;; | |
17951 | esac | |
17952 | ;; | |
17953 | "data-directory/Makefile":F) | |
c906108c SS |
17954 | case x$CONFIG_HEADERS in |
17955 | xconfig.h:config.in) | |
17956 | echo > stamp-h ;; | |
17957 | esac | |
bec39cab | 17958 | ;; |
81ecdfbb | 17959 | |
bec39cab | 17960 | esac |
81ecdfbb | 17961 | done # for ac_tag |
c906108c | 17962 | |
bec39cab | 17963 | |
81ecdfbb | 17964 | as_fn_exit 0 |
bec39cab | 17965 | _ACEOF |
bec39cab AC |
17966 | ac_clean_files=$ac_clean_files_save |
17967 | ||
81ecdfbb RW |
17968 | test $ac_write_fail = 0 || |
17969 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17970 | ||
bec39cab AC |
17971 | |
17972 | # configure is writing to config.log, and then calls config.status. | |
17973 | # config.status does its own redirection, appending to config.log. | |
17974 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17975 | # by configure, so config.status won't be able to write to it; its | |
17976 | # output is simply discarded. So we exec the FD to /dev/null, | |
17977 | # effectively closing config.log, so it can be properly (re)opened and | |
17978 | # appended to by config.status. When coming back to configure, we | |
17979 | # need to make the FD available again. | |
17980 | if test "$no_create" != yes; then | |
17981 | ac_cs_success=: | |
17982 | ac_config_status_args= | |
17983 | test "$silent" = yes && | |
17984 | ac_config_status_args="$ac_config_status_args --quiet" | |
17985 | exec 5>/dev/null | |
17986 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17987 | exec 5>>config.log | |
17988 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17989 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17990 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17991 | fi |
c906108c | 17992 | |
bec39cab | 17993 | # |
81ecdfbb | 17994 | # CONFIG_SUBDIRS section. |
bec39cab | 17995 | # |
c906108c SS |
17996 | if test "$no_recursion" != yes; then |
17997 | ||
81ecdfbb RW |
17998 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17999 | # so they do not pile up. | |
c906108c SS |
18000 | ac_sub_configure_args= |
18001 | ac_prev= | |
fdc59709 PB |
18002 | eval "set x $ac_configure_args" |
18003 | shift | |
18004 | for ac_arg | |
18005 | do | |
c906108c SS |
18006 | if test -n "$ac_prev"; then |
18007 | ac_prev= | |
18008 | continue | |
18009 | fi | |
bec39cab | 18010 | case $ac_arg in |
c906108c SS |
18011 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
18012 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
18013 | ac_prev=cache_file ;; | |
18014 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
18015 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
18016 | | --c=*) | |
18017 | ;; | |
18018 | --config-cache | -C) | |
c906108c SS |
18019 | ;; |
18020 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
18021 | ac_prev=srcdir ;; | |
18022 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
18023 | ;; | |
bec39cab AC |
18024 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
18025 | ac_prev=prefix ;; | |
18026 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
18027 | ;; | |
81ecdfbb RW |
18028 | --disable-option-checking) |
18029 | ;; | |
fdc59709 PB |
18030 | *) |
18031 | case $ac_arg in | |
81ecdfbb | 18032 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 18033 | esac |
81ecdfbb | 18034 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
18035 | esac |
18036 | done | |
18037 | ||
bec39cab AC |
18038 | # Always prepend --prefix to ensure using the same prefix |
18039 | # in subdir configurations. | |
fdc59709 PB |
18040 | ac_arg="--prefix=$prefix" |
18041 | case $ac_arg in | |
81ecdfbb | 18042 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 18043 | esac |
81ecdfbb RW |
18044 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
18045 | ||
18046 | # Pass --silent | |
18047 | if test "$silent" = yes; then | |
18048 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
18049 | fi | |
18050 | ||
18051 | # Always prepend --disable-option-checking to silence warnings, since | |
18052 | # different subdirs can have different --enable and --with options. | |
18053 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 18054 | |
b4e70030 | 18055 | ac_popdir=`pwd` |
bec39cab | 18056 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
18057 | |
18058 | # Do not complain, so a configure script can configure whichever | |
18059 | # parts of a large source tree are present. | |
fdc59709 | 18060 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 18061 | |
81ecdfbb RW |
18062 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
18063 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
18064 | $as_echo "$ac_msg" >&6 | |
18065 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18066 | ac_builddir=. |
18067 | ||
81ecdfbb RW |
18068 | case "$ac_dir" in |
18069 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18070 | *) | |
18071 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18072 | # A ".." for each directory in $ac_dir_suffix. | |
18073 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18074 | case $ac_top_builddir_sub in | |
18075 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18076 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18077 | esac ;; | |
18078 | esac | |
18079 | ac_abs_top_builddir=$ac_pwd | |
18080 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18081 | # for backward compatibility: | |
18082 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18083 | |
18084 | case $srcdir in | |
81ecdfbb | 18085 | .) # We are building in place. |
bec39cab | 18086 | ac_srcdir=. |
81ecdfbb RW |
18087 | ac_top_srcdir=$ac_top_builddir_sub |
18088 | ac_abs_top_srcdir=$ac_pwd ;; | |
18089 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18090 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18091 | ac_top_srcdir=$srcdir |
18092 | ac_abs_top_srcdir=$srcdir ;; | |
18093 | *) # Relative name. | |
18094 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18095 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18096 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18097 | esac |
81ecdfbb | 18098 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 18099 | |
c906108c | 18100 | |
fdc59709 | 18101 | cd "$ac_dir" |
c906108c SS |
18102 | |
18103 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
18104 | if test -f "$ac_srcdir/configure.gnu"; then |
18105 | ac_sub_configure=$ac_srcdir/configure.gnu | |
18106 | elif test -f "$ac_srcdir/configure"; then | |
18107 | ac_sub_configure=$ac_srcdir/configure | |
18108 | elif test -f "$ac_srcdir/configure.in"; then | |
18109 | # This should be Cygnus configure. | |
18110 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 18111 | else |
81ecdfbb RW |
18112 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
18113 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
18114 | ac_sub_configure= |
18115 | fi | |
18116 | ||
18117 | # The recursion is here. | |
18118 | if test -n "$ac_sub_configure"; then | |
c906108c | 18119 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
18120 | case $cache_file in |
18121 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
18122 | *) # Relative name. |
18123 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 18124 | esac |
c906108c | 18125 | |
81ecdfbb RW |
18126 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
18127 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 18128 | # The eval makes quoting arguments work. |
fdc59709 PB |
18129 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
18130 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 18131 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
18132 | fi |
18133 | ||
fdc59709 | 18134 | cd "$ac_popdir" |
c906108c SS |
18135 | done |
18136 | fi | |
81ecdfbb RW |
18137 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
18138 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
18139 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
18140 | fi | |
c906108c | 18141 |